From 620fb9a569599edfb6cb3bad2556cc45f3907cc7 Mon Sep 17 00:00:00 2001 From: Aji Kamaludin Date: Sun, 25 Jun 2023 03:03:50 +0700 Subject: [PATCH] bit fix deposit done --- app/Http/Controllers/Admin/DepositController.php | 2 +- resources/js/Pages/DepositHistory/FormModal.jsx | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Admin/DepositController.php b/app/Http/Controllers/Admin/DepositController.php index 028d2c9..2be4823 100644 --- a/app/Http/Controllers/Admin/DepositController.php +++ b/app/Http/Controllers/Admin/DepositController.php @@ -13,7 +13,7 @@ class DepositController extends Controller { public function index(Request $request) { - $query = DepositHistory::with(['customer', 'account', 'editor']) + $query = DepositHistory::with(['customer', 'account', 'depositLocation', 'editor']) ->where('credit', 0) ->orderBy('is_valid', 'desc') ->orderBy('updated_at', 'desc'); diff --git a/resources/js/Pages/DepositHistory/FormModal.jsx b/resources/js/Pages/DepositHistory/FormModal.jsx index 78b5729..004d61c 100644 --- a/resources/js/Pages/DepositHistory/FormModal.jsx +++ b/resources/js/Pages/DepositHistory/FormModal.jsx @@ -21,6 +21,7 @@ export default function FormModal(props) { holder_name: '', account_number: '', }, + deposit_location: null, payment_channel: '', is_valid: 0, status_text: '', @@ -76,6 +77,7 @@ export default function FormModal(props) { } )`, description: deposit.description, reject_reason: deposit.note, + deposit_location: deposit.deposit_location, }) return } @@ -113,6 +115,15 @@ export default function FormModal(props) { )} + {data.deposit_location !== null && ( + + + Lokasi Cash / Setor Tunai + + : + {data.deposit_location.name} + + )} Jumlah :