알림톡 리스트
This commit is contained in:
@@ -5,7 +5,7 @@ import { CBDCAxiosError } from '@/shared/@types/error';
|
||||
import {
|
||||
ExtensionAlimtalkDetailParams,
|
||||
ExtensionAlimtalkDetailResponse
|
||||
} from '../model/types';
|
||||
} from '../../model/alimtalk/types';
|
||||
import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
@@ -5,7 +5,7 @@ import { CBDCAxiosError } from '@/shared/@types/error';
|
||||
import {
|
||||
ExtensionAlimtalkDownloadExcelParams,
|
||||
ExtensionAlimtalkDownloadExcelResponse
|
||||
} from '../model/types';
|
||||
} from '../../model/alimtalk/types';
|
||||
import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
@@ -5,7 +5,7 @@ import { CBDCAxiosError } from '@/shared/@types/error';
|
||||
import {
|
||||
ExtensionAlimtalkListParams,
|
||||
ExtensionAlimtalkListResponse
|
||||
} from '../model/types';
|
||||
} from '../../model/alimtalk/types';
|
||||
import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
@@ -5,7 +5,7 @@ import { CBDCAxiosError } from '@/shared/@types/error';
|
||||
import {
|
||||
ExtensionAlimtalkSettingDetailParams,
|
||||
ExtensionAlimtalkSettingDetailResponse
|
||||
} from '../model/types';
|
||||
} from '../../model/alimtalk/types';
|
||||
import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
@@ -5,7 +5,8 @@ import { CBDCAxiosError } from '@/shared/@types/error';
|
||||
import {
|
||||
ExtensionAlimtalkSettingSaveParams,
|
||||
ExtensionAlimtalkSettingSaveResponse
|
||||
} from '../model/types';
|
||||
} from '../../model/alimtalk/types';
|
||||
|
||||
import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
118
src/entities/additional-service/model/alimtalk/types.ts
Normal file
118
src/entities/additional-service/model/alimtalk/types.ts
Normal file
@@ -0,0 +1,118 @@
|
||||
import { DefaulResponsePagination, DefaultRequestPagination } from '@/entities/common/model/types';
|
||||
|
||||
export enum AlimtalkSearchCl {
|
||||
BUYER_NAME = 'BUYER_NAME',
|
||||
TID = 'TID'
|
||||
};
|
||||
export enum AlimtalkAlimCl {
|
||||
DEPOSIT_REQUEST = 'DEPOSIT_REQUEST',
|
||||
DEPOSIT_COMPLETE = 'DEPOSIT_COMPLETE',
|
||||
REFUND = 'REFUND',
|
||||
APPROVAL = 'APPROVAL',
|
||||
CANCEL = 'CANCEL'
|
||||
};
|
||||
export enum AlimtalkSendType {
|
||||
ALL = 'ALL',
|
||||
KAKAOTALK = 'KAKAOTALK',
|
||||
FB_SMS = 'FB_SMS'
|
||||
};
|
||||
export enum AlimTalkSendCl {
|
||||
ALL = 'ALL',
|
||||
REQUEST = 'REQUEST',
|
||||
SUCCESS = 'SUCCESS',
|
||||
FAIL = 'FAIL'
|
||||
};
|
||||
export interface ExtensionAlimtalkSettingSaveParams {
|
||||
mid: string;
|
||||
sendMerchantInfo: SendMerchantInfo;
|
||||
sendUserInfo: SendUserInfo;
|
||||
};
|
||||
|
||||
export interface ExtensionAlimtalkSettingSaveResponse {};
|
||||
|
||||
export interface ExtensionAlimtalkSettingDetailParams {
|
||||
mid: string;
|
||||
};
|
||||
|
||||
export interface ExtensionAlimtalkSettingDetailResponse extends DefaulResponsePagination {
|
||||
content: Array<AlimtalkSettingDetailContent>
|
||||
};
|
||||
export interface AlimtalkSettingDetailContent {
|
||||
sendMerchantInfo: SendMerchantInfo,
|
||||
sendUserInfo: SendUserInfo
|
||||
};
|
||||
export interface SendMerchantInfo {
|
||||
cardApprovalFlag: boolean;
|
||||
cardCancelFlag: boolean;
|
||||
bankApprovalFlag: boolean;
|
||||
bankCancelFlag: boolean;
|
||||
virtureAccountDepositRequestFlag: boolean;
|
||||
virtureAccountDepositCompleteFlag: boolean;
|
||||
virtureAccountRefundFlag: boolean;
|
||||
};
|
||||
export interface SendUserInfo {
|
||||
cardApprovalFlag: boolean;
|
||||
cardCancelFlag: boolean;
|
||||
bankApprovalFlag: boolean;
|
||||
bankCancelFlag: boolean;
|
||||
virtureAccountDepositRequestFlag: boolean;
|
||||
virtureAccountDepositCompleteFlag: boolean;
|
||||
virtureAccountRefundFlag: boolean;
|
||||
};
|
||||
|
||||
export interface ExtensionAlimtalkListParams {
|
||||
mid?: string;
|
||||
searchCl?: AlimtalkSearchCl;
|
||||
searchValue?: string;
|
||||
paymentMethod?: string;
|
||||
alimCl?: AlimtalkAlimCl;
|
||||
fromDate?: string;
|
||||
toDate?: string;
|
||||
sendType?: AlimtalkSendType;
|
||||
sendCl?: AlimTalkSendCl;
|
||||
page?: DefaultRequestPagination;
|
||||
};
|
||||
export interface ExtensionAlimtalkListResponse extends DefaulResponsePagination {
|
||||
content: Array<AlimtalkListContent>
|
||||
};
|
||||
export interface AlimtalkListContent {
|
||||
tid?: string;
|
||||
sendDate?: string;
|
||||
alimCl?: AlimtalkAlimCl;
|
||||
sendType?: AlimtalkSendType;
|
||||
sendCl?: AlimTalkSendCl;
|
||||
paymentMethod?: string;
|
||||
receiverName?: string;
|
||||
};
|
||||
export interface ExtensionAlimtalkDownloadExcelParams {
|
||||
mid?: string;
|
||||
searchCl?: AlimtalkSearchCl;
|
||||
searchValue?: string;
|
||||
paymentMethod?: string;
|
||||
alimCl?: AlimtalkAlimCl;
|
||||
fromDate?: string;
|
||||
toDate?: string;
|
||||
sendType?: AlimtalkSendType;
|
||||
sendCl?: AlimTalkSendCl;
|
||||
};
|
||||
|
||||
export interface ExtensionAlimtalkDownloadExcelResponse {};
|
||||
|
||||
export interface ExtensionAlimtalkDetailParams {
|
||||
mid: string;
|
||||
tid: string;
|
||||
};
|
||||
|
||||
export interface ExtensionAlimtalkDetailResponse {
|
||||
receiverName: string;
|
||||
merchantName: string;
|
||||
sendDate: string;
|
||||
mid: string;
|
||||
tid: string;
|
||||
serviceName: string;
|
||||
sendType: AlimtalkSendType;
|
||||
senderName: string;
|
||||
paymentMethod: string;
|
||||
alimCl: AlimtalkAlimCl;
|
||||
sendCl: AlimTalkSendCl;
|
||||
};
|
||||
@@ -1,8 +1,8 @@
|
||||
import { DefaulResponsePagination, DefaultRequestPagination } from '@/entities/common/model/types';
|
||||
import { PayoutContent } from './payout/types';
|
||||
import { P } from 'node_modules/framer-motion/dist/types.d-Cjd591yU';
|
||||
import { FundAccountResultContentItem, FundAccountTransferContentItem } from './fund-account/types';
|
||||
import { FundAccountTransferContentItem, FundAccountResultContentItem } from './fund-account/types';
|
||||
import { ArsListContent } from './ars/types';
|
||||
import { AlimtalkListContent } from './alimtalk/types';
|
||||
|
||||
// ========================================
|
||||
// 공통 Enums 및 타입들
|
||||
@@ -37,6 +37,7 @@ export enum AdditionalServiceCategory {
|
||||
SMSPayment = 'SMSPayment',
|
||||
Payout = 'Payout',
|
||||
Ars = 'Ars',
|
||||
Alimtalk = 'Alimtalk',
|
||||
}
|
||||
|
||||
// ========================================
|
||||
@@ -392,7 +393,8 @@ export interface ListItemProps extends
|
||||
AccountHolderAuthListItem, LinkPaymentHistoryListItem,
|
||||
LinkPaymentWaitListItem,
|
||||
PayoutContent, FundAccountTransferContentItem,
|
||||
ArsListContent {
|
||||
FundAccountResultContentItem,
|
||||
ArsListContent, AlimtalkListContent {
|
||||
additionalServiceCategory?: AdditionalServiceCategory;
|
||||
mid?: string
|
||||
}
|
||||
@@ -777,107 +779,6 @@ export interface ExtensionSmsDetailResponse {
|
||||
}
|
||||
// ========================================
|
||||
|
||||
// 알림톡 확장 서비스
|
||||
// ========================================
|
||||
export interface SendMerchantInfoItem {
|
||||
cardApprovalFlag: boolean;
|
||||
cardCancelFlag: boolean;
|
||||
bankApprovalFlag: boolean;
|
||||
bankCancelFlag: boolean;
|
||||
virtureAccountDepositRequestFlag: boolean;
|
||||
virtureAccountDepositCompleteFlag: boolean;
|
||||
virtureAccountRefundFlag: boolean;
|
||||
}
|
||||
|
||||
export interface SendUserInfoItem {
|
||||
cardApprovalFlag: boolean;
|
||||
cardCancelFlag: boolean;
|
||||
bankApprovalFlag: boolean;
|
||||
bankCancelFlag: boolean;
|
||||
virtureAccountDepositRequestFlag: boolean;
|
||||
virtureAccountDepositCompleteFlag: boolean;
|
||||
virtureAccountRefundFlag: boolean;
|
||||
}
|
||||
|
||||
export interface ExtensionAlimtalkSettingSaveParams extends ExtensionRequestParams {
|
||||
sendMerchantInfo: SendMerchantInfoItem;
|
||||
sendUserInfo: SendUserInfoItem;
|
||||
}
|
||||
|
||||
export interface ExtensionAlimtalkSettingSaveResponse {
|
||||
|
||||
}
|
||||
|
||||
export interface ExtensionAlimtalkSettingDetailParams extends ExtensionRequestParams {
|
||||
|
||||
}
|
||||
|
||||
export interface ExtensionAlimtalkSettingDetailItem {
|
||||
sendMerchantInfo: SendMerchantInfoItem;
|
||||
sendUserInfo: SendUserInfoItem;
|
||||
}
|
||||
|
||||
export interface ExtensionAlimtalkSettingDetailResponse extends DefaulResponsePagination {
|
||||
content: Array<ExtensionAlimtalkSettingDetailItem>
|
||||
}
|
||||
|
||||
export interface ExtensionAlimtalkListParams extends ExtensionRequestParams {
|
||||
searchCl: string;
|
||||
searchValue: string;
|
||||
paymentMethod: string;
|
||||
alimCl: string;
|
||||
fromDate: string;
|
||||
toDate: string;
|
||||
sendType: string;
|
||||
sendCl: string;
|
||||
}
|
||||
|
||||
export interface ExtensionAlimtalkListItem {
|
||||
tid: string;
|
||||
sendDate: string;
|
||||
alimCl: string;
|
||||
sendType: string;
|
||||
sendCl: string;
|
||||
paymentMethod: string;
|
||||
receiverName: string;
|
||||
}
|
||||
|
||||
export interface ExtensionAlimtalkListResponse extends DefaulResponsePagination {
|
||||
content: Array<ExtensionAlimtalkListItem>
|
||||
}
|
||||
|
||||
export interface ExtensionAlimtalkDownloadExcelParams extends ExtensionRequestParams {
|
||||
searchCl: string;
|
||||
searchValue: string;
|
||||
paymentMethod: string;
|
||||
alimCl: string;
|
||||
fromDate: string;
|
||||
toDate: string;
|
||||
sendType: string;
|
||||
sendCl: string;
|
||||
}
|
||||
|
||||
export interface ExtensionAlimtalkDownloadExcelResponse {
|
||||
|
||||
}
|
||||
|
||||
export interface ExtensionAlimtalkDetailParams extends ExtensionRequestParams {
|
||||
tid: string;
|
||||
}
|
||||
|
||||
export interface ExtensionAlimtalkDetailResponse {
|
||||
receiverName: string;
|
||||
merchantName: string;
|
||||
sendDate: string;
|
||||
mid: string;
|
||||
tid: string;
|
||||
serviceName: string;
|
||||
sendType: string;
|
||||
senderName: string;
|
||||
paymentMethod: string;
|
||||
alimCl: string;
|
||||
sendCl: string;
|
||||
}
|
||||
|
||||
// 확장 서비스 목록 관련
|
||||
export interface ExtensionListParams extends ExtensionRequestParams {
|
||||
|
||||
169
src/entities/additional-service/ui/filter/alimtalk-filter.tsx
Normal file
169
src/entities/additional-service/ui/filter/alimtalk-filter.tsx
Normal file
@@ -0,0 +1,169 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import { motion } from 'framer-motion';
|
||||
import { IMAGE_ROOT } from '@/shared/constants/common';
|
||||
import { FilterSelect } from '@/shared/ui/filter/select';
|
||||
import { FilterCalendar } from '@/shared/ui/filter/calendar';
|
||||
import { FilterButtonGroups } from '@/shared/ui/filter/button-groups';
|
||||
import { FilterRangeAmount } from '@/shared/ui/filter/range-amount';
|
||||
import {
|
||||
FilterMotionDuration,
|
||||
FilterMotionStyle,
|
||||
FilterMotionVariants
|
||||
} from '@/entities/common/model/constant';
|
||||
import moment from 'moment';
|
||||
import { FilterInput } from '@/shared/ui/filter/input';
|
||||
import { OrderStatus, PaymentStatus } from '../../model/ars/types';
|
||||
import { ArsOrderStatusBtnGroup, ArsPaymentStatusBtnGroup } from '../../model/ars/constant';
|
||||
|
||||
export interface AlimtalkFilterProps {
|
||||
filterOn: boolean;
|
||||
setFilterOn: (filterOn: boolean) => void;
|
||||
mid: string;
|
||||
moid: string;
|
||||
fromDate: string;
|
||||
toDate: string;
|
||||
paymentStatus: PaymentStatus;
|
||||
orderStatus: OrderStatus;
|
||||
minAmount?: number;
|
||||
maxAmount?: number;
|
||||
setMid: (mid: string) => void;
|
||||
setMoid: (moid: string) => void;
|
||||
setFromDate: (fromDate: string) => void;
|
||||
setToDate: (toDate: string) => void;
|
||||
setPaymentStatus: (paymentStatus: PaymentStatus) => void;
|
||||
setOrderStatus: (orderStatus: OrderStatus) => void;
|
||||
setMinAmount: (minAmount?: number) => void;
|
||||
setMaxAmount: (maxAmount?: number) => void;
|
||||
};
|
||||
|
||||
export const AlimtalkFilter = ({
|
||||
filterOn,
|
||||
setFilterOn,
|
||||
mid,
|
||||
moid,
|
||||
fromDate,
|
||||
toDate,
|
||||
paymentStatus,
|
||||
orderStatus,
|
||||
minAmount,
|
||||
maxAmount,
|
||||
setMid,
|
||||
setMoid,
|
||||
setFromDate,
|
||||
setToDate,
|
||||
setPaymentStatus,
|
||||
setOrderStatus,
|
||||
setMinAmount,
|
||||
setMaxAmount
|
||||
}: AlimtalkFilterProps) => {
|
||||
|
||||
const [filterMid, setFilterMid] = useState<string>(mid);
|
||||
const [filterMoid, setFilterMoid] = useState<string>(moid);
|
||||
const [filterFromDate, setFilterFromDate] = useState<string>(moment(fromDate).format('YYYY.MM.DD'));
|
||||
const [filterToDate, setFilterToDate] = useState<string>(moment(toDate).format('YYYY.MM.DD'));
|
||||
const [filterPaymentStatus, setFilterPaymentStatus] = useState<PaymentStatus>(paymentStatus);
|
||||
const [filterOrderStatus, setFilterOrderStatus] = useState<OrderStatus>(orderStatus);
|
||||
const [filterMinAmount, setFilterMinAmount] = useState<number | undefined>(minAmount);
|
||||
const [filterMaxAmount, setFilterMaxAmount] = useState<number | undefined>(maxAmount);
|
||||
|
||||
const onClickToClose = () => {
|
||||
setFilterOn(false);
|
||||
};
|
||||
|
||||
const onClickToSetFilter = () => {
|
||||
setMid(filterMid);
|
||||
setFilterMoid(filterMoid);
|
||||
setFromDate(filterFromDate);
|
||||
setToDate(filterToDate);
|
||||
setPaymentStatus(filterPaymentStatus);
|
||||
setOrderStatus(filterOrderStatus);
|
||||
setMinAmount(filterMinAmount);
|
||||
setMaxAmount(filterMaxAmount);
|
||||
onClickToClose();
|
||||
};
|
||||
|
||||
let MidOptions = [
|
||||
{name: 'nictest001m', value: 'nictest001m'}
|
||||
];
|
||||
|
||||
useEffect(() => {
|
||||
setFilterPaymentStatus(paymentStatus);
|
||||
}, [paymentStatus]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<motion.div
|
||||
id="fullMenuModal"
|
||||
className="full-menu-modal"
|
||||
initial="hidden"
|
||||
animate={ (filterOn)? 'visible': 'hidden' }
|
||||
variants={ FilterMotionVariants }
|
||||
transition={ FilterMotionDuration }
|
||||
style={ FilterMotionStyle }
|
||||
>
|
||||
<div className="full-menu-container">
|
||||
<div className="full-menu-header">
|
||||
<div className="full-menu-title center">필터</div>
|
||||
<div className="full-menu-actions">
|
||||
<button
|
||||
id="closeFullMenu"
|
||||
className="full-menu-close"
|
||||
>
|
||||
<img
|
||||
src={ IMAGE_ROOT + '/ico_close.svg' }
|
||||
alt="닫기"
|
||||
onClick={ () => onClickToClose() }
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div className="option-list pt-16">
|
||||
<FilterSelect
|
||||
title='가맹점'
|
||||
selectValue={ filterMid }
|
||||
selectSetter={ setFilterMid }
|
||||
selectOptions={ MidOptions }
|
||||
></FilterSelect>
|
||||
<FilterInput
|
||||
title='주문번호'
|
||||
inputValue={ filterMoid }
|
||||
inputSetter={ setFilterMoid }
|
||||
></FilterInput>
|
||||
<FilterCalendar
|
||||
title='조회기간'
|
||||
startDate={ filterFromDate }
|
||||
endDate={ filterToDate }
|
||||
setStartDate={ setFilterFromDate }
|
||||
setEndDate={ setFilterToDate }
|
||||
></FilterCalendar>
|
||||
<FilterButtonGroups
|
||||
title='결제상태'
|
||||
activeValue={ filterPaymentStatus }
|
||||
btnGroups={ ArsPaymentStatusBtnGroup }
|
||||
setter={ setFilterPaymentStatus }
|
||||
></FilterButtonGroups>
|
||||
<FilterButtonGroups
|
||||
title='주문상태'
|
||||
activeValue={ filterOrderStatus }
|
||||
btnGroups={ ArsOrderStatusBtnGroup }
|
||||
setter={ setFilterOrderStatus }
|
||||
></FilterButtonGroups>
|
||||
<FilterRangeAmount
|
||||
title='거래금액'
|
||||
minAmount={ filterMinAmount }
|
||||
maxAmount={ filterMaxAmount }
|
||||
setMinAmount={ setFilterMinAmount }
|
||||
setMaxAmount={ setFilterMaxAmount }
|
||||
></FilterRangeAmount>
|
||||
</div>
|
||||
<div className="apply-row">
|
||||
<button
|
||||
className="btn-50 btn-blue flex-1"
|
||||
onClick={ () => onClickToSetFilter() }
|
||||
>적용</button>
|
||||
</div>
|
||||
</div>
|
||||
</motion.div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
@@ -57,6 +57,12 @@ export const ListDateGroup = ({
|
||||
|
||||
orderStatus={ items[i]?.orderStatus }
|
||||
arsPaymentMethod={ items[i]?.arsPaymentMethod }
|
||||
|
||||
alimCl={ items[i]?.alimCl }
|
||||
sendType={ items[i]?.sendType }
|
||||
sendCl={ items[i]?.sendCl }
|
||||
paymentMethod={ items[i]?.paymentMethod }
|
||||
receiverName={ items[i]?.receiverName }
|
||||
></ListItem>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -22,7 +22,10 @@ export const ListItem = ({
|
||||
receiveAccountNo, receiveAccountName,
|
||||
status, processDate,
|
||||
|
||||
orderStatus, arsPaymentMethod
|
||||
orderStatus, arsPaymentMethod,
|
||||
|
||||
alimCl, sendType, sendCl,
|
||||
paymentMethod, receiverName
|
||||
}: ListItemProps) => {
|
||||
const { navigate } = useNavigate();
|
||||
const getItemClass = () => {
|
||||
@@ -183,6 +186,15 @@ export const ListItem = ({
|
||||
}
|
||||
});
|
||||
}
|
||||
else if (additionalServiceCategory === AdditionalServiceCategory.Alimtalk){
|
||||
navigate(PATHS.additionalService.alimtalk.detail, {
|
||||
state: {
|
||||
additionalServiceCategory: additionalServiceCategory,
|
||||
mid: mid,
|
||||
tid: tid,
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
alert('additionalServiceCategory가 존재하지 않습니다.');
|
||||
}
|
||||
@@ -212,6 +224,10 @@ export const ListItem = ({
|
||||
let time = paymentDate?.substring(8, 12);
|
||||
timeStr = time?.substring(0, 2) + ':' + time?.substring(2, 4);
|
||||
}
|
||||
else if (additionalServiceCategory === AdditionalServiceCategory.Alimtalk){
|
||||
let time = paymentDate?.substring(8, 12);
|
||||
timeStr = time?.substring(0, 2) + ':' + time?.substring(2, 4);
|
||||
}
|
||||
else {
|
||||
return
|
||||
}
|
||||
@@ -250,6 +266,9 @@ export const ListItem = ({
|
||||
else if(additionalServiceCategory === AdditionalServiceCategory.Ars){
|
||||
str = '이름(' + tid + ')';
|
||||
}
|
||||
else if(additionalServiceCategory === AdditionalServiceCategory.Alimtalk){
|
||||
str = `${receiverName}(${tid})`;
|
||||
}
|
||||
|
||||
return str;
|
||||
};
|
||||
@@ -353,6 +372,17 @@ export const ListItem = ({
|
||||
</div>
|
||||
);
|
||||
}
|
||||
else if(additionalServiceCategory === AdditionalServiceCategory.Alimtalk){
|
||||
rs.push(
|
||||
<div className="transaction-details">
|
||||
<span>{ getTime() }</span>
|
||||
<span className="separator">|</span>
|
||||
<span>{ paymentMethod }</span>
|
||||
<span className="separator">|</span>
|
||||
<span>{ alimCl }</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
return rs;
|
||||
};
|
||||
|
||||
@@ -458,6 +488,14 @@ export const ListItem = ({
|
||||
</div>
|
||||
);
|
||||
}
|
||||
else if (additionalServiceCategory === AdditionalServiceCategory.Alimtalk) {
|
||||
rs.push(
|
||||
<div
|
||||
key="payout-item-amount"
|
||||
className="transaction-amount"
|
||||
>{ sendCl }</div>
|
||||
);
|
||||
}
|
||||
return rs;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user