Removed duplicate where condition on generate workFlowId and updated quality approval pending condition and Refactor document retrieval function
Some checks failed
Gemini PR Review / Gemini PR Review (pull_request) Waiting to run
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Waiting to run
Laravel Larastan / larastan (pull_request) Waiting to run
Laravel Pint / pint (pull_request) Waiting to run
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Some checks failed
Gemini PR Review / Gemini PR Review (pull_request) Waiting to run
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Waiting to run
Laravel Larastan / larastan (pull_request) Waiting to run
Laravel Pint / pint (pull_request) Waiting to run
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
This commit is contained in:
@@ -2841,7 +2841,7 @@ class CharacteristicsController extends Controller
|
||||
$app2 = $pendingExists->approver_status2 ?? null;
|
||||
$app3 = $pendingExists->approver_status3 ?? null;
|
||||
|
||||
if ($app1 != 'Rejected' && $app2 != 'Rejected' && $app3 != 'Rejected' && $app1 != 'Approved' && $app2 != 'Approved' && $app3 != 'Approved') {
|
||||
if ($app1 != 'Approved' && $app2 != 'Approved' && $app3 != 'Approved' && $app1 != 'Rejected' && $app2 != 'Rejected' && $app3 != 'Rejected') {
|
||||
$pendingCharacteristics[] = strtoupper($charNameUpp);
|
||||
}
|
||||
}
|
||||
@@ -2887,7 +2887,6 @@ class CharacteristicsController extends Controller
|
||||
$lastWorkflow = RequestCharacteristic::where('work_flow_id', 'like', "{$prefix}%")
|
||||
// ->where('plant_id', $plantId)
|
||||
// ->where('machine_id', $MachineId)
|
||||
->where('work_flow_id', 'like', "{$prefix}%")
|
||||
->orderByDesc('work_flow_id')
|
||||
->first();
|
||||
|
||||
@@ -2999,10 +2998,11 @@ class CharacteristicsController extends Controller
|
||||
$app2 = $pendingExists->approver_status2 ?? null;
|
||||
$app3 = $pendingExists->approver_status3 ?? null;
|
||||
|
||||
if ($app1 != 'Approved' && $app2 != 'Approved' && $app3 != 'Approved') {// $app1 != 'Rejected' && $app2 != 'Rejected' && $app3 != 'Rejected' &&
|
||||
if ($app1 != 'Approved' && $app2 != 'Approved' && $app3 != 'Approved' && $app1 != 'Rejected' && $app2 != 'Rejected' && $app3 != 'Rejected') {
|
||||
return response()->json([
|
||||
'status_code' => 'ERROR',
|
||||
'status_description' => "Quality Approval is already pending for the Job Number : '{$jobNo}'",
|
||||
// 'status_error' => $pendingExists,
|
||||
], 404);
|
||||
}
|
||||
}
|
||||
@@ -3014,7 +3014,6 @@ class CharacteristicsController extends Controller
|
||||
$prefix = "WF-{$year}{$month}{$date}-";
|
||||
|
||||
$lastWorkflow = RequestCharacteristic::where('work_flow_id', 'like', "{$prefix}%")
|
||||
->where('work_flow_id', 'like', "{$prefix}%")
|
||||
->orderByDesc('work_flow_id')
|
||||
->first();
|
||||
|
||||
@@ -3583,15 +3582,9 @@ class CharacteristicsController extends Controller
|
||||
'requested_characteristics' => $response,
|
||||
], 200);
|
||||
} else {
|
||||
$filePath = '';
|
||||
$filename = '';
|
||||
if ($requestType == 'Characteristic') {
|
||||
$filePath = "uploads/LaserDocs/{$workFlowId}.pdf";
|
||||
$filename = "{$workFlowId}.pdf";
|
||||
} else {
|
||||
$filePath = "uploads/LaserDocs/{$workFlowId}.png";
|
||||
$filename = "{$workFlowId}.png";
|
||||
}
|
||||
$extension = ($requestType == 'Characteristic') ? 'pdf' : 'png';
|
||||
$filePath = "uploads/LaserDocs/{$workFlowId}.{$extension}";
|
||||
$filename = "{$workFlowId}.{$extension}";
|
||||
|
||||
$workFlowIdExist = RequestCharacteristic::where('work_flow_id', $workFlowId)->first();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user