가맹점 정보, 일부 상수 및 공용 변경
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user