Add first layer of groups

This commit is contained in:
philipp lang 2023-12-31 14:28:37 +01:00
parent 307796dfcb
commit 9122a29d75
1 changed files with 6 additions and 0 deletions

View File

@ -47,6 +47,12 @@ const options = ref([]);
const disabled = ref(false);
async function refreshOptions() {
if (props.field.parent_group === null && props.field.parent_field === null) {
emit('update:modelValue', null);
options.value = (await axios.get('/api/group')).data.data;
disabled.value = false;
return;
}
if (props.field.parent_group !== null) {
emit('update:modelValue', null);
options.value = (await axios.get('/api/group/' + props.field.parent_group)).data.data;