91 lines
2.8 KiB
TypeScript
91 lines
2.8 KiB
TypeScript
import { AlimtalkAlimCl, AlimtalkSearchCl, AlimTalkSendCl, AlimtalkSendType, ServiceCode } from "./types";
|
|
|
|
export const AlimtalkSearchClOptionGroup = [
|
|
{ name: '주문자', value: AlimtalkSearchCl.BUYER_NAME },
|
|
{ name: 'TID', value: AlimtalkSearchCl.TID },
|
|
];
|
|
|
|
export const AlimtalkServiceCodeOptionGroup = [
|
|
{ name: '전체', value: '' },
|
|
{ name: '카드', value: ServiceCode.CARD },
|
|
{ name: '계좌이체', value: ServiceCode.BANK },
|
|
{ name: '가상계좌', value: ServiceCode.VBANK },
|
|
{ name: '휴대폰', value: ServiceCode.PHONE }
|
|
]
|
|
|
|
// 알림구분 - 카드/계좌이체/휴대폰용
|
|
export const AlimtalkAlimClBtnGroupForGeneral = [
|
|
{ name: '전체', value: '' },
|
|
{ name: '승인', value: AlimtalkAlimCl.APPROVAL },
|
|
{ name: '취소', value: AlimtalkAlimCl.CANCEL }
|
|
]
|
|
|
|
// 알림구분 - 가상계좌용
|
|
export const AlimtalkAlimClBtnGroupForVBank = [
|
|
{ name: '전체', value: '' },
|
|
{ name: '입금요청', value: AlimtalkAlimCl.DEPOSIT_REQUEST },
|
|
{ name: '입금완료', value: AlimtalkAlimCl.DEPOSIT_COMPLETE },
|
|
{ name: '환불', value: AlimtalkAlimCl.REFUND }
|
|
]
|
|
|
|
export const AlimtalkSendTypeBtnGroup = [
|
|
{ name: '전체', value: AlimtalkSendType.ALL },
|
|
{ name: '카카오톡', value: AlimtalkSendType.KAKAOTALK },
|
|
{ name: 'FB SMS', value: AlimtalkSendType.FB_SMS }
|
|
]
|
|
|
|
export const AlimtalkSendClBtnGroup = [
|
|
{ name: '전체', value: AlimTalkSendCl.ALL },
|
|
{ name: '요청', value: AlimTalkSendCl.REQUEST },
|
|
{ name: '성공', value: AlimTalkSendCl.SUCCESS },
|
|
{ name: '실패', value: AlimTalkSendCl.FAIL }
|
|
]
|
|
|
|
export const getAlimtalkAlimClText = (status?: string): string => {
|
|
if (!status) return '';
|
|
|
|
const alimClMap: Record<string, string> = {
|
|
'APPROVAL' : '승인',
|
|
'CANCEL' : '취소',
|
|
'DEPOSIT_REQUEST' : '입금요청',
|
|
'DEPOSIT_COMPLETE' : '입금완료',
|
|
'REFUND' : '환불'
|
|
}
|
|
return alimClMap[status] || status;
|
|
|
|
}
|
|
|
|
export const getAlimtalkSendTypeText = (status?: string): string => {
|
|
if (!status) return '';
|
|
|
|
const sendTypeMap: Record<string, string> = {
|
|
"KAKAOTALK": '카카오톡',
|
|
'FB SMS': '페이스북',
|
|
};
|
|
|
|
return sendTypeMap[status] || status;
|
|
}
|
|
|
|
export const getAlimtalkSendClTypeText = (status?: string): string => {
|
|
if (!status) return '';
|
|
|
|
const sendClMap: Record<string, string> = {
|
|
'REQUEST': '요청',
|
|
'SUCCESS': '성공',
|
|
'FAIL': '실패'
|
|
};
|
|
return sendClMap[status] || status;
|
|
}
|
|
|
|
export const getAlimtalkServiceCodeText = (status?: string): string => {
|
|
if (!status) return '';
|
|
|
|
const serviceCodeMap: Record<string, string> = {
|
|
'01': '카드',
|
|
'02': '신용카드',
|
|
'03': '가상계좌',
|
|
'05': '휴대폰'
|
|
}
|
|
|
|
return serviceCodeMap[status] || status;
|
|
} |