refactor: refs #7248 remove unused state management and simplify body structure in ClaimNotes component
gitea/salix-front/pipeline/pr-dev This commit is unstable Details

This commit is contained in:
Alex Moreno 2025-04-24 12:51:23 +02:00
parent 4f12a31b1a
commit 1ceb6b1aef
1 changed files with 3 additions and 9 deletions

View File

@ -1,12 +1,9 @@
<script setup> <script setup>
import { computed } from 'vue'; import { computed } from 'vue';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import { useState } from 'src/composables/useState';
import VnNotes from 'src/components/ui/VnNotes.vue'; import VnNotes from 'src/components/ui/VnNotes.vue';
const route = useRoute(); const route = useRoute();
const state = useState();
const user = state.getUser();
const $props = defineProps({ const $props = defineProps({
id: { type: [Number, String], default: null }, id: { type: [Number, String], default: null },
@ -23,11 +20,6 @@ const claimFilter = {
}, },
}, },
}; };
const body = {
claimFk: claimId.value,
userFk: user.value.id,
};
</script> </script>
<template> <template>
<VnNotes <VnNotes
@ -35,7 +27,9 @@ const body = {
:add-note="$props.addNote" :add-note="$props.addNote"
:user-filter="claimFilter" :user-filter="claimFilter"
:filter="{ where: { claimFk: claimId } }" :filter="{ where: { claimFk: claimId } }"
:body="body" :body="{
claimFk: claimId,
}"
v-bind="$attrs" v-bind="$attrs"
style="overflow-y: auto" style="overflow-y: auto"
/> />