Compare commits
4 Commits
70d38c7a7b
...
cc7fd5b16d
| Author | SHA1 | Date | |
|---|---|---|---|
| cc7fd5b16d | |||
|
|
f5d9adb516 | ||
|
|
787296abf9 | ||
|
|
ea39fb92de |
@@ -38,15 +38,40 @@ class TriggerPendingApprovalMails extends Command
|
|||||||
|
|
||||||
public $pdfPath;
|
public $pdfPath;
|
||||||
|
|
||||||
|
public $subjectLine;
|
||||||
|
|
||||||
|
public $wfId;
|
||||||
|
|
||||||
|
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
$this->info('Approval mail job started');
|
$this->info('Approval mail job started');
|
||||||
|
|
||||||
$records = RequestCharacteristic::whereNull('approver_status1')
|
// .. Characteristic Mail trigger logic
|
||||||
->whereNull('approver_status2')
|
|
||||||
->whereNull('approver_status3')
|
// $records = RequestCharacteristic::whereNull('approver_status1')
|
||||||
->get();
|
// ->whereNull('approver_status2')
|
||||||
|
// ->whereNull('approver_status3')
|
||||||
|
// ->get();
|
||||||
|
|
||||||
|
$records = RequestCharacteristic::where(function ($q) {
|
||||||
|
$q->whereNull('approver_status1')
|
||||||
|
->orWhere('approver_status1', 'Hold');
|
||||||
|
})
|
||||||
|
->where(function ($q) {
|
||||||
|
$q->whereNull('approver_status2')
|
||||||
|
->orWhere('approver_status2', 'Hold');
|
||||||
|
})
|
||||||
|
->where(function ($q) {
|
||||||
|
$q->whereNull('approver_status3')
|
||||||
|
->orWhere('approver_status3', 'Hold');
|
||||||
|
})
|
||||||
|
->get();
|
||||||
|
|
||||||
|
$records = $records->filter(function ($item) {
|
||||||
|
$approver = CharacteristicApproverMaster::find($item->characteristic_approver_master_id);
|
||||||
|
return $approver && $approver->approver_type == 'Characteristic';
|
||||||
|
});
|
||||||
|
|
||||||
if ($records->isEmpty()) {
|
if ($records->isEmpty()) {
|
||||||
$this->info('No pending approvals');
|
$this->info('No pending approvals');
|
||||||
@@ -54,9 +79,20 @@ class TriggerPendingApprovalMails extends Command
|
|||||||
}
|
}
|
||||||
|
|
||||||
$grouped = $records->groupBy(function ($item) {
|
$grouped = $records->groupBy(function ($item) {
|
||||||
|
$this->wfId = $item->work_flow_id;
|
||||||
return $item->plant_id . '|' . $item->machine_id . '|' . $item->aufnr . '|' . $item->work_flow_id;
|
return $item->plant_id . '|' . $item->machine_id . '|' . $item->aufnr . '|' . $item->work_flow_id;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$pendingApprovers = RequestCharacteristic::where('work_flow_id', $this->wfId)->latest()->first();
|
||||||
|
|
||||||
|
$this->info($pendingApprovers->approver_status1, $pendingApprovers->approver_status2);
|
||||||
|
|
||||||
|
|
||||||
|
$approverNameFromMaster = null;
|
||||||
|
if ($pendingApprovers && $pendingApprovers->characteristic_approver_master_id) {
|
||||||
|
$approverNameFromMaster = CharacteristicApproverMaster::find($pendingApprovers->characteristic_approver_master_id);
|
||||||
|
}
|
||||||
|
|
||||||
$rows = [];
|
$rows = [];
|
||||||
|
|
||||||
foreach ($grouped as $groupRecords) {
|
foreach ($grouped as $groupRecords) {
|
||||||
@@ -92,9 +128,6 @@ class TriggerPendingApprovalMails extends Command
|
|||||||
$name = $approver->name1;
|
$name = $approver->name1;
|
||||||
|
|
||||||
$updateData['mail_status'] = 'Sent';
|
$updateData['mail_status'] = 'Sent';
|
||||||
// $updateData['trigger_at'] = $approver->duration1 > 0
|
|
||||||
// ? $now->copy()->addMinutes($approver->duration1 * 10)
|
|
||||||
// : null;
|
|
||||||
|
|
||||||
if ($approver->duration1 > 0)
|
if ($approver->duration1 > 0)
|
||||||
{
|
{
|
||||||
@@ -118,19 +151,184 @@ class TriggerPendingApprovalMails extends Command
|
|||||||
// --- SECOND MAIL ---
|
// --- SECOND MAIL ---
|
||||||
elseif (
|
elseif (
|
||||||
$first->mail_status == 'Sent' &&
|
$first->mail_status == 'Sent' &&
|
||||||
is_null($first->approver_status1) &&
|
(is_null($first->approver_status1) || $first->approver_status1 == 'Hold') &&
|
||||||
|
$first->trigger_at &&
|
||||||
|
\Carbon\Carbon::parse($first->trigger_at)->lte($now)
|
||||||
|
) {
|
||||||
|
|
||||||
|
$this->info(
|
||||||
|
"mail_status: {$first->mail_status}, ".
|
||||||
|
"approver_status1: {$first->approver_status1}, ".
|
||||||
|
"trigger_at: {$first->trigger_at}, ".
|
||||||
|
"now: {$now}"
|
||||||
|
);
|
||||||
|
|
||||||
|
$level = 2;
|
||||||
|
$mail = $approver->mail2;
|
||||||
|
$name = $approver->name2;
|
||||||
|
|
||||||
|
if ($approver->duration2 > 0) {
|
||||||
|
|
||||||
|
$duration = number_format((float)$approver->duration2, 2, '.', '');
|
||||||
|
[$hours, $minutes] = explode('.', $duration);
|
||||||
|
|
||||||
|
$totalMinutes = ((int)$hours * 60) + (int)$minutes;
|
||||||
|
|
||||||
|
$updateData['trigger_at'] = $now->copy()->addMinutes($totalMinutes);
|
||||||
|
} else {
|
||||||
|
$updateData['trigger_at'] = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$updateData['mail_status'] = 'Sent-Mail2';
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- THIRD MAIL ---
|
||||||
|
elseif (
|
||||||
|
$first->mail_status == 'Sent-Mail2' &&
|
||||||
|
(is_null($first->approver_status1) || $first->approver_status1 == 'Hold') &&
|
||||||
|
(is_null($first->approver_status2) || $first->approver_status2 == 'Hold') &&
|
||||||
|
$first->trigger_at &&
|
||||||
|
\Carbon\Carbon::parse($first->trigger_at)->lte($now)
|
||||||
|
) {
|
||||||
|
$level = 3;
|
||||||
|
$mail = $approver->mail3;
|
||||||
|
$name = $approver->name3;
|
||||||
|
|
||||||
|
$updateData['trigger_at'] = null;
|
||||||
|
$updateData['mail_status'] = 'Sent-Mail3';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$level || !$mail) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$pdfPath = 'uploads/LaserDocs/' . $first->work_flow_id . '.pdf';
|
||||||
|
|
||||||
|
$subjectLine = 'Characteristic Approval Mail';
|
||||||
|
|
||||||
|
Mail::to($mail)->send(
|
||||||
|
new CharacteristicApprovalMail(
|
||||||
|
$first,
|
||||||
|
$name,
|
||||||
|
$level,
|
||||||
|
$pdfPath,
|
||||||
|
$pendingApprovers,
|
||||||
|
$approverNameFromMaster,
|
||||||
|
$subjectLine,
|
||||||
|
$characteristics
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
RequestCharacteristic::whereIn('id', $groupRecords->pluck('id'))
|
||||||
|
->update($updateData);
|
||||||
|
|
||||||
|
$rows[] = [
|
||||||
|
$first->id,
|
||||||
|
$first->plant_id,
|
||||||
|
$first->machine_id,
|
||||||
|
"Level $level",
|
||||||
|
$mail,
|
||||||
|
'SENT'
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// .. Quality Mail trigger logic
|
||||||
|
|
||||||
|
$qualityRecords = RequestCharacteristic::where(function ($q) {
|
||||||
|
$q->whereNull('approver_status1')
|
||||||
|
->orWhere('approver_status1', 'Hold');
|
||||||
|
})
|
||||||
|
->where(function ($q) {
|
||||||
|
$q->whereNull('approver_status2')
|
||||||
|
->orWhere('approver_status2', 'Hold');
|
||||||
|
})
|
||||||
|
->where(function ($q) {
|
||||||
|
$q->whereNull('approver_status3')
|
||||||
|
->orWhere('approver_status3', 'Hold');
|
||||||
|
})
|
||||||
|
->get();
|
||||||
|
|
||||||
|
$qualityRecords = $qualityRecords->filter(function ($item) {
|
||||||
|
$approver = CharacteristicApproverMaster::find($item->characteristic_approver_master_id);
|
||||||
|
return $approver && $approver->approver_type == 'Quality';
|
||||||
|
});
|
||||||
|
|
||||||
|
if ($qualityRecords->isEmpty()) {
|
||||||
|
$this->info('No quality pending approvals');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$grouped = $qualityRecords->groupBy(function ($item) {
|
||||||
|
$this->wfId = $item->work_flow_id;
|
||||||
|
return $item->plant_id . '|' . $item->machine_id . '|' . $item->aufnr . '|' . $item->work_flow_id;
|
||||||
|
});
|
||||||
|
|
||||||
|
$pendingApprovers = RequestCharacteristic::where('work_flow_id', $this->wfId)->latest()->first();
|
||||||
|
|
||||||
|
$approverNameFromMaster = null;
|
||||||
|
if ($pendingApprovers && $pendingApprovers->characteristic_approver_master_id) {
|
||||||
|
$approverNameFromMaster = CharacteristicApproverMaster::find($pendingApprovers->characteristic_approver_master_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
$rows = [];
|
||||||
|
|
||||||
|
foreach ($grouped as $groupRecords) {
|
||||||
|
|
||||||
|
$first = $groupRecords->first();
|
||||||
|
|
||||||
|
$approver = CharacteristicApproverMaster::where('plant_id', $first->plant_id)
|
||||||
|
->where('machine_id', $first->machine_id)
|
||||||
|
->where('id', $first->characteristic_approver_master_id)
|
||||||
|
->first();
|
||||||
|
|
||||||
|
if (!$approver) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$level = null;
|
||||||
|
$mail = null;
|
||||||
|
$name = null;
|
||||||
|
$updateData = [];
|
||||||
|
$now = Carbon::now();
|
||||||
|
|
||||||
|
// --- FIRST MAIL ---
|
||||||
|
if (is_null($first->mail_status)){
|
||||||
|
$level = 1;
|
||||||
|
$mail = $approver->mail1;
|
||||||
|
$name = $approver->name1;
|
||||||
|
|
||||||
|
$updateData['mail_status'] = 'Sent';
|
||||||
|
|
||||||
|
if ($approver->duration1 > 0)
|
||||||
|
{
|
||||||
|
|
||||||
|
$duration = number_format((float)$approver->duration1, 2, '.', '');
|
||||||
|
[$hours, $minutes] = explode('.', $duration);
|
||||||
|
|
||||||
|
$totalMinutes = ((int)$hours * 60) + (int)$minutes;
|
||||||
|
|
||||||
|
$updateData['trigger_at'] = $now
|
||||||
|
->copy()
|
||||||
|
->addMinutes($totalMinutes)
|
||||||
|
->startOfMinute();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$updateData['trigger_at'] = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- SECOND MAIL ---
|
||||||
|
elseif (
|
||||||
|
$first->mail_status == 'Sent' &&
|
||||||
|
(is_null($first->approver_status1) || $first->approver_status1 == 'Hold') &&
|
||||||
$first->trigger_at &&
|
$first->trigger_at &&
|
||||||
\Carbon\Carbon::parse($first->trigger_at)->lte($now)
|
\Carbon\Carbon::parse($first->trigger_at)->lte($now)
|
||||||
// $first->trigger_at <= $now
|
|
||||||
) {
|
) {
|
||||||
$level = 2;
|
$level = 2;
|
||||||
$mail = $approver->mail2;
|
$mail = $approver->mail2;
|
||||||
$name = $approver->name2;
|
$name = $approver->name2;
|
||||||
// $updateData['trigger_at'] = $approver->duration2 > 0
|
|
||||||
// ? $now->copy()->addMinutes($approver->duration2 * 10)
|
|
||||||
// : null;
|
|
||||||
|
|
||||||
// $updateData['mail_status'] = 'Sent-Mail2';
|
|
||||||
|
|
||||||
if ($approver->duration2 > 0) {
|
if ($approver->duration2 > 0) {
|
||||||
|
|
||||||
@@ -151,10 +349,9 @@ class TriggerPendingApprovalMails extends Command
|
|||||||
// --- THIRD MAIL ---
|
// --- THIRD MAIL ---
|
||||||
elseif (
|
elseif (
|
||||||
$first->mail_status == 'Sent-Mail2' &&
|
$first->mail_status == 'Sent-Mail2' &&
|
||||||
is_null($first->approver_status1) &&
|
(is_null($first->approver_status1) || $first->approver_status1 == 'Hold') &&
|
||||||
is_null($first->approver_status2) &&
|
(is_null($first->approver_status2) || $first->approver_status2 == 'Hold') &&
|
||||||
$first->trigger_at &&
|
$first->trigger_at &&
|
||||||
// $first->trigger_at <= $now
|
|
||||||
\Carbon\Carbon::parse($first->trigger_at)->lte($now)
|
\Carbon\Carbon::parse($first->trigger_at)->lte($now)
|
||||||
) {
|
) {
|
||||||
$level = 3;
|
$level = 3;
|
||||||
@@ -169,7 +366,13 @@ class TriggerPendingApprovalMails extends Command
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$pdfPath = 'uploads/LaserDocs/' . $first->work_flow_id . '.pdf';
|
$pdfPath = ($f = glob(storage_path('app/private/uploads/LaserDocs/' . $first->work_flow_id . '.*')))
|
||||||
|
? 'uploads/LaserDocs/' . basename($f[0])
|
||||||
|
: null;
|
||||||
|
|
||||||
|
$this->info( $pdfPath);
|
||||||
|
|
||||||
|
$subjectLine = 'Quality Approval Mail';
|
||||||
|
|
||||||
Mail::to($mail)->send(
|
Mail::to($mail)->send(
|
||||||
new CharacteristicApprovalMail(
|
new CharacteristicApprovalMail(
|
||||||
@@ -177,6 +380,9 @@ class TriggerPendingApprovalMails extends Command
|
|||||||
$name,
|
$name,
|
||||||
$level,
|
$level,
|
||||||
$pdfPath,
|
$pdfPath,
|
||||||
|
$pendingApprovers,
|
||||||
|
$approverNameFromMaster,
|
||||||
|
$subjectLine,
|
||||||
$characteristics
|
$characteristics
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
{{-- <!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
@@ -67,25 +67,149 @@
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #666;
|
color: #666;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.approvelevel {
|
||||||
|
/* color: red; */
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div class="container">
|
<div class="card">
|
||||||
<div class="card">
|
<div class="approvelevel">⚠️ Action Already Taken</div>
|
||||||
<div class="icon">⚠️</div>
|
|
||||||
<h2>Action Already Taken</h2>
|
|
||||||
|
|
||||||
<div class="status {{ $status }}">
|
<div class="status {{ $status }}">
|
||||||
Status: {{ $status }}
|
Status: {{ $status }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p class="note">
|
<div class="footer">
|
||||||
|
CRI Digital Manufacturing Solutions<br>
|
||||||
|
© 2026 All Rights Reserved
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html> --}}
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Action Taken</title>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
background: #f6f6f6;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
.card {
|
||||||
|
background: #ffffff;
|
||||||
|
padding: 20px;
|
||||||
|
max-width: 500px;
|
||||||
|
margin: 50px auto;
|
||||||
|
border-radius: 6px;
|
||||||
|
text-align: center;
|
||||||
|
box-shadow: 0 0 10px rgba(0,0,0,.1);
|
||||||
|
}
|
||||||
|
.success {
|
||||||
|
color: green;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.footer {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #999999;
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
.icon {
|
||||||
|
font-size: 30px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
color: #ff9800;
|
||||||
|
}
|
||||||
|
|
||||||
|
.approvelevel {
|
||||||
|
/* color: red; */
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status {
|
||||||
|
margin-top: 15px;
|
||||||
|
padding: 10px;
|
||||||
|
border-radius: 6px;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status.Approved {
|
||||||
|
background-color: #e8f5e9;
|
||||||
|
color: #2e7d32;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status.Hold {
|
||||||
|
background-color: #fff3e0;
|
||||||
|
color: #ef6c00;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status.Rejected {
|
||||||
|
background-color: #fdecea;
|
||||||
|
color: #c62828;
|
||||||
|
}
|
||||||
|
|
||||||
|
.note {
|
||||||
|
margin-top: 15px;
|
||||||
|
font-size: 15px;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pulse-darkred {
|
||||||
|
color: orange; /* #8B0000 */
|
||||||
|
background-color: #fff; /* White bg for contrast */
|
||||||
|
display: inline-block;
|
||||||
|
padding: 0.5em 0.75em;
|
||||||
|
border-radius: 4px;
|
||||||
|
font-size: 1em;
|
||||||
|
line-height: 1;
|
||||||
|
animation: pulse 1.5s ease-in-out infinite; /* Duration, easing, infinite loop */
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes pulse {
|
||||||
|
0%, 100% {
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
transform: scale(1.2); /* Gentle 5% expansion */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="approvelevel"><span class="pulse-darkred">⚠️</span> Action Already Taken</div>
|
||||||
|
|
||||||
|
{{-- <div class="status {{ $status }}">
|
||||||
|
Status: {{ $status }}
|
||||||
|
</div> --}}
|
||||||
|
|
||||||
|
<div class="status {{ $status }}">
|
||||||
|
Status: {{ $message ?? $status }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p class="note">
|
||||||
This request has already been processed.<br>
|
This request has already been processed.<br>
|
||||||
No further action is required.
|
No further action is required.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<div class="footer">
|
||||||
|
CRI Digital Manufacturing Solutions<br>
|
||||||
|
© 2026 All Rights Reserved
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
94
resources/views/approval/approve-form.blade.php
Normal file
94
resources/views/approval/approve-form.blade.php
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Request On Approve</title>
|
||||||
|
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||||
|
</head>
|
||||||
|
<body style="font-family: Arial, sans-serif; background-color: #f4f4f4; margin:0; padding:0;">
|
||||||
|
<table width="100%" cellpadding="0" cellspacing="0" style="padding: 20px 0;">
|
||||||
|
<tr>
|
||||||
|
<td align="center">
|
||||||
|
<!-- Card container -->
|
||||||
|
<table width="600" cellpadding="0" cellspacing="0" style="background-color: #ffffff; border-radius: 8px; box-shadow: 0 2px 6px rgba(0,0,0,0.1); border: 1px solid #e0e0e0;">
|
||||||
|
<tr>
|
||||||
|
<td style="padding: 30px; text-align: center;">
|
||||||
|
<!-- Header -->
|
||||||
|
<div style="font-size: 35px;"></div>
|
||||||
|
<h2 style="color: Green; margin: 10px 0 20px; font-size: 24px;">✔ Request On Approve</h2>
|
||||||
|
|
||||||
|
<!-- Message -->
|
||||||
|
{{-- <p style="font-size: 16px; color: #555555; line-height: 1.5;">
|
||||||
|
Your request has been put on reject.
|
||||||
|
</p> --}}
|
||||||
|
|
||||||
|
<!-- Remark Textbox -->
|
||||||
|
<div style="margin-top: 20px; text-align: left;">
|
||||||
|
<label for="remark" style="font-size: 14px; color: #333;">Remark</label>
|
||||||
|
<textarea id="remark" style="width:100%; height:100px; padding:10px; margin-top:5px; border:1px solid #ddd; border-radius:5px;"></textarea>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Buttons -->
|
||||||
|
<div style="margin-top: 20px;">
|
||||||
|
{{-- <button onclick="holdRequest()" style="padding: 10px 20px; margin-right: 10px; background-color:#FF8800; color:#fff; border:none; border-radius:5px; cursor:pointer;">
|
||||||
|
Hold
|
||||||
|
</button> --}}
|
||||||
|
<input type="hidden" id="requestId" value="{{ request()->query('id') }}">
|
||||||
|
<input type="hidden" id="level" value="{{ request()->query('level') }}">
|
||||||
|
|
||||||
|
<button onclick="saveRemark()" style="padding: 10px 20px; background-color:#4CAF50; color:#fff; border:none; border-radius:5px; cursor:pointer;">
|
||||||
|
Save Remark
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<!-- Footer -->
|
||||||
|
<tr>
|
||||||
|
<td style="padding: 15px; text-align: center; font-size: 12px; color: #999999;">
|
||||||
|
CRI Digital Manufacturing Solutions<br>
|
||||||
|
© 2026 All Rights Reserved
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
function saveRemark() {
|
||||||
|
const remark = document.getElementById("remark").value.trim();
|
||||||
|
const id = document.getElementById("requestId").value;
|
||||||
|
const level = document.getElementById("level").value;
|
||||||
|
|
||||||
|
fetch('/characteristic/approve-save', {
|
||||||
|
method: 'POST',
|
||||||
|
credentials: 'same-origin',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
'X-CSRF-TOKEN': document.querySelector('meta[name="csrf-token"]').content
|
||||||
|
},
|
||||||
|
body: JSON.stringify({
|
||||||
|
id: id,
|
||||||
|
level: level,
|
||||||
|
remark: remark
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.then(res => {
|
||||||
|
if (!res.ok) {
|
||||||
|
throw new Error("HTTP error " + res.status);
|
||||||
|
}
|
||||||
|
return res.json();
|
||||||
|
})
|
||||||
|
.then(data => {
|
||||||
|
alert('Approved saved successfully!');
|
||||||
|
window.location.href = "/approval/approve-success";
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
console.error(err);
|
||||||
|
alert('Error saving approve!');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
99
resources/views/approval/approve-level.blade.php
Normal file
99
resources/views/approval/approve-level.blade.php
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Action Time Reached</title>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
background: #f6f6f6;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
.status {
|
||||||
|
margin-top: 15px;
|
||||||
|
padding: 10px;
|
||||||
|
border-radius: 6px;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status.Approved {
|
||||||
|
background-color: #e8f5e9;
|
||||||
|
color: #2e7d32;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status.Hold {
|
||||||
|
background-color: #fff3e0;
|
||||||
|
color: #ef6c00;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status.Rejected {
|
||||||
|
background-color: #fdecea;
|
||||||
|
color: #c62828;
|
||||||
|
}
|
||||||
|
.approvelevel {
|
||||||
|
/* color: red; */
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
background: #ffffff;
|
||||||
|
padding: 20px;
|
||||||
|
max-width: 500px;
|
||||||
|
margin: 50px auto;
|
||||||
|
border-radius: 6px;
|
||||||
|
text-align: center;
|
||||||
|
box-shadow: 0 0 10px rgba(0,0,0,.1);
|
||||||
|
}
|
||||||
|
.success {
|
||||||
|
color: green;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.footer {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #999999;
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
.icon {
|
||||||
|
font-size: 30px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
color: #ff9800;
|
||||||
|
}
|
||||||
|
|
||||||
|
.approvelevel {
|
||||||
|
/* color: red; */
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.status-message.expired {
|
||||||
|
color: #d84315;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="approvelevel">⚠️ Action Expired</div>
|
||||||
|
|
||||||
|
<div class="status {{ $status }}">
|
||||||
|
Status:
|
||||||
|
<span class="status-message expired">
|
||||||
|
{{ $message ?? $status }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- <p>Your approval time limit has expired</p> --}}
|
||||||
|
|
||||||
|
<div class="footer">
|
||||||
|
CRI Digital Manufacturing Solutions<br>
|
||||||
|
© 2026 All Rights Reserved
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
77
resources/views/approval/approve-success.blade.php
Normal file
77
resources/views/approval/approve-success.blade.php
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Approval</title>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
background: #f6f6f6;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
.card {
|
||||||
|
background: #ffffff;
|
||||||
|
padding: 20px;
|
||||||
|
max-width: 500px;
|
||||||
|
margin: 50px auto;
|
||||||
|
border-radius: 6px;
|
||||||
|
text-align: center;
|
||||||
|
box-shadow: 0 0 10px rgba(0,0,0,.1);
|
||||||
|
}
|
||||||
|
.hold {
|
||||||
|
color: Green;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.footer {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #999999;
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
a.button {
|
||||||
|
display: inline-block;
|
||||||
|
margin-top: 15px;
|
||||||
|
padding: 10px 20px;
|
||||||
|
background-color: Green;
|
||||||
|
color: #ffffff;
|
||||||
|
text-decoration: none;
|
||||||
|
border-radius: 5px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.pulse-darkred {
|
||||||
|
color: Green; /* #8B0000 */
|
||||||
|
background-color: #fff; /* White bg for contrast */
|
||||||
|
display: inline-block;
|
||||||
|
padding: 0.5em 0.75em;
|
||||||
|
border-radius: 4px;
|
||||||
|
font-size: 1em;
|
||||||
|
line-height: 1;
|
||||||
|
animation: pulse 1.5s ease-in-out infinite; /* Duration, easing, infinite loop */
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes pulse {
|
||||||
|
0%, 100% {
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
transform: scale(1.2); /* Gentle 5% expansion */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="hold"><span class="pulse-darkred">🟢</span> Approved Successfully</div>
|
||||||
|
<p>Your request has been approved.</p>
|
||||||
|
|
||||||
|
<!-- Footer -->
|
||||||
|
<div class="footer">
|
||||||
|
CRI Digital Manufacturing Solutions<br>
|
||||||
|
© 2026 All Rights Reserved
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
@@ -13,13 +13,13 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td style="padding: 30px; text-align: center;">
|
<td style="padding: 30px; text-align: center;">
|
||||||
<!-- Header -->
|
<!-- Header -->
|
||||||
<div style="font-size: 40px;">🟠</div>
|
{{-- <div style="font-size: 40px;"></div> --}}
|
||||||
<h2 style="color: #FF8800; margin: 10px 0 20px; font-size: 24px;">Request On Hold</h2>
|
<h2 style="color: #FF8800; margin: 10px 0 20px; font-size: 24px;">🟠 Request On Hold</h2>
|
||||||
|
|
||||||
<!-- Message -->
|
<!-- Message -->
|
||||||
<p style="font-size: 16px; color: #555555; line-height: 1.5;">
|
{{-- <p style="font-size: 16px; color: #555555; line-height: 1.5;">
|
||||||
Your request has been temporarily put on hold.
|
Your request has been temporarily put on hold.
|
||||||
</p>
|
</p> --}}
|
||||||
|
|
||||||
<!-- Remark Textbox -->
|
<!-- Remark Textbox -->
|
||||||
<div style="margin-top: 20px; text-align: left;">
|
<div style="margin-top: 20px; text-align: left;">
|
||||||
|
|||||||
@@ -1,36 +1,77 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Request On Hold</title>
|
<title>On Hold</title>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
background: #f6f6f6;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
.card {
|
||||||
|
background: #ffffff;
|
||||||
|
padding: 20px;
|
||||||
|
max-width: 500px;
|
||||||
|
margin: 50px auto;
|
||||||
|
border-radius: 6px;
|
||||||
|
text-align: center;
|
||||||
|
box-shadow: 0 0 10px rgba(0,0,0,.1);
|
||||||
|
}
|
||||||
|
.hold {
|
||||||
|
color: #FF8800;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.footer {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #999999;
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
a.button {
|
||||||
|
display: inline-block;
|
||||||
|
margin-top: 15px;
|
||||||
|
padding: 10px 20px;
|
||||||
|
background-color: #FF8800;
|
||||||
|
color: #ffffff;
|
||||||
|
text-decoration: none;
|
||||||
|
border-radius: 5px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.pulse-darkred {
|
||||||
|
color: DarkRed; /* #8B0000 */
|
||||||
|
background-color: #fff; /* White bg for contrast */
|
||||||
|
display: inline-block;
|
||||||
|
padding: 0.5em 0.75em;
|
||||||
|
border-radius: 4px;
|
||||||
|
font-size: 1em;
|
||||||
|
line-height: 1;
|
||||||
|
animation: pulse 1.5s ease-in-out infinite; /* Duration, easing, infinite loop */
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes pulse {
|
||||||
|
0%, 100% {
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
transform: scale(1.2); /* Gentle 5% expansion */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body style="font-family: Arial, sans-serif; background-color: #f4f4f4; margin:0; padding:0;">
|
<body>
|
||||||
<table width="100%" cellpadding="0" cellspacing="0" style="padding: 20px 0;">
|
|
||||||
<tr>
|
<div class="card">
|
||||||
<td align="center">
|
<div class="hold"><span class="pulse-darkred">🟠</span> Hold Successfully</div>
|
||||||
<!-- Card container -->
|
<p>Your request has been temporarily put on hold.</p>
|
||||||
<table width="600" cellpadding="0" cellspacing="0" style="background-color: #ffffff; border-radius: 8px; box-shadow: 0 2px 6px rgba(0,0,0,0.1); border: 1px solid #e0e0e0;">
|
|
||||||
<tr>
|
<!-- Footer -->
|
||||||
<td style="padding: 30px; text-align: center;">
|
<div class="footer">
|
||||||
<!-- Header -->
|
CRI Digital Manufacturing Solutions<br>
|
||||||
<div style="font-size: 40px;">🟠</div>
|
© 2026 All Rights Reserved
|
||||||
<h2 style="color: #FF8800; margin: 10px 0 20px; font-size: 24px;">Request On Hold</h2>
|
</div>
|
||||||
<!-- Message -->
|
</div>
|
||||||
<p style="font-size: 16px; color: #555555; line-height: 1.5;">
|
|
||||||
Your request has been temporarily put on hold.
|
|
||||||
</p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<!-- Footer -->
|
|
||||||
<tr>
|
|
||||||
<td style="padding: 15px; text-align: center; font-size: 12px; color: #999999;">
|
|
||||||
CRI Digital Manufacturing Solutions<br>
|
|
||||||
© 2026 All Rights Reserved
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|||||||
@@ -13,13 +13,13 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td style="padding: 30px; text-align: center;">
|
<td style="padding: 30px; text-align: center;">
|
||||||
<!-- Header -->
|
<!-- Header -->
|
||||||
<div style="font-size: 40px;">🟠</div>
|
<div style="font-size: 35px;"></div>
|
||||||
<h2 style="color: #FF0000; margin: 10px 0 20px; font-size: 24px;">Request On Reject</h2>
|
<h2 style="color: #FF0000; margin: 10px 0 20px; font-size: 24px;">❌ Request On Reject</h2>
|
||||||
|
|
||||||
<!-- Message -->
|
<!-- Message -->
|
||||||
<p style="font-size: 16px; color: #555555; line-height: 1.5;">
|
{{-- <p style="font-size: 16px; color: #555555; line-height: 1.5;">
|
||||||
Your request has been temporarily put on reject.
|
Your request has been put on reject.
|
||||||
</p>
|
</p> --}}
|
||||||
|
|
||||||
<!-- Remark Textbox -->
|
<!-- Remark Textbox -->
|
||||||
<div style="margin-top: 20px; text-align: left;">
|
<div style="margin-top: 20px; text-align: left;">
|
||||||
@@ -42,7 +42,6 @@
|
|||||||
Save Remark
|
Save Remark
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
}
|
}
|
||||||
.rejected {
|
.rejected {
|
||||||
color: red;
|
color: red;
|
||||||
font-size: 20px;
|
font-size: 18px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.footer {
|
.footer {
|
||||||
@@ -38,14 +38,33 @@
|
|||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
.pulse-darkred {
|
||||||
|
color: DarkRed; /* #8B0000 */
|
||||||
|
background-color: #fff; /* White bg for contrast */
|
||||||
|
display: inline-block;
|
||||||
|
padding: 0.5em 0.75em;
|
||||||
|
border-radius: 4px;
|
||||||
|
font-size: 1em;
|
||||||
|
line-height: 1;
|
||||||
|
animation: pulse 1.5s ease-in-out infinite; /* Duration, easing, infinite loop */
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes pulse {
|
||||||
|
0%, 100% {
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
transform: scale(1.2); /* Gentle 5% expansion */
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="rejected">❌ Rejected Successfully</div>
|
<div class="rejected"><span class="pulse-darkred">❌</span> Rejected Successfully</div>
|
||||||
<p>The rejection has been recorded.</p>
|
{{-- 🔴 --}}
|
||||||
<p>You may now close this tab.</p>
|
<p>Your request has been rejected successfully.</p>
|
||||||
|
|
||||||
<!-- Footer -->
|
<!-- Footer -->
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Approval Recorded</title>
|
<title>Approved</title>
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
font-family: Arial, sans-serif;
|
font-family: Arial, sans-serif;
|
||||||
@@ -28,14 +28,33 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
|
.pulse-darkred {
|
||||||
|
color: Green; /* #8B0000 */
|
||||||
|
background-color: #fff; /* White bg for contrast */
|
||||||
|
display: inline-block;
|
||||||
|
padding: 0.5em 0.75em;
|
||||||
|
border-radius: 4px;
|
||||||
|
font-size: 1em;
|
||||||
|
line-height: 1;
|
||||||
|
animation: pulse 1.5s ease-in-out infinite; /* Duration, easing, infinite loop */
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes pulse {
|
||||||
|
0%, 100% {
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
transform: scale(1.25); /* Gentle 5% expansion */
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="success">✔ Approval Successful</div>
|
<div class="success"><span class="pulse-darkred">✔</span> Approved Successfully</div>
|
||||||
<p>Your action has been recorded.</p>
|
{{-- 🟢 --}}
|
||||||
<p>You may now close this tab.</p>
|
<p>Your request has been approved successfully.</p>
|
||||||
|
|
||||||
<!-- Footer -->
|
<!-- Footer -->
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
|
|||||||
@@ -7,57 +7,59 @@
|
|||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div style="text-align: center; font-weight: bold;">
|
<div style="text-align: center; font-weight: bold;">
|
||||||
{{ $company }}
|
{{ $company }}
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<p>{!! $greeting !!}</p>
|
<p>{!! $greeting !!}</p>
|
||||||
|
|
||||||
<table border="1" width="50%" cellpadding="6" cellspacing="0">
|
|
||||||
|
|
||||||
|
<table style="margin-left: 3%" border="1" width="30%" cellpadding="6" cellspacing="0">
|
||||||
<tr>
|
<tr>
|
||||||
<th width="30%">Title</th>
|
<th width="30%">Title</th>
|
||||||
<th width="40%">Details</th>
|
<th width="40%">Details</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>Requested DateTime</td>
|
<td>Requested Date Time</td>
|
||||||
<td>{{ $request->created_at->format('d-m-Y H:i:s') }}</td>
|
<td style="text-align: center;">{{ $request->created_at->format('d-m-Y H:i:s') }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>Plant</td>
|
<td>Plant Name</td>
|
||||||
<td>{{ $request->plant->name ?? $request->plant_id }}</td>
|
<td style="text-align: center;">{{ $request->plant->name ?? $request->plant_id }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>Item Code</td>
|
<td>Item Code</td>
|
||||||
<td>{{ $request->item->code ?? $request->code }}</td>
|
<td style="text-align: center;">{{ $request->item->code ?? $request->code }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>Job Number</td>
|
<td>Job Number</td>
|
||||||
<td>{{ $request->aufnr }}</td>
|
<td style="text-align: center;">{{ $request->aufnr }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Work Flow ID</td>
|
||||||
|
<td style="text-align: center;">{{ $request->work_flow_id }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
@if($approverNameFromMaster && $approverNameFromMaster->approver_type == 'Characteristic')
|
||||||
<table border="1" width="50%" cellpadding="6" cellspacing="0">
|
<table style="margin-left: 3%" border="1" width="50%" cellpadding="6" cellspacing="0">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Characteristics Name</th>
|
<th>Characteristics Name</th>
|
||||||
<th>SAP Value</th>
|
<th>SAP Value</th>
|
||||||
<th>Update Value</th>
|
<th>Update Value</th>
|
||||||
<th>WorkFlow ID</th>
|
{{-- <th>Work Flow ID</th> --}}
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@forelse ($tableData as $char)
|
@forelse ($tableData as $char)
|
||||||
<tr>
|
<tr>
|
||||||
{{-- <td>{{ $char['characteristic_name'] ?? '-' }}</td> --}}
|
{{-- <td>{{ $char['characteristic_name'] ?? '-' }}</td> --}}
|
||||||
<td>{{ strtoupper($char['characteristic_name'] ?? '-') }}</td>
|
<td style="text-align: center;">{{ strtoupper($char['characteristic_name'] ?? '-') }}</td>
|
||||||
<td>{{ $char['current_value'] ?? '-' }}</td>
|
<td style="text-align: center;">{{ $char['current_value'] ?? '-' }}</td>
|
||||||
<td>{{ $char['update_value'] ?? '-' }}</td>
|
<td style="text-align: center;">{{ $char['update_value'] ?? '-' }}</td>
|
||||||
<td>{{ $char['work_flow_id'] ?? '-' }}</td>
|
{{-- <td style="text-align: center;">{{ $char['work_flow_id'] ?? '-' }}</td> --}}
|
||||||
|
{{-- @if ($loop->first)
|
||||||
|
<td rowspan="{{ count($tableData) }} "style="text-align: center; vertical-align: middle;">
|
||||||
|
{{ $char['work_flow_id'] ?? '-' }}
|
||||||
|
</td>
|
||||||
|
@endif --}}
|
||||||
</tr>
|
</tr>
|
||||||
@empty
|
@empty
|
||||||
<tr>
|
<tr>
|
||||||
@@ -66,21 +68,117 @@
|
|||||||
@endforelse
|
@endforelse
|
||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
<table border="1" width="50%" cellpadding="6" cellspacing="0">
|
<table style="margin-left: 3%" border="1" width="30%" cellpadding="6" cellspacing="0">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Approver Name</th>
|
<th>Approver Name</th>
|
||||||
<th>Approve Status</th>
|
<th>Approve Status</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
@if($level == 2)
|
||||||
<td>{{ $approverName }}</td>
|
<tr>
|
||||||
<td style="text-align: center;">
|
<td style="text-align: center;">{{ $approverNameFromMaster->name1 }}</td>
|
||||||
<a href="{{ $approveUrl }}">Approve</a> |
|
<td style="text-align: center;">{{ ucfirst($pendingApprovers->approver_status1 ?? '-') }}</td>
|
||||||
<a href="{{ $holdUrl }}">Hold</a> |
|
</tr>
|
||||||
<a href="{{ $rejectUrl }}">Reject</a>
|
<tr>
|
||||||
</td>
|
<td style="text-align: center;">{{ $approverName }}</td>
|
||||||
</tr>
|
<td style="text-align: center;">
|
||||||
|
<a href="{{ $approveUrl }}" style="color: #28a745; font-weight: bold; text-decoration: underline;">Approve</a>
|
||||||
|
|
|
||||||
|
<a href="{{ $holdUrl }}" style="color: #FF8800; font-weight: bold; text-decoration: underline;">Hold</a>
|
||||||
|
|
|
||||||
|
<a href="{{ $rejectUrl }}" style="color: #dc3545; font-weight: bold; text-decoration: underline;">Reject</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@elseif ($level == 3)
|
||||||
|
<tr>
|
||||||
|
<td style="text-align: center;">{{ $approverNameFromMaster->name1 }}</td>
|
||||||
|
<td style="text-align: center;">{{ ucfirst($pendingApprovers->approver_status1 ?? '-') }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align: center;">{{ $approverNameFromMaster->name2 }}</td>
|
||||||
|
<td style="text-align: center;">{{ ucfirst($pendingApprovers->approver_status2 ?? '-') }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align: center;">{{ $approverName }}</td>
|
||||||
|
<td style="text-align: center;">
|
||||||
|
<a href="{{ $approveUrl }}" style="color: #28a745; font-weight: bold; text-decoration: underline;">Approve</a>
|
||||||
|
|
|
||||||
|
<a href="{{ $holdUrl }}" style="color: #FF8800; font-weight: bold; text-decoration: underline;">Hold</a>
|
||||||
|
|
|
||||||
|
<a href="{{ $rejectUrl }}" style="color: #dc3545; font-weight: bold; text-decoration: underline;">Reject</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@else
|
||||||
|
<tr>
|
||||||
|
<td style="text-align: center;">{{ $approverName }}</td>
|
||||||
|
<td style="text-align: center;">
|
||||||
|
<a href="{{ $approveUrl }}" style="color: #28a745; font-weight: bold; text-decoration: underline;">Approve</a>
|
||||||
|
|
|
||||||
|
<a href="{{ $holdUrl }}" style="color: #FF8800; font-weight: bold; text-decoration: underline;">Hold</a>
|
||||||
|
|
|
||||||
|
<a href="{{ $rejectUrl }}" style="color: #dc3545; font-weight: bold; text-decoration: underline;">Reject</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
@endif
|
||||||
</table>
|
</table>
|
||||||
|
@elseif($approverNameFromMaster && $approverNameFromMaster->approver_type == 'Quality')
|
||||||
|
<br>
|
||||||
|
<table style="margin-left: 3%" border="1" width="50%" cellpadding="6" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<th>Approver Name</th>
|
||||||
|
<th>Approve Status</th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
@if($level == 2)
|
||||||
|
<tr>
|
||||||
|
<td style="text-align: center;">{{ $approverNameFromMaster->name1 }}</td>
|
||||||
|
<td style="text-align: center;">{{ ucfirst($pendingApprovers->approver_status1 ?? '-') }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align: center;">{{ $approverName }}</td>
|
||||||
|
<td style="text-align: center;">
|
||||||
|
<a href="{{ $approveUrl }}" style="color: #28a745; font-weight: bold; text-decoration: underline;">Approve</a>
|
||||||
|
|
|
||||||
|
<a href="{{ $holdUrl }}" style="color: #FF8800; font-weight: bold; text-decoration: underline;">Hold</a>
|
||||||
|
|
|
||||||
|
<a href="{{ $rejectUrl }}" style="color: #dc3545; font-weight: bold; text-decoration: underline;">Reject</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@elseif ($level == 3)
|
||||||
|
<tr>
|
||||||
|
<td style="text-align: center;">{{ $approverNameFromMaster->name1 }}</td>
|
||||||
|
<td style="text-align: center;">{{ ucfirst($pendingApprovers->approver_status1 ?? '-') }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align: center;">{{ $approverNameFromMaster->name2 }}</td>
|
||||||
|
<td style="text-align: center;">{{ ucfirst($pendingApprovers->approver_status2 ?? '-') }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align: center;">{{ $approverName }}</td>
|
||||||
|
<td style="text-align: center;">
|
||||||
|
<a href="{{ $approveUrl }}" style="color: #28a745; font-weight: bold; text-decoration: underline;">Approve</a>
|
||||||
|
|
|
||||||
|
<a href="{{ $holdUrl }}" style="color: #FF8800; font-weight: bold; text-decoration: underline;">Hold</a>
|
||||||
|
|
|
||||||
|
<a href="{{ $rejectUrl }}" style="color: #dc3545; font-weight: bold; text-decoration: underline;">Reject</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@else
|
||||||
|
<tr>
|
||||||
|
<td style="text-align: center;">{{ $approverName }}</td>
|
||||||
|
<td style="text-align: center;">
|
||||||
|
<a href="{{ $approveUrl }}" style="color: #28a745; font-weight: bold; text-decoration: underline;">Approve</a>
|
||||||
|
|
|
||||||
|
<a href="{{ $holdUrl }}" style="color: #FF8800; font-weight: bold; text-decoration: underline;">Hold</a>
|
||||||
|
|
|
||||||
|
<a href="{{ $rejectUrl }}" style="color: #dc3545; font-weight: bold; text-decoration: underline;">Reject</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
@endif
|
||||||
|
</table>
|
||||||
|
@endif
|
||||||
|
|
||||||
<p>{!! $wishes !!}</p>
|
<p>{!! $wishes !!}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user