- 권한체크 오류 수정, ARS 결제신청 화면 가림 문제 수정

This commit is contained in:
HyeonJongKim
2025-11-14 18:46:58 +09:00
parent a484fff196
commit 72425eed37
3 changed files with 81 additions and 82 deletions

View File

@@ -103,7 +103,7 @@ export const ArsDetail = ({
transition={DetailMotionDuration}
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-title center">{t('additionalService.ars.detailTitle')}</div>
<div className="full-menu-actions">

View File

@@ -40,7 +40,7 @@ export const ListWrap = () => {
const [pageParam, setPageParam] = useState<DefaultRequestPagination>(DEFAULT_PAGE_PARAM);
const [mid, setMid] = useState<string>(userMid);
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 [targetType, setTargetType] = useState<VatReturnTargetType>(VatReturnTargetType.ALL);
@@ -54,8 +54,8 @@ export const ListWrap = () => {
const onIntersect: IntersectionObserverCallback = (entries: Array<IntersectionObserverEntry>) => {
entries.forEach((entry: IntersectionObserverEntry) => {
if(entry.isIntersecting){
if(onActionIntersect && !!pageParam.cursor){
if (entry.isIntersecting) {
if (onActionIntersect && !!pageParam.cursor) {
setOnActionIntersect(false);
callList('page');
}
@@ -68,7 +68,7 @@ export const ListWrap = () => {
onIntersect
});
const callList = async(type?: string) => {
const callList = async (type?: string) => {
setOnActionIntersect(false);
let params: VatReturnListParams = {
mid: mid,
@@ -83,25 +83,25 @@ export const ListWrap = () => {
};
vatReturnList(params).then((rs: VatReturnListResponse) => {
if(type === 'page'){
if (type === 'page') {
setListItems([
...listItems,
...rs.content
]);
}
else{
else {
setListItems(rs.content);
}
if(rs.hasNext
if (rs.hasNext
&& rs.nextCursor !== pageParam.cursor
&& rs.content.length === DEFAULT_PAGE_PARAM.size
){
) {
setPageParam({
...pageParam,
...{ cursor: rs.nextCursor }
});
}
else{
else {
setPageParam({
...pageParam,
...{ cursor: null }
@@ -125,20 +125,19 @@ export const ListWrap = () => {
setSortType(sort);
};
const onClickToOpenDownloadBottomSheet = () => {
if(checkGrant(menuId, 'D')){
setDownloadBottomSheetOn(true);
}
else{
if (!checkGrant(menuId, 'X')) {
showAlert(t('common.nopermission'));
return;
}
setDownloadBottomSheetOn(true);
};
const onRequestDownloadExcel = (
selectedMode: DownloadSelectedMode,
userEmail?: string
) => {
if(selectedMode === DownloadSelectedMode.EMAIL
selectedMode: DownloadSelectedMode,
userEmail?: string
) => {
if (selectedMode === DownloadSelectedMode.EMAIL
&& !!userEmail
){
) {
let params: VatReturnDownloadExcelParams = {
email: userEmail,
mid: mid,
@@ -151,7 +150,7 @@ export const ListWrap = () => {
console.log(rs);
snackBar('이메일로 엑셀파일 요청이 완료되었습니다.');
}).catch((e: any) => {
if(e.response?.data?.error?.message){
if (e.response?.data?.error?.message) {
snackBar(e.response?.data?.error?.message);
return;
}
@@ -176,23 +175,23 @@ export const ListWrap = () => {
let date = '';
let list: Array<VatReturnListContent> = [];
for(let i=0;i<listItems.length;i++){
for (let i = 0; i < listItems.length; i++) {
let item = listItems[i];
if(!!item){
if (!!item) {
let issueDateTime = item?.issueDate;
let issueDate = issueDateTime?.substr(0, 8);
if(!!issueDate){
if(i === 0){
if (!!issueDate) {
if (i === 0) {
date = issueDate;
}
if(date !== issueDate){
if(list.length > 0){
if (date !== issueDate) {
if (list.length > 0) {
rs.push(
<ListDateGroup
key={ date + '-' + i }
date={ date }
items={ list }
setDetailData={ setDetailData }
key={date + '-' + i}
date={date}
items={list}
setDetailData={setDetailData}
></ListDateGroup>
);
}
@@ -203,13 +202,13 @@ export const ListWrap = () => {
}
}
}
if(list.length > 0){
if (list.length > 0) {
rs.push(
<ListDateGroup
key={ date + '-last' }
date={ date }
items={ list }
setDetailData={ setDetailData }
key={date + '-last'}
date={date}
items={list}
setDetailData={setDetailData}
></ListDateGroup>
);
}
@@ -224,64 +223,64 @@ export const ListWrap = () => {
<input
type="text"
className="credit-period"
value={ moment(startMonth+'01').format('YYYY.MM') + '-' + moment(endMonth+'01').format('YYYY.MM')}
readOnly={ true }
value={moment(startMonth + '01').format('YYYY.MM') + '-' + moment(endMonth + '01').format('YYYY.MM')}
readOnly={true}
/>
<button
className="filter-btn"
onClick={ () => onClickToOpenFIlter() }
onClick={() => onClickToOpenFIlter()}
>
<img
src={ IMAGE_ROOT + '/ico_setting.svg' }
src={IMAGE_ROOT + '/ico_setting.svg'}
alt={t('transaction.searchOptions')}
/>
</button>
</div>
<button className="download-btn">
<img
src={ IMAGE_ROOT + '/ico_download.svg' }
src={IMAGE_ROOT + '/ico_download.svg'}
alt={t('transaction.download')}
onClick={ onClickToOpenDownloadBottomSheet }
onClick={onClickToOpenDownloadBottomSheet}
/>
</button>
</div>
</div>
<div className="filter-section mt-10">
<SortTypeBox
sortType={ sortType }
onClickToSort={ onClickToSort }
sortType={sortType}
onClickToSort={onClickToSort}
></SortTypeBox>
</div>
<div className="transaction-list">
{ getListDateGroup() }
<div ref={ setTarget }></div>
{getListDateGroup()}
<div ref={setTarget}></div>
</div>
<ListFilter
filterOn={ filterOn }
setFilterOn={ setFilterOn }
mid={ mid }
startMonth={ startMonth }
endMonth={ endMonth }
receiptType={ receiptType }
targetType={ targetType }
setMid={ setMid }
setStartMonth={ setStartMonth }
setEndMonth={ setEndMonth }
setReceiptType={ setReceiptType }
setTargetType={ setTargetType }
filterOn={filterOn}
setFilterOn={setFilterOn}
mid={mid}
startMonth={startMonth}
endMonth={endMonth}
receiptType={receiptType}
targetType={targetType}
setMid={setMid}
setStartMonth={setStartMonth}
setEndMonth={setEndMonth}
setReceiptType={setReceiptType}
setTargetType={setTargetType}
></ListFilter>
<TaxInvoiceDetail
detailOn={ detailOn }
setDetailOn={ setDetailOn }
taxInvoiceNumber={ detailTaxInvoiceNumber }
detailOn={detailOn}
setDetailOn={setDetailOn}
taxInvoiceNumber={detailTaxInvoiceNumber}
></TaxInvoiceDetail>
{ !!downloadBottomSheetOn &&
{!!downloadBottomSheetOn &&
<DownloadBottomSheet
bottomSheetOn={ downloadBottomSheetOn }
setBottomSheetOn={ setDownloadBottomSheetOn }
imageMode={ false }
emailMode={ true }
sendRequest={ onRequestDownloadExcel }
bottomSheetOn={downloadBottomSheetOn}
setBottomSheetOn={setDownloadBottomSheetOn}
imageMode={false}
emailMode={true}
sendRequest={onRequestDownloadExcel}
></DownloadBottomSheet>
}
</>

View File

@@ -35,7 +35,7 @@ export const ReferenceWrap = () => {
const { mutateAsync: vatReturnReferenceRequest } = useVatReturnReferenceRequestMutation();
const onClickToResquest = () => {
if(checkGrant(menuId, 'X')){
if(checkGrant(menuId, 'R')){
let params: VatReturnReferenceRequestParams = {
mid: mid,
startDate: startDate,