ลูกจ้างชั่วคราว => ออกคำสั่่ง

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-06-10 18:15:27 +07:00
parent ba64953315
commit 79caf784ac
2 changed files with 28 additions and 2 deletions

View file

@ -28,6 +28,12 @@ const { statusText } = useRegistryEmp();
/**props*/
const modal = defineModel<boolean>("modal", { required: true });
const props = defineProps({
fetchData: {
type: Function,
require: true,
},
});
const filter = ref<string>("");
const rows = ref<DataEmployee[]>([]);
@ -165,7 +171,27 @@ function onClickSendOrder() {
dialogConfirm(
$q,
() => {
closeDialog();
showLoader();
let pId: string[] = [];
selected.value.forEach((e: any) => {
pId.push(e.id);
});
let data = {
id: pId,
};
http
.post(config.API.organizationEmployeeSendOrder, data)
.then(() => {
success($q, "บันทึกสำเร็จ");
closeDialog();
props?.fetchData?.();
})
.catch((err) => {
messageError($q, err);
})
.finally(async () => {
hideLoader();
});
},
"ยื่นยันการส่งรายชื่อไปออกคำสั่ง",
"ต้องการยืนยันการส่งรายชื่อไปออกคำสั่งนี้หรือไม่ ?"