Merge branch 'main' of https://gitea.bpsoft.co.kr/nicepayments/nice-app-web
This commit is contained in:
@@ -19,7 +19,7 @@ import { AccountHolderAuthList } from '@/entities/additional-service/ui/account-
|
||||
import { useExtensionAccountHolderAuthDownloadExcelMutation } from '@/entities/additional-service/api/account-holder-auth/use-extension-account-holder-auth-download-excel-mutation';
|
||||
import { AccountHolderAuthFilter } from '@/entities/additional-service/ui/account-holder-auth/filter/account-holder-auth-filter';
|
||||
import { useStore } from '@/shared/model/store';
|
||||
import { AccountHolderAuthListItem, AuthAndTransferStatus, ExtensionAccountHolderAuthContentItem, ExtensionAccountHolderAuthDownloadExcelParams, ExtensionAccountHolderAuthDownloadExcelResponse } from '@/entities/additional-service/model/account-holder-auth/types';
|
||||
import { AccountHolderAuthListItem, AccountHolderAuthStatus, ExtensionAccountHolderAuthContentItem, ExtensionAccountHolderAuthDownloadExcelParams, ExtensionAccountHolderAuthDownloadExcelResponse } from '@/entities/additional-service/model/account-holder-auth/types';
|
||||
import { AdditionalServiceCategory } from '@/entities/additional-service/model/types';
|
||||
import { EmailBottomSheet } from '@/entities/common/ui/email-bottom-sheet';
|
||||
|
||||
@@ -35,7 +35,7 @@ export const AccountHolderAuthPage = () => {
|
||||
const [mid, setMid] = useState<string>(userMid);
|
||||
const [fromDate, setFromDate] = useState(moment().format('YYYYMMDD'));
|
||||
const [toDate, setToDate] = useState(moment().format('YYYYMMDD'));
|
||||
const [authStatus, setAuthStatus] = useState<AuthAndTransferStatus>(AuthAndTransferStatus.ALL)
|
||||
const [authStatus, setAuthStatus] = useState<AccountHolderAuthStatus>(AccountHolderAuthStatus.ALL)
|
||||
const [emailBottomSheetOn, setEmailBottomSheetOn] = useState<boolean>(false);
|
||||
useSetHeaderTitle('계좌점유인증');
|
||||
useSetHeaderType(HeaderType.LeftArrow);
|
||||
@@ -49,7 +49,7 @@ export const AccountHolderAuthPage = () => {
|
||||
|
||||
const callList = (option?: {
|
||||
sortType?: SortTypeKeys,
|
||||
status?: AuthAndTransferStatus
|
||||
status?: AccountHolderAuthStatus
|
||||
}) => {
|
||||
let listParams = {
|
||||
mid: mid,
|
||||
@@ -81,7 +81,7 @@ export const AccountHolderAuthPage = () => {
|
||||
});
|
||||
};
|
||||
|
||||
const onClickToAuthStatus = (val: AuthAndTransferStatus) => {
|
||||
const onClickToAuthStatus = (val: AccountHolderAuthStatus) => {
|
||||
setAuthStatus(val);
|
||||
callList({
|
||||
status: val
|
||||
|
||||
@@ -13,7 +13,10 @@ import { TitleInfoWrap } from '@/entities/additional-service/ui/info-wrap/title-
|
||||
import { useLocation } from 'react-router';
|
||||
import { DetailInfoWrap } from '@/entities/additional-service/ui/info-wrap/detail-info-wrap';
|
||||
import { useExtensionAccountHolderAuthDetailMutation } from '@/entities/additional-service/api/account-holder-auth/use-extension-account-holder-auth-deatil-mutation';
|
||||
import { ExtensionAccountHolderAuthDetailParams } from '@/entities/additional-service/model/account-holder-auth/types';
|
||||
import { ExtensionAccountHolderAuthDetailParams, ExtensionAccountHolderAuthDetailResponse } from '@/entities/additional-service/model/account-holder-auth/types';
|
||||
import moment from 'moment';
|
||||
import { getAuthStatusText } from '@/entities/additional-service/model/account-holder-auth/constant';
|
||||
import { getAuthResultStatusText } from '@/entities/additional-service/model/face-auth/constant';
|
||||
|
||||
export const AccountHolderAuthDetailPage = () => {
|
||||
const { navigate } = useNavigate();
|
||||
@@ -21,8 +24,7 @@ export const AccountHolderAuthDetailPage = () => {
|
||||
|
||||
const { mid, tid } = location.state || {};
|
||||
|
||||
const [titleInfo, setTitleInfo] = useState<TitleInfo>();
|
||||
const [detailInfo, setDetailInfo] = useState<DetailInfo>();
|
||||
const [detail, setDetail] = useState<ExtensionAccountHolderAuthDetailResponse>();
|
||||
|
||||
useSetHeaderTitle('계좌점유인증 상세');
|
||||
useSetHeaderType(HeaderType.LeftArrow);
|
||||
@@ -38,32 +40,71 @@ export const AccountHolderAuthDetailPage = () => {
|
||||
mid: mid,
|
||||
tid: tid
|
||||
}
|
||||
accountHolderAuthDetail(accountHolderAuthDetailParams).then((rs: DetailResponse) => {
|
||||
console.log("Detail Info: ", rs)
|
||||
setTitleInfo(rs.titleInfo);
|
||||
setDetailInfo(rs.detailInfo);
|
||||
accountHolderAuthDetail(accountHolderAuthDetailParams).then((rs: ExtensionAccountHolderAuthDetailResponse) => {
|
||||
setDetail(rs);
|
||||
});
|
||||
};
|
||||
useEffect(() => {
|
||||
callDetail();
|
||||
}, []);
|
||||
|
||||
const getDate = (date?: string) => {
|
||||
return (date) ? moment(date, 'YYYYMMDDHHmmss').format('YYYY.MM.DD HH:mm:ss') : '';
|
||||
};
|
||||
return (
|
||||
<>
|
||||
<main>
|
||||
<div className="tab-content">
|
||||
<div className="tab-pane sub active">
|
||||
<div className="pay-top">
|
||||
<TitleInfoWrap
|
||||
additionalServiceCategory={AdditionalServiceCategory.AccountHolderAuth}
|
||||
titleInfo={titleInfo}
|
||||
></TitleInfoWrap>
|
||||
<div className="num-amount">
|
||||
<span className="amount">{detail?.accountName}</span>
|
||||
<span className="amount">{detail?.accountNo}</span>
|
||||
</div>
|
||||
<div className="num-day">{getDate(detail?.requestDate)}</div>
|
||||
</div>
|
||||
<div className="detail-divider"></div>
|
||||
<div className="pay-detail">
|
||||
<div className="detail-divider"></div>
|
||||
<DetailInfoWrap
|
||||
additionalServiceCategory={AdditionalServiceCategory.AccountHolderAuth}
|
||||
detailInfo={detailInfo}
|
||||
></DetailInfoWrap>
|
||||
<div className="detail-title">상세 정보</div>
|
||||
<ul className="kv-list">
|
||||
<li className="kv-row">
|
||||
<span className="k">가맹점상호</span>
|
||||
<span className="v">{detail?.companyName}</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">MID</span>
|
||||
<span className="v">{detail?.mid}</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">요청일시</span>
|
||||
<span className="v">{getDate(detail?.requestDate)}</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">은행</span>
|
||||
<span className="v">{detail?.bankName}</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">계좌번호</span>
|
||||
<span className="v">{detail?.bankName}</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">예금주</span>
|
||||
<span className="v">{detail?.accountName}</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">결과</span>
|
||||
<span className="v">{getAuthStatusText(detail?.authStatus)}</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">실패 사유</span>
|
||||
{detail?.authResult !== "MATCHED" &&
|
||||
<span className="v">{getAuthResultStatusText(detail?.authResult)}</span>
|
||||
}
|
||||
{detail?.authResult === "MATCHED" &&
|
||||
<span className="v">-</span>
|
||||
}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -9,12 +9,13 @@ import {
|
||||
useSetFooterMode,
|
||||
useSetOnBack
|
||||
} from '@/widgets/sub-layout/use-sub-layout';
|
||||
import { useExtensionAccountHolderSearchDetailMutation } from '@/entities/additional-service/api/account-holder-search/use-extension-account-holder-search-detail-mutation';
|
||||
import { AdditionalServiceCategory, DetailInfo, DetailResponse, TitleInfo } from '@/entities/additional-service/model/types';
|
||||
import { TitleInfoWrap } from '@/entities/additional-service/ui/info-wrap/title-info-wrap';
|
||||
import { useLocation } from 'react-router';
|
||||
import { DetailInfoWrap } from '@/entities/additional-service/ui/info-wrap/detail-info-wrap';
|
||||
import { ExtensionAccountHolderSearchDetailParams } from '@/entities/additional-service/model/account-holder-search/types';
|
||||
import { ExtensionAccountHolderSearchDetailParams, ExtensionAccountHolderSearchDetailResponse } from '@/entities/additional-service/model/account-holder-search/types';
|
||||
import { useExtensionAccountHolderSearchDetailtMutation } from '@/entities/additional-service/api/account-holder-search/use-extension-account-holder-search-detail-mutation';
|
||||
import { getAccountHolderStatusText } from '@/entities/additional-service/model/account-holder-search/constant';
|
||||
|
||||
export const AccountHolderSearchDetailPage = () => {
|
||||
const { navigate } = useNavigate();
|
||||
@@ -22,8 +23,7 @@ export const AccountHolderSearchDetailPage = () => {
|
||||
|
||||
const { mid, tid } = location.state || {};
|
||||
|
||||
const [titleInfo, setTitleInfo] = useState<TitleInfo>();
|
||||
const [detailInfo, setDetailInfo] = useState<DetailInfo>();
|
||||
const [detail, setDetail] = useState<ExtensionAccountHolderSearchDetailResponse>();
|
||||
|
||||
useSetHeaderTitle('계좌성명조회 상세');
|
||||
useSetHeaderType(HeaderType.LeftArrow);
|
||||
@@ -32,19 +32,22 @@ export const AccountHolderSearchDetailPage = () => {
|
||||
navigate(PATHS.additionalService.accountHolderSearch.list);
|
||||
});
|
||||
|
||||
const { mutateAsync: accountHolderSearchDetail } = useExtensionAccountHolderSearchDetailMutation();
|
||||
const { mutateAsync: accountHolderSearchDetail } = useExtensionAccountHolderSearchDetailtMutation();
|
||||
|
||||
const callDetail = () => {
|
||||
let accountHolderSearchDetailParams: ExtensionAccountHolderSearchDetailParams = {
|
||||
mid: mid,
|
||||
tid: tid
|
||||
}
|
||||
accountHolderSearchDetail(accountHolderSearchDetailParams).then((rs: DetailResponse) => {
|
||||
console.log("Detail Info: ", rs)
|
||||
setTitleInfo(rs.titleInfo);
|
||||
setDetailInfo(rs.detailInfo);
|
||||
accountHolderSearchDetail(accountHolderSearchDetailParams).then((rs: ExtensionAccountHolderSearchDetailResponse) => {
|
||||
setDetail(rs);
|
||||
});
|
||||
};
|
||||
|
||||
const getDate = (date?: string) => {
|
||||
return (date) ? moment(date, 'YYYYMMDDHHmmss').format('YYYY.MM.DD HH:mm:ss') : '';
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
callDetail();
|
||||
}, []);
|
||||
@@ -54,17 +57,45 @@ export const AccountHolderSearchDetailPage = () => {
|
||||
<div className="tab-content">
|
||||
<div className="tab-pane sub active">
|
||||
<div className="pay-top">
|
||||
<TitleInfoWrap
|
||||
additionalServiceCategory={AdditionalServiceCategory.AccountHolderSearch}
|
||||
titleInfo={titleInfo}
|
||||
></TitleInfoWrap>
|
||||
<div className="num-amount">
|
||||
<span className="amount">{detail?.accountNo}</span>
|
||||
</div>
|
||||
<span className="num-day">{detail?.bankName}</span>
|
||||
<div className="num-day">{getDate(detail?.requestDate)}</div>
|
||||
</div>
|
||||
<div className="detail-divider"></div>
|
||||
<div className="pay-detail">
|
||||
<div className="detail-divider"></div>
|
||||
<DetailInfoWrap
|
||||
additionalServiceCategory={AdditionalServiceCategory.AccountHolderSearch}
|
||||
detailInfo={detailInfo}
|
||||
></DetailInfoWrap>
|
||||
<div className="detail-title">상세 정보</div>
|
||||
<ul className="kv-list">
|
||||
<li className="kv-row">
|
||||
<span className="k">예금주</span>
|
||||
<span className="v">{detail?.accountName}</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">조회 일시</span>
|
||||
<span className="v">{detail?.requestDate}</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">결과</span>
|
||||
<span className="v">{getAccountHolderStatusText(detail?.resultStatus)}</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">실패사유</span>
|
||||
<span className="v">{detail?.failReason}</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">은행</span>
|
||||
<span className="v">{detail?.bankName}</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">계좌번호</span>
|
||||
<span className="v">{detail?.accountNo}</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">요청 구분</span>
|
||||
<span className="v">{detail?.requestWay}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -15,7 +15,8 @@ import { useStore } from '@/shared/model/store';
|
||||
export const AccountHolderSearchRequestPage = () => {
|
||||
const { navigate } = useNavigate();
|
||||
|
||||
const userMid = useStore.getState().UserStore.mid
|
||||
const midOptions = useStore.getState().UserStore.selectOptionsMids
|
||||
const bankList = useStore.getState().CommonStore.bankList
|
||||
|
||||
useSetHeaderTitle('계좌성명조회_신청');
|
||||
useSetHeaderType(HeaderType.LeftArrow);
|
||||
@@ -27,7 +28,7 @@ export const AccountHolderSearchRequestPage = () => {
|
||||
const { mutateAsync: accountHolderSearchRequest } = useExtensionAccountHolderSearchRequestMutation();
|
||||
|
||||
const [formData, setFormData] = useState({
|
||||
mid: userMid,
|
||||
mid: '',
|
||||
bankCode: '',
|
||||
accountNo: ''
|
||||
})
|
||||
@@ -39,22 +40,30 @@ export const AccountHolderSearchRequestPage = () => {
|
||||
const onClickToRequest = () => {
|
||||
const reuqestParams: ExtensionAccountHolderSearchRequestParams = {
|
||||
mid: formData.mid,
|
||||
bankCode: formData.bankCode, // 추후 진짜 은행코드 삽입 필요
|
||||
bankCode: formData.bankCode,
|
||||
accountNo: formData.accountNo
|
||||
}
|
||||
|
||||
console.log("계좌성명 조회 조회신청 요청 파라미터 : ", reuqestParams);
|
||||
|
||||
accountHolderSearchRequest(reuqestParams)
|
||||
.then((response) => {
|
||||
console.log("계좌성명 조회 조회 신청 성공 응답: ", response.status)
|
||||
navigate(PATHS.additionalService.accountHolderSearch.list);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("계좌성명 조회 조회 신청 실패: ", error)
|
||||
})
|
||||
.then((response) => {
|
||||
console.log("계좌성명 조회 조회 신청 성공 응답: ", response.status)
|
||||
navigate(PATHS.additionalService.accountHolderSearch.list);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("계좌성명 조회 조회 신청 실패: ", error)
|
||||
})
|
||||
};
|
||||
|
||||
const isFormValid = () => {
|
||||
return (
|
||||
formData.mid.trim() !== '' &&
|
||||
formData.bankCode.trim() !== '' &&
|
||||
formData.accountNo.trim() !== ''
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<main>
|
||||
@@ -65,12 +74,15 @@ export const AccountHolderSearchRequestPage = () => {
|
||||
<div className="billing-row">
|
||||
<div className="billing-label">가맹점</div>
|
||||
<div className="billing-field">
|
||||
<select
|
||||
className="wid-100"
|
||||
value={formData.mid}
|
||||
onChange={(e) => handleInputChange('mid', e.target.value)}
|
||||
>
|
||||
<option>nictest00m</option>
|
||||
<select value={formData.mid} onChange={(e) => handleInputChange('mid', e.target.value)}>
|
||||
{
|
||||
midOptions.map((value) => (
|
||||
<option
|
||||
key={value.value}
|
||||
value={value.value}
|
||||
>{value.name}</option>
|
||||
))
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -78,13 +90,18 @@ export const AccountHolderSearchRequestPage = () => {
|
||||
<div className="billing-row">
|
||||
<div className="billing-label">은행</div>
|
||||
<div className="billing-field">
|
||||
<select
|
||||
className="wid-100"
|
||||
value={formData.bankCode}
|
||||
onChange={(e) => handleInputChange('bankCode', e.target.value)}
|
||||
>
|
||||
<option>우리은행</option>
|
||||
<option>카카오뱅크</option>
|
||||
<select value={formData.bankCode} onChange={(e) => handleInputChange('bankCode', e.target.value)}>
|
||||
<option value="">선택하세요</option>
|
||||
{
|
||||
bankList
|
||||
.filter((bank) => bank.code1 !== '****')
|
||||
.map((bank) => (
|
||||
<option
|
||||
key={bank.code1}
|
||||
value={bank.code1}
|
||||
>{bank.desc1}</option>
|
||||
))
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -93,10 +110,10 @@ export const AccountHolderSearchRequestPage = () => {
|
||||
<div className="billing-label">계좌번호</div>
|
||||
<div className="billing-field">
|
||||
<input
|
||||
type="number"
|
||||
placeholder=''
|
||||
value={formData.accountNo}
|
||||
onChange={(e) => handleInputChange('accountNo', e.target.value)}
|
||||
type="number"
|
||||
placeholder=''
|
||||
value={formData.accountNo}
|
||||
onChange={(e) => handleInputChange('accountNo', e.target.value)}
|
||||
></input>
|
||||
</div>
|
||||
</div>
|
||||
@@ -105,6 +122,7 @@ export const AccountHolderSearchRequestPage = () => {
|
||||
<div className="apply-row">
|
||||
<button
|
||||
className="btn-50 btn-blue flex-1"
|
||||
disabled={!isFormValid()}
|
||||
onClick={() => onClickToRequest()}
|
||||
>신청</button>
|
||||
</div>
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
import moment from 'moment';
|
||||
import { ProcessResult } from '@/entities/additional-service/model/types';
|
||||
import { SortTypeKeys } from '@/entities/common/model/types';
|
||||
import { AdditionalServiceCategory, ProcessResult } from '@/entities/additional-service/model/types';
|
||||
import { DefaultRequestPagination, HeaderType, SortTypeKeys } from '@/entities/common/model/types';
|
||||
import { SortTypeBox } from '@/entities/common/ui/sort-type-box';
|
||||
import { DEFAULT_PAGE_PARAM } from '@/entities/common/model/constant';
|
||||
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
||||
import { IMAGE_ROOT } from '@/shared/constants/common';
|
||||
import { HeaderType } from '@/entities/common/model/types';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { JSX, useEffect, useState } from 'react';
|
||||
import { useStore } from '@/shared/model/store';
|
||||
import { PATHS } from '@/shared/constants/paths';
|
||||
import {
|
||||
@@ -16,26 +15,28 @@ import {
|
||||
useSetOnBack
|
||||
} from '@/widgets/sub-layout/use-sub-layout';
|
||||
|
||||
import { FaceAuthList } from '@/entities/additional-service/ui/face-auth/face-auth-list';
|
||||
import { FaceAuthFilter } from '@/entities/additional-service/ui/face-auth/filter/face-auth-filter';
|
||||
import { FaceAuthListItem, FaceAuthTransactionType } from '@/entities/additional-service/model/face-auth/types';
|
||||
import { ResultStatusBtnGroup } from '@/entities/additional-service/model/face-auth/constant';
|
||||
import { ExtensionFaceAuthExcelDownlaodPrams, ExtensionFaceAuthExcelDownlaodResponse, ExtensionFaceAuthListParams, ExtensionFaceAuthListResponse, FaceAuthListItem, FaceAuthResult, FaceAuthTransType } from '@/entities/additional-service/model/face-auth/types';
|
||||
import { AuthResultBtnGroup } from '@/entities/additional-service/model/face-auth/constant';
|
||||
import { EmailBottomSheet } from '@/entities/common/ui/email-bottom-sheet';
|
||||
import { useExtensionFaceAuthListtMutation } from '@/entities/additional-service/api/face-auth/use-extension-face-auth-list-mutation';
|
||||
import { useExtensionFaceAuthDownloadExcelMutation } from '@/entities/additional-service/api/face-auth/use-extension-face-auth-download-excel-mutation';
|
||||
import { ListDateGroup } from '@/entities/additional-service/ui/list-date-group';
|
||||
|
||||
export const FaceAuthPage = () => {
|
||||
const { navigate } = useNavigate();
|
||||
const userMid = useStore.getState().UserStore.mid;
|
||||
|
||||
const [sortType, setSortType] = useState<SortTypeKeys>(SortTypeKeys.LATEST);
|
||||
const [listItems, setListItems] = useState({});
|
||||
const [pageParam, setPageParam] = useState(DEFAULT_PAGE_PARAM);
|
||||
const [listItems, setListItems] = useState<Array<FaceAuthListItem>>([]);
|
||||
const [filterOn, setFilterOn] = useState<boolean>(false);
|
||||
const [pageParam, setPageParam] = useState<DefaultRequestPagination>(DEFAULT_PAGE_PARAM);
|
||||
const [mid, setMid] = useState<string>(userMid);
|
||||
const [memberId, setMemberId] = useState<string>('');
|
||||
const [startDate, setStartDate] = useState(moment().format('YYYY-MM-DD'));
|
||||
const [endDate, setEndDate] = useState(moment().format('YYYY-MM-DD'));
|
||||
const [transactionType, setTransactionType] = useState<FaceAuthTransactionType>(FaceAuthTransactionType.ALL);
|
||||
const [processResult, setProcessResult] = useState<ProcessResult>(ProcessResult.ALL);
|
||||
const [userMallId, setUserMallId] = useState<string>('');
|
||||
const [fromDate, setFromDate] = useState<string>(moment().format('YYYYMMDD'));
|
||||
const [toDate, setToDate] = useState<string>(moment().format('YYYYMMDD'));
|
||||
const [transType, setTransType] = useState<FaceAuthTransType>(FaceAuthTransType.ALL);
|
||||
const [authResult, setAuthResult] = useState<FaceAuthResult>(FaceAuthResult.ALL);
|
||||
const [emailBottomSheetOn, setEmailBottomSheetOn] = useState<boolean>(false);
|
||||
|
||||
useSetHeaderTitle('안면인증');
|
||||
@@ -45,48 +46,31 @@ export const FaceAuthPage = () => {
|
||||
navigate(PATHS.home);
|
||||
});
|
||||
|
||||
//TODO : API 연동
|
||||
//const { mutateAsync: faceAuthHistoryList } = useExtensionFaceAuthHistoryListMutation();
|
||||
//const { mutateAsync: downloadExcel } = useExtensionFaceAuthDownloadExcelMutation();
|
||||
|
||||
const assembleData = (content: Array<FaceAuthListItem>) => {
|
||||
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 { mutateAsync: faceAuthHistoryList } = useExtensionFaceAuthListtMutation();
|
||||
const { mutateAsync: downloadExcel } = useExtensionFaceAuthDownloadExcelMutation();
|
||||
|
||||
const callList = (option?: {
|
||||
sortType?: SortTypeKeys,
|
||||
val?: string
|
||||
authResult?: FaceAuthResult
|
||||
}) => {
|
||||
pageParam.sortType = (option?.sortType) ? option.sortType : sortType;
|
||||
setPageParam(pageParam);
|
||||
let listParams = {
|
||||
let params: ExtensionFaceAuthListParams = {
|
||||
mid: mid,
|
||||
memberId: memberId,
|
||||
fromDate: startDate,
|
||||
toDate: endDate,
|
||||
transactionType: transactionType,
|
||||
resultStatus: processResult,
|
||||
userMallId: userMallId,
|
||||
fromDate: fromDate,
|
||||
toDate: toDate,
|
||||
transType: transType,
|
||||
authResult: option?.authResult ?? authResult,
|
||||
page: pageParam
|
||||
};
|
||||
|
||||
//faceAuthHistoryList(listParams).then((rs) => {
|
||||
// setListItems(assembleData(rs.content));
|
||||
//});
|
||||
if (params.page) {
|
||||
params.page.sortType = option?.sortType || sortType;
|
||||
setPageParam(params.page);
|
||||
}
|
||||
|
||||
faceAuthHistoryList(params).then((rs: ExtensionFaceAuthListResponse) => {
|
||||
setListItems(rs.content);
|
||||
});
|
||||
};
|
||||
|
||||
const onClickToOpenEmailBottomSheet = () => {
|
||||
@@ -95,17 +79,15 @@ export const FaceAuthPage = () => {
|
||||
|
||||
const onSendRequest = (selectedEmail?: string) => {
|
||||
if (selectedEmail) {
|
||||
// downloadExcel({
|
||||
// mid: mid,
|
||||
// //email: selectedEmail,
|
||||
// memberId: memberId,
|
||||
// fromDate: startDate,
|
||||
// toDate: endDate,
|
||||
// transactionType: transactionType,
|
||||
// resultStatus: processResult
|
||||
// }).then((rs) => {
|
||||
// console.log('Excel Download Status: ' + rs.status);
|
||||
// });
|
||||
const params: ExtensionFaceAuthExcelDownlaodPrams = {
|
||||
mid: mid,
|
||||
email: selectedEmail,
|
||||
fromDate: fromDate,
|
||||
toDate: toDate
|
||||
};
|
||||
downloadExcel(params).then((rs: ExtensionFaceAuthExcelDownlaodResponse) => {
|
||||
console.log('Excel Download Status:', rs.status);
|
||||
});
|
||||
}
|
||||
setEmailBottomSheetOn(false);
|
||||
};
|
||||
@@ -119,16 +101,62 @@ export const FaceAuthPage = () => {
|
||||
callList({ sortType: sort });
|
||||
};
|
||||
|
||||
const onClickToTransactionStatus = (val: ProcessResult) => {
|
||||
setProcessResult(val);
|
||||
const onClickToAuthResult = (val: FaceAuthResult) => {
|
||||
setAuthResult(val);
|
||||
callList({
|
||||
val: val
|
||||
authResult: val
|
||||
});
|
||||
};
|
||||
|
||||
const getListDateGroup = () => {
|
||||
let rs= [];
|
||||
let date = '';
|
||||
let list= [];
|
||||
for (let i = 0; i < listItems.length; i++) {
|
||||
let item = listItems[i];
|
||||
if (!!item) {
|
||||
let requestDate = item?.requestDate;
|
||||
requestDate = requestDate?.substring(0, 8);
|
||||
if (!!requestDate) {
|
||||
if (i === 0) {
|
||||
date = requestDate;
|
||||
}
|
||||
if (date !== requestDate) {
|
||||
if (list.length > 0) {
|
||||
rs.push(
|
||||
<ListDateGroup
|
||||
additionalServiceCategory={AdditionalServiceCategory.FaceAuth}
|
||||
mid={mid}
|
||||
key={date + '-' + i}
|
||||
date={date}
|
||||
items={list as any}
|
||||
></ListDateGroup>
|
||||
);
|
||||
}
|
||||
date = requestDate;
|
||||
list = [];
|
||||
}
|
||||
list.push(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (list.length > 0) {
|
||||
rs.push(
|
||||
<ListDateGroup
|
||||
additionalServiceCategory={AdditionalServiceCategory.FaceAuth}
|
||||
mid={mid}
|
||||
key={date + '-last'}
|
||||
date={date}
|
||||
items={list as any}
|
||||
></ListDateGroup>
|
||||
);
|
||||
}
|
||||
return rs;
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
callList();
|
||||
}, [mid, memberId, startDate, endDate, transactionType, processResult]);
|
||||
}, [mid, userMallId, fromDate, toDate, transType, authResult]);
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -141,7 +169,7 @@ export const FaceAuthPage = () => {
|
||||
<input
|
||||
className="credit-period"
|
||||
type="text"
|
||||
value={moment(startDate).format('YYYY.MM.DD') + '-' + moment(endDate).format('YYYY.MM.DD')}
|
||||
value={moment(fromDate).format('YYYY.MM.DD') + '-' + moment(toDate).format('YYYY.MM.DD')}
|
||||
readOnly={true}
|
||||
/>
|
||||
<button
|
||||
@@ -172,25 +200,28 @@ export const FaceAuthPage = () => {
|
||||
<SortTypeBox
|
||||
sortType={sortType}
|
||||
onClickToSort={onClickToSort}
|
||||
sortOptions={[
|
||||
{ key: SortTypeKeys.LATEST, label: '최신순' },
|
||||
{ key: SortTypeKeys.OLDEST, label: '오래된순' }
|
||||
]}
|
||||
></SortTypeBox>
|
||||
<div className="excrow">
|
||||
<div className="full-menu-keywords no-padding">
|
||||
{
|
||||
ResultStatusBtnGroup.map((value, index) => (
|
||||
AuthResultBtnGroup.map((value, index) => (
|
||||
<span
|
||||
key={`key-service-code=${index}`}
|
||||
className={`keyword-tag ${(processResult === value.value) ? 'active' : ''}`}
|
||||
onClick={() => onClickToTransactionStatus(value.value)}
|
||||
className={`keyword-tag ${(authResult === value.value) ? 'active' : ''}`}
|
||||
onClick={() => onClickToAuthResult(value.value)}
|
||||
>{value.name}</span>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<FaceAuthList
|
||||
listItems={listItems}
|
||||
mid={mid}
|
||||
></FaceAuthList>
|
||||
<section className="transaction-list">
|
||||
{getListDateGroup()}
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
@@ -198,17 +229,17 @@ export const FaceAuthPage = () => {
|
||||
filterOn={filterOn}
|
||||
setFilterOn={setFilterOn}
|
||||
mid={mid}
|
||||
memberId={memberId}
|
||||
startDate={startDate}
|
||||
endDate={endDate}
|
||||
transactionType={transactionType}
|
||||
processResult={processResult}
|
||||
userMallId={userMallId}
|
||||
fromDate={fromDate}
|
||||
toDate={toDate}
|
||||
transType={transType}
|
||||
authResult={authResult}
|
||||
setMid={setMid}
|
||||
setMemberId={setMemberId}
|
||||
setStartDate={setStartDate}
|
||||
setEndDate={setEndDate}
|
||||
setTransactionType={setTransactionType}
|
||||
setProcessResult={setProcessResult}
|
||||
setUserMallId={setUserMallId}
|
||||
setFromDate={setFromDate}
|
||||
setToDate={setToDate}
|
||||
setTransType={setTransType}
|
||||
setAuthResult={setAuthResult}
|
||||
/>
|
||||
<EmailBottomSheet
|
||||
bottomSheetOn={emailBottomSheetOn}
|
||||
|
||||
@@ -42,7 +42,6 @@ export const LinkPaymentWaitDetailPage = () => {
|
||||
}
|
||||
|
||||
linkPayWaitDetail(detailParam).then((rs: DetailResponse) => {
|
||||
console.log("Detail Info: ", rs)
|
||||
setTitleInfo(rs.titleInfo)
|
||||
setPaymentInfo(rs.paymentInfo)
|
||||
})
|
||||
|
||||
@@ -254,19 +254,23 @@ export const LinkPaymentSeparateApprovalPage = () => {
|
||||
<span className="label">• 결제상태:</span>
|
||||
<span className="value">{item.paymentStatusName}</span>
|
||||
</li>
|
||||
<li>
|
||||
<span className="label">• 유효기간:</span>
|
||||
<span className="value">
|
||||
{item.paymentLimitDate
|
||||
? moment(item.paymentLimitDate, 'YYYYMMDD').format('YYYY/MM/DD')
|
||||
: '-'
|
||||
}
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span className="label">• 연장횟수:</span>
|
||||
<span className="value">{item.paymentLimitCount}</span>
|
||||
</li>
|
||||
{item.type !== LinkPaymentSeparateType.MAIN && (
|
||||
<>
|
||||
<li>
|
||||
<span className="label">• 유효기간:</span>
|
||||
<span className="value">
|
||||
{item.paymentLimitDate
|
||||
? moment(item.paymentLimitDate, 'YYYYMMDD').format('YYYY/MM/DD')
|
||||
: '-'
|
||||
}
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span className="label">• 연장횟수:</span>
|
||||
<span className="value">{item.paymentLimitCount}</span>
|
||||
</li>
|
||||
</>
|
||||
)}
|
||||
</ul>
|
||||
</div>
|
||||
<div className="card-footer">
|
||||
@@ -275,6 +279,7 @@ export const LinkPaymentSeparateApprovalPage = () => {
|
||||
<select
|
||||
value={extendPeriods[itemId] || ''}
|
||||
onChange={(e) => handleExtendPeriodChange(itemId, e.target.value)}
|
||||
disabled={item.type === LinkPaymentSeparateType.MAIN}
|
||||
>
|
||||
<option value="">미설정</option>
|
||||
{[1, 2, 3, 4, 5, 6, 7].map(days => {
|
||||
|
||||
Reference in New Issue
Block a user