-부가서비스 : 링크결제 - 발송내역 리스트 목업 API 연동
This commit is contained in:
49
src/entities/additional-service/lib/payment-status-utils.ts
Normal file
49
src/entities/additional-service/lib/payment-status-utils.ts
Normal file
@@ -0,0 +1,49 @@
|
||||
export const getPaymentStatusText = (status?: string): string => {
|
||||
if (!status) return '';
|
||||
|
||||
const statusMap: Record<string, string> = {
|
||||
'ALL': '전체',
|
||||
'ACTIVE': '미완료/활성화',
|
||||
'DEPOSIT_REQUEST': '입금요청',
|
||||
'PAYMENT_COMPLETE': '결제완료',
|
||||
'PAYMENT_FAIL': '결제실패',
|
||||
'INACTIVE': '결제중단/비활성화'
|
||||
};
|
||||
|
||||
return statusMap[status] || status;
|
||||
};
|
||||
|
||||
export const getProcessStatusText = (status?: string): string => {
|
||||
if (!status) return '';
|
||||
|
||||
const processStatusMap: Record<string, string> = {
|
||||
'SEND_REQUEST': '발송요청',
|
||||
'SEND_CANCEL': '발송취소',
|
||||
'PENDING': '대기중'
|
||||
};
|
||||
|
||||
return processStatusMap[status] || status;
|
||||
};
|
||||
|
||||
export const getSendMethodText = (method?: string): string => {
|
||||
if (!method) return '';
|
||||
|
||||
const sendMethodMap: Record<string, string> = {
|
||||
'SMS': 'SMS',
|
||||
'EMAIL': '이메일',
|
||||
'KAKAO': '알림톡'
|
||||
};
|
||||
|
||||
return sendMethodMap[method] || method;
|
||||
};
|
||||
|
||||
export const getResultStatusText = (status?: string): string => {
|
||||
if (!status) return '';
|
||||
|
||||
const resultStatusMap: Record<string, string> = {
|
||||
'SUCCESS': '성공',
|
||||
'FAIL': '실패'
|
||||
};
|
||||
|
||||
return resultStatusMap[status] || status;
|
||||
};
|
||||
Reference in New Issue
Block a user