chore: Fix null values for adventure date and end date in AdventureModal and EditTransportation
This commit is contained in:
@@ -164,7 +164,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="mb-2">
|
<div class="mb-2">
|
||||||
<label for="start_date"
|
<label for="start_date"
|
||||||
>{transportationToEdit.date ? 'Start' : ''}Date & Time <Calendar
|
>{transportationToEdit.date ? 'Start ' : ''}Date & Time <Calendar
|
||||||
class="inline-block mb-1 w-6 h-6"
|
class="inline-block mb-1 w-6 h-6"
|
||||||
/></label
|
/></label
|
||||||
><br />
|
><br />
|
||||||
|
|||||||
@@ -47,6 +47,12 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// make sure end date has a start date
|
||||||
|
if (newCollection.end_date && !newCollection.start_date) {
|
||||||
|
addToast('error', 'Please provide a start date');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const response = await fetch(form.action, {
|
const response = await fetch(form.action, {
|
||||||
method: form.method,
|
method: form.method,
|
||||||
body: formData
|
body: formData
|
||||||
|
|||||||
Reference in New Issue
Block a user