Skip to content

Commit

Permalink
Add fourth step - Permits
Browse files Browse the repository at this point in the history
  • Loading branch information
kyle1morel committed May 1, 2024
1 parent 7981cbd commit 5e4510c
Show file tree
Hide file tree
Showing 15 changed files with 597 additions and 107 deletions.
4 changes: 4 additions & 0 deletions frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,23 @@
import { storeToRefs } from 'pinia';
import { onBeforeMount, onErrorCaptured, ref } from 'vue';
import { RouterView } from 'vue-router';
import { AppLayout, Navbar, ProgressLoader } from '@/components/layout';
import { ConfirmDialog, Message, Toast, useToast } from '@/lib/primevue';
import { useAppStore, useAuthStore, useConfigStore } from '@/store';
import { ToastTimeout } from '@/utils/constants';
import type { Ref } from 'vue';
// Store
const appStore = useAppStore();
const { getIsLoading } = storeToRefs(appStore);
const { getConfig } = storeToRefs(useConfigStore());
// State
const ready: Ref<boolean> = ref(false);
// Actions
onBeforeMount(async () => {
appStore.beginDeterminateLoading();
await useConfigStore().init();
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/components/form/Calendar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ type Props = {
disabled?: boolean;
showTime?: boolean;
bold?: boolean;
placeholder?: string;
};
const props = withDefaults(defineProps<Props>(), {
Expand All @@ -20,7 +21,8 @@ const props = withDefaults(defineProps<Props>(), {
label: '',
disabled: false,
showTime: false,
bold: true
bold: true,
placeholder: ''
});
const { errorMessage, value } = useField<Date>(toRef(props, 'name'));
Expand All @@ -46,6 +48,7 @@ const { errorMessage, value } = useField<Date>(toRef(props, 'name'));
show-icon
icon-display="input"
date-format="yy/mm/dd"
:placeholder="props.placeholder"
/>
<small :id="`${name}-help`">{{ helpText }}</small>
<div>
Expand Down
11 changes: 10 additions & 1 deletion frontend/src/components/form/RadioList.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { ErrorMessage, useField } from 'vee-validate';
import { toRef } from 'vue';
import { toRef, watch } from 'vue';
import { RadioButton } from '@/lib/primevue';
Expand All @@ -23,7 +23,16 @@ const props = withDefaults(defineProps<Props>(), {
bold: true
});
// Emits
const emit = defineEmits(['onChange']);
// State
const { errorMessage, value } = useField<string>(toRef(props, 'name'));
// Actions
watch(value, () => {
emit('onChange', value.value);
});
</script>

<template>
Expand Down
Loading

0 comments on commit 5e4510c

Please sign in to comment.