diff --git a/src/components/FormModel.vue b/src/components/FormModel.vue index 90f19bb59..a9ed0c31c 100644 --- a/src/components/FormModel.vue +++ b/src/components/FormModel.vue @@ -35,6 +35,10 @@ const $props = defineProps({ type: Boolean, default: true, }, + autoLoad: { + type: Boolean, + default: false, + }, }); const emit = defineEmits(['onFetch']); @@ -43,7 +47,11 @@ defineExpose({ save, }); -onMounted(async () => await fetch()); +onMounted(async () => { + if ($props.autoLoad) { + await fetch(); + } +}); onUnmounted(() => { state.unset($props.model); @@ -96,6 +104,7 @@ function reset() { emit('onFetch', state.get($props.model)); hasChanges.value = false; } + // eslint-disable-next-line vue/no-dupe-keys function filter(value, update, filterOptions) { update( @@ -176,6 +185,7 @@ watch(formUrl, async () => { max-width: 800px; width: 100%; } + .q-card { padding: 32px; } diff --git a/src/pages/Claim/Card/ClaimBasicData.vue b/src/pages/Claim/Card/ClaimBasicData.vue index 94e447e13..cc9cc2394 100644 --- a/src/pages/Claim/Card/ClaimBasicData.vue +++ b/src/pages/Claim/Card/ClaimBasicData.vue @@ -96,6 +96,7 @@ const statesFilter = { :url-update="`Claims/updateClaim/${route.params.id}`" :filter="claimFilter" model="claim" + auto-load >