0
0
Fork 0

refactor: requested changes

This commit is contained in:
Jon Elias 2024-11-25 11:12:11 +01:00
parent 1dedf00fef
commit c558636799
3 changed files with 6 additions and 17 deletions

View File

@ -57,12 +57,12 @@ const closeForm = () => {
<span ref="closeButton" class="close-icon" v-close-popup> <span ref="closeButton" class="close-icon" v-close-popup>
<QIcon name="close" size="sm" /> <QIcon name="close" size="sm" />
</span> </span>
<h1 class="title">{{ $props.title }}</h1> <h1 class="title">{{ title }}</h1>
<p>{{ $props.subtitle }}</p> <p>{{ subtitle }}</p>
<slot name="form-inputs" /> <slot name="form-inputs" />
<div class="q-mt-lg row justify-end"> <div class="q-mt-lg row justify-end">
<QBtn <QBtn
v-if="$props.defaultCancelButton" v-if="defaultCancelButton"
:label="t('globals.cancel')" :label="t('globals.cancel')"
color="primary" color="primary"
flat flat
@ -72,8 +72,8 @@ const closeForm = () => {
v-close-popup v-close-popup
/> />
<QBtn <QBtn
v-if="$props.defaultSubmitButton" v-if="defaultSubmitButton"
:label="$props.customSubmitButtonLabel || t('globals.save')" :label="customSubmitButtonLabel || t('globals.save')"
type="submit" type="submit"
color="primary" color="primary"
:disabled="isLoading" :disabled="isLoading"

View File

@ -64,13 +64,6 @@ const exclusionGeoCreate = async () => {
}; };
await axios.post('Zones/exclusionGeo', params); await axios.post('Zones/exclusionGeo', params);
await refetchEvents(); await refetchEvents();
const params = {
zoneFk: parseInt(route.params.id),
date: dated.value,
geoIds: tickedNodes.value,
};
await axios.post('Zones/exclusionGeo', params);
await refetchEvents();
}; };
const exclusionCreate = async () => { const exclusionCreate = async () => {
@ -92,9 +85,6 @@ const deleteEvent = async () => {
if (!props.event) return; if (!props.event) return;
await axios.delete(`Zones/${route.params.id}/exclusions`); await axios.delete(`Zones/${route.params.id}/exclusions`);
await refetchEvents(); await refetchEvents();
if (!props.event) return;
await axios.delete(`Zones/${route.params.id}/exclusions`);
await refetchEvents();
}; };
const closeForm = () => emit('closeForm'); const closeForm = () => emit('closeForm');
@ -131,7 +121,6 @@ onMounted(() => {
<VnInputDate <VnInputDate
:label="t('eventsInclusionForm.day')" :label="t('eventsInclusionForm.day')"
v-model="dated" v-model="dated"
:model-value="props.date"
:required="true" :required="true"
/> />
</VnRow> </VnRow>

View File

@ -152,7 +152,7 @@ onUnmounted(() => {
v-if="showSearchBar" v-if="showSearchBar"
v-model="store.userParams.search" v-model="store.userParams.search"
:placeholder="$t('globals.search')" :placeholder="$t('globals.search')"
@keyup.enter="reFetch" @keydown.enter="reFetch"
> >
<template #prepend> <template #prepend>
<QBtn color="primary" icon="search" dense flat @click="reFetch()" /> <QBtn color="primary" icon="search" dense flat @click="reFetch()" />