121 lines
4.5 KiB
PHP
121 lines
4.5 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
@include('layouts.shared/title-meta', ['title' => ($type_label ?? 'Contact') . ' Change Preview'])
|
|
@include('layouts.shared/head-css', ["mode" => $mode ?? '', "demo" => $demo ?? ''])
|
|
<style>
|
|
.contact-preview-shell {
|
|
max-width: 960px;
|
|
margin: 0 auto;
|
|
padding: 1rem 0.75rem 2rem;
|
|
}
|
|
.contact-preview-shell .card {
|
|
border: none;
|
|
box-shadow: 0 0 12px rgba(0, 0, 0, 0.06);
|
|
}
|
|
.status-badge {
|
|
font-size: 0.8rem;
|
|
text-transform: capitalize;
|
|
}
|
|
.detail-row {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: baseline;
|
|
gap: 0.35rem 0.5rem;
|
|
margin-bottom: 0.5rem;
|
|
line-height: 1.5;
|
|
}
|
|
.detail-label {
|
|
font-size: 0.8rem;
|
|
font-weight: 700;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.03em;
|
|
color: #495057;
|
|
flex: 0 0 auto;
|
|
white-space: nowrap;
|
|
}
|
|
.detail-value {
|
|
font-weight: 400;
|
|
color: #212529;
|
|
word-break: break-word;
|
|
flex: 1 1 auto;
|
|
}
|
|
.changes-table th {
|
|
background: #f8f9fa;
|
|
font-size: 0.85rem;
|
|
}
|
|
.changes-table td {
|
|
vertical-align: top;
|
|
word-break: break-word;
|
|
}
|
|
.old-value {
|
|
color: #842029;
|
|
}
|
|
.new-value {
|
|
color: #0f5132;
|
|
font-weight: 600;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body class="loading">
|
|
<div class="account-pages">
|
|
<div class="container-fluid contact-preview-shell">
|
|
<div class="card">
|
|
<div class="card-body p-4">
|
|
<div class="d-flex flex-wrap justify-content-between align-items-start gap-2 mb-3">
|
|
<div>
|
|
<h4 class="page-title mb-1">{{ $type_label ?? 'Contact' }} change preview</h4>
|
|
<p class="text-muted mb-0">
|
|
@if(!empty($approval->user_info->name))
|
|
Submitted by {{ $approval->user_info->name }}
|
|
@endif
|
|
</p>
|
|
</div>
|
|
<span class="badge bg-secondary status-badge">{{ $status_label }}</span>
|
|
</div>
|
|
|
|
<h5 class="mb-3">{{ $type_label ?? 'Contact' }} details</h5>
|
|
<div class="mb-4">
|
|
@foreach($basic_details as $detail)
|
|
@if(!empty($detail['value']))
|
|
<div class="detail-row">
|
|
<span class="detail-label">{{ $detail['label'] }}:</span>
|
|
<span class="detail-value">{{ $detail['value'] }}</span>
|
|
</div>
|
|
@endif
|
|
@endforeach
|
|
</div>
|
|
|
|
<h5 class="mb-3">Changed attributes</h5>
|
|
@if(count($changes) > 0)
|
|
<div class="table-responsive">
|
|
<table class="table table-bordered changes-table mb-0">
|
|
<thead>
|
|
<tr>
|
|
<th style="width: 28%;">Attribute</th>
|
|
<th style="width: 36%;">Before</th>
|
|
<th style="width: 36%;">After</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($changes as $change)
|
|
<tr>
|
|
<td>{{ $change->label ?? $change->code }}</td>
|
|
<td class="old-value">{{ $change->old_value !== '' ? $change->old_value : '—' }}</td>
|
|
<td class="new-value">{{ $change->new_value !== '' ? $change->new_value : '—' }}</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
@else
|
|
<p class="text-muted mb-0">No attribute changes found for this approval request.</p>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@include('layouts.shared/footer-script')
|
|
</body>
|
|
</html>
|