filter mid 수정
This commit is contained in:
@@ -13,7 +13,7 @@ import { useStore } from '@/shared/model/store';
|
||||
|
||||
export const InfoWrap = () => {
|
||||
const { t } = useTranslation();
|
||||
const midOptions = useStore.getState().UserStore.selectOptionsMids;
|
||||
const midOptionsWithoutGids = useStore.getState().UserStore.selectOptionsMidsWithoutGids;
|
||||
const userMid = useStore.getState().UserStore.mid;
|
||||
|
||||
const [mid, setMid] = useState<string>(userMid);
|
||||
@@ -46,7 +46,7 @@ export const InfoWrap = () => {
|
||||
onChange={ (e: ChangeEvent<HTMLSelectElement>) => setMid(e.target.value) }
|
||||
>
|
||||
{
|
||||
midOptions.map((value, index) => (
|
||||
midOptionsWithoutGids.map((value, index) => (
|
||||
<option
|
||||
key={ value.value }
|
||||
value={ value.value }
|
||||
|
||||
@@ -17,7 +17,7 @@ import { useStore } from '@/shared/model/store';
|
||||
|
||||
export const RegistrationStatusWrap = () => {
|
||||
const { t } = useTranslation();
|
||||
const midOptions = useStore.getState().UserStore.selectOptionsMids;
|
||||
const midOptionsWithoutGids = useStore.getState().UserStore.selectOptionsMidsWithoutGids;
|
||||
const userMid = useStore.getState().UserStore.mid;
|
||||
|
||||
const [mid, setMid] = useState<string>(userMid);
|
||||
@@ -55,7 +55,7 @@ export const RegistrationStatusWrap = () => {
|
||||
onChange={ (e: ChangeEvent<HTMLSelectElement>) => setMid(e.target.value) }
|
||||
>
|
||||
{
|
||||
midOptions.map((value, index) => (
|
||||
midOptionsWithoutGids.map((value, index) => (
|
||||
<option
|
||||
key={ value.value }
|
||||
value={ value.value }
|
||||
|
||||
@@ -15,6 +15,7 @@ import { FilterSelect } from '@/shared/ui/filter/select';
|
||||
import { FilterCalendar } from '@/shared/ui/filter/calendar';
|
||||
import { SettlementPaymentMethodOptionsGroup, SettlementPeriodTypeBtnGroup } from '../../model/constant';
|
||||
import { FilterButtonGroups } from '@/shared/ui/filter/button-groups';
|
||||
import { FilterSelectMid } from '@/shared/ui/filter/select-mid';
|
||||
|
||||
export interface ListFilterProps {
|
||||
filterOn: boolean;
|
||||
@@ -98,12 +99,11 @@ export const ListFilter = ({
|
||||
</div>
|
||||
</div>
|
||||
<div className="option-list pt-16">
|
||||
<FilterSelect
|
||||
<FilterSelectMid
|
||||
title='가맹점'
|
||||
selectValue={ filterMid }
|
||||
selectSetter={ setFilterMid }
|
||||
selectOptions={ midOptions }
|
||||
></FilterSelect>
|
||||
selectSetter={ setMid }
|
||||
showType={ 'GID' }
|
||||
></FilterSelectMid>
|
||||
<FilterButtonGroups
|
||||
title='조회기준'
|
||||
activeValue={ filterPeriodType }
|
||||
|
||||
@@ -231,6 +231,7 @@ export interface AllTransactionListSummaryResponse {
|
||||
totalAmount: number;
|
||||
};
|
||||
export interface AllTransactionListParams {
|
||||
mid?: string;
|
||||
moid?: string;
|
||||
tid?: string;
|
||||
fromDate: string;
|
||||
|
||||
@@ -26,6 +26,7 @@ import {
|
||||
FilterMotionVariants
|
||||
} from '@/entities/common/model/constant';
|
||||
import { useStore } from '@/shared/model/store';
|
||||
import { FilterSelectMid } from '@/shared/ui/filter/select-mid';
|
||||
|
||||
export const BillingFilter = ({
|
||||
filterOn,
|
||||
@@ -119,12 +120,11 @@ export const BillingFilter = ({
|
||||
</div>
|
||||
|
||||
<div className="option-list pt-16">
|
||||
<FilterSelect
|
||||
<FilterSelectMid
|
||||
title='가맹점'
|
||||
selectValue={ filterMid }
|
||||
selectSetter={ setFilterMid }
|
||||
selectOptions={ midOptions }
|
||||
></FilterSelect>
|
||||
selectSetter={ setMid }
|
||||
showType={ 'GID' }
|
||||
></FilterSelectMid>
|
||||
<FilterSelectInput
|
||||
title='주문번호/TID'
|
||||
selectValue={ filterSearchType }
|
||||
|
||||
@@ -24,6 +24,7 @@ import {
|
||||
FilterMotionVariants
|
||||
} from '@/entities/common/model/constant';
|
||||
import { useStore } from '@/shared/model/store';
|
||||
import { FilterSelectMid } from '@/shared/ui/filter/select-mid';
|
||||
|
||||
export const EscrowFilter = ({
|
||||
filterOn,
|
||||
@@ -113,12 +114,11 @@ export const EscrowFilter = ({
|
||||
</div>
|
||||
|
||||
<div className="option-list pt-16">
|
||||
<FilterSelect
|
||||
<FilterSelectMid
|
||||
title='가맹점'
|
||||
selectValue={ filterMid }
|
||||
selectSetter={ setMid }
|
||||
selectOptions={ midOptions }
|
||||
></FilterSelect>
|
||||
showType={ 'GID' }
|
||||
></FilterSelectMid>
|
||||
<FilterSelectInput
|
||||
title='주문번호/TID'
|
||||
selectValue={ filterSearchType }
|
||||
|
||||
@@ -460,8 +460,7 @@ export const AmountInfoSection = ({
|
||||
}
|
||||
<div className="txn-doc">
|
||||
{
|
||||
((transactionCategory === TransactionCategory.CashReceipt) ||
|
||||
(transactionCategory === TransactionCategory.Escrow)) &&
|
||||
(transactionCategory === TransactionCategory.CashReceipt) &&
|
||||
!!canDownloadReceipt &&
|
||||
<button
|
||||
className="doc-btn"
|
||||
|
||||
@@ -17,7 +17,9 @@ export interface UserInfoState {
|
||||
setUserMids: (update: SetStateAction<Array<string>>) => void;
|
||||
setUserEmails: (update: SetStateAction<Array<string>>) => void;
|
||||
selectOptionsMids: Array<Record<string, string>>;
|
||||
selectOptionsMidsWithoutGids: Array<Record<string, string>>;
|
||||
setSelectOptionsMids: (update: SetStateAction<Array<Record<string, string>>>) => void;
|
||||
setSelectOptionsMidsWithoutGids: (update: SetStateAction<Array<Record<string, string>>>) => void;
|
||||
selectOptionsEmails: Array<Record<string, string>>;
|
||||
setSelectOptionsEmails: (update: SetStateAction<Array<Record<string, string>>>) => void;
|
||||
mid: string;
|
||||
@@ -35,6 +37,7 @@ const initialUserInfoState = {
|
||||
userMids: [] as Array<string>,
|
||||
userEmails: [] as Array<string>,
|
||||
selectOptionsMids: [] as Array<Record<string, string>>,
|
||||
selectOptionsMidsWithoutGids: [] as Array<Record<string, string>>,
|
||||
selectOptionsEmails: [] as Array<Record<string, string>>,
|
||||
mid: '' as string,
|
||||
email: '' as string,
|
||||
@@ -131,6 +134,18 @@ export const createUserInfoStore = lens<UserInfoState>((set, get) => ({
|
||||
};
|
||||
});
|
||||
},
|
||||
setSelectOptionsMidsWithoutGids: (update) => {
|
||||
set((state: UserInfoState) => {
|
||||
const newSelectOptionsMidsWithoutGids = (typeof update === 'function')
|
||||
? update(state.selectOptionsMidsWithoutGids): update;
|
||||
return {
|
||||
...state,
|
||||
selectOptionsMidsWithoutGids: [
|
||||
...newSelectOptionsMidsWithoutGids
|
||||
],
|
||||
};
|
||||
});
|
||||
},
|
||||
setSelectOptionsEmails: (update) => {
|
||||
set((state: UserInfoState) => {
|
||||
const newSelectOptionsEmails = (typeof update === 'function')
|
||||
|
||||
Reference in New Issue
Block a user