가맹점 정보, 일부 상수 및 공용 변경
This commit is contained in:
@@ -1,29 +0,0 @@
|
|||||||
import axios from 'axios';
|
|
||||||
import { API_URL } from '@/shared/api/urls';
|
|
||||||
import { resultify } from '@/shared/lib/resultify';
|
|
||||||
import { CBDCAxiosError } from '@/shared/@types/error';
|
|
||||||
import {
|
|
||||||
BusinessMemberInfoParams,
|
|
||||||
BusinessMemberInfoResponse
|
|
||||||
} from '../model/types';
|
|
||||||
import {
|
|
||||||
useMutation,
|
|
||||||
UseMutationOptions
|
|
||||||
} from '@tanstack/react-query';
|
|
||||||
|
|
||||||
export const businessMemberInfo = (params: BusinessMemberInfoParams) => {
|
|
||||||
return resultify(
|
|
||||||
axios.post<BusinessMemberInfoResponse>(API_URL.businessMemberInfo(), params),
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export const useBusinessMemberInfoMutation = (options?: UseMutationOptions<BusinessMemberInfoResponse, CBDCAxiosError, BusinessMemberInfoParams>) => {
|
|
||||||
const mutation = useMutation<BusinessMemberInfoResponse, CBDCAxiosError, BusinessMemberInfoParams>({
|
|
||||||
...options,
|
|
||||||
mutationFn: (params: BusinessMemberInfoParams) => businessMemberInfo(params),
|
|
||||||
});
|
|
||||||
|
|
||||||
return {
|
|
||||||
...mutation,
|
|
||||||
};
|
|
||||||
};
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
export enum BusinessMemberTabKeys {
|
|
||||||
Info = 'Info',
|
|
||||||
RegistrationStatus = 'RegistrationStatus',
|
|
||||||
};
|
|
||||||
export enum BusinessMemberInfoKeys {
|
|
||||||
InfoContractManager = 'InfoContractManager',
|
|
||||||
InfoTechnicalManager = 'InfoTechnicalManager',
|
|
||||||
InfoSettlementManager = 'InfoSettlementManager',
|
|
||||||
InfoSettlementAccount = 'InfoSettlementAccount'
|
|
||||||
};
|
|
||||||
export interface BusinessMemberTabProps {
|
|
||||||
activeTab: BusinessMemberTabKeys;
|
|
||||||
};
|
|
||||||
export interface InfoArrowProps {
|
|
||||||
show?: boolean;
|
|
||||||
};
|
|
||||||
export interface BusinessMemberRequestParams {
|
|
||||||
tid?: string;
|
|
||||||
};
|
|
||||||
export interface InfoBasicInfoProps {
|
|
||||||
|
|
||||||
};
|
|
||||||
export interface InfoOwnerInfoProps {
|
|
||||||
|
|
||||||
};
|
|
||||||
export interface InfoCompanyInfoProps {
|
|
||||||
|
|
||||||
};
|
|
||||||
export interface InfoContractManagerProps {
|
|
||||||
|
|
||||||
};
|
|
||||||
export interface InfoTechnicalManagerProps {
|
|
||||||
|
|
||||||
};
|
|
||||||
export interface InfoSettlementManagerProps {
|
|
||||||
|
|
||||||
};
|
|
||||||
export interface InfoSettlementAccountProps {
|
|
||||||
|
|
||||||
};
|
|
||||||
export interface BusinessMemberInfoResponse {
|
|
||||||
InfoBasicInfo?: InfoBasicInfoProps;
|
|
||||||
InfoOwnerInfo?: InfoOwnerInfoProps;
|
|
||||||
InfoCompanyInfo?: InfoCompanyInfoProps;
|
|
||||||
infoContractManager?: InfoContractManagerProps;
|
|
||||||
infoTechnicalManager?: InfoTechnicalManagerProps;
|
|
||||||
infoSettlementManager?: InfoSettlementManagerProps;
|
|
||||||
infoSettlementAccount?: InfoSettlementAccountProps;
|
|
||||||
};
|
|
||||||
export interface InfoProps extends BusinessMemberInfoResponse{
|
|
||||||
show?: boolean;
|
|
||||||
onClickToShowInfo?: (info: BusinessMemberInfoKeys) => void;
|
|
||||||
};
|
|
||||||
export interface BusinessMemberInfoParams extends BusinessMemberRequestParams {
|
|
||||||
svcCd: string;
|
|
||||||
};
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
import { PATHS } from '@/shared/constants/paths';
|
|
||||||
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
|
||||||
import {
|
|
||||||
BusinessMemberTabKeys,
|
|
||||||
BusinessMemberTabProps
|
|
||||||
} from '../model/types';
|
|
||||||
|
|
||||||
export const BusinessMemberTab = ({
|
|
||||||
activeTab
|
|
||||||
}: BusinessMemberTabProps) => {
|
|
||||||
const { navigate } = useNavigate();
|
|
||||||
|
|
||||||
const onClickToNavigation = (tab: BusinessMemberTabKeys) => {
|
|
||||||
if(activeTab !== tab){
|
|
||||||
if(tab === BusinessMemberTabKeys.Info){
|
|
||||||
navigate(PATHS.businessMember.info);
|
|
||||||
}
|
|
||||||
else if(tab === BusinessMemberTabKeys.RegistrationStatus){
|
|
||||||
navigate(PATHS.businessMember.registrationStatus);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
return(
|
|
||||||
<>
|
|
||||||
<div className="subTab">
|
|
||||||
<button
|
|
||||||
className={`subtab-btn ${(activeTab === BusinessMemberTabKeys.Info)? 'active': ''}` }
|
|
||||||
onClick={ () => onClickToNavigation(BusinessMemberTabKeys.Info) }
|
|
||||||
>가맹점 정보</button>
|
|
||||||
<button
|
|
||||||
className={`subtab-btn ${(activeTab === BusinessMemberTabKeys.RegistrationStatus)? 'active': ''}` }
|
|
||||||
onClick={ () => onClickToNavigation(BusinessMemberTabKeys.RegistrationStatus) }
|
|
||||||
>등록현황</button>
|
|
||||||
</div>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
import { useEffect, useState } from 'react';
|
|
||||||
import { IMAGE_ROOT } from '@/shared/constants/common';
|
|
||||||
import { InfoArrowProps } from '../model/types';
|
|
||||||
|
|
||||||
export const InfoArrow = ({ show }: InfoArrowProps) => {
|
|
||||||
const [altMsg, setAltMsg] = useState<'접기' | '펼치기'>('접기');
|
|
||||||
const [className, setClassName] = useState<string>('ic20 rot-180');
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
setAltMsg((show)? '접기': '펼치기');
|
|
||||||
setClassName(`ic20 ${(show)? 'rot-180': ''}`);
|
|
||||||
}, [show]);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<img
|
|
||||||
className={ className }
|
|
||||||
src={ IMAGE_ROOT + '/select_arrow.svg' }
|
|
||||||
alt={ altMsg }
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
import { InfoProps } from '../model/types';
|
|
||||||
|
|
||||||
export const InfoBasicInfo = ({
|
|
||||||
InfoBasicInfo
|
|
||||||
}: InfoProps) => {
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<div className="section">
|
|
||||||
<div className="section-title">기본정보</div>
|
|
||||||
<ul className="kv-list">
|
|
||||||
<li className="kv-row">
|
|
||||||
<span className="k">상호</span>
|
|
||||||
<span className="v">나이스테스트</span>
|
|
||||||
</li>
|
|
||||||
<li className="kv-row">
|
|
||||||
<span className="k">사업자번호</span>
|
|
||||||
<span className="v">123-45-16798</span>
|
|
||||||
</li>
|
|
||||||
<li className="kv-row">
|
|
||||||
<span className="k">사업자속성</span>
|
|
||||||
<span className="v">일반</span>
|
|
||||||
</li>
|
|
||||||
<li className="kv-row">
|
|
||||||
<span className="k">업종</span>
|
|
||||||
<span className="v">식품</span>
|
|
||||||
</li>
|
|
||||||
<li className="kv-row">
|
|
||||||
<span className="k">업태</span>
|
|
||||||
<span className="v">식품</span>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
import { InfoProps } from '../model/types';
|
|
||||||
|
|
||||||
export const InfoCompanyInfo = ({
|
|
||||||
InfoCompanyInfo
|
|
||||||
}: InfoProps) => {
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<div className="section">
|
|
||||||
<ul className="kv-list">
|
|
||||||
<li className="kv-row">
|
|
||||||
<span className="k">사업장주소</span>
|
|
||||||
<span className="v">서울특별시 마포구 마포대로 217(아현동)</span>
|
|
||||||
</li>
|
|
||||||
<li className="kv-row">
|
|
||||||
<span className="k">홈페이지 주소</span>
|
|
||||||
<span className="v">https://adm.dev-nicepay.co.kr:8011</span>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
import { motion } from 'framer-motion';
|
|
||||||
import { BusinessMemberInfoKeys, InfoProps } from '../model/types';
|
|
||||||
import { InfoArrow } from './info-arrow';
|
|
||||||
|
|
||||||
export const InfoContractManager = ({
|
|
||||||
infoContractManager,
|
|
||||||
show,
|
|
||||||
onClickToShowInfo
|
|
||||||
}: InfoProps) => {
|
|
||||||
|
|
||||||
const variants = {
|
|
||||||
hidden: { height: 0, padding: 0, display: 'none' },
|
|
||||||
visible: { height: 'auto', paddingTop: '12px', display: 'block' },
|
|
||||||
};
|
|
||||||
|
|
||||||
const onClickToSetShowInfo = () => {
|
|
||||||
if(!!onClickToShowInfo){
|
|
||||||
onClickToShowInfo(BusinessMemberInfoKeys.InfoContractManager);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<div className="section">
|
|
||||||
<div className="section-title"
|
|
||||||
onClick={ () => onClickToSetShowInfo() }
|
|
||||||
>
|
|
||||||
계약 담당자 <InfoArrow show={ show }></InfoArrow>
|
|
||||||
</div>
|
|
||||||
<motion.ul
|
|
||||||
className="kv-list"
|
|
||||||
initial="hidden"
|
|
||||||
animate={ (show)? 'visible': 'hidden' }
|
|
||||||
variants={ variants }
|
|
||||||
transition={{ duration: 0.3 }}
|
|
||||||
>
|
|
||||||
<li className="kv-row">
|
|
||||||
<span className="k">김테스트</span>
|
|
||||||
<span className="v"></span>
|
|
||||||
</li>
|
|
||||||
<li className="kv-row">
|
|
||||||
<span className="k">010-1234-****</span>
|
|
||||||
<span className="v"></span>
|
|
||||||
</li>
|
|
||||||
<li className="kv-row">
|
|
||||||
<span className="k">testkim@nicepay.co.kr</span>
|
|
||||||
<span className="v"></span>
|
|
||||||
</li>
|
|
||||||
</motion.ul>
|
|
||||||
</div>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
import { InfoProps } from '../model/types';
|
|
||||||
|
|
||||||
export const InfoOwnerInfo = ({
|
|
||||||
InfoOwnerInfo
|
|
||||||
}: InfoProps) => {
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<div className="section">
|
|
||||||
<ul className="kv-list">
|
|
||||||
<li className="kv-row">
|
|
||||||
<span className="k">대표자명</span>
|
|
||||||
<span className="v">김테스트</span>
|
|
||||||
</li>
|
|
||||||
<li className="kv-row">
|
|
||||||
<span className="k">대표 연락처</span>
|
|
||||||
<span className="v">010-1234-1234</span>
|
|
||||||
</li>
|
|
||||||
<li className="kv-row">
|
|
||||||
<span className="k">대표 이메일</span>
|
|
||||||
<span className="v">testkim@nicepay.co.kr</span>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
import { motion } from 'framer-motion';
|
|
||||||
import { BusinessMemberInfoKeys, InfoProps } from '../model/types';
|
|
||||||
import { InfoArrow } from './info-arrow';
|
|
||||||
|
|
||||||
export const InfoSettlementAccount = ({
|
|
||||||
infoSettlementAccount,
|
|
||||||
show,
|
|
||||||
onClickToShowInfo
|
|
||||||
}: InfoProps) => {
|
|
||||||
|
|
||||||
const variants = {
|
|
||||||
hidden: { height: 0, padding: 0, display: 'none' },
|
|
||||||
visible: { height: 'auto', paddingTop: '12px', display: 'block' },
|
|
||||||
};
|
|
||||||
|
|
||||||
const onClickToSetShowInfo = () => {
|
|
||||||
if(!!onClickToShowInfo){
|
|
||||||
onClickToShowInfo(BusinessMemberInfoKeys.InfoSettlementAccount);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<div className="section">
|
|
||||||
<div className="section-title"
|
|
||||||
onClick={ () => onClickToSetShowInfo() }
|
|
||||||
>
|
|
||||||
정산계좌 <InfoArrow show={ show }></InfoArrow>
|
|
||||||
</div>
|
|
||||||
<motion.ul
|
|
||||||
className="kv-list"
|
|
||||||
initial="hidden"
|
|
||||||
animate={ (show)? 'visible': 'hidden' }
|
|
||||||
variants={ variants }
|
|
||||||
transition={{ duration: 0.3 }}
|
|
||||||
>
|
|
||||||
<li className="kv-row">
|
|
||||||
<span className="k">은행</span>
|
|
||||||
<span className="v">신한은행</span>
|
|
||||||
</li>
|
|
||||||
<li className="kv-row">
|
|
||||||
<span className="k">계좌번호</span>
|
|
||||||
<span className="v">123-45-16798</span>
|
|
||||||
</li>
|
|
||||||
<li className="kv-row">
|
|
||||||
<span className="k">예금주</span>
|
|
||||||
<span className="v">김테스트</span>
|
|
||||||
</li>
|
|
||||||
</motion.ul>
|
|
||||||
</div>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
import { motion } from 'framer-motion';
|
|
||||||
import { BusinessMemberInfoKeys, InfoProps } from '../model/types';
|
|
||||||
import { InfoArrow } from './info-arrow';
|
|
||||||
|
|
||||||
export const InfoSettlementManager = ({
|
|
||||||
infoSettlementManager,
|
|
||||||
show,
|
|
||||||
onClickToShowInfo
|
|
||||||
}: InfoProps) => {
|
|
||||||
|
|
||||||
const variants = {
|
|
||||||
hidden: { height: 0, padding: 0, display: 'none' },
|
|
||||||
visible: { height: 'auto', paddingTop: '12px', display: 'block' },
|
|
||||||
};
|
|
||||||
|
|
||||||
const onClickToSetShowInfo = () => {
|
|
||||||
if(!!onClickToShowInfo){
|
|
||||||
onClickToShowInfo(BusinessMemberInfoKeys.InfoSettlementManager);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<div className="section">
|
|
||||||
<div className="section-title"
|
|
||||||
onClick={ () => onClickToSetShowInfo() }
|
|
||||||
>
|
|
||||||
정산 담당자 <InfoArrow show={ show }></InfoArrow>
|
|
||||||
</div>
|
|
||||||
<motion.ul
|
|
||||||
className="kv-list"
|
|
||||||
initial="hidden"
|
|
||||||
animate={ (show)? 'visible': 'hidden' }
|
|
||||||
variants={ variants }
|
|
||||||
transition={{ duration: 0.3 }}
|
|
||||||
>
|
|
||||||
<li className="kv-row">
|
|
||||||
<span className="k">김테스트</span>
|
|
||||||
<span className="v"></span>
|
|
||||||
</li>
|
|
||||||
<li className="kv-row">
|
|
||||||
<span className="k">010-1234-****</span>
|
|
||||||
<span className="v"></span>
|
|
||||||
</li>
|
|
||||||
<li className="kv-row">
|
|
||||||
<span className="k">testkim@nicepay.co.kr</span>
|
|
||||||
<span className="v"></span>
|
|
||||||
</li>
|
|
||||||
</motion.ul>
|
|
||||||
</div>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
import { motion } from 'framer-motion';
|
|
||||||
import { BusinessMemberInfoKeys, InfoProps } from '../model/types';
|
|
||||||
import { InfoArrow } from './info-arrow';
|
|
||||||
|
|
||||||
export const InfoTechnicalManager = ({
|
|
||||||
infoTechnicalManager,
|
|
||||||
show,
|
|
||||||
onClickToShowInfo
|
|
||||||
}: InfoProps) => {
|
|
||||||
|
|
||||||
const variants = {
|
|
||||||
hidden: { height: 0, padding: 0, display: 'none' },
|
|
||||||
visible: { height: 'auto', paddingTop: '12px', display: 'block' },
|
|
||||||
};
|
|
||||||
|
|
||||||
const onClickToSetShowInfo = () => {
|
|
||||||
if(!!onClickToShowInfo){
|
|
||||||
onClickToShowInfo(BusinessMemberInfoKeys.InfoTechnicalManager);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<div className="section">
|
|
||||||
<div className="section-title"
|
|
||||||
onClick={ () => onClickToSetShowInfo() }
|
|
||||||
>
|
|
||||||
기술 담당자 <InfoArrow show={ show }></InfoArrow>
|
|
||||||
</div>
|
|
||||||
<motion.ul
|
|
||||||
className="kv-list"
|
|
||||||
initial="hidden"
|
|
||||||
animate={ (show)? 'visible': 'hidden' }
|
|
||||||
variants={ variants }
|
|
||||||
transition={{ duration: 0.3 }}
|
|
||||||
>
|
|
||||||
<li className="kv-row">
|
|
||||||
<span className="k">김테스트</span>
|
|
||||||
<span className="v"></span>
|
|
||||||
</li>
|
|
||||||
<li className="kv-row">
|
|
||||||
<span className="k">010-1234-****</span>
|
|
||||||
<span className="v"></span>
|
|
||||||
</li>
|
|
||||||
<li className="kv-row">
|
|
||||||
<span className="k">testkim@nicepay.co.kr</span>
|
|
||||||
<span className="v"></span>
|
|
||||||
</li>
|
|
||||||
</motion.ul>
|
|
||||||
</div>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -1,121 +0,0 @@
|
|||||||
import { useEffect, useState } from 'react';
|
|
||||||
import { useBusinessMemberInfoMutation } from '../api/use-business-member-info-mutation';
|
|
||||||
import { InfoBasicInfo } from './info-basic-info';
|
|
||||||
import { InfoOwnerInfo } from './info-owner-info';
|
|
||||||
import { InfoCompanyInfo } from './info-company-info';
|
|
||||||
import { InfoContractManager } from './info-contract-manager';
|
|
||||||
import { InfoTechnicalManager } from './info-technical-manager';
|
|
||||||
import { InfoSettlementManager } from './info-settlement-manager';
|
|
||||||
import { InfoSettlementAccount } from './info-settlement-account';
|
|
||||||
import {
|
|
||||||
BusinessMemberInfoParams,
|
|
||||||
BusinessMemberInfoResponse,
|
|
||||||
InfoContractManagerProps,
|
|
||||||
InfoTechnicalManagerProps,
|
|
||||||
InfoSettlementManagerProps,
|
|
||||||
InfoSettlementAccountProps,
|
|
||||||
BusinessMemberInfoKeys
|
|
||||||
} from '../model/types';
|
|
||||||
|
|
||||||
export const InfoWrap = () => {
|
|
||||||
const [infoContractManager, setInfoContractManager] = useState<InfoContractManagerProps>();
|
|
||||||
const [infoTechnicalManager, setInfoTechnicalManager] = useState<InfoTechnicalManagerProps>();
|
|
||||||
const [infoSettlementManager, setInfoSettlementManager] = useState<InfoSettlementManagerProps>();
|
|
||||||
const [infoSettlementAccount, setInfoSettlementAccount] = useState<InfoSettlementAccountProps>();
|
|
||||||
const [showInfoContractManager, setShowInfoContractManager] = useState<boolean>(false);
|
|
||||||
const [showInfoTechnicalManager, setShowInfoTechnicalManager] = useState<boolean>(false);
|
|
||||||
const [showInfoSettlementManager, setShowInfoSettlementManager] = useState<boolean>(false);
|
|
||||||
const [showInfoSettlementAccount, setShowInfoSettlemenAccount] = useState<boolean>(false);
|
|
||||||
|
|
||||||
const { mutateAsync: businessMemberInfo } = useBusinessMemberInfoMutation();
|
|
||||||
|
|
||||||
const callInfo = () => {
|
|
||||||
let businessMemberInfoParams: BusinessMemberInfoParams = {
|
|
||||||
svcCd: 'st',
|
|
||||||
};
|
|
||||||
businessMemberInfo(businessMemberInfoParams).then((rs: BusinessMemberInfoResponse) => {
|
|
||||||
setInfoContractManager(rs.infoContractManager);
|
|
||||||
setInfoTechnicalManager(rs.infoTechnicalManager);
|
|
||||||
setInfoSettlementManager(rs.infoSettlementManager);
|
|
||||||
setInfoSettlementAccount(rs.infoSettlementAccount);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const onClickToShowInfo = (info: BusinessMemberInfoKeys) => {
|
|
||||||
if(info === BusinessMemberInfoKeys.InfoContractManager){
|
|
||||||
setShowInfoContractManager(!showInfoContractManager);
|
|
||||||
}
|
|
||||||
else if(info === BusinessMemberInfoKeys.InfoTechnicalManager){
|
|
||||||
setShowInfoTechnicalManager(!showInfoTechnicalManager);
|
|
||||||
}
|
|
||||||
else if(info === BusinessMemberInfoKeys.InfoSettlementManager){
|
|
||||||
setShowInfoSettlementManager(!showInfoSettlementManager);
|
|
||||||
}
|
|
||||||
else if(info === BusinessMemberInfoKeys.InfoSettlementAccount){
|
|
||||||
setShowInfoSettlemenAccount(!showInfoSettlementAccount);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
callInfo();
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<div className="input-wrapper top-select mt-30">
|
|
||||||
<select>
|
|
||||||
<option value="1">nicetest00g</option>
|
|
||||||
<option value="2">nicetest00g</option>
|
|
||||||
<option value="3">nicetest00g</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="merchant-info">
|
|
||||||
<InfoBasicInfo></InfoBasicInfo>
|
|
||||||
<div className="info-divider mb-16"></div>
|
|
||||||
|
|
||||||
<InfoOwnerInfo></InfoOwnerInfo>
|
|
||||||
|
|
||||||
<div className="info-divider mb-16"></div>
|
|
||||||
|
|
||||||
<InfoCompanyInfo></InfoCompanyInfo>
|
|
||||||
|
|
||||||
<div className="info-divider mb-16"></div>
|
|
||||||
|
|
||||||
<InfoContractManager
|
|
||||||
infoContractManager={ infoContractManager }
|
|
||||||
show={ showInfoContractManager }
|
|
||||||
onClickToShowInfo={ (info) => onClickToShowInfo(info) }
|
|
||||||
></InfoContractManager>
|
|
||||||
|
|
||||||
<div className="info-divider mb-16"></div>
|
|
||||||
|
|
||||||
<InfoTechnicalManager
|
|
||||||
infoTechnicalManager={ infoTechnicalManager }
|
|
||||||
show={ showInfoTechnicalManager }
|
|
||||||
onClickToShowInfo={ (info) => onClickToShowInfo(info) }
|
|
||||||
></InfoTechnicalManager>
|
|
||||||
|
|
||||||
<div className="info-divider mb-16"></div>
|
|
||||||
|
|
||||||
<InfoSettlementManager
|
|
||||||
infoSettlementManager={ infoSettlementManager }
|
|
||||||
show={ showInfoSettlementManager }
|
|
||||||
onClickToShowInfo={ (info) => onClickToShowInfo(info) }
|
|
||||||
></InfoSettlementManager>
|
|
||||||
|
|
||||||
<div className="info-divider mb-16"></div>
|
|
||||||
|
|
||||||
<InfoSettlementAccount
|
|
||||||
infoSettlementManager={ infoSettlementAccount }
|
|
||||||
show={ showInfoSettlementAccount }
|
|
||||||
onClickToShowInfo={ (info) => onClickToShowInfo(info) }
|
|
||||||
></InfoSettlementAccount>
|
|
||||||
|
|
||||||
<div className="notice-bottom left-align">
|
|
||||||
<p className="notice-tip">※ 가맹점 정보는 앱에서 수정할 수 없습니다.<br/>PC 가맹점 관리자에서 설정해 주세요.</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -178,6 +178,6 @@ export interface EmptyTokenAddSendCodeResponse {
|
|||||||
authCode: string;
|
authCode: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export interface DetailArrowProps {
|
export interface SectionArrowProps {
|
||||||
show?: boolean;
|
isOpen?: boolean;
|
||||||
};
|
};
|
||||||
@@ -2,17 +2,17 @@ import { useEffect, useState } from 'react';
|
|||||||
import { IMAGE_ROOT } from '@/shared/constants/common';
|
import { IMAGE_ROOT } from '@/shared/constants/common';
|
||||||
import {
|
import {
|
||||||
AltMsgKeys,
|
AltMsgKeys,
|
||||||
DetailArrowProps
|
SectionArrowProps
|
||||||
} from '@/entities/common/model/types';
|
} from '../model/types';
|
||||||
|
|
||||||
export const DetailArrow = ({ show }: DetailArrowProps) => {
|
export const SectionTitleArrow = ({ isOpen }: SectionArrowProps) => {
|
||||||
const [altMsg, setAltMsg] = useState<AltMsgKeys>(AltMsgKeys.Fold);
|
const [altMsg, setAltMsg] = useState<AltMsgKeys>(AltMsgKeys.Fold);
|
||||||
const [className, setClassName] = useState<string>('ic20 rot-180');
|
const [className, setClassName] = useState<string>('ic20 rot-180');
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setAltMsg((show)? AltMsgKeys.Fold: AltMsgKeys.UnFold);
|
setAltMsg((isOpen)? AltMsgKeys.Fold: AltMsgKeys.UnFold);
|
||||||
setClassName(`ic20 ${(show)? 'rot-180': ''}`);
|
setClassName(`ic20 ${(isOpen)? 'rot-180': ''}`);
|
||||||
}, [show]);
|
}, [isOpen]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
29
src/entities/merchant/api/use-merchant-mid-mutation.tsx
Normal file
29
src/entities/merchant/api/use-merchant-mid-mutation.tsx
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
import axios from 'axios';
|
||||||
|
import { API_URL_MERCHANT } from '@/shared/api/api-url-merchant';
|
||||||
|
import { resultify } from '@/shared/lib/resultify';
|
||||||
|
import { CBDCAxiosError } from '@/shared/@types/error';
|
||||||
|
import {
|
||||||
|
MerchantMidParams,
|
||||||
|
MerchantMidResponse
|
||||||
|
} from '../model/types';
|
||||||
|
import {
|
||||||
|
useMutation,
|
||||||
|
UseMutationOptions
|
||||||
|
} from '@tanstack/react-query';
|
||||||
|
|
||||||
|
export const merchantMid = (params: MerchantMidParams) => {
|
||||||
|
return resultify(
|
||||||
|
axios.post<MerchantMidResponse>(API_URL_MERCHANT.merchantMid(params.mid), params),
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const useMerchantMidMutation = (options?: UseMutationOptions<MerchantMidResponse, CBDCAxiosError, MerchantMidParams>) => {
|
||||||
|
const mutation = useMutation<MerchantMidResponse, CBDCAxiosError, MerchantMidParams>({
|
||||||
|
...options,
|
||||||
|
mutationFn: (params: MerchantMidParams) => merchantMid(params),
|
||||||
|
});
|
||||||
|
|
||||||
|
return {
|
||||||
|
...mutation,
|
||||||
|
};
|
||||||
|
};
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
import axios from 'axios';
|
||||||
|
import { API_URL_MERCHANT } from '@/shared/api/api-url-merchant';
|
||||||
|
import { resultify } from '@/shared/lib/resultify';
|
||||||
|
import { CBDCAxiosError } from '@/shared/@types/error';
|
||||||
|
import {
|
||||||
|
MerchantMidStatusParams,
|
||||||
|
MerchantMidStatusResponse
|
||||||
|
} from '../model/types';
|
||||||
|
import {
|
||||||
|
useMutation,
|
||||||
|
UseMutationOptions
|
||||||
|
} from '@tanstack/react-query';
|
||||||
|
|
||||||
|
export const merchantMidStatus = (params: MerchantMidStatusParams) => {
|
||||||
|
return resultify(
|
||||||
|
axios.post<MerchantMidStatusResponse>(API_URL_MERCHANT.merchantMidStatus(params.mid), params),
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const useMerchantMidStatusMutation = (options?: UseMutationOptions<MerchantMidStatusResponse, CBDCAxiosError, MerchantMidStatusParams>) => {
|
||||||
|
const mutation = useMutation<MerchantMidStatusResponse, CBDCAxiosError, MerchantMidStatusParams>({
|
||||||
|
...options,
|
||||||
|
mutationFn: (params: MerchantMidStatusParams) => merchantMidStatus(params),
|
||||||
|
});
|
||||||
|
|
||||||
|
return {
|
||||||
|
...mutation,
|
||||||
|
};
|
||||||
|
};
|
||||||
119
src/entities/merchant/model/types.ts
Normal file
119
src/entities/merchant/model/types.ts
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
export enum MerchantTabKeys {
|
||||||
|
Info = 'Info',
|
||||||
|
RegistrationStatus = 'RegistrationStatus',
|
||||||
|
};
|
||||||
|
export interface MerchantTabProps {
|
||||||
|
activeTab: MerchantTabKeys;
|
||||||
|
};
|
||||||
|
export enum ContractStatus {
|
||||||
|
RECEPTION_COMPLETED = 'RECEPTION_COMPLETED',
|
||||||
|
RECEPTION_INCOMPLETE = 'RECEPTION_INCOMPLETE',
|
||||||
|
};
|
||||||
|
export enum CardAuditStatus {
|
||||||
|
REQUEST_COMPLETED = 'REQUEST_COMPLETED',
|
||||||
|
SUPPLEMENT_REQUIRED = 'SUPPLEMENT_REQUIRED'
|
||||||
|
};
|
||||||
|
export enum UsageStatus {
|
||||||
|
AVAILABLE = 'AVAILABLE',
|
||||||
|
SUSPENDED = 'SUSPENDED'
|
||||||
|
};
|
||||||
|
export enum InitialRegistrationFeeStatus {
|
||||||
|
EXEMPT = 'EXEMPT',
|
||||||
|
NOT_REGISTERED = 'NOT_REGISTERED',
|
||||||
|
UNPAID = 'UNPAID',
|
||||||
|
PAID = 'PAID',
|
||||||
|
};
|
||||||
|
export enum GuaranteeInsuranceFeeStatus {
|
||||||
|
EXEMPT = 'EXEMPT',
|
||||||
|
NOT_REGISTERED = 'NOT_REGISTERED',
|
||||||
|
UNPAID = 'UNPAID',
|
||||||
|
PAID = 'PAID',
|
||||||
|
};
|
||||||
|
export enum CardCompanyName {
|
||||||
|
BC = 'BC',
|
||||||
|
KOOKMIN = 'KOOKMIN',
|
||||||
|
HANA = 'HANA',
|
||||||
|
SAMSUNG = 'SAMSUNG',
|
||||||
|
SHINHAN = 'SHINHAN',
|
||||||
|
HYUNDAI = 'HYUNDAI',
|
||||||
|
LOTTE = 'LOTTE',
|
||||||
|
NH = 'NH',
|
||||||
|
WOORI = 'WOORI'
|
||||||
|
};
|
||||||
|
export enum EscrowStatus {
|
||||||
|
ACTIVE = 'ACTIVE',
|
||||||
|
INACTIVE = 'INACTIVE'
|
||||||
|
};
|
||||||
|
export enum InfoWrapKeys {
|
||||||
|
Merchant = 'Merchant',
|
||||||
|
Technical = 'Technical',
|
||||||
|
Settlement = 'Settlement',
|
||||||
|
};
|
||||||
|
export interface MerchantMidParams {
|
||||||
|
mid: string;
|
||||||
|
};
|
||||||
|
export interface MerchantMidResponse {
|
||||||
|
memberCompanyId?: string;
|
||||||
|
businessCompanyName?: string;
|
||||||
|
businessRegistrationNumber?: string;
|
||||||
|
businessScaleTypeName?: string;
|
||||||
|
businessType?: string;
|
||||||
|
businessCategory?: string;
|
||||||
|
representativeName?: string;
|
||||||
|
telephoneNumber?: string;
|
||||||
|
email?: string;
|
||||||
|
businessAddress?: string;
|
||||||
|
url?: string;
|
||||||
|
merchantManager?: string;
|
||||||
|
merchantManagerTelephone?: string;
|
||||||
|
merchantManagerEmail?: string;
|
||||||
|
technicalManager?: string;
|
||||||
|
technicalManagerTelephone?: string;
|
||||||
|
technicalManagerEmail?: string;
|
||||||
|
settlementManager?: string;
|
||||||
|
settlementManagerTelephone?: string;
|
||||||
|
settlementManagerEmail?: string;
|
||||||
|
bankName?: string;
|
||||||
|
accountNumber?: string;
|
||||||
|
accountHolderName?: string;
|
||||||
|
};
|
||||||
|
export interface MerchantMidStatusParams {
|
||||||
|
mid: string;
|
||||||
|
};
|
||||||
|
export interface MerchantMidStatusResponse {
|
||||||
|
onlineInfomation: OnlineInfomation;
|
||||||
|
offlineInfomation: OfflineInfomation;
|
||||||
|
cardApplications: Array<CardApplications>;
|
||||||
|
escrow: Escrow;
|
||||||
|
};
|
||||||
|
export interface OnlineInfomation {
|
||||||
|
registrationDate: string;
|
||||||
|
businessRegistrationNumber: string;
|
||||||
|
companyName: string;
|
||||||
|
contractStatus: ContractStatus;
|
||||||
|
cardAuditStatus: CardAuditStatus;
|
||||||
|
insuranceAmount: string;
|
||||||
|
insuranceExpiryDate: string;
|
||||||
|
usageStatus: UsageStatus;
|
||||||
|
};
|
||||||
|
export interface OfflineInfomation {
|
||||||
|
registrationDate: string;
|
||||||
|
contractDocumentCount: number;
|
||||||
|
initialRegistrationFeeStatus: InitialRegistrationFeeStatus;
|
||||||
|
initialRegistrationFeeAmount: string;
|
||||||
|
guaranteeInsuranceFeeStatus: GuaranteeInsuranceFeeStatus;
|
||||||
|
guaranteeInsuranceFeeAmount: string;
|
||||||
|
};
|
||||||
|
export interface CardApplications {
|
||||||
|
cardCompanyName: CardCompanyName;
|
||||||
|
partnerServiceName: string;
|
||||||
|
statusName: string;
|
||||||
|
};
|
||||||
|
export interface Escrow {
|
||||||
|
companyName: string;
|
||||||
|
businessRegistrationNumber: string;
|
||||||
|
escrowStatus: EscrowStatus,
|
||||||
|
address: string;
|
||||||
|
merchantUrl: string;
|
||||||
|
serviceRegistrationNumber: string;
|
||||||
|
};
|
||||||
85
src/entities/merchant/ui/info-wrap.tsx
Normal file
85
src/entities/merchant/ui/info-wrap.tsx
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
import { useEffect, useState } from 'react';
|
||||||
|
import { useMerchantMidMutation } from '../api/use-merchant-mid-mutation';
|
||||||
|
import { BusinessInfoWrap } from './info-wrap/business-info-wrap';
|
||||||
|
import { ManagerInfoWrap } from './info-wrap/manager-info-wrap';
|
||||||
|
|
||||||
|
import {
|
||||||
|
InfoWrapKeys,
|
||||||
|
MerchantMidParams,
|
||||||
|
MerchantMidResponse
|
||||||
|
} from '../model/types';
|
||||||
|
|
||||||
|
export const InfoWrap = () => {
|
||||||
|
|
||||||
|
const [mid, setMid] = useState<string>('nictest001m');
|
||||||
|
const [data, setData] = useState<MerchantMidResponse>();
|
||||||
|
|
||||||
|
const [openChild, setOpenChild] = useState<InfoWrapKeys | null>(null);
|
||||||
|
const { mutateAsync: merchantMid } = useMerchantMidMutation();
|
||||||
|
|
||||||
|
const callInfo = () => {
|
||||||
|
let params: MerchantMidParams = {
|
||||||
|
mid: mid,
|
||||||
|
};
|
||||||
|
merchantMid(params).then((rs: MerchantMidResponse) => {
|
||||||
|
setData(rs);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
callInfo();
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div className="input-wrapper top-select mt-30">
|
||||||
|
<select>
|
||||||
|
<option value="1">nicetest00g</option>
|
||||||
|
<option value="2">nicetest00g</option>
|
||||||
|
<option value="3">nicetest00g</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="merchant-info">
|
||||||
|
<BusinessInfoWrap
|
||||||
|
data={ data }
|
||||||
|
></BusinessInfoWrap>
|
||||||
|
<div className="info-divider mb-16"></div>
|
||||||
|
<ManagerInfoWrap
|
||||||
|
type={ InfoWrapKeys.Merchant }
|
||||||
|
title='계약 담당자'
|
||||||
|
manager={ data?.merchantManager }
|
||||||
|
managerTelephone={ data?.merchantManagerTelephone }
|
||||||
|
managetEmail={ data?.merchantManagerEmail }
|
||||||
|
openChild={ openChild }
|
||||||
|
setOpenChild={ setOpenChild }
|
||||||
|
></ManagerInfoWrap>
|
||||||
|
<div className="info-divider mb-16"></div>
|
||||||
|
<ManagerInfoWrap
|
||||||
|
type={ InfoWrapKeys.Technical }
|
||||||
|
title='기술 담당자'
|
||||||
|
manager={ data?.technicalManager }
|
||||||
|
managerTelephone={ data?.technicalManagerTelephone }
|
||||||
|
managetEmail={ data?.technicalManagerEmail }
|
||||||
|
openChild={ openChild }
|
||||||
|
setOpenChild={ setOpenChild }
|
||||||
|
></ManagerInfoWrap>
|
||||||
|
<div className="info-divider mb-16"></div>
|
||||||
|
<ManagerInfoWrap
|
||||||
|
type={ InfoWrapKeys.Settlement }
|
||||||
|
title='정산 담당자'
|
||||||
|
manager={ data?.settlementManager }
|
||||||
|
managerTelephone={ data?.settlementManagerTelephone }
|
||||||
|
managetEmail={ data?.settlementManagerEmail }
|
||||||
|
openChild={ openChild }
|
||||||
|
setOpenChild={ setOpenChild }
|
||||||
|
></ManagerInfoWrap>
|
||||||
|
<div className="info-divider mb-16"></div>
|
||||||
|
|
||||||
|
<div className="notice-bottom left-align">
|
||||||
|
<p className="notice-tip">※ 가맹점 정보는 앱에서 수정할 수 없습니다.<br/>PC 가맹점 관리자에서 설정해 주세요.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
70
src/entities/merchant/ui/info-wrap/business-info-wrap.tsx
Normal file
70
src/entities/merchant/ui/info-wrap/business-info-wrap.tsx
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
import { MerchantMidResponse } from '../../model/types';
|
||||||
|
|
||||||
|
export interface BusinessInfoWrapProps {
|
||||||
|
data?: MerchantMidResponse
|
||||||
|
};
|
||||||
|
|
||||||
|
export const BusinessInfoWrap = ({
|
||||||
|
data
|
||||||
|
}: BusinessInfoWrapProps) => {
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div className="section">
|
||||||
|
<div className="section-title">기본정보</div>
|
||||||
|
<ul className="kv-list">
|
||||||
|
<li className="kv-row">
|
||||||
|
<span className="k">상호</span>
|
||||||
|
<span className="v">{ data?.businessCompanyName }</span>
|
||||||
|
</li>
|
||||||
|
<li className="kv-row">
|
||||||
|
<span className="k">사업자번호</span>
|
||||||
|
<span className="v">{ data?.businessRegistrationNumber }</span>
|
||||||
|
</li>
|
||||||
|
<li className="kv-row">
|
||||||
|
<span className="k">사업자속성</span>
|
||||||
|
<span className="v">{ data?.businessScaleTypeName }</span>
|
||||||
|
</li>
|
||||||
|
<li className="kv-row">
|
||||||
|
<span className="k">업종</span>
|
||||||
|
<span className="v">{ data?.businessType }</span>
|
||||||
|
</li>
|
||||||
|
<li className="kv-row">
|
||||||
|
<span className="k">업태</span>
|
||||||
|
<span className="v">{ data?.businessCategory }</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div className="info-divider mb-16"></div>
|
||||||
|
<div className="section">
|
||||||
|
<ul className="kv-list">
|
||||||
|
<li className="kv-row">
|
||||||
|
<span className="k">대표자명</span>
|
||||||
|
<span className="v">{ data?.representativeName }</span>
|
||||||
|
</li>
|
||||||
|
<li className="kv-row">
|
||||||
|
<span className="k">대표 연락처</span>
|
||||||
|
<span className="v">{ data?.telephoneNumber }</span>
|
||||||
|
</li>
|
||||||
|
<li className="kv-row">
|
||||||
|
<span className="k">대표 이메일</span>
|
||||||
|
<span className="v">{ data?.email }</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div className="info-divider mb-16"></div>
|
||||||
|
<div className="section">
|
||||||
|
<ul className="kv-list">
|
||||||
|
<li className="kv-row">
|
||||||
|
<span className="k">사업장주소</span>
|
||||||
|
<span className="v">{ data?.businessAddress }</span>
|
||||||
|
</li>
|
||||||
|
<li className="kv-row">
|
||||||
|
<span className="k">홈페이지 주소</span>
|
||||||
|
<span className="v">{ data?.url }</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
75
src/entities/merchant/ui/info-wrap/manager-info-wrap.tsx
Normal file
75
src/entities/merchant/ui/info-wrap/manager-info-wrap.tsx
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
import { SectionTitleArrow } from '@/entities/common/ui/section-title-arrow';
|
||||||
|
import { InfoWrapKeys, MerchantMidResponse } from '../../model/types';
|
||||||
|
import SlideDown from 'react-slidedown';
|
||||||
|
import 'react-slidedown/lib/slidedown.css';
|
||||||
|
import { useEffect, useState } from 'react';
|
||||||
|
|
||||||
|
export interface ManagerInfoWrapProps {
|
||||||
|
type: InfoWrapKeys;
|
||||||
|
title?: string;
|
||||||
|
manager?: string;
|
||||||
|
managerTelephone?: string;
|
||||||
|
managetEmail?: string;
|
||||||
|
openChild: InfoWrapKeys | null;
|
||||||
|
setOpenChild: (openChild: InfoWrapKeys | null) => void;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const ManagerInfoWrap = ({
|
||||||
|
type,
|
||||||
|
title,
|
||||||
|
manager,
|
||||||
|
managerTelephone,
|
||||||
|
managetEmail,
|
||||||
|
openChild,
|
||||||
|
setOpenChild
|
||||||
|
}: ManagerInfoWrapProps) => {
|
||||||
|
|
||||||
|
const [isOpen, setIsOpen] = useState<boolean>(false);
|
||||||
|
|
||||||
|
const opeSection = () => {
|
||||||
|
const staus = !isOpen;
|
||||||
|
setIsOpen(staus);
|
||||||
|
if(!!staus){
|
||||||
|
setOpenChild(type);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setOpenChild(null)
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if(!!openChild && openChild !== type){
|
||||||
|
setIsOpen(false);
|
||||||
|
}
|
||||||
|
}, [openChild]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div className="section">
|
||||||
|
<div className="section-title"
|
||||||
|
onClick={ () => opeSection() }
|
||||||
|
>
|
||||||
|
{ title } <SectionTitleArrow isOpen={ isOpen }></SectionTitleArrow>
|
||||||
|
</div>
|
||||||
|
<SlideDown className={'my-dropdown-slidedown'}>
|
||||||
|
{ isOpen &&
|
||||||
|
<ul className="kv-list">
|
||||||
|
<li className="kv-row">
|
||||||
|
<span className="k">{ manager }</span>
|
||||||
|
<span className="v"></span>
|
||||||
|
</li>
|
||||||
|
<li className="kv-row">
|
||||||
|
<span className="k">{ managerTelephone }</span>
|
||||||
|
<span className="v"></span>
|
||||||
|
</li>
|
||||||
|
<li className="kv-row">
|
||||||
|
<span className="k">{ managetEmail }</span>
|
||||||
|
<span className="v"></span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
}
|
||||||
|
</SlideDown>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
37
src/entities/merchant/ui/merchant-tab.tsx
Normal file
37
src/entities/merchant/ui/merchant-tab.tsx
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
import { PATHS } from '@/shared/constants/paths';
|
||||||
|
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
||||||
|
import {
|
||||||
|
MerchantTabKeys,
|
||||||
|
MerchantTabProps
|
||||||
|
} from '../model/types';
|
||||||
|
|
||||||
|
export const MerchantTab = ({
|
||||||
|
activeTab
|
||||||
|
}: MerchantTabProps) => {
|
||||||
|
const { navigate } = useNavigate();
|
||||||
|
|
||||||
|
const onClickToNavigation = (tab: MerchantTabKeys) => {
|
||||||
|
if(activeTab !== tab){
|
||||||
|
if(tab === MerchantTabKeys.Info){
|
||||||
|
navigate(PATHS.merchant.info);
|
||||||
|
}
|
||||||
|
else if(tab === MerchantTabKeys.RegistrationStatus){
|
||||||
|
navigate(PATHS.merchant.registrationStatus);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return(
|
||||||
|
<>
|
||||||
|
<div className="subTab">
|
||||||
|
<button
|
||||||
|
className={`subtab-btn ${(activeTab === MerchantTabKeys.Info)? 'active': ''}` }
|
||||||
|
onClick={ () => onClickToNavigation(MerchantTabKeys.Info) }
|
||||||
|
>가맹점 정보</button>
|
||||||
|
<button
|
||||||
|
className={`subtab-btn ${(activeTab === MerchantTabKeys.RegistrationStatus)? 'active': ''}` }
|
||||||
|
onClick={ () => onClickToNavigation(MerchantTabKeys.RegistrationStatus) }
|
||||||
|
>등록현황</button>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -48,7 +48,7 @@ export const DataNotificationNotifyContent = ({
|
|||||||
if(!!openChild && openChild !== type){
|
if(!!openChild && openChild !== type){
|
||||||
setIsOpen(false);
|
setIsOpen(false);
|
||||||
}
|
}
|
||||||
}, [openChild])
|
}, [openChild]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -189,11 +189,11 @@ export interface AmountInfoWrapProps {
|
|||||||
};
|
};
|
||||||
export interface SettlementInfoWrapProps {
|
export interface SettlementInfoWrapProps {
|
||||||
settlementInfo?: SettlementInfo;
|
settlementInfo?: SettlementInfo;
|
||||||
show: boolean;
|
isOpen: boolean;
|
||||||
onClickToShowInfo: (infoWrapKey: InfoWrapKeys) => void;
|
onClickToShowInfo: (infoWrapKey: InfoWrapKeys) => void;
|
||||||
};
|
};
|
||||||
export interface TransactionInfoWrapProps {
|
export interface TransactionInfoWrapProps {
|
||||||
transactionInfo?: TransactionInfo;
|
transactionInfo?: TransactionInfo;
|
||||||
show: boolean;
|
isOpen: boolean;
|
||||||
onClickToShowInfo: (infoWrapKey: InfoWrapKeys) => void;
|
onClickToShowInfo: (infoWrapKey: InfoWrapKeys) => void;
|
||||||
};
|
};
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
import { useEffect, useState } from 'react';
|
|
||||||
import { IMAGE_ROOT } from '@/shared/constants/common';
|
|
||||||
import {
|
|
||||||
AltMsgKeys,
|
|
||||||
DetailArrowProps
|
|
||||||
} from '@/entities/common/model/types';
|
|
||||||
|
|
||||||
export const DetailArrow = ({ show }: DetailArrowProps) => {
|
|
||||||
const [altMsg, setAltMsg] = useState<AltMsgKeys>(AltMsgKeys.Fold);
|
|
||||||
const [className, setClassName] = useState<string>('ic20 rot-180');
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
setAltMsg((show)? AltMsgKeys.Fold: AltMsgKeys.UnFold);
|
|
||||||
setClassName(`ic20 ${(show)? 'rot-180': ''}`);
|
|
||||||
}, [show]);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<img
|
|
||||||
className={ className }
|
|
||||||
src={ IMAGE_ROOT + '/select_arrow.svg' }
|
|
||||||
alt={ altMsg }
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -70,6 +70,12 @@ export const AmountInfoWrap = ({
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
}
|
}
|
||||||
|
{ (periodType === SettlementPeriodType.TRANSACTION_DATE) &&
|
||||||
|
<ul className="kv-list">
|
||||||
|
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { NumericFormat } from 'react-number-format';
|
import { NumericFormat } from 'react-number-format';
|
||||||
import { DetailArrow } from '../detail-arrow';
|
import { SectionTitleArrow } from '@/entities/common/ui/section-title-arrow';
|
||||||
import SlideDown from 'react-slidedown';
|
import SlideDown from 'react-slidedown';
|
||||||
import 'react-slidedown/lib/slidedown.css';
|
import 'react-slidedown/lib/slidedown.css';
|
||||||
import {
|
import {
|
||||||
InfoWrapKeys,
|
InfoWrapKeys,
|
||||||
SettlementInfoWrapProps,
|
SettlementInfoWrapProps,
|
||||||
SettlementPeriodType
|
SettlementPeriodType
|
||||||
} from '@/entities/settlement/model/types';
|
} from '../../model/types';
|
||||||
|
|
||||||
export const SettlementInfoWrap = ({
|
export const SettlementInfoWrap = ({
|
||||||
settlementInfo,
|
settlementInfo,
|
||||||
show,
|
isOpen,
|
||||||
onClickToShowInfo
|
onClickToShowInfo
|
||||||
}: SettlementInfoWrapProps) => {
|
}: SettlementInfoWrapProps) => {
|
||||||
|
|
||||||
@@ -28,10 +28,10 @@ export const SettlementInfoWrap = ({
|
|||||||
className="section-title"
|
className="section-title"
|
||||||
onClick={ () => onClickToSetShowInfo() }
|
onClick={ () => onClickToSetShowInfo() }
|
||||||
>
|
>
|
||||||
정산 정보 <DetailArrow show={ show }></DetailArrow>
|
정산 정보 <SectionTitleArrow isOpen={ isOpen }></SectionTitleArrow>
|
||||||
</div>
|
</div>
|
||||||
<SlideDown className={'my-dropdown-slidedown'}>
|
<SlideDown className={'my-dropdown-slidedown'}>
|
||||||
{ show &&
|
{ isOpen &&
|
||||||
<ul className="kv-list">
|
<ul className="kv-list">
|
||||||
<li className="kv-row">
|
<li className="kv-row">
|
||||||
<span className="k">MID</span>
|
<span className="k">MID</span>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { DetailArrow } from '../detail-arrow';
|
import { SectionTitleArrow } from '@/entities/common/ui/section-title-arrow';
|
||||||
import SlideDown from 'react-slidedown';
|
import SlideDown from 'react-slidedown';
|
||||||
import 'react-slidedown/lib/slidedown.css';
|
import 'react-slidedown/lib/slidedown.css';
|
||||||
import {
|
import {
|
||||||
@@ -9,7 +9,7 @@ import {
|
|||||||
|
|
||||||
export const TransactionInfoWrap = ({
|
export const TransactionInfoWrap = ({
|
||||||
transactionInfo,
|
transactionInfo,
|
||||||
show,
|
isOpen,
|
||||||
onClickToShowInfo
|
onClickToShowInfo
|
||||||
}: TransactionInfoWrapProps) => {
|
}: TransactionInfoWrapProps) => {
|
||||||
|
|
||||||
@@ -26,10 +26,10 @@ export const TransactionInfoWrap = ({
|
|||||||
className="section-title"
|
className="section-title"
|
||||||
onClick={ () => onClickToSetShowInfo() }
|
onClick={ () => onClickToSetShowInfo() }
|
||||||
>
|
>
|
||||||
거래 상세 정보 <DetailArrow show={ show }></DetailArrow>
|
거래 상세 정보 <SectionTitleArrow isOpen={ isOpen }></SectionTitleArrow>
|
||||||
</div>
|
</div>
|
||||||
<SlideDown className={'my-dropdown-slidedown'}>
|
<SlideDown className={'my-dropdown-slidedown'}>
|
||||||
{ show &&
|
{ isOpen &&
|
||||||
<ul className="kv-list">
|
<ul className="kv-list">
|
||||||
<li className="kv-row">
|
<li className="kv-row">
|
||||||
<span className="k">주문번호</span>
|
<span className="k">주문번호</span>
|
||||||
|
|||||||
@@ -461,11 +461,11 @@ export interface BillingDetailResponse extends BillingInfo {
|
|||||||
|
|
||||||
export interface DetailInfoProps extends DetailResponse {
|
export interface DetailInfoProps extends DetailResponse {
|
||||||
transactionCategory?: TransactionCategory;
|
transactionCategory?: TransactionCategory;
|
||||||
show?: boolean;
|
isOpen?: boolean;
|
||||||
tid?: string;
|
tid?: string;
|
||||||
serviceCode?: string;
|
serviceCode?: string;
|
||||||
purposeType?: CashReceiptPurposeType;
|
purposeType?: CashReceiptPurposeType;
|
||||||
onClickToShowInfo?: (info: InfoWrapKeys) => void;
|
onClickToOpenInfo?: (info: InfoWrapKeys) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DownloadConfirmationParams {
|
export interface DownloadConfirmationParams {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { NumericFormat } from 'react-number-format';
|
import { NumericFormat } from 'react-number-format';
|
||||||
import { DetailArrow } from '../detail-arrow';
|
import { SectionTitleArrow } from '@/entities/common/ui/section-title-arrow';
|
||||||
import { useDownloadConfirmationMutation } from '../../api/use-download-confirmation-mutation';
|
import { useDownloadConfirmationMutation } from '../../api/use-download-confirmation-mutation';
|
||||||
import { InfoWrapKeys, DetailInfoProps } from '../../model/types';
|
import { InfoWrapKeys, DetailInfoProps } from '../../model/types';
|
||||||
import { SlideDown } from 'react-slidedown';
|
import { SlideDown } from 'react-slidedown';
|
||||||
@@ -9,10 +9,10 @@ import 'react-slidedown/lib/slidedown.css';
|
|||||||
export const AmountInfoWrap = ({
|
export const AmountInfoWrap = ({
|
||||||
transactionCategory,
|
transactionCategory,
|
||||||
amountInfo,
|
amountInfo,
|
||||||
show,
|
isOpen,
|
||||||
tid,
|
tid,
|
||||||
serviceCode,
|
serviceCode,
|
||||||
onClickToShowInfo
|
onClickToOpenInfo
|
||||||
}: DetailInfoProps) => {
|
}: DetailInfoProps) => {
|
||||||
const { mutateAsync: downloadConfirmation } = useDownloadConfirmationMutation();
|
const { mutateAsync: downloadConfirmation } = useDownloadConfirmationMutation();
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ export const AmountInfoWrap = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const showTop = ['01', '02', '03', '26'];
|
const showTop = ['01', '02', '03', '26'];
|
||||||
const showSubItems: Record<string, Array<string>> = {
|
const openSubItems: Record<string, Array<string>> = {
|
||||||
// 신용카드
|
// 신용카드
|
||||||
'01': ['mid', 'cardAmount', 'pointAmount',
|
'01': ['mid', 'cardAmount', 'pointAmount',
|
||||||
'couponAmount', 'escrowFee', 'kakaoMoney',
|
'couponAmount', 'escrowFee', 'kakaoMoney',
|
||||||
@@ -65,9 +65,9 @@ export const AmountInfoWrap = ({
|
|||||||
let newAmountInfo: Record<string, any> | undefined = amountInfo;
|
let newAmountInfo: Record<string, any> | undefined = amountInfo;
|
||||||
const subLi = () => {
|
const subLi = () => {
|
||||||
let rs = [];
|
let rs = [];
|
||||||
if(!!newAmountInfo && !!serviceCode && !!showSubItems[serviceCode]){
|
if(!!newAmountInfo && !!serviceCode && !!openSubItems[serviceCode]){
|
||||||
for(let i=0;i<showSubItems[serviceCode].length;i++){
|
for(let i=0;i<openSubItems[serviceCode].length;i++){
|
||||||
let k = showSubItems[serviceCode][i];
|
let k = openSubItems[serviceCode][i];
|
||||||
if(!!k){
|
if(!!k){
|
||||||
rs.push(
|
rs.push(
|
||||||
<li
|
<li
|
||||||
@@ -99,8 +99,8 @@ export const AmountInfoWrap = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const onClickToSetShowInfo = () => {
|
const onClickToSetShowInfo = () => {
|
||||||
if(!!onClickToShowInfo){
|
if(!!onClickToOpenInfo){
|
||||||
onClickToShowInfo(InfoWrapKeys.Amount);
|
onClickToOpenInfo(InfoWrapKeys.Amount);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -131,12 +131,12 @@ export const AmountInfoWrap = ({
|
|||||||
type="button"
|
type="button"
|
||||||
onClick={ () => onClickToSetShowInfo() }
|
onClick={ () => onClickToSetShowInfo() }
|
||||||
>
|
>
|
||||||
금액상세 <DetailArrow show={ show }></DetailArrow>
|
금액상세 <SectionTitleArrow isOpen={ isOpen }></SectionTitleArrow>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<SlideDown className={'my-dropdown-slidedown'}>
|
<SlideDown className={'my-dropdown-slidedown'}>
|
||||||
{ !!show &&
|
{ !!isOpen &&
|
||||||
<div className="amount-expand">
|
<div className="amount-expand">
|
||||||
<ul className="amount-list">
|
<ul className="amount-list">
|
||||||
{ subLi() }
|
{ subLi() }
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { DetailArrow } from '../detail-arrow';
|
import { SectionTitleArrow } from '@/entities/common/ui/section-title-arrow';
|
||||||
import { InfoWrapKeys, DetailInfoProps } from '../../model/types';
|
import { InfoWrapKeys, DetailInfoProps } from '../../model/types';
|
||||||
import { SlideDown } from 'react-slidedown';
|
import { SlideDown } from 'react-slidedown';
|
||||||
import 'react-slidedown/lib/slidedown.css';
|
import 'react-slidedown/lib/slidedown.css';
|
||||||
@@ -7,13 +7,13 @@ import 'react-slidedown/lib/slidedown.css';
|
|||||||
export const DetailInfoWrap = ({
|
export const DetailInfoWrap = ({
|
||||||
transactionCategory,
|
transactionCategory,
|
||||||
detailInfo,
|
detailInfo,
|
||||||
show,
|
isOpen,
|
||||||
onClickToShowInfo
|
onClickToOpenInfo
|
||||||
}: DetailInfoProps) => {
|
}: DetailInfoProps) => {
|
||||||
|
|
||||||
const onClickToSetShowInfo = () => {
|
const onClickToSetOpenInfo = () => {
|
||||||
if(!!onClickToShowInfo){
|
if(!!onClickToOpenInfo){
|
||||||
onClickToShowInfo(InfoWrapKeys.Issue);
|
onClickToOpenInfo(InfoWrapKeys.Issue);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -22,12 +22,12 @@ export const DetailInfoWrap = ({
|
|||||||
<div className="txn-section">
|
<div className="txn-section">
|
||||||
<div
|
<div
|
||||||
className="section-title with-toggle"
|
className="section-title with-toggle"
|
||||||
onClick={ () => onClickToSetShowInfo() }
|
onClick={ () => onClickToSetOpenInfo() }
|
||||||
>
|
>
|
||||||
상세 정보 <DetailArrow show={ show }></DetailArrow>
|
상세 정보 <SectionTitleArrow isOpen={ isOpen }></SectionTitleArrow>
|
||||||
</div>
|
</div>
|
||||||
<SlideDown className={'my-dropdown-slidedown'}>
|
<SlideDown className={'my-dropdown-slidedown'}>
|
||||||
{ !!show &&
|
{ !!isOpen &&
|
||||||
<ul className="kv-list">
|
<ul className="kv-list">
|
||||||
<li className="kv-row">
|
<li className="kv-row">
|
||||||
<span className="k">취소일자</span>
|
<span className="k">취소일자</span>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { DetailArrow } from '../detail-arrow';
|
import { SectionTitleArrow } from '@/entities/common/ui/section-title-arrow';
|
||||||
import { InfoWrapKeys, DetailInfoProps } from '../../model/types';
|
import { InfoWrapKeys, DetailInfoProps } from '../../model/types';
|
||||||
import { SlideDown } from 'react-slidedown';
|
import { SlideDown } from 'react-slidedown';
|
||||||
import 'react-slidedown/lib/slidedown.css';
|
import 'react-slidedown/lib/slidedown.css';
|
||||||
@@ -7,13 +7,13 @@ import 'react-slidedown/lib/slidedown.css';
|
|||||||
export const EscrowInfoWrap = ({
|
export const EscrowInfoWrap = ({
|
||||||
transactionCategory,
|
transactionCategory,
|
||||||
escrowInfo,
|
escrowInfo,
|
||||||
show,
|
isOpen,
|
||||||
onClickToShowInfo
|
onClickToOpenInfo
|
||||||
}: DetailInfoProps) => {
|
}: DetailInfoProps) => {
|
||||||
|
|
||||||
const onClickToSetShowInfo = () => {
|
const onClickToSetOpenInfo = () => {
|
||||||
if(!!onClickToShowInfo){
|
if(!!onClickToOpenInfo){
|
||||||
onClickToShowInfo(InfoWrapKeys.Escrow);
|
onClickToOpenInfo(InfoWrapKeys.Escrow);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -22,12 +22,12 @@ export const EscrowInfoWrap = ({
|
|||||||
<div className="txn-section">
|
<div className="txn-section">
|
||||||
<div
|
<div
|
||||||
className="section-title with-toggle"
|
className="section-title with-toggle"
|
||||||
onClick={ () => onClickToSetShowInfo() }
|
onClick={ () => onClickToSetOpenInfo() }
|
||||||
>
|
>
|
||||||
정산 정보 <DetailArrow show={ show }></DetailArrow>
|
정산 정보 <SectionTitleArrow isOpen={ isOpen }></SectionTitleArrow>
|
||||||
</div>
|
</div>
|
||||||
<SlideDown className={'my-dropdown-slidedown'}>
|
<SlideDown className={'my-dropdown-slidedown'}>
|
||||||
{ !!show &&
|
{ !!isOpen &&
|
||||||
<ul className="kv-list">
|
<ul className="kv-list">
|
||||||
<li className="kv-row">
|
<li className="kv-row">
|
||||||
<span className="k">배송상태</span>
|
<span className="k">배송상태</span>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export const ImportantInfoWrap = ({
|
|||||||
productName: {name: '상품명', type: 'string'}
|
productName: {name: '상품명', type: 'string'}
|
||||||
};
|
};
|
||||||
|
|
||||||
const showSubItems: Record<string, Array<string>> = {
|
const openSubItems: Record<string, Array<string>> = {
|
||||||
// 신용카드
|
// 신용카드
|
||||||
'01': ['ordNo', 'tid', 'tradeStatus', 'tradeMethod',
|
'01': ['ordNo', 'tid', 'tradeStatus', 'tradeMethod',
|
||||||
'approvalDate', 'cancelDate', 'productName'],
|
'approvalDate', 'cancelDate', 'productName'],
|
||||||
@@ -57,9 +57,9 @@ export const ImportantInfoWrap = ({
|
|||||||
const subLi = () => {
|
const subLi = () => {
|
||||||
let rs = [];
|
let rs = [];
|
||||||
|
|
||||||
if(!!newImportantInfo && !!serviceCode && !!showSubItems[serviceCode]){
|
if(!!newImportantInfo && !!serviceCode && !!openSubItems[serviceCode]){
|
||||||
for(let i=0;i<showSubItems[serviceCode].length;i++){
|
for(let i=0;i<openSubItems[serviceCode].length;i++){
|
||||||
let k = showSubItems[serviceCode][i];
|
let k = openSubItems[serviceCode][i];
|
||||||
if(!!k){
|
if(!!k){
|
||||||
rs.push(
|
rs.push(
|
||||||
<li
|
<li
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { DetailArrow } from '../detail-arrow';
|
import { SectionTitleArrow } from '@/entities/common/ui/section-title-arrow';
|
||||||
import { InfoWrapKeys, DetailInfoProps } from '../../model/types';
|
import { InfoWrapKeys, DetailInfoProps } from '../../model/types';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { NumericFormat } from 'react-number-format';
|
import { NumericFormat } from 'react-number-format';
|
||||||
import { DetailArrow } from '../detail-arrow';
|
import { SectionTitleArrow } from '@/entities/common/ui/section-title-arrow';
|
||||||
import { InfoWrapKeys, DetailInfoProps } from '../../model/types';
|
import { InfoWrapKeys, DetailInfoProps } from '../../model/types';
|
||||||
import { SlideDown } from 'react-slidedown';
|
import { SlideDown } from 'react-slidedown';
|
||||||
import 'react-slidedown/lib/slidedown.css';
|
import 'react-slidedown/lib/slidedown.css';
|
||||||
@@ -9,8 +9,8 @@ export const PartCancelInfoWrap = ({
|
|||||||
transactionCategory,
|
transactionCategory,
|
||||||
partCancelInfo,
|
partCancelInfo,
|
||||||
serviceCode,
|
serviceCode,
|
||||||
show,
|
isOpen,
|
||||||
onClickToShowInfo
|
onClickToOpenInfo
|
||||||
}: DetailInfoProps) => {
|
}: DetailInfoProps) => {
|
||||||
|
|
||||||
const subItems: Record<string, Record<string, string>> = {
|
const subItems: Record<string, Record<string, string>> = {
|
||||||
@@ -21,7 +21,7 @@ export const PartCancelInfoWrap = ({
|
|||||||
remainingAmount: {name: (serviceCode === '05')? '재승인 금액': '부분취소 후 잔액', type: 'number'},
|
remainingAmount: {name: (serviceCode === '05')? '재승인 금액': '부분취소 후 잔액', type: 'number'},
|
||||||
};
|
};
|
||||||
|
|
||||||
const showSubItems: Record<string, Array<string>> = {
|
const openSubItems: Record<string, Array<string>> = {
|
||||||
// 신용카드
|
// 신용카드
|
||||||
'01': ['originalTid', 'originalAmount', 'partCancelTid',
|
'01': ['originalTid', 'originalAmount', 'partCancelTid',
|
||||||
'partCancelAmount', 'remainingAmount'],
|
'partCancelAmount', 'remainingAmount'],
|
||||||
@@ -58,9 +58,9 @@ export const PartCancelInfoWrap = ({
|
|||||||
const subLi = () => {
|
const subLi = () => {
|
||||||
let rs = [];
|
let rs = [];
|
||||||
|
|
||||||
if(!!newPartCancelInfo && !!serviceCode && !!showSubItems[serviceCode]){
|
if(!!newPartCancelInfo && !!serviceCode && !!openSubItems[serviceCode]){
|
||||||
for(let i=0;i<showSubItems[serviceCode].length;i++){
|
for(let i=0;i<openSubItems[serviceCode].length;i++){
|
||||||
let k = showSubItems[serviceCode][i];
|
let k = openSubItems[serviceCode][i];
|
||||||
if(!!k){
|
if(!!k){
|
||||||
rs.push(
|
rs.push(
|
||||||
<li
|
<li
|
||||||
@@ -92,9 +92,9 @@ export const PartCancelInfoWrap = ({
|
|||||||
return rs;
|
return rs;
|
||||||
};
|
};
|
||||||
|
|
||||||
const onClickToSetShowInfo = () => {
|
const onClickToSetOpenInfo = () => {
|
||||||
if(!!onClickToShowInfo){
|
if(!!onClickToOpenInfo){
|
||||||
onClickToShowInfo(InfoWrapKeys.PartCancel);
|
onClickToOpenInfo(InfoWrapKeys.PartCancel);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -103,12 +103,12 @@ export const PartCancelInfoWrap = ({
|
|||||||
<div className="txn-section">
|
<div className="txn-section">
|
||||||
<div
|
<div
|
||||||
className="section-title with-toggle"
|
className="section-title with-toggle"
|
||||||
onClick={ () => onClickToSetShowInfo() }
|
onClick={ () => onClickToSetOpenInfo() }
|
||||||
>
|
>
|
||||||
부분취소 정보 <DetailArrow show={ show }></DetailArrow>
|
부분취소 정보 <SectionTitleArrow isOpen={ isOpen }></SectionTitleArrow>
|
||||||
</div>
|
</div>
|
||||||
<SlideDown className={'my-dropdown-slidedown'}>
|
<SlideDown className={'my-dropdown-slidedown'}>
|
||||||
{ !!show &&
|
{ !!isOpen &&
|
||||||
<ul className="kv-list">
|
<ul className="kv-list">
|
||||||
{ subLi() }
|
{ subLi() }
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { motion } from 'framer-motion';
|
import { SectionTitleArrow } from '@/entities/common/ui/section-title-arrow';
|
||||||
import { DetailArrow } from '../detail-arrow';
|
|
||||||
import { InfoWrapKeys, DetailInfoProps, TransactionCategory } from '../../model/types';
|
import { InfoWrapKeys, DetailInfoProps, TransactionCategory } from '../../model/types';
|
||||||
import { NumericFormat } from 'react-number-format';
|
import { NumericFormat } from 'react-number-format';
|
||||||
import { SlideDown } from 'react-slidedown';
|
import { SlideDown } from 'react-slidedown';
|
||||||
@@ -10,8 +9,8 @@ export const PaymentInfoWrap = ({
|
|||||||
transactionCategory,
|
transactionCategory,
|
||||||
paymentInfo,
|
paymentInfo,
|
||||||
serviceCode,
|
serviceCode,
|
||||||
show,
|
isOpen,
|
||||||
onClickToShowInfo
|
onClickToOpenInfo
|
||||||
}: DetailInfoProps) => {
|
}: DetailInfoProps) => {
|
||||||
|
|
||||||
const subItems: Record<string, Record<string, string>> = {
|
const subItems: Record<string, Record<string, string>> = {
|
||||||
@@ -49,7 +48,7 @@ export const PaymentInfoWrap = ({
|
|||||||
culturelandId: {name: '컬처랜드ID', type: 'string'},
|
culturelandId: {name: '컬처랜드ID', type: 'string'},
|
||||||
};
|
};
|
||||||
|
|
||||||
const showSubItems: Record<string, Array<string>> = {
|
const openSubItems: Record<string, Array<string>> = {
|
||||||
// 신용카드
|
// 신용카드
|
||||||
'01': ['approvalAcquire', 'approvalReturn', 'approvalReAcquire',
|
'01': ['approvalAcquire', 'approvalReturn', 'approvalReAcquire',
|
||||||
'approvalVAN', 'cancelAcquire', 'cancelReturn', 'cancelReAcquire',
|
'approvalVAN', 'cancelAcquire', 'cancelReturn', 'cancelReAcquire',
|
||||||
@@ -82,9 +81,9 @@ export const PaymentInfoWrap = ({
|
|||||||
const subLi = () => {
|
const subLi = () => {
|
||||||
let rs = [];
|
let rs = [];
|
||||||
|
|
||||||
if(!!newPaymentInfo && !!serviceCode && !!showSubItems[serviceCode]){
|
if(!!newPaymentInfo && !!serviceCode && !!openSubItems[serviceCode]){
|
||||||
for(let i=0;i<showSubItems[serviceCode].length;i++){
|
for(let i=0;i<openSubItems[serviceCode].length;i++){
|
||||||
let k = showSubItems[serviceCode][i];
|
let k = openSubItems[serviceCode][i];
|
||||||
if(!!k){
|
if(!!k){
|
||||||
rs.push(
|
rs.push(
|
||||||
<li
|
<li
|
||||||
@@ -116,9 +115,9 @@ export const PaymentInfoWrap = ({
|
|||||||
return rs;
|
return rs;
|
||||||
};
|
};
|
||||||
|
|
||||||
const onClickToSetShowInfo = () => {
|
const onClickToSetOpenInfo = () => {
|
||||||
if(!!onClickToShowInfo){
|
if(!!onClickToOpenInfo){
|
||||||
onClickToShowInfo(InfoWrapKeys.Payment);
|
onClickToOpenInfo(InfoWrapKeys.Payment);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -127,12 +126,12 @@ export const PaymentInfoWrap = ({
|
|||||||
<div className="txn-section">
|
<div className="txn-section">
|
||||||
<div
|
<div
|
||||||
className="section-title with-toggle"
|
className="section-title with-toggle"
|
||||||
onClick={ () => onClickToSetShowInfo() }
|
onClick={ () => onClickToSetOpenInfo() }
|
||||||
>
|
>
|
||||||
결제 정보 <DetailArrow show={ show }></DetailArrow>
|
결제 정보 <SectionTitleArrow isOpen={ isOpen }></SectionTitleArrow>
|
||||||
</div>
|
</div>
|
||||||
<SlideDown className={'my-dropdown-slidedown'}>
|
<SlideDown className={'my-dropdown-slidedown'}>
|
||||||
{ !!show &&
|
{ !!isOpen &&
|
||||||
<ul className="kv-list">
|
<ul className="kv-list">
|
||||||
{ (transactionCategory === TransactionCategory.AllTransaction) &&
|
{ (transactionCategory === TransactionCategory.AllTransaction) &&
|
||||||
subLi()
|
subLi()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { NumericFormat } from 'react-number-format';
|
import { NumericFormat } from 'react-number-format';
|
||||||
import { DetailArrow } from '../detail-arrow';
|
import { SectionTitleArrow } from '@/entities/common/ui/section-title-arrow';
|
||||||
import { InfoWrapKeys, DetailInfoProps } from '../../model/types';
|
import { InfoWrapKeys, DetailInfoProps } from '../../model/types';
|
||||||
import { SlideDown } from 'react-slidedown';
|
import { SlideDown } from 'react-slidedown';
|
||||||
import 'react-slidedown/lib/slidedown.css';
|
import 'react-slidedown/lib/slidedown.css';
|
||||||
@@ -9,8 +9,8 @@ export const SettlementInfoWrap = ({
|
|||||||
transactionCategory,
|
transactionCategory,
|
||||||
settlementInfo,
|
settlementInfo,
|
||||||
serviceCode,
|
serviceCode,
|
||||||
show,
|
isOpen,
|
||||||
onClickToShowInfo
|
onClickToOpenInfo
|
||||||
}: DetailInfoProps) => {
|
}: DetailInfoProps) => {
|
||||||
|
|
||||||
const subItems: Record<string, Record<string, string>> = {
|
const subItems: Record<string, Record<string, string>> = {
|
||||||
@@ -20,7 +20,7 @@ export const SettlementInfoWrap = ({
|
|||||||
cancelSettleAmount: {name: '취소정산금액', type: 'number'},
|
cancelSettleAmount: {name: '취소정산금액', type: 'number'},
|
||||||
};
|
};
|
||||||
|
|
||||||
const showSubItems: Record<string, Array<string>> = {
|
const openSubItems: Record<string, Array<string>> = {
|
||||||
// 신용카드
|
// 신용카드
|
||||||
'01': ['approvalSettleDate', 'approvalSettleAmount',
|
'01': ['approvalSettleDate', 'approvalSettleAmount',
|
||||||
'cancelSettleDate', 'cancelSettleAmount'],
|
'cancelSettleDate', 'cancelSettleAmount'],
|
||||||
@@ -57,9 +57,9 @@ export const SettlementInfoWrap = ({
|
|||||||
const subLi = () => {
|
const subLi = () => {
|
||||||
let rs = [];
|
let rs = [];
|
||||||
|
|
||||||
if(!!newSettlementInfo && !!serviceCode && !!showSubItems[serviceCode]){
|
if(!!newSettlementInfo && !!serviceCode && !!openSubItems[serviceCode]){
|
||||||
for(let i=0;i<showSubItems[serviceCode].length;i++){
|
for(let i=0;i<openSubItems[serviceCode].length;i++){
|
||||||
let k = showSubItems[serviceCode][i];
|
let k = openSubItems[serviceCode][i];
|
||||||
if(!!k){
|
if(!!k){
|
||||||
rs.push(
|
rs.push(
|
||||||
<li
|
<li
|
||||||
@@ -91,9 +91,9 @@ export const SettlementInfoWrap = ({
|
|||||||
return rs;
|
return rs;
|
||||||
};
|
};
|
||||||
|
|
||||||
const onClickToSetShowInfo = () => {
|
const onClickToSetOpenInfo = () => {
|
||||||
if(!!onClickToShowInfo){
|
if(!!onClickToOpenInfo){
|
||||||
onClickToShowInfo(InfoWrapKeys.Settlement);
|
onClickToOpenInfo(InfoWrapKeys.Settlement);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -102,12 +102,12 @@ export const SettlementInfoWrap = ({
|
|||||||
<div className="txn-section">
|
<div className="txn-section">
|
||||||
<div
|
<div
|
||||||
className="section-title with-toggle"
|
className="section-title with-toggle"
|
||||||
onClick={ () => onClickToSetShowInfo() }
|
onClick={ () => onClickToSetOpenInfo() }
|
||||||
>
|
>
|
||||||
정산 정보 <DetailArrow show={ show }></DetailArrow>
|
정산 정보 <SectionTitleArrow isOpen={ isOpen }></SectionTitleArrow>
|
||||||
</div>
|
</div>
|
||||||
<SlideDown className={'my-dropdown-slidedown'}>
|
<SlideDown className={'my-dropdown-slidedown'}>
|
||||||
{ !!show &&
|
{ !!isOpen &&
|
||||||
<ul className="kv-list">
|
<ul className="kv-list">
|
||||||
{ subLi() }
|
{ subLi() }
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { DetailArrow } from '../detail-arrow';
|
import { SectionTitleArrow } from '@/entities/common/ui/section-title-arrow';
|
||||||
import { InfoWrapKeys, DetailInfoProps, TransactionCategory } from '../../model/types';
|
import { InfoWrapKeys, DetailInfoProps, TransactionCategory } from '../../model/types';
|
||||||
import { NumericFormat } from 'react-number-format';
|
import { NumericFormat } from 'react-number-format';
|
||||||
import { SlideDown } from 'react-slidedown';
|
import { SlideDown } from 'react-slidedown';
|
||||||
@@ -9,8 +9,8 @@ export const TransactionInfoWrap = ({
|
|||||||
transactionCategory,
|
transactionCategory,
|
||||||
transactionInfo,
|
transactionInfo,
|
||||||
serviceCode,
|
serviceCode,
|
||||||
show,
|
isOpen,
|
||||||
onClickToShowInfo
|
onClickToOpenInfo
|
||||||
}: DetailInfoProps) => {
|
}: DetailInfoProps) => {
|
||||||
|
|
||||||
const subItems: Record<string, Record<string, string>> = {
|
const subItems: Record<string, Record<string, string>> = {
|
||||||
@@ -23,7 +23,7 @@ export const TransactionInfoWrap = ({
|
|||||||
cashReceiptIssue: {name: '현금영수증발행', type: 'string'},
|
cashReceiptIssue: {name: '현금영수증발행', type: 'string'},
|
||||||
};
|
};
|
||||||
|
|
||||||
const showSubItems: Record<string, Array<string>> = {
|
const openSubItems: Record<string, Array<string>> = {
|
||||||
// 신용카드
|
// 신용카드
|
||||||
'01': ['buyerName', 'email', 'phoneNumber', 'cancelReason',
|
'01': ['buyerName', 'email', 'phoneNumber', 'cancelReason',
|
||||||
'cancelRequestor', 'partialCancel'],
|
'cancelRequestor', 'partialCancel'],
|
||||||
@@ -60,9 +60,9 @@ export const TransactionInfoWrap = ({
|
|||||||
const subLi = () => {
|
const subLi = () => {
|
||||||
let rs = [];
|
let rs = [];
|
||||||
|
|
||||||
if(!!newTransactionInfo && !!serviceCode && !!showSubItems[serviceCode]){
|
if(!!newTransactionInfo && !!serviceCode && !!openSubItems[serviceCode]){
|
||||||
for(let i=0;i<showSubItems[serviceCode].length;i++){
|
for(let i=0;i<openSubItems[serviceCode].length;i++){
|
||||||
let k = showSubItems[serviceCode][i];
|
let k = openSubItems[serviceCode][i];
|
||||||
if(!!k){
|
if(!!k){
|
||||||
rs.push(
|
rs.push(
|
||||||
<li
|
<li
|
||||||
@@ -94,23 +94,23 @@ export const TransactionInfoWrap = ({
|
|||||||
return rs;
|
return rs;
|
||||||
};
|
};
|
||||||
|
|
||||||
const onClickToSetShowInfo = () => {
|
const onClickToSetOpenInfo = () => {
|
||||||
if(!!onClickToShowInfo){
|
if(!!onClickToOpenInfo){
|
||||||
onClickToShowInfo(InfoWrapKeys.Transaction);
|
onClickToOpenInfo(InfoWrapKeys.Transaction);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="txn-section" onClick={ () => onClickToSetShowInfo() }>
|
<div className="txn-section">
|
||||||
<div
|
<div
|
||||||
className="section-title with-toggle"
|
className="section-title with-toggle"
|
||||||
onClick={ () => onClickToSetShowInfo() }
|
onClick={ () => onClickToSetOpenInfo() }
|
||||||
>
|
>
|
||||||
거래 정보 <DetailArrow show={ show }></DetailArrow>
|
거래 정보 <SectionTitleArrow isOpen={ isOpen }></SectionTitleArrow>
|
||||||
</div>
|
</div>
|
||||||
<SlideDown className={'my-dropdown-slidedown'}>
|
<SlideDown className={'my-dropdown-slidedown'}>
|
||||||
{ !!show &&
|
{ !!isOpen &&
|
||||||
<ul className="kv-list">
|
<ul className="kv-list">
|
||||||
{ (transactionCategory === TransactionCategory.AllTransaction) &&
|
{ (transactionCategory === TransactionCategory.AllTransaction) &&
|
||||||
subLi()
|
subLi()
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { PATHS } from '@/shared/constants/paths';
|
import { PATHS } from '@/shared/constants/paths';
|
||||||
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
||||||
import { BusinessMemberTab } from '@/entities/business-member/ui/business-member-tab';
|
import { MerchantTab } from '@/entities/merchant/ui/merchant-tab';
|
||||||
import { InfoWrap } from '@/entities/business-member/ui/info-wrap';
|
import { InfoWrap } from '@/entities/merchant/ui/info-wrap';
|
||||||
import { BusinessMemberTabKeys } from '@/entities/business-member/model/types';
|
import { MerchantTabKeys } from '@/entities/merchant/model/types';
|
||||||
import { HeaderType } from '@/entities/common/model/types';
|
import { HeaderType } from '@/entities/common/model/types';
|
||||||
import {
|
import {
|
||||||
useSetHeaderTitle,
|
useSetHeaderTitle,
|
||||||
@@ -15,7 +15,7 @@ import {
|
|||||||
export const InfoPage = () => {
|
export const InfoPage = () => {
|
||||||
const { navigate } = useNavigate();
|
const { navigate } = useNavigate();
|
||||||
|
|
||||||
const [activeTab, setActiveTab] = useState<BusinessMemberTabKeys>(BusinessMemberTabKeys.Info);
|
const [activeTab, setActiveTab] = useState<MerchantTabKeys>(MerchantTabKeys.Info);
|
||||||
|
|
||||||
useSetHeaderTitle('가맹점 관리');
|
useSetHeaderTitle('가맹점 관리');
|
||||||
useSetHeaderType(HeaderType.LeftArrow);
|
useSetHeaderType(HeaderType.LeftArrow);
|
||||||
@@ -29,7 +29,7 @@ export const InfoPage = () => {
|
|||||||
<main>
|
<main>
|
||||||
<div className="tab-content">
|
<div className="tab-content">
|
||||||
<div className="tab-pane pt-46 active">
|
<div className="tab-pane pt-46 active">
|
||||||
<BusinessMemberTab activeTab={ activeTab }></BusinessMemberTab>
|
<MerchantTab activeTab={ activeTab }></MerchantTab>
|
||||||
<InfoWrap></InfoWrap>
|
<InfoWrap></InfoWrap>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -4,12 +4,12 @@ import { ROUTE_NAMES } from '@/shared/constants/route-names';
|
|||||||
import { InfoPage } from './info/info-page';
|
import { InfoPage } from './info/info-page';
|
||||||
import { RegistrationStatusPage } from './registration-status/registration-status-page';
|
import { RegistrationStatusPage } from './registration-status/registration-status-page';
|
||||||
|
|
||||||
export const BusinessMemberPages = () => {
|
export const MerchantPages = () => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<SentryRoutes>
|
<SentryRoutes>
|
||||||
<Route path={ROUTE_NAMES.businessMember.info} element={<InfoPage />} />
|
<Route path={ROUTE_NAMES.merchant.info} element={<InfoPage />} />
|
||||||
<Route path={ROUTE_NAMES.businessMember.registrationStatus} element={<RegistrationStatusPage />} />
|
<Route path={ROUTE_NAMES.merchant.registrationStatus} element={<RegistrationStatusPage />} />
|
||||||
</SentryRoutes>
|
</SentryRoutes>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { PATHS } from '@/shared/constants/paths';
|
import { PATHS } from '@/shared/constants/paths';
|
||||||
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
||||||
import { BusinessMemberTab } from '@/entities/business-member/ui/business-member-tab';
|
import { MerchantTab } from '@/entities/merchant/ui/merchant-tab';
|
||||||
import { RegistrationStatusWrap } from '@/entities/business-member/ui/registration-status-wrap';
|
import { RegistrationStatusWrap } from '@/entities/merchant/ui/registration-status-wrap';
|
||||||
import { BusinessMemberTabKeys } from '@/entities/business-member/model/types';
|
import { MerchantTabKeys } from '@/entities/merchant/model/types';
|
||||||
import { HeaderType } from '@/entities/common/model/types';
|
import { HeaderType } from '@/entities/common/model/types';
|
||||||
import {
|
import {
|
||||||
useSetHeaderTitle,
|
useSetHeaderTitle,
|
||||||
@@ -15,7 +15,7 @@ import {
|
|||||||
export const RegistrationStatusPage = () => {
|
export const RegistrationStatusPage = () => {
|
||||||
const { navigate } = useNavigate();
|
const { navigate } = useNavigate();
|
||||||
|
|
||||||
const [activeTab, setActiveTab] = useState<BusinessMemberTabKeys>(BusinessMemberTabKeys.RegistrationStatus);
|
const [activeTab, setActiveTab] = useState<MerchantTabKeys>(MerchantTabKeys.RegistrationStatus);
|
||||||
|
|
||||||
useSetHeaderTitle('가맹점 관리');
|
useSetHeaderTitle('가맹점 관리');
|
||||||
useSetHeaderType(HeaderType.LeftArrow);
|
useSetHeaderType(HeaderType.LeftArrow);
|
||||||
@@ -29,7 +29,7 @@ export const RegistrationStatusPage = () => {
|
|||||||
<main>
|
<main>
|
||||||
<div className="tab-content">
|
<div className="tab-content">
|
||||||
<div className="tab-pane pt-46 active">
|
<div className="tab-pane pt-46 active">
|
||||||
<BusinessMemberTab activeTab={ activeTab }></BusinessMemberTab>
|
<MerchantTab activeTab={ activeTab }></MerchantTab>
|
||||||
<RegistrationStatusWrap></RegistrationStatusWrap>
|
<RegistrationStatusWrap></RegistrationStatusWrap>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -146,14 +146,14 @@ export const DetailPage = () => {
|
|||||||
{ (periodType === SettlementPeriodType.SETTLEMENT_DATE) &&
|
{ (periodType === SettlementPeriodType.SETTLEMENT_DATE) &&
|
||||||
<SettlementInfoWrap
|
<SettlementInfoWrap
|
||||||
settlementInfo={ settlementInfo }
|
settlementInfo={ settlementInfo }
|
||||||
show={ showSettlement }
|
isOpen={ showSettlement }
|
||||||
onClickToShowInfo={ (infoWrapKey) => onClickToShowInfo(infoWrapKey) }
|
onClickToShowInfo={ (infoWrapKey) => onClickToShowInfo(infoWrapKey) }
|
||||||
></SettlementInfoWrap>
|
></SettlementInfoWrap>
|
||||||
}
|
}
|
||||||
{ (periodType === SettlementPeriodType.TRANSACTION_DATE) &&
|
{ (periodType === SettlementPeriodType.TRANSACTION_DATE) &&
|
||||||
<TransactionInfoWrap
|
<TransactionInfoWrap
|
||||||
transactionInfo={ transactionInfo }
|
transactionInfo={ transactionInfo }
|
||||||
show={ showTransaction }
|
isOpen={ showTransaction }
|
||||||
onClickToShowInfo={ (infoWrapKey) => onClickToShowInfo(infoWrapKey) }
|
onClickToShowInfo={ (infoWrapKey) => onClickToShowInfo(infoWrapKey) }
|
||||||
></TransactionInfoWrap>
|
></TransactionInfoWrap>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ export const AllTransactionDetailPage = () => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const onClickToShowInfo = (infoWrapKey: InfoWrapKeys) => {
|
const onClickToOpenInfo = (infoWrapKey: InfoWrapKeys) => {
|
||||||
if(infoWrapKey === InfoWrapKeys.Amount){
|
if(infoWrapKey === InfoWrapKeys.Amount){
|
||||||
setShowAmountInfo(!showAmountInfo);
|
setShowAmountInfo(!showAmountInfo);
|
||||||
}
|
}
|
||||||
@@ -136,10 +136,10 @@ export const AllTransactionDetailPage = () => {
|
|||||||
<AmountInfoWrap
|
<AmountInfoWrap
|
||||||
transactionCategory={ TransactionCategory.AllTransaction }
|
transactionCategory={ TransactionCategory.AllTransaction }
|
||||||
amountInfo={ amountInfo }
|
amountInfo={ amountInfo }
|
||||||
show={ showAmountInfo }
|
isOpen={ showAmountInfo }
|
||||||
tid={ tid }
|
tid={ tid }
|
||||||
serviceCode={ serviceCode }
|
serviceCode={ serviceCode }
|
||||||
onClickToShowInfo={ (infoWrapKey) => onClickToShowInfo(infoWrapKey) }
|
onClickToOpenInfo={ (infoWrapKey) => onClickToOpenInfo(infoWrapKey) }
|
||||||
></AmountInfoWrap>
|
></AmountInfoWrap>
|
||||||
<div className="txn-divider"></div>
|
<div className="txn-divider"></div>
|
||||||
<ImportantInfoWrap
|
<ImportantInfoWrap
|
||||||
@@ -152,32 +152,32 @@ export const AllTransactionDetailPage = () => {
|
|||||||
transactionCategory={ TransactionCategory.AllTransaction }
|
transactionCategory={ TransactionCategory.AllTransaction }
|
||||||
paymentInfo={ paymentInfo }
|
paymentInfo={ paymentInfo }
|
||||||
serviceCode={ serviceCode }
|
serviceCode={ serviceCode }
|
||||||
show={ showPaymentInfo }
|
isOpen={ showPaymentInfo }
|
||||||
onClickToShowInfo={ (infoWrapKey) => onClickToShowInfo(infoWrapKey) }
|
onClickToOpenInfo={ (infoWrapKey) => onClickToOpenInfo(infoWrapKey) }
|
||||||
></PaymentInfoWrap>
|
></PaymentInfoWrap>
|
||||||
<div className="txn-divider"></div>
|
<div className="txn-divider"></div>
|
||||||
<TransactionInfoWrap
|
<TransactionInfoWrap
|
||||||
transactionCategory={ TransactionCategory.AllTransaction }
|
transactionCategory={ TransactionCategory.AllTransaction }
|
||||||
transactionInfo={ transactionInfo }
|
transactionInfo={ transactionInfo }
|
||||||
serviceCode={ serviceCode }
|
serviceCode={ serviceCode }
|
||||||
show={ showTransactionInfo }
|
isOpen={ showTransactionInfo }
|
||||||
onClickToShowInfo={ (infoWrapKey) => onClickToShowInfo(infoWrapKey) }
|
onClickToOpenInfo={ (infoWrapKey) => onClickToOpenInfo(infoWrapKey) }
|
||||||
></TransactionInfoWrap>
|
></TransactionInfoWrap>
|
||||||
<div className="txn-divider"></div>
|
<div className="txn-divider"></div>
|
||||||
<SettlementInfoWrap
|
<SettlementInfoWrap
|
||||||
transactionCategory={ TransactionCategory.AllTransaction }
|
transactionCategory={ TransactionCategory.AllTransaction }
|
||||||
settlementInfo={ settlementInfo }
|
settlementInfo={ settlementInfo }
|
||||||
serviceCode={ serviceCode }
|
serviceCode={ serviceCode }
|
||||||
show={ showSettlementInfo }
|
isOpen={ showSettlementInfo }
|
||||||
onClickToShowInfo={ (infoWrapKey) => onClickToShowInfo(infoWrapKey) }
|
onClickToOpenInfo={ (infoWrapKey) => onClickToOpenInfo(infoWrapKey) }
|
||||||
></SettlementInfoWrap>
|
></SettlementInfoWrap>
|
||||||
<div className="txn-divider"></div>
|
<div className="txn-divider"></div>
|
||||||
<PartCancelInfoWrap
|
<PartCancelInfoWrap
|
||||||
transactionCategory={ TransactionCategory.AllTransaction }
|
transactionCategory={ TransactionCategory.AllTransaction }
|
||||||
partCancelInfo={ partCancelInfo }
|
partCancelInfo={ partCancelInfo }
|
||||||
serviceCode={ serviceCode }
|
serviceCode={ serviceCode }
|
||||||
show={ showPartCancelInfo }
|
isOpen={ showPartCancelInfo }
|
||||||
onClickToShowInfo={ (infoWrapKey) => onClickToShowInfo(infoWrapKey) }
|
onClickToOpenInfo={ (infoWrapKey) => onClickToOpenInfo(infoWrapKey) }
|
||||||
></PartCancelInfoWrap>
|
></PartCancelInfoWrap>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ export const CashReceiptDetailPage = () => {
|
|||||||
callDetail();
|
callDetail();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const onClickToShowInfo = (infoWrapKey: InfoWrapKeys) => {
|
const onClickToOpenInfo = (infoWrapKey: InfoWrapKeys) => {
|
||||||
if(infoWrapKey === InfoWrapKeys.Detail){
|
if(infoWrapKey === InfoWrapKeys.Detail){
|
||||||
setShowDetailInfo(!showDetailInfo);
|
setShowDetailInfo(!showDetailInfo);
|
||||||
}
|
}
|
||||||
@@ -102,8 +102,8 @@ export const CashReceiptDetailPage = () => {
|
|||||||
<DetailInfoWrap
|
<DetailInfoWrap
|
||||||
transactionCategory={ TransactionCategory.CashReceipt }
|
transactionCategory={ TransactionCategory.CashReceipt }
|
||||||
detailInfo={ detailInfo }
|
detailInfo={ detailInfo }
|
||||||
show={ showDetailInfo }
|
isOpen={ showDetailInfo }
|
||||||
onClickToShowInfo={ (infoWrapKey) => onClickToShowInfo(infoWrapKey) }
|
onClickToOpenInfo={ (infoWrapKey) => onClickToOpenInfo(infoWrapKey) }
|
||||||
></DetailInfoWrap>
|
></DetailInfoWrap>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ export const EscrowDetailPage = () => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const onClickToShowInfo = (infoWrapKey: InfoWrapKeys) => {
|
const onClickToOpenInfo = (infoWrapKey: InfoWrapKeys) => {
|
||||||
if(infoWrapKey === InfoWrapKeys.Amount){
|
if(infoWrapKey === InfoWrapKeys.Amount){
|
||||||
setShowAmountInfo(!showAmountInfo);
|
setShowAmountInfo(!showAmountInfo);
|
||||||
}
|
}
|
||||||
@@ -130,29 +130,29 @@ export const EscrowDetailPage = () => {
|
|||||||
<EscrowInfoWrap
|
<EscrowInfoWrap
|
||||||
transactionCategory={ TransactionCategory.Escrow }
|
transactionCategory={ TransactionCategory.Escrow }
|
||||||
importantInfo={ importantInfo }
|
importantInfo={ importantInfo }
|
||||||
show={ showEscroInfo }
|
isOpen={ showEscroInfo }
|
||||||
onClickToShowInfo={ (infoWrapKey) => onClickToShowInfo(infoWrapKey) }
|
onClickToOpenInfo={ (infoWrapKey) => onClickToOpenInfo(infoWrapKey) }
|
||||||
></EscrowInfoWrap>
|
></EscrowInfoWrap>
|
||||||
<div className="txn-divider minus"></div>
|
<div className="txn-divider minus"></div>
|
||||||
<PaymentInfoWrap
|
<PaymentInfoWrap
|
||||||
transactionCategory={ TransactionCategory.Escrow }
|
transactionCategory={ TransactionCategory.Escrow }
|
||||||
paymentInfo={ paymentInfo }
|
paymentInfo={ paymentInfo }
|
||||||
show={ showPaymentInfo }
|
isOpen={ showPaymentInfo }
|
||||||
onClickToShowInfo={ (infoWrapKey) => onClickToShowInfo(infoWrapKey) }
|
onClickToOpenInfo={ (infoWrapKey) => onClickToOpenInfo(infoWrapKey) }
|
||||||
></PaymentInfoWrap>
|
></PaymentInfoWrap>
|
||||||
<div className="txn-divider"></div>
|
<div className="txn-divider"></div>
|
||||||
<TransactionInfoWrap
|
<TransactionInfoWrap
|
||||||
transactionCategory={ TransactionCategory.Escrow }
|
transactionCategory={ TransactionCategory.Escrow }
|
||||||
transactionInfo={ transactionInfo }
|
transactionInfo={ transactionInfo }
|
||||||
show={ showTransactionInfo }
|
isOpen={ showTransactionInfo }
|
||||||
onClickToShowInfo={ (infoWrapKey) => onClickToShowInfo(infoWrapKey) }
|
onClickToOpenInfo={ (infoWrapKey) => onClickToOpenInfo(infoWrapKey) }
|
||||||
></TransactionInfoWrap>
|
></TransactionInfoWrap>
|
||||||
<div className="txn-divider"></div>
|
<div className="txn-divider"></div>
|
||||||
<SettlementInfoWrap
|
<SettlementInfoWrap
|
||||||
transactionCategory={ TransactionCategory.Escrow }
|
transactionCategory={ TransactionCategory.Escrow }
|
||||||
settlementInfo={ settlementInfo }
|
settlementInfo={ settlementInfo }
|
||||||
show={ showSettlementInfo }
|
isOpen={ showSettlementInfo }
|
||||||
onClickToShowInfo={ (infoWrapKey) => onClickToShowInfo(infoWrapKey) }
|
onClickToOpenInfo={ (infoWrapKey) => onClickToOpenInfo(infoWrapKey) }
|
||||||
></SettlementInfoWrap>
|
></SettlementInfoWrap>
|
||||||
<div className="txn-divider"></div>
|
<div className="txn-divider"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
16
src/shared/api/api-url-merchant.ts
Normal file
16
src/shared/api/api-url-merchant.ts
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
import {
|
||||||
|
API_BASE_URL,
|
||||||
|
API_URL_KEY,
|
||||||
|
} from './../constants/url';
|
||||||
|
|
||||||
|
/* nmsa-merchant-controller */
|
||||||
|
export const API_URL_MERCHANT = {
|
||||||
|
merchantMid: (mid: string) => {
|
||||||
|
// POST: 가맹점 정보 조회 API
|
||||||
|
return `${API_BASE_URL}/api/v1/${API_URL_KEY}/app/merchant/${mid}`;
|
||||||
|
},
|
||||||
|
merchantMidStatus: (mid: string) => {
|
||||||
|
// POST: 가맹점 등록 현황 조회 API
|
||||||
|
return `${API_BASE_URL}/api/v1/${API_URL_KEY}/app/merchant/${mid}/status`;
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -76,7 +76,7 @@ const lazyLoad = (path: string) => {
|
|||||||
const HomePage = lazyLoad('/src/pages/home/home-page');
|
const HomePage = lazyLoad('/src/pages/home/home-page');
|
||||||
const TransactionPages = lazyLoad('/src/pages/transaction/transaction-pages');
|
const TransactionPages = lazyLoad('/src/pages/transaction/transaction-pages');
|
||||||
const SettlementPages = lazyLoad('/src/pages/settlement/settlement-pages');
|
const SettlementPages = lazyLoad('/src/pages/settlement/settlement-pages');
|
||||||
const BusinessMemberPages = lazyLoad('/src/pages/business-member/business-member-pages');
|
const MerchantPages = lazyLoad('/src/pages/merchant/merchant-pages');
|
||||||
const PaymentPages = lazyLoad('/src/pages/payment/payment-pages');
|
const PaymentPages = lazyLoad('/src/pages/payment/payment-pages');
|
||||||
const AccountPages = lazyLoad('/src/pages/account/account-pages');
|
const AccountPages = lazyLoad('/src/pages/account/account-pages');
|
||||||
const TaxPages = lazyLoad('/src/pages/tax/tax-pages');
|
const TaxPages = lazyLoad('/src/pages/tax/tax-pages');
|
||||||
@@ -122,7 +122,7 @@ const Pages = () => {
|
|||||||
<Route path={ROUTE_NAMES.home} element={<HomePage />} />
|
<Route path={ROUTE_NAMES.home} element={<HomePage />} />
|
||||||
<Route path={ROUTE_NAMES.transaction.base} element={<TransactionPages />} />
|
<Route path={ROUTE_NAMES.transaction.base} element={<TransactionPages />} />
|
||||||
<Route path={ROUTE_NAMES.settlement.base} element={<SettlementPages />} />
|
<Route path={ROUTE_NAMES.settlement.base} element={<SettlementPages />} />
|
||||||
<Route path={ROUTE_NAMES.businessMember.base} element={<BusinessMemberPages />} />
|
<Route path={ROUTE_NAMES.merchant.base} element={<MerchantPages />} />
|
||||||
<Route path={ROUTE_NAMES.payment.base} element={<PaymentPages />} />
|
<Route path={ROUTE_NAMES.payment.base} element={<PaymentPages />} />
|
||||||
<Route path={ROUTE_NAMES.account.base} element={<AccountPages />} />
|
<Route path={ROUTE_NAMES.account.base} element={<AccountPages />} />
|
||||||
<Route path={ROUTE_NAMES.tax.base} element={<TaxPages />} />
|
<Route path={ROUTE_NAMES.tax.base} element={<TaxPages />} />
|
||||||
|
|||||||
@@ -77,10 +77,10 @@ export const PATHS: RouteNamesType = {
|
|||||||
list: generatePath(ROUTE_NAMES.settlement.base, ROUTE_NAMES.settlement.list),
|
list: generatePath(ROUTE_NAMES.settlement.base, ROUTE_NAMES.settlement.list),
|
||||||
detail: generatePath(ROUTE_NAMES.settlement.base, ROUTE_NAMES.settlement.detail),
|
detail: generatePath(ROUTE_NAMES.settlement.base, ROUTE_NAMES.settlement.detail),
|
||||||
},
|
},
|
||||||
businessMember: {
|
merchant: {
|
||||||
base: generatePath(ROUTE_NAMES.businessMember.base),
|
base: generatePath(ROUTE_NAMES.merchant.base),
|
||||||
info: generatePath(ROUTE_NAMES.businessMember.base, ROUTE_NAMES.businessMember.info),
|
info: generatePath(ROUTE_NAMES.merchant.base, ROUTE_NAMES.merchant.info),
|
||||||
registrationStatus: generatePath(ROUTE_NAMES.businessMember.base, ROUTE_NAMES.businessMember.registrationStatus),
|
registrationStatus: generatePath(ROUTE_NAMES.merchant.base, ROUTE_NAMES.merchant.registrationStatus),
|
||||||
},
|
},
|
||||||
payment: {
|
payment: {
|
||||||
base: generatePath(ROUTE_NAMES.payment.base),
|
base: generatePath(ROUTE_NAMES.payment.base),
|
||||||
|
|||||||
@@ -32,8 +32,8 @@ export const ROUTE_NAMES = {
|
|||||||
list: 'list',
|
list: 'list',
|
||||||
detail: 'detail/:detailId',
|
detail: 'detail/:detailId',
|
||||||
},
|
},
|
||||||
businessMember: {
|
merchant: {
|
||||||
base: '/business-member/*',
|
base: '/merchant/*',
|
||||||
info: 'info',
|
info: 'info',
|
||||||
registrationStatus: 'registration-status'
|
registrationStatus: 'registration-status'
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -49,8 +49,8 @@ export const Menu = ({
|
|||||||
category: '가맹점 관리',
|
category: '가맹점 관리',
|
||||||
categoryIcon: 'merchant-icon',
|
categoryIcon: 'merchant-icon',
|
||||||
items: [
|
items: [
|
||||||
{title: '가맹점 정보', path: PATHS.businessMember.info},
|
{title: '가맹점 정보', path: PATHS.merchant.info},
|
||||||
{title: '등록 현황', path: PATHS.businessMember.registrationStatus},
|
{title: '등록 현황', path: PATHS.merchant.registrationStatus},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
payment: {
|
payment: {
|
||||||
|
|||||||
Reference in New Issue
Block a user