From 01ae78f0df16aa706900ffceb17a4091381d9d9d Mon Sep 17 00:00:00 2001 From: rookiextreme <90501419+rookiextreme@users.noreply.github.com> Date: Thu, 15 Sep 2022 15:28:43 +0800 Subject: [PATCH] main module done --- .../Bilik/AdminTempahanBilikController.php | 100 +++ .../Segment/Dashboard/DashboardController.php | 14 + .../Tempahan/TempahanBilikController.php | 2 +- app/Models/Tempahan/TempahanBilik.php | 2 +- .../admin/tempahan/bilik/controller.js | 56 ++ .../segment/admin/tempahan/bilik/main.js | 45 + .../segment/admin/tempahan/bilik/settings.js | 35 + .../pengguna/tempahan/bilik/settings.js | 19 +- .../segment/admin/bilik/modal/index.blade.php | 4 +- .../admin/tempahan/bilik/index.blade.php | 71 ++ .../tempahan/bilik/modal/index.blade.php | 68 ++ .../tetapan/bangunan/modal/index.blade.php | 4 +- .../tetapan/fasiliti/modal/index.blade.php | 4 +- .../tetapan/lokasi/modal/index.blade.php | 4 +- .../views/segment/dashboard/index.blade.php | 843 +++--------------- .../calendar/css/index.blade.php | 2 + .../calendar/js/index.blade.php | 2 + .../views/segment/layouts/main.blade.php | 4 +- .../views/segment/layouts/menu.blade.php | 26 +- .../tempahan/bilik/modal/index.blade.php | 4 +- routes/web.php | 12 +- 21 files changed, 569 insertions(+), 752 deletions(-) create mode 100644 app/Http/Controllers/Segment/Admin/Tempahan/Bilik/AdminTempahanBilikController.php create mode 100644 public/app_js_helper/segment/admin/tempahan/bilik/controller.js create mode 100644 public/app_js_helper/segment/admin/tempahan/bilik/main.js create mode 100644 public/app_js_helper/segment/admin/tempahan/bilik/settings.js create mode 100644 resources/views/segment/admin/tempahan/bilik/index.blade.php create mode 100644 resources/views/segment/admin/tempahan/bilik/modal/index.blade.php create mode 100644 resources/views/segment/layouts/custom_view_links/calendar/css/index.blade.php create mode 100644 resources/views/segment/layouts/custom_view_links/calendar/js/index.blade.php diff --git a/app/Http/Controllers/Segment/Admin/Tempahan/Bilik/AdminTempahanBilikController.php b/app/Http/Controllers/Segment/Admin/Tempahan/Bilik/AdminTempahanBilikController.php new file mode 100644 index 0000000..101c742 --- /dev/null +++ b/app/Http/Controllers/Segment/Admin/Tempahan/Bilik/AdminTempahanBilikController.php @@ -0,0 +1,100 @@ +middleware('auth'); + } + + public function index(){ + return view('segment.admin.tempahan.bilik.index'); + } + + public function getTempahanBilikList(){ + $model = TempahanBilik::where('delete_id', 0); + + return DataTables::of($model) + ->setRowAttr([ + 'data-tempahan-id' => function($data) { + return $data->id; + }, + ]) + ->addColumn('nama', function($data){ + return $data->tempahanBilik->nama.'
'.$data->tempahanBilik->kapasiti.' orang
Aras '.$data->tempahanBilik->aras.'
Bangunan '.$data->tempahanBilik->bilikBangunan->bangunanLokasi->nama.'('.$data->tempahanBilik->bilikBangunan->nama.')' ; + }) + ->addColumn('maklumat', function($data){ + $getUrusetia = ListPegawai2::getMaklumatPegawai($data->nokp_urusetia); + return 'Tujuan: '.$data->nama.'
Urusetia: '.$getUrusetia['name'].'
Pengerusi: '.$data->pengerusi; + }) + ->addColumn('tempoh', function($data){ + return 'Dari: '.date('d-m-Y H:i', strtotime($data->masa_mula)).'
Hingga: '.date('d-m-Y H:i', strtotime($data->masa_tamat)); + }) + ->addColumn('status', function($data){ + $label = ''; + if($data->status == 0){ + $label = 'Belum Lulus'; + }else if($data->status == 1){ + $label = 'Lulus'; + } + else if($data->status == 2){ + $label = 'Tidak Lulus'; + } + return $label; + }) + ->addColumn('action', function($data){ + }) + ->rawColumns(['action', 'nama', 'maklumat', 'tempoh', 'status']) + ->make(true); + } + + public function getTempahanBilik(Request $request){ + $id = $request->input('id'); + $model = TempahanBilik::find($id); + + $data = []; + $data['tempahan'] = [ + 'tempahan' => date('d-m-Y H:i', strtotime($model->created_at)), + 'masa_mula' => date('d-m-Y H:i', strtotime($model->masa_mula)), + 'masa_tamat' => date('d-m-Y H:i', strtotime($model->masa_tamat)), + 'bilik' => $model->tempahanBilik->nama + ]; + + $getUrusetia = ListPegawai2::getMaklumatPegawai($model->nokp_urusetia); + $data['maklumat'] = [ + 'nama' => $model->nama, + 'urusetia' => $getUrusetia['name'], + 'pengerusi' => $model->pengerusi, + 'bil_agensi_d' => $model->bil_agensi_d, + 'bil_agensi_l' => $model->bil_agensi_l, + 'nota' => $model->nota + ]; + + return response()->json([ + 'success' => 1, + 'data' => $data + ]); + } + + public function lulusTempahanBilik(Request $request){ + $status = $request->input('status'); + $id = $request->input('id'); + + $model = CommonController::getModel(TempahanBilik::class, 1, $id); + $model->status = $status; + $model->save(); + + return response()->json([ + 'success' => 1, + 'data' => $status + ]); + } +} diff --git a/app/Http/Controllers/Segment/Dashboard/DashboardController.php b/app/Http/Controllers/Segment/Dashboard/DashboardController.php index 2ed4b72..2af77bb 100644 --- a/app/Http/Controllers/Segment/Dashboard/DashboardController.php +++ b/app/Http/Controllers/Segment/Dashboard/DashboardController.php @@ -2,6 +2,9 @@ namespace App\Http\Controllers\Segment\Dashboard; use App\Http\Controllers\Controller; +use App\Models\Tempahan\TempahanBilik; +use Illuminate\Http\Request; +use Illuminate\Support\Facades\DB; class DashboardController extends Controller{ public function __construct() @@ -12,4 +15,15 @@ public function __construct() public function index(){ return view('segment.dashboard.index'); } + + public function getEvents(Request $request){ + $model = DB::select(DB::raw("SELECT CONCAT(j.nama, ', ', bb.nama , ', Bangunan ', b.nama, ', ', l.nama) as title, DATE(j.masa_mula) as start, DATE(j.masa_tamat) as end from tempahan_biliks j + join bangunan_biliks bb on j.bangunan_biliks_id = bb.id + join bangunans b on b.id = bb.bangunans_id + join lokasis l on l.id = b.lokasis_id + where j.status = 1 + ")); + + return response()->json($model); + } } diff --git a/app/Http/Controllers/Segment/Pengguna/Tempahan/TempahanBilikController.php b/app/Http/Controllers/Segment/Pengguna/Tempahan/TempahanBilikController.php index ee07220..40af945 100644 --- a/app/Http/Controllers/Segment/Pengguna/Tempahan/TempahanBilikController.php +++ b/app/Http/Controllers/Segment/Pengguna/Tempahan/TempahanBilikController.php @@ -70,7 +70,7 @@ public function getTempahanBilik(Request $request){ } public function deleteTempahanBilik(Request $request){ - CommonController::softDeleteRecord(BangunanBilik::class, $request->input('id')); + CommonController::softDeleteRecord(TempahanBilik::class, $request->input('id')); return response()->json([ 'success' => 1, ]); diff --git a/app/Models/Tempahan/TempahanBilik.php b/app/Models/Tempahan/TempahanBilik.php index c8e8c2f..cb95f6b 100644 --- a/app/Models/Tempahan/TempahanBilik.php +++ b/app/Models/Tempahan/TempahanBilik.php @@ -59,7 +59,7 @@ public static function storeUpdate(Request $request){ $model->nama = $v->tempahan_bilik_name; $model->masa_mula = date('Y-m-d H:i', strtotime($v->tempahan_masa_mula)); $model->masa_tamat = date('Y-m-d H:i', strtotime($v->tempahan_masa_tamat)); - $model->nokp_urusetia = 010202022; + $model->nokp_urusetia = $v->tempahan_bilik_urusetia; $model->tel_urusetia = $v->tempahan_bilik_notel_urusetia; $model->pengerusi = $v->tempahan_bilik_pengerusi; $model->bil_agensi_d = $v->tempahan_bilik_agensi; diff --git a/public/app_js_helper/segment/admin/tempahan/bilik/controller.js b/public/app_js_helper/segment/admin/tempahan/bilik/controller.js new file mode 100644 index 0000000..f8d1929 --- /dev/null +++ b/public/app_js_helper/segment/admin/tempahan/bilik/controller.js @@ -0,0 +1,56 @@ +class FasilitiController extends Ajax{ + static storeUpdateFasiliti({url, data, trigger}){ + this.runAjax({ + url : url, + data: data, + func: function(success){ + ToastAlert.toasting('Success', trigger == 0 ? 'Fasiliti Ditambah' : 'Fasiliti Dikemaskini', 'success'); + DatatableUI.reloadTable('.fasiliti-table'); + $('#fasiliti-modal').modal('hide'); + } + }); + } + + static deleteFasiliti({url, data}){ + SwalUI.init({ + title: 'Adakah Anda Pasti?', + subtitle: 'Fasiliti Akan Dipadam!', + icon: 'error', + confirmText: 'Delete', + confirmButtonClass: 'btn btn-danger', + callback: function (){ + Ajax.runAjax({ + url: url, + data: data, + func: function () { + SwalUI.fireSwal({ + icon: 'error', + title: 'Fasiliti Dipadam!', + subtitle: 'Tindakan Tidak Boleh Dipadam!' + }); + DatatableUI.reloadTable('.fasiliti-table'); + } + }); + } + }); + } + + static lulusTempahan({url, data}){ + this.runAjax({ + url : url, + data: data, + func: function(data){ + let status = data.data.status; + + if(status == 1){ + ToastAlert.toasting('Lulus', 'Tempahan Diluluskan', 'success'); + }else if(status == 2){ + ToastAlert.toasting('Tidak Lulus', 'Tempahan Dibatalkan', 'error'); + } + + DatatableUI.reloadTable('.tempahan-table'); + $('#tempahan-modal').modal('hide'); + } + }); + } +} diff --git a/public/app_js_helper/segment/admin/tempahan/bilik/main.js b/public/app_js_helper/segment/admin/tempahan/bilik/main.js new file mode 100644 index 0000000..4124da0 --- /dev/null +++ b/public/app_js_helper/segment/admin/tempahan/bilik/main.js @@ -0,0 +1,45 @@ +$(document).on('click', '.tempahan-edit', function(){ + let id = $(this).closest('tr').attr('data-tempahan-id'); + $('#tempahan-id').val(id); + ModalUI.modal({ + selector: '#tempahan-modal', + mode: 'show', + color: 'modal-warning', + label: 'Tempahan Bilik', + callback: function(){ + let v = Common.emptyRequest(); + v.append('id', id); + Ajax.runAjax({ + url: 'admin/tempahan/bilik/get-tempahan', + data: v, + func: function(data){ + $('#tempah-pada').html(data.data.tempahan.tempahan); + $('#tempah-masa-mula').html(data.data.tempahan.masa_mula); + $('#tempah-masa-tamat').html(data.data.tempahan.masa_tamat); + $('#tempah-nama-bilik').html(data.data.tempahan.bilik); + + $('#tempah-tujuan').html(data.data.maklumat.nama); + $('#tempah-urusetia').html(data.data.maklumat.urusetia); + $('#tempah-pengerusi').html(data.data.maklumat.pengerusi); + $('#tempah-agensi-d').html(data.data.maklumat.bil_agensi_d); + $('#tempah-agensi-l').html(data.data.maklumat.bil_agensi_l); + } + }); + } + }); +}); + +$(document).on('click', '#tempahan-edit', function(){ + let curThis = $(this); + let trigger = ''; + + let data = Common.emptyRequest(); + data.append('status', curThis.attr('data-status')); + data.append('id', $('#tempahan-id').val()); + + FasilitiController.lulusTempahan({ + url: 'admin/tempahan/bilik/lulus', + data: data, + trigger: trigger + }); +}); diff --git a/public/app_js_helper/segment/admin/tempahan/bilik/settings.js b/public/app_js_helper/segment/admin/tempahan/bilik/settings.js new file mode 100644 index 0000000..13188fc --- /dev/null +++ b/public/app_js_helper/segment/admin/tempahan/bilik/settings.js @@ -0,0 +1,35 @@ +DatatableUI.init({ + selector: '.tempahan-table', + columnList: [ + { data: 'nama' }, + { data: 'maklumat' }, + { data: 'tempoh' }, + { data: 'status' }, + { data: 'action' }, + ], + url: '/admin/tempahan/bilik/get-list', + columnDef: [ + { + // Actions + targets: -1, + title: 'Actions', + orderable: false, + render: function (data, type, full, meta) { + let activate = full.status; + + let val = ''; + if(activate !== 0){ + val = '-'; + }else{ + val = '
' + + '' + + '
'; + } + + + return val; + } + } + ], + label: 'List Lokasi' +}); diff --git a/public/app_js_helper/segment/pengguna/tempahan/bilik/settings.js b/public/app_js_helper/segment/pengguna/tempahan/bilik/settings.js index 987fa4c..a1c31aa 100644 --- a/public/app_js_helper/segment/pengguna/tempahan/bilik/settings.js +++ b/public/app_js_helper/segment/pengguna/tempahan/bilik/settings.js @@ -27,13 +27,20 @@ DatatableUI.init({ title: 'Tindakan', orderable: false, render: function (data, type, full, meta) { - let activate = full.flag; - let activateStat = activate == 0 ? 'btn-outline-danger' : 'btn-outline-success' + ''; - return ( - '
' + + let status = full.status; + + if(status === 0){ + return ( + '
' + '' + - '
' - ); + '
' + ); + }else{ + return ( + '-' + ); + } + } } ], diff --git a/resources/views/segment/admin/bilik/modal/index.blade.php b/resources/views/segment/admin/bilik/modal/index.blade.php index d7ffc3a..f49b13f 100644 --- a/resources/views/segment/admin/bilik/modal/index.blade.php +++ b/resources/views/segment/admin/bilik/modal/index.blade.php @@ -52,8 +52,8 @@ diff --git a/resources/views/segment/admin/tempahan/bilik/index.blade.php b/resources/views/segment/admin/tempahan/bilik/index.blade.php new file mode 100644 index 0000000..b827f7a --- /dev/null +++ b/resources/views/segment/admin/tempahan/bilik/index.blade.php @@ -0,0 +1,71 @@ +@extends('segment.layouts.main') + +@section('CSS') + @include('segment.layouts.custom_view_links.toast.css.index') + @include('segment.layouts.custom_view_links.datatable.css.index') + @include('segment.layouts.custom_view_links.swal.css.index') +@endsection + +@section('customCSS') +@endsection + +@section('content') +
+
+ +
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + +
Nama BilikMaklumatTempohStatusTindakan
Nama BilikMaklumatTempohStatusTindakan
+
+
+
+
+@include('segment.admin.tempahan.bilik.modal.index') +@endsection + +@section('JS') + @include('segment.layouts.custom_view_links.toast.js.index') + @include('segment.layouts.custom_view_links.datatable.js.index') + @include('segment.layouts.custom_view_links.modals.js.index') + @include('segment.layouts.custom_view_links.swal.js.index') +@endsection + +@section('customJS') + @include('segment.layouts.custom_view_links.customjavascript.index') + + + +@endsection diff --git a/resources/views/segment/admin/tempahan/bilik/modal/index.blade.php b/resources/views/segment/admin/tempahan/bilik/modal/index.blade.php new file mode 100644 index 0000000..8ca948a --- /dev/null +++ b/resources/views/segment/admin/tempahan/bilik/modal/index.blade.php @@ -0,0 +1,68 @@ + + diff --git a/resources/views/segment/admin/tetapan/bangunan/modal/index.blade.php b/resources/views/segment/admin/tetapan/bangunan/modal/index.blade.php index 87d97bd..87a8bf4 100644 --- a/resources/views/segment/admin/tetapan/bangunan/modal/index.blade.php +++ b/resources/views/segment/admin/tetapan/bangunan/modal/index.blade.php @@ -29,8 +29,8 @@ diff --git a/resources/views/segment/admin/tetapan/fasiliti/modal/index.blade.php b/resources/views/segment/admin/tetapan/fasiliti/modal/index.blade.php index 46038ef..5a859cd 100644 --- a/resources/views/segment/admin/tetapan/fasiliti/modal/index.blade.php +++ b/resources/views/segment/admin/tetapan/fasiliti/modal/index.blade.php @@ -17,8 +17,8 @@ diff --git a/resources/views/segment/admin/tetapan/lokasi/modal/index.blade.php b/resources/views/segment/admin/tetapan/lokasi/modal/index.blade.php index 8855dee..6de695b 100644 --- a/resources/views/segment/admin/tetapan/lokasi/modal/index.blade.php +++ b/resources/views/segment/admin/tetapan/lokasi/modal/index.blade.php @@ -17,8 +17,8 @@ diff --git a/resources/views/segment/dashboard/index.blade.php b/resources/views/segment/dashboard/index.blade.php index 690854e..4afbd63 100644 --- a/resources/views/segment/dashboard/index.blade.php +++ b/resources/views/segment/dashboard/index.blade.php @@ -1,745 +1,150 @@ @extends('segment.layouts.main') @section('CSS') - + @include('segment.layouts.custom_view_links.calendar.css.index') @endsection @section('customCSS') - - + @endsection @section('content') -
-
- -
-
-
-
Congratulations 🎉 John!
-

You have won gold medal

-

- $48.9k -

- - Medal Pic -
-
-
- - - -
-
-
-

Statistics

-
-

Updated 1 month ago

-
-
-
-
-
-
-
-
- -
-
-
-

230k

-

Sales

-
-
-
-
-
-
-
- -
-
-
-

8.549k

-

Customers

-
-
-
-
-
-
-
- -
-
-
-

1.423k

-

Products

-
-
-
-
-
-
-
- -
-
-
-

$9745

-

Revenue

-
-
-
+
+
+
+ +
+
+
+
+ +
-
- -
-
-
- -
-
-
-
Orders
-

2,76k

-
-
-
-
- - - -
-
-
-
Profit
-

6,24k

-
-
-
-
- - - -
-
-
-
-
-

Earnings

-
This Month
-
$4055.56
-

- 68.2% more earnings than last month. -

-
-
-
-
-
-
-
+ + - -
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CompanyCategoryViewsRevenueSales
-
-
-
- Toolbar svg -
-
-
-
Dixons
-
meguc@ruj.io
-
-
-
-
-
-
- -
-
- Technology -
-
-
- 23.4k - in 24 hours -
-
$891.2 -
- 68% - -
-
-
-
-
- Parachute svg -
-
-
-
Motels
-
vecav@hodzi.co.uk
-
-
-
-
-
-
- -
-
- Grocery -
-
-
- 78k - in 2 days -
-
$668.51 -
- 97% - -
-
-
-
-
- Brush svg -
-
-
-
Zipcar
-
davcilse@is.gov
-
-
-
-
-
-
- -
-
- Fashion -
-
-
- 162 - in 5 days -
-
$522.29 -
- 62% - -
-
-
-
-
- Star svg -
-
-
-
Owning
-
us@cuhil.gov
-
-
-
-
-
-
- -
-
- Technology -
-
-
- 214 - in 24 hours -
-
$291.01 -
- 88% - -
-
-
-
-
- Book svg -
-
-
-
Cafés
-
pudais@jife.com
-
-
-
-
-
-
- -
-
- Grocery -
-
-
- 208 - in 1 week -
-
$783.93 -
- 16% - -
-
-
-
-
- Rocket svg -
-
-
-
Kmart
-
bipri@cawiw.com
-
-
-
-
-
-
- -
-
- Fashion -
-
-
- 990 - in 1 month -
-
$780.05 -
- 78% - -
-
-
-
-
- Speaker svg -
-
-
-
Payers
-
luk@izug.io
-
-
-
-
-
-
- -
-
- Fashion -
-
-
- 12.9k - in 12 hours -
-
$531.49 -
- 42% - -
-
-
-
-
-
- - - -
-
-
- Meeting Pic -
-
-
-
-
THU
-

24

-
-
-

Developer Meetup

-

Meet world popular developers

-
-
-
-
-
- -
-
-
-
Sat, May 25, 2020
- 10:AM to 6:PM -
-
-
-
-
- -
-
-
-
Central Park
- Manhattan, New york City -
-
-
-
- Avatar -
-
- Avatar -
-
- Avatar -
-
- Avatar -
-
- Avatar -
-
+42
-
-
-
-
- - - -
-
-
-
-

Browser States

-

Counter August 2020

-
- -
-
-
-
- Google Chrome -
Google Chrome
-
-
-
54.4%
-
-
-
-
-
- Mozila Firefox -
Mozila Firefox
-
-
-
6.1%
-
-
-
-
-
- Apple Safari -
Apple Safari
-
-
-
14.6%
-
-
-
-
-
- Internet Explorer -
Internet Explorer
-
-
-
4.2%
-
-
-
-
-
- Opera Mini -
Opera Mini
-
-
-
8.4%
-
-
-
-
-
-
- - - -
-
-
-

Goal Overview

- -
-
-
-
-
-

Completed

-

786,617

-
-
-

In Progress

-

13,561

-
-
-
-
-
- - - -
-
-
-

Transactions

- -
-
-
-
-
-
- -
-
-
-
Wallet
- Starbucks -
-
-
- $74
-
-
-
-
-
- -
-
-
-
Bank Transfer
- Add Money -
-
-
+ $480
-
-
-
-
-
- -
-
-
-
Paypal
- Add Money -
-
-
+ $590
-
-
-
-
-
- -
-
-
-
Mastercard
- Ordered Food -
-
-
- $23
-
-
-
-
-
- -
-
-
-
Transfer
- Refund -
-
-
+ $98
-
-
-
-
-
+
@endsection @section('JS') - + @include('segment.layouts.custom_view_links.calendar.js.index') @endsection @section('customJS') + @include('segment.layouts.custom_view_links.customjavascript.index') + + @endsection diff --git a/resources/views/segment/layouts/custom_view_links/calendar/css/index.blade.php b/resources/views/segment/layouts/custom_view_links/calendar/css/index.blade.php new file mode 100644 index 0000000..aacd6ad --- /dev/null +++ b/resources/views/segment/layouts/custom_view_links/calendar/css/index.blade.php @@ -0,0 +1,2 @@ + + diff --git a/resources/views/segment/layouts/custom_view_links/calendar/js/index.blade.php b/resources/views/segment/layouts/custom_view_links/calendar/js/index.blade.php new file mode 100644 index 0000000..0cf3cb1 --- /dev/null +++ b/resources/views/segment/layouts/custom_view_links/calendar/js/index.blade.php @@ -0,0 +1,2 @@ + + diff --git a/resources/views/segment/layouts/main.blade.php b/resources/views/segment/layouts/main.blade.php index dcb6ca2..b72f935 100644 --- a/resources/views/segment/layouts/main.blade.php +++ b/resources/views/segment/layouts/main.blade.php @@ -9,7 +9,7 @@ - Dashboard ecommerce - Vuexy - Bootstrap HTML admin template + Mybooking @@ -87,7 +87,7 @@ -

Vuexy

+

MYBooking

diff --git a/resources/views/segment/layouts/menu.blade.php b/resources/views/segment/layouts/menu.blade.php index 0a2b517..6813df6 100644 --- a/resources/views/segment/layouts/menu.blade.php +++ b/resources/views/segment/layouts/menu.blade.php @@ -1,9 +1,11 @@
diff --git a/routes/web.php b/routes/web.php index dd4fe2f..23455e3 100644 --- a/routes/web.php +++ b/routes/web.php @@ -8,6 +8,7 @@ use App\Http\Controllers\Segment\Admin\Bilik\BilikController; use App\Http\Controllers\Common\CommonController; use App\Http\Controllers\Segment\Pengguna\Tempahan\TempahanBilikController; +use App\Http\Controllers\Segment\Admin\Tempahan\Bilik\AdminTempahanBilikController; /* |-------------------------------------------------------------------------- | Web Routes @@ -24,6 +25,7 @@ }); Route::get('/dashboard', [DashboardController::class, 'index'])->name('dashboard'); +Route::post('/get-events', [DashboardController::class, 'getEvents'])->name('getEvents'); Route::prefix('/admin')->group(function () { Route::prefix('/tetapan')->group(function () { @@ -63,6 +65,15 @@ Route::post('/activate', [BilikController::class, 'activateBilik']); Route::post('/delete', [BilikController::class, 'deleteBilik']); }); + + Route::prefix('/tempahan')->group(function () { + Route::prefix('/bilik')->group(function () { + Route::get('/', [AdminTempahanBilikController::class, 'index']); + Route::get('/get-list', [AdminTempahanBilikController::class, 'getTempahanBilikList']); + Route::post('/get-tempahan', [AdminTempahanBilikController::class, 'getTempahanBilik']); + Route::post('/lulus', [AdminTempahanBilikController::class, 'lulusTempahanBilik']); + }); + }); }); Route::prefix('/pengguna')->group(function () { @@ -75,7 +86,6 @@ Route::post('/delete', [TempahanBilikController::class, 'deleteTempahanBilik']); Route::post('/tengok-kosong', [TempahanBilikController::class, 'tengokKosongTempahanBilik']); }); - }); });