ranjith-dev #319

Merged
jothi merged 4 commits from ranjith-dev into master 2026-02-06 09:44:39 +00:00
2 changed files with 457 additions and 542 deletions
Showing only changes of commit b415c375ab - Show all commits

View File

@@ -56,7 +56,7 @@ class LocatorInvoiceValidationResource extends Resource
->options(function (callable $get) {
$userHas = Filament::auth()->user()->plant_id;
return ($userHas && strlen($userHas) > 0) ? Plant::where('id', $userHas)->pluck('name', 'id')->toArray() : Plant::pluck('name', 'id')->toArray();
return ($userHas && strlen($userHas) > 0) ? Plant::where('id', $userHas)->pluck('name', 'id')->toArray() : Plant::orderBy('code')->pluck('name', 'id')->toArray();
})
->disabled(fn (Get $get) => $get('invoice_number'))
->required()
@@ -498,7 +498,7 @@ class LocatorInvoiceValidationResource extends Resource
->options(function (callable $get) {
$userHas = Filament::auth()->user()->plant_id;
return ($userHas && strlen($userHas) > 0) ? Plant::where('id', $userHas)->pluck('name', 'id')->toArray() : Plant::pluck('name', 'id')->toArray();
return ($userHas && strlen($userHas) > 0) ? Plant::where('id', $userHas)->pluck('name', 'id')->toArray() : Plant::orderBy('code')->pluck('name', 'id')->toArray();
})
->label('Select Plant')
->required()
@@ -534,8 +534,7 @@ class LocatorInvoiceValidationResource extends Resource
// $invoiceNumber = trim(str_replace('.xlsx', '', $originalName));
// $originalNameOnly = pathinfo($originalName, PATHINFO_FILENAME);
$folderPath = Configuration::where('c_name', 'INVOICE_FOLDER_PATH')
->value('c_value');
$folderPath = 'ExportDispatch'; // Configuration::where('c_name', 'INVOICE_FOLDER_PATH')->value('c_value');
$fullFolderPath = "uploads/$folderPath";
@@ -708,7 +707,7 @@ class LocatorInvoiceValidationResource extends Resource
->options(function (callable $get) {
$userHas = Filament::auth()->user()->plant_id;
return ($userHas && strlen($userHas) > 0) ? Plant::where('id', $userHas)->pluck('name', 'id')->toArray() : Plant::pluck('name', 'id')->toArray();
return ($userHas && strlen($userHas) > 0) ? Plant::where('id', $userHas)->pluck('name', 'id')->toArray() : Plant::orderBy('code')->pluck('name', 'id')->toArray();
})
->reactive()
->afterStateUpdated(function ($state, callable $set, callable $get): void {