ระบบประเมิน แก้ไขการเช็ค index ของการตรวจสอบคุณสมบัติ ผลงานที่เคยเสนอขอประเมิน

This commit is contained in:
Warunee Tamkoo 2025-06-12 14:09:45 +07:00
parent b720074409
commit 1db13be8b0

View file

@ -249,7 +249,7 @@ function onOpenDialogPerformance(
stetusEdit: boolean = false,
index: number | null = null
) {
if (stetusEdit && index) {
if (stetusEdit && index !== null) {
isIndex.value = index;
const data = formDetail.assessments[index];
formPerformance.year = data.year ? Number(data.year) - 543 : null;
@ -276,7 +276,7 @@ function onSubmitPerformance() {
isAdd: true,
};
if (isEdit.value && isIndex.value) {
if (isEdit.value && isIndex.value !== null && isIndex.value !== undefined) {
formDetail.assessments[isIndex.value] = body;
} else {
formDetail.assessments.push(body);