Add query params for later registration
This commit is contained in:
parent
a6ca0d2a6c
commit
e4fa326f35
|
@ -149,12 +149,14 @@ import useToastify from './composables/useToastify.js';
|
|||
import useFields from './composables/useFields.js';
|
||||
import SettingIcon from './components/icons/SettingIcon.vue';
|
||||
import useColumns from './composables/useColumns.js';
|
||||
import usePageMeta from './composables/usePageMeta.js';
|
||||
|
||||
const {scroll} = useScroll();
|
||||
const {errorFromResponse} = useToastify();
|
||||
const {colClassesForField, containerClasses} = useColumns();
|
||||
const finished = ref(false);
|
||||
const eventForm = ref(null);
|
||||
const pageMeta = usePageMeta();
|
||||
|
||||
const emits = defineEmits(['addSection', 'editSection', 'deleteSection', 'editField', 'deleteField', 'active', 'save']);
|
||||
|
||||
|
@ -236,7 +238,9 @@ async function submit() {
|
|||
return;
|
||||
}
|
||||
try {
|
||||
await axios.post('/api/form/' + props.formId + '/register', payload.value);
|
||||
await axios.post('/api/form/' + props.formId + '/register', payload.value, {
|
||||
params: pageMeta.value.later === '1' ? pageMeta.value : {},
|
||||
});
|
||||
finished.value = true;
|
||||
} catch (e) {
|
||||
errorFromResponse(e);
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
import { ref } from 'vue';
|
||||
|
||||
export default function useEventMeta() {
|
||||
const varName = 'adrema_page_meta';
|
||||
const pageMeta = ref(null);
|
||||
if (window[varName]) {
|
||||
pageMeta.value = window[varName];
|
||||
}
|
||||
return pageMeta;
|
||||
}
|
Loading…
Reference in New Issue