From ac1515e107ec07de57ebc122c449577349ca409f Mon Sep 17 00:00:00 2001 From: Jon Date: Fri, 10 Jan 2025 10:27:03 +0100 Subject: [PATCH] feat: refs #8225 added worker and zone modules --- src/pages/Worker/Card/WorkerDescriptor.vue | 55 +++------------- .../Worker/Card/WorkerDescriptorMenu.vue | 65 +++++++++++++++++++ src/pages/Worker/Card/WorkerSummary.vue | 4 ++ src/pages/Zone/Card/ZoneSummary.vue | 4 ++ 4 files changed, 83 insertions(+), 45 deletions(-) create mode 100644 src/pages/Worker/Card/WorkerDescriptorMenu.vue diff --git a/src/pages/Worker/Card/WorkerDescriptor.vue b/src/pages/Worker/Card/WorkerDescriptor.vue index f09aec816..c09e8868f 100644 --- a/src/pages/Worker/Card/WorkerDescriptor.vue +++ b/src/pages/Worker/Card/WorkerDescriptor.vue @@ -6,11 +6,10 @@ import CardDescriptor from 'src/components/ui/CardDescriptor.vue'; import VnLv from 'src/components/ui/VnLv.vue'; import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue'; import VnChangePassword from 'src/components/common/VnChangePassword.vue'; -import { useState } from 'src/composables/useState'; import axios from 'axios'; import VnImg from 'src/components/ui/VnImg.vue'; import EditPictureForm from 'components/EditPictureForm.vue'; -import DepartmentDescriptorProxy from 'src/pages/Department/Card/DepartmentDescriptorProxy.vue'; +import WorkerDescriptorMenu from './WorkerDescriptorMenu.vue'; const $props = defineProps({ id: { @@ -28,8 +27,6 @@ const image = ref(null); const route = useRoute(); const { t } = useI18n(); -const state = useState(); -const user = state.getUser(); const showEditPhotoForm = ref(false); const toggleEditPictureForm = () => { showEditPhotoForm.value = !showEditPhotoForm.value; @@ -45,18 +42,6 @@ const getIsExcluded = async () => { workerExcluded.value = data.exists; }; -const handleExcluded = async () => { - if (workerExcluded.value) - await axios.delete(`WorkerDisableExcludeds/${entityId.value}`); - else - await axios.post(`WorkerDisableExcludeds`, { - workerFk: entityId.value, - dated: new Date(), - }); - - workerExcluded.value = !workerExcluded.value; -}; - const handlePhotoUpdated = (evt = false) => { image.value.reload(evt); }; @@ -72,25 +57,11 @@ const handlePhotoUpdated = (evt = false) => { @on-fetch="getIsExcluded" >