ranjith-dev #319
@@ -56,7 +56,7 @@ class LocatorInvoiceValidationResource extends Resource
|
|||||||
->options(function (callable $get) {
|
->options(function (callable $get) {
|
||||||
$userHas = Filament::auth()->user()->plant_id;
|
$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'))
|
->disabled(fn (Get $get) => $get('invoice_number'))
|
||||||
->required()
|
->required()
|
||||||
@@ -498,7 +498,7 @@ class LocatorInvoiceValidationResource extends Resource
|
|||||||
->options(function (callable $get) {
|
->options(function (callable $get) {
|
||||||
$userHas = Filament::auth()->user()->plant_id;
|
$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')
|
->label('Select Plant')
|
||||||
->required()
|
->required()
|
||||||
@@ -534,8 +534,7 @@ class LocatorInvoiceValidationResource extends Resource
|
|||||||
// $invoiceNumber = trim(str_replace('.xlsx', '', $originalName));
|
// $invoiceNumber = trim(str_replace('.xlsx', '', $originalName));
|
||||||
// $originalNameOnly = pathinfo($originalName, PATHINFO_FILENAME);
|
// $originalNameOnly = pathinfo($originalName, PATHINFO_FILENAME);
|
||||||
|
|
||||||
$folderPath = Configuration::where('c_name', 'INVOICE_FOLDER_PATH')
|
$folderPath = 'ExportDispatch'; // Configuration::where('c_name', 'INVOICE_FOLDER_PATH')->value('c_value');
|
||||||
->value('c_value');
|
|
||||||
|
|
||||||
$fullFolderPath = "uploads/$folderPath";
|
$fullFolderPath = "uploads/$folderPath";
|
||||||
|
|
||||||
@@ -708,7 +707,7 @@ class LocatorInvoiceValidationResource extends Resource
|
|||||||
->options(function (callable $get) {
|
->options(function (callable $get) {
|
||||||
$userHas = Filament::auth()->user()->plant_id;
|
$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()
|
->reactive()
|
||||||
->afterStateUpdated(function ($state, callable $set, callable $get): void {
|
->afterStateUpdated(function ($state, callable $set, callable $get): void {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user