Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
sampoyigi committed Sep 14, 2021
2 parents 41f934e + ae48966 commit 8960d1e
Show file tree
Hide file tree
Showing 281 changed files with 2,972 additions and 994 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ jobs:
run: |
git reset --hard HEAD
rm -rf ./vendor/tastyigniter/flame
wget https://github.com/tastyigniter/flame/archive/develop.zip -O ./vendor/tastyigniter/develop.zip
unzip ./vendor/tastyigniter/develop.zip -d ./vendor/tastyigniter
mv ./vendor/tastyigniter/flame-develop ./vendor/tastyigniter/flame
wget https://github.com/tastyigniter/flame/archive/master.zip -O ./vendor/tastyigniter/master.zip
unzip ./vendor/tastyigniter/master.zip -d ./vendor/tastyigniter
mv ./vendor/tastyigniter/flame-master ./vendor/tastyigniter/flame
composer dump-autoload
env:
DB_PORT: 13306
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
<a href="https://twitter.com/TastyIgniter"><img src="https://img.shields.io/twitter/follow/TastyIgniter.svg?label=Follow" alt="Twitter"></a>
</p>

[TastyIgniter](https://tastyigniter.com/) is an online food ordering and restaurant management system. TastyIgniter provides a professional and reliable platform for restaurants wanting to offer online ordering to their customers.
[TastyIgniter](https://tastyigniter.com/) provides a professional and reliable platform for restaurants wanting to offer
online food ordering and table reservation to their customers.

![screenshot](https://tastyigniter.com/assets/ui/images/mockups/Menus-v2.png)

Expand Down
21 changes: 19 additions & 2 deletions app/admin/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
use Admin\Classes\OnboardingSteps;
use Admin\Classes\PermissionManager;
use Admin\Classes\Widgets;
use Admin\Facades\AdminLocation;
use Admin\Facades\AdminMenu;
use Admin\Middleware\LogUserLastSeen;
use AdminLocation;
use AdminMenu;
use Igniter\Flame\ActivityLog\Models\Activity;
use Igniter\Flame\Foundation\Providers\AppServiceProvider;
use Illuminate\Console\Scheduling\Schedule;
Expand Down Expand Up @@ -55,6 +55,7 @@ public function register()
$this->registerSystemSettings();
$this->registerPermissions();
$this->registerDashboardWidgets();
$this->registerBulkActionWidgets();
$this->registerFormWidgets();
$this->registerMainMenuItems();
$this->registerNavMenuItems();
Expand Down Expand Up @@ -133,6 +134,19 @@ protected function registerDashboardWidgets()
});
}

protected function registerBulkActionWidgets()
{
Widgets::instance()->registerBulkActionWidgets(function (Widgets $manager) {
$manager->registerBulkActionWidget(\Admin\BulkActionWidgets\Status::class, [
'code' => 'status',
]);

$manager->registerBulkActionWidget(\Admin\BulkActionWidgets\Delete::class, [
'code' => 'delete',
]);
});
}

/**
* Register widgets
*/
Expand Down Expand Up @@ -674,6 +688,9 @@ protected function registerPermissions()
'Admin.Customers' => [
'label' => 'admin::lang.permissions.customers', 'group' => 'admin::lang.permissions.name',
],
'Admin.Impersonate' => [
'label' => 'admin::lang.permissions.impersonate_staff', 'group' => 'admin::lang.permissions.name',
],
'Admin.ImpersonateCustomers' => [
'label' => 'admin::lang.permissions.impersonate_customers', 'group' => 'admin::lang.permissions.name',
],
Expand Down
7 changes: 3 additions & 4 deletions app/admin/actions/AssigneeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use Admin\Widgets\Form;
use Admin\Widgets\Toolbar;
use Illuminate\Support\Facades\Event;
use System\Classes\BaseController;
use System\Classes\ControllerAction;

class AssigneeController extends ControllerAction
Expand All @@ -31,7 +30,7 @@ class AssigneeController extends ControllerAction
/**
* Assignee Controller constructor.
*
* @param BaseController $controller
* @param \Illuminate\Routing\Controller $controller
*
* @throws \Exception
*/
Expand All @@ -48,8 +47,8 @@ public function __construct($controller)
'assigneeApplyScope',
]);

