ระบบประเมิน แก้ไขการเช็ค index ของการตรวจสอบคุณสมบัติ ผลงานที่เคยเสนอขอประเมิน
This commit is contained in:
parent
b720074409
commit
1db13be8b0
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue