- 자금이체 입금확인증 다운로드 API 추가
- 분리승인 누락 CSS 추가 - 알림톡 리스트 수정
This commit is contained in:
@@ -21,12 +21,12 @@ export enum AlimtalkAlimCl {
|
||||
CANCEL = 'CANCEL'
|
||||
};
|
||||
export enum AlimtalkSendType {
|
||||
ALL = 'ALL',
|
||||
ALL = '',
|
||||
KAKAOTALK = 'KAKAOTALK',
|
||||
FB_SMS = 'FB_SMS'
|
||||
};
|
||||
export enum AlimTalkSendCl {
|
||||
ALL = 'ALL',
|
||||
ALL = '',
|
||||
REQUEST = 'REQUEST',
|
||||
SUCCESS = 'SUCCESS',
|
||||
FAIL = 'FAIL'
|
||||
@@ -73,7 +73,7 @@ export interface ExtensionAlimtalkListParams {
|
||||
mid?: string;
|
||||
searchCl?: AlimtalkSearchCl;
|
||||
searchValue?: string;
|
||||
paymentMethod?: string;
|
||||
serviceCode?: string;
|
||||
alimCl?: AlimtalkAlimCl;
|
||||
fromDate?: string;
|
||||
toDate?: string;
|
||||
@@ -90,7 +90,7 @@ export interface AlimtalkListContent {
|
||||
alimCl?: AlimtalkAlimCl;
|
||||
sendType?: AlimtalkSendType;
|
||||
sendCl?: AlimTalkSendCl;
|
||||
paymentMethod?: string;
|
||||
serviceCode?: string;
|
||||
receiverName?: string;
|
||||
};
|
||||
export interface ExtensionAlimtalkDownloadExcelParams {
|
||||
|
||||
@@ -184,4 +184,14 @@ export interface ExtensionFundAccountBalanceParams {
|
||||
};
|
||||
export interface ExtensionFundAccountBalanceResponse {
|
||||
balance: number;
|
||||
};
|
||||
|
||||
// 입금확인증 다운로드
|
||||
export interface ExtensionFundAccountDownloadCertificateParams {
|
||||
mid: string;
|
||||
tid: string;
|
||||
email: string;
|
||||
};
|
||||
export interface ExtensionFundAccountDownloadCertificateResponse {
|
||||
status: boolean;
|
||||
};
|
||||
@@ -87,5 +87,5 @@ export interface ExtensionKeyinApplyParams extends ExtensionRequestParams {
|
||||
}
|
||||
|
||||
export interface ExtensionKeyinApplyResponse {
|
||||
|
||||
status: boolean;
|
||||
}
|
||||
@@ -1,20 +1,20 @@
|
||||
import { PATHS } from '@/shared/constants/paths';
|
||||
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
||||
import { HeaderType, SortTypeKeys } from '@/entities/common/model/types';
|
||||
import { DefaultRequestPagination, HeaderType, SortTypeKeys } from '@/entities/common/model/types';
|
||||
import { IMAGE_ROOT } from '@/shared/constants/common';
|
||||
import {
|
||||
import {
|
||||
useSetHeaderTitle,
|
||||
useSetHeaderType,
|
||||
useSetFooterMode,
|
||||
useSetOnBack
|
||||
} from '@/widgets/sub-layout/use-sub-layout';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { JSX, useEffect, useState } from 'react';
|
||||
import { DEFAULT_PAGE_PARAM } from '@/entities/common/model/constant';
|
||||
import {
|
||||
import {
|
||||
AlimtalkAlimCl,
|
||||
AlimtalkListContent,
|
||||
AlimtalkSearchCl,
|
||||
AlimTalkSendCl,
|
||||
AlimtalkListContent,
|
||||
AlimtalkSearchCl,
|
||||
AlimTalkSendCl,
|
||||
AlimtalkSendType,
|
||||
ExtensionAlimtalkDownloadExcelParams,
|
||||
ExtensionAlimtalkDownloadExcelResponse,
|
||||
@@ -27,15 +27,37 @@ import { useExtensionAlimtalkDownloadExcelMutation } from '@/entities/additional
|
||||
import { ListDateGroup } from '@/entities/additional-service/ui/list-date-group';
|
||||
import { AdditionalServiceCategory } from '@/entities/additional-service/model/types';
|
||||
import { useStore } from '@/shared/model/store';
|
||||
import useIntersectionObserver from '@/widgets/intersection-observer';
|
||||
|
||||
export const AlimtalkListPage = () => {
|
||||
const { navigate } = useNavigate();
|
||||
const userMid = useStore.getState().UserStore.mid;
|
||||
|
||||
const [onActionIntersect, setOnActionIntersect] = useState<boolean>(false);
|
||||
const onIntersect: IntersectionObserverCallback = (entries: Array<IntersectionObserverEntry>) => {
|
||||
entries.forEach((entry: IntersectionObserverEntry) => {
|
||||
if (entry.isIntersecting) {
|
||||
console.log('Element is now intersecting with the root. [' + onActionIntersect + ']');
|
||||
if (onActionIntersect) {
|
||||
callList();
|
||||
}
|
||||
}
|
||||
else {
|
||||
console.log('Element is no longer intersecting with the root.');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const { setTarget } = useIntersectionObserver({
|
||||
threshold: 1,
|
||||
onIntersect
|
||||
});
|
||||
|
||||
const [sortType, setSortType] = useState<SortTypeKeys>(SortTypeKeys.LATEST);
|
||||
const [listItems, setListItems] = useState<Record<string, Array<AlimtalkListContent>>>({});
|
||||
const [listItems, setListItems] = useState<Array<AlimtalkListContent>>([]);
|
||||
const [filterOn, setFilterOn] = useState<boolean>(false);
|
||||
const [pageParam, setPageParam] = useState(DEFAULT_PAGE_PARAM);
|
||||
const [nextCursor, setNextCursor] = useState<string | null>(null);
|
||||
const [pageParam, setPageParam] = useState<DefaultRequestPagination>(DEFAULT_PAGE_PARAM);
|
||||
const [mid, setMid] = useState<string>(userMid);
|
||||
const [searchCl, setSearchCl] = useState<AlimtalkSearchCl>(AlimtalkSearchCl.BUYER_NAME);
|
||||
const [searchValue, setSearchValue] = useState<string>();
|
||||
@@ -45,7 +67,7 @@ export const AlimtalkListPage = () => {
|
||||
const [toDate, setToDate] = useState<string>(moment().format('YYYYMMDD'));
|
||||
const [sendType, setSendType] = useState<AlimtalkSendType>(AlimtalkSendType.ALL);
|
||||
const [sendCl, setSendCl] = useState<AlimTalkSendCl>(AlimTalkSendCl.ALL);
|
||||
|
||||
|
||||
const { mutateAsync: extensionAlimtalkList } = useExtensionAlimtalkListMutation();
|
||||
const { mutateAsync: extensionAlimtalkDownloadExcel } = useExtensionAlimtalkDownloadExcelMutation();
|
||||
|
||||
@@ -57,25 +79,44 @@ export const AlimtalkListPage = () => {
|
||||
});
|
||||
|
||||
const callList = (option?: {
|
||||
sortType?: SortTypeKeys,
|
||||
val?: string
|
||||
sortType?: SortTypeKeys,
|
||||
resetPage?: boolean
|
||||
}) => {
|
||||
pageParam.sortType = (option?.sortType)? option.sortType: sortType;
|
||||
setPageParam(pageParam);
|
||||
setOnActionIntersect(false);
|
||||
|
||||
const currentPageParam = option?.resetPage
|
||||
? { ...DEFAULT_PAGE_PARAM, sortType: option?.sortType ?? sortType }
|
||||
: { ...pageParam, sortType: option?.sortType ?? sortType };
|
||||
|
||||
setPageParam(currentPageParam);
|
||||
|
||||
let params: ExtensionAlimtalkListParams = {
|
||||
mid: mid,
|
||||
searchCl: searchCl,
|
||||
searchValue: searchValue,
|
||||
paymentMethod: paymentMethod,
|
||||
serviceCode: paymentMethod,
|
||||
fromDate: fromDate,
|
||||
toDate: toDate,
|
||||
sendType: sendType,
|
||||
sendCl: sendCl,
|
||||
page: pageParam
|
||||
page: currentPageParam
|
||||
};
|
||||
extensionAlimtalkList(params).then((rs: ExtensionAlimtalkListResponse) => {
|
||||
setListItems(assembleData(rs.content));
|
||||
setListItems(option?.resetPage ? rs.content : [
|
||||
...listItems,
|
||||
...rs.content
|
||||
]);
|
||||
if (rs.hasNext) {
|
||||
setNextCursor(rs.nextCursor);
|
||||
setPageParam({
|
||||
...currentPageParam,
|
||||
cursor: rs.nextCursor
|
||||
});
|
||||
setOnActionIntersect(true);
|
||||
}
|
||||
else {
|
||||
setNextCursor(null);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -96,23 +137,6 @@ export const AlimtalkListPage = () => {
|
||||
});
|
||||
};
|
||||
|
||||
const assembleData = (content: Array<AlimtalkListContent>) => {
|
||||
let data: any = {};
|
||||
if(content && content.length > 0){
|
||||
for(let i=0;i<content?.length;i++){
|
||||
let date = content[i]?.sendDate?.substring(0, 8);
|
||||
let groupDate = moment(date).format('YYYYMMDD');
|
||||
if(!!groupDate && !data.hasOwnProperty(groupDate)){
|
||||
data[groupDate] = [];
|
||||
}
|
||||
if(!!groupDate && data.hasOwnProperty(groupDate)){
|
||||
data[groupDate].push(content[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return data;
|
||||
};
|
||||
|
||||
const onClickToNavigate = () => {
|
||||
navigate(PATHS.additionalService.alimtalk.setting);
|
||||
};
|
||||
@@ -123,26 +147,61 @@ export const AlimtalkListPage = () => {
|
||||
setFilterOn(!filterOn);
|
||||
};
|
||||
const getAlimtalkList = () => {
|
||||
let rs = [];
|
||||
if(Object.keys(listItems).length > 0){
|
||||
for(const [key, value] of Object.entries(listItems)){
|
||||
rs.push(
|
||||
<ListDateGroup
|
||||
additionalServiceCategory={ AdditionalServiceCategory.Alimtalk }
|
||||
mid={ mid }
|
||||
key={ key }
|
||||
date={ key }
|
||||
items={ value }
|
||||
></ListDateGroup>
|
||||
);
|
||||
let rs: JSX.Element[] = [];
|
||||
let date = '';
|
||||
let list: AlimtalkListContent[] = [];
|
||||
for (let i = 0; i < listItems.length; i++) {
|
||||
// sendDate format: "20211018140420" (YYYYMMDDHHmmss)
|
||||
let sendDate = listItems[i]?.sendDate || '';
|
||||
let itemDate = sendDate.substring(0, 8);
|
||||
if (i === 0) {
|
||||
date = itemDate;
|
||||
}
|
||||
if (date !== itemDate) {
|
||||
// 날짜가 바뀌면 이전 리스트를 푸시
|
||||
if (list.length > 0) {
|
||||
rs.push(
|
||||
<ListDateGroup
|
||||
additionalServiceCategory={AdditionalServiceCategory.Alimtalk}
|
||||
mid={mid}
|
||||
key={date + '-' + i}
|
||||
date={date}
|
||||
items={list as any}
|
||||
></ListDateGroup>
|
||||
);
|
||||
}
|
||||
date = itemDate;
|
||||
list = [];
|
||||
}
|
||||
list.push(listItems[i] as any);
|
||||
}
|
||||
if (list.length > 0) {
|
||||
rs.push(
|
||||
<ListDateGroup
|
||||
additionalServiceCategory={AdditionalServiceCategory.Alimtalk}
|
||||
mid={mid}
|
||||
key={date + '-last'}
|
||||
date={date}
|
||||
items={list as any}
|
||||
></ListDateGroup>
|
||||
);
|
||||
}
|
||||
return rs;
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
callList();
|
||||
}, []);
|
||||
// 필터 조건이 변경되면 첫 페이지부터 다시 시작
|
||||
callList({ resetPage: true });
|
||||
}, [
|
||||
mid,
|
||||
searchCl,
|
||||
searchValue,
|
||||
paymentMethod,
|
||||
fromDate,
|
||||
toDate,
|
||||
sendType,
|
||||
sendCl
|
||||
]);
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -184,6 +243,7 @@ export const AlimtalkListPage = () => {
|
||||
|
||||
<section className="transaction-list">
|
||||
{ getAlimtalkList() }
|
||||
<div ref={setTarget}></div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -209,4 +209,8 @@ export const API_URL_ADDITIONAL_SERVICE = {
|
||||
// POST: 자금이체 이체내역 목록 조회
|
||||
return `${API_BASE_URL}/api/v1/${API_URL_KEY}/extension/fund-account/balance`;
|
||||
},
|
||||
extensionFundAccountDownloadReceipt: () => {
|
||||
// POST: 자금이체 > 입금확인증 다운로드
|
||||
return `${API_BASE_URL}/api/v1/${API_URL_KEY}/extension/fund-account/result/receipt`;
|
||||
},
|
||||
};
|
||||
@@ -145,4 +145,222 @@ main.home-main{
|
||||
text-overflow: ellipsis;
|
||||
overflow-x: hidden;
|
||||
width: calc(100% - 18px);
|
||||
}
|
||||
}
|
||||
|
||||
.separate-approval-main {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.separate-approval-main .tab-content {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.separate-approval-main .tab-pane.sub.active {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.separate-approval-section {
|
||||
padding: 0;
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.approval-cards-wrapper {
|
||||
gap: 16px;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
|
||||
.separate-approval-main .apply-row.two-button {
|
||||
flex-shrink: 0;
|
||||
position: sticky;
|
||||
bottom: 0;
|
||||
background: white;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
/* 분할승인 안내 박스 */
|
||||
.approval-notice-box {
|
||||
background: var(--color-white);
|
||||
padding: 8px;
|
||||
margin-bottom: 16px;
|
||||
border-radius: 12px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.approval-notice-box p {
|
||||
font-size: var(--fs-15);
|
||||
color: var(--color-666666);
|
||||
line-height: 1.5;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.approval-notice-box p + p {
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
/* 분할승인 카드 */
|
||||
.approval-card {
|
||||
position: relative;
|
||||
background: var(--color-white);
|
||||
border: 2px solid var(--color-d6d6d6);
|
||||
border-radius: 16px;
|
||||
padding: 16px;
|
||||
margin-bottom: 16px;
|
||||
transition: all 0.4s ease;
|
||||
}
|
||||
|
||||
.approval-card.selected {
|
||||
border-color: var(--color-3E6AFC);
|
||||
background: var(--color-F4F8FF);
|
||||
}
|
||||
|
||||
.approval-card .card-checkbox {
|
||||
display: block !important;
|
||||
position: absolute;
|
||||
top: 16px;
|
||||
left: 16px;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
appearance: none;
|
||||
border: 2px solid var(--color-d6d6d6);
|
||||
border-radius: 5px;
|
||||
background-color: var(--color-white);
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
box-sizing: border-box;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.approval-card .card-checkbox:focus,
|
||||
.approval-card .card-checkbox:active {
|
||||
outline: none !important;
|
||||
box-shadow: none !important;
|
||||
border-color: var(--color-d6d6d6);
|
||||
}
|
||||
|
||||
.approval-card .card-checkbox:checked {
|
||||
background-color: var(--color-3E6AFC);
|
||||
border-color: var(--color-3E6AFC);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.approval-card .card-checkbox:checked::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 5px;
|
||||
top: 2px;
|
||||
width: 6px;
|
||||
height: 11px;
|
||||
border: solid white;
|
||||
border-width: 0 2px 2px 0;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
/* 분할승인 카드 헤더 */
|
||||
.approval-card .card-header {
|
||||
gap: 8px;
|
||||
margin-bottom: 16px;
|
||||
padding-bottom: 12px;
|
||||
padding-left: 36px;
|
||||
border-bottom: 1px solid var(--color-E6E6E6);
|
||||
}
|
||||
|
||||
.approval-card .card-tag {
|
||||
font-size: var(--fs-14);
|
||||
font-weight: var(--fw-700);
|
||||
padding: 2px 8px;
|
||||
border-radius: 4px;
|
||||
color: var(--color-666666);
|
||||
background: var(--color-F3F3F3);
|
||||
transition: all 0.4s ease;
|
||||
}
|
||||
|
||||
.approval-card .card-tag.main-tag {
|
||||
color: var(--color-3E6AFC);
|
||||
background: var(--color-E9F1FB);
|
||||
}
|
||||
|
||||
.approval-card.selected .card-tag {
|
||||
color: var(--color-3E6AFC);
|
||||
background: var(--color-E9F1FB);
|
||||
}
|
||||
|
||||
.approval-card .card-tid {
|
||||
font-size: var(--fs-16);
|
||||
color: var(--color-2D3436);
|
||||
font-weight: var(--fw-500);
|
||||
}
|
||||
|
||||
/* 분할승인 카드 바디 */
|
||||
.approval-card .card-body {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.approval-card .info-list {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.approval-card .info-list li {
|
||||
align-items: center;
|
||||
font-size: var(--fs-14);
|
||||
color: var(--color-2D3436);
|
||||
}
|
||||
|
||||
.approval-card .info-list .label {
|
||||
min-width: 85px;
|
||||
color: var(--color-666666);
|
||||
font-weight: var(--fw-400);
|
||||
}
|
||||
|
||||
.approval-card .info-list .value {
|
||||
font-weight: var(--fw-500);
|
||||
}
|
||||
|
||||
/* 분할승인 카드 푸터 */
|
||||
.approval-card .card-footer {
|
||||
padding-top: 12px;
|
||||
border-top: 1px solid var(--color-E5E5E5);
|
||||
}
|
||||
|
||||
.approval-card .period-selector {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.approval-card .period-selector label {
|
||||
font-size: var(--fs-14);
|
||||
color: var(--color-666666);
|
||||
font-weight: var(--fw-500);
|
||||
min-width: 60px;
|
||||
}
|
||||
|
||||
.approval-card .period-selector select {
|
||||
height: 36px;
|
||||
font-size: var(--fs-14);
|
||||
padding: 6px 30px 6px 12px;
|
||||
border: 1px solid var(--color-d6d6d6);
|
||||
border-radius: 4px;
|
||||
background-color: var(--color-white);
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
/* Scrollbar hide utility class */
|
||||
.scrollbar-hide::-webkit-scrollbar {
|
||||
display: none; /* Chrome, Safari, Opera */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user