- 자금이체 : 이체신청,결과조회 리스트,상세정보 수정
- 부가서비스 엑셀 다운로드 이메일 바텀시트 추가
This commit is contained in:
@@ -20,6 +20,7 @@ import { useExtensionSmsDetailMutation } from '@/entities/additional-service/api
|
||||
import { useStore } from '@/shared/model/store';
|
||||
import { AdditionalServiceCategory } from '@/entities/additional-service/model/types';
|
||||
import { PATHS } from '@/shared/constants/paths';
|
||||
import { EmailBottomSheet } from '@/entities/common/ui/email-bottom-sheet';
|
||||
|
||||
|
||||
export const SmsPaymentPage = () => {
|
||||
@@ -41,6 +42,7 @@ export const SmsPaymentPage = () => {
|
||||
const [toDate, setToDate] = useState(moment().format('YYYYMMDD'));
|
||||
const [smsCl, setSmsCl] = useState<SmsCl>(SmsCl.ALL);
|
||||
const [smsDetailData, setSmsDetailData] = useState<ExtensionSmsDetailResponse | null>(null);
|
||||
const [emailBottomSheetOn, setEmailBottomSheetOn] = useState<boolean>(false);
|
||||
|
||||
const { mutateAsync: smsPaymentList } = useExtensionSmsListMutation();
|
||||
const { mutateAsync: downloadExcel } = useExtensionSmsDownloadExcelMutation();
|
||||
@@ -85,18 +87,26 @@ export const SmsPaymentPage = () => {
|
||||
})
|
||||
}
|
||||
|
||||
const onClickToDownloadExcel = () => {
|
||||
downloadExcel({
|
||||
mid: mid,
|
||||
searchCl: searchCl,
|
||||
searchValue: searchValue,
|
||||
fromDate: fromDate,
|
||||
toDate: toDate,
|
||||
smsCl: smsCl,
|
||||
}).then((rs) => {
|
||||
console.log('Excel Dowload Status : ' + rs.status);
|
||||
});
|
||||
}
|
||||
const onClickToOpenEmailBottomSheet = () => {
|
||||
setEmailBottomSheetOn(true);
|
||||
};
|
||||
|
||||
const onSendRequest = (selectedEmail?: string) => {
|
||||
if (selectedEmail) {
|
||||
downloadExcel({
|
||||
mid: mid,
|
||||
searchCl: searchCl,
|
||||
searchValue: searchValue,
|
||||
fromDate: fromDate,
|
||||
toDate: toDate,
|
||||
smsCl: smsCl,
|
||||
//email: selectedEmail
|
||||
}).then((rs) => {
|
||||
console.log('Excel Download Status:', rs.status);
|
||||
});
|
||||
}
|
||||
setEmailBottomSheetOn(false);
|
||||
};
|
||||
|
||||
const onClickToOpenFilter = () => {
|
||||
setFilterOn(!filterOn);
|
||||
@@ -153,7 +163,7 @@ export const SmsPaymentPage = () => {
|
||||
<img
|
||||
src={IMAGE_ROOT + '/ico_download.svg'}
|
||||
alt="다운로드"
|
||||
onClick={() => onClickToDownloadExcel()}
|
||||
onClick={() => onClickToOpenEmailBottomSheet()}
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
@@ -193,6 +203,13 @@ export const SmsPaymentPage = () => {
|
||||
setToDate={setToDate}
|
||||
setSmsCl={setSmsCl}
|
||||
></SmsPaymentFilter>
|
||||
<EmailBottomSheet
|
||||
bottomSheetOn={emailBottomSheetOn}
|
||||
setBottomSheetOn={setEmailBottomSheetOn}
|
||||
imageSave={false}
|
||||
sendEmail={true}
|
||||
sendRequest={onSendRequest}
|
||||
></EmailBottomSheet>
|
||||
</>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user