diff --git a/app/Livewire/Add-Buttons b/app/Livewire/Add-Buttons new file mode 100644 index 0000000..e69de29 diff --git a/app/Livewire/Buttons/CreateBranch.php b/app/Livewire/Buttons/CreateBranch.php new file mode 100644 index 0000000..480791c --- /dev/null +++ b/app/Livewire/Buttons/CreateBranch.php @@ -0,0 +1,22 @@ +to('/main/station-locator/branch'); + } + + public function cancel() + { + return redirect()->to('/main/station-locator/branch'); + } + public function render() + { + return view('livewire.buttons.create-branch'); + } +} diff --git a/app/Livewire/Buttons/CreateCardType.php b/app/Livewire/Buttons/CreateCardType.php new file mode 100644 index 0000000..cb36141 --- /dev/null +++ b/app/Livewire/Buttons/CreateCardType.php @@ -0,0 +1,28 @@ +to('/main/about-us/card-type'); + } + + public function cancel() + { + return redirect()->to('/main/about-us/card-type'); + } + public function render() + { + return view('livewire.buttons.create-card-type'); + } +} diff --git a/app/Livewire/Buttons/CreateFuel.php b/app/Livewire/Buttons/CreateFuel.php new file mode 100644 index 0000000..c7c8da1 --- /dev/null +++ b/app/Livewire/Buttons/CreateFuel.php @@ -0,0 +1,22 @@ +to('/main/station-locator/fuel'); + } + + public function cancel() + { + return redirect()->to('/main/station-locator/fuel'); + } + public function render() + { + return view('livewire..buttons.create-fuel'); + } +} diff --git a/app/Livewire/Buttons/CreateNotification.php b/app/Livewire/Buttons/CreateNotification.php new file mode 100644 index 0000000..80ded15 --- /dev/null +++ b/app/Livewire/Buttons/CreateNotification.php @@ -0,0 +1,23 @@ +to('/main/notification'); + } + + public function cancel() + { + return redirect()->to('/main/notification'); + } + + public function render() + { + return view('livewire.buttons.create-notification'); + } +} diff --git a/app/Livewire/Buttons/CreatePhotoSlider.php b/app/Livewire/Buttons/CreatePhotoSlider.php new file mode 100644 index 0000000..06cda62 --- /dev/null +++ b/app/Livewire/Buttons/CreatePhotoSlider.php @@ -0,0 +1,28 @@ +to('/main/home-page-mobile/photo-slider'); + } + + public function cancel() + { + return redirect()->to('/main/home-page-mobile/photo-slider'); + } + + public function render() + { + return view('livewire..buttons.create-photo-slider'); + } +} diff --git a/app/Livewire/Buttons/CreatePromotion.php b/app/Livewire/Buttons/CreatePromotion.php new file mode 100644 index 0000000..58d86d5 --- /dev/null +++ b/app/Livewire/Buttons/CreatePromotion.php @@ -0,0 +1,27 @@ +to('/main/home-promotion/promotion'); + } + + public function cancel() + { + return redirect()->to('/main/home-promotion/promotion'); + } + public function render() + { + return view('livewire..buttons.create-promotion'); + } +} diff --git a/app/Livewire/Buttons/CreateStation.php b/app/Livewire/Buttons/CreateStation.php new file mode 100644 index 0000000..f0b968d --- /dev/null +++ b/app/Livewire/Buttons/CreateStation.php @@ -0,0 +1,28 @@ +to('/main/station-locator/station'); + } + + public function cancel() + { + return redirect()->to('/main/station-locator/station'); + } + + public function render() + { + return view('livewire..buttons.create-station'); + } +} diff --git a/app/Livewire/Buttons/CreateTermsAndPrivacy.php b/app/Livewire/Buttons/CreateTermsAndPrivacy.php new file mode 100644 index 0000000..fece16d --- /dev/null +++ b/app/Livewire/Buttons/CreateTermsAndPrivacy.php @@ -0,0 +1,23 @@ +to('/main/about-us/terms-and-privacy'); + } + + public function cancel() + { + return redirect()->to('/main/about-us/terms-and-privacy'); + } + + public function render() + { + return view('livewire.buttons.create-terms-and-privacy'); + } +} diff --git a/app/Livewire/Buttons/CreateTopUp.php b/app/Livewire/Buttons/CreateTopUp.php new file mode 100644 index 0000000..2f4e763 --- /dev/null +++ b/app/Livewire/Buttons/CreateTopUp.php @@ -0,0 +1,22 @@ +to('/main/top-up/top-up'); + } + + public function cancel() + { + return redirect()->to('/main/top-up/top-up'); + } + public function render() + { + return view('livewire..buttons.create-top-up'); + } +} diff --git a/app/Livewire/Buttons/CreateUser.php b/app/Livewire/Buttons/CreateUser.php new file mode 100644 index 0000000..c748bad --- /dev/null +++ b/app/Livewire/Buttons/CreateUser.php @@ -0,0 +1,32 @@ +default_password = bin2hex(random_bytes(4)); + } + + public function submit() + { + return redirect()->to('/main/user-management'); + } + + public function cancel() + { + return redirect()->to('/main/user-management'); + } + + public function render() + { + return view('livewire.buttons.create-user'); + } +} + + diff --git a/app/Livewire/Components/Table.php b/app/Livewire/Components/Table.php index e383995..80c04c1 100644 --- a/app/Livewire/Components/Table.php +++ b/app/Livewire/Components/Table.php @@ -9,6 +9,8 @@ class Table extends Component public $columns = []; public $rows = []; public $selected = []; + public $addRoute = null; + public $hasAddButton = true; public $selectAll = false; public $hasCheckbox = true; public $hasActions = false; @@ -17,10 +19,12 @@ class Table extends Component public $sortField = null; // Column to sort public $sortDirection = 'asc'; // Default sort direction - public function mount($columns, $rows) + + public function mount($columns, $rows, $addRoute = null) { $this->columns = $columns; $this->rows = $rows; + $this->addRoute = $addRoute; } // Update rows based on search diff --git a/resources/views/livewire/about-us/card-type.blade.php b/resources/views/livewire/about-us/card-type.blade.php index 821216e..e8ba704 100644 --- a/resources/views/livewire/about-us/card-type.blade.php +++ b/resources/views/livewire/about-us/card-type.blade.php @@ -9,5 +9,6 @@ :rows="$cardTypes" :hasActions="true" :isViewPage="false" + :addRoute="route('card-type-create')" /> diff --git a/resources/views/livewire/about-us/terms-and-privacy.blade.php b/resources/views/livewire/about-us/terms-and-privacy.blade.php index 09a120f..a21bc16 100644 --- a/resources/views/livewire/about-us/terms-and-privacy.blade.php +++ b/resources/views/livewire/about-us/terms-and-privacy.blade.php @@ -11,5 +11,6 @@ :rows="$termsAndPrivacy" :hasActions="true" :isViewPage="false" + :addRoute="route('terms-and-privacy-create')" /> diff --git a/resources/views/livewire/buttons/create-branch.blade.php b/resources/views/livewire/buttons/create-branch.blade.php new file mode 100644 index 0000000..f2e7a92 --- /dev/null +++ b/resources/views/livewire/buttons/create-branch.blade.php @@ -0,0 +1,55 @@ + +
Preview:
+Preview:
+Preview:
+Preview:
+Preview:
+@@ -21,15 +27,14 @@ @foreach ($columns as $column) | {{ $column['label'] }} - @if ($sortField === $column['field']) @if ($sortDirection === 'asc') - ↑ + ↑ @else - ↓ + ↓ @endif @else - ↕ + ↕ @endif | @endforeach @@ -42,7 +47,6 @@
---|---|
diff --git a/resources/views/livewire/main-content-manager.blade.php b/resources/views/livewire/main-content-manager.blade.php
index fb1021f..ca0142e 100644
--- a/resources/views/livewire/main-content-manager.blade.php
+++ b/resources/views/livewire/main-content-manager.blade.php
@@ -81,8 +81,47 @@
@case('fuel')
-
- ![]()
+
+
-
+
![]() |