Add first layer of groups
This commit is contained in:
parent
307796dfcb
commit
9122a29d75
|
@ -47,6 +47,12 @@ const options = ref([]);
|
||||||
const disabled = ref(false);
|
const disabled = ref(false);
|
||||||
|
|
||||||
async function refreshOptions() {
|
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) {
|
if (props.field.parent_group !== null) {
|
||||||
emit('update:modelValue', null);
|
emit('update:modelValue', null);
|
||||||
options.value = (await axios.get('/api/group/' + props.field.parent_group)).data.data;
|
options.value = (await axios.get('/api/group/' + props.field.parent_group)).data.data;
|
||||||
|
|
Loading…
Reference in New Issue