Add Frontend for copying events
continuous-integration/drone/push Build was killed
Details
continuous-integration/drone/push Build was killed
Details
This commit is contained in:
parent
ccef61352d
commit
d53a6d23d2
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue