web: Make the event date field aware of time as well.

This commit is contained in:
Jonathan Bernard 2024-08-12 16:06:34 -05:00
parent fa6dd55ba0
commit 27a94db3c7
3 changed files with 8363 additions and 5390 deletions

9929
web/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
import { defineComponent, Ref, ref } from 'vue';
import { defineComponent, ref } from 'vue';
import { logService } from '@jdbernard/logging';
import {
default as api,
@ -28,8 +28,8 @@ export default defineComponent({
props: {},
components: { CircleCheckIcon, CircleCrossIcon, HourGlassIcon, SpinnerIcon },
setup: function TheProposeEventView() {
const departments: Ref<{ value: string; color: string }[]> = ref([]);
const formState: Ref<FormState> = ref('loading');
const departments = ref<{ value: string; color: string }[]>([]);
const formState = ref<FormState>('loading');
setTimeout(async () => {
departments.value = (await api.getEventProposalConfig()).departments;
@ -62,14 +62,14 @@ export default defineComponent({
if (await api.proposeEvent(formVal.event)) {
formState.value = 'success';
successes.push(
`We've recorded the proposed details for ${formVal.event.name}.`
`We've recorded the proposed details for ${formVal.event.name}.`,
);
} else {
formState.value = 'error';
errors.push(
'We were unable to record the proposed details for ' +
formVal.event.name +
". Poke Jonathan and tell him it's broken."
". Poke Jonathan and tell him it's broken.",
);
}

View File

@ -18,7 +18,11 @@
</label>
<label>
<span>Date and time</span>
<input type="date" name="date" v-model="formVal.event.date" />
<input
type="datetime-local"
name="date"
v-model="formVal.event.date"
/>
</label>
<label>
<span>Department / Event Type</span>