mid 셋팅및 코드 정리

This commit is contained in:
focp212@naver.com
2025-10-10 15:26:04 +09:00
parent 306629be53
commit ced334f90f
41 changed files with 692 additions and 582 deletions

View File

@@ -21,9 +21,11 @@ import {
useSetFooterMode,
useSetFooterCurrentPage
} from '@/widgets/sub-layout/use-sub-layout';
import { useStore } from '@/shared/model/store';
export const AllTransactionListPage = () => {
const { navigate } = useNavigate();
const userMid = useStore.getState().UserStore.mid;
const [serviceCodeOptions, setServiceCodeOptions] = useState<Array<Record<string, any>>>();
const [selectedServiceCode, setSelectedServiceCode] = useState<string>('st');
@@ -32,7 +34,7 @@ export const AllTransactionListPage = () => {
const [listItems, setListItems] = useState({});
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 [moid, setMoid] = useState<string>('');
const [tid, setTid] = useState<string>('');
// const [fromDate, setFromDate] = useState(moment().subtract(1, 'month').format('YYYYMMDD'));
@@ -50,8 +52,7 @@ export const AllTransactionListPage = () => {
const [totalTransactionCount, setTotalTransactionCount] = useState<number>(0);
const [totalTransactionAmount, setTotalTransactionAmount] = useState<number>(0);
useSetHeaderTitle('거래내역 조회');
useSetHeaderType(HeaderType.LeftArrow);
useSetOnBack(() => {
@@ -139,7 +140,7 @@ export const AllTransactionListPage = () => {
{text: '계좌이체', value: 'transfer'},
{text: '휴대폰', value: 'phone'},
{text: '문화상품권', value: 'gift'},
{text: '티머니페이', value: '티머니페이'},
{text: '티머니페이', value: '티머니페이'}
];
setServiceCodeOptions(options);
setSelectedServiceCode('simple');
@@ -149,7 +150,9 @@ export const AllTransactionListPage = () => {
let val = e.target.value;
// onchagne 에서 useState가 즉시 반영 안되므로 값을 직접 바로 넘긴다.
setSelectedServiceCode(val);
callList({val: val});
callList({
val: val
});
};
const getServiceCodeOptions = () => {