From 9c11f4b04d960b00c0f809093303e6848494b8c4 Mon Sep 17 00:00:00 2001 From: Perla Date: Thu, 29 Jul 2021 13:27:13 -0400 Subject: [PATCH] updating table names --- .../{bootstrap => datatable}/counter-option.blade.php | 0 .../{bootstrap => datatable}/extra-options.blade.php | 0 .../lastrecord-option.blade.php | 0 .../views/{bootstrap => datatable}/main.blade.php | 10 +++++----- .../views/{bootstrap => datatable}/sort-icon.blade.php | 0 .../{bootstrap => datatable}/status-option.blade.php | 0 src/DatatableServiceProvider.php | 2 +- src/Http/Livewire/Main.php | 2 +- 8 files changed, 7 insertions(+), 7 deletions(-) rename resources/views/{bootstrap => datatable}/counter-option.blade.php (100%) rename resources/views/{bootstrap => datatable}/extra-options.blade.php (100%) rename resources/views/{bootstrap => datatable}/lastrecord-option.blade.php (100%) rename resources/views/{bootstrap => datatable}/main.blade.php (89%) rename resources/views/{bootstrap => datatable}/sort-icon.blade.php (100%) rename resources/views/{bootstrap => datatable}/status-option.blade.php (100%) diff --git a/resources/views/bootstrap/counter-option.blade.php b/resources/views/datatable/counter-option.blade.php similarity index 100% rename from resources/views/bootstrap/counter-option.blade.php rename to resources/views/datatable/counter-option.blade.php diff --git a/resources/views/bootstrap/extra-options.blade.php b/resources/views/datatable/extra-options.blade.php similarity index 100% rename from resources/views/bootstrap/extra-options.blade.php rename to resources/views/datatable/extra-options.blade.php diff --git a/resources/views/bootstrap/lastrecord-option.blade.php b/resources/views/datatable/lastrecord-option.blade.php similarity index 100% rename from resources/views/bootstrap/lastrecord-option.blade.php rename to resources/views/datatable/lastrecord-option.blade.php diff --git a/resources/views/bootstrap/main.blade.php b/resources/views/datatable/main.blade.php similarity index 89% rename from resources/views/bootstrap/main.blade.php rename to resources/views/datatable/main.blade.php index e87a9a3..213e74e 100644 --- a/resources/views/bootstrap/main.blade.php +++ b/resources/views/datatable/main.blade.php @@ -54,7 +54,7 @@ @foreach($Data as $itemKey => $itemName) {{$itemName['columnName']}} - @include('datatable::sort-icon', ['field'=> $itemKey]) + @include('main::sort-icon', ['field'=> $itemKey]) @endforeach @@ -91,18 +91,18 @@ @elseif ($itemName['type'] == 'number') {{number_format((float)$val,2,'.',"'")}} @elseif ($itemName['type'] == 'counter') - @include('datatable::counter-option', ['id' => $item->id]) + @include('main::counter-option', ['id' => $item->id]) @elseif ($itemName['type'] == 'lastRecord') - @include('datatable.lastrecord-option', ['id' => $item->id]) + @include('main.lastrecord-option', ['id' => $item->id]) @elseif ($itemName['type'] == 'disable') - @include('datatable::status-option', ['optionKey' => $itemKey, 'itemValue' => $item->$itemKey, 'event' => $itemName['event'], 'id'=> $item->id]) + @include('main::status-option', ['optionKey' => $itemKey, 'itemValue' => $item->$itemKey, 'event' => $itemName['event'], 'id'=> $item->id]) @endif @endforeach @if($showOptions) - @include('datatable::extra-options', ['id'=> $item->id]) + @include('main::extra-options', ['id'=> $item->id]) @endif diff --git a/resources/views/bootstrap/sort-icon.blade.php b/resources/views/datatable/sort-icon.blade.php similarity index 100% rename from resources/views/bootstrap/sort-icon.blade.php rename to resources/views/datatable/sort-icon.blade.php diff --git a/resources/views/bootstrap/status-option.blade.php b/resources/views/datatable/status-option.blade.php similarity index 100% rename from resources/views/bootstrap/status-option.blade.php rename to resources/views/datatable/status-option.blade.php diff --git a/src/DatatableServiceProvider.php b/src/DatatableServiceProvider.php index e3dc05d..6294c4b 100644 --- a/src/DatatableServiceProvider.php +++ b/src/DatatableServiceProvider.php @@ -16,7 +16,7 @@ public function boot() Livewire::component('main', Main::class); - $this->loadViewsFrom(__DIR__.'/../resources/views/bootstrap', 'datatable'); + $this->loadViewsFrom(__DIR__.'/../resources/views/datatable', 'table'); } diff --git a/src/Http/Livewire/Main.php b/src/Http/Livewire/Main.php index d50a155..41cc35d 100644 --- a/src/Http/Livewire/Main.php +++ b/src/Http/Livewire/Main.php @@ -266,7 +266,7 @@ public function render() $paginator = new LengthAwarePaginator($items, $collection->count(), $perPage, $this->page); - return view('datatable::main', ['dataResult' => $paginator] ); + return view('main::table', ['dataResult' => $paginator] ); } }