From dc1271c3d830a863913890ab4c09f5b6cc7b4c9c Mon Sep 17 00:00:00 2001 From: pand03 Date: Thu, 23 Apr 2026 15:22:22 +0700 Subject: [PATCH] Penambahan Menu FrontOffice --- .DS_Store | Bin 0 -> 6148 bytes .../FrontOffice/FrontOfficeController.php | 163 ++++++++ .../FrontOfficeControllerController.php | 114 ------ public/images/no-image.jpg | Bin 0 -> 3896 bytes resources/views/.DS_Store | Bin 8196 -> 8196 bytes resources/views/apps/member/index.blade.php | 2 +- .../index.blade.php} | 364 +++++++++++++----- routes/web.php | 7 +- 8 files changed, 432 insertions(+), 218 deletions(-) create mode 100644 .DS_Store create mode 100644 app/Http/Controllers/FrontOffice/FrontOfficeController.php delete mode 100644 app/Http/Controllers/FrontOffice/FrontOfficeControllerController.php create mode 100644 public/images/no-image.jpg rename resources/views/{tools/additional.blade.php => frontoffice/index.blade.php} (53%) diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..1c4abf256f5e33b973f5f92e1f085b059c5ff502 GIT binary patch literal 6148 zcmeHKISv9b4733uBpOP}e1RWC2wt!spa9Vzkhtotco$D&d^E7oL4(GUGl}C#lquG0 z5z+Z&JrkLT$OvvIHygTU`{o_%Wki8+oUxJ9wK?v0hyAvb{XSsap&aEP7dgN1ZI4C; zr~nn90#twsd{=?2ucPsIkL77pfC~J90``3all()); + $keyword = $request->q; + Log::info($keyword); + + if (!$keyword) { + return response()->json([ + 'status' => false, + 'message' => 'Input kosong' + ]); + } + + // $data = TransaksiParkir::where('no_pol', $keyword) + $data = DB::table('transaksi_parkir')->where('no_pol', $keyword) + ->select(DB::raw( + 'CAST(id AS TEXT) as id, no_pol, waktu_masuk, id_kendaraan, pic_body_masuk' + )) + // ->where('status', 1) + // ->orWhere('no_pol', $keyword) + ->orderByDesc('waktu_masuk') + ->first(); + + if (!empty($data->pic_body_masuk) && is_resource($data->pic_body_masuk)) { + $data->pic_body_masuk = base64_encode(stream_get_contents($data->pic_body_masuk)) ?? 'Not Image'; + } else { + $data->pic_body_masuk = 'No Image'; + } + // $pic_body_masuk = (string) $data->pic_body_masuk; + + // $data->pic_body_masuk_base64 = $data->pic_body_masuk + // ? 'data:image/jpeg;base64,' . base64_encode($pic_body_masuk ) + // : null; + + // Log::info($data); + + if (!$data) { + return response()->json([ + 'status' => false, + 'message' => 'Data tidak ditemukan' + ]); + } + + return response()->json([ + 'status' => true, + // 'data' => $data + 'data' => [ + 'id' => (string) $data->id, + 'no_pol' => $data->no_pol, + 'waktu_masuk' => $data->waktu_masuk, + 'vehicle_capt' => $data->pic_body_masuk + ] + ]); + } + + public function image($id) + { + $picture = TransaksiParkir::select('pic_body_masuk')->where('no_pol', $id) + ->where('status', 1) + ->orderByDesc('waktu_masuk') + ->first(); + + // return response($picture->pic_body_masuk) + // ->header('Content-Type', 'image/jpeg'); + + // ❌ kalau tidak ada data + if (!$picture || !$picture->pic_body_masuk) { + return response()->file(public_path('images/no-image.jpg')); + } + + return response($picture->pic_body_masuk) + ->header('Content-Type', 'image/jpeg') + ->header('Cache-Control', 'public, max-age=86400'); // cache 1 hari + } + + /** + * Show the form for creating a new resource. + * + * @return \Illuminate\Http\Response + */ + public function create() + { + // + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function store(Request $request) + { + Log::info('Method Store : ' . json_encode($request->all())); + } + + /** + * Display the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function show($id) + { + // + } + + /** + * Show the form for editing the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function edit($id) + { + // + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param int $id + * @return \Illuminate\Http\Response + */ + public function update(Request $request, $id) + { + Log::info($request->all()); + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function destroy($id) + { + // + } +} diff --git a/app/Http/Controllers/FrontOffice/FrontOfficeControllerController.php b/app/Http/Controllers/FrontOffice/FrontOfficeControllerController.php deleted file mode 100644 index 3b43af1..0000000 --- a/app/Http/Controllers/FrontOffice/FrontOfficeControllerController.php +++ /dev/null @@ -1,114 +0,0 @@ -q; - - if (!$keyword) { - return response()->json([ - 'status' => false, - 'message' => 'Input kosong' - ]); - } - - $data = TransaksiParkir::where('no_pol', $keyword) - ->orWhere('no_pol', $keyword) - ->first(); - - if (!$data) { - return response()->json([ - 'status' => false, - 'message' => 'Data tidak ditemukan' - ]); - } - - return response()->json([ - 'status' => true, - 'data' => $data - ]); - } - - /** - * Show the form for creating a new resource. - * - * @return \Illuminate\Http\Response - */ - public function create() - { - // - } - - /** - * Store a newly created resource in storage. - * - * @param \Illuminate\Http\Request $request - * @return \Illuminate\Http\Response - */ - public function store(Request $request) - { - // - } - - /** - * Display the specified resource. - * - * @param int $id - * @return \Illuminate\Http\Response - */ - public function show($id) - { - // - } - - /** - * Show the form for editing the specified resource. - * - * @param int $id - * @return \Illuminate\Http\Response - */ - public function edit($id) - { - // - } - - /** - * Update the specified resource in storage. - * - * @param \Illuminate\Http\Request $request - * @param int $id - * @return \Illuminate\Http\Response - */ - public function update(Request $request, $id) - { - // - } - - /** - * Remove the specified resource from storage. - * - * @param int $id - * @return \Illuminate\Http\Response - */ - public function destroy($id) - { - // - } -} diff --git a/public/images/no-image.jpg b/public/images/no-image.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b45211e1efde812f40fbe69f1caf877322bbf74d GIT binary patch literal 3896 zcmchZph?LI%}`J&)Vzv;pnRafkNb1SYQ=JkTFP#h5a8r7LJvR&HD3BtqZOQ-O|3LrkN$JR=7rxSK8!b-4`GXeZk1|@e zt5{Lwblgm9|DA4CWRuJblrn#54P0vpto;CaVNk(%AZl978S%@&sK|}sL@&QsT%u%Z zKHK1}i*~u)8q>-8JTLbA%R4DGK=%xHWUCWHfk%WLH%HdL9gY8(8wU*secxC=3)T#% zVC^+F*5t(T)|<@bg}_A?=KZP8H~vcA6jPhNzhDw)p6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JLO{|eiq5=m>1Owvj4a;5lXJiI zo3AA_H9i0_@j8Ub=`=(Jp z71NK-Qaa0Am7sUO4A;)kQYMd79do#IAdew4<{v{i`?jyG_x}84K`ul$bD%LMhMDb* z`T>nOvsy`#A1MRpZwe{o$!z#^cdn6vZ8VHZ^?%L~H+xlWotZL!94sWBPD`4C2eox6 z1n@-AM!l0{N}$eDy600r{Uxe_UN|;Y`ns69n#a7fJ3uxfip|~D8l25`7VqsfBMTV3 zP7ak$+3h@V9r8e|k_m;geY17^5}+&K^pHY%qa8=+sQ>TTef`J&K|_HYm2Oayh`F9i z!Ok&GK33-XjL;DyGsk&Xe3yR2TC-D3@`@2Sp?UAQ#x`VVVgvn&^h=W7ch~D%@-BgpNZ<-SK2gS z3k~9`>vA2!G`1&yELxYOsB>(!Oy7oDBwV#c?N=z^DE6864CkqUX+}TURC3qZWD$U! jzgMrMYl>G`Y*NSzKaZ zaE+0PnT3^&or8menXr1w@?l^GXsk z^HPhz8ZuK-fl6Y+GxJjN%boH|^HPezdV_%ynLrs1PEO8v0rBc;104l(^I9E+YC|(4 zQym3ELvxGTT22m8Wqs?Q`0SkAy!=j}+kk+P5kfQYLTMP)1!N%ks4TcBFDE}Q9Vp7U VF>xN#W_F2hEIAPO(971@OaMvMTucA} delta 33 pcmZp1XmOa}&nUGqU^hRb)Mg%mQkKn)JZ;RI*(JWQY|LP11^~C^3TXfU diff --git a/resources/views/apps/member/index.blade.php b/resources/views/apps/member/index.blade.php index 6bf38dd..9f688f7 100644 --- a/resources/views/apps/member/index.blade.php +++ b/resources/views/apps/member/index.blade.php @@ -53,7 +53,7 @@ class="img-fluid logo-img"> --}} Member masih aktif -

