partial update create mutations workflow

This commit is contained in:
2025-06-12 15:10:51 +07:00
parent a5e1348436
commit 1a01efb1b5
33 changed files with 560 additions and 12994 deletions

View File

@@ -39,14 +39,25 @@ class OpnamesController extends Controller
return Carbon::parse($row->created_at)->format('d M Y H:i');
})
->editColumn('status', function ($row) {
$statusClass = [
$statusColor = [
'draft' => 'warning',
'pending' => 'info',
'approved' => 'success',
'rejected' => 'danger'
][$row->status] ?? 'secondary';
return '<span class="badge badge-' . $statusClass . '">' . ucfirst($row->status) . '</span>';
$textColorClass = match($statusColor) {
'success' => 'text-success',
'warning' => 'text-warning',
'danger' => 'text-danger',
'info' => 'text-info',
'primary' => 'text-primary',
'brand' => 'text-primary',
'secondary' => 'text-muted',
default => 'text-dark'
};
return "<span class=\"font-weight-bold {$textColorClass}\">" . ucfirst($row->status) . "</span>";
})
->addColumn('action', function ($row) use ($menu) {
$btn = '<div class="d-flex">';