bottom sheet
This commit is contained in:
@@ -30,6 +30,7 @@ import {
|
||||
} from '../model/types';
|
||||
import { DefaultRequestPagination, SortTypeKeys } from '@/entities/common/model/types';
|
||||
import { useStore } from '@/shared/model/store';
|
||||
import { EmailBottomSheet } from '@/entities/common/ui/email-bottom-sheet';
|
||||
|
||||
export interface ListWrapProps {
|
||||
startDateFromCalendar?: string;
|
||||
@@ -68,6 +69,8 @@ export const ListWrap = ({
|
||||
const [transactionIds, setTransactionIds] = useState<Array<string>>([]);
|
||||
const [isOpenSummary, setIsOpenSummary] = useState<boolean>(false);
|
||||
|
||||
const [emailBottomSheetOn, setEmailBottomSheetOn] = useState<boolean>(false);
|
||||
|
||||
const { mutateAsync: settlementsHistory } = useSettlementsHistoryMutation();
|
||||
const { mutateAsync: settlementsHistorySummary} = useSettlementsHistorySummaryMutation();
|
||||
const { mutateAsync: settlementsTransactionList } = useSettlementsTransactionListMutation();
|
||||
@@ -287,12 +290,18 @@ export const ListWrap = ({
|
||||
setFilterOn(!filterOn);
|
||||
};
|
||||
const onClickToDownloadExcel = () => {
|
||||
setEmailBottomSheetOn(true);
|
||||
};
|
||||
|
||||
const onRequestDownloadExcel = (userEmail?: string) => {
|
||||
// tid??? 확인 필요
|
||||
/*
|
||||
downloadExcel({
|
||||
// tid: tid
|
||||
}).then((rs) => {
|
||||
|
||||
});
|
||||
*/
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -415,6 +424,15 @@ export const ListWrap = ({
|
||||
setEndDate={ setEndDate }
|
||||
setPaymentMethod={ setPaymentMethod }
|
||||
></ListFilter>
|
||||
{ !!emailBottomSheetOn &&
|
||||
<EmailBottomSheet
|
||||
bottomSheetOn={ emailBottomSheetOn }
|
||||
setBottomSheetOn={ setEmailBottomSheetOn }
|
||||
imageSave={ false }
|
||||
sendEmail={ true }
|
||||
sendRequest={ onRequestDownloadExcel }
|
||||
></EmailBottomSheet>
|
||||
}
|
||||
</>
|
||||
);
|
||||
};
|
||||
@@ -28,6 +28,7 @@ import {
|
||||
useSetHeaderType,
|
||||
useSetFooterMode
|
||||
} from '@/widgets/sub-layout/use-sub-layout';
|
||||
import { EmailBottomSheet } from '@/entities/common/ui/email-bottom-sheet';
|
||||
|
||||
export const BillingListPage = () => {
|
||||
const { navigate } = useNavigate();
|
||||
@@ -50,6 +51,8 @@ export const BillingListPage = () => {
|
||||
const [minAmount, setMinAmount] = useState<number>();
|
||||
const [maxAmount, setMaxAmount] = useState<number>();
|
||||
|
||||
const [emailBottomSheetOn, setEmailBottomSheetOn] = useState<boolean>(false);
|
||||
|
||||
useSetHeaderTitle('빌링');
|
||||
useSetHeaderType(HeaderType.LeftArrow);
|
||||
useSetOnBack(() => {
|
||||
@@ -100,12 +103,7 @@ export const BillingListPage = () => {
|
||||
setFilterOn(!filterOn);
|
||||
};
|
||||
const onClickToDownloadExcel = () => {
|
||||
// tid??? 확인 필요
|
||||
downloadExcel({
|
||||
// tid: tid
|
||||
}).then((rs) => {
|
||||
|
||||
});
|
||||
setEmailBottomSheetOn(true);
|
||||
};
|
||||
const onClickToSort = (sort: SortTypeKeys) => {
|
||||
setSortType(sort);
|
||||
@@ -121,6 +119,10 @@ export const BillingListPage = () => {
|
||||
});
|
||||
};
|
||||
|
||||
const onRequestDownloadExcel = (userEmail?: string) => {
|
||||
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
callList();
|
||||
}, []);
|
||||
@@ -215,6 +217,15 @@ export const BillingListPage = () => {
|
||||
setMinAmount={ setMinAmount }
|
||||
setMaxAmount={ setMaxAmount }
|
||||
></BillingFilter>
|
||||
{ !!emailBottomSheetOn &&
|
||||
<EmailBottomSheet
|
||||
bottomSheetOn={ emailBottomSheetOn }
|
||||
setBottomSheetOn={ setEmailBottomSheetOn }
|
||||
imageSave={ false }
|
||||
sendEmail={ true }
|
||||
sendRequest={ onRequestDownloadExcel }
|
||||
></EmailBottomSheet>
|
||||
}
|
||||
</>
|
||||
);
|
||||
};
|
||||
@@ -32,6 +32,7 @@ import {
|
||||
import { CashReceiptTransactionTypeBtnGroup } from '@/entities/transaction/model/contant';
|
||||
import { useStore } from '@/shared/model/store';
|
||||
import { useCashReceiptSummaryMutation } from '@/entities/transaction/api/use-cash-receipt-summary-mutation';
|
||||
import { EmailBottomSheet } from '@/entities/common/ui/email-bottom-sheet';
|
||||
|
||||
export const CashReceiptListPage = () => {
|
||||
const { navigate } = useNavigate();
|
||||
@@ -55,6 +56,8 @@ export const CashReceiptListPage = () => {
|
||||
const [cancelAmount, setCancelAmount] = useState<number>(0);
|
||||
const [totalCount, setTotalCount] = useState<number>(0);
|
||||
|
||||
const [emailBottomSheetOn, setEmailBottomSheetOn] = useState<boolean>(false);
|
||||
|
||||
useSetHeaderTitle('현금영수증');
|
||||
useSetHeaderType(HeaderType.LeftArrow);
|
||||
useSetOnBack(() => {
|
||||
@@ -104,7 +107,11 @@ export const CashReceiptListPage = () => {
|
||||
setTotalCount(rs.totalCount);
|
||||
});
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
const onRequestDownloadExcel = (userEmail?: string) => {
|
||||
setEmailBottomSheetOn(true);
|
||||
};
|
||||
|
||||
const onClickToOpenFilter = () => {
|
||||
setFilterOn(!filterOn);
|
||||
@@ -262,6 +269,15 @@ export const CashReceiptListPage = () => {
|
||||
setSearchNumberType={ setSearchNumberType }
|
||||
setSearchNumber={ setSearchNumber }
|
||||
></CashReceiptFilter>
|
||||
{ !!emailBottomSheetOn &&
|
||||
<EmailBottomSheet
|
||||
bottomSheetOn={ emailBottomSheetOn }
|
||||
setBottomSheetOn={ setEmailBottomSheetOn }
|
||||
imageSave={ false }
|
||||
sendEmail={ true }
|
||||
sendRequest={ onRequestDownloadExcel }
|
||||
></EmailBottomSheet>
|
||||
}
|
||||
</>
|
||||
);
|
||||
};
|
||||
@@ -27,6 +27,7 @@ import {
|
||||
useSetHeaderType,
|
||||
useSetFooterMode
|
||||
} from '@/widgets/sub-layout/use-sub-layout';
|
||||
import { EmailBottomSheet } from '@/entities/common/ui/email-bottom-sheet';
|
||||
|
||||
export const EscrowListPage = () => {
|
||||
const { navigate } = useNavigate();
|
||||
@@ -46,7 +47,9 @@ export const EscrowListPage = () => {
|
||||
const [deliveryStatus, setDeliveryStatus] = useState<EscrowDeliveryStatus>(EscrowDeliveryStatus.ALL);
|
||||
const [settlementStatus, setSettlementStatus] = useState<EscrowSettlementStatus>(EscrowSettlementStatus.ALL);
|
||||
const [minAmount, setMinAmount] = useState<number>();
|
||||
const [maxAmount, setMaxAmount] = useState<number>();
|
||||
const [maxAmount, setMaxAmount] = useState<number>();
|
||||
|
||||
const [emailBottomSheetOn, setEmailBottomSheetOn] = useState<boolean>(false);
|
||||
|
||||
useSetHeaderTitle('에스크로');
|
||||
useSetHeaderType(HeaderType.LeftArrow);
|
||||
@@ -97,12 +100,17 @@ export const EscrowListPage = () => {
|
||||
setFilterOn(!filterOn);
|
||||
};
|
||||
const onClickToDownloadExcel = () => {
|
||||
setEmailBottomSheetOn(true);
|
||||
};
|
||||
const onRequestDownloadExcel = (userEmail?: string) => {
|
||||
// tid??? 확인 필요
|
||||
/*
|
||||
downloadExcel({
|
||||
// tid: tid
|
||||
}).then((rs) => {
|
||||
|
||||
});
|
||||
*/
|
||||
};
|
||||
const onClickToSort = (sort: SortTypeKeys) => {
|
||||
setSortType(sort);
|
||||
@@ -210,6 +218,15 @@ export const EscrowListPage = () => {
|
||||
setMinAmount={ setMinAmount }
|
||||
setMaxAmount={ setMaxAmount }
|
||||
></EscrowFilter>
|
||||
{ !!emailBottomSheetOn &&
|
||||
<EmailBottomSheet
|
||||
bottomSheetOn={ emailBottomSheetOn }
|
||||
setBottomSheetOn={ setEmailBottomSheetOn }
|
||||
imageSave={ false }
|
||||
sendEmail={ true }
|
||||
sendRequest={ onRequestDownloadExcel }
|
||||
></EmailBottomSheet>
|
||||
}
|
||||
</>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user