1
0
forked from poc/pds

Updated navigation list order and import, export button color and navigation label

This commit is contained in:
dhanabalan
2025-07-08 18:59:23 +05:30
parent 0f6b62b47a
commit 3818fa612e
4 changed files with 38 additions and 5 deletions

View File

@@ -31,6 +31,8 @@ class LocatorValidation extends Page implements HasForms
protected static ?string $navigationGroup = 'Export Dispatch';
protected static ?int $navigationSort = 2;
use InteractsWithForms;
public $pId, $palletNo, $serialNo;
@@ -1790,7 +1792,7 @@ class LocatorValidation extends Page implements HasForms
public static function getNavigationLabel(): string
{
return 'Locator Validations';
return 'Scan Locator';
}
public static function canAccess(): bool

View File

@@ -43,6 +43,8 @@ class LocatorInvoiceValidationResource extends Resource
protected static ?string $navigationGroup = 'Export Dispatch';
protected static ?int $navigationSort = 5;
public static function form(Form $form): Form
{
return $form
@@ -640,11 +642,15 @@ class LocatorInvoiceValidationResource extends Resource
ImportAction::make()
->importer(LocatorInvoiceValidationImporter::class)
->label('Import Locator Invoice')
->color('warning')
->visible(function() {
return Filament::auth()->user()->can('view import locator invoice validation');
}),
ExportAction::make()
->exporter(LocatorInvoiceValidationExporter::class)
->label('Export Locator Invoice')
->color('warning')
->visible(function() {
return Filament::auth()->user()->can('view export locator invoice validation');
}),
@@ -894,6 +900,11 @@ class LocatorInvoiceValidationResource extends Resource
];
}
public static function getNavigationLabel(): string
{
return 'Scan Invoice';
}
public static function getPages(): array
{
return [

View File

@@ -36,8 +36,11 @@ class PalletValidationResource extends Resource
protected static ?string $model = PalletValidation::class;
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
protected static ?string $navigationGroup = 'Export Dispatch';
protected static ?int $navigationSort = 1;
public static function form(Form $form): Form
{
@@ -526,11 +529,15 @@ class PalletValidationResource extends Resource
}),
ImportAction::make()
->importer(PalletValidationImporter::class)
->label('Import Pallet')
->color('warning')
->visible(function() {
return Filament::auth()->user()->can('view import pallet validation');
}),
ExportAction::make()
->exporter(PalletValidationExporter::class)
->label('Export Pallet')
->color('warning')
->visible(function() {
return Filament::auth()->user()->can('view export pallet validation');
}),
@@ -544,6 +551,11 @@ class PalletValidationResource extends Resource
];
}
public static function getNavigationLabel(): string
{
return 'Scan Pallet';
}
public static function getPages(): array
{
return [

View File

@@ -38,6 +38,8 @@ class ReworkLocatorInvoiceValidationResource extends Resource
protected static ?string $navigationGroup = 'Export Dispatch';
protected static ?int $navigationSort = 7;
public static function form(Form $form): Form
{
return $form
@@ -241,6 +243,7 @@ class ReworkLocatorInvoiceValidationResource extends Resource
}),
Tables\Columns\TextColumn::make('plant.name')
->label('Plant')
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('invoice_number')
->label('Invoice Number')
@@ -314,11 +317,15 @@ class ReworkLocatorInvoiceValidationResource extends Resource
->headerActions([
ImportAction::make()
->importer(ReworkLocatorInvoiceValidationImporter::class)
->label('Import Rework Invoice')
->color('warning')
->visible(function() {
return Filament::auth()->user()->can('view import rework invoice validation');
}),
ExportAction::make()
->exporter(ReworkLocatorInvoiceValidationExporter::class)
->label('Export Rework Invoice')
->color('warning')
->visible(function() {
return Filament::auth()->user()->can('view export rework invoice validation');
}),
@@ -531,6 +538,11 @@ class ReworkLocatorInvoiceValidationResource extends Resource
];
}
public static function getNavigationLabel(): string
{
return 'Scan Rework';
}
public static function getPages(): array
{
return [
@@ -540,10 +552,6 @@ class ReworkLocatorInvoiceValidationResource extends Resource
'edit' => Pages\EditReworkLocatorInvoiceValidation::route('/{record}/edit'),
];
}
public static function getNavigationLabel(): string
{
return 'Rework Invoice / Pallet';
}
public static function getEloquentQuery(): Builder
{