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 " >