partial update create mutations workflow
This commit is contained in:
@@ -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">';
|
||||
|
||||
Reference in New Issue
Block a user