Added last customer orders
This commit is contained in:
parent
5875f92cca
commit
dd97ae5ecb
|
|
@ -1,5 +1,5 @@
|
|||
import React, { useEffect, useState, useRef, lazy, Suspense } from 'react';
|
||||
import { FaWhatsapp, FaPrint, FaParking } from 'react-icons/fa';
|
||||
import { FaWhatsapp, FaPrint, FaParking, FaCartPlus } from 'react-icons/fa';
|
||||
import { useDispatch, useSelector } from 'react-redux';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import moment from 'moment';
|
||||
|
|
@ -267,6 +267,7 @@ import {
|
|||
GlobalOverAllOfferAmt,
|
||||
} from '../../../../Features/Offer/Offernew/BookingOffernew.js';
|
||||
import pozologoimg from '../../../../Images/pozologoimg.png';
|
||||
import CustomerOrders from '../BookingFunctionality/CustomerOrders.jsx';
|
||||
const PaymentGatewayEmbedded = lazy(
|
||||
() => import('../UtillComponents/PaymentGatewayEmbedded.jsx')
|
||||
);
|
||||
|
|
@ -364,6 +365,7 @@ const BSC1Payment = (props) => {
|
|||
const [refundPaySelectedName, setRefundPaySelectedName] = useState(null);
|
||||
const [currentOrderNetAmount, setCurrentOrderNetAmount] = useState(0);
|
||||
const [previousNetAmount, setPreviousNetAmount] = useState(0);
|
||||
const [customerPreviesOrders, setCustomerPreviesOrders] = useState(false);
|
||||
const appPreferences = useSelector(ApplicationPreferences);
|
||||
const commonModulePreference = appPreferences?.find(
|
||||
(preference) => preference?.PreferredCatName === 'Common Module'
|
||||
|
|
@ -4425,6 +4427,40 @@ const BSC1Payment = (props) => {
|
|||
}
|
||||
</>
|
||||
)}
|
||||
{/* Customer Orders */}
|
||||
{SelCustId && (
|
||||
<Tooltip title="Customer Orders" isMobile={isMobile}>
|
||||
{' '}
|
||||
<div
|
||||
className="BSBillingNav-icon-table-icon"
|
||||
onClick={() => {
|
||||
if (
|
||||
CheckBookingStatus !== 'Close' &&
|
||||
!addnewAccess &&
|
||||
!(OrderCardDetail?.length > 0)
|
||||
) {
|
||||
setCustomerPreviesOrders(true);
|
||||
}
|
||||
}}
|
||||
style={{
|
||||
cursor: OrderCardDetail?.length > 0 && 'not-allowed',
|
||||
color:
|
||||
OrderCardDetail?.length > 0 ||
|
||||
(OrderCardDetail?.length > 0 &&
|
||||
GetCustId?.CustMobile === undefined)
|
||||
? 'gray'
|
||||
: 'rgb(18, 146, 238)',
|
||||
fontSize: '25px',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
height: '2.46rem',
|
||||
width: '1.5rem',
|
||||
}}
|
||||
>
|
||||
<FaCartPlus />
|
||||
</div>
|
||||
</Tooltip>
|
||||
)}
|
||||
{preOrderOpen && <BSNavBarPreOrder />}
|
||||
{sportsAppPreference && <BSMembership />}
|
||||
{dinePreference &&
|
||||
|
|
@ -4980,6 +5016,24 @@ const BSC1Payment = (props) => {
|
|||
Do you want to cancel the payment?
|
||||
</Modal>
|
||||
)}
|
||||
|
||||
{customerPreviesOrders && (
|
||||
<DefaultModal
|
||||
open={customerPreviesOrders}
|
||||
handleCancel={() => setCustomerPreviesOrders(false)}
|
||||
footer={false}
|
||||
width={700}
|
||||
className={'ModalPaymentGatewayEmbedded'}
|
||||
children={
|
||||
<>
|
||||
<CustomerOrders
|
||||
CustomerDetails={selOption}
|
||||
close={() => setCustomerPreviesOrders(false)}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
</Suspense>
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue