mid 관련 수정
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user