Added all blade files of approval mails #262

Merged
jothi merged 1 commits from ranjith-dev into master 2026-01-28 09:58:56 +00:00
6 changed files with 430 additions and 0 deletions

View File

@@ -0,0 +1,91 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Action Already Taken</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f6f8;
margin: 0;
padding: 0;
}
.container {
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
.card {
background: #ffffff;
width: 420px;
padding: 30px;
border-radius: 8px;
text-align: center;
box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}
.icon {
font-size: 50px;
margin-bottom: 10px;
color: #ff9800;
}
h2 {
margin: 10px 0;
color: #333;
}
.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: 14px;
color: #666;
}
</style>
</head>
<body>
<div class="container">
<div class="card">
<div class="icon">⚠️</div>
<h2>Action Already Taken</h2>
<div class="status {{ $status }}">
Status: {{ $status }}
</div>
<p class="note">
This request has already been processed.<br>
No further action is required.
</p>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,98 @@
<!DOCTYPE html>
<html>
<head>
<title>Request On Hold</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: 40px;">🟠</div>
<h2 style="color: #FF8800; margin: 10px 0 20px; font-size: 24px;">Request On Hold</h2>
<!-- Message -->
<p style="font-size: 16px; color: #555555; line-height: 1.5;">
Your request has been temporarily put on hold.
</p>
<!-- Remark Textbox -->
<div style="margin-top: 20px; text-align: left;">
<label for="remark" style="font-size: 14px; color: #333;">Remark <span style="color:red;">*</span></label>
<textarea id="remark" style="width:100%; height:100px; padding:10px; margin-top:5px; border:1px solid #ddd; border-radius:5px;"></textarea>
<div id="remarkError" style="color:red; font-size:12px; display:none; margin-top:5px;">
Remark is mandatory.
</div>
</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>
&copy; 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/hold-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('Hold saved successfully!');
window.location.href = "/approval/hold-success";
})
.catch(err => {
console.error(err);
alert('Error saving hold!');
});
}
</script>
</body>
</html>

View File

@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html>
<head>
<title>Request On Hold</title>
</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: 40px;">🟠</div>
<h2 style="color: #FF8800; margin: 10px 0 20px; font-size: 24px;">Request On Hold</h2>
<!-- Message -->
<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>
&copy; 2026 All Rights Reserved
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,98 @@
<!DOCTYPE html>
<html>
<head>
<title>Request On Reject</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: 40px;">🟠</div>
<h2 style="color: #FF0000; margin: 10px 0 20px; font-size: 24px;">Request On Reject</h2>
<!-- Message -->
<p style="font-size: 16px; color: #555555; line-height: 1.5;">
Your request has been temporarily put on reject.
</p>
<!-- Remark Textbox -->
<div style="margin-top: 20px; text-align: left;">
<label for="remark" style="font-size: 14px; color: #333;">Remark <span style="color:red;">*</span></label>
<textarea id="remark" style="width:100%; height:100px; padding:10px; margin-top:5px; border:1px solid #ddd; border-radius:5px;"></textarea>
<div id="remarkError" style="color:red; font-size:12px; display:none; margin-top:5px;">
Remark is mandatory.
</div>
</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>
&copy; 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/reject-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('Reject saved successfully!');
window.location.href = "/approval/reject-success";
})
.catch(err => {
console.error(err);
alert('Error saving reject!');
});
}
</script>
</body>
</html>

View File

@@ -0,0 +1,59 @@
<!DOCTYPE html>
<html>
<head>
<title>Rejected</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);
}
.rejected {
color: red;
font-size: 20px;
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: red;
color: #ffffff;
text-decoration: none;
border-radius: 5px;
font-weight: bold;
}
</style>
</head>
<body>
<div class="card">
<div class="rejected"> Rejected Successfully</div>
<p>The rejection has been recorded.</p>
<p>You may now close this tab.</p>
<!-- Footer -->
<div class="footer">
CRI Digital Manufacturing Solutions<br>
&copy; 2026 All Rights Reserved
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,48 @@
<!DOCTYPE html>
<html>
<head>
<title>Approval Recorded</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;
}
</style>
</head>
<body>
<div class="card">
<div class="success"> Approval Successful</div>
<p>Your action has been recorded.</p>
<p>You may now close this tab.</p>
<!-- Footer -->
<div class="footer">
CRI Digital Manufacturing Solutions<br>
&copy; 2026 All Rights Reserved
</div>
</div>
</body>
</html>