dev
Aji Kamaludin 1 year ago
parent 656d49cb4d
commit c21c1e1925
No known key found for this signature in database
GPG Key ID: 19058F67F0083AD3

@ -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(),
]);
}

@ -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) {
</p>
)}
</div>
<div className="mb-4 mt-2">
<FormInput
<div className="mt-2">
<FormInputNumeric
type="number"
label="Limit Hutang"
name="paylater_limit"
@ -112,6 +114,16 @@ export default function Form(props) {
error={errors.paylater_limit}
/>
</div>
<div className="mb-4 mt-2">
<FormInputNumeric
type="number"
label="Tenor (Hari)"
name="day_deadline"
onChange={handleOnChange}
value={data.day_deadline}
error={errors.day_deadline}
/>
</div>
<div className="flex items-center">
<Button
onClick={handleSubmit}

Loading…
Cancel
Save