fix conflict issue in sticker pdf service
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 12s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 13s
Gemini PR Review / Gemini PR Review (pull_request) Successful in 20s
Laravel Pint / pint (pull_request) Failing after 2m32s
Laravel Larastan / larastan (pull_request) Failing after 5m36s
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 12s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 13s
Gemini PR Review / Gemini PR Review (pull_request) Successful in 20s
Laravel Pint / pint (pull_request) Failing after 2m32s
Laravel Larastan / larastan (pull_request) Failing after 5m36s
This commit is contained in:
@@ -403,6 +403,9 @@ class ProductionQuantityPage extends Page implements HasForms
|
||||
public function processMachine($value)
|
||||
{
|
||||
$plantId = $this->pId;
|
||||
$plantCode = Plant::find($plantId);
|
||||
|
||||
$PlaCo = $plantCode->code;
|
||||
$this->mNam = $value;
|
||||
|
||||
$now = Carbon::now()->format('H:i:s');
|
||||
@@ -412,6 +415,72 @@ class ProductionQuantityPage extends Page implements HasForms
|
||||
|
||||
$machine = Machine::where('plant_id', $plantId)->where('work_center', $this->mNam)->with('line.block')->first();
|
||||
|
||||
$machinenotAgaPlant = Machine::where('work_center', $this->mNam)->first();
|
||||
|
||||
$machineAgaPlant = Machine::where('plant_id', $plantId)->where('work_center', $this->mNam)->first();
|
||||
|
||||
if (!$machinenotAgaPlant) {
|
||||
Notification::make()
|
||||
->title('Unknown WorkCenter')
|
||||
->body("Work Center not found")
|
||||
->danger()
|
||||
->send();
|
||||
$this->form->fill([
|
||||
'plant_id' => $this->pId,
|
||||
'machine_id' => $this->mNam,
|
||||
'block_name' => $this->bNam,
|
||||
'shift_id' => $this->sNam,
|
||||
'line_id' => $this->lNam,
|
||||
'item_id' => null,
|
||||
'serial_number' => null,
|
||||
'success_msg' => null,
|
||||
'production_order' => $this->prodOrder,
|
||||
'sap_msg_status' => null,
|
||||
'sap_msg_description' => null,
|
||||
// 'operator_id'=> $operatorName,
|
||||
'recent_qr' => $this->recQr,
|
||||
]);
|
||||
return;
|
||||
}
|
||||
else if (!$machineAgaPlant) {
|
||||
Notification::make()
|
||||
->title('Unknown WorkCenter')
|
||||
->body("Work Center not found against plant code $PlaCo")
|
||||
->danger()
|
||||
->send();
|
||||
|
||||
$this->form->fill([
|
||||
'plant_id' => $this->pId,
|
||||
'machine_id' => $this->mNam,
|
||||
'block_name' => $this->bNam,
|
||||
'shift_id' => $this->sNam,
|
||||
'line_id' => $this->lNam,
|
||||
'item_id' => null,
|
||||
'serial_number' => null,
|
||||
'success_msg' => null,
|
||||
'production_order' => $this->prodOrder,
|
||||
'sap_msg_status' => null,
|
||||
'sap_msg_description' => null,
|
||||
// 'operator_id'=> $operatorName,
|
||||
'recent_qr' => $this->recQr,
|
||||
]);
|
||||
return;
|
||||
}
|
||||
|
||||
$rec = ProductionQuantity::where('plant_id', $plantId)->where('machine_id', $machineAgaPlant->id)->latest()->first();
|
||||
|
||||
if($rec)
|
||||
{
|
||||
|
||||
$item = Item::where('id', $rec->item_id)->where('plant_id', $plantId)->first();
|
||||
|
||||
$itemCode = $item?->code ?? '';
|
||||
$serialNo = $rec->serial_number ?? '';
|
||||
|
||||
$this->recQr = $itemCode . ' | ' . $serialNo;
|
||||
|
||||
}
|
||||
|
||||
if ($machine) {
|
||||
$this->lNam = Line::where('id', $machine->line_id)->value('name');
|
||||
$this->bNam = $machine->line->block->name ?? null;
|
||||
@@ -436,15 +505,6 @@ class ProductionQuantityPage extends Page implements HasForms
|
||||
'recent_qr' => $this->recQr,
|
||||
]);
|
||||
$this->triggerChartUpdate();
|
||||
} else {
|
||||
|
||||
Notification::make()
|
||||
->title('Unknown WorkCenter')
|
||||
->body('Work Center not found')
|
||||
->danger()
|
||||
->send();
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1065,46 +1125,6 @@ class ProductionQuantityPage extends Page implements HasForms
|
||||
$iCode = trim($splits[0]);
|
||||
$sNumber = isset($splits[1]) ? trim($splits[1]) : null;
|
||||
|
||||
// $machine = Machine::where('work_center', $this->mNam)->where('plant_id', $this->pId)->first();
|
||||
|
||||
// $this->mId = $machine->id;
|
||||
|
||||
// $lineId = $machine->line_id;
|
||||
// $this->lId = $lineId;
|
||||
|
||||
// $line = Line::find($lineId);
|
||||
// if (! $line) {
|
||||
// Notification::make()
|
||||
// ->title('Invalid Line')
|
||||
// ->body('Line associated with the machine not found.')
|
||||
// ->danger()
|
||||
// ->send();
|
||||
|
||||
// return;
|
||||
// }
|
||||
|
||||
// $blockId = $line->block_id;
|
||||
// $this->bId = $blockId;
|
||||
|
||||
// $shift = Shift::where('block_id', $blockId)->first();
|
||||
// if (! $shift) {
|
||||
// Notification::make()
|
||||
// ->title('No Shift Found')
|
||||
// ->body('No shift associated with this block.')
|
||||
// ->danger()
|
||||
// ->send();
|
||||
|
||||
// return;
|
||||
// }
|
||||
|
||||
// $shiftId = $shift->id;
|
||||
// $this->sId = $shiftId;
|
||||
|
||||
// $line = Line::with('block')->find($lineId);
|
||||
|
||||
// $lineName = $line?->name;
|
||||
// $blockName = $line?->block?->name;
|
||||
// $shiftName = $shift?->name;
|
||||
|
||||
if (! ctype_alnum($iCode)) {
|
||||
|
||||
@@ -1121,7 +1141,7 @@ class ProductionQuantityPage extends Page implements HasForms
|
||||
'sap_msg_status' => null,
|
||||
'sap_msg_description' => null,
|
||||
'operator_id' => $operatorName,
|
||||
'recent_qr' => $this->recent_qr,
|
||||
'recent_qr' => $this->recQr,
|
||||
]);
|
||||
|
||||
Notification::make()
|
||||
@@ -1145,7 +1165,7 @@ class ProductionQuantityPage extends Page implements HasForms
|
||||
'sap_msg_status' => null,
|
||||
'sap_msg_description' => null,
|
||||
'operator_id' => $operatorName,
|
||||
'recent_qr' => $this->recent_qr,
|
||||
'recent_qr' => $this->recQr,
|
||||
]);
|
||||
|
||||
Notification::make()
|
||||
@@ -1169,7 +1189,7 @@ class ProductionQuantityPage extends Page implements HasForms
|
||||
'sap_msg_status' => null,
|
||||
'sap_msg_description' => null,
|
||||
'operator_id' => $operatorName,
|
||||
'recent_qr' => $this->recent_qr,
|
||||
'recent_qr' => $this->recQr,
|
||||
]);
|
||||
|
||||
Notification::make()
|
||||
@@ -1194,7 +1214,7 @@ class ProductionQuantityPage extends Page implements HasForms
|
||||
'sap_msg_status' => null,
|
||||
'sap_msg_description' => null,
|
||||
'operator_id' => $operatorName,
|
||||
'recent_qr' => $this->recent_qr,
|
||||
'recent_qr' => $this->recQr,
|
||||
]);
|
||||
|
||||
Notification::make()
|
||||
@@ -1221,7 +1241,7 @@ class ProductionQuantityPage extends Page implements HasForms
|
||||
'sap_msg_status' => null,
|
||||
'sap_msg_description' => null,
|
||||
'operator_id' => $operatorName,
|
||||
'recent_qr' => $this->recent_qr,
|
||||
'recent_qr' => $this->recQr,
|
||||
]);
|
||||
|
||||
Notification::make()
|
||||
@@ -1376,13 +1396,10 @@ class ProductionQuantityPage extends Page implements HasForms
|
||||
->title('Invalid QR Found') // {$operatorName}
|
||||
->body('Please, scan the valid QR code.')
|
||||
->danger()
|
||||
// ->persistent()
|
||||
->send();
|
||||
|
||||
return;
|
||||
} else {
|
||||
// // Perform any additional processing or database operations
|
||||
// $this->saveFormData($formValues);
|
||||
|
||||
$parts = explode('|', $this->qrData);
|
||||
$itemCode = trim($parts[0]);
|
||||
@@ -1467,7 +1484,7 @@ class ProductionQuantityPage extends Page implements HasForms
|
||||
'sap_msg_status' => null,
|
||||
'sap_msg_description' => null,
|
||||
'operator_id' => $operatorName,
|
||||
'recent_qr' => $this->recent_qr,
|
||||
'recent_qr' => $this->recQr,
|
||||
]);
|
||||
|
||||
return;
|
||||
@@ -1489,7 +1506,6 @@ class ProductionQuantityPage extends Page implements HasForms
|
||||
// $this->recent_qr = $itemCode.' | '.$this->sNoId;
|
||||
// after success insertion
|
||||
$this->form->fill([
|
||||
|
||||
'plant_id' => $this->pId,
|
||||
'machine_id' => $this->mNam,
|
||||
'block_name' => $this->bNam,
|
||||
@@ -1502,7 +1518,7 @@ class ProductionQuantityPage extends Page implements HasForms
|
||||
'sap_msg_status' => null,
|
||||
'sap_msg_description' => null,
|
||||
'operator_id' => $operatorName,
|
||||
'recent_qr' => $this->recent_qr,
|
||||
'recent_qr' => $itemCode.' | '.$this->sNoId,
|
||||
]);
|
||||
|
||||
Notification::make()
|
||||
|
||||
Reference in New Issue
Block a user