เพิ่มเมนูส่งตัวลูกจ้าง
This commit is contained in:
parent
4a8a3baaed
commit
98b26a9273
1 changed files with 52 additions and 2 deletions
|
|
@ -72,6 +72,17 @@ const itemsMenu = ref<DataOption[]>([
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const itemsMenuEmployee = ref<DataOption[]>([
|
||||||
|
{
|
||||||
|
id: "1",
|
||||||
|
name: "ปรับระดับชั้นงาน - ย้าย",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "2",
|
||||||
|
name: "ถึงแก่กรรม",
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
const uploadUrl = ref<string>("");
|
const uploadUrl = ref<string>("");
|
||||||
const fileName = ref<string>("");
|
const fileName = ref<string>("");
|
||||||
const profilePicture = ref<string>("");
|
const profilePicture = ref<string>("");
|
||||||
|
|
@ -305,6 +316,26 @@ async function otherPost() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const appointEmployeePost = async () => {
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append("id", profileId.value);
|
||||||
|
dialogConfirm($q, async () => {
|
||||||
|
showLoader();
|
||||||
|
await http
|
||||||
|
.post(config.API.appointEmployee(), formData)
|
||||||
|
.then(() => {
|
||||||
|
success($q, "ดำเนินการสำเร็จ");
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
hideLoader();
|
||||||
|
router.push("/appoint-employee");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
function closePassaway() {
|
function closePassaway() {
|
||||||
dialogPassaway.value = false;
|
dialogPassaway.value = false;
|
||||||
}
|
}
|
||||||
|
|
@ -447,7 +478,11 @@ onMounted(async () => {
|
||||||
icon="mdi-home-export-outline"
|
icon="mdi-home-export-outline"
|
||||||
dropdown-icon="mdi-chevron-down"
|
dropdown-icon="mdi-chevron-down"
|
||||||
>
|
>
|
||||||
<q-list v-for="(item, index) in itemsMenu" key="index">
|
<q-list
|
||||||
|
v-if="empType === 'officer'"
|
||||||
|
v-for="(item, index) in itemsMenu"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
<q-item
|
<q-item
|
||||||
clickable
|
clickable
|
||||||
@click="
|
@click="
|
||||||
|
|
@ -470,6 +505,21 @@ onMounted(async () => {
|
||||||
<q-item-section>{{ item.name }}</q-item-section>
|
<q-item-section>{{ item.name }}</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
</q-list>
|
</q-list>
|
||||||
|
<q-list v-else v-for="(item, index) in itemsMenuEmployee" :key="item.id">
|
||||||
|
<q-item
|
||||||
|
clickable
|
||||||
|
@click="
|
||||||
|
item.name == 'ปรับระดับชั้นงาน - ย้าย'
|
||||||
|
? appointEmployeePost()
|
||||||
|
: item.name == 'ถึงแก่กรรม'
|
||||||
|
? clickPassaway()
|
||||||
|
: null
|
||||||
|
"
|
||||||
|
v-close-popup
|
||||||
|
>
|
||||||
|
<q-item-section>{{ item.name }}</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
</q-list>
|
||||||
</q-btn-dropdown>
|
</q-btn-dropdown>
|
||||||
|
|
||||||
<q-btn
|
<q-btn
|
||||||
|
|
@ -560,7 +610,7 @@ onMounted(async () => {
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
||||||
<q-card bordered class="q-mt-md rounded">
|
<q-card bordered class="q-mt-md rounded">
|
||||||
<TabMain :fetchDataPersonal="fetchDataPersonal"/>
|
<TabMain :fetchDataPersonal="fetchDataPersonal" />
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
||||||
<!-- Dialog แนบใบมรณบัตร -->
|
<!-- Dialog แนบใบมรณบัตร -->
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue