mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
fix(bookings): the transport dialog's submit always returns a promise, as the expense button expects
This commit is contained in:
@@ -130,11 +130,11 @@ export function TransportModal({ isOpen, onClose, onSave, reservation, days, sel
|
||||
})
|
||||
}, [isOpen, reservation, prefill, selectedDayId, budgetItems])
|
||||
|
||||
const handleSubmit = (e?: React.FormEvent) => {
|
||||
const handleSubmit = async (e?: React.FormEvent) => {
|
||||
e?.preventDefault()
|
||||
if (!form.title.trim()) return
|
||||
if (filesNeedConnection(pendingFiles, !!onFileUpload)) { toast.error(t('reservations.filesNeedConnection')); return }
|
||||
return saveTransport()
|
||||
await saveTransport()
|
||||
}
|
||||
|
||||
const saveTransport = async () => {
|
||||
|
||||
Reference in New Issue
Block a user