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