Skip to content

Commit

Permalink
Bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmitchell committed Aug 25, 2021
1 parent a028d69 commit 1580c0b
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function boot()
->where(function ($subquery) {
return $subquery->whereNull('timeout')
->orWhere([
['timeout', '<', Carbon::now()->format('Y-m-d H:i:s')]
['timeout', '>', Carbon::now()->format('Y-m-d H:i:s')]
]);
})
->get()
Expand All @@ -33,7 +33,7 @@ public function boot()
->where(function ($subquery) {
return $subquery->whereNull('timeout')
->orWhere([
['timeout', '<', Carbon::now()->format('Y-m-d H:i:s')]
['timeout', '>', Carbon::now()->format('Y-m-d H:i:s')]
]);
})
->get()
Expand All @@ -44,7 +44,7 @@ public function boot()
->where(function ($subquery) {
return $subquery->whereNull('timeout')
->orWhere([
['timeout', '<', Carbon::now()->format('Y-m-d H:i:s')]
['timeout', '>', Carbon::now()->format('Y-m-d H:i:s')]
]);
})
->get()
Expand Down
3 changes: 2 additions & 1 deletion controllers/Categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class Categories extends \Admin\Classes\AdminController
{
public $implement = [
'Admin\Actions\ListController',
'Admin\Actions\LocationAwareController',
];

public $listConfig = [
Expand Down Expand Up @@ -46,7 +47,7 @@ public function index()
$this->vars['noLocation'] = true;

Outofstock::where([
['type', '=', 'categories'],
['type', '=', 'menuitems'],
['timeout', '<', Carbon::now()->format('Y-m-d H:i:s')]
])->delete();

Expand Down
1 change: 1 addition & 0 deletions controllers/Menuitems.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class Menuitems extends \Admin\Classes\AdminController
{
public $implement = [
'Admin\Actions\ListController',
'Admin\Actions\LocationAwareController',
];

public $listConfig = [
Expand Down
1 change: 1 addition & 0 deletions controllers/Menus.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class Menus extends \Admin\Classes\AdminController
{
public $implement = [
'Admin\Actions\ListController',
'Admin\Actions\LocationAwareController',
];

public $listConfig = [
Expand Down
2 changes: 1 addition & 1 deletion models/config/categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
'menus' => [
'label' => 'lang:thoughtco.outofstock::default.button_menuitems',
'class' => 'btn btn-secondary',
'href' => 'thoughtco/outofstock/categories',
'href' => 'thoughtco/outofstock/menus',
],
'menuitems' => [
'label' => 'lang:thoughtco.outofstock::default.button_menuoptions',
Expand Down
1 change: 0 additions & 1 deletion models/config/menus.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
<a class="dropdown-item" href="'.admin_url('thoughtco/outofstock/menus/nostock/'.$value).'?hours=closing">'.lang('thoughtco.outofstock::default.button_closing').'</a>
<a class="dropdown-item" href="'.admin_url('thoughtco/outofstock/menus/nostock/'.$value).'">'.lang('thoughtco.outofstock::default.button_forever').'</a>
</div>';

}
],

Expand Down

0 comments on commit 1580c0b

Please sign in to comment.