保誠-保戶業務員媒合平台
Tomas
2023-09-14 e828225de7636d0195db2c3c9b1701a5b2f12049
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import Vue from 'vue'
import { appointmentFailReasonList } from '~/shared/const/appointment-fail-reason-list';
 
Vue.filter('toFailReasonLabel', (value: string): string => {
 
  if (!value ||  typeof value !== 'string') {
    return '--';
  };
 
  let failReasonLabel = {};
  appointmentFailReasonList.forEach((failReason) => {
    failReasonLabel[failReason.value] = failReason.key;
  });
 
  return  failReasonLabel[value];
})