From 79237868cbafac0f1001316fff11c686dbab8668 Mon Sep 17 00:00:00 2001 From: Deon George Date: Wed, 24 Jul 2024 17:45:32 +1000 Subject: [PATCH] Moved service.widget.status to a component --- resources/views/components/button/status.blade.php | 6 ++++++ .../backend/adminlte/service/widget/status.blade.php | 12 ------------ 2 files changed, 6 insertions(+), 12 deletions(-) create mode 100644 resources/views/components/button/status.blade.php delete mode 100644 resources/views/theme/backend/adminlte/service/widget/status.blade.php diff --git a/resources/views/components/button/status.blade.php b/resources/views/components/button/status.blade.php new file mode 100644 index 0000000..881c624 --- /dev/null +++ b/resources/views/components/button/status.blade.php @@ -0,0 +1,6 @@ +class([ + 'badge', + 'badge-success'=>($status === 'active'), + 'badge-warning'=>($status === 'inactive'), + 'badge-danger'=>($status === 'cancelled'), + ])->except(['status','substatus']) }}>{{ $slot->isNotEmpty() ? $slot : strtoupper($status) }} @if($slot->isEmpty() && (! in_array($status,['active','cancelled'])) && isset($substatus) && $substatus)[{{ strtoupper($substatus) }}] @endif \ No newline at end of file diff --git a/resources/views/theme/backend/adminlte/service/widget/status.blade.php b/resources/views/theme/backend/adminlte/service/widget/status.blade.php deleted file mode 100644 index c3cc41c..0000000 --- a/resources/views/theme/backend/adminlte/service/widget/status.blade.php +++ /dev/null @@ -1,12 +0,0 @@ - -{{ $o->status }} \ No newline at end of file