Refactored alignments and updated type from SFG to NON-FG on resource / importer / exporter pages
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Gemini PR Review / Gemini PR Review (pull_request) Has been cancelled
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Has been cancelled
Laravel Larastan / larastan (pull_request) Has been cancelled
Laravel Pint / pint (pull_request) Has been cancelled

This commit is contained in:
dhanabalan
2026-03-11 19:29:31 +05:30
parent ec8bfc8296
commit 658db00ac8
5 changed files with 84 additions and 97 deletions

View File

@@ -3,7 +3,6 @@
namespace App\Filament\Resources;
use App\Filament\Resources\NotInStockResource\Pages;
use App\Filament\Resources\NotInStockResource\RelationManagers;
use App\Models\NotInStock;
use App\Models\StickerMaster;
use Filament\Facades\Filament;
@@ -38,15 +37,15 @@ class NotInStockResource extends Resource
->required()
->searchable()
->options(function ($get) {
if (!$get('plant_id')) {
if (! $get('plant_id')) {
return [];
}
return StickerMaster::with('item')
->where('plant_id', $get('plant_id'))
->get()
->pluck('item.code', 'id')
->toArray();
return StickerMaster::with('item')
->where('plant_id', $get('plant_id'))
->get()
->pluck('item.code', 'id')
->toArray();
}),
Forms\Components\TextInput::make('location')
->label('Location'),
@@ -64,7 +63,7 @@ class NotInStockResource extends Resource
->label('Type')
->options([
'0' => 'FG',
'1' => 'SFG',
'1' => 'NON-FG',
]),
Forms\Components\TextInput::make('motor_scanned_status')
->label('Motor Scanned Status'),
@@ -122,7 +121,7 @@ class NotInStockResource extends Resource
->searchable()
->formatStateUsing(fn ($state) => match ($state) {
'0' => 'FG',
'1' => 'SFG',
'1' => 'NON-FG',
default => '-',
})
->sortable(),