diff --git a/src/components/ui/VnNotes.vue b/src/components/ui/VnNotes.vue index ec6289a67..6740934d4 100644 --- a/src/components/ui/VnNotes.vue +++ b/src/components/ui/VnNotes.vue @@ -26,12 +26,13 @@ const $attrs = computed(() => { }); const isRequired = computed(() => { - return Object.keys($attrs).includes('required') + return Object.keys($attrs).includes('required'); }); const $props = defineProps({ url: { type: String, default: null }, - saveUrl: {type: String, default: null}, + saveUrl: { type: String, default: null }, + userFilter: { type: Object, default: () => {} }, filter: { type: Object, default: () => {} }, body: { type: Object, default: () => {} }, addNote: { type: Boolean, default: false }, @@ -65,7 +66,7 @@ async function insert() { } function confirmAndUpdate() { - if(!newNote.text && originalText) + if (!newNote.text && originalText) quasar .dialog({ component: VnConfirm, @@ -88,11 +89,17 @@ async function update() { ...body, ...{ notes: newNote.text }, }; - await axios.patch(`${$props.saveUrl ?? `${$props.url}/${$props.body.workerFk}`}`, newBody); + await axios.patch( + `${$props.saveUrl ?? `${$props.url}/${$props.body.workerFk}`}`, + newBody, + ); } onBeforeRouteLeave((to, from, next) => { - if ((newNote.text && !$props.justInput) || (newNote.text !== originalText) && $props.justInput) + if ( + (newNote.text && !$props.justInput) || + (newNote.text !== originalText && $props.justInput) + ) quasar.dialog({ component: VnConfirm, componentProps: { @@ -104,12 +111,11 @@ onBeforeRouteLeave((to, from, next) => { else next(); }); -function fetchData([ data ]) { +function fetchData([data]) { newNote.text = data?.notes; originalText = data?.notes; emit('onFetch', data); } -