Add prefer_inner for group

This commit is contained in:
philipp lang 2024-04-11 20:06:13 +02:00
parent 75a32db2a7
commit 7ae37c224e
1 changed files with 3 additions and 3 deletions

View File

@ -54,13 +54,13 @@ const disabled = ref(false);
async function refreshOptions() { async function refreshOptions() {
if (props.field.parent_group === null && props.field.parent_field === null) { if (props.field.parent_group === null && props.field.parent_field === null) {
emit('update:modelValue', null); emit('update:modelValue', null);
options.value = (await axios.get('/api/group')).data.data; options.value = (await axios.get('/api/group?prefer_inner')).data.data;
disabled.value = false; disabled.value = false;
return; 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 + '?prefer_inner')).data.data;
disabled.value = false; disabled.value = false;
return; return;
} }
@ -74,7 +74,7 @@ async function refreshOptions() {
if (props.field.parent_field !== null && props.field.parent_field in props.payload && props.payload[props.field.parent_field]) { if (props.field.parent_field !== null && props.field.parent_field in props.payload && props.payload[props.field.parent_field]) {
emit('update:modelValue', null); emit('update:modelValue', null);
options.value = (await axios.get('/api/group/' + props.payload[props.field.parent_field])).data.data; options.value = (await axios.get('/api/group/' + props.payload[props.field.parent_field] + '?prefer_inner')).data.data;
disabled.value = false; disabled.value = false;
return; return;
} }