부가서비스: 계좌명 인증 상태 표시 및 날짜 선택기 개선
- AccountHolderAuth에서 transferStatus 기반 성공/실패 표시 추가 - SingleDatePicker 컴포넌트 생성 및 링크결제 Step1에 적용 - 각 리스트 아이템에 key prop 추가로 React 경고 해결 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,30 @@
|
|||||||
|
import axios from 'axios';
|
||||||
|
import { API_URL_ADDITIONAL_SERVICE } from '@/shared/api/api-url-additional-service';
|
||||||
|
import { resultify } from '@/shared/lib/resultify';
|
||||||
|
import { CBDCAxiosError } from '@/shared/@types/error';
|
||||||
|
import {
|
||||||
|
ExtensionAccountHolderAuthListParams,
|
||||||
|
ExtensionAccountHolderAuthListResponse,
|
||||||
|
ExtensionAccountHolderSearchListParams,
|
||||||
|
ExtensionAccountHolderSearchListResponse,
|
||||||
|
} from '../../model/types';
|
||||||
|
import {
|
||||||
|
useMutation,
|
||||||
|
UseMutationOptions
|
||||||
|
} from '@tanstack/react-query';
|
||||||
|
|
||||||
|
export const extensionAccountHolderAuthList = (params: ExtensionAccountHolderAuthListParams) => {
|
||||||
|
return resultify(
|
||||||
|
axios.post<ExtensionAccountHolderAuthListResponse>(API_URL_ADDITIONAL_SERVICE.extensionAccountHolderAuthList(), params),
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const useExtensionAccountHolderAuthListMutation = (options?: UseMutationOptions<ExtensionAccountHolderAuthListResponse, CBDCAxiosError, ExtensionAccountHolderAuthListParams>) => {
|
||||||
|
const mutation = useMutation<ExtensionAccountHolderAuthListResponse, CBDCAxiosError, ExtensionAccountHolderAuthListParams>({
|
||||||
|
...options,
|
||||||
|
mutationFn: (params: ExtensionAccountHolderAuthListParams) => extensionAccountHolderAuthList(params),
|
||||||
|
});
|
||||||
|
return {
|
||||||
|
...mutation,
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
import { AuthAndTransferStatus } from "../types";
|
||||||
|
|
||||||
|
export const authStatusBtnGroup = [
|
||||||
|
{ name: '전체', value: AuthAndTransferStatus.ALL },
|
||||||
|
{ name: '요청', value: AuthAndTransferStatus.REQUEST},
|
||||||
|
{ name: '성공', value: AuthAndTransferStatus.SUCCESS},
|
||||||
|
{ name: '실패', value: AuthAndTransferStatus.FAIL}
|
||||||
|
]
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
import { DefaulResponsePagination, DefaultRequestPagination } from '@/entities/common/model/types';
|
import { DefaulResponsePagination, DefaultRequestPagination } from '@/entities/common/model/types';
|
||||||
import { PayoutContent } from './payout/types';
|
import { PayoutContent } from './payout/types';
|
||||||
|
import { P } from 'node_modules/framer-motion/dist/types.d-Cjd591yU';
|
||||||
|
|
||||||
// ========================================
|
// ========================================
|
||||||
// 공통 Enums 및 타입들
|
// 공통 Enums 및 타입들
|
||||||
@@ -24,6 +25,7 @@ export interface SortOptionsBoxProps {
|
|||||||
// 부가서비스 카테고리 enum
|
// 부가서비스 카테고리 enum
|
||||||
export enum AdditionalServiceCategory {
|
export enum AdditionalServiceCategory {
|
||||||
KeyInPayment = 'KeyInPayment',
|
KeyInPayment = 'KeyInPayment',
|
||||||
|
AccountHolderAuth = 'AccountHolderAuth',
|
||||||
AccountHolderSearch = 'AccountHolderSearch',
|
AccountHolderSearch = 'AccountHolderSearch',
|
||||||
LinkPaymentHistory = 'LinkPaymentHistory',
|
LinkPaymentHistory = 'LinkPaymentHistory',
|
||||||
LinkPaymentPending = 'LinkPaymentPending',
|
LinkPaymentPending = 'LinkPaymentPending',
|
||||||
@@ -135,6 +137,28 @@ export interface KeyInPaymentFilterProps extends FilterProps {
|
|||||||
setMaxAmount: (maxAmount: string | number) => void;
|
setMaxAmount: (maxAmount: string | number) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ========================================
|
||||||
|
// 계좌 점유 조회 관련 타입들
|
||||||
|
// ========================================
|
||||||
|
export enum AuthAndTransferStatus {
|
||||||
|
ALL = "ALL",
|
||||||
|
REQUEST = "REQUEST",
|
||||||
|
SUCCESS = "SUCCESS",
|
||||||
|
FAIL = "FAIL"
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface AccountHolderAuthListItem {
|
||||||
|
tid?: string;
|
||||||
|
accountName?: string;
|
||||||
|
accountNo?: string;
|
||||||
|
requestDate?: string;
|
||||||
|
bankName?: string;
|
||||||
|
transferStatus?: AuthAndTransferStatus;
|
||||||
|
}
|
||||||
|
export interface AccountHolderAuthListProps {
|
||||||
|
listItems: Record<string, Array<ListItemProps>>;
|
||||||
|
mid: string;
|
||||||
|
}
|
||||||
// ========================================
|
// ========================================
|
||||||
// 계좌성명 조회 관련 타입들
|
// 계좌성명 조회 관련 타입들
|
||||||
// ========================================
|
// ========================================
|
||||||
@@ -353,7 +377,8 @@ export interface SettlementAgencyBottomAgreeProps {
|
|||||||
|
|
||||||
export interface ListItemProps extends
|
export interface ListItemProps extends
|
||||||
KeyInPaymentListItem, AccountHolderSearchListItem,
|
KeyInPaymentListItem, AccountHolderSearchListItem,
|
||||||
LinkPaymentHistoryListItem, LinkPaymentWaitListItem,
|
AccountHolderAuthListItem,LinkPaymentHistoryListItem,
|
||||||
|
LinkPaymentWaitListItem,
|
||||||
PayoutContent {
|
PayoutContent {
|
||||||
additionalServiceCategory?: AdditionalServiceCategory;
|
additionalServiceCategory?: AdditionalServiceCategory;
|
||||||
mid?: string
|
mid?: string
|
||||||
@@ -538,6 +563,19 @@ export interface ExtensionLinkPayWaitDeleteRespone {
|
|||||||
status: boolean
|
status: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 계좌 점유 인증 확장 서비스
|
||||||
|
// ========================================
|
||||||
|
export interface ExtensionAccountHolderAuthListParams extends ExtensionRequestParams {
|
||||||
|
fromDate: string;
|
||||||
|
toDate: string;
|
||||||
|
authStatus: String;
|
||||||
|
page?: DefaultRequestPagination;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ExtensionAccountHolderAuthListResponse extends DefaulResponsePagination {
|
||||||
|
content: Array<ListItemProps>
|
||||||
|
}
|
||||||
|
|
||||||
// 계좌 성명 조회 확장 서비스
|
// 계좌 성명 조회 확장 서비스
|
||||||
// ========================================
|
// ========================================
|
||||||
export interface ExtensionAccountHolderSearchListParams extends ExtensionRequestParams { // Request
|
export interface ExtensionAccountHolderSearchListParams extends ExtensionRequestParams { // Request
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
import { PATHS } from '@/shared/constants/paths';
|
||||||
|
import { ListDateGroup } from '../list-date-group';
|
||||||
|
import { AccountHolderAuthListProps, AdditionalServiceCategory } from '../../model/types';
|
||||||
|
|
||||||
|
export const AccountHolderAuthList = ({
|
||||||
|
listItems,
|
||||||
|
mid
|
||||||
|
}: AccountHolderAuthListProps) => {
|
||||||
|
|
||||||
|
const getListDateGroup = () => {
|
||||||
|
let rs = [];
|
||||||
|
for (const [key, value] of Object.entries(listItems)) {
|
||||||
|
rs.push(
|
||||||
|
<ListDateGroup
|
||||||
|
additionalServiceCategory={AdditionalServiceCategory.AccountHolderAuth}
|
||||||
|
key={key}
|
||||||
|
date={key}
|
||||||
|
items={value}
|
||||||
|
mid={mid}
|
||||||
|
></ListDateGroup>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
return rs;
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div className="transaction-list">
|
||||||
|
{getListDateGroup()}
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -30,7 +30,9 @@ export const ListDateGroup = ({
|
|||||||
paymentStatus={ items[i]?.paymentStatus}
|
paymentStatus={ items[i]?.paymentStatus}
|
||||||
requestDate={ items[i]?.requestDate }
|
requestDate={ items[i]?.requestDate }
|
||||||
bankName={ items[i]?.bankName}
|
bankName={ items[i]?.bankName}
|
||||||
|
accountName={ items[i]?.accountName}
|
||||||
accountNo={ items[i]?.accountNo }
|
accountNo={ items[i]?.accountNo }
|
||||||
|
transferStatus={ items[i]?.transferStatus}
|
||||||
resultStatus={ items[i]?.resultStatus }
|
resultStatus={ items[i]?.resultStatus }
|
||||||
|
|
||||||
amount={ items[i]?.amount }
|
amount={ items[i]?.amount }
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ export const ListItem = ({
|
|||||||
amount, sendDate, sendStatus, sendMethod,
|
amount, sendDate, sendStatus, sendMethod,
|
||||||
scheduledSendDate, processStatus,
|
scheduledSendDate, processStatus,
|
||||||
|
|
||||||
|
accountName,transferStatus,
|
||||||
|
|
||||||
submallId, settlementDate, companyName,
|
submallId, settlementDate, companyName,
|
||||||
disbursementStatus, disbursementAmount
|
disbursementStatus, disbursementAmount
|
||||||
}: ListItemProps) => {
|
}: ListItemProps) => {
|
||||||
@@ -51,6 +53,13 @@ export const ListItem = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
else if (additionalServiceCategory === AdditionalServiceCategory.AccountHolderAuth) {
|
||||||
|
if (transferStatus === "REQUEST" || transferStatus === "SUCCESS") {
|
||||||
|
rs = 'blue';
|
||||||
|
} else if (transferStatus === "FAIL") {
|
||||||
|
rs = 'gray';
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (additionalServiceCategory === AdditionalServiceCategory.AccountHolderSearch) {
|
else if (additionalServiceCategory === AdditionalServiceCategory.AccountHolderSearch) {
|
||||||
if (resultStatus === "SUCCESS") {
|
if (resultStatus === "SUCCESS") {
|
||||||
rs = 'blue';
|
rs = 'blue';
|
||||||
@@ -92,6 +101,15 @@ export const ListItem = ({
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else if (additionalServiceCategory === AdditionalServiceCategory.AccountHolderAuth) {
|
||||||
|
navigate(PATHS.additionalService.accountHolderAuth.detail, {
|
||||||
|
state: {
|
||||||
|
additionalServiceCategory: additionalServiceCategory,
|
||||||
|
mid: mid,
|
||||||
|
tid: tid
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
else if (additionalServiceCategory === AdditionalServiceCategory.AccountHolderSearch) {
|
else if (additionalServiceCategory === AdditionalServiceCategory.AccountHolderSearch) {
|
||||||
navigate(PATHS.additionalService.accountHolderSearch.detail, {
|
navigate(PATHS.additionalService.accountHolderSearch.detail, {
|
||||||
state: {
|
state: {
|
||||||
@@ -125,7 +143,7 @@ export const ListItem = ({
|
|||||||
else if (additionalServiceCategory === AdditionalServiceCategory.SettlementAgency) {
|
else if (additionalServiceCategory === AdditionalServiceCategory.SettlementAgency) {
|
||||||
|
|
||||||
}
|
}
|
||||||
else if(additionalServiceCategory === AdditionalServiceCategory.Payout){
|
else if (additionalServiceCategory === AdditionalServiceCategory.Payout) {
|
||||||
navigate(PATHS.additionalService.payout.detail, {
|
navigate(PATHS.additionalService.payout.detail, {
|
||||||
state: {
|
state: {
|
||||||
additionalServiceCategory: additionalServiceCategory,
|
additionalServiceCategory: additionalServiceCategory,
|
||||||
@@ -145,6 +163,10 @@ export const ListItem = ({
|
|||||||
let time = paymentDate?.substring(8, 12);
|
let time = paymentDate?.substring(8, 12);
|
||||||
timeStr = time?.substring(0, 2) + ':' + time?.substring(2, 4);
|
timeStr = time?.substring(0, 2) + ':' + time?.substring(2, 4);
|
||||||
}
|
}
|
||||||
|
else if (additionalServiceCategory === AdditionalServiceCategory.AccountHolderAuth) {
|
||||||
|
let time = requestDate?.substring(8, 14);
|
||||||
|
timeStr = time?.substring(0, 2) + ':' + time?.substring(2, 4) + ':' + time?.substring(4, 6);
|
||||||
|
}
|
||||||
else if (additionalServiceCategory === AdditionalServiceCategory.AccountHolderSearch) {
|
else if (additionalServiceCategory === AdditionalServiceCategory.AccountHolderSearch) {
|
||||||
let time = requestDate?.substring(8, 14);
|
let time = requestDate?.substring(8, 14);
|
||||||
timeStr = time?.substring(0, 2) + ':' + time?.substring(2, 4) + ':' + time?.substring(4, 6);
|
timeStr = time?.substring(0, 2) + ':' + time?.substring(2, 4) + ':' + time?.substring(4, 6);
|
||||||
@@ -160,11 +182,14 @@ export const ListItem = ({
|
|||||||
if (additionalServiceCategory === AdditionalServiceCategory.KeyInPayment) {
|
if (additionalServiceCategory === AdditionalServiceCategory.KeyInPayment) {
|
||||||
str = `${tid}(${amount})`;
|
str = `${tid}(${amount})`;
|
||||||
}
|
}
|
||||||
|
else if (additionalServiceCategory === AdditionalServiceCategory.AccountHolderAuth) {
|
||||||
|
str = `${accountName}(${accountNo})`
|
||||||
|
}
|
||||||
else if (additionalServiceCategory === AdditionalServiceCategory.AccountHolderSearch) {
|
else if (additionalServiceCategory === AdditionalServiceCategory.AccountHolderSearch) {
|
||||||
str = `${accountNo}`
|
str = `${accountNo}`
|
||||||
}
|
}
|
||||||
else if (additionalServiceCategory === AdditionalServiceCategory.LinkPaymentHistory ||
|
else if (additionalServiceCategory === AdditionalServiceCategory.LinkPaymentHistory ||
|
||||||
additionalServiceCategory === AdditionalServiceCategory.LinkPaymentPending
|
additionalServiceCategory === AdditionalServiceCategory.LinkPaymentPending
|
||||||
) {
|
) {
|
||||||
if (sendMethod === "SMS") {
|
if (sendMethod === "SMS") {
|
||||||
str = `${"buyerName"}(${"휴대폰 번호"})`
|
str = `${"buyerName"}(${"휴대폰 번호"})`
|
||||||
@@ -172,7 +197,7 @@ export const ListItem = ({
|
|||||||
str = `${"buyerName"}(${"이메일"})`
|
str = `${"buyerName"}(${"이메일"})`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (additionalServiceCategory === AdditionalServiceCategory.Payout){
|
else if (additionalServiceCategory === AdditionalServiceCategory.Payout) {
|
||||||
str = companyName;
|
str = companyName;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -190,6 +215,15 @@ export const ListItem = ({
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
else if (additionalServiceCategory === AdditionalServiceCategory.AccountHolderAuth) {
|
||||||
|
rs.push(
|
||||||
|
<div key="account-auth-list" className="transaction-details">
|
||||||
|
<span>{getTime()}</span>
|
||||||
|
<span className="separator">|</span>
|
||||||
|
<span>{bankName}</span>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
else if (additionalServiceCategory === AdditionalServiceCategory.AccountHolderSearch) {
|
else if (additionalServiceCategory === AdditionalServiceCategory.AccountHolderSearch) {
|
||||||
rs.push(
|
rs.push(
|
||||||
<div className="transaction-details">
|
<div className="transaction-details">
|
||||||
@@ -229,12 +263,12 @@ export const ListItem = ({
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else if(additionalServiceCategory === AdditionalServiceCategory.Payout){
|
else if (additionalServiceCategory === AdditionalServiceCategory.Payout) {
|
||||||
rs.push(
|
rs.push(
|
||||||
<div className="transaction-details">
|
<div className="transaction-details">
|
||||||
<span>{ disbursementStatus }</span>
|
<span>{disbursementStatus}</span>
|
||||||
<span className="separator">|</span>
|
<span className="separator">|</span>
|
||||||
<span>{ submallId }</span>
|
<span>{submallId}</span>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -262,6 +296,13 @@ export const ListItem = ({
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
else if (additionalServiceCategory === AdditionalServiceCategory.AccountHolderAuth) {
|
||||||
|
rs.push(
|
||||||
|
<div className={`status-label ${(transferStatus === 'REQUEST' || transferStatus === 'SUCCESS') ? 'success' : 'fail'}`}>
|
||||||
|
{(transferStatus === 'REQUEST' || transferStatus === 'SUCCESS') ? '성공' : '실패'}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
else if (additionalServiceCategory === AdditionalServiceCategory.LinkPaymentHistory ||
|
else if (additionalServiceCategory === AdditionalServiceCategory.LinkPaymentHistory ||
|
||||||
additionalServiceCategory === AdditionalServiceCategory.LinkPaymentPending
|
additionalServiceCategory === AdditionalServiceCategory.LinkPaymentPending
|
||||||
) {
|
) {
|
||||||
@@ -276,9 +317,9 @@ export const ListItem = ({
|
|||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
else if(additionalServiceCategory === AdditionalServiceCategory.Payout){
|
else if (additionalServiceCategory === AdditionalServiceCategory.Payout) {
|
||||||
rs.push(
|
rs.push(
|
||||||
<div
|
<div
|
||||||
key="payout-item-amount"
|
key="payout-item-amount"
|
||||||
className="transaction-amount"
|
className="transaction-amount"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -1,18 +1,167 @@
|
|||||||
|
import moment from 'moment';
|
||||||
|
import { PATHS } from '@/shared/constants/paths';
|
||||||
|
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
||||||
import { HeaderType } from '@/entities/common/model/types';
|
import { HeaderType } from '@/entities/common/model/types';
|
||||||
import {
|
import { IMAGE_ROOT } from '@/shared/constants/common';
|
||||||
useSetHeaderTitle,
|
import { SortByKeys, AuthAndTransferStatus, AccountHolderAuthListItem } from '@/entities/additional-service/model/types';
|
||||||
useSetHeaderType,
|
import { useEffect, useState } from 'react';
|
||||||
useSetFooterMode
|
import { DEFAULT_PAGE_PARAM } from '@/entities/common/model/constant';
|
||||||
|
import { SortOptionsBox } from '@/entities/additional-service/ui/sort-options-box';
|
||||||
|
|
||||||
|
import {
|
||||||
|
useSetHeaderTitle,
|
||||||
|
useSetHeaderType,
|
||||||
|
useSetFooterMode,
|
||||||
|
useSetOnBack
|
||||||
} from '@/widgets/sub-layout/use-sub-layout';
|
} from '@/widgets/sub-layout/use-sub-layout';
|
||||||
|
import { useExtensionAccountHolderAuthListMutation } from '@/entities/additional-service/api/account-holder-auth/use-extension-account-holder-auth-list-mutation';
|
||||||
|
import { authStatusBtnGroup } from '@/entities/additional-service/model/account-holder-auth/constant';
|
||||||
|
import { AccountHolderAuthList } from '@/entities/additional-service/ui/account-holder-auth/account-holder-auth-list';
|
||||||
|
|
||||||
export const AccountHolderAuthPage = () => {
|
export const AccountHolderAuthPage = () => {
|
||||||
|
const { navigate } = useNavigate();
|
||||||
|
|
||||||
|
const [sortBy, setSortBy] = useState<SortByKeys>(SortByKeys.New);
|
||||||
|
const [listItems, setListItems] = useState({});
|
||||||
|
const [filterOn, setFilterOn] = useState<boolean>(false);
|
||||||
|
const [pageParam, setPageParam] = useState(DEFAULT_PAGE_PARAM);
|
||||||
|
const [mid, setMid] = useState<string>('nictest001m');
|
||||||
|
const [fromDate, setFromDate] = useState(moment().format('YYYY-MM-DD'));
|
||||||
|
const [toDate, setToDate] = useState(moment().format('YYYY-MM-DD'));
|
||||||
|
const [authStatus, setAuthStatus] = useState<AuthAndTransferStatus>(AuthAndTransferStatus.ALL)
|
||||||
|
|
||||||
useSetHeaderTitle('계좌점유인증');
|
useSetHeaderTitle('계좌점유인증');
|
||||||
useSetHeaderType(HeaderType.LeftArrow);
|
useSetHeaderType(HeaderType.LeftArrow);
|
||||||
useSetFooterMode(true);
|
useSetFooterMode(true);
|
||||||
|
useSetOnBack(() => {
|
||||||
|
navigate(PATHS.home);
|
||||||
|
});
|
||||||
|
|
||||||
|
const { mutateAsync: accountHolderAuthList } = useExtensionAccountHolderAuthListMutation();
|
||||||
|
|
||||||
|
const callList = (option?: {
|
||||||
|
sortBy?: string,
|
||||||
|
val?: string
|
||||||
|
}) => {
|
||||||
|
pageParam.sortBy = (option?.sortBy) ? option.sortBy : sortBy;
|
||||||
|
setPageParam(pageParam);
|
||||||
|
let listParams = {
|
||||||
|
mid: mid,
|
||||||
|
fromDate: fromDate,
|
||||||
|
toDate: toDate,
|
||||||
|
authStatus: authStatus,
|
||||||
|
page: pageParam
|
||||||
|
}
|
||||||
|
|
||||||
|
accountHolderAuthList(listParams).then((rs) => {
|
||||||
|
setListItems(assembleData(rs.content));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const assembleData = (content: Array<AccountHolderAuthListItem>) => {
|
||||||
|
console.log('rs.content:', content)
|
||||||
|
let data: any = {};
|
||||||
|
if (content && content.length > 0) {
|
||||||
|
for (let i = 0; i < content?.length; i++) {
|
||||||
|
let requestDate = content[i]?.requestDate?.substring(0, 8);
|
||||||
|
let groupDate = moment(requestDate).format('YYYYMMDD');
|
||||||
|
if (!!groupDate && !data.hasOwnProperty(groupDate)) {
|
||||||
|
data[groupDate] = [];
|
||||||
|
}
|
||||||
|
if (!!groupDate && data.hasOwnProperty(groupDate)) {
|
||||||
|
data[groupDate].push(content[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.log('Data : ', data)
|
||||||
|
return data;
|
||||||
|
};
|
||||||
|
|
||||||
|
const onClickToDownloadExcel = () => {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const onClickToOpenFilter = () => {
|
||||||
|
setFilterOn(!filterOn);
|
||||||
|
};
|
||||||
|
|
||||||
|
const onClickToSort = (sort: SortByKeys) => {
|
||||||
|
setSortBy(sort);
|
||||||
|
callList({ sortBy: sort })
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const onClickToAuthStatus = (val: AuthAndTransferStatus) => {
|
||||||
|
setAuthStatus(val);
|
||||||
|
callList({ val: val });
|
||||||
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
callList();
|
||||||
|
}, []);
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
<main>
|
||||||
|
<div className="tab-content">
|
||||||
|
<div className="tab-pane sub active">
|
||||||
|
<section className="summary-section">
|
||||||
|
<div className="credit-controls">
|
||||||
|
<div>
|
||||||
|
<input
|
||||||
|
className="credit-period"
|
||||||
|
type="text"
|
||||||
|
value={moment(fromDate).format('YYYY.MM.DD') + '-' + moment(toDate).format('YYYY.MM.DD')}
|
||||||
|
readOnly={true}
|
||||||
|
/>
|
||||||
|
<button
|
||||||
|
className="filter-btn"
|
||||||
|
aria-label="필터"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
src={IMAGE_ROOT + '/ico_setting.svg'}
|
||||||
|
alt="검색옵션"
|
||||||
|
onClick={() => onClickToOpenFilter()}
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<button
|
||||||
|
className="download-btn"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
src={IMAGE_ROOT + '/ico_download.svg'}
|
||||||
|
alt="다운로드"
|
||||||
|
onClick={() => onClickToDownloadExcel()}
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<div className="filter-section">
|
||||||
|
<SortOptionsBox
|
||||||
|
sortBy={sortBy}
|
||||||
|
onClickToSort={onClickToSort}
|
||||||
|
></SortOptionsBox>
|
||||||
|
<div className="excrow">
|
||||||
|
<div className="full-menu-keywords no-padding">
|
||||||
|
{
|
||||||
|
authStatusBtnGroup.map((value, index) => (
|
||||||
|
<span
|
||||||
|
key={`key-service-code=${index}`}
|
||||||
|
className={`keyword-tag ${( authStatus === value.value) ? 'active' : ''}`}
|
||||||
|
onClick={() => onClickToAuthStatus(value.value)}
|
||||||
|
>{value.name}</span>
|
||||||
|
))
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<AccountHolderAuthList
|
||||||
|
listItems={listItems}
|
||||||
|
mid={mid}
|
||||||
|
></AccountHolderAuthList>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -4,9 +4,8 @@ import { useEffect, useState } from 'react';
|
|||||||
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
||||||
import { IMAGE_ROOT } from '@/shared/constants/common';
|
import { IMAGE_ROOT } from '@/shared/constants/common';
|
||||||
import { HeaderType } from '@/entities/common/model/types';
|
import { HeaderType } from '@/entities/common/model/types';
|
||||||
import { useDownloadExcelMutation } from '@/entities/transaction/api/use-download-excel-mutation';
|
|
||||||
import { AccountHolderSearchFilter } from '@/entities/additional-service/ui/account-holder-search/filter/account-holder-search-filter';
|
import { AccountHolderSearchFilter } from '@/entities/additional-service/ui/account-holder-search/filter/account-holder-search-filter';
|
||||||
import { ProcessResult, AccountHolderSearchType, SortByKeys, AccountHolderSearchListItem, AdditionalServiceCategory } from '@/entities/additional-service/model/types';
|
import { ProcessResult, AccountHolderSearchType, SortByKeys, AccountHolderSearchListItem } from '@/entities/additional-service/model/types';
|
||||||
import {
|
import {
|
||||||
useSetHeaderTitle,
|
useSetHeaderTitle,
|
||||||
useSetHeaderType,
|
useSetHeaderType,
|
||||||
@@ -63,7 +62,8 @@ export const AccountHolderSearchPage = () => {
|
|||||||
fromDate: startDate,
|
fromDate: startDate,
|
||||||
toDate: endDate,
|
toDate: endDate,
|
||||||
bankCode: bank,
|
bankCode: bank,
|
||||||
resultStatus: processResult
|
resultStatus: processResult,
|
||||||
|
page: pageParam
|
||||||
}
|
}
|
||||||
|
|
||||||
accountHolderSearchList(listParams).then((rs) => {
|
accountHolderSearchList(listParams).then((rs) => {
|
||||||
|
|||||||
@@ -56,7 +56,10 @@ export const AdditionalServicePages = () => {
|
|||||||
<Route path={ROUTE_NAMES.additionalService.accountHolderSearch.detail} element={<AccountHolderSearchDetailPage />} />
|
<Route path={ROUTE_NAMES.additionalService.accountHolderSearch.detail} element={<AccountHolderSearchDetailPage />} />
|
||||||
<Route path={ROUTE_NAMES.additionalService.accountHolderSearch.request} element={<AccountHolderSearchRequestPage />} />
|
<Route path={ROUTE_NAMES.additionalService.accountHolderSearch.request} element={<AccountHolderSearchRequestPage />} />
|
||||||
</Route>
|
</Route>
|
||||||
<Route path={ROUTE_NAMES.additionalService.accountHolderAuth} element={<AccountHolderAuthPage />} />
|
<Route path={ROUTE_NAMES.additionalService.accountHolderAuth.base}>
|
||||||
|
<Route path={ROUTE_NAMES.additionalService.accountHolderAuth.list} element={<AccountHolderAuthPage/>} />
|
||||||
|
<Route path={ROUTE_NAMES.additionalService.accountHolderAuth.detail} element={<AccountHolderSearchDetailPage />} />
|
||||||
|
</Route>
|
||||||
<Route path={ROUTE_NAMES.additionalService.linkPayment.base}>
|
<Route path={ROUTE_NAMES.additionalService.linkPayment.base}>
|
||||||
<Route path={ROUTE_NAMES.additionalService.linkPayment.shippingHistory} element={<LinkPaymentHistoryPage />} />
|
<Route path={ROUTE_NAMES.additionalService.linkPayment.shippingHistory} element={<LinkPaymentHistoryPage />} />
|
||||||
<Route path={ROUTE_NAMES.additionalService.linkPayment.pendingSend} element={<LinkPaymentWaitSendPage />} />
|
<Route path={ROUTE_NAMES.additionalService.linkPayment.pendingSend} element={<LinkPaymentWaitSendPage />} />
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ export const IntroPage = () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
className: 'list-wrap02', serviceName: '계좌점유인증', serviceDesc: '1원 송금으로 실제 계좌 점유 확인 여부',
|
className: 'list-wrap02', serviceName: '계좌점유인증', serviceDesc: '1원 송금으로 실제 계좌 점유 확인 여부',
|
||||||
icon: IMAGE_ROOT + '/icon_ing09.svg', path: PATHS.additionalService.accountHolderAuth
|
icon: IMAGE_ROOT + '/icon_ing09.svg', path: PATHS.additionalService.accountHolderAuth.list
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
className: 'list-wrap02', serviceName: '알림톡 결제통보', serviceDesc: '결제 상태를 알림톡으로 쉽고 빠른 안내',
|
className: 'list-wrap02', serviceName: '알림톡 결제통보', serviceDesc: '결제 상태를 알림톡으로 쉽고 빠른 안내',
|
||||||
|
|||||||
@@ -5,6 +5,18 @@ import {
|
|||||||
|
|
||||||
/* Extension Management - 부가서비스 API */
|
/* Extension Management - 부가서비스 API */
|
||||||
export const API_URL_ADDITIONAL_SERVICE = {
|
export const API_URL_ADDITIONAL_SERVICE = {
|
||||||
|
extensionAccountHolderAuthList: () => {
|
||||||
|
// POST: 계좌점유인증 목록 조회
|
||||||
|
return `${API_BASE_URL}/api/v1/${API_URL_KEY}/extension/account-auth/list`;
|
||||||
|
},
|
||||||
|
extensionAccountHolderAuthDownlaodExcel: () => {
|
||||||
|
// POST: 계좌점유인증 엑셀 다운
|
||||||
|
return `${API_BASE_URL}/api/v1/${API_URL_KEY}/extension/account-auth/excel`;
|
||||||
|
},
|
||||||
|
extensionAccountHolderAuthDetail: () => {
|
||||||
|
// POST: 계좌점유인증 상세 조회
|
||||||
|
return `${API_BASE_URL}/api/v1/${API_URL_KEY}/extension/account-auth/detail`;
|
||||||
|
},
|
||||||
extensionAccountHolderSearchList: () => {
|
extensionAccountHolderSearchList: () => {
|
||||||
// POST: 계좌성명조회 목록 조회
|
// POST: 계좌성명조회 목록 조회
|
||||||
return `${API_BASE_URL}/api/v1/${API_URL_KEY}/extension/search-account-name/list`;
|
return `${API_BASE_URL}/api/v1/${API_URL_KEY}/extension/search-account-name/list`;
|
||||||
|
|||||||
@@ -188,7 +188,17 @@ export const PATHS: RouteNamesType = {
|
|||||||
ROUTE_NAMES.additionalService.accountHolderSearch.request,
|
ROUTE_NAMES.additionalService.accountHolderSearch.request,
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
accountHolderAuth: generatePath(ROUTE_NAMES.additionalService.base, ROUTE_NAMES.additionalService.accountHolderAuth),
|
accountHolderAuth: {
|
||||||
|
base: generatePath(ROUTE_NAMES.additionalService.base, ROUTE_NAMES.additionalService.accountHolderAuth.base),
|
||||||
|
list: generatePath(
|
||||||
|
`${ROUTE_NAMES.additionalService.base}${ROUTE_NAMES.additionalService.accountHolderAuth.base}`,
|
||||||
|
ROUTE_NAMES.additionalService.accountHolderAuth.list
|
||||||
|
),
|
||||||
|
detail: generatePath(
|
||||||
|
`${ROUTE_NAMES.additionalService.base}${ROUTE_NAMES.additionalService.accountHolderAuth.base}`,
|
||||||
|
ROUTE_NAMES.additionalService.accountHolderAuth.detail
|
||||||
|
),
|
||||||
|
},
|
||||||
linkPayment: {
|
linkPayment: {
|
||||||
base: generatePath(`${ROUTE_NAMES.additionalService.base}${ROUTE_NAMES.additionalService.linkPayment.base}`),
|
base: generatePath(`${ROUTE_NAMES.additionalService.base}${ROUTE_NAMES.additionalService.linkPayment.base}`),
|
||||||
shippingHistory: generatePath(
|
shippingHistory: generatePath(
|
||||||
|
|||||||
@@ -89,7 +89,11 @@ export const ROUTE_NAMES = {
|
|||||||
detail: 'detail',
|
detail: 'detail',
|
||||||
request: 'request'
|
request: 'request'
|
||||||
},
|
},
|
||||||
accountHolderAuth: 'account-holder-auth',
|
accountHolderAuth: {
|
||||||
|
base: '/account-holder-auth/*',
|
||||||
|
list: 'list',
|
||||||
|
detail: 'detail'
|
||||||
|
},
|
||||||
linkPayment: {
|
linkPayment: {
|
||||||
base: '/link-payment/*',
|
base: '/link-payment/*',
|
||||||
shippingHistory: 'shipping-history',
|
shippingHistory: 'shipping-history',
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ export const Menu = ({
|
|||||||
{title: 'KEY-IN 결제', path: PATHS.additionalService.keyInPayment.list},
|
{title: 'KEY-IN 결제', path: PATHS.additionalService.keyInPayment.list},
|
||||||
{title: 'SMS 결제 통보', path: PATHS.additionalService.smsPaymentNotification},
|
{title: 'SMS 결제 통보', path: PATHS.additionalService.smsPaymentNotification},
|
||||||
{title: '계좌성명조회', path: PATHS.additionalService.accountHolderSearch.list},
|
{title: '계좌성명조회', path: PATHS.additionalService.accountHolderSearch.list},
|
||||||
{title: '계좌점유인증', path: PATHS.additionalService.accountHolderAuth},
|
{title: '계좌점유인증', path: PATHS.additionalService.accountHolderAuth.list},
|
||||||
{title: '링크결제', path: PATHS.additionalService.linkPayment.shippingHistory},
|
{title: '링크결제', path: PATHS.additionalService.linkPayment.shippingHistory},
|
||||||
{title: '알림톡 결제통보', path: PATHS.additionalService.kakaoPaymentNotification.list},
|
{title: '알림톡 결제통보', path: PATHS.additionalService.kakaoPaymentNotification.list},
|
||||||
{title: '자금이체', path: PATHS.additionalService.fundTransfer.requestList},
|
{title: '자금이체', path: PATHS.additionalService.fundTransfer.requestList},
|
||||||
|
|||||||
Reference in New Issue
Block a user