Se crea submodulo mis documentos en worker #253

Merged
alexm merged 10 commits from :features/ms_19_worker_my_documents into dev 2024-04-10 12:15:33 +00:00
2 changed files with 9 additions and 3 deletions
Showing only changes of commit 39af4278a6 - Show all commits

View File

@ -28,6 +28,10 @@ const $props = defineProps({
type: String,
default: null,
},
deleteModel: {
type: String,
default: null,
},
downloadModel: {
type: String,
required: false,
@ -240,7 +244,7 @@ function deleteDms(dmsFk) {
},
})
.onOk(async () => {
await axios.post(`${$props.model}/${dmsFk}/removeFile`);
await axios.post($props.deleteModel ?? `${$props.model}/${dmsFk}/removeFile`);
const index = rows.value.findIndex((row) => row.id == dmsFk);
rows.value.splice(index, 1);
});

View File

@ -1,11 +1,13 @@
<script setup>
import VnDmsList from 'src/components/common/VnDmsList.vue';
import { useRoute } from 'vue-router';
const route = useRoute();
</script>
<template>
<VnDmsList
model="WorkerDms"
:model="`WorkerDms/${route.params.id}/filter`"
update-model="Workers"
:delete-model="`WorkerDms/${route.params.id}/removeFile`"
download-model="WorkerDms"
default-dms-code="hhrrData"
filter="worker"