$this->controller->bindEvent('controller.afterConstructor', function ($controller) {
if (!$controller->getUser())
$this->controller->bindEvent('controller.beforeRemap', function () {
if (!$this->controller->getUser())
return;

$this->assigneeBindToolbarEvents();
Expand Down
5 changes: 2 additions & 3 deletions app/admin/actions/CalendarController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

namespace Admin\Actions;

use System\Classes\BaseController;
use Admin\Facades\Template;
use System\Classes\ControllerAction;
use Template;

class CalendarController extends ControllerAction
{
Expand Down Expand Up @@ -50,7 +49,7 @@ class CalendarController extends ControllerAction
/**
* List_Controller constructor.
*
* @param BaseController $controller
* @param \Illuminate\Routing\Controller $controller
*
* @throws \Exception
*/
Expand Down
14 changes: 7 additions & 7 deletions app/admin/actions/FormController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@

use Admin\Classes\AdminController;
use Admin\Classes\FormField;
use Admin\Facades\Template;
use Admin\Traits\FormExtendable;
use Admin\Widgets\Toolbar;
use DB;
use Exception;
use Igniter\Flame\Database\Model;
use Igniter\Flame\Exception\ApplicationException;
use Model;
use Redirect;
use Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Redirect;
use Illuminate\Support\Facades\Request;
use System\Classes\ControllerAction;
use Template;

/**
* Form Controller Class
Expand Down Expand Up @@ -136,7 +136,7 @@ public function __construct($controller)
/**
* Prepare the widgets used by this action
*
* @param \Model $model
* @param \Igniter\Flame\Database\Model $model
*
* @param null $context
* @return void
Expand Down Expand Up @@ -494,7 +494,7 @@ protected function prepareModelsToSave($model, $saveData)
/**
* Sets a data collection to a model attributes, relations will also be set.
*
* @param \Model $model Model to save to
* @param \Igniter\Flame\Database\Model $model Model to save to
*
* @param array $saveData Data to save.
*
Expand Down
6 changes: 3 additions & 3 deletions app/admin/actions/ListController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

namespace Admin\Actions;

use Admin\Facades\Template;
use Admin\Traits\ListExtendable;
use System\Classes\BaseController;
use System\Classes\ControllerAction;
use Template;

/**
* List Controller Class
Expand Down Expand Up @@ -63,7 +62,7 @@ class ListController extends ControllerAction
/**
* List_Controller constructor.
*
* @param BaseController $controller
* @param \Illuminate\Routing\Controller $controller
*
* @throws \Exception
*/
Expand Down Expand Up @@ -181,6 +180,7 @@ public function makeList($alias)
$configFile = $listConfig['configFile'];
$modelConfig = $this->loadConfig($configFile, $requiredConfig, 'list');

$columnConfig['bulkActions'] = $modelConfig['bulkActions'] ?? [];
$columnConfig['columns'] = $modelConfig['columns'];
$columnConfig['model'] = $model;
$columnConfig['alias'] = $alias;
Expand Down
5 changes: 2 additions & 3 deletions app/admin/actions/LocationAwareController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use Admin\Facades\AdminLocation;
use Illuminate\Support\Facades\Event;
use System\Classes\BaseController;
use System\Classes\ControllerAction;

class LocationAwareController extends ControllerAction
Expand All @@ -30,7 +29,7 @@ class LocationAwareController extends ControllerAction
/**
* List_Controller constructor.
*
* @param BaseController $controller
* @param \Illuminate\Routing\Controller $controller
*
* @throws \Exception
*/
Expand All @@ -47,7 +46,7 @@ public function __construct($controller)
'locationApplyScope',
]);

$this->controller->bindEvent('controller.afterConstructor', function () {
$this->controller->bindEvent('controller.beforeRemap', function () {
$this->locationBindEvents();
});
}
Expand Down
Loading

0 comments on commit 8960d1e

Please sign in to comment.