가맹점 수정
This commit is contained in:
@@ -54,7 +54,7 @@ export enum InfoWrapKeys {
|
||||
Escrow = 'Escrow'
|
||||
};
|
||||
export interface MerchantMidParams {
|
||||
mid?: string;
|
||||
mid: string;
|
||||
};
|
||||
export interface MerchantMidResponse {
|
||||
memberCompanyId?: string;
|
||||
@@ -82,7 +82,7 @@ export interface MerchantMidResponse {
|
||||
accountHolderName?: string;
|
||||
};
|
||||
export interface MerchantMidStatusParams {
|
||||
mid?: string;
|
||||
mid: string;
|
||||
};
|
||||
export interface MerchantMidStatusResponse {
|
||||
onlineInfomation: OnlineInfomation;
|
||||
|
||||
@@ -14,16 +14,15 @@ export const InfoWrap = () => {
|
||||
const userMids = useStore.getState().UserStore.userMids;
|
||||
const midOptions = useStore.getState().UserStore.selectOptionsMids;
|
||||
|
||||
const [mid, setMid] = useState<string | undefined>(userMids[0]);
|
||||
const [data, setData] = useState<MerchantMidResponse>();
|
||||
|
||||
const [openChild, setOpenChild] = useState<InfoWrapKeys | null>(null);
|
||||
|
||||
const { mutateAsync: merchantMid } = useMerchantMidMutation();
|
||||
|
||||
const callInfo = (selectedMid?: string) => {
|
||||
const callInfo = (selectedMid: string) => {
|
||||
let params: MerchantMidParams = {
|
||||
mid: selectedMid || mid
|
||||
mid: selectedMid
|
||||
};
|
||||
merchantMid(params).then((rs: MerchantMidResponse) => {
|
||||
setData(rs);
|
||||
@@ -31,12 +30,13 @@ export const InfoWrap = () => {
|
||||
};
|
||||
|
||||
const onChangeMid = (value: string) => {
|
||||
setMid(value);
|
||||
callInfo(value);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
callInfo();
|
||||
if(userMids[0]){
|
||||
callInfo(userMids[0]);
|
||||
}
|
||||
}, []);
|
||||
|
||||
return (
|
||||
|
||||
@@ -18,7 +18,6 @@ export const RegistrationStatusWrap = () => {
|
||||
const userMids = useStore.getState().UserStore.userMids;
|
||||
const midOptions = useStore.getState().UserStore.selectOptionsMids;
|
||||
|
||||
const [mid, setMid] = useState<string | undefined>(userMids[0]);
|
||||
const [onlineInfomation, setOnlineInfomation] = useState<OnlineInfomation>();
|
||||
const [offlineInfomation, setOfflineInfomation] = useState<OfflineInfomation>();
|
||||
const [cardApplications, setCardApplications] = useState<Array<CardApplications>>();
|
||||
@@ -27,9 +26,9 @@ export const RegistrationStatusWrap = () => {
|
||||
const [openChild, setOpenChild] = useState<InfoWrapKeys | null>(null);
|
||||
const { mutateAsync: merchantMidStatus } = useMerchantMidStatusMutation();
|
||||
|
||||
const callInfo = (selectedMid?: string) => {
|
||||
const callInfo = (selectedMid: string) => {
|
||||
let params: MerchantMidStatusParams = {
|
||||
mid: selectedMid || mid
|
||||
mid: selectedMid
|
||||
};
|
||||
merchantMidStatus(params).then((rs: MerchantMidStatusResponse) => {
|
||||
setOnlineInfomation(rs.onlineInfomation);
|
||||
@@ -40,12 +39,13 @@ export const RegistrationStatusWrap = () => {
|
||||
};
|
||||
|
||||
const onChangeMid = (value: string) => {
|
||||
setMid(value);
|
||||
callInfo(value);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
callInfo();
|
||||
if(userMids[0]){
|
||||
callInfo(userMids[0]);
|
||||
}
|
||||
}, []);
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user