保誠-保戶業務員媒合平台
HelenHuang
2022-01-17 469f71d8bf48e00b0c9ab3ae283282c482bbf5e9
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>