Add Frontend for copying events
continuous-integration/drone/push Build was killed Details

This commit is contained in:
philipp lang 2025-06-17 00:08:29 +02:00
parent ccef61352d
commit d53a6d23d2
1 changed files with 4 additions and 4 deletions

View File

@ -200,7 +200,7 @@ import ConditionsForm from './ConditionsForm.vue';
import { useToast } from 'vue-toastification'; import { useToast } from 'vue-toastification';
const props = defineProps(indexProps); const props = defineProps(indexProps);
const { meta, data, reloadPage, create, single, edit, cancel, submit, remove, getFilter, setFilter } = useIndex(props.data, 'form'); const { meta, data, reloadPage, reload, create, single, edit, cancel, submit, remove, getFilter, setFilter } = useIndex(props.data, 'form');
const axios = inject('axios'); const axios = inject('axios');
const toast = useToast(); const toast = useToast();
@ -228,9 +228,9 @@ const allFields = computed(() => {
return result; return result;
}); });
function onCopy(form) { async function onCopy(form) {
single.value = {...meta.value.default, ...form}; await axios.post(form.links.copy, {});
single.value.id = null; reload(false);
} }
function setTemplate(template) { function setTemplate(template) {