From 1592d266eb7cea3a096c17d4ae3c0d01c679da7b Mon Sep 17 00:00:00 2001 From: Mila <Mila@pollex.com.tw> Date: 星期五, 21 一月 2022 16:15:01 +0800 Subject: [PATCH] update: TODO#134585 串接 顧問主動發送滿意度 API --- PAMapp/components/Client/ClientCard.vue | 6 +++++- PAMapp/shared/services/reviews.service.ts | 4 ++-- PAMapp/pages/appointment/_appointmentId/index.vue | 9 ++++++++- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/PAMapp/components/Client/ClientCard.vue b/PAMapp/components/Client/ClientCard.vue index cfe5154..2200975 100644 --- a/PAMapp/components/Client/ClientCard.vue +++ b/PAMapp/components/Client/ClientCard.vue @@ -179,6 +179,7 @@ import { ElRow } from 'element-ui/types/row'; import { Appointment, AppointmentMemoInfo } from '~/shared/models/appointment.model'; import { ContactStatus } from '~/shared/models/enum/contact-status'; +import reviewsService from '~/shared/services/reviews.service'; const appointmentStore = namespace('appointment.store'); const localStorage = namespace('localStorage'); @@ -271,7 +272,10 @@ } inviteReview(): void { - this.isShowInviteReviewDialog = true ; + reviewsService.sendSatisfactionToClient(this.client.id).then(res => { + this.isShowInviteReviewDialog = true ; + }) + } openDetail() { diff --git a/PAMapp/pages/appointment/_appointmentId/index.vue b/PAMapp/pages/appointment/_appointmentId/index.vue index 51f97ed..c386f9f 100644 --- a/PAMapp/pages/appointment/_appointmentId/index.vue +++ b/PAMapp/pages/appointment/_appointmentId/index.vue @@ -51,7 +51,7 @@ </div> <div class="client-detail-action" v-if="showWhenAppointmentHasClosed"> - <el-button >��遛��漲</el-button> + <el-button @click="inviteReview">��遛��漲</el-button> </div> <div class="client-detail-action" v-else> @@ -88,6 +88,9 @@ import { Appointment } from '~/shared/models/appointment.model'; import { ContactStatus } from '~/shared/models/enum/contact-status'; + +import reviewsService from '~/shared/services/reviews.service'; + const appointmentStore = namespace('appointment.store'); @@ -133,6 +136,10 @@ const result = hopeContactTimeString.replace("'", '').split('��'); return result; } + + inviteReview(): void { + reviewsService.sendSatisfactionToClient(this.appointmentDetail.id).then(res => res); + } } </script> diff --git a/PAMapp/shared/services/reviews.service.ts b/PAMapp/shared/services/reviews.service.ts index eea9380..be34328 100644 --- a/PAMapp/shared/services/reviews.service.ts +++ b/PAMapp/shared/services/reviews.service.ts @@ -16,8 +16,8 @@ } // 憿批�蜓���遛��漲� - sendSatisfactionToClient(appointmentId: number): void { - http.post('/consultant/sendSatisfactionToClient/').then((res) => res); + sendSatisfactionToClient(appointmentId: number) { + return http.post(`/consultant/sendSatisfactionToClient/${appointmentId}`).then((res) => res); } } -- Gitblit v1.8.0