รายการเงินเดือน => MessageNotif ย้ายขั้น

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-03-04 13:41:25 +07:00
parent cd5647cb10
commit 2a815f4f40
3 changed files with 23 additions and 4 deletions

View file

@ -14,8 +14,14 @@ import { useSalaryListSDataStore } from "@/modules/13_salary/store/SalaryListsSt
/** use*/
const $q = useQuasar();
const store = useSalaryListSDataStore();
const { dialogConfirm, success, messageError, showLoader, hideLoader } =
useCounterMixin();
const {
dialogConfirm,
success,
messageError,
showLoader,
hideLoader,
dialogMessageNotify,
} = useCounterMixin();
/**porps*/
const modal = defineModel<boolean>("modal", { required: true });
@ -48,7 +54,15 @@ const typeRangeOps = computed(() => {
/*** ฟังก์ชั่นสำหรับ validate ฟอร์ม */
function validateForm() {
if (typeRef.value.validate()) {
onSubmit();
if (
store.roundMainCode === "APR" &&
store.remaining === 0 &&
type.value === "FULL"
) {
dialogMessageNotify($q, "ไม่สามารถย้ายขั้นได้เนื่องจากโควตาลงเหลือไม่พอ");
} else {
onSubmit();
}
}
}