Compare commits
16 Commits
caeb0a5afd
...
ranjith-de
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
702dd69c94 | ||
|
|
ce65c68125 | ||
|
|
92f3352f6b | ||
|
|
a14cf0aef6 | ||
|
|
bdd8e9dfc3 | ||
|
|
951a69b85e | ||
|
|
dc6fd87c7b | ||
|
|
f464facd56 | ||
|
|
21d009ee1c | ||
|
|
8e7030b80b | ||
|
|
1931412511 | ||
|
|
0fef7b27bf | ||
|
|
115fe43428 | ||
|
|
5eb067899b | ||
|
|
8a2dac9982 | ||
|
|
79f09236ab |
@@ -44,6 +44,8 @@ class InvoiceValidationExporter extends Exporter
|
||||
->label('CAPACITOR SCANNED STATUS'),
|
||||
ExportColumn::make('scanned_status')
|
||||
->label('SCANNED STATUS'),
|
||||
ExportColumn::make('panel_box_code')
|
||||
->label('PANEL BOX CODE'),
|
||||
ExportColumn::make('panel_box_supplier')
|
||||
->label('PANEL BOX SUPPLIER'),
|
||||
ExportColumn::make('panel_box_serial_number')
|
||||
@@ -61,9 +63,13 @@ class InvoiceValidationExporter extends Exporter
|
||||
ExportColumn::make('created_at')
|
||||
->label('CREATED AT'),
|
||||
// ->dateTimeFormat('d-m-Y H:i:s'),
|
||||
ExportColumn::make('created_by')
|
||||
->label('CREATED BY'),
|
||||
ExportColumn::make('updated_at')
|
||||
->label('UPDATED AT'),
|
||||
// ->dateTimeFormat('d-m-Y H:i:s'),
|
||||
ExportColumn::make('updated_by')
|
||||
->label('UPDATED BY'),
|
||||
ExportColumn::make('deleted_at')
|
||||
->enabledByDefault(false)
|
||||
->label('DELETED AT'),
|
||||
|
||||
@@ -18,7 +18,7 @@ class UserImporter extends Importer
|
||||
public static function getColumns(): array
|
||||
{
|
||||
return [
|
||||
ImportColumn::make('plant')
|
||||
ImportColumn::make('plant_id')
|
||||
->requiredMapping()
|
||||
->exampleHeader('Plant Code')
|
||||
->example('1000')
|
||||
@@ -54,10 +54,13 @@ class UserImporter extends Importer
|
||||
public function resolveRecord(): ?User
|
||||
{
|
||||
$warnMsg = [];
|
||||
$plantCod = $this->data['plant'];
|
||||
$plantCod = $this->data['plant_id'];
|
||||
$plant = null;
|
||||
if (Str::length($plantCod) < 4 || ! is_numeric($plantCod) || ! preg_match('/^[1-9]\d{3,}$/', $plantCod)) {
|
||||
if (Str::length($plantCod) > 0 && (Str::length($plantCod) < 4 || ! is_numeric($plantCod) || ! preg_match('/^[1-9]\d{3,}$/', $plantCod))) {
|
||||
$warnMsg[] = 'Invalid plant code found!';
|
||||
} elseif (Str::length($plantCod) <= 0) {
|
||||
$plant = null;
|
||||
$plantCod = null;
|
||||
} else {
|
||||
$plant = Plant::where('code', $plantCod)->first();
|
||||
if (! $plant) {
|
||||
|
||||
@@ -67,7 +67,7 @@ class InvoiceValidationResource 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();
|
||||
})
|
||||
->default(function () {
|
||||
return optional(InvoiceValidation::latest()->first())->plant_id;
|
||||
@@ -77,7 +77,7 @@ class InvoiceValidationResource extends Resource
|
||||
->afterStateUpdated(function ($state, callable $set, callable $get) {
|
||||
$plantId = $get('plant_id');
|
||||
$set('update_invoice', null);
|
||||
// Ensure `linestop_id` is not cleared
|
||||
|
||||
if (! $plantId) {
|
||||
$set('invoice_number', null);
|
||||
$set('serial_number', null);
|
||||
@@ -87,6 +87,11 @@ class InvoiceValidationResource extends Resource
|
||||
|
||||
return;
|
||||
} else {
|
||||
$plantCode = Plant::find($plantId)?->code ?? null;
|
||||
$directory = "uploads/temp/{$plantCode}";
|
||||
if (! Storage::disk('local')->exists($directory)) {
|
||||
Storage::disk('local')->makeDirectory($directory);
|
||||
}
|
||||
$set('ivPlantError', null);
|
||||
}
|
||||
})
|
||||
@@ -207,6 +212,14 @@ class InvoiceValidationResource extends Resource
|
||||
Forms\Components\TextInput::make('id')
|
||||
->hidden()
|
||||
->readOnly(true),
|
||||
// Forms\Components\Hidden::make('created_by')
|
||||
// ->label('Created By')
|
||||
// ->default(Filament::auth()->user()?->name)
|
||||
// ->reactive(),
|
||||
// Forms\Components\Hidden::make('updated_by')
|
||||
// ->label('Updated By')
|
||||
// ->default(Filament::auth()->user()?->name)
|
||||
// ->reactive(),
|
||||
])
|
||||
->columns(5),
|
||||
]);
|
||||
@@ -262,9 +275,11 @@ class InvoiceValidationResource extends Resource
|
||||
Tables\Columns\TextColumn::make('scanned_status')
|
||||
->label('Scanned Status')
|
||||
->alignCenter(),
|
||||
// Tables\Columns\TextColumn::make('stickerMaster.panel_box_code')
|
||||
// ->label('Panel Box Code')
|
||||
// ->alignCenter(),
|
||||
Tables\Columns\TextColumn::make('panel_box_code')// stickerMaster.panel_box_code
|
||||
->label('Panel Box Code')
|
||||
->alignCenter()
|
||||
->sortable(), // ->searchable()
|
||||
// ->toggleable(isToggledHiddenByDefault: true),
|
||||
Tables\Columns\TextColumn::make('panel_box_supplier')
|
||||
->label('Panel Box Supplier')
|
||||
->alignCenter(),
|
||||
@@ -289,11 +304,20 @@ class InvoiceValidationResource extends Resource
|
||||
->label('Plant')
|
||||
->alignCenter()
|
||||
->sortable(),
|
||||
Tables\Columns\TextColumn::make('created_by')
|
||||
->label('Created By')
|
||||
->alignCenter()
|
||||
->sortable(),
|
||||
Tables\Columns\TextColumn::make('created_at')
|
||||
->label('Created At')
|
||||
->dateTime()
|
||||
->alignCenter()
|
||||
->sortable(),
|
||||
Tables\Columns\TextColumn::make('updated_by')
|
||||
->label('Updated By')
|
||||
->alignCenter()
|
||||
->sortable()
|
||||
->toggleable(isToggledHiddenByDefault: true),
|
||||
Tables\Columns\TextColumn::make('updated_at')
|
||||
->label('Updated At')
|
||||
->dateTime()
|
||||
@@ -332,7 +356,7 @@ class InvoiceValidationResource 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()
|
||||
@@ -341,19 +365,37 @@ class InvoiceValidationResource extends Resource
|
||||
})
|
||||
->afterStateUpdated(function ($state, callable $set, callable $get) {
|
||||
$set('invoice_serial_number', null);
|
||||
$plantId = $get('plant_id');
|
||||
$plantCode = Plant::find($plantId)?->code ?? null;
|
||||
|
||||
$directory = "uploads/temp/{$plantCode}";
|
||||
if ($plantId && ! Storage::disk('local')->exists($directory)) {
|
||||
Storage::disk('local')->makeDirectory($directory);
|
||||
}
|
||||
})
|
||||
->reactive(),
|
||||
|
||||
FileUpload::make('invoice_serial_number')
|
||||
->label('Invoice Serial Number')
|
||||
// ->required()
|
||||
->preserveFilenames() // <- this keeps the original filename
|
||||
->storeFiles(false) // prevent auto-storing, we will store manually
|
||||
->reactive()
|
||||
->required()
|
||||
->acceptedFileTypes([
|
||||
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||
'application/vnd.ms-excel', // Legacy .xls fallback if needed
|
||||
])
|
||||
->rules(['mimes:xlsx']) // Laravel validation: extension check
|
||||
->preserveFilenames() // <- this keeps the original filename
|
||||
->reactive()
|
||||
->storeFiles(false) // prevent auto-storing, we will store manually
|
||||
->disk('local') // 'local' refers to the local storage disk defined in config/filesystems.php, typically pointing to storage/app.
|
||||
->visible(fn (Get $get) => ! empty($get('plant_id')))
|
||||
->directory('uploads/temp'),
|
||||
->directory(function (callable $get) {
|
||||
$plant = Plant::find($get('plant_id'));
|
||||
$plantCode = $plant?->code ?? null;
|
||||
|
||||
return "uploads/temp/{$plantCode}";
|
||||
})
|
||||
->uploadingMessage('Uploading...')
|
||||
->helperText('Only .xlsx files are allowed (Excel files).'),
|
||||
])
|
||||
->action(function (array $data) {
|
||||
$uploadedFile = $data['invoice_serial_number'];
|
||||
@@ -362,17 +404,40 @@ class InvoiceValidationResource extends Resource
|
||||
|
||||
$plantId = $data['plant_id'];
|
||||
|
||||
$plant = Plant::find($plantId);
|
||||
$plantCode = $plant?->code ?? null;
|
||||
|
||||
// Get original filename
|
||||
$originalName = $uploadedFile->getClientOriginalName(); // e.g. 3RA0018732.xlsx
|
||||
|
||||
$extension = strtolower(pathinfo($originalName, PATHINFO_EXTENSION));
|
||||
if ($extension !== 'xlsx') {
|
||||
throw new \Exception('Only .xlsx files allowed.');
|
||||
}
|
||||
|
||||
$originalNameOnly = pathinfo($originalName, PATHINFO_FILENAME);
|
||||
|
||||
$originalName = "{$originalNameOnly}.xlsx";
|
||||
|
||||
// Store manually using storeAs to keep original name
|
||||
$path = $uploadedFile->storeAs('uploads/temp', $originalName, 'local'); // returns relative path
|
||||
// uploads/temp/3RA0018735.xlsx
|
||||
$path = $uploadedFile->storeAs("uploads/temp/{$plantCode}", $originalName, 'local'); // returns relative path
|
||||
// uploads/temp/{$plantCode}/3RA0018735.xlsx
|
||||
|
||||
if (strlen($originalNameOnly) < 8 || ! ctype_alnum($originalNameOnly)) {
|
||||
Notification::make()
|
||||
->title("Serial invoice number : '$originalNameOnly' should contain minimum 8 digit alpha numeric values!")
|
||||
->danger()
|
||||
->send();
|
||||
|
||||
if ($disk->exists($path)) {
|
||||
$disk->delete($path);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$fullPath = Storage::disk('local')->path($path);
|
||||
// /home/iot-dev/projects/pds/storage/app/private/uploads/temp/3RA0018735.xlsx
|
||||
// /home/iot-dev/projects/pds/storage/app/private/uploads/temp/{$plantCode}/3RA0018735.xlsx
|
||||
|
||||
$totQuan = InvoiceValidation::where('invoice_number', $originalNameOnly)->count();
|
||||
if ($totQuan > 0) {
|
||||
@@ -637,7 +702,7 @@ class InvoiceValidationResource 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()
|
||||
@@ -646,32 +711,68 @@ class InvoiceValidationResource extends Resource
|
||||
})
|
||||
->afterStateUpdated(function ($state, callable $set, callable $get) {
|
||||
$set('invoice_material', null);
|
||||
$plantId = $get('plant_id');
|
||||
$plantCode = Plant::find($plantId)?->code ?? null;
|
||||
|
||||
$directory = "uploads/temp/{$plantCode}";
|
||||
if ($plantId && ! Storage::disk('local')->exists($directory)) {
|
||||
Storage::disk('local')->makeDirectory($directory);
|
||||
}
|
||||
})
|
||||
->reactive(),
|
||||
|
||||
FileUpload::make('invoice_material')
|
||||
->label('Invoice Material')
|
||||
->required()
|
||||
->preserveFilenames()
|
||||
->reactive() // <- this keeps the original filename
|
||||
->preserveFilenames() // <- this keeps the original filename
|
||||
->reactive()
|
||||
->storeFiles(false) // prevent auto-storing
|
||||
->disk('local')
|
||||
->visible(fn (Get $get) => ! empty($get('plant_id')))
|
||||
->directory('uploads/temp'),
|
||||
->directory(function (callable $get) {
|
||||
$plant = Plant::find($get('plant_id'));
|
||||
$plantCode = $plant?->code ?? null;
|
||||
|
||||
return "uploads/temp/{$plantCode}";
|
||||
})
|
||||
->helperText('Only .xlsx files are allowed (Excel files).'),
|
||||
])
|
||||
->action(function (array $data) {
|
||||
$uploadedFile = $data['invoice_material'];
|
||||
|
||||
$plantId = $data['plant_id']; // Access the selected plant_id
|
||||
|
||||
$plant = Plant::find($plantId);
|
||||
$plantCode = $plant?->code ?? null;
|
||||
|
||||
$disk = Storage::disk('local');
|
||||
|
||||
// Get original filename
|
||||
$originalName = $uploadedFile->getClientOriginalName();
|
||||
|
||||
$extension = strtolower(pathinfo($originalName, PATHINFO_EXTENSION));
|
||||
if ($extension !== 'xlsx') {
|
||||
throw new \Exception('Only .xlsx files allowed.');
|
||||
}
|
||||
|
||||
$originalNameOnly = pathinfo($originalName, PATHINFO_FILENAME);
|
||||
|
||||
$path = $uploadedFile->storeAs('uploads/temp', $originalName, 'local');
|
||||
$originalName = "{$originalNameOnly}.xlsx";
|
||||
|
||||
$path = $uploadedFile->storeAs("uploads/temp/{$plantCode}", $originalName, 'local');
|
||||
|
||||
if (strlen($originalNameOnly) < 8 || ! ctype_alnum($originalNameOnly)) {
|
||||
Notification::make()
|
||||
->title("Material invoice number : '$originalNameOnly' should contain minimum 8 digit alpha numeric values!")
|
||||
->danger()
|
||||
->send();
|
||||
|
||||
if ($disk->exists($path)) {
|
||||
$disk->delete($path);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$fullPath = Storage::disk('local')->path($path);
|
||||
|
||||
@@ -1073,7 +1174,7 @@ class InvoiceValidationResource 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 {
|
||||
|
||||
@@ -117,8 +117,8 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
|
||||
$this->plantId = $plantId;
|
||||
|
||||
// $plant = Plant::find($plantId);
|
||||
// $plantCode = $plant ? $plant->code : null;
|
||||
$plant = Plant::find($plantId);
|
||||
$plantCode = $plant?->code ?? null;
|
||||
|
||||
// ..GET SERIAL INVOICE API
|
||||
|
||||
@@ -233,7 +233,7 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
$this->dispatch('playNotificationSound');
|
||||
|
||||
$filename = $invoiceNumber.'.xlsx';
|
||||
$directory = 'uploads/temp';
|
||||
$directory = "uploads/temp/{$plantCode}";
|
||||
$disk = Storage::disk('local');
|
||||
$filePath = $directory.'/'.$filename;
|
||||
// $fullPath = null;
|
||||
@@ -266,7 +266,7 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
if ($updateStatus == '1') {
|
||||
// 'Material invoice update in progress...';
|
||||
$filename = $invoiceNumber.'.xlsx';
|
||||
$directory = 'uploads/temp';
|
||||
$directory = "uploads/temp/{$plantCode}";
|
||||
$disk = Storage::disk('local');
|
||||
$filePath = $directory.'/'.$filename;
|
||||
$fullPath = $disk->path($filePath);
|
||||
@@ -613,6 +613,8 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
'invoice_number' => $invoiceNumber,
|
||||
'quantity' => 1,
|
||||
'operator_id' => $operatorName,
|
||||
'created_by' => $operatorName,
|
||||
'updated_by' => $operatorName,
|
||||
]);
|
||||
$inserted++;
|
||||
}
|
||||
@@ -653,6 +655,8 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
'invoice_number' => $invoiceNumber,
|
||||
'quantity' => $bundleQty,
|
||||
'operator_id' => $operatorName,
|
||||
'created_by' => $operatorName,
|
||||
'updated_by' => $operatorName,
|
||||
]);
|
||||
$inserted++;
|
||||
}
|
||||
@@ -716,6 +720,7 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
$existEmpRecQty->update([
|
||||
'quantity' => $newInsQty,
|
||||
'operator_id' => $operatorName,
|
||||
'updated_by' => $operatorName,
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
$newQuan--;
|
||||
@@ -727,6 +732,8 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
'invoice_number' => $invoiceNumber,
|
||||
'quantity' => $newInsQty,
|
||||
'operator_id' => $operatorName,
|
||||
'created_by' => $operatorName,
|
||||
'updated_by' => $operatorName,
|
||||
]);
|
||||
$inserted++;
|
||||
}
|
||||
@@ -746,6 +753,7 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
$existEmpRecQty->update([
|
||||
'quantity' => $newInsQty,
|
||||
'operator_id' => $operatorName,
|
||||
'updated_by' => $operatorName,
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
$newQuan--;
|
||||
@@ -757,6 +765,8 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
'invoice_number' => $invoiceNumber,
|
||||
'quantity' => $newInsQty,
|
||||
'operator_id' => $operatorName,
|
||||
'created_by' => $operatorName,
|
||||
'updated_by' => $operatorName,
|
||||
]);
|
||||
$inserted++;
|
||||
}
|
||||
@@ -780,6 +790,8 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
->send();
|
||||
$this->dispatch('playNotificationSound');
|
||||
|
||||
InvoiceValidation::where('invoice_number', $invoiceNumber)->where('plant_id', $plantId)->update(['updated_by' => $operatorName]); // 'updated_at' => now(),
|
||||
|
||||
// Update total quantity in the form
|
||||
$totalQuantity = InvoiceValidation::where('invoice_number', $invoiceNumber)->where('plant_id', $plantId)->count();
|
||||
$scannedQuantity = InvoiceValidation::where('invoice_number', $invoiceNumber)->whereNotNull('serial_number')->where('serial_number', '!=', '')->where('plant_id', $plantId)->count();
|
||||
@@ -877,7 +889,7 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
$this->dispatch('playNotificationSound');
|
||||
|
||||
$filename = $invoiceNumber.'.xlsx';
|
||||
$directory = 'uploads/temp';
|
||||
$directory = "uploads/temp/{$plantCode}";
|
||||
$disk = Storage::disk('local');
|
||||
$filePath = $directory.'/'.$filename;
|
||||
// $fullPath = null;
|
||||
@@ -907,16 +919,15 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
|
||||
if ($updateStatus == '1') {
|
||||
$filename = $invoiceNumber.'.xlsx';
|
||||
$directory = 'uploads/temp';
|
||||
$directory = "uploads/temp/{$plantCode}";
|
||||
$disk = Storage::disk('local');
|
||||
$filePath = $directory.'/'.$filename;
|
||||
$fullPath = $disk->path($filePath);
|
||||
|
||||
// Check if file exists //if ($disk->exists($filePath))
|
||||
if ($fullPath && file_exists($fullPath)) {
|
||||
// /home/iot-dev/projects/pds/storage/app/private/uploads/temp/3RA0018735.xlsx
|
||||
// /home/iot-dev/projects/pds/storage/app/private/uploads/temp/{$plantCode}/3RA0018735.xlsx
|
||||
// 'Serial invoice update in progress...'
|
||||
|
||||
// Now you can read/process the file here
|
||||
$rows = Excel::toArray(null, $fullPath)[0];
|
||||
|
||||
@@ -1233,6 +1244,8 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
'invoice_number' => $invoiceNumber,
|
||||
'serial_number' => $serialNumber,
|
||||
'operator_id' => $operatorName,
|
||||
'created_by' => $operatorName,
|
||||
'updated_by' => $operatorName,
|
||||
]);
|
||||
$inserted++;
|
||||
}
|
||||
@@ -1255,6 +1268,8 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
|
||||
$this->dispatch('playNotificationSound');
|
||||
|
||||
InvoiceValidation::where('invoice_number', $invoiceNumber)->where('plant_id', $plantId)->update(['updated_by' => $operatorName]); // 'updated_at' => now(),
|
||||
|
||||
// Update total quantity in the form
|
||||
$totalQuantity = InvoiceValidation::where('invoice_number', $invoiceNumber)->where('plant_id', $plantId)->count();
|
||||
$scannedQuantity = InvoiceValidation::where('invoice_number', $invoiceNumber)->where('scanned_status', 'Scanned')->where('plant_id', $plantId)->count();
|
||||
@@ -1337,7 +1352,7 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
}
|
||||
|
||||
$filename = $invoiceNumber.'.xlsx';
|
||||
$directory = 'uploads/temp';
|
||||
$directory = "uploads/temp/{$plantCode}";
|
||||
$disk = Storage::disk('local');
|
||||
$filePath = $directory.'/'.$filename;
|
||||
$fullPath = null; // $fullPath = $disk->path($filePath);
|
||||
@@ -1778,6 +1793,8 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
'invoice_number' => $invoiceNumber,
|
||||
'quantity' => 1,
|
||||
'operator_id' => $operatorName,
|
||||
'created_by' => $operatorName,
|
||||
'updated_by' => $operatorName,
|
||||
]);
|
||||
$inserted++;
|
||||
}
|
||||
@@ -1811,6 +1828,8 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
'invoice_number' => $invoiceNumber,
|
||||
'quantity' => $bundleQty,
|
||||
'operator_id' => $operatorName,
|
||||
'created_by' => $operatorName,
|
||||
'updated_by' => $operatorName,
|
||||
]);
|
||||
$inserted++;
|
||||
}
|
||||
@@ -1842,6 +1861,8 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
'invoice_number' => $invoiceNumber,
|
||||
'quantity' => $totalExcelQty,
|
||||
'operator_id' => $operatorName,
|
||||
'created_by' => $operatorName,
|
||||
'updated_by' => $operatorName,
|
||||
]);
|
||||
$inserted++;
|
||||
}
|
||||
@@ -2206,6 +2227,8 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
'invoice_number' => $invoiceNumber,
|
||||
'serial_number' => $serialNumber,
|
||||
'operator_id' => $operatorName,
|
||||
'created_by' => $operatorName,
|
||||
'updated_by' => $operatorName,
|
||||
]);
|
||||
$inserted++;
|
||||
}
|
||||
@@ -2358,6 +2381,9 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
$invoiceNumber = $this->form->getState()['invoice_number'];
|
||||
$this->invoiceNumber = $invoiceNumber;
|
||||
|
||||
$plant = Plant::find($plantId);
|
||||
$plantCode = $plant?->code ?? null;
|
||||
|
||||
$totQuan = InvoiceValidation::where('invoice_number', $invoiceNumber)->where('plant_id', $plantId)->count();
|
||||
$scanSQuan = InvoiceValidation::where('invoice_number', $invoiceNumber)->where('scanned_status', 'Scanned')->where('plant_id', $plantId)->count();
|
||||
$totMQuan = InvoiceValidation::where('invoice_number', $invoiceNumber)->whereNotNull('quantity')->where('plant_id', $plantId)->count(); // ->where('quantity', '!=', '')
|
||||
@@ -2395,7 +2421,7 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
$this->dispatch('playNotificationSound');
|
||||
|
||||
$filename = $invoiceNumber.'.xlsx';
|
||||
$directory = 'uploads/temp';
|
||||
$directory = "uploads/temp/{$plantCode}";
|
||||
$disk = Storage::disk('local');
|
||||
$filePath = $directory.'/'.$filename;
|
||||
// $fullPath = null;
|
||||
@@ -2947,6 +2973,7 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
if ($curExistQty > $curScanQty) { // 5 > 2
|
||||
$record->quantity = $curExistQty - $curScanQty; // 5 - 2
|
||||
$record->operator_id = $operatorName;
|
||||
// $record->updated_by = $operatorName;
|
||||
// $record->updated_at = now();
|
||||
$record->save();
|
||||
|
||||
@@ -2959,12 +2986,15 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
'quantity' => $curScanQty,
|
||||
'created_at' => $createdDt,
|
||||
'operator_id' => $operatorName,
|
||||
'created_by' => $operatorName,
|
||||
'updated_by' => $operatorName,
|
||||
]);
|
||||
} elseif ($curExistQty == $curScanQty) { // 2 = 2
|
||||
// $record->delete();
|
||||
$record->serial_number = $serialNumber;
|
||||
$record->batch_number = $batchNumber;
|
||||
$record->operator_id = $operatorName;
|
||||
// $record->updated_by = $operatorName;
|
||||
// $record->updated_at = now();
|
||||
$record->save();
|
||||
|
||||
@@ -2975,6 +3005,8 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
// 'quantity' => $curScanQty,
|
||||
// 'created_at' => $createdDt,
|
||||
// 'operator_id'=> $operatorName,
|
||||
// 'created_by' => $operatorName,
|
||||
// 'updated_by' => $operatorName,
|
||||
// ]);
|
||||
} else {
|
||||
Notification::make()
|
||||
@@ -3030,6 +3062,7 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
$record->batch_number = $batchNumber;
|
||||
// $record->updated_at = now();
|
||||
$record->operator_id = $operatorName;
|
||||
// $record->updated_by = $operatorName;
|
||||
$record->save();
|
||||
}
|
||||
|
||||
@@ -3055,7 +3088,7 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
$this->dispatch('playNotificationSound');
|
||||
|
||||
$filename = $invoiceNumber.'.xlsx';
|
||||
$directory = 'uploads/temp';
|
||||
$directory = "uploads/temp/{$plantCode}";
|
||||
$disk = Storage::disk('local');
|
||||
$filePath = $directory.'/'.$filename;
|
||||
// $fullPath = null;
|
||||
@@ -3099,7 +3132,7 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
$this->dispatch('playNotificationSound');
|
||||
|
||||
$filename = $invoiceNumber.'.xlsx';
|
||||
$directory = 'uploads/temp';
|
||||
$directory = "uploads/temp/{$plantCode}";
|
||||
$disk = Storage::disk('local');
|
||||
$filePath = $directory.'/'.$filename;
|
||||
// $fullPath = null;
|
||||
@@ -3398,6 +3431,7 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
$record->scanned_status = 'Scanned';
|
||||
}
|
||||
$record->operator_id = $operatorName;
|
||||
// $record->updated_by = $operatorName;
|
||||
$record->save();
|
||||
|
||||
// Notification::make()
|
||||
@@ -3427,7 +3461,7 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
$this->dispatch('playNotificationSound');
|
||||
|
||||
$filename = $invoiceNumber.'.xlsx';
|
||||
$directory = 'uploads/temp';
|
||||
$directory = "uploads/temp/{$plantCode}";
|
||||
$disk = Storage::disk('local');
|
||||
$filePath = $directory.'/'.$filename;
|
||||
// $fullPath = null;
|
||||
@@ -3514,6 +3548,7 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
$record->scanned_status = 'Scanned';
|
||||
}
|
||||
$record->operator_id = $operatorName;
|
||||
// $record->updated_by = $operatorName;
|
||||
$record->save();
|
||||
|
||||
// Notification::make()
|
||||
@@ -3544,7 +3579,7 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
$this->dispatch('playNotificationSound');
|
||||
|
||||
$filename = $invoiceNumber.'.xlsx';
|
||||
$directory = 'uploads/temp';
|
||||
$directory = "uploads/temp/{$plantCode}";
|
||||
$disk = Storage::disk('local');
|
||||
$filePath = $directory.'/'.$filename;
|
||||
// $fullPath = null;
|
||||
@@ -3696,6 +3731,7 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
$record->scanned_status = 'Scanned';
|
||||
}
|
||||
$record->operator_id = $operatorName;
|
||||
// $record->updated_by = $operatorName;
|
||||
$record->save();
|
||||
|
||||
// Notification::make()
|
||||
@@ -3740,7 +3776,7 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
// }
|
||||
|
||||
$filename = $invoiceNumber.'.xlsx';
|
||||
$directory = 'uploads/temp';
|
||||
$directory = "uploads/temp/{$plantCode}";
|
||||
$disk = Storage::disk('local');
|
||||
$filePath = $directory.'/'.$filename;
|
||||
// $fullPath = null;
|
||||
|
||||
@@ -52,7 +52,15 @@ class TestingTempResource extends Resource
|
||||
$set('attachment', null);
|
||||
if (! $plantId) {
|
||||
$set('ivPlantError', 'Please select a plant first.');
|
||||
} else {
|
||||
$plantCode = Plant::find($plantId)?->code ?? null;
|
||||
|
||||
$directory = "uploads/temp/{$plantCode}";
|
||||
if (! Storage::disk('local')->exists($directory)) {
|
||||
Storage::disk('local')->makeDirectory($directory);
|
||||
}
|
||||
}
|
||||
|
||||
$set('updated_by', Filament::auth()->user()?->name);
|
||||
})
|
||||
->extraAttributes(fn ($get) => [
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace App\Filament\Resources;
|
||||
use App\Filament\Exports\UserExporter;
|
||||
use App\Filament\Imports\UserImporter;
|
||||
use App\Filament\Resources\UserResource\Pages;
|
||||
use App\Filament\Resources\UserResource\RelationManagers;
|
||||
use App\Models\Plant;
|
||||
use App\Models\User;
|
||||
use Filament\Facades\Filament;
|
||||
use Filament\Forms;
|
||||
@@ -36,6 +36,11 @@ class UserResource extends Resource
|
||||
->relationship('plant', 'name')
|
||||
->nullable()
|
||||
->reactive()
|
||||
->options(function (callable $get) {
|
||||
$userHas = Filament::auth()->user()->plant_id;
|
||||
|
||||
return ($userHas && strlen($userHas) > 0) ? Plant::where('id', $userHas)->pluck('name', 'id')->toArray() : Plant::orderBy('code')->pluck('name', 'id')->toArray();
|
||||
})
|
||||
->default(function () {
|
||||
return optional(User::latest()->first())->plant_id;
|
||||
}),
|
||||
@@ -101,6 +106,7 @@ class UserResource extends Resource
|
||||
$paginator = $livewire->getTableRecords();
|
||||
$perPage = method_exists($paginator, 'perPage') ? $paginator->perPage() : 10;
|
||||
$currentPage = method_exists($paginator, 'currentPage') ? $paginator->currentPage() : 1;
|
||||
|
||||
return ($currentPage - 1) * $perPage + $rowLoop->iteration;
|
||||
}),
|
||||
Tables\Columns\TextColumn::make('plant.name')
|
||||
|
||||
@@ -6,17 +6,17 @@ use App\Models\InvoiceValidation;
|
||||
use App\Models\StickerMaster;
|
||||
use Filament\Facades\Filament;
|
||||
use Filament\Notifications\Notification;
|
||||
use Livewire\Component;
|
||||
use Str;
|
||||
use Livewire\Attributes\On;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
use Str;
|
||||
|
||||
class InvoiceDataTable extends Component
|
||||
{
|
||||
|
||||
use WithPagination;
|
||||
|
||||
protected $paginationTheme = 'tailwind';
|
||||
|
||||
public $invoiceData = [];
|
||||
|
||||
// public $invoiceRecords;
|
||||
@@ -25,7 +25,6 @@ class InvoiceDataTable extends Component
|
||||
|
||||
public $package = [];
|
||||
|
||||
|
||||
public $packageCount = 0;
|
||||
|
||||
public string $invoiceNumber = '';
|
||||
@@ -58,7 +57,7 @@ class InvoiceDataTable extends Component
|
||||
|
||||
public $panel_box_supplier;
|
||||
|
||||
public $panel_box_item_code;
|
||||
public $panel_box_code;
|
||||
|
||||
public $panel_box_serial_number;
|
||||
|
||||
@@ -303,10 +302,8 @@ class InvoiceDataTable extends Component
|
||||
// $this->dispatch($onCapFocus ? 'focus-capacitor-input' : 'focus-serial-number');
|
||||
// }
|
||||
|
||||
|
||||
// #[On('refreshInvoiceData')]
|
||||
|
||||
|
||||
// public function loadData($invoiceNumber, $plantId, $onCapFocus = false)
|
||||
// {
|
||||
// $this->invoiceNumber = $invoiceNumber;
|
||||
@@ -371,7 +368,6 @@ class InvoiceDataTable extends Component
|
||||
// $this->dispatch($onCapFocus ? 'focus-capacitor-input' : 'focus-serial-number');
|
||||
// }
|
||||
|
||||
|
||||
public function loadData($invoiceNumber, $plantId, $onCapFocus = false)
|
||||
{
|
||||
$this->invoiceNumber = $invoiceNumber;
|
||||
@@ -412,8 +408,7 @@ class InvoiceDataTable extends Component
|
||||
}
|
||||
if ($sm->tube_sticker_motor == 1 || $sm->tube_sticker_pump == 1 || $sm->tube_sticker_pumpset == 1) {
|
||||
|
||||
if ($sm->tube_sticker_motor == 1)
|
||||
{
|
||||
if ($sm->tube_sticker_motor == 1) {
|
||||
$stickCount++;
|
||||
if ($record->motor_scanned_status == 1) {
|
||||
$scannedCount++;
|
||||
@@ -438,9 +433,7 @@ class InvoiceDataTable extends Component
|
||||
$scannedCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif ($sm->pack_slip_motor == 1 || $sm->pack_slip_pump == 1 || $sm->pack_slip_pumpset == 1)
|
||||
{
|
||||
} elseif ($sm->pack_slip_motor == 1 || $sm->pack_slip_pump == 1 || $sm->pack_slip_pumpset == 1) {
|
||||
if ($sm->pack_slip_motor == 1) {
|
||||
$stickCount++;
|
||||
if ($record->motor_scanned_status == 1) {
|
||||
@@ -488,7 +481,6 @@ class InvoiceDataTable extends Component
|
||||
->paginate(6);
|
||||
}
|
||||
|
||||
|
||||
// public function loadData($invoiceNumber, $plantId, $onCapFocus = false)
|
||||
// {
|
||||
// $this->plantId = $plantId;
|
||||
@@ -571,7 +563,6 @@ class InvoiceDataTable extends Component
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
public function loadMaterialData($invoiceNumber, $plantId)
|
||||
{
|
||||
$this->plantId = $plantId;
|
||||
@@ -636,6 +627,7 @@ class InvoiceDataTable extends Component
|
||||
|
||||
public function cancelCapacitorInput()
|
||||
{
|
||||
$this->capacitorInput = null;
|
||||
$this->showCapacitorInput = false;
|
||||
$this->dispatch('focus-serial-number');
|
||||
}
|
||||
@@ -689,7 +681,7 @@ class InvoiceDataTable extends Component
|
||||
|
||||
// if (($row['code'] ?? '') === $this->currentItemCode && ($row['serial_number'] ?? '') === $this->currentSerialNumber) {
|
||||
// $row['panel_box_supplier'] = $supplier;
|
||||
// $row['panel_box_item_code'] = $itemCode;
|
||||
// $row['panel_box_code'] = $itemCode;
|
||||
// $row['panel_box_serial_number'] = $serialNumber;
|
||||
// $row['capacitor_scanned_status'] = 1;
|
||||
// // $row['scanned_status_set'] = true;
|
||||
@@ -730,7 +722,7 @@ class InvoiceDataTable extends Component
|
||||
// if ($packCnt === $scanCnt) {
|
||||
// $matchingValidation->update([
|
||||
// 'panel_box_supplier' => $supplier,
|
||||
// 'panel_box_item_code' => $itemCode,
|
||||
// 'panel_box_code' => $itemCode,
|
||||
// 'panel_box_serial_number' => $serialNumber,
|
||||
// 'capacitor_scanned_status' => 1,
|
||||
// 'scanned_status' => 'Scanned',
|
||||
@@ -739,7 +731,7 @@ class InvoiceDataTable extends Component
|
||||
// } else {
|
||||
// $matchingValidation->update([
|
||||
// 'panel_box_supplier' => $supplier,
|
||||
// 'panel_box_item_code' => $itemCode,
|
||||
// 'panel_box_code' => $itemCode,
|
||||
// 'panel_box_serial_number' => $serialNumber,
|
||||
// 'capacitor_scanned_status' => 1,
|
||||
// 'operator_id' => $operatorName,
|
||||
@@ -748,7 +740,7 @@ class InvoiceDataTable extends Component
|
||||
// } else {
|
||||
// $matchingValidation->update([
|
||||
// 'panel_box_supplier' => $supplier,
|
||||
// 'panel_box_item_code' => $itemCode,
|
||||
// 'panel_box_code' => $itemCode,
|
||||
// 'panel_box_serial_number' => $serialNumber,
|
||||
// 'capacitor_scanned_status' => 1,
|
||||
// 'scanned_status' => 'Scanned',
|
||||
@@ -797,8 +789,6 @@ class InvoiceDataTable extends Component
|
||||
// $this->dispatch('focus-serial-number');
|
||||
// }
|
||||
|
||||
|
||||
|
||||
public function processCapacitorInput()
|
||||
{
|
||||
$user = Filament::auth()->user();
|
||||
@@ -818,6 +808,7 @@ class InvoiceDataTable extends Component
|
||||
->send();
|
||||
|
||||
$this->capacitorInput = '';
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -856,7 +847,7 @@ class InvoiceDataTable extends Component
|
||||
|
||||
if ($stickerCode === $this->currentItemCode && $serialNo === $this->currentSerialNumber) {
|
||||
$row['panel_box_supplier'] = $supplier;
|
||||
$row['panel_box_item_code'] = $itemCode;
|
||||
$row['panel_box_code'] = $itemCode;
|
||||
$row['panel_box_serial_number'] = $serialNumber;
|
||||
$row['capacitor_scanned_status'] = 1;
|
||||
// $row['scanned_status_set'] = true;
|
||||
@@ -897,7 +888,7 @@ class InvoiceDataTable extends Component
|
||||
if ($packCnt === $scanCnt) {
|
||||
$matchingValidation->update([
|
||||
'panel_box_supplier' => $supplier,
|
||||
'panel_box_item_code' => $itemCode,
|
||||
'panel_box_code' => $itemCode,
|
||||
'panel_box_serial_number' => $serialNumber,
|
||||
'capacitor_scanned_status' => 1,
|
||||
'scanned_status' => 'Scanned',
|
||||
@@ -906,7 +897,7 @@ class InvoiceDataTable extends Component
|
||||
} else {
|
||||
$matchingValidation->update([
|
||||
'panel_box_supplier' => $supplier,
|
||||
'panel_box_item_code' => $itemCode,
|
||||
'panel_box_code' => $itemCode,
|
||||
'panel_box_serial_number' => $serialNumber,
|
||||
'capacitor_scanned_status' => 1,
|
||||
'operator_id' => $operatorName,
|
||||
@@ -915,7 +906,7 @@ class InvoiceDataTable extends Component
|
||||
} else {
|
||||
$matchingValidation->update([
|
||||
'panel_box_supplier' => $supplier,
|
||||
'panel_box_item_code' => $itemCode,
|
||||
'panel_box_code' => $itemCode,
|
||||
'panel_box_serial_number' => $serialNumber,
|
||||
'capacitor_scanned_status' => 1,
|
||||
'scanned_status' => 'Scanned',
|
||||
|
||||
@@ -23,6 +23,7 @@ class InvoiceValidation extends Model
|
||||
'capacitor_scanned_status',
|
||||
'scanned_status_set',
|
||||
'scanned_status',
|
||||
'panel_box_code',
|
||||
'panel_box_supplier',
|
||||
'panel_box_serial_number',
|
||||
'load_rate',
|
||||
@@ -30,6 +31,8 @@ class InvoiceValidation extends Model
|
||||
'batch_number',
|
||||
'quantity',
|
||||
'operator_id',
|
||||
'created_by',
|
||||
'updated_by',
|
||||
];
|
||||
|
||||
public function plant(): BelongsTo
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
@@ -27,19 +26,20 @@ return new class extends Migration
|
||||
scanned_status_set TEXT DEFAULT NULL,
|
||||
scanned_status TEXT DEFAULT NULL,
|
||||
|
||||
panel_box_code TEXT DEFAULT NULL,
|
||||
panel_box_supplier TEXT DEFAULT NULL,
|
||||
panel_box_serial_number TEXT DEFAULT NULL,
|
||||
|
||||
load_rate INT NOT NULL DEFAULT (0),
|
||||
upload_status TEXT NOT NULL DEFAULT 'N',
|
||||
|
||||
|
||||
batch_number TEXT DEFAULT NULL,
|
||||
quantity INT DEFAULT NULL,
|
||||
|
||||
|
||||
created_at TIMESTAMP NOT NULL DEFAULT NOW(),
|
||||
updated_at TIMESTAMP NOT NULL DEFAULT NOW(),
|
||||
created_by TEXT DEFAULT NULL,
|
||||
updated_by TEXT DEFAULT NULL,
|
||||
deleted_at TIMESTAMP,
|
||||
|
||||
UNIQUE (plant_id, serial_number),
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
$sql1 = <<<'SQL'
|
||||
ALTER TABLE characteristic_approver_masters
|
||||
ADD COLUMN approver_type TEXT DEFAULT NULL
|
||||
SQL;
|
||||
|
||||
DB::statement($sql1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
// Schema::table('characteristic_approver_masters', function (Blueprint $table) {
|
||||
// //
|
||||
// });
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
$sql1 = <<<'SQL'
|
||||
ALTER TABLE invoice_validations
|
||||
ADD COLUMN panel_box_code TEXT DEFAULT NULL
|
||||
SQL;
|
||||
|
||||
DB::statement($sql1);
|
||||
|
||||
$sql2 = <<<'SQL'
|
||||
ALTER TABLE invoice_validations
|
||||
ADD COLUMN created_by TEXT DEFAULT NULL
|
||||
SQL;
|
||||
|
||||
DB::statement($sql2);
|
||||
|
||||
$sql3 = <<<'SQL'
|
||||
ALTER TABLE invoice_validations
|
||||
ADD COLUMN updated_by TEXT DEFAULT NULL
|
||||
SQL;
|
||||
|
||||
DB::statement($sql3);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
// Schema::table('invoice_validations', function (Blueprint $table) {
|
||||
// //
|
||||
// });
|
||||
}
|
||||
};
|
||||
@@ -81,6 +81,7 @@
|
||||
<th class="border px-4 py-2">Scanned Status</th>
|
||||
<th class="border px-4 py-2 w-[300px] whitespace-nowrap">Time Stamp</th>
|
||||
<th class="border px-4 py-2">Operator ID</th>
|
||||
<th class="border px-4 py-2">Panel Box Code</th>
|
||||
<th class="border px-4 py-2">Panel Box Supplier</th>
|
||||
<th class="border px-4 py-2">Panel Box Serial Number</th>
|
||||
</tr>
|
||||
@@ -98,6 +99,7 @@
|
||||
<td class="border px-4 py-2">{{ $row['scanned_status'] ?? '' }}</td>
|
||||
<td class="border px-4 py-2">{{ $row['created_at'] ?? '' }}</td>
|
||||
<td class="border px-4 py-2">{{ $row['operator_id'] ?? '' }}</td>
|
||||
<td class="border px-4 py-2">{{ $row['panel_box_code'] ?? '' }}</td>
|
||||
<td class="border px-4 py-2">{{ $row['panel_box_supplier'] ?? '' }}</td>
|
||||
<td class="border px-4 py-2">{{ $row['panel_box_serial_number'] ?? '' }}</td>
|
||||
</tr>
|
||||
@@ -130,6 +132,7 @@
|
||||
<th class="border px-4 py-2">Scanned Status</th>
|
||||
<th class="border px-4 py-2 w-[300px] whitespace-nowrap">Time Stamp</th>
|
||||
<th class="border px-4 py-2">Operator ID</th>
|
||||
<th class="border px-4 py-2">Panel Box Code</th>
|
||||
<th class="border px-4 py-2">Panel Box Supplier</th>
|
||||
<th class="border px-4 py-2">Panel Box Serial Number</th>
|
||||
</tr>
|
||||
@@ -148,6 +151,7 @@
|
||||
<td class="border px-2 py-2">{{ $record->scanned_status ?? '' }}</td>
|
||||
<td class="border px-2 py-2 whitespace-nowrap">{{ optional($record->created_at)->format('d-m-Y H:i:s') }}</td>
|
||||
<td class="border px-2 py-2">{{ $record->operator_id ?? '' }}</td>
|
||||
<td class="border px-2 py-2">{{ $record->panel_box_code ?? '' }}</td>
|
||||
<td class="border px-2 py-2">{{ $record->panel_box_supplier ?? '' }}</td>
|
||||
<td class="border px-2 py-2">{{ $record->panel_box_serial_number ?? '' }}</td>
|
||||
</tr>
|
||||
|
||||
@@ -24,6 +24,7 @@ use App\Http\Controllers\ModuleProductionLineStopController;
|
||||
use App\Http\Controllers\ModuleProductionOrderDataController;
|
||||
use App\Http\Controllers\ObdController;
|
||||
use App\Http\Controllers\PalletController;
|
||||
// use App\Http\Controllers\PalletPrintController;
|
||||
use App\Http\Controllers\PdfController;
|
||||
use App\Http\Controllers\PlantController;
|
||||
use App\Http\Controllers\ProductionStickerReprintController;
|
||||
@@ -204,11 +205,12 @@ Route::post('grmaster-sno-update', [PdfController::class, 'updateGR']);
|
||||
Route::post('file/store', [SapFileController::class, 'store'])->name('file.store');
|
||||
|
||||
// routes/api.php
|
||||
|
||||
// Route::post('/characteristic/hold-save', [CharacteristicApprovalController::class, 'holdSave']);
|
||||
|
||||
// Route::post('send-telegram', [TelegramController::class, 'sendMessage']);
|
||||
|
||||
// Route::post('invoice-exit', [InvoiceValidationController::class, 'handle']);
|
||||
|
||||
// Route::post('/characteristic/hold-save', [CharacteristicApprovalController::class, 'holdSave'])
|
||||
// ->name('characteristic.hold.save');
|
||||
// Route::get('/print-pallet/{pallet}/{plant}', [PalletPrintController::class, 'print'])
|
||||
// ->name('print.pallet');
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
use App\Http\Controllers\CharacteristicApprovalController;
|
||||
use App\Http\Controllers\FileUploadController;
|
||||
// use App\Http\Controllers\FileUploadController;
|
||||
use App\Models\EquipmentMaster;
|
||||
use App\Models\User;
|
||||
use Filament\Facades\Filament;
|
||||
@@ -41,11 +41,22 @@ Route::get('/approval/reject-success', function () {
|
||||
return view('approval.reject-success');
|
||||
})->name('approval.reject.success');
|
||||
|
||||
Route::get('/characteristic/approve', [CharacteristicApprovalController::class, 'approve'])
|
||||
Route::get('/characteristic/approve', [CharacteristicApprovalController::class, 'approveForm'])
|
||||
->name('characteristic.approve')
|
||||
->middleware('signed');
|
||||
|
||||
Route::post('/file-upload', [FileUploadController::class, 'upload'])->name('file.upload');
|
||||
Route::post('/characteristic/approve-save', [CharacteristicApprovalController::class, 'approveSave'])
|
||||
->name('characteristic.approve.save');
|
||||
|
||||
Route::get('/approval/approve-success', function () {
|
||||
return view('approval.approve-success');
|
||||
})->name('approval.approve.success');
|
||||
|
||||
// Route::get('/characteristic/approve', [CharacteristicApprovalController::class, 'approve'])
|
||||
// ->name('characteristic.approve')
|
||||
// ->middleware('signed');
|
||||
|
||||
// Route::post('/file-upload', [FileUploadController::class, 'upload'])->name('file.upload');
|
||||
|
||||
// Route::get('/characteristic/hold', [CharacteristicApprovalController::class, 'hold'])
|
||||
// ->name('characteristic.hold')
|
||||
|
||||
Reference in New Issue
Block a user