부가서비스
- SMS 결제 통보 상세정보,재발송 바텀시트 목업 API 연결
This commit is contained in:
@@ -23,7 +23,7 @@ export interface SmsPaymentListItem {
|
|||||||
export interface SmsPaymentListProps {
|
export interface SmsPaymentListProps {
|
||||||
listItems: Record<string, Array<ListItemProps>>;
|
listItems: Record<string, Array<ListItemProps>>;
|
||||||
mid: string;
|
mid: string;
|
||||||
onResendClick?: () => void;
|
onResendClick?: (mid: string, tid: string) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SmsPaymentFilterProps extends FilterProps {
|
export interface SmsPaymentFilterProps extends FilterProps {
|
||||||
@@ -85,3 +85,9 @@ export interface ExtensionSmsResendParams extends ExtensionRequestParams {
|
|||||||
export interface ExtensionSmsResendResponse {
|
export interface ExtensionSmsResendResponse {
|
||||||
status: boolean;
|
status: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface SmsPaymentDetailResendProps {
|
||||||
|
bottomSmsPaymentDetailResendOn: boolean;
|
||||||
|
setBottomSmsPaymentDetailResendOn: (bottomSmsPaymentDetailResendOn: boolean) => void;
|
||||||
|
smsDetailData: ExtensionSmsDetailResponse | null;
|
||||||
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { FundAccountTransferContentItem, FundAccountResultContentItem } from './
|
|||||||
import { ArsListContent } from './ars/types';
|
import { ArsListContent } from './ars/types';
|
||||||
import { AlimtalkListContent } from './alimtalk/types';
|
import { AlimtalkListContent } from './alimtalk/types';
|
||||||
import { SmsPaymentListItem } from './sms-payment/types';
|
import { SmsPaymentListItem } from './sms-payment/types';
|
||||||
|
import type { ExtensionSmsDetailResponse } from './sms-payment/types';
|
||||||
|
|
||||||
// ========================================
|
// ========================================
|
||||||
// 공통 Enums 및 타입들
|
// 공통 Enums 및 타입들
|
||||||
@@ -398,7 +399,7 @@ export interface ListItemProps extends
|
|||||||
ArsListContent, AlimtalkListContent {
|
ArsListContent, AlimtalkListContent {
|
||||||
additionalServiceCategory?: AdditionalServiceCategory;
|
additionalServiceCategory?: AdditionalServiceCategory;
|
||||||
mid?: string;
|
mid?: string;
|
||||||
onResendClick?: () => void;
|
onResendClick?: (mid: string, tid: string) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ListDateGroupProps {
|
export interface ListDateGroupProps {
|
||||||
@@ -406,7 +407,7 @@ export interface ListDateGroupProps {
|
|||||||
date?: string;
|
date?: string;
|
||||||
items?: Array<ListItemProps>;
|
items?: Array<ListItemProps>;
|
||||||
mid?: string;
|
mid?: string;
|
||||||
onResendClick?: () => void;
|
onResendClick?: (mid: string, tid: string) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AdditionalServiceListProps {
|
export interface AdditionalServiceListProps {
|
||||||
@@ -773,13 +774,6 @@ export interface ExtensionSmsDetailParams extends ExtensionRequestParams {
|
|||||||
tid: string;
|
tid: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ExtensionSmsDetailResponse {
|
|
||||||
senderNumber: string;
|
|
||||||
senderName: string;
|
|
||||||
receiverNumber: string;
|
|
||||||
receiverName: string;
|
|
||||||
sendMessage: string;
|
|
||||||
}
|
|
||||||
// ========================================
|
// ========================================
|
||||||
|
|
||||||
|
|
||||||
@@ -826,7 +820,3 @@ export interface ArsCardPaymentFinishProps {
|
|||||||
setRequestSuccess: (requestSuccess: boolean) => void;
|
setRequestSuccess: (requestSuccess: boolean) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SmsPaymentDetailResendProps {
|
|
||||||
bottomSmsPaymentDetailResendOn: boolean;
|
|
||||||
setBottomSmsPaymentDetailResendOn: (bottomSmsPaymentDetailResendOn: boolean) => void;
|
|
||||||
}
|
|
||||||
@@ -120,17 +120,17 @@ export const AccountHolderSearchFilter = ({
|
|||||||
<FilterSelect
|
<FilterSelect
|
||||||
title='가맹점'
|
title='가맹점'
|
||||||
selectValue={mid}
|
selectValue={mid}
|
||||||
selectSetter={setFilterMid}
|
selectSetter={setMid}
|
||||||
selectOptions={MidOptions}
|
selectOptions={MidOptions}
|
||||||
></FilterSelect>
|
></FilterSelect>
|
||||||
|
|
||||||
<FilterSelectInput
|
<FilterSelectInput
|
||||||
title='예금주/계좌번호'
|
title='예금주/계좌번호'
|
||||||
selectValue={searchType}
|
selectValue={searchType}
|
||||||
selectSetter={setFilterSearchType}
|
selectSetter={setSearchType}
|
||||||
selectOptions={searchTypeOption}
|
selectOptions={searchTypeOption}
|
||||||
inputValue={searchKeyword}
|
inputValue={searchKeyword}
|
||||||
inputSetter={setFilterSearchKeyword}
|
inputSetter={setSearchKeyword}
|
||||||
></FilterSelectInput>
|
></FilterSelectInput>
|
||||||
<FilterCalendar
|
<FilterCalendar
|
||||||
startDate={filterStartDate}
|
startDate={filterStartDate}
|
||||||
@@ -142,7 +142,7 @@ export const AccountHolderSearchFilter = ({
|
|||||||
<FilterSelect
|
<FilterSelect
|
||||||
title='은행'
|
title='은행'
|
||||||
selectValue={bank}
|
selectValue={bank}
|
||||||
selectSetter={setFilterBank}
|
selectSetter={setBank}
|
||||||
selectOptions={bankOptions}
|
selectOptions={bankOptions}
|
||||||
></FilterSelect>
|
></FilterSelect>
|
||||||
|
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ export const KeyInPaymentFilter = ({
|
|||||||
<FilterSelect
|
<FilterSelect
|
||||||
title='가맹점'
|
title='가맹점'
|
||||||
selectValue={filterMid}
|
selectValue={filterMid}
|
||||||
selectSetter={setFilterMid}
|
selectSetter={setMid}
|
||||||
selectOptions={MidOptions}
|
selectOptions={MidOptions}
|
||||||
></FilterSelect>
|
></FilterSelect>
|
||||||
<FilterCalendar
|
<FilterCalendar
|
||||||
|
|||||||
@@ -519,12 +519,12 @@ export const ListItem = ({
|
|||||||
>{sendCl}</div>
|
>{sendCl}</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else if (additionalServiceCategory === AdditionalServiceCategory.SMSPayment && onResendClick) {
|
else if (additionalServiceCategory === AdditionalServiceCategory.SMSPayment && onResendClick && tid) {
|
||||||
rs.push(
|
rs.push(
|
||||||
<div
|
<div
|
||||||
key="sms-payment-amount"
|
key="sms-payment-amount"
|
||||||
className={`status-label success`}
|
className={`status-label success`}
|
||||||
onClick={() => onResendClick()}
|
onClick={() => mid && tid && onResendClick(mid, tid)}
|
||||||
>{'재발송'}</div>
|
>{'재발송'}</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
import { motion } from 'framer-motion';
|
import { motion } from 'framer-motion';
|
||||||
import { IMAGE_ROOT } from '@/shared/constants/common';
|
import { IMAGE_ROOT } from '@/shared/constants/common';
|
||||||
import { SmsPaymentDetailResendProps } from '../../model/types';
|
import { SmsPaymentDetailResendProps } from '../../../additional-service/model/sms-payment/types';
|
||||||
|
|
||||||
export const SmsPaymentDetailResend = ({
|
export const SmsPaymentDetailResend = ({
|
||||||
bottomSmsPaymentDetailResendOn,
|
bottomSmsPaymentDetailResendOn,
|
||||||
setBottomSmsPaymentDetailResendOn
|
setBottomSmsPaymentDetailResendOn,
|
||||||
|
smsDetailData
|
||||||
}: SmsPaymentDetailResendProps) => {
|
}: SmsPaymentDetailResendProps) => {
|
||||||
|
|
||||||
const variants = {
|
const variants = {
|
||||||
@@ -44,11 +45,11 @@ export const SmsPaymentDetailResend = ({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="resend-info">
|
<div className="resend-info">
|
||||||
<div className="resend-row">발신자(번호) : 유앤아이피부과(16610808)</div>
|
<div className="resend-row">발신자(번호) : {smsDetailData?.senderName || '-'}({smsDetailData?.senderNumber || '-'})</div>
|
||||||
<div className="resend-row">수신자(번호) : 김*환(010****7000)</div>
|
<div className="resend-row">수신자(번호) : {smsDetailData?.receiverName || '-'}({smsDetailData?.receiverNumber || '-'})</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="resend-box">
|
<div className="resend-box">
|
||||||
<p className="resend-text">[유앤아이피부과]김*환님, 신한은행 110322141414 (300원 06/08 입금완료)</p>
|
<p className="resend-text">{smsDetailData?.sendMessage || '-'}</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="bottomsheet-footer">
|
<div className="bottomsheet-footer">
|
||||||
<button className="btn-50 btn-blue flex-1" type="button">신청</button>
|
<button className="btn-50 btn-blue flex-1" type="button">신청</button>
|
||||||
|
|||||||
@@ -102,17 +102,17 @@ export const SmsPaymentFilter = ({
|
|||||||
<FilterSelect
|
<FilterSelect
|
||||||
title='가맹점'
|
title='가맹점'
|
||||||
selectValue={mid}
|
selectValue={mid}
|
||||||
selectSetter={setFilterMid}
|
selectSetter={setMid}
|
||||||
selectOptions={MidOptions}
|
selectOptions={MidOptions}
|
||||||
></FilterSelect>
|
></FilterSelect>
|
||||||
|
|
||||||
<FilterSelectInput
|
<FilterSelectInput
|
||||||
title='주문자,수신번호'
|
title='주문자,수신번호'
|
||||||
selectValue={searchCl}
|
selectValue={searchCl}
|
||||||
selectSetter={setFilterSearchCl}
|
selectSetter={setSearchCl}
|
||||||
selectOptions={searchTypeOption}
|
selectOptions={searchTypeOption}
|
||||||
inputValue={searchValue}
|
inputValue={searchValue}
|
||||||
inputSetter={setFilterSearchValue}
|
inputSetter={setSearchValue}
|
||||||
></FilterSelectInput>
|
></FilterSelectInput>
|
||||||
<FilterCalendar
|
<FilterCalendar
|
||||||
startDate={filterFromDate}
|
startDate={filterFromDate}
|
||||||
|
|||||||
@@ -10,11 +10,12 @@ import {
|
|||||||
useSetHeaderType,
|
useSetHeaderType,
|
||||||
useSetFooterMode
|
useSetFooterMode
|
||||||
} from '@/widgets/sub-layout/use-sub-layout';
|
} from '@/widgets/sub-layout/use-sub-layout';
|
||||||
import { SmsPaymentListItem, SmsPaymentSearchType, SmsType } from '@/entities/additional-service/model/sms-payment/types';
|
import { SmsPaymentListItem, SmsPaymentSearchType, SmsType, ExtensionSmsDetailResponse } from '@/entities/additional-service/model/sms-payment/types';
|
||||||
import { useExtensionSmsListMutation } from '@/entities/additional-service/api/sms-payment/use-extension-sms-list-mutation';
|
import { useExtensionSmsListMutation } from '@/entities/additional-service/api/sms-payment/use-extension-sms-list-mutation';
|
||||||
import { useExtensionSmsDownloadExcelMutation } from '@/entities/additional-service/api/sms-payment/use-extension-sms-download-excel-mutation';
|
import { useExtensionSmsDownloadExcelMutation } from '@/entities/additional-service/api/sms-payment/use-extension-sms-download-excel-mutation';
|
||||||
import { SmsPaymentList } from '@/entities/additional-service/ui/sms-payment/sms-payment-list';
|
import { SmsPaymentList } from '@/entities/additional-service/ui/sms-payment/sms-payment-list';
|
||||||
import { SmsPaymentFilter } from '@/entities/additional-service/ui/sms-payment/sms-payment-filter';
|
import { SmsPaymentFilter } from '@/entities/additional-service/ui/sms-payment/sms-payment-filter';
|
||||||
|
import { useExtensionSmsDetailMutation } from '@/entities/additional-service/api/sms-payment/use-extension-sms-detail-mutation';
|
||||||
|
|
||||||
|
|
||||||
export const SmsPaymentPage = () => {
|
export const SmsPaymentPage = () => {
|
||||||
@@ -26,14 +27,17 @@ export const SmsPaymentPage = () => {
|
|||||||
const [pageParam, setPageParam] = useState(DEFAULT_PAGE_PARAM);
|
const [pageParam, setPageParam] = useState(DEFAULT_PAGE_PARAM);
|
||||||
const [filterOn, setFilterOn] = useState<boolean>(false);
|
const [filterOn, setFilterOn] = useState<boolean>(false);
|
||||||
const [mid, setMid] = useState<string>('nictest001m');
|
const [mid, setMid] = useState<string>('nictest001m');
|
||||||
|
const [tid, setTid] = useState<string>('');
|
||||||
const [searchCl, setSearchCl] = useState<SmsPaymentSearchType>(SmsPaymentSearchType.BUYER_NAME)
|
const [searchCl, setSearchCl] = useState<SmsPaymentSearchType>(SmsPaymentSearchType.BUYER_NAME)
|
||||||
const [searchValue, setSearchValue] = useState<string>('')
|
const [searchValue, setSearchValue] = useState<string>('')
|
||||||
const [fromDate, setFromDate] = useState(moment().format('YYYY-MM-DD'));
|
const [fromDate, setFromDate] = useState(moment().format('YYYY-MM-DD'));
|
||||||
const [toDate, setToDate] = useState(moment().format('YYYY-MM-DD'));
|
const [toDate, setToDate] = useState(moment().format('YYYY-MM-DD'));
|
||||||
const [smsCl, setSmsCl] = useState<SmsType>(SmsType.ALL);
|
const [smsCl, setSmsCl] = useState<SmsType>(SmsType.ALL);
|
||||||
|
const [smsDetailData, setSmsDetailData] = useState<ExtensionSmsDetailResponse | null>(null);
|
||||||
|
|
||||||
const { mutateAsync: smsPaymentList } = useExtensionSmsListMutation();
|
const { mutateAsync: smsPaymentList } = useExtensionSmsListMutation();
|
||||||
const { mutateAsync: downloadExcel } = useExtensionSmsDownloadExcelMutation();
|
const { mutateAsync: downloadExcel } = useExtensionSmsDownloadExcelMutation();
|
||||||
|
const { mutateAsync: detail } = useExtensionSmsDetailMutation();
|
||||||
|
|
||||||
useSetHeaderTitle('SMS 결제 통보');
|
useSetHeaderTitle('SMS 결제 통보');
|
||||||
useSetHeaderType(HeaderType.LeftArrow);
|
useSetHeaderType(HeaderType.LeftArrow);
|
||||||
@@ -79,6 +83,17 @@ export const SmsPaymentPage = () => {
|
|||||||
return data;
|
return data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const callDetail = (selectedMid: string, selectedTid: string) => {
|
||||||
|
console.log("Selected Mid: ", selectedMid, "Selected Tid: ", selectedTid)
|
||||||
|
detail({
|
||||||
|
mid: selectedMid,
|
||||||
|
tid: selectedTid
|
||||||
|
}).then((rs) => {
|
||||||
|
console.log('Detail info : ', rs)
|
||||||
|
setSmsDetailData(rs);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
const onClickToDownloadExcel = () => {
|
const onClickToDownloadExcel = () => {
|
||||||
downloadExcel({
|
downloadExcel({
|
||||||
mid: mid,
|
mid: mid,
|
||||||
@@ -103,7 +118,9 @@ export const SmsPaymentPage = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const onClickToShowDetail = () => {
|
const onClickToShowDetail = (selectedMid: string, selectedTid: string) => {
|
||||||
|
setTid(selectedTid);
|
||||||
|
callDetail(selectedMid, selectedTid);
|
||||||
setBottomSmsPaymentDetailResendOn(true);
|
setBottomSmsPaymentDetailResendOn(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -161,6 +178,7 @@ export const SmsPaymentPage = () => {
|
|||||||
<SmsPaymentDetailResend
|
<SmsPaymentDetailResend
|
||||||
bottomSmsPaymentDetailResendOn={bottomSmsPaymentDetailResendOn}
|
bottomSmsPaymentDetailResendOn={bottomSmsPaymentDetailResendOn}
|
||||||
setBottomSmsPaymentDetailResendOn={setBottomSmsPaymentDetailResendOn}
|
setBottomSmsPaymentDetailResendOn={setBottomSmsPaymentDetailResendOn}
|
||||||
|
smsDetailData={smsDetailData}
|
||||||
></SmsPaymentDetailResend>
|
></SmsPaymentDetailResend>
|
||||||
|
|
||||||
<SmsPaymentFilter
|
<SmsPaymentFilter
|
||||||
|
|||||||
Reference in New Issue
Block a user