From 469f71d8bf48e00b0c9ab3ae283282c482bbf5e9 Mon Sep 17 00:00:00 2001
From: HelenHuang <LinHuang@pollex.com.tw>
Date: 星期一, 17 一月 2022 12:18:13 +0800
Subject: [PATCH] update: 預約清單 - 傳送約訪通知後,顯示確認提示後刷新預約清單

---
 PAMapp/components/Interview/InterviewMsg.vue |   32 ++++++++++++++++++++++++++++----
 1 files changed, 28 insertions(+), 4 deletions(-)

diff --git a/PAMapp/components/Interview/InterviewMsg.vue b/PAMapp/components/Interview/InterviewMsg.vue
index d37ea38..62d0453 100644
--- a/PAMapp/components/Interview/InterviewMsg.vue
+++ b/PAMapp/components/Interview/InterviewMsg.vue
@@ -30,16 +30,28 @@
       </div>
 
         </el-dialog>
+
+        <PopUpFrame
+        :isOpen.sync="isShowSuccessAlert">
+        <div class="text--middle invite-review">
+            <div class="mb-30 mt-10">撌脩��赤�</div>
+            <div class="text--primary text--middle cursor--pointer text--underline" @click="closeAllDialog " :size="'250px'">������</div>
+          </div>
+        </PopUpFrame>
   </div>
 </template>
 <script lang="ts">
-import { Vue, Component, Prop, PropSync, Emit } from 'nuxt-property-decorator';
+import { Vue, Component, Prop, PropSync, Emit, Action } from 'nuxt-property-decorator';
 
 import appointmentService from '~/shared/services/appointment.service';
 import { Appointment, ToInformAppointment } from '~/shared/models/appointment.model';
 
 @Component
 export default class InterviewMsg extends Vue {
+
+    @Action
+    storeMyAppointmentList!: () => Promise<number>;
+
     @PropSync('isVisible')
     dialogVisible!: boolean;
 
@@ -54,12 +66,15 @@
         return;
     }
 
+    isShowSuccessAlert = false;
+
     interviewTxt = "";
     interviewTime = '';
 
     //////////////////////////////////////////////////////////////////////
 
     addInterview() {
+      console.log('client', this.client);
       const appointmentInformation: ToInformAppointment = {
         appointmentId: this.client.id,
         email        : this.client?.email,
@@ -68,9 +83,14 @@
         phone        : this.client?.phone,
       };
       appointmentService.informAppointment(appointmentInformation).then((_) => {
-        // TODO: close dialog after confirm success msg drawer (assign to Helen)[Tomas, 2022/1/17 11:21];
-        this.dialogVisible = false;
+        this.isShowSuccessAlert = true ;
       });
+    }
+
+    closeAllDialog() {
+      this.isShowSuccessAlert = false ;
+      this.dialogVisible = false;
+      this.storeMyAppointmentList();
     }
 
 }
@@ -103,5 +123,9 @@
   display: flex;
   justify-content: center;
 }
-
+.invite-review{
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+  }
 </style>

--
Gitblit v1.8.0