mid 셋팅및 코드 정리
This commit is contained in:
@@ -5,19 +5,17 @@ import { DEFAULT_PAGE_PARAM } from '@/entities/common/model/constant';
|
||||
import { UserManageAuthList } from './user-manage-auth-list';
|
||||
import { useUserFindMutation } from '@/entities/user/api/use-user-find-mutation';
|
||||
import { UserListItem } from '@/entities/user/model/types';
|
||||
import { useStore } from '@/shared/model/store';
|
||||
|
||||
export const UserManageWrap = () => {
|
||||
const midOptions = useStore.getState().UserStore.selectOptionsMids;
|
||||
const userMid = useStore.getState().UserStore.mid;
|
||||
|
||||
const { navigate } = useNavigate();
|
||||
const { mutateAsync: userFind } = useUserFindMutation();
|
||||
const [userItems, setUserItems] = useState<Array<UserListItem>>([]);
|
||||
const [pageParam, setPageParam] = useState(DEFAULT_PAGE_PARAM);
|
||||
const [mid, setMid] = useState<string>('nictest00m');
|
||||
|
||||
const midList = [
|
||||
{ value: 'nictest00m', label: 'nictest00m' },
|
||||
{ value: 'nictest01m', label: 'nictest01m' },
|
||||
{ value: 'nictest02m', label: 'nictest02m' },
|
||||
];
|
||||
const [mid, setMid] = useState<string>(userMid);
|
||||
|
||||
const callList = (mid: string) => {
|
||||
setPageParam(pageParam);
|
||||
@@ -44,10 +42,19 @@ export const UserManageWrap = () => {
|
||||
<>
|
||||
<div className="ing-list">
|
||||
<div className="input-wrapper top-select mt-16">
|
||||
<select value={mid} onChange={e => setMid(e.target.value)}>
|
||||
{midList.map(item => (
|
||||
<option key={item.value} value={item.value}>{item.label}</option>
|
||||
))}
|
||||
<select
|
||||
value={mid}
|
||||
onChange={e => setMid(e.target.value)}
|
||||
>
|
||||
{
|
||||
midOptions.map((value, index) => (
|
||||
<option
|
||||
key={ value.value }
|
||||
value={ value.value }
|
||||
selected={ (userMid === value.value)? true: false }
|
||||
>{ value.name }</option>
|
||||
))
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -25,15 +25,17 @@ import { useExtensionFundAccountBalanceMutation } from '../../api/fund-account/u
|
||||
import { NumericFormat } from 'react-number-format';
|
||||
import { FundAccountTransactionFilter } from '../filter/fund-account-trnasaction-filter';
|
||||
import { PATHS } from '@/shared/constants/paths';
|
||||
import { useStore } from '@/shared/model/store';
|
||||
|
||||
export const FundAccountTransferListWrap = () => {
|
||||
const { navigate } = useNavigate();
|
||||
const userMid = useStore.getState().UserStore.mid;
|
||||
|
||||
const [sortBy, setSortBy] = useState<SortByKeys>(SortByKeys.New);
|
||||
const [listItems, setListItems] = useState<Record<string, Array<FundAccountTransferContentItem>>>({});
|
||||
const [filterOn, setFilterOn] = useState<boolean>(false);
|
||||
const [pageParam, setPageParam] = useState(DEFAULT_PAGE_PARAM);
|
||||
const [mid, setMid] = useState<string>('nictest00m');
|
||||
const [mid, setMid] = useState<string>(userMid);
|
||||
const [receiveAccountName, setReceiveAccountName] = useState<string>('');
|
||||
const [receiveAccountNo, setReceiveAccountNo] = useState<string>('');
|
||||
const [fromDate, setFromDate] = useState(moment().format('YYYYMMDD'));
|
||||
|
||||
@@ -11,196 +11,198 @@ import { LinkPaymentSearchType, } from "../../model/types";
|
||||
import { useExtensionLinkPayHistoryListMutation } from '../../api/link-payment/use-extension-link-pay-history-list-mutation';
|
||||
import { DEFAULT_PAGE_PARAM } from '@/entities/common/model/constant';
|
||||
import { useExtensionLinkPayHistoryDownloadExcelMutation } from '../../api/link-payment/use-extension-link-pay-history-download-excel-mutation';
|
||||
import { useStore } from '@/shared/model/store';
|
||||
|
||||
const processResultBtnGroup = [
|
||||
{ name: '전체', value: ProcessResult.ALL },
|
||||
{ name: '성공', value: ProcessResult.SUCCESS },
|
||||
{ name: '실패', value: ProcessResult.FAIL }
|
||||
]
|
||||
{ name: '전체', value: ProcessResult.ALL },
|
||||
{ name: '성공', value: ProcessResult.SUCCESS },
|
||||
{ name: '실패', value: ProcessResult.FAIL }
|
||||
];
|
||||
|
||||
export const LinkPaymentHistoryWrap = () => {
|
||||
const { navigate } = useNavigate();
|
||||
const { navigate } = useNavigate();
|
||||
const userMid = useStore.getState().UserStore.mid;
|
||||
|
||||
const [filterOn, setFilterOn] = useState<boolean>(false);
|
||||
const [sortBy, setSortBy] = useState<SortByKeys>(SortByKeys.New);
|
||||
const [listItems, setListItems] = useState({});
|
||||
const [pageParam, setPageParam] = useState(DEFAULT_PAGE_PARAM);
|
||||
const [mid, setMid] = useState<string>('nictest00m');
|
||||
const [searchType, setSearchType] = useState<LinkPaymentSearchType>(LinkPaymentSearchType.ALL)
|
||||
const [searchKeyword, setSearchKeyword] = useState<string>('');
|
||||
const [startDate, setStartDate] = useState(moment().format('YYYY-MM-DD'));
|
||||
const [endDate, setEndDate] = useState(moment().format('YYYY-MM-DD'));
|
||||
const [transactionStatus, setTransactionStatus] = useState<LinkPaymentTransactionStatus>(LinkPaymentTransactionStatus.ALL)
|
||||
const [processResult, setProcessResult] = useState<ProcessResult>(ProcessResult.ALL)
|
||||
const [sendMethod, setSendMethod] = useState<LinkPaymentSendMethod>(LinkPaymentSendMethod.ALL)
|
||||
const [filterOn, setFilterOn] = useState<boolean>(false);
|
||||
const [sortBy, setSortBy] = useState<SortByKeys>(SortByKeys.New);
|
||||
const [listItems, setListItems] = useState({});
|
||||
const [pageParam, setPageParam] = useState(DEFAULT_PAGE_PARAM);
|
||||
const [mid, setMid] = useState<string>(userMid);
|
||||
const [searchType, setSearchType] = useState<LinkPaymentSearchType>(LinkPaymentSearchType.ALL)
|
||||
const [searchKeyword, setSearchKeyword] = useState<string>('');
|
||||
const [startDate, setStartDate] = useState(moment().format('YYYY-MM-DD'));
|
||||
const [endDate, setEndDate] = useState(moment().format('YYYY-MM-DD'));
|
||||
const [transactionStatus, setTransactionStatus] = useState<LinkPaymentTransactionStatus>(LinkPaymentTransactionStatus.ALL)
|
||||
const [processResult, setProcessResult] = useState<ProcessResult>(ProcessResult.ALL)
|
||||
const [sendMethod, setSendMethod] = useState<LinkPaymentSendMethod>(LinkPaymentSendMethod.ALL)
|
||||
|
||||
const { mutateAsync: linkPayHistoryList } = useExtensionLinkPayHistoryListMutation();
|
||||
const { mutateAsync: downloadExcel } = useExtensionLinkPayHistoryDownloadExcelMutation();
|
||||
const { mutateAsync: linkPayHistoryList } = useExtensionLinkPayHistoryListMutation();
|
||||
const { mutateAsync: downloadExcel } = useExtensionLinkPayHistoryDownloadExcelMutation();
|
||||
|
||||
const onClickToNavigate = () => {
|
||||
navigate(PATHS.additionalService.linkPayment.request)
|
||||
}
|
||||
const onClickToNavigate = () => {
|
||||
navigate(PATHS.additionalService.linkPayment.request)
|
||||
};
|
||||
|
||||
const callList = (option?: {
|
||||
sortBy?: string,
|
||||
val?: string
|
||||
}) => {
|
||||
pageParam.sortBy = (option?.sortBy) ? option.sortBy : sortBy;
|
||||
setPageParam(pageParam);
|
||||
const callList = (option?: {
|
||||
sortBy?: string,
|
||||
val?: string
|
||||
}) => {
|
||||
pageParam.sortBy = (option?.sortBy) ? option.sortBy : sortBy;
|
||||
setPageParam(pageParam);
|
||||
|
||||
let listParams = {
|
||||
mid: mid,
|
||||
searchCl: searchType === LinkPaymentSearchType.ALL ? '' : searchType,
|
||||
searchValue: searchKeyword,
|
||||
paymentMethod: 'st', // 추후 변경 필요 빼야함
|
||||
fromDate: startDate,
|
||||
toDate: endDate,
|
||||
paymentStatus: transactionStatus === LinkPaymentTransactionStatus.ALL ? '' : transactionStatus,
|
||||
sendStatus: processResult === ProcessResult.ALL ? '' : processResult,
|
||||
sendMethod: sendMethod === LinkPaymentSendMethod.ALL ? '' : sendMethod,
|
||||
page: pageParam
|
||||
}
|
||||
let listParams = {
|
||||
mid: mid,
|
||||
searchCl: searchType === LinkPaymentSearchType.ALL ? '' : searchType,
|
||||
searchValue: searchKeyword,
|
||||
paymentMethod: 'st', // 추후 변경 필요 빼야함
|
||||
fromDate: startDate,
|
||||
toDate: endDate,
|
||||
paymentStatus: transactionStatus === LinkPaymentTransactionStatus.ALL ? '' : transactionStatus,
|
||||
sendStatus: processResult === ProcessResult.ALL ? '' : processResult,
|
||||
sendMethod: sendMethod === LinkPaymentSendMethod.ALL ? '' : sendMethod,
|
||||
page: pageParam
|
||||
};
|
||||
|
||||
linkPayHistoryList(listParams).then((rs) => {
|
||||
setListItems(assembleData(rs.content));
|
||||
})
|
||||
};
|
||||
linkPayHistoryList(listParams).then((rs) => {
|
||||
setListItems(assembleData(rs.content));
|
||||
});
|
||||
};
|
||||
|
||||
const assembleData = (content: Array<LinkPaymentHistoryListItem>) => {
|
||||
let data: any = {};
|
||||
if (content && content.length > 0) {
|
||||
for (let i = 0; i < content?.length; i++) {
|
||||
let sendDate = content[i]?.sendDate?.substring(0, 8);
|
||||
let groupDate = moment(sendDate).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 assembleData = (content: Array<LinkPaymentHistoryListItem>) => {
|
||||
let data: any = {};
|
||||
if(content && content.length > 0){
|
||||
for(let i=0;i<content?.length;i++){
|
||||
let sendDate = content[i]?.sendDate?.substring(0, 8);
|
||||
let groupDate = moment(sendDate).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 = () => {
|
||||
downloadExcel({
|
||||
mid: mid,
|
||||
searchCl: searchType === LinkPaymentSearchType.ALL ? '' : searchType,
|
||||
searchValue: searchKeyword,
|
||||
paymentMethod: 'st', // 추후 변경 필요 빼야함
|
||||
fromDate: startDate,
|
||||
toDate: endDate,
|
||||
paymentStatus: transactionStatus === LinkPaymentTransactionStatus.ALL ? '' : transactionStatus,
|
||||
sendStatus: processResult === ProcessResult.ALL ? '' : processResult,
|
||||
sendMethod: sendMethod === LinkPaymentSendMethod.ALL ? '' : sendMethod,
|
||||
}).then((rs) => {
|
||||
console.log('Excel Dowload Status : ' + rs.status)
|
||||
});
|
||||
};
|
||||
const onClickToDownloadExcel = () => {
|
||||
downloadExcel({
|
||||
mid: mid,
|
||||
searchCl: (searchType === LinkPaymentSearchType.ALL)? '': searchType,
|
||||
searchValue: searchKeyword,
|
||||
paymentMethod: 'st', // 추후 변경 필요 빼야함
|
||||
fromDate: startDate,
|
||||
toDate: endDate,
|
||||
paymentStatus: (transactionStatus === LinkPaymentTransactionStatus.ALL)? '': transactionStatus,
|
||||
sendStatus: (processResult === ProcessResult.ALL)? '': processResult,
|
||||
sendMethod: (sendMethod === LinkPaymentSendMethod.ALL)? '': sendMethod,
|
||||
}).then((rs) => {
|
||||
console.log('Excel Dowload Status : ' + rs.status);
|
||||
});
|
||||
};
|
||||
|
||||
const onClickProcessResult = (val: ProcessResult) => {
|
||||
setProcessResult(val);
|
||||
}
|
||||
const onClickProcessResult = (val: ProcessResult) => {
|
||||
setProcessResult(val);
|
||||
}
|
||||
|
||||
const onClickToSort = (sort: SortByKeys) => {
|
||||
setSortBy(sort);
|
||||
callList({ sortBy: sort });
|
||||
};
|
||||
const onClickToSort = (sort: SortByKeys) => {
|
||||
setSortBy(sort);
|
||||
callList({ sortBy: sort });
|
||||
};
|
||||
|
||||
const onClickToOpenFilter = () => {
|
||||
setFilterOn(!filterOn);
|
||||
};
|
||||
const onClickToOpenFilter = () => {
|
||||
setFilterOn(!filterOn);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
callList();
|
||||
}, []);
|
||||
useEffect(() => {
|
||||
callList();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<>
|
||||
<section className="summary-section pt-30">
|
||||
<div className="credit-controls">
|
||||
<div>
|
||||
<input
|
||||
className="credit-period"
|
||||
type="text"
|
||||
value={moment(startDate).format('YYYY.MM.DD') + '-' + moment(endDate).format('YYYY.MM.DD')}
|
||||
readOnly={true}
|
||||
/>
|
||||
<button
|
||||
className="filter-btn">
|
||||
<img
|
||||
src={IMAGE_ROOT + '/ico_setting.svg'}
|
||||
alt="검색옵션"
|
||||
onClick={() => onClickToOpenFilter()}
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
<button
|
||||
className="download-btn"
|
||||
aria-label="다운로드"
|
||||
>
|
||||
<img
|
||||
src={IMAGE_ROOT + '/ico_download.svg'}
|
||||
alt="다운로드"
|
||||
onClick={() => onClickToDownloadExcel()}
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
</section>
|
||||
return (
|
||||
<>
|
||||
<section className="summary-section pt-30">
|
||||
<div className="credit-controls">
|
||||
<div>
|
||||
<input
|
||||
className="credit-period"
|
||||
type="text"
|
||||
value={moment(startDate).format('YYYY.MM.DD') + '-' + moment(endDate).format('YYYY.MM.DD')}
|
||||
readOnly={true}
|
||||
/>
|
||||
<button
|
||||
className="filter-btn">
|
||||
<img
|
||||
src={IMAGE_ROOT + '/ico_setting.svg'}
|
||||
alt="검색옵션"
|
||||
onClick={() => onClickToOpenFilter()}
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
<button
|
||||
className="download-btn"
|
||||
aria-label="다운로드"
|
||||
>
|
||||
<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">
|
||||
{
|
||||
processResultBtnGroup.map((value, index) => (
|
||||
<span
|
||||
key={`key-service-code=${index}`}
|
||||
className={`keyword-tag ${(processResult === value.value) ? 'active' : ''}`}
|
||||
onClick={() => onClickProcessResult(value.value)}
|
||||
>{value.name}</span>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="filter-section">
|
||||
<SortOptionsBox
|
||||
sortBy={sortBy}
|
||||
onClickToSort={onClickToSort}
|
||||
>
|
||||
</SortOptionsBox>
|
||||
<div className="excrow">
|
||||
<div className="full-menu-keywords no-padding">
|
||||
{
|
||||
processResultBtnGroup.map((value, index) => (
|
||||
<span
|
||||
key={`key-service-code=${index}`}
|
||||
className={`keyword-tag ${(processResult === value.value) ? 'active' : ''}`}
|
||||
onClick={() => onClickProcessResult(value.value)}
|
||||
>{ value.name }</span>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<LinkPaymentHistoryList
|
||||
listItems={listItems}
|
||||
additionalServiceCategory={AdditionalServiceCategory.LinkPaymentHistory}
|
||||
></LinkPaymentHistoryList>
|
||||
<div className="apply-row">
|
||||
<button
|
||||
className="btn-50 btn-blue flex-1"
|
||||
onClick={() => onClickToNavigate()}
|
||||
>결제 신청</button>
|
||||
</div>
|
||||
<LinkPaymentHistoryFilter
|
||||
filterOn={filterOn}
|
||||
setFilterOn={setFilterOn}
|
||||
mid={mid}
|
||||
searchType={searchType}
|
||||
searchKeyword={searchKeyword}
|
||||
startDate={startDate}
|
||||
endDate={endDate}
|
||||
transactionStatus={transactionStatus}
|
||||
processResult={processResult}
|
||||
sendMethod={sendMethod}
|
||||
setMid={setMid}
|
||||
setSearchType={setSearchType}
|
||||
setSearchKeyword={setSearchKeyword}
|
||||
setStartDate={setStartDate}
|
||||
setEndDate={setEndDate}
|
||||
setTransactionStatus={setTransactionStatus}
|
||||
setProcessResult={setProcessResult}
|
||||
setSendMethod={setSendMethod}
|
||||
></LinkPaymentHistoryFilter>
|
||||
</>
|
||||
)
|
||||
<LinkPaymentHistoryList
|
||||
listItems={listItems}
|
||||
additionalServiceCategory={AdditionalServiceCategory.LinkPaymentHistory}
|
||||
></LinkPaymentHistoryList>
|
||||
<div className="apply-row">
|
||||
<button
|
||||
className="btn-50 btn-blue flex-1"
|
||||
onClick={() => onClickToNavigate()}
|
||||
>결제 신청</button>
|
||||
</div>
|
||||
<LinkPaymentHistoryFilter
|
||||
filterOn={filterOn}
|
||||
setFilterOn={setFilterOn}
|
||||
mid={mid}
|
||||
searchType={searchType}
|
||||
searchKeyword={searchKeyword}
|
||||
startDate={startDate}
|
||||
endDate={endDate}
|
||||
transactionStatus={transactionStatus}
|
||||
processResult={processResult}
|
||||
sendMethod={sendMethod}
|
||||
setMid={setMid}
|
||||
setSearchType={setSearchType}
|
||||
setSearchKeyword={setSearchKeyword}
|
||||
setStartDate={setStartDate}
|
||||
setEndDate={setEndDate}
|
||||
setTransactionStatus={setTransactionStatus}
|
||||
setProcessResult={setProcessResult}
|
||||
setSendMethod={setSendMethod}
|
||||
></LinkPaymentHistoryFilter>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -10,186 +10,190 @@ import { SortOptionsBox } from '../sort-options-box';
|
||||
import { useExtensionLinkPayWaitListMutation } from '../../api/link-payment/use-extension-link-pay-wait-list-mutation';
|
||||
import { DEFAULT_PAGE_PARAM } from '@/entities/common/model/constant';
|
||||
import { useExtensionLinkPayWaitDownloadExcelMutation } from '../../api/link-payment/use-extension-link-pay-wait-download-excel-mutation';
|
||||
import { useStore } from '@/shared/model/store';
|
||||
|
||||
const sendingStatusBtnGrouup = [
|
||||
{ name: '전체', value: LinkPaymentSendingStatus.ALL },
|
||||
{ name: '발송요청', value: LinkPaymentSendingStatus.SEND_REQUEST },
|
||||
{ name: '발송취소', value: LinkPaymentSendingStatus.SEND_CANCEL }
|
||||
{ name: '전체', value: LinkPaymentSendingStatus.ALL },
|
||||
{ name: '발송요청', value: LinkPaymentSendingStatus.SEND_REQUEST },
|
||||
{ name: '발송취소', value: LinkPaymentSendingStatus.SEND_CANCEL }
|
||||
]
|
||||
|
||||
export const LinkPaymentWaitSendWrap = () => {
|
||||
const { navigate } = useNavigate();
|
||||
const { navigate } = useNavigate();
|
||||
const userMid = useStore.getState().UserStore.mid;
|
||||
|
||||
const [sortBy, setSortBy] = useState<SortByKeys>(SortByKeys.New);
|
||||
const [filterOn, setFilterOn] = useState<boolean>(false);
|
||||
const [mid, setMid] = useState<string>('nictest00m');
|
||||
const [searchType, setSearchType] = useState<LinkPaymentSearchType>(LinkPaymentSearchType.ALL)
|
||||
const [searchKeyword, setSearchKeyword] = useState<string>('');
|
||||
const [startDate, setStartDate] = useState(moment().format('YYYY-MM-DD'));
|
||||
const [endDate, setEndDate] = useState(moment().format('YYYY-MM-DD'));
|
||||
const [sendMethod, setSendMethod] = useState<LinkPaymentSendMethod>(LinkPaymentSendMethod.ALL);
|
||||
const [sendingStatus, setSendingStatus] = useState<LinkPaymentSendingStatus>(LinkPaymentSendingStatus.ALL);
|
||||
const [listItems, setListItems] = useState({});
|
||||
const [pageParam, setPageParam] = useState(DEFAULT_PAGE_PARAM);
|
||||
const [sortBy, setSortBy] = useState<SortByKeys>(SortByKeys.New);
|
||||
const [filterOn, setFilterOn] = useState<boolean>(false);
|
||||
const [mid, setMid] = useState<string>(userMid);
|
||||
const [searchType, setSearchType] = useState<LinkPaymentSearchType>(LinkPaymentSearchType.ALL)
|
||||
const [searchKeyword, setSearchKeyword] = useState<string>('');
|
||||
const [startDate, setStartDate] = useState(moment().format('YYYY-MM-DD'));
|
||||
const [endDate, setEndDate] = useState(moment().format('YYYY-MM-DD'));
|
||||
const [sendMethod, setSendMethod] = useState<LinkPaymentSendMethod>(LinkPaymentSendMethod.ALL);
|
||||
const [sendingStatus, setSendingStatus] = useState<LinkPaymentSendingStatus>(LinkPaymentSendingStatus.ALL);
|
||||
const [listItems, setListItems] = useState({});
|
||||
const [pageParam, setPageParam] = useState(DEFAULT_PAGE_PARAM);
|
||||
|
||||
const { mutateAsync: pendingSendList } = useExtensionLinkPayWaitListMutation();
|
||||
const { mutateAsync: downloadExcel } = useExtensionLinkPayWaitDownloadExcelMutation();
|
||||
const { mutateAsync: pendingSendList } = useExtensionLinkPayWaitListMutation();
|
||||
const { mutateAsync: downloadExcel } = useExtensionLinkPayWaitDownloadExcelMutation();
|
||||
|
||||
const onClickToOpenFilter = () => {
|
||||
setFilterOn(!filterOn);
|
||||
};
|
||||
const onClickToNavigate = () => {
|
||||
navigate(PATHS.additionalService.linkPayment.request)
|
||||
const onClickToOpenFilter = () => {
|
||||
setFilterOn(!filterOn);
|
||||
};
|
||||
const onClickToNavigate = () => {
|
||||
navigate(PATHS.additionalService.linkPayment.request)
|
||||
}
|
||||
|
||||
const callList = (option?: {
|
||||
sortBy?: string,
|
||||
val?: string
|
||||
}) => {
|
||||
pageParam.sortBy = (option?.sortBy) ? option.sortBy : sortBy;
|
||||
setPageParam(pageParam);
|
||||
|
||||
let listParams = {
|
||||
mid: mid,
|
||||
searchCl: (searchType === LinkPaymentSearchType.ALL)? '': searchType,
|
||||
searchValue: searchKeyword,
|
||||
fromDate: startDate,
|
||||
toDate: endDate,
|
||||
sendStatus: (sendingStatus === LinkPaymentSendingStatus.ALL)? '': sendingStatus, // 추후 삭제 필요
|
||||
sendMethod: (sendMethod === LinkPaymentSendMethod.ALL)? '': sendMethod,
|
||||
processStatus: (sendingStatus === LinkPaymentSendingStatus.ALL)? '': sendingStatus,
|
||||
page: pageParam
|
||||
}
|
||||
|
||||
const callList = (option?: {
|
||||
sortBy?: string,
|
||||
val?: string
|
||||
}) => {
|
||||
pageParam.sortBy = (option?.sortBy) ? option.sortBy : sortBy;
|
||||
setPageParam(pageParam);
|
||||
pendingSendList(listParams).then((rs) => {
|
||||
setListItems(assembleData(rs.content));
|
||||
});
|
||||
};
|
||||
|
||||
let listParams = {
|
||||
mid: mid,
|
||||
searchCl: searchType === LinkPaymentSearchType.ALL ? '' : searchType,
|
||||
searchValue: searchKeyword,
|
||||
fromDate: startDate,
|
||||
toDate: endDate,
|
||||
sendStatus: sendingStatus === LinkPaymentSendingStatus.ALL ? '' : sendingStatus, // 추후 삭제 필요
|
||||
sendMethod: sendMethod === LinkPaymentSendMethod.ALL ? '' : sendMethod,
|
||||
processStatus: sendingStatus === LinkPaymentSendingStatus.ALL ? '' : sendingStatus,
|
||||
page: pageParam
|
||||
const assembleData = (content: Array<LinkPaymentWaitListItem>) => {
|
||||
let data: any = {};
|
||||
if(content && content.length > 0){
|
||||
for (let i = 0; i < content?.length; i++) {
|
||||
let scheduledSendDate = content[i]?.scheduledSendDate?.substring(0, 8);
|
||||
let groupDate = moment(scheduledSendDate).format('YYYYMMDD');
|
||||
if(!!groupDate && !data.hasOwnProperty(groupDate)){
|
||||
data[groupDate] = [];
|
||||
}
|
||||
|
||||
pendingSendList(listParams).then((rs) => {
|
||||
setListItems(assembleData(rs.content))
|
||||
})
|
||||
};
|
||||
|
||||
const assembleData = (content: Array<LinkPaymentWaitListItem>) => {
|
||||
let data: any = {};
|
||||
if (content && content.length > 0) {
|
||||
for (let i = 0; i < content?.length; i++) {
|
||||
let scheduledSendDate = content[i]?.scheduledSendDate?.substring(0, 8);
|
||||
let groupDate = moment(scheduledSendDate).format('YYYYMMDD');
|
||||
if (!!groupDate && !data.hasOwnProperty(groupDate)) {
|
||||
data[groupDate] = [];
|
||||
}
|
||||
if (!!groupDate && data.hasOwnProperty(groupDate)) {
|
||||
data[groupDate].push(content[i]);
|
||||
}
|
||||
}
|
||||
if(!!groupDate && data.hasOwnProperty(groupDate)){
|
||||
data[groupDate].push(content[i]);
|
||||
}
|
||||
console.log('Data : ', data)
|
||||
return data;
|
||||
};
|
||||
}
|
||||
}
|
||||
console.log('Data : ', data);
|
||||
return data;
|
||||
};
|
||||
|
||||
const onClickToDownloadExcel = () => {
|
||||
downloadExcel({
|
||||
mid: mid,
|
||||
searchCl: searchType === LinkPaymentSearchType.ALL ? '' : searchType,
|
||||
searchValue: searchKeyword,
|
||||
fromDate: startDate,
|
||||
toDate: endDate,
|
||||
sendStatus: sendingStatus === LinkPaymentSendingStatus.ALL ? '' : sendingStatus, // 추후 삭제 필요
|
||||
sendMethod: sendMethod === LinkPaymentSendMethod.ALL ? '' : sendMethod,
|
||||
processStatus: sendingStatus === LinkPaymentSendingStatus.ALL ? '' : sendingStatus,
|
||||
}).then((rs) => {
|
||||
console.log('Excel Dowload Status : ' + rs.status)
|
||||
});
|
||||
};
|
||||
const onClickToDownloadExcel = () => {
|
||||
downloadExcel({
|
||||
mid: mid,
|
||||
searchCl: (searchType === LinkPaymentSearchType.ALL)? '': searchType,
|
||||
searchValue: searchKeyword,
|
||||
fromDate: startDate,
|
||||
toDate: endDate,
|
||||
sendStatus: (sendingStatus === LinkPaymentSendingStatus.ALL)? '': sendingStatus, // 추후 삭제 필요
|
||||
sendMethod: (sendMethod === LinkPaymentSendMethod.ALL)? '': sendMethod,
|
||||
processStatus: (sendingStatus === LinkPaymentSendingStatus.ALL)? '': sendingStatus,
|
||||
}).then((rs) => {
|
||||
console.log('Excel Dowload Status : ' + rs.status);
|
||||
});
|
||||
};
|
||||
|
||||
const onClickToSort = (sort: SortByKeys) => {
|
||||
setSortBy(sort);
|
||||
};
|
||||
const onClickToSort = (sort: SortByKeys) => {
|
||||
setSortBy(sort);
|
||||
};
|
||||
|
||||
const onClickSendingStatus = (val: LinkPaymentSendingStatus) => {
|
||||
setSendingStatus(val);
|
||||
};
|
||||
const onClickSendingStatus = (val: LinkPaymentSendingStatus) => {
|
||||
setSendingStatus(val);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
callList();
|
||||
}, []);
|
||||
return (
|
||||
<>
|
||||
<section className="summary-section pt-30">
|
||||
<div className="credit-controls">
|
||||
<div>
|
||||
<input
|
||||
className="credit-period"
|
||||
type="text"
|
||||
value={moment(startDate).format('YYYY.MM.DD') + '-' + moment(endDate).format('YYYY.MM.DD')}
|
||||
readOnly={true}
|
||||
/>
|
||||
<button
|
||||
className="filter-btn">
|
||||
<img
|
||||
src={IMAGE_ROOT + '/ico_setting.svg'}
|
||||
alt="검색옵션"
|
||||
onClick={() => onClickToOpenFilter()}
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
<button
|
||||
className="download-btn"
|
||||
aria-label="다운로드"
|
||||
>
|
||||
<img
|
||||
src={IMAGE_ROOT + '/ico_download.svg'}
|
||||
alt="다운로드"
|
||||
onClick={() => onClickToDownloadExcel()}
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
</section>
|
||||
useEffect(() => {
|
||||
callList();
|
||||
}, []);
|
||||
|
||||
<div className="filter-section">
|
||||
<SortOptionsBox
|
||||
sortBy={sortBy}
|
||||
onClickToSort={onClickToSort}
|
||||
></SortOptionsBox>
|
||||
<div className="excrow">
|
||||
<div className="full-menu-keywords no-padding">
|
||||
{
|
||||
sendingStatusBtnGrouup.map((value, index) => (
|
||||
<span
|
||||
key={`key-service-code=${index}`}
|
||||
className={`keyword-tag ${(sendingStatus === value.value) ? 'active' : ''}`}
|
||||
onClick={() => onClickSendingStatus(value.value)}
|
||||
>{value.name}</span>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
return (
|
||||
<>
|
||||
<section className="summary-section pt-30">
|
||||
<div className="credit-controls">
|
||||
<div>
|
||||
<input
|
||||
className="credit-period"
|
||||
type="text"
|
||||
value={moment(startDate).format('YYYY.MM.DD') + '-' + moment(endDate).format('YYYY.MM.DD')}
|
||||
readOnly={true}
|
||||
/>
|
||||
<button
|
||||
className="filter-btn">
|
||||
<img
|
||||
src={IMAGE_ROOT + '/ico_setting.svg'}
|
||||
alt="검색옵션"
|
||||
onClick={() => onClickToOpenFilter()}
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
<button
|
||||
className="download-btn"
|
||||
aria-label="다운로드"
|
||||
>
|
||||
<img
|
||||
src={IMAGE_ROOT + '/ico_download.svg'}
|
||||
alt="다운로드"
|
||||
onClick={() => onClickToDownloadExcel()}
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<LinkPaymentWaitList
|
||||
listItems={listItems}
|
||||
additionalServiceCategory={AdditionalServiceCategory.LinkPaymentWait}
|
||||
></LinkPaymentWaitList>
|
||||
<div className="apply-row">
|
||||
<button
|
||||
className="btn-50 btn-blue flex-1"
|
||||
onClick={() => onClickToNavigate()}
|
||||
>결제 신청</button>
|
||||
</div>
|
||||
<LinkPaymentWaitSendFilter
|
||||
filterOn={filterOn}
|
||||
setFilterOn={setFilterOn}
|
||||
mid={mid}
|
||||
searchType={searchType}
|
||||
searchKeyword={searchKeyword}
|
||||
startDate={startDate}
|
||||
endDate={endDate}
|
||||
sendMethod={sendMethod}
|
||||
sendingStatus={sendingStatus}
|
||||
setMid={setMid}
|
||||
setSearchType={setSearchType}
|
||||
setSearchKeyword={setSearchKeyword}
|
||||
setStartDate={setStartDate}
|
||||
setEndDate={setEndDate}
|
||||
setSendMethod={setSendMethod}
|
||||
setSendingStatus={setSendingStatus}
|
||||
></LinkPaymentWaitSendFilter>
|
||||
</>
|
||||
)
|
||||
<div className="filter-section">
|
||||
<SortOptionsBox
|
||||
sortBy={sortBy}
|
||||
onClickToSort={onClickToSort}
|
||||
></SortOptionsBox>
|
||||
<div className="excrow">
|
||||
<div className="full-menu-keywords no-padding">
|
||||
{
|
||||
sendingStatusBtnGrouup.map((value, index) => (
|
||||
<span
|
||||
key={`key-service-code=${index}`}
|
||||
className={`keyword-tag ${(sendingStatus === value.value) ? 'active' : ''}`}
|
||||
onClick={() => onClickSendingStatus(value.value)}
|
||||
>{value.name}</span>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<LinkPaymentWaitList
|
||||
listItems={listItems}
|
||||
additionalServiceCategory={AdditionalServiceCategory.LinkPaymentWait}
|
||||
></LinkPaymentWaitList>
|
||||
<div className="apply-row">
|
||||
<button
|
||||
className="btn-50 btn-blue flex-1"
|
||||
onClick={() => onClickToNavigate()}
|
||||
>결제 신청</button>
|
||||
</div>
|
||||
<LinkPaymentWaitSendFilter
|
||||
filterOn={filterOn}
|
||||
setFilterOn={setFilterOn}
|
||||
mid={mid}
|
||||
searchType={searchType}
|
||||
searchKeyword={searchKeyword}
|
||||
startDate={startDate}
|
||||
endDate={endDate}
|
||||
sendMethod={sendMethod}
|
||||
sendingStatus={sendingStatus}
|
||||
setMid={setMid}
|
||||
setSearchType={setSearchType}
|
||||
setSearchKeyword={setSearchKeyword}
|
||||
setStartDate={setStartDate}
|
||||
setEndDate={setEndDate}
|
||||
setSendMethod={setSendMethod}
|
||||
setSendingStatus={setSendingStatus}
|
||||
></LinkPaymentWaitSendFilter>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -11,11 +11,13 @@ import {
|
||||
} from '../model/types';
|
||||
import { useNavigate } from '@/shared/lib/hooks';
|
||||
import { PATHS } from '@/shared/constants/paths';
|
||||
import { useStore } from '@/shared/model/store';
|
||||
|
||||
export const BoxContainer1 = () => {
|
||||
const { navigate } = useNavigate();
|
||||
const userMid = useStore.getState().UserStore.mid;
|
||||
|
||||
const [mid, setMid] = useState<string>('nictest00m');
|
||||
const [mid, setMid] = useState<string>(userMid);
|
||||
const [searchDate, setSearchDate] = useState<string>(moment().format('YYYY-MM-DD'));
|
||||
|
||||
const [sales, setSales] = useState<Sales>();
|
||||
|
||||
@@ -7,11 +7,13 @@ import { useHomeMonthwMutation } from '../api/use-home-month-mutation';
|
||||
import { NumericFormat } from 'react-number-format';
|
||||
import { useNavigate } from '@/shared/lib/hooks';
|
||||
import { PATHS } from '@/shared/constants/paths';
|
||||
import { useStore } from '@/shared/model/store';
|
||||
|
||||
export const BoxContainer2 = () => {
|
||||
const { navigate } = useNavigate();
|
||||
const userMid = useStore.getState().UserStore.mid;
|
||||
|
||||
const [mid, setMid] = useState<string>('nictest00m');
|
||||
const [mid, setMid] = useState<string>(userMid);
|
||||
const [searchDate, setSearchDate] = useState<string>(moment().format('YYYY-MM-DD'));
|
||||
|
||||
const [sales, setSales] = useState<Sales>();
|
||||
|
||||
@@ -6,7 +6,7 @@ import { NotifyRow } from './section/notify-row';
|
||||
|
||||
export const NotificationDataWrap = () => {
|
||||
const midOptions = useStore.getState().UserStore.selectOptionsMids;
|
||||
const mid = useStore.getState().UserStore.mid;
|
||||
const userMid = useStore.getState().UserStore.mid;
|
||||
|
||||
const [merchantInfo, setMerchantInfo] = useState<Record<string, any>>();
|
||||
const [creditCard, setCreditCard] = useState<Record<string, any>>();
|
||||
@@ -39,8 +39,8 @@ export const NotificationDataWrap = () => {
|
||||
callPaymentNotificationData(value);
|
||||
};
|
||||
useEffect(() => {
|
||||
if(!!mid){
|
||||
callPaymentNotificationData(mid);
|
||||
if(!!userMid){
|
||||
callPaymentNotificationData(userMid);
|
||||
}
|
||||
}, []);
|
||||
|
||||
@@ -56,6 +56,7 @@ export const NotificationDataWrap = () => {
|
||||
<option
|
||||
key={ value.value }
|
||||
value={ value.value }
|
||||
selected={ (userMid === value.value)? true: false }
|
||||
>{ value.name }</option>
|
||||
))
|
||||
}
|
||||
|
||||
@@ -11,11 +11,14 @@ import {
|
||||
SettlementsCalendarResponse,
|
||||
SettlementStatus
|
||||
} from '../model/types';
|
||||
import { useStore } from '@/shared/model/store';
|
||||
|
||||
export const CalendarWrap = () => {
|
||||
moment.locale('ko');
|
||||
const midOptions = useStore.getState().UserStore.selectOptionsMids;
|
||||
const userMid = useStore.getState().UserStore.mid;
|
||||
|
||||
const [mid, setMid] = useState<string>('nictest00m');
|
||||
const [mid, setMid] = useState<string>(userMid);
|
||||
const [yearMonth, setYearMonth] = useState<string>(moment().format('YYYY-MM'));
|
||||
const [totalCompletedAmount, setTotalCompletedAmount] = useState<number>(0);
|
||||
const [totalScheduledAmount, setTotalScheduledAmount] = useState<number>(0);
|
||||
@@ -28,9 +31,9 @@ export const CalendarWrap = () => {
|
||||
|
||||
const { mutateAsync: settlementsCalendar } = useSettlementsCalendarMutation();
|
||||
|
||||
const callCalendar = () => {
|
||||
const callCalendar = (selectedMid: string) => {
|
||||
let params: SettlementsCalendarParams = {
|
||||
mid: mid,
|
||||
mid: selectedMid,
|
||||
yearMonth: yearMonth
|
||||
};
|
||||
settlementsCalendar(params).then((rs: SettlementsCalendarResponse) => {
|
||||
@@ -85,18 +88,28 @@ export const CalendarWrap = () => {
|
||||
setYearMonth(newYearMonth);
|
||||
}
|
||||
};
|
||||
|
||||
const onChangeMid = (value: string) => {
|
||||
callCalendar(value);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
callCalendar();
|
||||
callCalendar(userMid);
|
||||
}, [yearMonth]);
|
||||
return (
|
||||
<>
|
||||
<div className="calendar-wrap pt-30">
|
||||
<div className="input-wrapper top-select">
|
||||
<select>
|
||||
<option value="1">nicetest00g</option>
|
||||
<option value="2">nicetest00g</option>
|
||||
<option value="3">nicetest00g</option>
|
||||
<select onChange={ (e) => onChangeMid(e.target.value) }>
|
||||
{
|
||||
midOptions.map((value, index) => (
|
||||
<option
|
||||
key={ value.value }
|
||||
value={ value.value }
|
||||
selected={ (userMid === value.value)? true: false }
|
||||
>{ value.name }</option>
|
||||
))
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ import {
|
||||
SettlementsTransactionListContent
|
||||
} from '../model/types';
|
||||
import { SortByKeys } from '@/entities/common/model/types';
|
||||
import { useStore } from '@/shared/model/store';
|
||||
|
||||
export interface ListWrapProps {
|
||||
startDateFromCalendar?: string;
|
||||
@@ -36,13 +37,14 @@ export const ListWrap = ({
|
||||
endDateFromCalendar
|
||||
}: ListWrapProps) => {
|
||||
const { navigate } = useNavigate();
|
||||
const userMid = useStore.getState().UserStore.mid;
|
||||
|
||||
const [sortBy, setSortBy] = useState<SortByKeys>(SortByKeys.New);
|
||||
const [settlementDateListItems, setSettlementDateListItems] = useState<Record<string, Array<SettlementsHistoryContent>>>({});
|
||||
const [transactionDatelistItems, setTransactionDateListItems] = useState<Record<string, Array<SettlementsTransactionListContent>>>({});
|
||||
const [filterOn, setFilterOn] = useState<boolean>(false);
|
||||
const [pageParam, setPageParam] = useState(DEFAULT_PAGE_PARAM);
|
||||
const [mid, setMid] = useState<string>('nictest00m');
|
||||
const [mid, setMid] = useState<string>(userMid);
|
||||
const [periodType, setPeriodType] = useState<SettlementPeriodType>(SettlementPeriodType.SETTLEMENT_DATE);
|
||||
const [startDate, setStartDate] = useState(startDateFromCalendar? moment(startDateFromCalendar).format('YYYY-MM-DD'): moment().format('YYYY-MM-DD'));
|
||||
const [endDate, setEndDate] = useState(endDateFromCalendar? moment(endDateFromCalendar).format('YYYY-MM-DD'): moment().format('YYYY-MM-DD'));
|
||||
|
||||
@@ -10,7 +10,7 @@ export enum TransactionCategory {
|
||||
Escrow = 'Escrow',
|
||||
Billing = 'Billing',
|
||||
};
|
||||
export enum InfoWrapKeys {
|
||||
export enum InfoSectionKeys {
|
||||
Amount = 'Amount',
|
||||
Important = 'Important',
|
||||
Payment = 'Payment',
|
||||
@@ -451,15 +451,16 @@ export interface BillingDetailResponse extends BillingInfo {
|
||||
|
||||
}
|
||||
|
||||
export interface DetailInfoProps extends DetailResponse {
|
||||
export interface InfoSectionProps extends DetailResponse {
|
||||
transactionCategory?: TransactionCategory;
|
||||
isOpen?: boolean;
|
||||
tid?: string;
|
||||
serviceCode?: string;
|
||||
purposeType?: CashReceiptPurposeType;
|
||||
onClickToOpenInfo?: (info: InfoWrapKeys) => void;
|
||||
onClickToOpenInfo?: (info: InfoSectionKeys) => void;
|
||||
}
|
||||
|
||||
|
||||
export interface DownloadConfirmationParams {
|
||||
tid?: string;
|
||||
};
|
||||
|
||||
@@ -2,18 +2,18 @@ import moment from 'moment';
|
||||
import { NumericFormat } from 'react-number-format';
|
||||
import { SectionTitleArrow } from '@/entities/common/ui/section-title-arrow';
|
||||
import { useDownloadConfirmationMutation } from '../../api/use-download-confirmation-mutation';
|
||||
import { InfoWrapKeys, DetailInfoProps } from '../../model/types';
|
||||
import { InfoSectionKeys, InfoSectionProps } from '../../model/types';
|
||||
import { SlideDown } from 'react-slidedown';
|
||||
import 'react-slidedown/lib/slidedown.css';
|
||||
|
||||
export const AmountInfoWrap = ({
|
||||
export const AmountInfoSection = ({
|
||||
transactionCategory,
|
||||
amountInfo,
|
||||
isOpen,
|
||||
tid,
|
||||
serviceCode,
|
||||
onClickToOpenInfo
|
||||
}: DetailInfoProps) => {
|
||||
}: InfoSectionProps) => {
|
||||
const { mutateAsync: downloadConfirmation } = useDownloadConfirmationMutation();
|
||||
|
||||
const subItems: Record<string, Record<string, string>> = {
|
||||
@@ -100,7 +100,7 @@ export const AmountInfoWrap = ({
|
||||
|
||||
const onClickToSetShowInfo = () => {
|
||||
if(!!onClickToOpenInfo){
|
||||
onClickToOpenInfo(InfoWrapKeys.Amount);
|
||||
onClickToOpenInfo(InfoSectionKeys.Amount);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import moment from 'moment';
|
||||
import { InfoWrapKeys, DetailInfoProps } from '../../model/types';
|
||||
import { InfoSectionProps } from '../../model/types';
|
||||
|
||||
export const BillingInfoWrap = ({
|
||||
export const BillingInfoSection = ({
|
||||
billingInfo,
|
||||
}: DetailInfoProps) => {
|
||||
}: InfoSectionProps) => {
|
||||
|
||||
const getInstallmentMonth = () => {
|
||||
let rs = [];
|
||||
@@ -1,19 +1,19 @@
|
||||
import moment from 'moment';
|
||||
import { SectionTitleArrow } from '@/entities/common/ui/section-title-arrow';
|
||||
import { InfoWrapKeys, DetailInfoProps } from '../../model/types';
|
||||
import { InfoSectionKeys, InfoSectionProps } from '../../model/types';
|
||||
import { SlideDown } from 'react-slidedown';
|
||||
import 'react-slidedown/lib/slidedown.css';
|
||||
|
||||
export const DetailInfoWrap = ({
|
||||
export const DetailInfoSection = ({
|
||||
transactionCategory,
|
||||
detailInfo,
|
||||
isOpen,
|
||||
onClickToOpenInfo
|
||||
}: DetailInfoProps) => {
|
||||
}: InfoSectionProps) => {
|
||||
|
||||
const onClickToSetOpenInfo = () => {
|
||||
if(!!onClickToOpenInfo){
|
||||
onClickToOpenInfo(InfoWrapKeys.Issue);
|
||||
onClickToOpenInfo(InfoSectionKeys.Issue);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
import moment from 'moment';
|
||||
import { SectionTitleArrow } from '@/entities/common/ui/section-title-arrow';
|
||||
import { InfoWrapKeys, DetailInfoProps } from '../../model/types';
|
||||
import { InfoSectionKeys, InfoSectionProps } from '../../model/types';
|
||||
import { SlideDown } from 'react-slidedown';
|
||||
import 'react-slidedown/lib/slidedown.css';
|
||||
|
||||
export const EscrowInfoWrap = ({
|
||||
export const EscrowInfoSection = ({
|
||||
transactionCategory,
|
||||
escrowInfo,
|
||||
isOpen,
|
||||
onClickToOpenInfo
|
||||
}: DetailInfoProps) => {
|
||||
}: InfoSectionProps) => {
|
||||
|
||||
const onClickToSetOpenInfo = () => {
|
||||
if(!!onClickToOpenInfo){
|
||||
onClickToOpenInfo(InfoWrapKeys.Escrow);
|
||||
onClickToOpenInfo(InfoSectionKeys.Escrow);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import moment from 'moment';
|
||||
import { NumericFormat } from 'react-number-format';
|
||||
import { InfoWrapKeys, DetailInfoProps, TransactionCategory } from '../../model/types';
|
||||
import { InfoSectionProps, TransactionCategory } from '../../model/types';
|
||||
|
||||
export const ImportantInfoWrap = ({
|
||||
export const ImportantInfoSection = ({
|
||||
transactionCategory,
|
||||
importantInfo,
|
||||
serviceCode
|
||||
}: DetailInfoProps) => {
|
||||
}: InfoSectionProps) => {
|
||||
|
||||
const subItems: Record<string, Record<string, string>> = {
|
||||
ordNo: {name: '주문번호', type: 'string'},
|
||||
@@ -1,12 +1,12 @@
|
||||
import { SectionTitleArrow } from '@/entities/common/ui/section-title-arrow';
|
||||
import { InfoWrapKeys, DetailInfoProps } from '../../model/types';
|
||||
import { InfoSectionProps } from '../../model/types';
|
||||
import moment from 'moment';
|
||||
|
||||
export const IssueInfoWrap = ({
|
||||
export const IssueInfoSection = ({
|
||||
transactionCategory,
|
||||
issueInfo,
|
||||
purposeType,
|
||||
}: DetailInfoProps) => {
|
||||
}: InfoSectionProps) => {
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -1,17 +1,17 @@
|
||||
import moment from 'moment';
|
||||
import { NumericFormat } from 'react-number-format';
|
||||
import { SectionTitleArrow } from '@/entities/common/ui/section-title-arrow';
|
||||
import { InfoWrapKeys, DetailInfoProps } from '../../model/types';
|
||||
import { InfoSectionKeys, InfoSectionProps } from '../../model/types';
|
||||
import { SlideDown } from 'react-slidedown';
|
||||
import 'react-slidedown/lib/slidedown.css';
|
||||
|
||||
export const PartCancelInfoWrap = ({
|
||||
export const PartCancelInfoSection = ({
|
||||
transactionCategory,
|
||||
partCancelInfo,
|
||||
serviceCode,
|
||||
isOpen,
|
||||
onClickToOpenInfo
|
||||
}: DetailInfoProps) => {
|
||||
}: InfoSectionProps) => {
|
||||
|
||||
const subItems: Record<string, Record<string, string>> = {
|
||||
originalTid: {name: '원거래 TID', type: 'string'},
|
||||
@@ -94,7 +94,7 @@ export const PartCancelInfoWrap = ({
|
||||
|
||||
const onClickToSetOpenInfo = () => {
|
||||
if(!!onClickToOpenInfo){
|
||||
onClickToOpenInfo(InfoWrapKeys.PartCancel);
|
||||
onClickToOpenInfo(InfoSectionKeys.PartCancel);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
import moment from 'moment';
|
||||
import { SectionTitleArrow } from '@/entities/common/ui/section-title-arrow';
|
||||
import { InfoWrapKeys, DetailInfoProps, TransactionCategory } from '../../model/types';
|
||||
import { InfoSectionKeys, InfoSectionProps, TransactionCategory } from '../../model/types';
|
||||
import { NumericFormat } from 'react-number-format';
|
||||
import { SlideDown } from 'react-slidedown';
|
||||
import 'react-slidedown/lib/slidedown.css';
|
||||
|
||||
export const PaymentInfoWrap = ({
|
||||
export const PaymentInfoSection = ({
|
||||
transactionCategory,
|
||||
paymentInfo,
|
||||
serviceCode,
|
||||
isOpen,
|
||||
onClickToOpenInfo
|
||||
}: DetailInfoProps) => {
|
||||
}: InfoSectionProps) => {
|
||||
|
||||
const subItems: Record<string, Record<string, string>> = {
|
||||
approvalAcquire: {name: '승인매입', type: 'string'},
|
||||
@@ -117,7 +117,7 @@ export const PaymentInfoWrap = ({
|
||||
|
||||
const onClickToSetOpenInfo = () => {
|
||||
if(!!onClickToOpenInfo){
|
||||
onClickToOpenInfo(InfoWrapKeys.Payment);
|
||||
onClickToOpenInfo(InfoSectionKeys.Payment);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
import moment from 'moment';
|
||||
import { NumericFormat } from 'react-number-format';
|
||||
import { SectionTitleArrow } from '@/entities/common/ui/section-title-arrow';
|
||||
import { InfoWrapKeys, DetailInfoProps } from '../../model/types';
|
||||
import { InfoSectionKeys, InfoSectionProps } from '../../model/types';
|
||||
import { SlideDown } from 'react-slidedown';
|
||||
import 'react-slidedown/lib/slidedown.css';
|
||||
|
||||
export const SettlementInfoWrap = ({
|
||||
export const SettlementInfoSection = ({
|
||||
transactionCategory,
|
||||
settlementInfo,
|
||||
serviceCode,
|
||||
isOpen,
|
||||
onClickToOpenInfo
|
||||
}: DetailInfoProps) => {
|
||||
}: InfoSectionProps) => {
|
||||
|
||||
const subItems: Record<string, Record<string, string>> = {
|
||||
approvalSettleDate: {name: '승인정산일', type: 'date'},
|
||||
@@ -93,7 +93,7 @@ export const SettlementInfoWrap = ({
|
||||
|
||||
const onClickToSetOpenInfo = () => {
|
||||
if(!!onClickToOpenInfo){
|
||||
onClickToOpenInfo(InfoWrapKeys.Settlement);
|
||||
onClickToOpenInfo(InfoSectionKeys.Settlement);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
import moment from 'moment';
|
||||
import { SectionTitleArrow } from '@/entities/common/ui/section-title-arrow';
|
||||
import { InfoWrapKeys, DetailInfoProps, TransactionCategory } from '../../model/types';
|
||||
import { InfoSectionKeys, InfoSectionProps, TransactionCategory } from '../../model/types';
|
||||
import { NumericFormat } from 'react-number-format';
|
||||
import { SlideDown } from 'react-slidedown';
|
||||
import 'react-slidedown/lib/slidedown.css';
|
||||
|
||||
export const TransactionInfoWrap = ({
|
||||
export const TransactionInfoSection = ({
|
||||
transactionCategory,
|
||||
transactionInfo,
|
||||
serviceCode,
|
||||
isOpen,
|
||||
onClickToOpenInfo
|
||||
}: DetailInfoProps) => {
|
||||
}: InfoSectionProps) => {
|
||||
|
||||
const subItems: Record<string, Record<string, string>> = {
|
||||
buyerName: {name: '구매자명', type: 'string'},
|
||||
@@ -96,7 +96,7 @@ export const TransactionInfoWrap = ({
|
||||
|
||||
const onClickToSetOpenInfo = () => {
|
||||
if(!!onClickToOpenInfo){
|
||||
onClickToOpenInfo(InfoWrapKeys.Transaction);
|
||||
onClickToOpenInfo(InfoSectionKeys.Transaction);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -14,13 +14,16 @@ import {
|
||||
} from '../model/types';
|
||||
import { useVatReturnListMutation } from '../api/use-vat-return-list-mutation';
|
||||
import { ListDateGroup } from './list-date-group';
|
||||
import { useStore } from '@/shared/model/store';
|
||||
|
||||
export const ListWrap = () => {
|
||||
const userMid = useStore.getState().UserStore.mid;
|
||||
|
||||
const [filterOn, setFilterOn] = useState<boolean>(false);
|
||||
const [sortBy, setSortBy] = useState<SortByKeys>(SortByKeys.New);
|
||||
const [listItems, setListItems] = useState<Record<string, Array<VatReturnListContent>>>({});
|
||||
const [pageParam, setPageParam] = useState(DEFAULT_PAGE_PARAM);
|
||||
const [mid, setMid] = useState<string>('nictest00m');
|
||||
const [mid, setMid] = useState<string>(userMid);
|
||||
const [startDate, setStartDate] = useState(moment().subtract(1, 'month').format('YYYY.MM'));
|
||||
const [endDate, setEndDate] = useState(moment().format('YYYY.MM'));
|
||||
const [receiptType, setReceiptType] = useState<VatReturnReceiptType>(VatReturnReceiptType.ALL);
|
||||
|
||||
Reference in New Issue
Block a user