From 168f147ffd253c47c40f7055147280a6bd64eea1 Mon Sep 17 00:00:00 2001 From: Amir Hassan Date: Fri, 17 Feb 2023 12:49:28 +0800 Subject: [PATCH] Add status semak at galeri marhun --- .../Mobile/LelongMobileController.php | 10 ++++-- .../marhun/DisplayLelongBid.vue.vue | 34 ++++++++++++++++--- .../marhun/SelectBatchLelongCawangan.vue | 2 +- .../marhun/SelectCawangan.vue | 20 +++++++---- 4 files changed, 52 insertions(+), 14 deletions(-) diff --git a/app/Http/Controllers/Mobile/LelongMobileController.php b/app/Http/Controllers/Mobile/LelongMobileController.php index f0170580..3d829cb4 100644 --- a/app/Http/Controllers/Mobile/LelongMobileController.php +++ b/app/Http/Controllers/Mobile/LelongMobileController.php @@ -1466,10 +1466,16 @@ class LelongMobileController extends Controller $lelong_bid_all = LelongBid::with('fileMarhunMain') ->where('caw_id', $request->caw_id) ->where('lelong_id', $request->lelong_id) - ->select(['id','norujukan', 'marhun', 'nilaimarhun']) + ->select(['id','norujukan', 'marhun', 'nilaimarhun', 'status_semak']) ->get(); - return response()->json($lelong_bid_all); + $belum_semak = $lelong_bid_all->where('status_semak', 0)->count(); + + return response()->json([ + "jumlah_surat" => $lelong_bid_all->count(), + "belum_semak" => $belum_semak, + "lelong_bid" => $lelong_bid_all, + ]); } public function showPhotoMarhun(Request $request) diff --git a/resources/js/components/pengurusangambar/marhun/DisplayLelongBid.vue.vue b/resources/js/components/pengurusangambar/marhun/DisplayLelongBid.vue.vue index a7815959..84ee7d59 100644 --- a/resources/js/components/pengurusangambar/marhun/DisplayLelongBid.vue.vue +++ b/resources/js/components/pengurusangambar/marhun/DisplayLelongBid.vue.vue @@ -1,8 +1,14 @@