feat: refs #6683 add PropertyLog and PropertyNotes components

This commit is contained in:
Jose Antonio Tubau 2025-04-01 15:10:38 +02:00
parent 37cf083b7a
commit 23c42ba33c
2 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,6 @@
<script setup>
import VnLog from 'src/components/common/VnLog.vue';
</script>
<template>
<VnLog model="Property" url="/PropertyLogs" />
</template>

View File

@ -0,0 +1,34 @@
<script setup>
import { computed } from 'vue';
import { useRoute } from 'vue-router';
import { useState } from 'src/composables/useState';
import VnNotes from 'src/components/ui/VnNotes.vue';
const route = useRoute();
const state = useState();
const user = state.getUser();
const propertyId = computed(() => route.params.id);
const noteFilter = computed(() => {
return {
order: 'created DESC',
where: { propertyFk: propertyId.value },
};
});
const body = {
propertyFk: propertyId.value,
workerFk: user.value.id,
};
</script>
<template>
<VnNotes
url="propertyObservations"
:add-note="true"
:filter="noteFilter"
:body="body"
style="overflow-y: auto"
required
/>
</template>