@@ -79,9 +80,9 @@
@@ -95,7 +96,7 @@
@endif
- @include('components.err')
+
{{-- list side bar end--}}
@@ -132,103 +133,120 @@
- @foreach($items as $item)
+ @if(count($items) == 0)
-
-
-
+ |
+ {{__("There is nothing to show!")}}
|
- @foreach($cols as $k => $col)
- @if($k == 0 && hasRoute('edit'))
-
-
-
- {{$item->name}}
-
-
- |
- @else
-
- {{$item->$col}}
- |
- @endif
- @endforeach
- @yield('table-body')
-
+ |
+ @else
+ @foreach($items as $item)
+
+
+
+
+ |
+ @foreach($cols as $k => $col)
+ @if($k == 0 && hasRoute('edit'))
+
+
+
+ {{$item->name}}
+
+
+ |
+ @else
+
+ @switch($col)
+ @case($col == 'parent_id')
+ {{ $item->parent?->{$cols[0]}??'-' }}
+ @break
+ @default
+ {{$item->$col}}
+ @endswitch
+ |
+ @endif
+ @endforeach
+ @yield('table-body')
+
- @if(strpos(request()->url(),'trashed') != false && hasRoute('restore'))
-
-
-
- @else
+ @if(strpos(request()->url(),'trashed') != false && hasRoute('restore'))
+
+
+
+ @else
- |
-
- @endforeach
+ @endforeach
+
+
+
+
+ @endforeach
+ @endif
+
diff --git a/resources/views/admin/users/user-form.blade.php b/resources/views/admin/users/user-form.blade.php
index ff5c0f3..46227e1 100644
--- a/resources/views/admin/users/user-form.blade.php
+++ b/resources/views/admin/users/user-form.blade.php
@@ -11,6 +11,8 @@
+ @include('components.err')
+
{{__("Tips")}}
@@ -25,7 +27,6 @@
- @include('components.err')