mid 관련 수정
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import { ChangeEvent, useEffect, useState } from 'react';
|
||||
import { PATHS } from '@/shared/constants/paths';
|
||||
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
||||
import { DEFAULT_PAGE_PARAM } from '@/entities/common/model/constant';
|
||||
@@ -8,16 +8,17 @@ import { UserListItem } from '@/entities/user/model/types';
|
||||
import { useStore } from '@/shared/model/store';
|
||||
|
||||
export const UserManageWrap = () => {
|
||||
const { navigate } = useNavigate();
|
||||
const midOptions = useStore.getState().UserStore.selectOptionsMids;
|
||||
const userMid = useStore.getState().UserStore.mid;
|
||||
|
||||
const { navigate } = useNavigate();
|
||||
const { mutateAsync: userFind } = useUserFindMutation();
|
||||
|
||||
const [mid, setMid] = useState<string>(userMid);
|
||||
const [userItems, setUserItems] = useState<Array<UserListItem>>([]);
|
||||
const [pageParam, setPageParam] = useState(DEFAULT_PAGE_PARAM);
|
||||
const [mid, setMid] = useState<string>(userMid);
|
||||
|
||||
const { mutateAsync: userFind } = useUserFindMutation();
|
||||
|
||||
const callList = (mid: string) => {
|
||||
const callList = () => {
|
||||
setPageParam(pageParam);
|
||||
userFind({ mid: mid, page: pageParam }).then((rs) => {
|
||||
console.log('API Response:', rs);
|
||||
@@ -35,7 +36,7 @@ export const UserManageWrap = () => {
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
callList(mid);
|
||||
callList();
|
||||
}, [mid]);
|
||||
|
||||
return (
|
||||
@@ -44,15 +45,14 @@ export const UserManageWrap = () => {
|
||||
<div style={{ flexShrink: 0 }}>
|
||||
<div className="input-wrapper top-select mt-16">
|
||||
<select
|
||||
value={mid}
|
||||
onChange={e => setMid(e.target.value)}
|
||||
value={ mid }
|
||||
onChange={ (e: ChangeEvent<HTMLSelectElement>) => setMid(e.target.value)}
|
||||
>
|
||||
{
|
||||
midOptions.map((value, index) => (
|
||||
<option
|
||||
key={ value.value }
|
||||
value={ value.value }
|
||||
selected={ (userMid === value.value)? true: false }
|
||||
>{ value.name }</option>
|
||||
))
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ export const BoxContainer1 = () => {
|
||||
const userMid = useStore.getState().UserStore.mid;
|
||||
|
||||
const [mid, setMid] = useState<string>(userMid);
|
||||
const [searchDate, setSearchDate] = useState<string>(moment().format('YYYY-MM-DD'));
|
||||
const [searchDate, setSearchDate] = useState<string>(moment().format('YYYYMMDD'));
|
||||
|
||||
const [sales, setSales] = useState<Sales>();
|
||||
const [settlement, setSettlement] = useState<Settlement>();
|
||||
@@ -60,7 +60,7 @@ export const BoxContainer1 = () => {
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
callToday();
|
||||
// callToday();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
|
||||
@@ -14,7 +14,7 @@ export const BoxContainer2 = () => {
|
||||
const userMid = useStore.getState().UserStore.mid;
|
||||
|
||||
const [mid, setMid] = useState<string>(userMid);
|
||||
const [searchDate, setSearchDate] = useState<string>(moment().format('YYYY-MM-DD'));
|
||||
const [searchDate, setSearchDate] = useState<string>(moment().format('YYYYMMDD'));
|
||||
|
||||
const [sales, setSales] = useState<Sales>();
|
||||
const [settlement, setSettlement] = useState<Settlement>();
|
||||
@@ -74,8 +74,8 @@ export const BoxContainer2 = () => {
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
callMonth();
|
||||
callOverview();
|
||||
// callMonth();
|
||||
// callOverview();
|
||||
}, []);
|
||||
|
||||
const onClickToNavigate = () => {
|
||||
|
||||
@@ -6,9 +6,9 @@ import { useTranslation } from 'react-i18next';
|
||||
import { IMAGE_ROOT } from '@/shared/constants/common';
|
||||
|
||||
export const HomeNoticeItem = ({
|
||||
id,
|
||||
seq,
|
||||
title,
|
||||
category,
|
||||
informCl,
|
||||
regDate,
|
||||
isNew
|
||||
}: NoticeItemProps) => {
|
||||
@@ -18,7 +18,7 @@ export const HomeNoticeItem = ({
|
||||
const onClickToDetail = () => {
|
||||
navigate(PATHS.support.notice.detail, {
|
||||
state: {
|
||||
id: id,
|
||||
seq: seq,
|
||||
from: PATHS.home
|
||||
}
|
||||
})
|
||||
@@ -32,7 +32,7 @@ export const HomeNoticeItem = ({
|
||||
>
|
||||
<div className="notice-content">
|
||||
<div className="notice-title">{ title }</div>
|
||||
<div className="notice-meta">{ t(`support.notice.categories.${category}`) }<span>{ moment(regDate).format('YY년 MM월 DD일') }</span></div>
|
||||
<div className="notice-meta">{ t(`support.notice.categories.${informCl}`) }<span>{ moment(regDate).format('YY년 MM월 DD일') }</span></div>
|
||||
</div>
|
||||
<div className="notice-arrow">
|
||||
<img
|
||||
|
||||
@@ -20,9 +20,9 @@ export const HomeNoticeList = () => {
|
||||
rs.push(
|
||||
<HomeNoticeItem
|
||||
key={ `key-home-notice-item-${i}` }
|
||||
id={ resultList[i]?.id }
|
||||
seq={ resultList[i]?.seq }
|
||||
title={ resultList[i]?.title }
|
||||
category={ resultList[i]?.category }
|
||||
informCl={ resultList[i]?.informCl }
|
||||
regDate={ resultList[i]?.regDate }
|
||||
isNew={ resultList[i]?.isNew }
|
||||
></HomeNoticeItem>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import { ChangeEvent, useEffect, useState } from 'react';
|
||||
import { useMerchantMidMutation } from '../api/use-merchant-mid-mutation';
|
||||
import { BusinessSection } from './section/business-section';
|
||||
import { ManagerSection } from './section/manager-section';
|
||||
@@ -11,47 +11,43 @@ import {
|
||||
import { useStore } from '@/shared/model/store';
|
||||
|
||||
export const InfoWrap = () => {
|
||||
const userMids = useStore.getState().UserStore.userMids;
|
||||
const midOptions = useStore.getState().UserStore.selectOptionsMids;
|
||||
const mid = useStore.getState().UserStore.mid;
|
||||
const userMid = useStore.getState().UserStore.mid;
|
||||
|
||||
const [mid, setMid] = useState<string>(userMid);
|
||||
const [data, setData] = useState<MerchantMidResponse>();
|
||||
|
||||
const [openChild, setOpenChild] = useState<SectionKeys | null>(null);
|
||||
|
||||
const { mutateAsync: merchantMid } = useMerchantMidMutation();
|
||||
|
||||
const callInfo = (selectedMid: string) => {
|
||||
const callInfo = () => {
|
||||
let params: MerchantMidParams = {
|
||||
mid: selectedMid
|
||||
mid: mid
|
||||
};
|
||||
merchantMid(params).then((rs: MerchantMidResponse) => {
|
||||
setData(rs);
|
||||
});
|
||||
};
|
||||
|
||||
const onChangeMid = (value: string) => {
|
||||
callInfo(value);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if(!!mid){
|
||||
callInfo(mid);
|
||||
callInfo();
|
||||
}
|
||||
}, []);
|
||||
}, [mid]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="input-wrapper top-select mt-30">
|
||||
<select
|
||||
onChange={ (e) => onChangeMid(e.target.value) }
|
||||
value={ mid }
|
||||
onChange={ (e: ChangeEvent<HTMLSelectElement>) => setMid(e.target.value) }
|
||||
>
|
||||
{
|
||||
midOptions.map((value, index) => (
|
||||
<option
|
||||
key={ value.value }
|
||||
value={ value.value }
|
||||
selected={ (mid === value.value)? true: false }
|
||||
>{ value.name }</option>
|
||||
))
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import { ChangeEvent, useEffect, useState } from 'react';
|
||||
import { useMerchantMidStatusMutation } from '../api/use-merchant-mid-status-mutation';
|
||||
import {
|
||||
CardApplications,
|
||||
@@ -15,10 +15,10 @@ import { EscrowSection } from './section/escrow-section';
|
||||
import { useStore } from '@/shared/model/store';
|
||||
|
||||
export const RegistrationStatusWrap = () => {
|
||||
const userMids = useStore.getState().UserStore.userMids;
|
||||
const midOptions = useStore.getState().UserStore.selectOptionsMids;
|
||||
const mid = useStore.getState().UserStore.mid;
|
||||
const userMid = useStore.getState().UserStore.mid;
|
||||
|
||||
const [mid, setMid] = useState<string>(userMid);
|
||||
const [onlineInfomation, setOnlineInfomation] = useState<OnlineInfomation>();
|
||||
const [offlineInfomation, setOfflineInfomation] = useState<OfflineInfomation>();
|
||||
const [cardApplications, setCardApplications] = useState<Array<CardApplications>>();
|
||||
@@ -27,9 +27,9 @@ export const RegistrationStatusWrap = () => {
|
||||
const [openChild, setOpenChild] = useState<SectionKeys | null>(null);
|
||||
const { mutateAsync: merchantMidStatus } = useMerchantMidStatusMutation();
|
||||
|
||||
const callInfo = (selectedMid: string) => {
|
||||
const callInfo = () => {
|
||||
let params: MerchantMidStatusParams = {
|
||||
mid: selectedMid
|
||||
mid: mid
|
||||
};
|
||||
merchantMidStatus(params).then((rs: MerchantMidStatusResponse) => {
|
||||
setOnlineInfomation(rs.onlineInfomation);
|
||||
@@ -39,28 +39,24 @@ export const RegistrationStatusWrap = () => {
|
||||
});
|
||||
};
|
||||
|
||||
const onChangeMid = (value: string) => {
|
||||
callInfo(value);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if(!!mid){
|
||||
callInfo(mid);
|
||||
callInfo();
|
||||
}
|
||||
}, []);
|
||||
}, [mid]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="input-wrapper top-select mt-30">
|
||||
<select
|
||||
onChange={ (e) => onChangeMid(e.target.value) }
|
||||
value={ mid }
|
||||
onChange={ (e: ChangeEvent<HTMLSelectElement>) => setMid(e.target.value) }
|
||||
>
|
||||
{
|
||||
midOptions.map((value, index) => (
|
||||
<option
|
||||
key={ value.value }
|
||||
value={ value.value }
|
||||
selected={ (mid === value.value)? true: false }
|
||||
>{ value.name }</option>
|
||||
))
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import { ChangeEvent, useEffect, useState } from 'react';
|
||||
import { NotifyRowKeys } from '../model/types';
|
||||
import { usePaymentNotificationDataMutation } from '../api/use-payment-notification-data-mutation';
|
||||
import { useStore } from '@/shared/model/store';
|
||||
@@ -8,6 +8,7 @@ export const NotificationDataWrap = () => {
|
||||
const midOptions = useStore.getState().UserStore.selectOptionsMids;
|
||||
const userMid = useStore.getState().UserStore.mid;
|
||||
|
||||
const [mid, setMid] = useState<string>(userMid);
|
||||
const [merchantInfo, setMerchantInfo] = useState<Record<string, any>>();
|
||||
const [creditCard, setCreditCard] = useState<Record<string, any>>();
|
||||
const [accountTransfer, setAccountTransfer] = useState<Record<string, any>>();
|
||||
@@ -19,10 +20,10 @@ export const NotificationDataWrap = () => {
|
||||
|
||||
const { mutateAsync: paymentNotificationData } = usePaymentNotificationDataMutation();
|
||||
|
||||
const callPaymentNotificationData = (selectedMid: string) => {
|
||||
const callPaymentNotificationData = () => {
|
||||
let params = {
|
||||
mid: selectedMid,
|
||||
gid: selectedMid
|
||||
mid: mid,
|
||||
gid: mid
|
||||
};
|
||||
|
||||
paymentNotificationData(params).then((rs) => {
|
||||
@@ -35,26 +36,23 @@ export const NotificationDataWrap = () => {
|
||||
setEscrowPayment(rs?.escrowPayment.detail);
|
||||
});
|
||||
};
|
||||
const onChangeMid = (value: string) => {
|
||||
callPaymentNotificationData(value);
|
||||
};
|
||||
useEffect(() => {
|
||||
if(!!userMid){
|
||||
callPaymentNotificationData(userMid);
|
||||
}
|
||||
}, []);
|
||||
callPaymentNotificationData();
|
||||
}, [mid]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="ing-list">
|
||||
<div className="input-wrapper top-select mt-16">
|
||||
<select onChange={ (e) => onChangeMid(e.target.value) }>
|
||||
<select
|
||||
value={ mid }
|
||||
onChange={ (e: ChangeEvent<HTMLSelectElement>) => setMid(e.target.value) }
|
||||
>
|
||||
{
|
||||
midOptions.map((value, index) => (
|
||||
<option
|
||||
key={ value.value }
|
||||
value={ value.value }
|
||||
selected={ (userMid === value.value)? true: false }
|
||||
>{ value.name }</option>
|
||||
))
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import moment from 'moment';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { ChangeEvent, useEffect, useState } from 'react';
|
||||
import { IMAGE_ROOT } from '@/shared/constants/common';
|
||||
import { useSettlementsCalendarMutation } from '../api/use-settlements-calendar-mutation';
|
||||
import { CalendarAmountRow } from './calandar-amount-row';
|
||||
@@ -31,9 +31,9 @@ export const CalendarWrap = () => {
|
||||
|
||||
const { mutateAsync: settlementsCalendar } = useSettlementsCalendarMutation();
|
||||
|
||||
const callCalendar = (selectedMid: string) => {
|
||||
const callCalendar = () => {
|
||||
let params: SettlementsCalendarParams = {
|
||||
mid: selectedMid,
|
||||
mid: mid,
|
||||
yearMonth: yearMonth
|
||||
};
|
||||
settlementsCalendar(params).then((rs: SettlementsCalendarResponse) => {
|
||||
@@ -88,25 +88,26 @@ export const CalendarWrap = () => {
|
||||
setYearMonth(newYearMonth);
|
||||
}
|
||||
};
|
||||
|
||||
const onChangeMid = (value: string) => {
|
||||
callCalendar(value);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
callCalendar(userMid);
|
||||
}, [yearMonth]);
|
||||
if(!!mid){
|
||||
callCalendar();
|
||||
}
|
||||
}, [yearMonth, mid]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="calendar-wrap pt-30">
|
||||
<div className="input-wrapper top-select">
|
||||
<select onChange={ (e) => onChangeMid(e.target.value) }>
|
||||
<select
|
||||
value={ mid }
|
||||
onChange={ (e: ChangeEvent<HTMLSelectElement>) => setMid(e.target.value) }
|
||||
>
|
||||
{
|
||||
midOptions.map((value, index) => (
|
||||
<option
|
||||
key={ value.value }
|
||||
value={ value.value }
|
||||
selected={ (userMid === value.value)? true: false }
|
||||
>{ value.name }</option>
|
||||
))
|
||||
}
|
||||
|
||||
@@ -109,12 +109,12 @@ export const ListWrap = ({
|
||||
setSettlementDateListItems(rs.content);
|
||||
});
|
||||
settlementsHistorySummary(listSummaryParams).then((rs: SettlementsHistorySummaryResponse) => {
|
||||
setSettlementAmount(rs.settlementAmount);
|
||||
setTransactionAmount(rs.transactionAmount);
|
||||
setPgFeeAmount(rs.pgFeeAmount);
|
||||
setHoldAmount(rs.holdAmount);
|
||||
setReleaseAmount(rs.releaseAmount);
|
||||
setOffsetAmount(rs.offsetAmount);
|
||||
setSettlementAmount(rs.settlementAmount || 0);
|
||||
setTransactionAmount(rs.transactionAmount || 0);
|
||||
setPgFeeAmount(rs.pgFeeAmount || 0);
|
||||
setHoldAmount(rs.holdAmount || 0);
|
||||
setReleaseAmount(rs.releaseAmount || 0);
|
||||
setOffsetAmount(rs.offsetAmount || 0);
|
||||
});
|
||||
};
|
||||
const callTransactionList = (option?: {
|
||||
@@ -137,7 +137,7 @@ export const ListWrap = ({
|
||||
}
|
||||
};
|
||||
if(params.page){
|
||||
params.page.sortType = (option?.sortType)? option.sortType: sortType;
|
||||
params.page.sortType = option?.sortType || sortType;
|
||||
setPageParam(params.page);
|
||||
}
|
||||
|
||||
@@ -195,9 +195,6 @@ export const ListWrap = ({
|
||||
let date = '';
|
||||
let list: Array<SettlementsHistoryContent> = [];
|
||||
|
||||
if(settlementDateListItems){
|
||||
|
||||
}
|
||||
for(let i=0;i<settlementDateListItems.length;i++){
|
||||
let listItem = settlementDateListItems[i];
|
||||
if(!!listItem){
|
||||
@@ -306,7 +303,7 @@ export const ListWrap = ({
|
||||
<input
|
||||
className="credit-period"
|
||||
type="text"
|
||||
value={`${startDate} ~ ${endDate}`}
|
||||
value={ moment(startDate).format('YYYY.MM.DD') + '-' + moment(endDate).format('YYYY.MM.DD') }
|
||||
readOnly={ true }
|
||||
/>
|
||||
<button className="filter-btn">
|
||||
|
||||
@@ -5,7 +5,7 @@ export interface SupportParams {
|
||||
};
|
||||
export interface FaqListParams {
|
||||
category?: string;
|
||||
searchCl?: string | null;
|
||||
searchCl?: SearchCl | null;
|
||||
searchValue?: string;
|
||||
page?: DefaultRequestPagination;
|
||||
};
|
||||
@@ -59,15 +59,16 @@ export interface QnaSaveResponse {
|
||||
|
||||
};
|
||||
export interface NoticeListParams extends SupportParams {
|
||||
searchKeyword: string;
|
||||
category: string;
|
||||
informCl?: InformCl | string;
|
||||
searchCl?: SearchCl | null;
|
||||
searchValue?: string;
|
||||
page?: DefaultRequestPagination;
|
||||
};
|
||||
export interface NoticeItem {
|
||||
id?: number;
|
||||
seq?: number;
|
||||
title?: string;
|
||||
content?: string;
|
||||
category?: string;
|
||||
contents?: string;
|
||||
informCl?: InformCl | string;
|
||||
regDate?: string;
|
||||
isNew?: boolean;
|
||||
viewCount?: number;
|
||||
@@ -77,8 +78,25 @@ export interface NoticeListResponse {
|
||||
nextCursor: string;
|
||||
hasNext: boolean;
|
||||
};
|
||||
|
||||
export enum SearchCl {
|
||||
HEAD = 'HEAD',
|
||||
BODY = 'BODY',
|
||||
ALL = 'ALL',
|
||||
};
|
||||
export enum InformCl {
|
||||
INTEREST_FREE_INSTALLMENT = 'INTEREST_FREE_INSTALLMENT',
|
||||
NEWS = 'NEWS',
|
||||
SERVICE_DISRUPTION_NOTICE = 'SERVICE_DISRUPTION_NOTICE',
|
||||
MAINTENANCE_NOTICE = 'MAINTENANCE_NOTICE',
|
||||
EVENT = 'EVENT',
|
||||
SERVICE_CHANGE_OR_ADDITION = 'SERVICE_CHANGE_OR_ADDITION',
|
||||
IMPORTANT_NOTICE = 'IMPORTANT_NOTICE',
|
||||
ADDITIONAL_SERVICE = 'ADDITIONAL_SERVICE',
|
||||
OTHERS = 'OTHERS'
|
||||
};
|
||||
export interface NoticeDetailParams {
|
||||
noticeId: number;
|
||||
seq: number;
|
||||
};
|
||||
export interface NoticeDetailResponse extends NoticeItem {
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ import { NoticeItemProps } from '../model/types';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
export const SupportNoticeItem = ({
|
||||
id,
|
||||
seq,
|
||||
title,
|
||||
category,
|
||||
informCl,
|
||||
regDate,
|
||||
isNew
|
||||
}: NoticeItemProps) => {
|
||||
@@ -17,7 +17,7 @@ export const SupportNoticeItem = ({
|
||||
const onClickToDetail = () => {
|
||||
navigate(PATHS.support.notice.detail, {
|
||||
state: {
|
||||
id: id,
|
||||
seq: seq,
|
||||
from: PATHS.support.notice.list
|
||||
}
|
||||
})
|
||||
@@ -32,7 +32,7 @@ export const SupportNoticeItem = ({
|
||||
<div className="notice-txt">
|
||||
<div className="notice-title-114">{ title }</div>
|
||||
<div className="notice-meta-114">
|
||||
<span className="blue">{ t(`support.notice.categories.${category}`) }</span> ㅣ <span>{ moment(regDate).format('YYYY.MM.DD HH:mm:ss') }</span>
|
||||
<span className="blue">{ t(`support.notice.categories.${informCl}`) }</span> ㅣ <span>{ moment(regDate).format('YYYY.MM.DD HH:mm:ss') }</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -10,9 +10,9 @@ export const AllTransactionList = ({
|
||||
let date = '';
|
||||
let list: Array<ListItemProps> = [];
|
||||
for(let i=0;i<listItems.length;i++){
|
||||
let items = listItems[i];
|
||||
if(!!items){
|
||||
let transactionDateTime = items.transactionDateTime;
|
||||
let item = listItems[i];
|
||||
if(!!item){
|
||||
let transactionDateTime = item.transactionDateTime;
|
||||
let transactionDate = transactionDateTime?.substr(0, 8);
|
||||
if(!!transactionDate){
|
||||
if(i === 0){
|
||||
@@ -32,7 +32,7 @@ export const AllTransactionList = ({
|
||||
}
|
||||
list = [];
|
||||
}
|
||||
list.push(items);
|
||||
list.push(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,9 +14,9 @@ export const BillingList = ({
|
||||
let date = '';
|
||||
let list = [];
|
||||
for(let i=0;i<listItems.length;i++){
|
||||
let items = listItems[i];
|
||||
if(!!items){
|
||||
let transactionDate = items?.transactionDate;
|
||||
let item = listItems[i];
|
||||
if(!!item){
|
||||
let transactionDate = item?.transactionDate;
|
||||
if(!!transactionDate){
|
||||
if(i === 0){
|
||||
date = transactionDate;
|
||||
@@ -35,7 +35,7 @@ export const BillingList = ({
|
||||
}
|
||||
list = [];
|
||||
}
|
||||
list.push(items);
|
||||
list.push(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,9 +14,9 @@ export const CashReceiptList = ({
|
||||
let date = '';
|
||||
let list = [];
|
||||
for(let i=0;i<listItems.length;i++){
|
||||
let items = listItems[i];
|
||||
if(!!items){
|
||||
let transactionDate = items.transactionDate;
|
||||
let item = listItems[i];
|
||||
if(!!item){
|
||||
let transactionDate = item.transactionDate;
|
||||
if(!!transactionDate){
|
||||
if(i === 0){
|
||||
date = transactionDate;
|
||||
@@ -35,7 +35,7 @@ export const CashReceiptList = ({
|
||||
}
|
||||
list = [];
|
||||
}
|
||||
list.push(items);
|
||||
list.push(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,9 +11,9 @@ export const EscrowList = ({
|
||||
let date = '';
|
||||
let list = [];
|
||||
for(let i=0;i<listItems.length;i++){
|
||||
let items = listItems[i];
|
||||
if(!!items){
|
||||
let transactionDate = items.transactionDate;
|
||||
let item = listItems[i];
|
||||
if(!!item){
|
||||
let transactionDate = item.transactionDate;
|
||||
if(!!transactionDate){
|
||||
if(i === 0){
|
||||
date = transactionDate;
|
||||
@@ -32,7 +32,7 @@ export const EscrowList = ({
|
||||
}
|
||||
list = [];
|
||||
}
|
||||
list.push(items);
|
||||
list.push(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ export interface VatReturnListParams {
|
||||
endDate?: string;
|
||||
receiptType?: VatReturnReceiptType;
|
||||
targetType?: VatReturnTargetType;
|
||||
pagination?: DefaultRequestPagination;
|
||||
page?: DefaultRequestPagination;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -4,11 +4,12 @@ import { useEffect, useState } from 'react';
|
||||
import { IMAGE_ROOT } from '@/shared/constants/common';
|
||||
import { ListFilter } from './filter/list-filter';
|
||||
import { SortTypeBox } from '@/entities/common/ui/sort-type-box';
|
||||
import { SortTypeKeys } from '@/entities/common/model/types';
|
||||
import { DefaultRequestPagination, SortTypeKeys } from '@/entities/common/model/types';
|
||||
import { DEFAULT_PAGE_PARAM } from '@/entities/common/model/constant';
|
||||
import {
|
||||
VatReturnListContent,
|
||||
VatReturnListParams,
|
||||
VatReturnListResponse,
|
||||
VatReturnReceiptType,
|
||||
VatReturnTargetType
|
||||
} from '../model/types';
|
||||
@@ -21,33 +22,33 @@ export const ListWrap = () => {
|
||||
|
||||
const [filterOn, setFilterOn] = useState<boolean>(false);
|
||||
const [sortType, setSortType] = useState<SortTypeKeys>(SortTypeKeys.LATEST);
|
||||
const [listItems, setListItems] = useState<Record<string, Array<VatReturnListContent>>>({});
|
||||
const [pageParam, setPageParam] = useState(DEFAULT_PAGE_PARAM);
|
||||
const [listItems, setListItems] = useState<Array<VatReturnListContent>>([]);
|
||||
const [pageParam, setPageParam] = useState<DefaultRequestPagination>(DEFAULT_PAGE_PARAM);
|
||||
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 [startDate, setStartDate] = useState(moment().subtract(1, 'month').format('YYYYMM'));
|
||||
const [endDate, setEndDate] = useState(moment().format('YYYYMM'));
|
||||
const [receiptType, setReceiptType] = useState<VatReturnReceiptType>(VatReturnReceiptType.ALL);
|
||||
const [targetType, setTargetType] = useState<VatReturnTargetType>(VatReturnTargetType.ALL);
|
||||
|
||||
const { mutateAsync: vatReturnList } = useVatReturnListMutation();
|
||||
|
||||
const callList = () => {
|
||||
let strStartDate = moment(startDate).format('YYYYMM');
|
||||
let newStartDate = moment(strStartDate+'01').format('YYYY-MM-DD');
|
||||
|
||||
let strEndtDate = moment(endDate).format('YYYYMM');
|
||||
let lastDate = moment(endDate).endOf('month').date();
|
||||
let newEndDate = moment(strEndtDate+lastDate).format('YYYY-MM-DD');
|
||||
|
||||
const callList = (option?: {
|
||||
sortType?: SortTypeKeys
|
||||
}) => {
|
||||
let params: VatReturnListParams = {
|
||||
mid: mid,
|
||||
startDate: newStartDate,
|
||||
endDate: newEndDate,
|
||||
startDate: startDate,
|
||||
endDate: endDate,
|
||||
receiptType: receiptType,
|
||||
targetType: targetType,
|
||||
page: pageParam
|
||||
};
|
||||
vatReturnList(params).then((rs) => {
|
||||
setListItems(assembleData(rs.content));
|
||||
if(params.page){
|
||||
params.page.sortType = option?.sortType || sortType;
|
||||
setPageParam(params.page);
|
||||
}
|
||||
vatReturnList(params).then((rs: VatReturnListResponse) => {
|
||||
setListItems(rs.content);
|
||||
});
|
||||
|
||||
};
|
||||
@@ -65,35 +66,47 @@ export const ListWrap = () => {
|
||||
|
||||
const getListDateGroup = () => {
|
||||
let rs = [];
|
||||
if(Object.keys(listItems).length > 0){
|
||||
for (const [key, value] of Object.entries(listItems)) {
|
||||
rs.push(
|
||||
<ListDateGroup
|
||||
key={ key }
|
||||
date={ key }
|
||||
items={ value }
|
||||
></ListDateGroup>
|
||||
);
|
||||
let date = '';
|
||||
let list: Array<VatReturnListContent> = [];
|
||||
|
||||
for(let i=0;i<listItems.length;i++){
|
||||
let item = listItems[i];
|
||||
if(!!item){
|
||||
let issueDateTime = item?.issueDate;
|
||||
let issueDate = issueDateTime?.substr(0, 8);
|
||||
if(!!issueDate){
|
||||
if(i === 0){
|
||||
date = issueDate;
|
||||
}
|
||||
if(date !== issueDate){
|
||||
date = issueDate;
|
||||
if(list.length > 0){
|
||||
rs.push(
|
||||
<ListDateGroup
|
||||
key={ date + '-' + i }
|
||||
date={ date }
|
||||
items={ list }
|
||||
></ListDateGroup>
|
||||
);
|
||||
}
|
||||
list = [];
|
||||
}
|
||||
list.push(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(list.length > 0){
|
||||
rs.push(
|
||||
<ListDateGroup
|
||||
key={ date + '-last' }
|
||||
date={ date }
|
||||
items={ list }
|
||||
></ListDateGroup>
|
||||
);
|
||||
}
|
||||
return rs;
|
||||
};
|
||||
|
||||
const assembleData = (content: Array<VatReturnListContent>) => {
|
||||
let data: any = {};
|
||||
if(content && content.length > 0){
|
||||
for(let i=0;i<content?.length;i++){
|
||||
let groupDate = moment(content[i]?.issueDate).format('YYYYMMDD');
|
||||
if(!!groupDate && !data.hasOwnProperty(groupDate)){
|
||||
data[groupDate] = [];
|
||||
}
|
||||
if(!!groupDate && data.hasOwnProperty(groupDate)){
|
||||
data[groupDate].push(content[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return data;
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="summary-section pt-30">
|
||||
@@ -102,7 +115,7 @@ export const ListWrap = () => {
|
||||
<input
|
||||
type="text"
|
||||
className="credit-period"
|
||||
value={moment(startDate).format('YYYY.MM.DD') + '-' + moment(endDate).format('YYYY.MM.DD')}
|
||||
value={ moment(startDate+'01').format('YYYY.MM') + '-' + moment(endDate+'01').format('YYYY.MM')}
|
||||
readOnly={ true }
|
||||
/>
|
||||
<button
|
||||
|
||||
@@ -12,14 +12,15 @@ import { useVatReturnReferenceRequestMutation } from '../api/use-vat-return-refe
|
||||
|
||||
export const ReferenceWrap = () => {
|
||||
const midOptions = useStore.getState().UserStore.selectOptionsMids;
|
||||
|
||||
const userMid = useStore.getState().UserStore.mid;
|
||||
|
||||
const [success, setSuccess] = useState<boolean>(false);
|
||||
|
||||
const [successPageOn, setSuccessPageOn] = useState<boolean>(false);
|
||||
const [failPageOn, setFailPageOn] = useState<boolean>(false);
|
||||
const [mid, setMid] = useState<string>('');
|
||||
const [startDate, setStartDate] = useState<string>(moment().format('YYYY.MM.DD'));
|
||||
const [endDate, setEndDate] = useState<string>(moment().format('YYYY.MM.DD'));
|
||||
const [mid, setMid] = useState<string>(userMid);
|
||||
const [startDate, setStartDate] = useState<string>(moment().format('YYYYMMDD'));
|
||||
const [endDate, setEndDate] = useState<string>(moment().format('YYYYMMDD'));
|
||||
const [payTax, setPayTax] = useState<VatReturnPayTax>(VatReturnPayTax.Tax);
|
||||
const [email, setEmail] = useState<string>('');
|
||||
const [errorMsg, setErrorMsg] = useState<string>('');
|
||||
@@ -80,7 +81,7 @@ export const ReferenceWrap = () => {
|
||||
selectOptions={ EmailOptions }
|
||||
></FilterSelect>
|
||||
</div>
|
||||
<div className="apply-row bottom-padding">
|
||||
<div className="apply-row">
|
||||
<button
|
||||
className="btn-50 btn-blue flex-1"
|
||||
onClick={ onClickToResquest }
|
||||
|
||||
@@ -80,11 +80,16 @@
|
||||
"title": "공지사항",
|
||||
"searchPlaceholder": "검색어를 입력하세요",
|
||||
"categories": {
|
||||
"ALL": "전체",
|
||||
"NOTICE": "공지",
|
||||
"all": "전체",
|
||||
"INTEREST_FREE_INSTALLMENT": "공지",
|
||||
"NEWS": "뉴스",
|
||||
"SERVICE_DISRUPTION_NOTICE": "장애공지",
|
||||
"MAINTENANCE_NOTICE": "작업공지",
|
||||
"EVENT": "이벤트",
|
||||
"SERVICE": "서비스",
|
||||
"IMPORTANT": "중요"
|
||||
"SERVICE_CHANGE_OR_ADDITION": "서비스변경/추가",
|
||||
"IMPORTANT_NOTICE": "중요공지 (항상 최상단 표시)",
|
||||
"ADDITIONAL_SERVICE": "부가서비스",
|
||||
"OTHERS": "기타"
|
||||
}
|
||||
},
|
||||
"faq": {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { useState, useRef, useEffect } from 'react';
|
||||
import { useState, useRef, useEffect, ChangeEvent } from 'react';
|
||||
import { PATHS } from '@/shared/constants/paths';
|
||||
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
||||
import { HeaderType } from '@/entities/common/model/types';
|
||||
@@ -51,14 +51,6 @@ export const PasswordModifyCancelPasswordPage = () => {
|
||||
// snackBar(error?.response?.data?.message || '비밀번호 변경에 실패했습니다.');
|
||||
}
|
||||
});
|
||||
|
||||
const midList = [
|
||||
{ value: 'nictest00', label: 'nictest00' },
|
||||
{ value: 'nictest00m', label: 'nictest00m' },
|
||||
{ value: 'nictest01m', label: 'nictest01m' },
|
||||
{ value: 'nictest02m', label: 'nictest02m' },
|
||||
];
|
||||
|
||||
// Initialize XKeypad
|
||||
useEffect(() => {
|
||||
const initializeKeypad = async () => {
|
||||
@@ -216,14 +208,14 @@ export const PasswordModifyCancelPasswordPage = () => {
|
||||
<div className="ua-label">가맹점 <span className="red">*</span></div>
|
||||
<select
|
||||
className="wid-100"
|
||||
onChange={(e) => setMid(e.target.value)}
|
||||
value={ mid }
|
||||
onChange={ (e: ChangeEvent<HTMLSelectElement>) => setMid(e.target.value) }
|
||||
>
|
||||
{
|
||||
midOptions.map((value, index) => (
|
||||
<option
|
||||
key={ value.value }
|
||||
value={ value.value }
|
||||
selected={ (userMid === value.value)? true: false }
|
||||
>{ value.name }</option>
|
||||
))
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
useSetFooterMode,
|
||||
useSetOnBack
|
||||
} from '@/widgets/sub-layout/use-sub-layout';
|
||||
import { useState } from 'react';
|
||||
import { ChangeEvent, useEffect, useState } from 'react';
|
||||
import { useExtensionFundAccountTransferRequestMutation } from '@/entities/additional-service/api/fund-account/use-extension-fund-account-transfer-request-mutation';
|
||||
import { ExtensionFundAccountTransferRequestParams, ExtensionFundAccountTransferRequestResponse } from '@/entities/additional-service/model/fund-account/types';
|
||||
import { useStore } from '@/shared/model/store';
|
||||
@@ -15,9 +15,9 @@ import { useStore } from '@/shared/model/store';
|
||||
|
||||
export const FundAccountTransferRequestPage = () => {
|
||||
const { navigate } = useNavigate();
|
||||
const userMid = useStore.getState().UserStore.mid;
|
||||
|
||||
const midOptions = useStore.getState().UserStore.selectOptionsMids;
|
||||
|
||||
const userMid = useStore.getState().UserStore.mid;
|
||||
|
||||
const [mid, setMid] = useState<string>(userMid);
|
||||
const [bankCode, setBankCode] = useState<string>('');
|
||||
@@ -72,7 +72,10 @@ export const FundAccountTransferRequestPage = () => {
|
||||
<div className="billing-row">
|
||||
<div className="billing-label">가맹점<span>*</span></div>
|
||||
<div className="billing-field">
|
||||
<select value={mid} onChange={(e) => setMid(e.target.value)}>
|
||||
<select
|
||||
value={ mid }
|
||||
onChange={ (e: ChangeEvent<HTMLSelectElement>) => setMid(e.target.value) }
|
||||
>
|
||||
{
|
||||
midOptions.map((value, index) => (
|
||||
<option
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import { ChangeEvent, useEffect, useState } from 'react';
|
||||
import { PATHS } from '@/shared/constants/paths';
|
||||
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
||||
import { HeaderType } from '@/entities/common/model/types';
|
||||
@@ -29,19 +29,15 @@ export const ListPage = () => {
|
||||
navigate(PATHS.home);
|
||||
});
|
||||
|
||||
const callExtensionList = (selectedMid: string) => {
|
||||
const callExtensionList = () => {
|
||||
let params: ExtensionListParams = {
|
||||
mid: selectedMid
|
||||
mid: mid
|
||||
}
|
||||
extensionList(params).then((rs: ExtensionListResponse) => {
|
||||
console.log(rs)
|
||||
});
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
callExtensionList(userMid);
|
||||
}, []);
|
||||
|
||||
const activeExtensionList = [
|
||||
{
|
||||
className: 'list-wrap01', serviceName: 'SMS 결제 통보', serviceDesc: '입금 요청부터 완료까지 SMS 자동 전송',
|
||||
@@ -138,10 +134,12 @@ export const ListPage = () => {
|
||||
return rs;
|
||||
};
|
||||
|
||||
const onChangeMid = (value: string) => {
|
||||
callExtensionList(value);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if(!!mid){
|
||||
callExtensionList();
|
||||
}
|
||||
}, [mid]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<main>
|
||||
@@ -149,13 +147,15 @@ export const ListPage = () => {
|
||||
<div className="tab-pane sub active">
|
||||
<div className="ing-list">
|
||||
<div className="input-wrapper top-select">
|
||||
<select onChange={ (e) => onChangeMid(e.target.value) }>
|
||||
<select
|
||||
value={ mid }
|
||||
onChange={ (e: ChangeEvent<HTMLSelectElement>) => setMid(e.target.value) }
|
||||
>
|
||||
{
|
||||
midOptions.map((value, index) => (
|
||||
<option
|
||||
key={ value.value }
|
||||
value={ value.value }
|
||||
selected={ (userMid === value.value)? true: false }
|
||||
>{ value.name }</option>
|
||||
))
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
||||
import { DefaultRequestPagination, HeaderType } from '@/entities/common/model/types';
|
||||
import { useFaqListMutation } from '@/entities/support/api/use-faq-list-mutation';
|
||||
import { DEFAULT_PAGE_PARAM } from '@/entities/common/model/constant';
|
||||
import { FaqItem, FaqListParams, FaqListResponse } from '@/entities/support/model/types';
|
||||
import { FaqItem, FaqListParams, FaqListResponse, SearchCl } from '@/entities/support/model/types';
|
||||
import { SupportFaqItem } from '@/entities/support/ui/faq-item';
|
||||
import {
|
||||
useSetHeaderTitle,
|
||||
@@ -22,7 +22,6 @@ export const FaqListPage = () => {
|
||||
const [onActionIntersect, setOnActionIntersect] = useState<boolean>(false);
|
||||
const [pageParam, setPageParam] = useState<DefaultRequestPagination>(DEFAULT_PAGE_PARAM);
|
||||
const [nextCursor, setNextCursor] = useState<string | null>(null);
|
||||
const [searchCl, setSearchCl] = useState<string | null>('HEAD');
|
||||
const [searchValue, setSearchValue] = useState<string>('');
|
||||
const [selectedCategory, setSelectedCategory] = useState<string>('');
|
||||
const [resultList, setResultList] = useState<Array<FaqItem>>([]);
|
||||
@@ -59,7 +58,7 @@ export const FaqListPage = () => {
|
||||
setOnActionIntersect(false);
|
||||
let listParams: FaqListParams = {
|
||||
category: selectedCategory,
|
||||
searchCl: (!!searchValue)? searchCl: null,
|
||||
searchCl: (!!searchValue)? SearchCl.HEAD: null,
|
||||
searchValue: searchValue,
|
||||
...{
|
||||
page: pageParam
|
||||
|
||||
@@ -20,7 +20,7 @@ export const NoticeDetailPage = () => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const [result, setResult] = useState<NoticeItem>({});
|
||||
|
||||
|
||||
let from = location?.state.from;
|
||||
|
||||
useSetHeaderTitle(t('support.notice.title'));
|
||||
@@ -39,7 +39,7 @@ export const NoticeDetailPage = () => {
|
||||
|
||||
const callDetail = () => {
|
||||
let detailParams: NoticeDetailParams = {
|
||||
noticeId: location?.state.id,
|
||||
seq: location?.state.seq,
|
||||
};
|
||||
noticeDetail(detailParams).then((rs: NoticeDetailResponse) => {
|
||||
setResult(rs);
|
||||
@@ -53,15 +53,15 @@ export const NoticeDetailPage = () => {
|
||||
return (
|
||||
<>
|
||||
<main>
|
||||
{ result.category &&
|
||||
{ result.informCl &&
|
||||
<div className="tab-content">
|
||||
<div className="tab-pane sub active">
|
||||
<div className="option-list">
|
||||
<div className="notice-detail">
|
||||
<div className="notice-detail__title">{ result.title }</div>
|
||||
<div className="notice-detail__meta">{ moment(result.regDate).format('YYYY.MM.DD') } | { t(`support.notice.categories.${result.category}`) }</div>
|
||||
<div className="notice-detail__meta">{ moment(result.regDate).format('YYYY.MM.DD') } | { t(`support.notice.categories.${result.informCl}`) }</div>
|
||||
<div className="notice-detail__divider"></div>
|
||||
<div className="notice-detail__body" dangerouslySetInnerHTML={{ __html: result.content || '' }}></div>
|
||||
<div className="notice-detail__body" dangerouslySetInnerHTML={{ __html: result.contents || '' }}></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@ import { PATHS } from '@/shared/constants/paths';
|
||||
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
||||
import { useNoticeListMutation } from '@/entities/support/api/use-notice-list-mutation';
|
||||
import { DEFAULT_PAGE_PARAM } from '@/entities/common/model/constant';
|
||||
import { NoticeItem, NoticeListParams, NoticeListResponse } from '@/entities/support/model/types';
|
||||
import { InformCl, NoticeItem, NoticeListParams, NoticeListResponse, SearchCl } from '@/entities/support/model/types';
|
||||
import { SupportNoticeItem } from '@/entities/support/ui/notice-item';
|
||||
import { HeaderType } from '@/entities/common/model/types';
|
||||
import {
|
||||
@@ -22,8 +22,8 @@ export const NoticeListPage = () => {
|
||||
const [onActionIntersect, setOnActionIntersect] = useState<boolean>(false);
|
||||
const [pageParam, setPageParam] = useState(DEFAULT_PAGE_PARAM);
|
||||
const [nextCursor, setNextCursor] = useState<string | null>(null);
|
||||
const [searchKeyword, setSearchKeyword] = useState<string>('');
|
||||
const [selectedCategory, setSelectedCategory] = useState<string>('ALL');
|
||||
const [informCl, setInformCl] = useState<InformCl | string>('');
|
||||
const [searchValue, setSearchValue] = useState<string>('');
|
||||
const [resultList, setResultList] = useState<Array<NoticeItem>>([]);
|
||||
|
||||
useSetHeaderTitle(t('support.notice.title'));
|
||||
@@ -56,8 +56,9 @@ export const NoticeListPage = () => {
|
||||
|
||||
const callList = (type?: string) => {
|
||||
let listParams: NoticeListParams = {
|
||||
category: selectedCategory,
|
||||
searchKeyword: searchKeyword,
|
||||
informCl: informCl,
|
||||
searchCl: (!!searchValue)? SearchCl.HEAD: null,
|
||||
searchValue: searchValue,
|
||||
...{
|
||||
page: pageParam
|
||||
}
|
||||
@@ -108,9 +109,9 @@ export const NoticeListPage = () => {
|
||||
rs.push(
|
||||
<SupportNoticeItem
|
||||
key={ `key-support-notice-item-${i}` }
|
||||
id={ resultList[i]?.id }
|
||||
seq={ resultList[i]?.seq }
|
||||
title={ resultList[i]?.title }
|
||||
category={ resultList[i]?.category }
|
||||
informCl={ resultList[i]?.informCl }
|
||||
regDate={ resultList[i]?.regDate }
|
||||
isNew={ resultList[i]?.isNew }
|
||||
></SupportNoticeItem>
|
||||
@@ -122,8 +123,7 @@ export const NoticeListPage = () => {
|
||||
useEffect(() => {
|
||||
setNextCursor(null);
|
||||
callList();
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [selectedCategory]);
|
||||
}, [informCl]);
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -141,8 +141,8 @@ export const NoticeListPage = () => {
|
||||
<input
|
||||
type="text"
|
||||
placeholder={ t('support.notice.searchPlaceholder') }
|
||||
value={ searchKeyword }
|
||||
onChange={ (e: ChangeEvent<HTMLInputElement>) => setSearchKeyword(e.target.value) }
|
||||
value={ searchValue }
|
||||
onChange={ (e: ChangeEvent<HTMLInputElement>) => setSearchValue(e.target.value) }
|
||||
onKeyDown={ (e: React.KeyboardEvent<HTMLInputElement>) => {
|
||||
if (e.key === 'Enter' && !e.nativeEvent.isComposing) {
|
||||
onClickToAction();
|
||||
@@ -153,14 +153,19 @@ export const NoticeListPage = () => {
|
||||
<div className="notice-filter">
|
||||
<select
|
||||
className="flex-1"
|
||||
value={ selectedCategory }
|
||||
onChange={ (e: ChangeEvent<HTMLSelectElement>) => setSelectedCategory(e.target.value) }
|
||||
value={ informCl }
|
||||
onChange={ (e: ChangeEvent<HTMLSelectElement>) => setInformCl(e.target.value) }
|
||||
>
|
||||
<option value="ALL">{ t('support.notice.categories.ALL') }</option>
|
||||
<option value="NOTICE">{ t('support.notice.categories.NOTICE') }</option>
|
||||
<option value="">{ t('support.notice.categories.all') }</option>
|
||||
<option value="INTEREST_FREE_INSTALLMENT">{ t('support.notice.categories.INTEREST_FREE_INSTALLMENT') }</option>
|
||||
<option value="NEWS">{ t('support.notice.categories.NEWS') }</option>
|
||||
<option value="SERVICE_DISRUPTION_NOTICE">{ t('support.notice.categories.SERVICE_DISRUPTION_NOTICE') }</option>
|
||||
<option value="MAINTENANCE_NOTICE">{ t('support.notice.categories.MAINTENANCE_NOTICE') }</option>
|
||||
<option value="EVENT">{ t('support.notice.categories.EVENT') }</option>
|
||||
<option value="SERVICE">{ t('support.notice.categories.SERVICE') }</option>
|
||||
<option value="IMPORTANT">{ t('support.notice.categories.IMPORTANT') }</option>
|
||||
<option value="SERVICE_CHANGE_OR_ADDITION">{ t('support.notice.categories.SERVICE_CHANGE_OR_ADDITION') }</option>
|
||||
<option value="IMPORTANT_NOTICE">{ t('support.notice.categories.IMPORTANT_NOTICE') }</option>
|
||||
<option value="ADDITIONAL_SERVICE">{ t('support.notice.categories.ADDITIONAL_SERVICE') }</option>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -5,7 +5,16 @@ import { IMAGE_ROOT } from '@/shared/constants/common';
|
||||
import { PATHS } from '@/shared/constants/paths';
|
||||
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
||||
import { BillingList } from '@/entities/transaction/ui/billing-list';
|
||||
import { BillingListItem, TransactionCategory, BillingRequestStatus, BillingProcessResult, BillingPaymentMethod, BillingSearchType, ListItemProps, BillingListParams, BillingListResponse } from '@/entities/transaction/model/types';
|
||||
import {
|
||||
TransactionCategory,
|
||||
BillingRequestStatus,
|
||||
BillingProcessResult,
|
||||
BillingPaymentMethod,
|
||||
BillingSearchType,
|
||||
ListItemProps,
|
||||
BillingListParams,
|
||||
BillingListResponse
|
||||
} from '@/entities/transaction/model/types';
|
||||
import { useBillingListMutation } from '@/entities/transaction/api/use-billing-list-mutation';
|
||||
import { useDownloadExcelMutation } from '@/entities/transaction/api/use-download-excel-mutation';
|
||||
import { DEFAULT_PAGE_PARAM } from '@/entities/common/model/constant';
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
import { AxiosError } from 'axios';
|
||||
|
||||
export type NiceAxiosError = AxiosError<{
|
||||
errorCode?: string;
|
||||
code?: string;
|
||||
message?: string;
|
||||
data?: any;
|
||||
status?: string;
|
||||
}>;
|
||||
export type CBDCAxiosError = AxiosError<{
|
||||
errorCode?: string;
|
||||
code?: string;
|
||||
@@ -12,3 +19,7 @@ export interface CBDCAxiosFallbackProps {
|
||||
error: CBDCAxiosError;
|
||||
resetErrorBoundary?: (...args: unknown[]) => void;
|
||||
}
|
||||
export interface NiceAxiosFallbackProps {
|
||||
error: NiceAxiosError;
|
||||
resetErrorBoundary?: (...args: unknown[]) => void;
|
||||
}
|
||||
@@ -8,7 +8,7 @@ type CommonErrorProps = FallbackProps & {
|
||||
height?: number;
|
||||
};
|
||||
export const APIError = ({ error, resetErrorBoundary }: CommonErrorProps) => {
|
||||
const { reload } = useNavigate();
|
||||
const { navigateBack } = useNavigate();
|
||||
const msg = useMemo(() => {
|
||||
let message: Partial<DialogProps> = {
|
||||
title: '일시적인 오류가 발생하였습니다.',
|
||||
@@ -21,7 +21,7 @@ export const APIError = ({ error, resetErrorBoundary }: CommonErrorProps) => {
|
||||
}, [error]);
|
||||
|
||||
const handleCancel = () => {
|
||||
reload();
|
||||
navigateBack();
|
||||
resetErrorBoundary();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user