From 2ddaa0543ca4db90d71dbff145ab2bedfa03584b Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Mon, 18 Mar 2024 12:01:37 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=82=E0=B8=84=E0=B8=A3=E0=B8=87=E0=B8=AA?= =?UTF-8?q?=E0=B8=A3=E0=B9=89=E0=B8=B2=E0=B8=87=E0=B8=AD=E0=B8=B1=E0=B8=95?= =?UTF-8?q?=E0=B8=A3=E0=B8=B2=E0=B8=81=E0=B8=B3=E0=B8=A5=E0=B8=B1=E0=B8=87?= =?UTF-8?q?=20=3D>=20=E0=B8=84=E0=B8=B1=E0=B8=94=E0=B8=A5=E0=B8=AD?= =?UTF-8?q?=E0=B8=81=E0=B8=95=E0=B8=B3=E0=B9=81=E0=B8=AB=E0=B8=99=E0=B9=88?= =?UTF-8?q?=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/DialogFormPosition.vue | 2 +- .../02_organizationalNew/components/TreeTable.vue | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/modules/02_organizationalNew/components/DialogFormPosition.vue b/src/modules/02_organizationalNew/components/DialogFormPosition.vue index f74c1b2ed..7ec039b5e 100644 --- a/src/modules/02_organizationalNew/components/DialogFormPosition.vue +++ b/src/modules/02_organizationalNew/components/DialogFormPosition.vue @@ -377,7 +377,7 @@ function onSubmit() { }; showLoader(); - props.actionType === "ADD" + props.actionType === "ADD" || props.actionType === "COPY" ? await http .post(config.API.orgPosMaster, body) .then(() => { diff --git a/src/modules/02_organizationalNew/components/TreeTable.vue b/src/modules/02_organizationalNew/components/TreeTable.vue index 005c7af5a..37946bc5c 100644 --- a/src/modules/02_organizationalNew/components/TreeTable.vue +++ b/src/modules/02_organizationalNew/components/TreeTable.vue @@ -74,6 +74,12 @@ const listMenu = ref([ type: "EDIT", color: "edit", }, + { + label: "คัดลอก", + icon: "content_copy", + type: "COPY", + color: "blue-6", + }, { label: "ลบ", icon: "delete", @@ -259,6 +265,12 @@ function onClickPosition(type: string, id: string) { dialogPosition.value = !dialogPosition.value; } +function onClickCopyPosition(type: string, id: string) { + rowId.value = id ? id : ""; + actionType.value = type; + dialogPosition.value = !dialogPosition.value; +} + const dialogDetail = ref(false); const dataDetailPos = ref([]); /** @@ -650,6 +662,8 @@ async function onClickDownloadReport(val: string, name: string) { ? onClickHistoryPos(props.row.id) : item.type === 'INHERIT' ? onClickInherit(props.row.id) + : item.type === 'COPY' + ? onClickCopyPosition('COPY', props.row.id) : null " >