에스크로 빌링 현금영수증 세금계산서 필터 뱃지
This commit is contained in:
@@ -10,8 +10,8 @@ export const getVatReturnReceiptTypeBtnGroup = (t: TFunction) => [
|
||||
export const getVatReturnTargetTypeBtnGroup = (t: TFunction) => [
|
||||
{name: t('transaction.constants.all'), value: VatReturnTargetType.ALL },
|
||||
{name: t('vatReturn.general'), value: VatReturnTargetType.GENERAL },
|
||||
{name: t('vatReturn.differenceSettlement'), value: VatReturnTargetType.DIFFERENCE_COLLECTION },
|
||||
{name: t('vatReturn.refundSettlement'), value: VatReturnTargetType.REFUND_SETTLEMENT }
|
||||
{name: t('vatReturn.differenceSettlement'), value: VatReturnTargetType.DIFF_SETTLE },
|
||||
{name: t('vatReturn.refundSettlement'), value: VatReturnTargetType.REFUND_SETTLE }
|
||||
];
|
||||
|
||||
export const getVatReturnTaxBtnGroups = (t: TFunction) => [
|
||||
|
||||
@@ -20,8 +20,8 @@ export enum VatReturnPayTax {
|
||||
export enum VatReturnTargetType {
|
||||
ALL = 'ALL',
|
||||
GENERAL = 'GENERAL',
|
||||
DIFFERENCE_COLLECTION = 'DIFFERENCE_COLLECTION',
|
||||
REFUND_SETTLEMENT = 'REFUND_SETTLEMENT',
|
||||
DIFF_SETTLE = 'DIFF_SETTLE',
|
||||
REFUND_SETTLE = 'REFUND_SETTLE',
|
||||
};
|
||||
|
||||
export interface VatReturnListParams {
|
||||
|
||||
@@ -29,6 +29,12 @@ import { snackBar } from '@/shared/lib';
|
||||
|
||||
/* 세금계산서 48 */
|
||||
const menuId = 48;
|
||||
const defaultParams = {
|
||||
startMonth: moment().format('YYYYMM'),
|
||||
endMonth: moment().format('YYYYMM'),
|
||||
receiptType: VatReturnReceiptType.ALL,
|
||||
targetType: VatReturnTargetType.ALL,
|
||||
};
|
||||
export const ListWrap = () => {
|
||||
const { t } = useTranslation();
|
||||
const userMid = useStore.getState().UserStore.mid;
|
||||
@@ -39,10 +45,10 @@ export const ListWrap = () => {
|
||||
const [listItems, setListItems] = useState<Array<VatReturnListContent>>([]);
|
||||
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 [receiptType, setReceiptType] = useState<VatReturnReceiptType>(VatReturnReceiptType.ALL);
|
||||
const [targetType, setTargetType] = useState<VatReturnTargetType>(VatReturnTargetType.ALL);
|
||||
const [startMonth, setStartMonth] = useState<string>(defaultParams.startMonth);
|
||||
const [endMonth, setEndMonth] = useState<string>(defaultParams.endMonth);
|
||||
const [receiptType, setReceiptType] = useState<VatReturnReceiptType>(defaultParams.receiptType);
|
||||
const [targetType, setTargetType] = useState<VatReturnTargetType>(defaultParams.targetType);
|
||||
|
||||
const [downloadBottomSheetOn, setDownloadBottomSheetOn] = useState<boolean>(false);
|
||||
|
||||
@@ -53,6 +59,7 @@ export const ListWrap = () => {
|
||||
const [groupDateOn, setGroupDateOn] = useState<boolean>(false);
|
||||
|
||||
const [listHeight, setListHeight] = useState<number>(0);
|
||||
const [filterUsed, setFilterUsed] = useState<boolean>(false);
|
||||
|
||||
const { mutateAsync: vatReturnList } = useVatReturnListMutation();
|
||||
const { mutateAsync: vatReturnDownloadExcel } = useVatReturnDownloadExcelMutation();
|
||||
@@ -214,8 +221,21 @@ export const ListWrap = () => {
|
||||
return rs;
|
||||
};
|
||||
|
||||
const checkUsedFilter = () => {
|
||||
let rs: boolean = true;
|
||||
if(startMonth === defaultParams.startMonth
|
||||
&& endMonth=== defaultParams.endMonth
|
||||
&& receiptType === defaultParams.receiptType
|
||||
&& targetType === defaultParams.targetType
|
||||
){
|
||||
rs = false;
|
||||
}
|
||||
setFilterUsed(rs);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
callList();
|
||||
checkUsedFilter();
|
||||
}, [
|
||||
mid, startMonth, endMonth,
|
||||
receiptType, targetType, sortType
|
||||
@@ -258,6 +278,9 @@ export const ListWrap = () => {
|
||||
src={ IMAGE_ROOT + '/ico_setting.svg' }
|
||||
alt={ t('transaction.searchOptions') }
|
||||
/>
|
||||
{ filterUsed &&
|
||||
<span className="notification-badge2"></span>
|
||||
}
|
||||
</button>
|
||||
</div>
|
||||
<button className="download-btn">
|
||||
@@ -285,6 +308,9 @@ export const ListWrap = () => {
|
||||
alt={ t('transaction.searchOptions') }
|
||||
onClick={ onClickToOpenFilter }
|
||||
/>
|
||||
{ filterUsed &&
|
||||
<span className="notification-badge2"></span>
|
||||
}
|
||||
</button>
|
||||
<button className="download-btn">
|
||||
<img
|
||||
|
||||
Reference in New Issue
Block a user