From 8ba0f302d3e7f13edafe6d7327e74d77859775cc Mon Sep 17 00:00:00 2001
From: jack <jack.su@pollex.com.tw>
Date: 星期三, 13 九月 2023 16:21:04 +0800
Subject: [PATCH] [UPDATE] 移除sys out

---
 PAMapp/components/Interview/InterviewAdd.vue |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/PAMapp/components/Interview/InterviewAdd.vue b/PAMapp/components/Interview/InterviewAdd.vue
index 5064c77..8107e6b 100644
--- a/PAMapp/components/Interview/InterviewAdd.vue
+++ b/PAMapp/components/Interview/InterviewAdd.vue
@@ -178,17 +178,25 @@
         });
     }
 
-    private updateRecord(updateInterviewRecord) {
-        appointmentService.updateInterviewRecord(updateInterviewRecord).then(res => {
-            this.showPopUp('蝺刻摩����');
-        });
+  private async updateRecord(updateInterviewRecord) {
+    try {
+      const response = await appointmentService.updateInterviewRecord(updateInterviewRecord);
+      if (response !== null) {
+        this.showPopUp('蝺刻摩����');
+      } else {
+        throw new Error('appointmentService.updateInterviewRecord returned null-like value.');
+      }
+    } catch (error) {
+      console.error('An error occurred while updating interview record:', error);
+      throw error;
     }
+  }
 
     private showPopUp(confirmTxt) {
         this.confirmTxt = confirmTxt;
         this.updateAppointmentDetail(+this.appointmentId);
 
-        if (new Date(this.interviewTime).getTime() >= new Date().getTime()) {
+        if (new Date(this.interviewTime).getTime() >= new Date().getTime() && (!this.appointmentDetail.appointmentClosedInfo)) {
             this.showFutureDateConfirmPopup = true;
         } else {
             this.showConfirmPopup = true;

--
Gitblit v1.8.0