From c21c1e19251f04ab1996e03a8099bca130712f48 Mon Sep 17 00:00:00 2001 From: Aji Kamaludin Date: Tue, 4 Jul 2023 00:25:15 +0700 Subject: [PATCH] bit fix --- app/Http/Middleware/HandleInertiaRequests.php | 8 ++++++-- resources/js/Pages/Verification/Form.jsx | 16 ++++++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/app/Http/Middleware/HandleInertiaRequests.php b/app/Http/Middleware/HandleInertiaRequests.php index 823644a..af99697 100644 --- a/app/Http/Middleware/HandleInertiaRequests.php +++ b/app/Http/Middleware/HandleInertiaRequests.php @@ -43,9 +43,13 @@ class HandleInertiaRequests extends Middleware 'csrf_token' => csrf_token(), 'notifications' => $notifications->limit(10)->get(), 'count_unread_notifications' => $notifications->where('is_read', Notification::UNREAD)->count(), - 'deposit_notifications' => $notifications->where('type', Notification::TYPE_DEPOSIT) + 'deposit_notifications' => Notification::where('entity_type', \App\Models\User::class) + ->orderBy('created_at', 'desc') + ->where('type', Notification::TYPE_DEPOSIT) ->where('is_read', Notification::UNREAD)->limit(10)->get(), - 'stock_notifications' => $notifications->where('type', Notification::TYPE_VOUCHER_STOCK) + 'stock_notifications' => Notification::where('entity_type', \App\Models\User::class) + ->orderBy('created_at', 'desc') + ->where('type', Notification::TYPE_VOUCHER_STOCK) ->where('is_read', Notification::UNREAD)->limit(10)->get(), ]); } diff --git a/resources/js/Pages/Verification/Form.jsx b/resources/js/Pages/Verification/Form.jsx index 9c07986..3e48f66 100644 --- a/resources/js/Pages/Verification/Form.jsx +++ b/resources/js/Pages/Verification/Form.jsx @@ -5,6 +5,7 @@ import { isEmpty } from 'lodash' import AuthenticatedLayout from '@/Layouts/AuthenticatedLayout' import Button from '@/Components/Button' import FormInput from '@/Components/FormInput' +import FormInputNumeric from '@/Components/FormInputNumeric' export default function Form(props) { const { customer, levels } = props @@ -12,6 +13,7 @@ export default function Form(props) { useForm({ level: customer.level.key, paylater_limit: +customer.paylater?.limit, + day_deadline: +customer?.paylater?.day_deadline, }) const handleOnChange = (event) => { @@ -102,8 +104,8 @@ export default function Form(props) {

)} -
- +
+
+ +