feat(position-employee): copy position-employee
This commit is contained in:
parent
18a5eecbb1
commit
e97c1a97f7
3 changed files with 32 additions and 14 deletions
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, reactive, watch } from "vue";
|
||||
import { ref, reactive, watch, computed } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
|
|
@ -63,6 +63,16 @@ const props = defineProps({
|
|||
positionHolderInfo: { type: Object, default: () => ({}) },
|
||||
});
|
||||
|
||||
const titlePopup = computed(() => {
|
||||
return props.actionType === "ADD"
|
||||
? "เพิ่มอัตรากำลัง"
|
||||
: props.actionType === "EDIT"
|
||||
? "แก้ไขอัตรากำลัง"
|
||||
: props.actionType === "COPY"
|
||||
? "คัดลอกอัตรากำลัง"
|
||||
: "";
|
||||
});
|
||||
|
||||
const isReadonly = ref<boolean>(false); // อ่านได้อย่างเดียว
|
||||
const isEdit = ref<boolean>(false); //การแก้ไข
|
||||
const modalAdd = ref<boolean>(false); //เพิ่ม แก้้ไขตำแหน่ง
|
||||
|
|
@ -582,12 +592,7 @@ watch(
|
|||
<template>
|
||||
<q-dialog v-model="props.modal" persistent>
|
||||
<q-card style="min-width: 80vw">
|
||||
<DialogHeader
|
||||
:tittle="
|
||||
props.actionType === 'ADD' ? 'เพิ่มอัตรากำลัง' : 'แก้ไขอัตรากำลัง'
|
||||
"
|
||||
:close="close"
|
||||
/>
|
||||
<DialogHeader :tittle="titlePopup" :close="close" />
|
||||
<q-separator />
|
||||
<q-form greedy @submit.prevent @validation-success="onSubmit">
|
||||
<q-card-section class="q-pa-sm fixed-height">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, reactive, watch } from "vue";
|
||||
import { ref, reactive, watch, computed } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
|
@ -49,6 +49,16 @@ const props = defineProps({
|
|||
shortName: { type: String, required: true },
|
||||
});
|
||||
|
||||
const titlePopup = computed(() => {
|
||||
return props.actionType === "ADD"
|
||||
? "เพิ่มอัตรากำลัง"
|
||||
: props.actionType === "EDIT"
|
||||
? "แก้ไขอัตรากำลัง"
|
||||
: props.actionType === "COPY"
|
||||
? "คัดลอกอัตรากำลัง"
|
||||
: "";
|
||||
});
|
||||
|
||||
const modalAdd = ref<boolean>(false); //เพิ่มข้อมูลตำแหน่ง
|
||||
const isEdit = ref<boolean>(false); //แก้ไขข้อมูล
|
||||
const isReadonly = ref<boolean>(false); // อ่านได้อย่างเดียว
|
||||
|
|
@ -349,12 +359,7 @@ watch(
|
|||
<template>
|
||||
<q-dialog v-model="props.modal" persistent>
|
||||
<q-card style="min-width: 80vw">
|
||||
<DialogHeader
|
||||
:tittle="
|
||||
props.actionType === 'ADD' ? 'เพิ่มอัตรากำลัง' : 'แก้ไขอัตรากำลัง'
|
||||
"
|
||||
:close="close"
|
||||
/>
|
||||
<DialogHeader :tittle="titlePopup" :close="close" />
|
||||
<q-separator />
|
||||
<q-form greedy @submit.prevent @validation-success="onSubmit">
|
||||
<q-card-section class="q-pa-sm fixed-height">
|
||||
|
|
|
|||
|
|
@ -101,6 +101,12 @@ const listMenu = ref<ListMenu[]>([
|
|||
type: "EDIT",
|
||||
color: "edit",
|
||||
},
|
||||
{
|
||||
label: "คัดลอก",
|
||||
icon: "content_copy",
|
||||
type: "COPY",
|
||||
color: "blue-6",
|
||||
},
|
||||
{
|
||||
label: "ลบ",
|
||||
icon: "delete",
|
||||
|
|
@ -585,6 +591,8 @@ watch(
|
|||
? onClickHistoryPos(props.row.id)
|
||||
: item.type === 'INHERIT'
|
||||
? onClickInherit(props.row.id)
|
||||
: item.type === 'COPY'
|
||||
? onClickPosition('COPY', props.row.id)
|
||||
: null
|
||||
"
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue