Merge branch 'development'
Some checks failed
Deploy / deploy (push) Failing after 8s

This commit is contained in:
Nisse Lommerde 2025-03-11 12:52:46 -04:00
commit 43eebd9528
3 changed files with 8 additions and 2 deletions

View File

@ -1,6 +1,7 @@
# Changelog # Changelog
**2025-03-11** **2025-03-11**
- Fixed #122 - Non-admins can see payments
- Fixed #107 - Fix dashboard - Fixed #107 - Fix dashboard
- Fixed #118 - Improved customer form and re-add 'create customer' to order form - Fixed #118 - Improved customer form and re-add 'create customer' to order form
- Fixed #117 - Draft orders should not show up in order tabs - Fixed #117 - Draft orders should not show up in order tabs

View File

@ -112,8 +112,7 @@ public static function getPages(): array
{ {
return [ return [
'index' => \App\Filament\Admin\Resources\CustomerResource\Pages\ListCustomers::route('/'), 'index' => \App\Filament\Admin\Resources\CustomerResource\Pages\ListCustomers::route('/'),
// 'create' => \App\Filament\Admin\Resources\CustomerResource\Pages\CreateCustomer::route('/create'), 'edit' => \App\Filament\Admin\Resources\CustomerResource\Pages\EditCustomer::route('/{record}/edit'),
'edit' => \App\Filament\Admin\Resources\CustomerResource\Pages\EditCustomer::route('/{record}/edit'),
]; ];
} }
} }

View File

@ -7,6 +7,7 @@
use Filament\Forms\Form; use Filament\Forms\Form;
use Filament\Resources\RelationManagers\RelationManager; use Filament\Resources\RelationManagers\RelationManager;
use Filament\Tables\Table; use Filament\Tables\Table;
use Illuminate\Database\Eloquent\Model;
class PaymentsRelationManager extends RelationManager class PaymentsRelationManager extends RelationManager
{ {
@ -27,4 +28,9 @@ public function table(Table $table): Table
{ {
return PaymentResource::table($table); return PaymentResource::table($table);
} }
public static function canViewForRecord(Model $ownerRecord, string $pageClass): bool
{
return auth()->user()->is_admin ?? false;
}
} }