保誠-保戶業務員媒合平台
wayne
2022-02-17 a3716f72066d25d745f4d5103ff23a553c3e102b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import { http } from "./httpClient";
 
import { NotificationList, UserReviewPlatformRes, UserReviewParams } from "../models/reviews.model";
import { AppointmentLog } from "../models/appointment.model";
 
class ReviewsService {
 
  //客戶進行滿意度評分(單筆)
  userReviewsConsultants(data: UserReviewParams) {
    return http.post('/satisfaction/score', data);
  }
 
  // 客戶進行滿意度(多筆)
  allUserReviewsConsultants(data: UserReviewParams[]) {
    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')
  }
 
  // 客戶填寫平台滿意度
  reviewPlatform(params: UserReviewParams): Promise<UserReviewPlatformRes> {
    return http.post('/satisfaction/score', params);
  }
}
 
export default new ReviewsService();