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];
|
})
|