refactor: requested changes
gitea/salix-front/pipeline/pr-master This commit looks good Details

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

View File

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

View File

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