diff --git a/.github/workflows/php-cs-fixer.yml b/.github/workflows/php-cs-fixer.yml index 4cf285f..7f44633 100644 --- a/.github/workflows/php-cs-fixer.yml +++ b/.github/workflows/php-cs-fixer.yml @@ -13,7 +13,7 @@ jobs: ref: ${{ github.head_ref }} - name: Run PHP CS Fixer - uses: docker://oskarstark/php-cs-fixer-ga + uses: docker://oskarstark/php-cs-fixer-ga:2.18.6 with: args: --config=.php_cs.dist --allow-risky=yes diff --git a/composer.json b/composer.json index 8ef7551..c0a4b08 100644 --- a/composer.json +++ b/composer.json @@ -16,9 +16,9 @@ ], "require": { "php": "^7.4|^8.0", - "tipoff/authorization": "^2.8.6", - "tipoff/locations": "^2.12", - "tipoff/support": "^2.1.5" + "tipoff/authorization": "^2.10.0", + "tipoff/locations": "^2.14.1", + "tipoff/support": "^2.2.0" }, "require-dev": { "tipoff/test-support": "^2.0.1" diff --git a/src/Nova/Invoice.php b/src/Nova/Invoice.php index 0dd03f1..2554220 100644 --- a/src/Nova/Invoice.php +++ b/src/Nova/Invoice.php @@ -30,14 +30,7 @@ class Invoice extends BaseResource public static function indexQuery(NovaRequest $request, $query) { - if ($request->user()->hasRole([ - 'Admin', - 'Owner', - 'Accountant', - 'Executive', - 'Reservation Manager', - 'Reservationist', - ])) { + if ($request->user()->hasPermissionTo('all locations')) { return $query; } @@ -71,7 +64,7 @@ public function fields(Request $request) }) ->fillUsing(function ($request, $model, $attribute) { $model->$attribute = $request->$attribute * 100; - }), + })->rules('required'), Text::make('Note'), DateTime::make('Invoiced At', 'invoiced_at')->exceptOnForms(), Date::make('Due Date', 'due_at'),