Skip to content

Commit

Permalink
type check error fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Sinamon-maker authored and igor.la committed Aug 19, 2024
1 parent dcc5ca4 commit 7a3e6c4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions frontend/components/event/Form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const props = defineProps({
},
initialValues: {
type: Object as PropType<EventFormType>,
default: () => { }
default: () => {}
}
});
Expand Down Expand Up @@ -82,7 +82,7 @@ watch(
setFieldValue('price.currency', currency);
}
} else {
setFieldValue('price.currency', '');
setFieldValue('price.currency', null);
}
},
{ deep: true }
Expand Down Expand Up @@ -116,7 +116,7 @@ watch(
const timeZone = timezoneToString(getUserTimezone());
setFieldValue('timezone', timeZone);
} else {
const belgrade = await getTimezone('Serbia', 'Belgrade')
const belgrade = await getTimezone('Serbia', 'Belgrade');
setFieldValue('timezone', belgrade);
}
},
Expand All @@ -128,7 +128,7 @@ watch(
(free) => {
if (free) {
if (values['price']['currency']) {
setFieldValue('price.currency', '');
setFieldValue('price.currency', null);
}
if (values['price']['val']) {
setFieldValue('price.val', null);
Expand Down
3 changes: 2 additions & 1 deletion frontend/components/event/FormPrice.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<script setup lang="ts">
import { useField } from 'vee-validate';
import { useLocationStore } from '@/stores/location.store';
import type { CurrencyType } from '../../../common/const/price';
const locationStore = useLocationStore();
const currencyField = useField<string>(() => 'price.currency');
const currencyField = useField<CurrencyType>(() => 'price.currency');
const valueField = useField<number>(() => 'price.val');
const isFreeField = useField<boolean>(() => 'isFree');
</script>
Expand Down

0 comments on commit 7a3e6c4

Please sign in to comment.