- 권한체크 오류 수정, ARS 결제신청 화면 가림 문제 수정
This commit is contained in:
@@ -103,7 +103,7 @@ export const ArsDetail = ({
|
|||||||
transition={DetailMotionDuration}
|
transition={DetailMotionDuration}
|
||||||
style={DetailMotionStyle}
|
style={DetailMotionStyle}
|
||||||
>
|
>
|
||||||
<div className="full-menu-container pdw-16">
|
<div className="full-menu-container pdw-16" style={{ paddingBottom: '100px' }}>
|
||||||
<div className="full-menu-header">
|
<div className="full-menu-header">
|
||||||
<div className="full-menu-title center">{t('additionalService.ars.detailTitle')}</div>
|
<div className="full-menu-title center">{t('additionalService.ars.detailTitle')}</div>
|
||||||
<div className="full-menu-actions">
|
<div className="full-menu-actions">
|
||||||
|
|||||||
@@ -40,35 +40,35 @@ export const ListWrap = () => {
|
|||||||
const [pageParam, setPageParam] = useState<DefaultRequestPagination>(DEFAULT_PAGE_PARAM);
|
const [pageParam, setPageParam] = useState<DefaultRequestPagination>(DEFAULT_PAGE_PARAM);
|
||||||
const [mid, setMid] = useState<string>(userMid);
|
const [mid, setMid] = useState<string>(userMid);
|
||||||
const [startMonth, setStartMonth] = useState<string>(moment().format('YYYYMM'));
|
const [startMonth, setStartMonth] = useState<string>(moment().format('YYYYMM'));
|
||||||
const [endMonth, setEndMonth] = useState<string>(moment().format('YYYYMM'));
|
const [endMonth, setEndMonth] = useState<string>(moment().format('YYYYMM'));
|
||||||
const [receiptType, setReceiptType] = useState<VatReturnReceiptType>(VatReturnReceiptType.ALL);
|
const [receiptType, setReceiptType] = useState<VatReturnReceiptType>(VatReturnReceiptType.ALL);
|
||||||
const [targetType, setTargetType] = useState<VatReturnTargetType>(VatReturnTargetType.ALL);
|
const [targetType, setTargetType] = useState<VatReturnTargetType>(VatReturnTargetType.ALL);
|
||||||
|
|
||||||
const [downloadBottomSheetOn, setDownloadBottomSheetOn] = useState<boolean>(false);
|
const [downloadBottomSheetOn, setDownloadBottomSheetOn] = useState<boolean>(false);
|
||||||
|
|
||||||
const [detailOn, setDetailOn] = useState<boolean>(false);
|
const [detailOn, setDetailOn] = useState<boolean>(false);
|
||||||
const [detailTaxInvoiceNumber, setDetailTaxInvoiceNumber] = useState<string>('');
|
const [detailTaxInvoiceNumber, setDetailTaxInvoiceNumber] = useState<string>('');
|
||||||
|
|
||||||
const { mutateAsync: vatReturnList } = useVatReturnListMutation();
|
const { mutateAsync: vatReturnList } = useVatReturnListMutation();
|
||||||
const { mutateAsync: vatReturnDownloadExcel } = useVatReturnDownloadExcelMutation();
|
const { mutateAsync: vatReturnDownloadExcel } = useVatReturnDownloadExcelMutation();
|
||||||
|
|
||||||
const onIntersect: IntersectionObserverCallback = (entries: Array<IntersectionObserverEntry>) => {
|
const onIntersect: IntersectionObserverCallback = (entries: Array<IntersectionObserverEntry>) => {
|
||||||
entries.forEach((entry: IntersectionObserverEntry) => {
|
entries.forEach((entry: IntersectionObserverEntry) => {
|
||||||
if(entry.isIntersecting){
|
if (entry.isIntersecting) {
|
||||||
if(onActionIntersect && !!pageParam.cursor){
|
if (onActionIntersect && !!pageParam.cursor) {
|
||||||
setOnActionIntersect(false);
|
setOnActionIntersect(false);
|
||||||
callList('page');
|
callList('page');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const { setTarget } = useIntersectionObserver({
|
const { setTarget } = useIntersectionObserver({
|
||||||
threshold: 1,
|
threshold: 1,
|
||||||
onIntersect
|
onIntersect
|
||||||
});
|
});
|
||||||
|
|
||||||
const callList = async(type?: string) => {
|
const callList = async (type?: string) => {
|
||||||
setOnActionIntersect(false);
|
setOnActionIntersect(false);
|
||||||
let params: VatReturnListParams = {
|
let params: VatReturnListParams = {
|
||||||
mid: mid,
|
mid: mid,
|
||||||
@@ -81,34 +81,34 @@ export const ListWrap = () => {
|
|||||||
...{ sortType: sortType }
|
...{ sortType: sortType }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
vatReturnList(params).then((rs: VatReturnListResponse) => {
|
vatReturnList(params).then((rs: VatReturnListResponse) => {
|
||||||
if(type === 'page'){
|
if (type === 'page') {
|
||||||
setListItems([
|
setListItems([
|
||||||
...listItems,
|
...listItems,
|
||||||
...rs.content
|
...rs.content
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
setListItems(rs.content);
|
setListItems(rs.content);
|
||||||
}
|
}
|
||||||
if(rs.hasNext
|
if (rs.hasNext
|
||||||
&& rs.nextCursor !== pageParam.cursor
|
&& rs.nextCursor !== pageParam.cursor
|
||||||
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
||||||
){
|
) {
|
||||||
setPageParam({
|
setPageParam({
|
||||||
...pageParam,
|
...pageParam,
|
||||||
...{ cursor: rs.nextCursor }
|
...{ cursor: rs.nextCursor }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
setPageParam({
|
setPageParam({
|
||||||
...pageParam,
|
...pageParam,
|
||||||
...{ cursor: null }
|
...{ cursor: null }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
setOnActionIntersect(
|
setOnActionIntersect(
|
||||||
!!rs.hasNext
|
!!rs.hasNext
|
||||||
&& rs.nextCursor !== pageParam.cursor
|
&& rs.nextCursor !== pageParam.cursor
|
||||||
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
||||||
);
|
);
|
||||||
@@ -117,7 +117,7 @@ export const ListWrap = () => {
|
|||||||
return;
|
return;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const onClickToOpenFIlter = () => {
|
const onClickToOpenFIlter = () => {
|
||||||
setFilterOn(true);
|
setFilterOn(true);
|
||||||
};
|
};
|
||||||
@@ -125,20 +125,19 @@ export const ListWrap = () => {
|
|||||||
setSortType(sort);
|
setSortType(sort);
|
||||||
};
|
};
|
||||||
const onClickToOpenDownloadBottomSheet = () => {
|
const onClickToOpenDownloadBottomSheet = () => {
|
||||||
if(checkGrant(menuId, 'D')){
|
if (!checkGrant(menuId, 'X')) {
|
||||||
setDownloadBottomSheetOn(true);
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
showAlert(t('common.nopermission'));
|
showAlert(t('common.nopermission'));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
setDownloadBottomSheetOn(true);
|
||||||
};
|
};
|
||||||
const onRequestDownloadExcel = (
|
const onRequestDownloadExcel = (
|
||||||
selectedMode: DownloadSelectedMode,
|
selectedMode: DownloadSelectedMode,
|
||||||
userEmail?: string
|
userEmail?: string
|
||||||
) => {
|
) => {
|
||||||
if(selectedMode === DownloadSelectedMode.EMAIL
|
if (selectedMode === DownloadSelectedMode.EMAIL
|
||||||
&& !!userEmail
|
&& !!userEmail
|
||||||
){
|
) {
|
||||||
let params: VatReturnDownloadExcelParams = {
|
let params: VatReturnDownloadExcelParams = {
|
||||||
email: userEmail,
|
email: userEmail,
|
||||||
mid: mid,
|
mid: mid,
|
||||||
@@ -151,7 +150,7 @@ export const ListWrap = () => {
|
|||||||
console.log(rs);
|
console.log(rs);
|
||||||
snackBar('이메일로 엑셀파일 요청이 완료되었습니다.');
|
snackBar('이메일로 엑셀파일 요청이 완료되었습니다.');
|
||||||
}).catch((e: any) => {
|
}).catch((e: any) => {
|
||||||
if(e.response?.data?.error?.message){
|
if (e.response?.data?.error?.message) {
|
||||||
snackBar(e.response?.data?.error?.message);
|
snackBar(e.response?.data?.error?.message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -162,37 +161,37 @@ export const ListWrap = () => {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
callList();
|
callList();
|
||||||
}, [
|
}, [
|
||||||
mid, startMonth, endMonth,
|
mid, startMonth, endMonth,
|
||||||
receiptType, targetType, sortType
|
receiptType, targetType, sortType
|
||||||
]);
|
]);
|
||||||
const setDetailData = (detailData: DetailData) => {
|
const setDetailData = (detailData: DetailData) => {
|
||||||
setDetailOn(detailData.detailOn);
|
setDetailOn(detailData.detailOn);
|
||||||
setDetailTaxInvoiceNumber(detailData.taxInvoiceNumber);
|
setDetailTaxInvoiceNumber(detailData.taxInvoiceNumber);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const getListDateGroup = () => {
|
const getListDateGroup = () => {
|
||||||
let rs = [];
|
let rs = [];
|
||||||
let date = '';
|
let date = '';
|
||||||
let list: Array<VatReturnListContent> = [];
|
let list: Array<VatReturnListContent> = [];
|
||||||
|
|
||||||
for(let i=0;i<listItems.length;i++){
|
for (let i = 0; i < listItems.length; i++) {
|
||||||
let item = listItems[i];
|
let item = listItems[i];
|
||||||
if(!!item){
|
if (!!item) {
|
||||||
let issueDateTime = item?.issueDate;
|
let issueDateTime = item?.issueDate;
|
||||||
let issueDate = issueDateTime?.substr(0, 8);
|
let issueDate = issueDateTime?.substr(0, 8);
|
||||||
if(!!issueDate){
|
if (!!issueDate) {
|
||||||
if(i === 0){
|
if (i === 0) {
|
||||||
date = issueDate;
|
date = issueDate;
|
||||||
}
|
}
|
||||||
if(date !== issueDate){
|
if (date !== issueDate) {
|
||||||
if(list.length > 0){
|
if (list.length > 0) {
|
||||||
rs.push(
|
rs.push(
|
||||||
<ListDateGroup
|
<ListDateGroup
|
||||||
key={ date + '-' + i }
|
key={date + '-' + i}
|
||||||
date={ date }
|
date={date}
|
||||||
items={ list }
|
items={list}
|
||||||
setDetailData={ setDetailData }
|
setDetailData={setDetailData}
|
||||||
></ListDateGroup>
|
></ListDateGroup>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -203,85 +202,85 @@ export const ListWrap = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(list.length > 0){
|
if (list.length > 0) {
|
||||||
rs.push(
|
rs.push(
|
||||||
<ListDateGroup
|
<ListDateGroup
|
||||||
key={ date + '-last' }
|
key={date + '-last'}
|
||||||
date={ date }
|
date={date}
|
||||||
items={ list }
|
items={list}
|
||||||
setDetailData={ setDetailData }
|
setDetailData={setDetailData}
|
||||||
></ListDateGroup>
|
></ListDateGroup>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return rs;
|
return rs;
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="summary-section pt-30">
|
<div className="summary-section pt-30">
|
||||||
<div className="credit-controls">
|
<div className="credit-controls">
|
||||||
<div>
|
<div>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
className="credit-period"
|
className="credit-period"
|
||||||
value={ moment(startMonth+'01').format('YYYY.MM') + '-' + moment(endMonth+'01').format('YYYY.MM')}
|
value={moment(startMonth + '01').format('YYYY.MM') + '-' + moment(endMonth + '01').format('YYYY.MM')}
|
||||||
readOnly={ true }
|
readOnly={true}
|
||||||
/>
|
/>
|
||||||
<button
|
<button
|
||||||
className="filter-btn"
|
className="filter-btn"
|
||||||
onClick={ () => onClickToOpenFIlter() }
|
onClick={() => onClickToOpenFIlter()}
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
src={ IMAGE_ROOT + '/ico_setting.svg' }
|
src={IMAGE_ROOT + '/ico_setting.svg'}
|
||||||
alt={t('transaction.searchOptions')}
|
alt={t('transaction.searchOptions')}
|
||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<button className="download-btn">
|
<button className="download-btn">
|
||||||
<img
|
<img
|
||||||
src={ IMAGE_ROOT + '/ico_download.svg' }
|
src={IMAGE_ROOT + '/ico_download.svg'}
|
||||||
alt={t('transaction.download')}
|
alt={t('transaction.download')}
|
||||||
onClick={ onClickToOpenDownloadBottomSheet }
|
onClick={onClickToOpenDownloadBottomSheet}
|
||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="filter-section mt-10">
|
<div className="filter-section mt-10">
|
||||||
<SortTypeBox
|
<SortTypeBox
|
||||||
sortType={ sortType }
|
sortType={sortType}
|
||||||
onClickToSort={ onClickToSort }
|
onClickToSort={onClickToSort}
|
||||||
></SortTypeBox>
|
></SortTypeBox>
|
||||||
</div>
|
</div>
|
||||||
<div className="transaction-list">
|
<div className="transaction-list">
|
||||||
{ getListDateGroup() }
|
{getListDateGroup()}
|
||||||
<div ref={ setTarget }></div>
|
<div ref={setTarget}></div>
|
||||||
</div>
|
</div>
|
||||||
<ListFilter
|
<ListFilter
|
||||||
filterOn={ filterOn }
|
filterOn={filterOn}
|
||||||
setFilterOn={ setFilterOn }
|
setFilterOn={setFilterOn}
|
||||||
mid={ mid }
|
mid={mid}
|
||||||
startMonth={ startMonth }
|
startMonth={startMonth}
|
||||||
endMonth={ endMonth }
|
endMonth={endMonth}
|
||||||
receiptType={ receiptType }
|
receiptType={receiptType}
|
||||||
targetType={ targetType }
|
targetType={targetType}
|
||||||
setMid={ setMid }
|
setMid={setMid}
|
||||||
setStartMonth={ setStartMonth }
|
setStartMonth={setStartMonth}
|
||||||
setEndMonth={ setEndMonth }
|
setEndMonth={setEndMonth}
|
||||||
setReceiptType={ setReceiptType }
|
setReceiptType={setReceiptType}
|
||||||
setTargetType={ setTargetType }
|
setTargetType={setTargetType}
|
||||||
></ListFilter>
|
></ListFilter>
|
||||||
<TaxInvoiceDetail
|
<TaxInvoiceDetail
|
||||||
detailOn={ detailOn }
|
detailOn={detailOn}
|
||||||
setDetailOn={ setDetailOn }
|
setDetailOn={setDetailOn}
|
||||||
taxInvoiceNumber={ detailTaxInvoiceNumber }
|
taxInvoiceNumber={detailTaxInvoiceNumber}
|
||||||
></TaxInvoiceDetail>
|
></TaxInvoiceDetail>
|
||||||
{ !!downloadBottomSheetOn &&
|
{!!downloadBottomSheetOn &&
|
||||||
<DownloadBottomSheet
|
<DownloadBottomSheet
|
||||||
bottomSheetOn={ downloadBottomSheetOn }
|
bottomSheetOn={downloadBottomSheetOn}
|
||||||
setBottomSheetOn={ setDownloadBottomSheetOn }
|
setBottomSheetOn={setDownloadBottomSheetOn}
|
||||||
imageMode={ false }
|
imageMode={false}
|
||||||
emailMode={ true }
|
emailMode={true}
|
||||||
sendRequest={ onRequestDownloadExcel }
|
sendRequest={onRequestDownloadExcel}
|
||||||
></DownloadBottomSheet>
|
></DownloadBottomSheet>
|
||||||
}
|
}
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ export const ReferenceWrap = () => {
|
|||||||
const { mutateAsync: vatReturnReferenceRequest } = useVatReturnReferenceRequestMutation();
|
const { mutateAsync: vatReturnReferenceRequest } = useVatReturnReferenceRequestMutation();
|
||||||
|
|
||||||
const onClickToResquest = () => {
|
const onClickToResquest = () => {
|
||||||
if(checkGrant(menuId, 'X')){
|
if(checkGrant(menuId, 'R')){
|
||||||
let params: VatReturnReferenceRequestParams = {
|
let params: VatReturnReferenceRequestParams = {
|
||||||
mid: mid,
|
mid: mid,
|
||||||
startDate: startDate,
|
startDate: startDate,
|
||||||
|
|||||||
Reference in New Issue
Block a user