From c921660d7720424aa8ed86eae2d001777228332b Mon Sep 17 00:00:00 2001 From: armiejean Date: Wed, 16 Apr 2025 14:52:40 +0800 Subject: [PATCH] added branches and add-branches pages --- resources/views/pages/add-branches.blade.php | 83 ++++++++++++++ .../pages/station locator/branches.blade.php | 104 ++++++++++++++++-- routes/web.php | 6 +- 3 files changed, 182 insertions(+), 11 deletions(-) create mode 100644 resources/views/pages/add-branches.blade.php diff --git a/resources/views/pages/add-branches.blade.php b/resources/views/pages/add-branches.blade.php new file mode 100644 index 0000000..5200113 --- /dev/null +++ b/resources/views/pages/add-branches.blade.php @@ -0,0 +1,83 @@ +@extends('layouts.app') + +@section('page_title', 'Add Branch') + +@section('content') +
+
Add Branch
+
+
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ + + + +@endsection \ No newline at end of file diff --git a/resources/views/pages/station locator/branches.blade.php b/resources/views/pages/station locator/branches.blade.php index a31a5bb..94e7d93 100644 --- a/resources/views/pages/station locator/branches.blade.php +++ b/resources/views/pages/station locator/branches.blade.php @@ -1,14 +1,98 @@ @extends('layouts.app') -@section('page_title', 'Station Locator') +@section('page_title', 'Branches') @section('content') -
-
- Branches -
-
-

This is the Branches page content.

-
-
-@endsection + @php + $branches = [ + [ + 'id' => 1, + 'branchCode' => 'BR001', + 'branchName' => 'Main Branch', + 'details' => 'Located at downtown, open 9 AM to 5 PM.', + 'dateCreated' => '2025-01-01', + 'createdBy' => 'Admin', + 'dateModified' => '2025-04-01' + ], + [ + 'id' => 2, + 'branchCode' => 'BR002', + 'branchName' => 'Westside Branch', + 'details' => 'Serves western district, parking available.', + 'dateCreated' => '2025-02-01', + 'createdBy' => 'Admin', + 'dateModified' => '2025-04-10' + ], + [ + 'id' => 3, + 'branchCode' => 'BR003', + 'branchName' => 'East End Branch', + 'details' => 'Newly opened, extended hours.', + 'dateCreated' => '2025-03-01', + 'createdBy' => 'Admin', + 'dateModified' => '2025-03-01' + ], + [ + 'id' => 4, + 'branchCode' => 'BR004', + 'branchName' => 'North Branch', + 'details' => 'Located near industrial area.', + 'dateCreated' => '2025-01-15', + 'createdBy' => 'Admin', + 'dateModified' => '2025-04-05' + ], + [ + 'id' => 5, + 'branchCode' => 'BR005', + 'branchName' => 'South Branch', + 'details' => 'Family-friendly, open weekends.', + 'dateCreated' => '2025-02-15', + 'createdBy' => 'Admin', + 'dateModified' => '2025-02-15' + ], + [ + 'id' => 6, + 'branchCode' => 'BR006', + 'branchName' => 'Central Branch', + 'details' => 'Central location, 24/7 ATM.', + 'dateCreated' => '2025-03-15', + 'createdBy' => 'Admin', + 'dateModified' => '2025-04-12' + ] + ]; + @endphp + + @include('components.table-component', [ + 'pageTitle' => 'Branches', + 'data' => $branches, + 'columns' => [ + ['name' => 'Branch Code', 'key' => 'branchCode', 'sortable' => true], + ['name' => 'Branch Name', 'key' => 'branchName', 'sortable' => true], + ['name' => 'Details', 'key' => 'details', 'sortable' => true], + ['name' => 'Date Created', 'key' => 'dateCreated', 'sortable' => true], + ['name' => 'Created By', 'key' => 'createdBy', 'sortable' => true], + ['name' => 'Date Modified', 'key' => 'dateModified', 'sortable' => true] + ], + 'allFields' => [ + ['name' => 'Branch Code', 'key' => 'branchCode', 'type' => 'text', 'required' => true], + ['name' => 'Branch Name', 'key' => 'branchName', 'type' => 'text', 'required' => true], + ['name' => 'Details', 'key' => 'details', 'type' => 'textarea', 'required' => true] + ], + 'actions' => ['edit', 'delete'], + 'showAddButton' => true, + 'addButtonUrl' => '/add-branches', + 'showCheckboxes' => false, + 'showBatchDelete' => false, + 'showEditModal' => true, + 'showViewModal' => false + ]) + + +@endsection \ No newline at end of file diff --git a/routes/web.php b/routes/web.php index 3d4a716..22f5882 100644 --- a/routes/web.php +++ b/routes/web.php @@ -118,4 +118,8 @@ Route::get('/add-card-types', function () { Route::get('/add-terms-and-privacy', function () { return view('pages.add-terms-and-privacy'); -})->name('add-terms-and-privacy'); \ No newline at end of file +})->name('add-terms-and-privacy'); + +Route::get('/add-branches', function () { + return view('pages.add-branches'); +})->name('add-branches'); \ No newline at end of file