silahkan pilih produk di bawah ini :

+

silahkan pilih produk di bawah ini :

- -
- -
+ + + + + + + +
+
+
-
-
-
-

Detail Transaksi

-
- -
- - - + + +
+
+ +
+
+
+ +
Detail Transaksi
+ +
+ @csrf + {{-- @method('PUT') --}} + + +
+ +
+ + +
+ + +
+
+ +
+
+ +
+
+ + +
+
+ +
+
+ +
+
+ + +
+
+ +
+
+ +
+
+ + +
+ +
+ +
+
+ + +
+ Pilih transaksi untuk melihat detail +
+
+ + +
+
+
+ + Preview Kendaraan + + + Tidak ada gambar + + +
+
+
+
+
+
    -
  • +
  • - +
    @@ -137,12 +226,11 @@ class="list-group-item d-flex justify-content-between align-items-start">
    14
  • -
  • +
  • - +
    @@ -154,13 +242,11 @@ class="list-group-item d-flex justify-content-between align-items-start">
    14
  • -
  • +
  • - +
    @@ -177,12 +263,11 @@ class="list-group-item d-flex justify-content-between align-items-start">
      -
    • +
    • - +
      @@ -194,12 +279,11 @@ class="list-group-item d-flex justify-content-between align-items-start">
      14
    • -
    • +
    • - +
      @@ -211,13 +295,11 @@ class="list-group-item d-flex justify-content-between align-items-start">
      14
    • -
    • +
    • - +
      @@ -234,13 +316,11 @@ class="list-group-item d-flex justify-content-between align-items-start">
        -
      • +
      • - +
        @@ -252,13 +332,11 @@ class="list-group-item d-flex justify-content-between align-items-start">
        14
      • -
      • +
      • - +
        @@ -270,13 +348,11 @@ class="list-group-item d-flex justify-content-between align-items-start">
        14
      • -
      • +
      • - +
        @@ -309,31 +385,119 @@ class="list-group-item d-flex justify-content-between align-items-start"> -@endsection \ No newline at end of file +@endsection diff --git a/routes/web.php b/routes/web.php index 645ffe3..54b2bef 100644 --- a/routes/web.php +++ b/routes/web.php @@ -17,7 +17,7 @@ use App\Http\Controllers\SetupController; use App\Http\Controllers\StikerController; use App\Http\Controllers\StreamerController; -use App\Http\Controllers\FrontOffice\FrontOfficeControllerController; +use App\Http\Controllers\FrontOffice\FrontOfficeController; use App\Http\Controllers\Tools\StikerExtendedController; use App\Http\Controllers\Tools\TransactionChangeController; use App\Http\Controllers\VerifyTransController; @@ -84,8 +84,9 @@ }); Route::prefix('/front-office')->group(function () { - Route::resource('check-in-out', FrontOfficeControllerController::class); - Route::get('/check-in-out/search', [FrontOfficeControllerController::class, 'search'])->name('check-in-out.search'); + Route::get('/check-in-out/search', [FrontOfficeController::class, 'search'])->name('check-in-out.search'); + Route::get('/check-in-out/image/{id}', [FrontOfficeController::class, 'image']); + Route::resource('check-in-out', FrontOfficeController::class); }); // Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home');