가맹점 정보, 일부 상수 및 공용 변경
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { useState } from 'react';
|
||||
import { PATHS } from '@/shared/constants/paths';
|
||||
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
||||
import { BusinessMemberTab } from '@/entities/business-member/ui/business-member-tab';
|
||||
import { InfoWrap } from '@/entities/business-member/ui/info-wrap';
|
||||
import { BusinessMemberTabKeys } from '@/entities/business-member/model/types';
|
||||
import { MerchantTab } from '@/entities/merchant/ui/merchant-tab';
|
||||
import { InfoWrap } from '@/entities/merchant/ui/info-wrap';
|
||||
import { MerchantTabKeys } from '@/entities/merchant/model/types';
|
||||
import { HeaderType } from '@/entities/common/model/types';
|
||||
import {
|
||||
useSetHeaderTitle,
|
||||
@@ -15,7 +15,7 @@ import {
|
||||
export const InfoPage = () => {
|
||||
const { navigate } = useNavigate();
|
||||
|
||||
const [activeTab, setActiveTab] = useState<BusinessMemberTabKeys>(BusinessMemberTabKeys.Info);
|
||||
const [activeTab, setActiveTab] = useState<MerchantTabKeys>(MerchantTabKeys.Info);
|
||||
|
||||
useSetHeaderTitle('가맹점 관리');
|
||||
useSetHeaderType(HeaderType.LeftArrow);
|
||||
@@ -29,7 +29,7 @@ export const InfoPage = () => {
|
||||
<main>
|
||||
<div className="tab-content">
|
||||
<div className="tab-pane pt-46 active">
|
||||
<BusinessMemberTab activeTab={ activeTab }></BusinessMemberTab>
|
||||
<MerchantTab activeTab={ activeTab }></MerchantTab>
|
||||
<InfoWrap></InfoWrap>
|
||||
</div>
|
||||
</div>
|
||||
@@ -4,12 +4,12 @@ import { ROUTE_NAMES } from '@/shared/constants/route-names';
|
||||
import { InfoPage } from './info/info-page';
|
||||
import { RegistrationStatusPage } from './registration-status/registration-status-page';
|
||||
|
||||
export const BusinessMemberPages = () => {
|
||||
export const MerchantPages = () => {
|
||||
return (
|
||||
<>
|
||||
<SentryRoutes>
|
||||
<Route path={ROUTE_NAMES.businessMember.info} element={<InfoPage />} />
|
||||
<Route path={ROUTE_NAMES.businessMember.registrationStatus} element={<RegistrationStatusPage />} />
|
||||
<Route path={ROUTE_NAMES.merchant.info} element={<InfoPage />} />
|
||||
<Route path={ROUTE_NAMES.merchant.registrationStatus} element={<RegistrationStatusPage />} />
|
||||
</SentryRoutes>
|
||||
</>
|
||||
);
|
||||
@@ -1,9 +1,9 @@
|
||||
import { useState } from 'react';
|
||||
import { PATHS } from '@/shared/constants/paths';
|
||||
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
||||
import { BusinessMemberTab } from '@/entities/business-member/ui/business-member-tab';
|
||||
import { RegistrationStatusWrap } from '@/entities/business-member/ui/registration-status-wrap';
|
||||
import { BusinessMemberTabKeys } from '@/entities/business-member/model/types';
|
||||
import { MerchantTab } from '@/entities/merchant/ui/merchant-tab';
|
||||
import { RegistrationStatusWrap } from '@/entities/merchant/ui/registration-status-wrap';
|
||||
import { MerchantTabKeys } from '@/entities/merchant/model/types';
|
||||
import { HeaderType } from '@/entities/common/model/types';
|
||||
import {
|
||||
useSetHeaderTitle,
|
||||
@@ -15,7 +15,7 @@ import {
|
||||
export const RegistrationStatusPage = () => {
|
||||
const { navigate } = useNavigate();
|
||||
|
||||
const [activeTab, setActiveTab] = useState<BusinessMemberTabKeys>(BusinessMemberTabKeys.RegistrationStatus);
|
||||
const [activeTab, setActiveTab] = useState<MerchantTabKeys>(MerchantTabKeys.RegistrationStatus);
|
||||
|
||||
useSetHeaderTitle('가맹점 관리');
|
||||
useSetHeaderType(HeaderType.LeftArrow);
|
||||
@@ -29,7 +29,7 @@ export const RegistrationStatusPage = () => {
|
||||
<main>
|
||||
<div className="tab-content">
|
||||
<div className="tab-pane pt-46 active">
|
||||
<BusinessMemberTab activeTab={ activeTab }></BusinessMemberTab>
|
||||
<MerchantTab activeTab={ activeTab }></MerchantTab>
|
||||
<RegistrationStatusWrap></RegistrationStatusWrap>
|
||||
</div>
|
||||
</div>
|
||||
@@ -146,14 +146,14 @@ export const DetailPage = () => {
|
||||
{ (periodType === SettlementPeriodType.SETTLEMENT_DATE) &&
|
||||
<SettlementInfoWrap
|
||||
settlementInfo={ settlementInfo }
|
||||
show={ showSettlement }
|
||||
isOpen={ showSettlement }
|
||||
onClickToShowInfo={ (infoWrapKey) => onClickToShowInfo(infoWrapKey) }
|
||||
></SettlementInfoWrap>
|
||||
}
|
||||
{ (periodType === SettlementPeriodType.TRANSACTION_DATE) &&
|
||||
<TransactionInfoWrap
|
||||
transactionInfo={ transactionInfo }
|
||||
show={ showTransaction }
|
||||
isOpen={ showTransaction }
|
||||
onClickToShowInfo={ (infoWrapKey) => onClickToShowInfo(infoWrapKey) }
|
||||
></TransactionInfoWrap>
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ export const AllTransactionDetailPage = () => {
|
||||
});
|
||||
};
|
||||
|
||||
const onClickToShowInfo = (infoWrapKey: InfoWrapKeys) => {
|
||||
const onClickToOpenInfo = (infoWrapKey: InfoWrapKeys) => {
|
||||
if(infoWrapKey === InfoWrapKeys.Amount){
|
||||
setShowAmountInfo(!showAmountInfo);
|
||||
}
|
||||
@@ -136,10 +136,10 @@ export const AllTransactionDetailPage = () => {
|
||||
<AmountInfoWrap
|
||||
transactionCategory={ TransactionCategory.AllTransaction }
|
||||
amountInfo={ amountInfo }
|
||||
show={ showAmountInfo }
|
||||
isOpen={ showAmountInfo }
|
||||
tid={ tid }
|
||||
serviceCode={ serviceCode }
|
||||
onClickToShowInfo={ (infoWrapKey) => onClickToShowInfo(infoWrapKey) }
|
||||
onClickToOpenInfo={ (infoWrapKey) => onClickToOpenInfo(infoWrapKey) }
|
||||
></AmountInfoWrap>
|
||||
<div className="txn-divider"></div>
|
||||
<ImportantInfoWrap
|
||||
@@ -152,32 +152,32 @@ export const AllTransactionDetailPage = () => {
|
||||
transactionCategory={ TransactionCategory.AllTransaction }
|
||||
paymentInfo={ paymentInfo }
|
||||
serviceCode={ serviceCode }
|
||||
show={ showPaymentInfo }
|
||||
onClickToShowInfo={ (infoWrapKey) => onClickToShowInfo(infoWrapKey) }
|
||||
isOpen={ showPaymentInfo }
|
||||
onClickToOpenInfo={ (infoWrapKey) => onClickToOpenInfo(infoWrapKey) }
|
||||
></PaymentInfoWrap>
|
||||
<div className="txn-divider"></div>
|
||||
<TransactionInfoWrap
|
||||
transactionCategory={ TransactionCategory.AllTransaction }
|
||||
transactionInfo={ transactionInfo }
|
||||
serviceCode={ serviceCode }
|
||||
show={ showTransactionInfo }
|
||||
onClickToShowInfo={ (infoWrapKey) => onClickToShowInfo(infoWrapKey) }
|
||||
isOpen={ showTransactionInfo }
|
||||
onClickToOpenInfo={ (infoWrapKey) => onClickToOpenInfo(infoWrapKey) }
|
||||
></TransactionInfoWrap>
|
||||
<div className="txn-divider"></div>
|
||||
<SettlementInfoWrap
|
||||
transactionCategory={ TransactionCategory.AllTransaction }
|
||||
settlementInfo={ settlementInfo }
|
||||
serviceCode={ serviceCode }
|
||||
show={ showSettlementInfo }
|
||||
onClickToShowInfo={ (infoWrapKey) => onClickToShowInfo(infoWrapKey) }
|
||||
isOpen={ showSettlementInfo }
|
||||
onClickToOpenInfo={ (infoWrapKey) => onClickToOpenInfo(infoWrapKey) }
|
||||
></SettlementInfoWrap>
|
||||
<div className="txn-divider"></div>
|
||||
<PartCancelInfoWrap
|
||||
transactionCategory={ TransactionCategory.AllTransaction }
|
||||
partCancelInfo={ partCancelInfo }
|
||||
serviceCode={ serviceCode }
|
||||
show={ showPartCancelInfo }
|
||||
onClickToShowInfo={ (infoWrapKey) => onClickToShowInfo(infoWrapKey) }
|
||||
isOpen={ showPartCancelInfo }
|
||||
onClickToOpenInfo={ (infoWrapKey) => onClickToOpenInfo(infoWrapKey) }
|
||||
></PartCancelInfoWrap>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -76,7 +76,7 @@ export const CashReceiptDetailPage = () => {
|
||||
callDetail();
|
||||
}, []);
|
||||
|
||||
const onClickToShowInfo = (infoWrapKey: InfoWrapKeys) => {
|
||||
const onClickToOpenInfo = (infoWrapKey: InfoWrapKeys) => {
|
||||
if(infoWrapKey === InfoWrapKeys.Detail){
|
||||
setShowDetailInfo(!showDetailInfo);
|
||||
}
|
||||
@@ -102,8 +102,8 @@ export const CashReceiptDetailPage = () => {
|
||||
<DetailInfoWrap
|
||||
transactionCategory={ TransactionCategory.CashReceipt }
|
||||
detailInfo={ detailInfo }
|
||||
show={ showDetailInfo }
|
||||
onClickToShowInfo={ (infoWrapKey) => onClickToShowInfo(infoWrapKey) }
|
||||
isOpen={ showDetailInfo }
|
||||
onClickToOpenInfo={ (infoWrapKey) => onClickToOpenInfo(infoWrapKey) }
|
||||
></DetailInfoWrap>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -93,7 +93,7 @@ export const EscrowDetailPage = () => {
|
||||
});
|
||||
};
|
||||
|
||||
const onClickToShowInfo = (infoWrapKey: InfoWrapKeys) => {
|
||||
const onClickToOpenInfo = (infoWrapKey: InfoWrapKeys) => {
|
||||
if(infoWrapKey === InfoWrapKeys.Amount){
|
||||
setShowAmountInfo(!showAmountInfo);
|
||||
}
|
||||
@@ -130,29 +130,29 @@ export const EscrowDetailPage = () => {
|
||||
<EscrowInfoWrap
|
||||
transactionCategory={ TransactionCategory.Escrow }
|
||||
importantInfo={ importantInfo }
|
||||
show={ showEscroInfo }
|
||||
onClickToShowInfo={ (infoWrapKey) => onClickToShowInfo(infoWrapKey) }
|
||||
isOpen={ showEscroInfo }
|
||||
onClickToOpenInfo={ (infoWrapKey) => onClickToOpenInfo(infoWrapKey) }
|
||||
></EscrowInfoWrap>
|
||||
<div className="txn-divider minus"></div>
|
||||
<PaymentInfoWrap
|
||||
transactionCategory={ TransactionCategory.Escrow }
|
||||
paymentInfo={ paymentInfo }
|
||||
show={ showPaymentInfo }
|
||||
onClickToShowInfo={ (infoWrapKey) => onClickToShowInfo(infoWrapKey) }
|
||||
isOpen={ showPaymentInfo }
|
||||
onClickToOpenInfo={ (infoWrapKey) => onClickToOpenInfo(infoWrapKey) }
|
||||
></PaymentInfoWrap>
|
||||
<div className="txn-divider"></div>
|
||||
<TransactionInfoWrap
|
||||
transactionCategory={ TransactionCategory.Escrow }
|
||||
transactionInfo={ transactionInfo }
|
||||
show={ showTransactionInfo }
|
||||
onClickToShowInfo={ (infoWrapKey) => onClickToShowInfo(infoWrapKey) }
|
||||
isOpen={ showTransactionInfo }
|
||||
onClickToOpenInfo={ (infoWrapKey) => onClickToOpenInfo(infoWrapKey) }
|
||||
></TransactionInfoWrap>
|
||||
<div className="txn-divider"></div>
|
||||
<SettlementInfoWrap
|
||||
transactionCategory={ TransactionCategory.Escrow }
|
||||
settlementInfo={ settlementInfo }
|
||||
show={ showSettlementInfo }
|
||||
onClickToShowInfo={ (infoWrapKey) => onClickToShowInfo(infoWrapKey) }
|
||||
isOpen={ showSettlementInfo }
|
||||
onClickToOpenInfo={ (infoWrapKey) => onClickToOpenInfo(infoWrapKey) }
|
||||
></SettlementInfoWrap>
|
||||
<div className="txn-divider"></div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user