33 lines
700 B
Vue
33 lines
700 B
Vue
<script setup>
|
|
import { useRoute } from 'vue-router';
|
|
|
|
import VnNotes from 'src/components/ui/VnNotes.vue';
|
|
|
|
const route = useRoute();
|
|
|
|
const filter = {
|
|
order: 'created DESC',
|
|
where: { workerFk: route.params.id },
|
|
include: {
|
|
relation: 'worker',
|
|
scope: {
|
|
fields: ['id', 'firstName', 'lastName'],
|
|
include: {
|
|
relation: 'user',
|
|
scope: {
|
|
fields: ['id', 'nickname', 'name'],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
|
|
const body = {
|
|
workerFk: route.params.id,
|
|
};
|
|
</script>
|
|
|
|
<template>
|
|
<VnNotes :add-note="true" url="WorkerObservations" :filter="filter" :body="body" />
|
|
</template>
|