가맹점 정보, 일부 상수 및 공용 변경

This commit is contained in:
focp212@naver.com
2025-09-18 14:52:27 +09:00
parent 2910b20974
commit 9ba7bdd3e4
50 changed files with 623 additions and 748 deletions

View File

@@ -1,6 +1,6 @@
import moment from 'moment';
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 { SlideDown } from 'react-slidedown';
import 'react-slidedown/lib/slidedown.css';
@@ -9,8 +9,8 @@ export const PartCancelInfoWrap = ({
transactionCategory,
partCancelInfo,
serviceCode,
show,
onClickToShowInfo
isOpen,
onClickToOpenInfo
}: DetailInfoProps) => {
const subItems: Record<string, Record<string, string>> = {
@@ -21,7 +21,7 @@ export const PartCancelInfoWrap = ({
remainingAmount: {name: (serviceCode === '05')? '재승인 금액': '부분취소 후 잔액', type: 'number'},
};
const showSubItems: Record<string, Array<string>> = {
const openSubItems: Record<string, Array<string>> = {
// 신용카드
'01': ['originalTid', 'originalAmount', 'partCancelTid',
'partCancelAmount', 'remainingAmount'],
@@ -58,9 +58,9 @@ export const PartCancelInfoWrap = ({
const subLi = () => {
let rs = [];
if(!!newPartCancelInfo && !!serviceCode && !!showSubItems[serviceCode]){
for(let i=0;i<showSubItems[serviceCode].length;i++){
let k = showSubItems[serviceCode][i];
if(!!newPartCancelInfo && !!serviceCode && !!openSubItems[serviceCode]){
for(let i=0;i<openSubItems[serviceCode].length;i++){
let k = openSubItems[serviceCode][i];
if(!!k){
rs.push(
<li
@@ -92,9 +92,9 @@ export const PartCancelInfoWrap = ({
return rs;
};
const onClickToSetShowInfo = () => {
if(!!onClickToShowInfo){
onClickToShowInfo(InfoWrapKeys.PartCancel);
const onClickToSetOpenInfo = () => {
if(!!onClickToOpenInfo){
onClickToOpenInfo(InfoWrapKeys.PartCancel);
}
};
@@ -103,12 +103,12 @@ export const PartCancelInfoWrap = ({
<div className="txn-section">
<div
className="section-title with-toggle"
onClick={ () => onClickToSetShowInfo() }
onClick={ () => onClickToSetOpenInfo() }
>
<DetailArrow show={ show }></DetailArrow>
<SectionTitleArrow isOpen={ isOpen }></SectionTitleArrow>
</div>
<SlideDown className={'my-dropdown-slidedown'}>
{ !!show &&
{ !!isOpen &&
<ul className="kv-list">
{ subLi() }
</ul>