| | |
| | | import { http } from "./httpClient"; |
| | | |
| | | import { UserReviewsConsultantsParams } from "../models/reviews.model"; |
| | | import { NotificationList, UserReviewsConsultantsParams } from "../models/reviews.model"; |
| | | import { AppointmentLog } from "../models/appointment.model"; |
| | | |
| | | class ReviewsService { |
| | | |
| | | //客戶進行滿意度評分 |
| | | //客戶進行滿意度評分(單筆) |
| | | userReviewsConsultants(data: UserReviewsConsultantsParams) { |
| | | return http.post('/satisfaction/create', data ); |
| | | return http.post('/satisfaction/score', data); |
| | | } |
| | | |
| | | // 客戶進行滿意度(多筆) |
| | | allUserReviewsConsultants(data: UserReviewsConsultantsParams[]) { |
| | | return http.post('/satisfaction/score/all', data); |
| | | } |
| | | |
| | | |
| | | //取得所有評分紀錄 |
| | | async getMyReviewLog(): Promise<AppointmentLog[]> { |
| | | return http.get('/satisfaction/getMySatisfaction').then(res => res.data); |
| | | } |
| | | |
| | | // 顧問主動發送滿意度通知 |
| | | sendSatisfactionToClient(appointmentId: number) { |
| | | return http.post(`/consultant/sendSatisfactionToClient/${appointmentId}`).then((res) => res); |
| | | } |
| | | |
| | | // 通知小鈴鐺 |
| | | getMyPersonalNotification(): Promise<NotificationList[]> { |
| | | return http.get('/personal_notification/getMyPersonalNotification').then(res => res.data); |
| | | } |
| | | |
| | | // 目前登入者的所有小鈴鐺通知設定為已讀 |
| | | readAllMyNotification() { |
| | | return http.post('/personal_notification/readAllMyNotification') |
| | | } |
| | | } |
| | | |
| | | export default new ReviewsService(); |