jut chnge
This commit is contained in:
parent
c4818c08e7
commit
0fc07aaeac
|
|
@ -1419,6 +1419,49 @@ export const getMissedOrderids = createAsyncThunk(
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
// get /LastBuyProductList
|
||||||
|
export const CustomerOrderList = createAsyncThunk(
|
||||||
|
'CustomerOrderList/LastBuyProductList',
|
||||||
|
async (data) => {
|
||||||
|
const { AppId, CompId, BranchId, MobileNo,FromDate,ToDate } = data;
|
||||||
|
if (
|
||||||
|
AppId != null &&
|
||||||
|
AppId != undefined &&
|
||||||
|
CompId != null &&
|
||||||
|
CompId != undefined &&
|
||||||
|
BranchId != null &&
|
||||||
|
BranchId != undefined &&
|
||||||
|
FromDate != null &&
|
||||||
|
FromDate != undefined &&
|
||||||
|
ToDate != null &&
|
||||||
|
ToDate != undefined &&
|
||||||
|
MobileNo != null &&
|
||||||
|
MobileNo != undefined
|
||||||
|
) {
|
||||||
|
return await axiosRetailInstanceData.get(
|
||||||
|
`/LastBuyProductList?compId=${CompId}&branchId=${BranchId}&appId=${AppId}&mobileNo=${MobileNo}&fromDate=${FromDate}&toDate=${ToDate}`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else if (
|
||||||
|
AppId != null &&
|
||||||
|
AppId != undefined &&
|
||||||
|
CompId != null &&
|
||||||
|
CompId != undefined &&
|
||||||
|
BranchId != null &&
|
||||||
|
BranchId != undefined &&
|
||||||
|
MobileNo != null &&
|
||||||
|
MobileNo != undefined
|
||||||
|
) {
|
||||||
|
return await axiosRetailInstanceData.get(
|
||||||
|
`/LastBuyProductList?compId=${CompId}&branchId=${BranchId}&appId=${AppId}&mobileNo=${MobileNo}`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const initialState = {
|
const initialState = {
|
||||||
PrintStyle: null,
|
PrintStyle: null,
|
||||||
CustId: null,
|
CustId: null,
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import React, { useCallback, useEffect, useState, useRef } from 'react';
|
||||||
import { shallowEqual, useDispatch, useSelector } from 'react-redux';
|
import { shallowEqual, useDispatch, useSelector } from 'react-redux';
|
||||||
import { useNavigate } from 'react-router-dom';
|
import { useNavigate } from 'react-router-dom';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { Badge, Popover, Modal } from 'antd';
|
import { Badge, Popover, Modal, Tooltip } from 'antd';
|
||||||
import { Tables } from '../../../../../Components/Tables/Table';
|
import { Tables } from '../../../../../Components/Tables/Table';
|
||||||
import { DefaultModal } from '../../../../../Components/Modal/DefaultModal.jsx';
|
import { DefaultModal } from '../../../../../Components/Modal/DefaultModal.jsx';
|
||||||
import { UpOutlined } from '@ant-design/icons';
|
import { UpOutlined } from '@ant-design/icons';
|
||||||
|
|
@ -181,7 +181,7 @@ import {
|
||||||
import WhatsAppShare from '../../../../WhatsAppShare/whatsAppShare.jsx';
|
import WhatsAppShare from '../../../../WhatsAppShare/whatsAppShare.jsx';
|
||||||
import SMSShare from '../../../../WhatsAppShare/SmsShare.jsx';
|
import SMSShare from '../../../../WhatsAppShare/SmsShare.jsx';
|
||||||
import { MdSms } from 'react-icons/md';
|
import { MdSms } from 'react-icons/md';
|
||||||
import { FaWhatsapp, FaPrint } from 'react-icons/fa';
|
import { FaWhatsapp, FaPrint, FaCartPlus } from 'react-icons/fa';
|
||||||
import BSTipAmount from '../../UtillComponents/BSTipAmount.jsx';
|
import BSTipAmount from '../../UtillComponents/BSTipAmount.jsx';
|
||||||
import { ApplicationPreferences } from '../../../../../Features/BrachLogin/BranchLogin.js';
|
import { ApplicationPreferences } from '../../../../../Features/BrachLogin/BranchLogin.js';
|
||||||
import BSOtherServiceClaim from '../../UtillComponents/BSOtherServiceClaim.jsx';
|
import BSOtherServiceClaim from '../../UtillComponents/BSOtherServiceClaim.jsx';
|
||||||
|
|
@ -204,6 +204,7 @@ import PaymentGatewayEmbedded from '../../UtillComponents/PaymentGatewayEmbedded
|
||||||
import pozologoimg from '../../../../../Images/pozologoimg.png';
|
import pozologoimg from '../../../../../Images/pozologoimg.png';
|
||||||
import MobileMultiPdfPrintTrigger from '../../UtillComponents/MobileMultiPdfPrintTrigger.jsx';
|
import MobileMultiPdfPrintTrigger from '../../UtillComponents/MobileMultiPdfPrintTrigger.jsx';
|
||||||
import { useDateStore } from '../../../../../Features/BookingScreen/BookingData/DateStore.js';
|
import { useDateStore } from '../../../../../Features/BookingScreen/BookingData/DateStore.js';
|
||||||
|
import CustomerOrders from '../../BookingFunctionality/CustomerOrders.jsx';
|
||||||
|
|
||||||
const subDirectory = import.meta.env.ENV_BASE_URL;
|
const subDirectory = import.meta.env.ENV_BASE_URL;
|
||||||
const MainHomeUrl = import.meta.env.ENV_MAIN_BASE_URL;
|
const MainHomeUrl = import.meta.env.ENV_MAIN_BASE_URL;
|
||||||
|
|
@ -365,6 +366,7 @@ export default function BST1Payment() {
|
||||||
const [CardPayOption, setCardPayOption] = useState([]);
|
const [CardPayOption, setCardPayOption] = useState([]);
|
||||||
const [Splitpayment, setSplitpayment] = useState(false);
|
const [Splitpayment, setSplitpayment] = useState(false);
|
||||||
const [UnpaidConfirmation, setUnpaidConfirmation] = useState(false);
|
const [UnpaidConfirmation, setUnpaidConfirmation] = useState(false);
|
||||||
|
const [customerPreviesOrders, setCustomerPreviesOrders] = useState(false);
|
||||||
const [unpaidselectedindex, setunpaidselectedindex] = useState();
|
const [unpaidselectedindex, setunpaidselectedindex] = useState();
|
||||||
const GlobaluseOptions = useSelector(GlobalCommonPaymentOptions);
|
const GlobaluseOptions = useSelector(GlobalCommonPaymentOptions);
|
||||||
const [useOptions, setuseOptions] = useState([]);
|
const [useOptions, setuseOptions] = useState([]);
|
||||||
|
|
@ -3674,6 +3676,43 @@ export default function BST1Payment() {
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{/* Customer Orders */}
|
||||||
|
{GetCustId && (
|
||||||
|
|
||||||
|
<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>
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
{OtherServicesglobal && OrderCardDetail.length >= 1 && (
|
{OtherServicesglobal && OrderCardDetail.length >= 1 && (
|
||||||
<TooltipWrapper title="Vehicle Number" isMobile={isMobile}>
|
<TooltipWrapper title="Vehicle Number" isMobile={isMobile}>
|
||||||
{' '}
|
{' '}
|
||||||
|
|
@ -4344,6 +4383,24 @@ export default function BST1Payment() {
|
||||||
Do you want to cancel the payment?
|
Do you want to cancel the payment?
|
||||||
</Modal>
|
</Modal>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{customerPreviesOrders && (
|
||||||
|
<DefaultModal
|
||||||
|
open={customerPreviesOrders}
|
||||||
|
handleCancel={() => setCustomerPreviesOrders(false)}
|
||||||
|
footer={false}
|
||||||
|
width={700}
|
||||||
|
className={'ModalPaymentGatewayEmbedded'}
|
||||||
|
children={
|
||||||
|
<>
|
||||||
|
<CustomerOrders
|
||||||
|
CustomerDetails={selOption}
|
||||||
|
close={() => setCustomerPreviesOrders(false)}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import React, { useCallback, useEffect, useState, useRef } from 'react';
|
||||||
import { shallowEqual, useDispatch, useSelector } from 'react-redux';
|
import { shallowEqual, useDispatch, useSelector } from 'react-redux';
|
||||||
import { useNavigate } from 'react-router-dom';
|
import { useNavigate } from 'react-router-dom';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { Badge, Popover, Modal } from 'antd';
|
import { Badge, Popover, Modal, Tooltip } from 'antd';
|
||||||
import {
|
import {
|
||||||
ArrowRightOutlined,
|
ArrowRightOutlined,
|
||||||
UpCircleOutlined,
|
UpCircleOutlined,
|
||||||
|
|
@ -189,7 +189,7 @@ import { getCombolist } from '../../../../../Features/ComboMaster/ComboMaster.js
|
||||||
import SMSShare from '../../../../WhatsAppShare/SmsShare.jsx';
|
import SMSShare from '../../../../WhatsAppShare/SmsShare.jsx';
|
||||||
import WhatsAppShare from '../../../../WhatsAppShare/whatsAppShare.jsx';
|
import WhatsAppShare from '../../../../WhatsAppShare/whatsAppShare.jsx';
|
||||||
import { MdSms } from 'react-icons/md';
|
import { MdSms } from 'react-icons/md';
|
||||||
import { FaWhatsapp, FaPrint } from 'react-icons/fa';
|
import { FaWhatsapp, FaPrint, FaCartPlus } from 'react-icons/fa';
|
||||||
import BSTipAmount from '../../UtillComponents/BSTipAmount.jsx';
|
import BSTipAmount from '../../UtillComponents/BSTipAmount.jsx';
|
||||||
import { ApplicationPreferences } from '../../../../../Features/BrachLogin/BranchLogin.js';
|
import { ApplicationPreferences } from '../../../../../Features/BrachLogin/BranchLogin.js';
|
||||||
import { PostOtherServices } from '../../../../../Features/OtherServices/OtherServices.js';
|
import { PostOtherServices } from '../../../../../Features/OtherServices/OtherServices.js';
|
||||||
|
|
@ -352,6 +352,7 @@ const BSBillingTable2 = () => {
|
||||||
const [Success, SetSuccess] = useState();
|
const [Success, SetSuccess] = useState();
|
||||||
const [brachName, setbrachName] = useState('');
|
const [brachName, setbrachName] = useState('');
|
||||||
const [UpiOpen, setUpiOpen] = useState(false);
|
const [UpiOpen, setUpiOpen] = useState(false);
|
||||||
|
const [customerPreviesOrders, setCustomerPreviesOrders] = useState(false);
|
||||||
const OverAllSales = useSelector(GlobalOverAllDiscSales);
|
const OverAllSales = useSelector(GlobalOverAllDiscSales);
|
||||||
const OverAllEstimate = useSelector(GlobalOverAllDiscEstimate);
|
const OverAllEstimate = useSelector(GlobalOverAllDiscEstimate);
|
||||||
|
|
||||||
|
|
@ -3950,6 +3951,41 @@ const BSBillingTable2 = () => {
|
||||||
''
|
''
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
||||||
|
{/* Customer Orders */}
|
||||||
|
{GetCustId && (
|
||||||
|
<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>
|
||||||
|
)}
|
||||||
{tabledata?.length > 0 && (
|
{tabledata?.length > 0 && (
|
||||||
<div style={{ width: '2rem' }}>
|
<div style={{ width: '2rem' }}>
|
||||||
{tableOptions
|
{tableOptions
|
||||||
|
|
@ -4542,6 +4578,7 @@ const BSBillingTable2 = () => {
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<DefaultModal
|
<DefaultModal
|
||||||
open={businessUPI}
|
open={businessUPI}
|
||||||
handleCancel={() => setShowCancelConfirm(true)}
|
handleCancel={() => setShowCancelConfirm(true)}
|
||||||
|
|
@ -4579,6 +4616,23 @@ const BSBillingTable2 = () => {
|
||||||
Do you want to cancel the payment?
|
Do you want to cancel the payment?
|
||||||
</Modal>
|
</Modal>
|
||||||
)}
|
)}
|
||||||
|
{customerPreviesOrders && (
|
||||||
|
<DefaultModal
|
||||||
|
open={customerPreviesOrders}
|
||||||
|
handleCancel={() => setCustomerPreviesOrders(false)}
|
||||||
|
footer={false}
|
||||||
|
width={700}
|
||||||
|
className={'ModalPaymentGatewayEmbedded'}
|
||||||
|
children={
|
||||||
|
<>
|
||||||
|
<CustomerOrders
|
||||||
|
CustomerDetails={selOption}
|
||||||
|
close={() => setCustomerPreviesOrders(false)}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import {
|
||||||
DownCircleOutlined,
|
DownCircleOutlined,
|
||||||
UpOutlined,
|
UpOutlined,
|
||||||
} from '@ant-design/icons';
|
} from '@ant-design/icons';
|
||||||
import { Popover, Badge, Modal } from 'antd';
|
import { Popover, Badge, Modal, Tooltip } from 'antd';
|
||||||
import {
|
import {
|
||||||
printDiv,
|
printDiv,
|
||||||
extractLastNumberOrderId,
|
extractLastNumberOrderId,
|
||||||
|
|
@ -186,7 +186,7 @@ import { getCombolist } from '../../../../../Features/ComboMaster/ComboMaster.js
|
||||||
import SMSShare from '../../../../WhatsAppShare/SmsShare.jsx';
|
import SMSShare from '../../../../WhatsAppShare/SmsShare.jsx';
|
||||||
import WhatsAppShare from '../../../../WhatsAppShare/whatsAppShare.jsx';
|
import WhatsAppShare from '../../../../WhatsAppShare/whatsAppShare.jsx';
|
||||||
import { MdSms } from 'react-icons/md';
|
import { MdSms } from 'react-icons/md';
|
||||||
import { FaWhatsapp, FaPrint } from 'react-icons/fa';
|
import { FaWhatsapp, FaPrint, FaCartPlus } from 'react-icons/fa';
|
||||||
import BSTipAmount from '../../UtillComponents/BSTipAmount.jsx';
|
import BSTipAmount from '../../UtillComponents/BSTipAmount.jsx';
|
||||||
import { ApplicationPreferences } from '../../../../../Features/BrachLogin/BranchLogin.js';
|
import { ApplicationPreferences } from '../../../../../Features/BrachLogin/BranchLogin.js';
|
||||||
import { PostOtherServices } from '../../../../../Features/OtherServices/OtherServices.js';
|
import { PostOtherServices } from '../../../../../Features/OtherServices/OtherServices.js';
|
||||||
|
|
@ -210,6 +210,7 @@ import UpiPopover from '../StandardTable/Utils/UpiPopOver.jsx';
|
||||||
import PaymentGatewayEmbedded from '../../UtillComponents/PaymentGatewayEmbedded.jsx';
|
import PaymentGatewayEmbedded from '../../UtillComponents/PaymentGatewayEmbedded.jsx';
|
||||||
import MobileMultiPdfPrintTrigger from '../../UtillComponents/MobileMultiPdfPrintTrigger.jsx';
|
import MobileMultiPdfPrintTrigger from '../../UtillComponents/MobileMultiPdfPrintTrigger.jsx';
|
||||||
import { useDateStore } from '../../../../../Features/BookingScreen/BookingData/DateStore.js';
|
import { useDateStore } from '../../../../../Features/BookingScreen/BookingData/DateStore.js';
|
||||||
|
import CustomerOrders from '../../BookingFunctionality/CustomerOrders.jsx';
|
||||||
|
|
||||||
const subDirectory = import.meta.env.ENV_BASE_URL;
|
const subDirectory = import.meta.env.ENV_BASE_URL;
|
||||||
const MainHomeUrl = import.meta.env.ENV_MAIN_BASE_URL;
|
const MainHomeUrl = import.meta.env.ENV_MAIN_BASE_URL;
|
||||||
|
|
@ -3648,7 +3649,41 @@ const BSBillingTable3Pay = () => {
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
{/* Customer Orders */}
|
||||||
|
{GetCustId && (
|
||||||
|
|
||||||
|
<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>
|
||||||
|
)}
|
||||||
{tabledata?.length > 0 && (
|
{tabledata?.length > 0 && (
|
||||||
<>
|
<>
|
||||||
{tableOptions
|
{tableOptions
|
||||||
|
|
@ -4663,6 +4698,23 @@ const BSBillingTable3Pay = () => {
|
||||||
Do you want to cancel the payment?
|
Do you want to cancel the payment?
|
||||||
</Modal>
|
</Modal>
|
||||||
)}
|
)}
|
||||||
|
{customerPreviesOrders && (
|
||||||
|
<DefaultModal
|
||||||
|
open={customerPreviesOrders}
|
||||||
|
handleCancel={() => setCustomerPreviesOrders(false)}
|
||||||
|
footer={false}
|
||||||
|
width={700}
|
||||||
|
className={'ModalPaymentGatewayEmbedded'}
|
||||||
|
children={
|
||||||
|
<>
|
||||||
|
<CustomerOrders
|
||||||
|
CustomerDetails={selOption}
|
||||||
|
close={() => setCustomerPreviesOrders(false)}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import React, { useEffect, useState, useRef } from 'react';
|
||||||
import { shallowEqual, useDispatch, useSelector } from 'react-redux';
|
import { shallowEqual, useDispatch, useSelector } from 'react-redux';
|
||||||
import { useNavigate } from 'react-router-dom';
|
import { useNavigate } from 'react-router-dom';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { Badge, Modal, Popover } from 'antd';
|
import { Badge, Modal, Popover, Tooltip } from 'antd';
|
||||||
import { BiRightArrowAlt } from 'react-icons/bi';
|
import { BiRightArrowAlt } from 'react-icons/bi';
|
||||||
import { AiOutlineClose } from 'react-icons/ai';
|
import { AiOutlineClose } from 'react-icons/ai';
|
||||||
import BSSummery from '../BSBillingTableSummery/BSSummery';
|
import BSSummery from '../BSBillingTableSummery/BSSummery';
|
||||||
|
|
@ -190,7 +190,7 @@ import { getCombolist } from '../../../../../Features/ComboMaster/ComboMaster.js
|
||||||
import WhatsAppShare from '../../../../WhatsAppShare/whatsAppShare.jsx';
|
import WhatsAppShare from '../../../../WhatsAppShare/whatsAppShare.jsx';
|
||||||
import SMSShare from '../../../../WhatsAppShare/SmsShare.jsx';
|
import SMSShare from '../../../../WhatsAppShare/SmsShare.jsx';
|
||||||
import { MdSms } from 'react-icons/md';
|
import { MdSms } from 'react-icons/md';
|
||||||
import { FaWhatsapp, FaPrint } from 'react-icons/fa';
|
import { FaWhatsapp, FaPrint, FaCartPlus } from 'react-icons/fa';
|
||||||
import BSTipAmount from '../../UtillComponents/BSTipAmount.jsx';
|
import BSTipAmount from '../../UtillComponents/BSTipAmount.jsx';
|
||||||
import { ApplicationPreferences } from '../../../../../Features/BrachLogin/BranchLogin.js';
|
import { ApplicationPreferences } from '../../../../../Features/BrachLogin/BranchLogin.js';
|
||||||
import { PostOtherServices } from '../../../../../Features/OtherServices/OtherServices.js';
|
import { PostOtherServices } from '../../../../../Features/OtherServices/OtherServices.js';
|
||||||
|
|
@ -215,6 +215,7 @@ import CardPopover from '../StandardTable/Utils/CardPopover.jsx';
|
||||||
import PaymentGatewayEmbedded from '../../UtillComponents/PaymentGatewayEmbedded.jsx';
|
import PaymentGatewayEmbedded from '../../UtillComponents/PaymentGatewayEmbedded.jsx';
|
||||||
import pozologoimg from '../../../../../Images/pozologoimg.png';
|
import pozologoimg from '../../../../../Images/pozologoimg.png';
|
||||||
import MobileMultiPdfPrintTrigger from '../../UtillComponents/MobileMultiPdfPrintTrigger.jsx';
|
import MobileMultiPdfPrintTrigger from '../../UtillComponents/MobileMultiPdfPrintTrigger.jsx';
|
||||||
|
import CustomerOrders from '../../BookingFunctionality/CustomerOrders.jsx';
|
||||||
|
|
||||||
const subDirectory = import.meta.env.ENV_BASE_URL;
|
const subDirectory = import.meta.env.ENV_BASE_URL;
|
||||||
const MainHomeUrl = import.meta.env.ENV_MAIN_BASE_URL;
|
const MainHomeUrl = import.meta.env.ENV_MAIN_BASE_URL;
|
||||||
|
|
@ -319,6 +320,7 @@ const BSBilling4Payment = () => {
|
||||||
const [paymentModeDisplay, setPaymentModeDisplay] = useState(true);
|
const [paymentModeDisplay, setPaymentModeDisplay] = useState(true);
|
||||||
const [messageType, setMessageType] = useState(null);
|
const [messageType, setMessageType] = useState(null);
|
||||||
const [messageData, setMessageData] = useState(null);
|
const [messageData, setMessageData] = useState(null);
|
||||||
|
const [customerPreviesOrders, setCustomerPreviesOrders] = useState(false);
|
||||||
const SessionData = useSelector(StoredSessionData);
|
const SessionData = useSelector(StoredSessionData);
|
||||||
const AppId = SessionData?.AppId;
|
const AppId = SessionData?.AppId;
|
||||||
const CompId = SessionData?.CompId;
|
const CompId = SessionData?.CompId;
|
||||||
|
|
@ -3701,6 +3703,40 @@ const BSBilling4Payment = () => {
|
||||||
</div>
|
</div>
|
||||||
</TooltipWrapper>
|
</TooltipWrapper>
|
||||||
)}
|
)}
|
||||||
|
{/* Customer Orders */}
|
||||||
|
{GetCustId && (
|
||||||
|
<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>
|
||||||
|
)}
|
||||||
{OtherServicesglobal && OrderCardDetail.length >= 1 && (
|
{OtherServicesglobal && OrderCardDetail.length >= 1 && (
|
||||||
<TooltipWrapper title="Vehicle Number" isMobile={isMobile}>
|
<TooltipWrapper title="Vehicle Number" isMobile={isMobile}>
|
||||||
{' '}
|
{' '}
|
||||||
|
|
@ -4646,6 +4682,23 @@ const BSBilling4Payment = () => {
|
||||||
Do you want to cancel the payment?
|
Do you want to cancel the payment?
|
||||||
</Modal>
|
</Modal>
|
||||||
)}
|
)}
|
||||||
|
{customerPreviesOrders && (
|
||||||
|
<DefaultModal
|
||||||
|
open={customerPreviesOrders}
|
||||||
|
handleCancel={() => setCustomerPreviesOrders(false)}
|
||||||
|
footer={false}
|
||||||
|
width={700}
|
||||||
|
className={'ModalPaymentGatewayEmbedded'}
|
||||||
|
children={
|
||||||
|
<>
|
||||||
|
<CustomerOrders
|
||||||
|
CustomerDetails={selOption}
|
||||||
|
close={() => setCustomerPreviesOrders(false)}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import React, { useEffect, useState, useRef } from 'react';
|
import React, { useEffect, useState, useRef } from 'react';
|
||||||
import { shallowEqual, useDispatch, useSelector } from 'react-redux';
|
import { shallowEqual, useDispatch, useSelector } from 'react-redux';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { Popover, Badge, Modal } from 'antd';
|
import { Popover, Badge, Modal, Tooltip } from 'antd';
|
||||||
import { useNavigate } from 'react-router-dom';
|
import { useNavigate } from 'react-router-dom';
|
||||||
import {
|
import {
|
||||||
UpOutlined,
|
UpOutlined,
|
||||||
|
|
@ -188,7 +188,7 @@ import { getCombolist } from '../../../../../Features/ComboMaster/ComboMaster.js
|
||||||
import WhatsAppShare from '../../../../WhatsAppShare/whatsAppShare.jsx';
|
import WhatsAppShare from '../../../../WhatsAppShare/whatsAppShare.jsx';
|
||||||
import SMSShare from '../../../../WhatsAppShare/SmsShare.jsx';
|
import SMSShare from '../../../../WhatsAppShare/SmsShare.jsx';
|
||||||
import { MdSms } from 'react-icons/md';
|
import { MdSms } from 'react-icons/md';
|
||||||
import { FaWhatsapp, FaPrint } from 'react-icons/fa';
|
import { FaWhatsapp, FaPrint, FaCartPlus } from 'react-icons/fa';
|
||||||
import BSTipAmount from '../../UtillComponents/BSTipAmount.jsx';
|
import BSTipAmount from '../../UtillComponents/BSTipAmount.jsx';
|
||||||
import { ApplicationPreferences } from '../../../../../Features/BrachLogin/BranchLogin.js';
|
import { ApplicationPreferences } from '../../../../../Features/BrachLogin/BranchLogin.js';
|
||||||
import { PostOtherServices } from '../../../../../Features/OtherServices/OtherServices.js';
|
import { PostOtherServices } from '../../../../../Features/OtherServices/OtherServices.js';
|
||||||
|
|
@ -381,6 +381,7 @@ const BSBillingTable5 = () => {
|
||||||
const defaultPaymentTrigger = useSelector(GlobalPaymentTrigger);
|
const defaultPaymentTrigger = useSelector(GlobalPaymentTrigger);
|
||||||
const [defaultPaymentMode, setDefaultPaymentMode] = useState([]);
|
const [defaultPaymentMode, setDefaultPaymentMode] = useState([]);
|
||||||
const [defaultEnabled, setDefaultEnabled] = useState(false);
|
const [defaultEnabled, setDefaultEnabled] = useState(false);
|
||||||
|
const [customerPreviesOrders, setCustomerPreviesOrders] = useState(false);
|
||||||
// Usage
|
// Usage
|
||||||
const allowedNames = ['whatsapp', 'Print', 'SMS'];
|
const allowedNames = ['whatsapp', 'Print', 'SMS'];
|
||||||
const [MobileNoWhatsApp, setMobileNoWhatsApp] = useState();
|
const [MobileNoWhatsApp, setMobileNoWhatsApp] = useState();
|
||||||
|
|
@ -3956,7 +3957,40 @@ const BSBillingTable5 = () => {
|
||||||
) : (
|
) : (
|
||||||
''
|
''
|
||||||
)}
|
)}
|
||||||
|
{/* Customer Orders */}
|
||||||
|
{GetCustId && (
|
||||||
|
<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>
|
||||||
|
)}
|
||||||
{tabledata?.length > 0 && dinePreference && (
|
{tabledata?.length > 0 && dinePreference && (
|
||||||
<div style={{ width: '2rem' }}>
|
<div style={{ width: '2rem' }}>
|
||||||
{tableOptions
|
{tableOptions
|
||||||
|
|
@ -4595,6 +4629,23 @@ const BSBillingTable5 = () => {
|
||||||
Do you want to cancel the payment?
|
Do you want to cancel the payment?
|
||||||
</Modal>
|
</Modal>
|
||||||
)}
|
)}
|
||||||
|
{customerPreviesOrders && (
|
||||||
|
<DefaultModal
|
||||||
|
open={customerPreviesOrders}
|
||||||
|
handleCancel={() => setCustomerPreviesOrders(false)}
|
||||||
|
footer={false}
|
||||||
|
width={700}
|
||||||
|
className={'ModalPaymentGatewayEmbedded'}
|
||||||
|
children={
|
||||||
|
<>
|
||||||
|
<CustomerOrders
|
||||||
|
CustomerDetails={selOption}
|
||||||
|
close={() => setCustomerPreviesOrders(false)}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import { AiOutlineClose, AiOutlineArrowRight } from 'react-icons/ai';
|
||||||
import { Tables } from '../../../../../Components/Tables/Table';
|
import { Tables } from '../../../../../Components/Tables/Table';
|
||||||
import { DefaultModal } from '../../../../../Components/Modal/DefaultModal.jsx';
|
import { DefaultModal } from '../../../../../Components/Modal/DefaultModal.jsx';
|
||||||
import { UpCircleOutlined, UpOutlined } from '@ant-design/icons';
|
import { UpCircleOutlined, UpOutlined } from '@ant-design/icons';
|
||||||
import { Popover, Badge, Modal } from 'antd';
|
import { Popover, Badge, Modal, Tooltip } from 'antd';
|
||||||
import {
|
import {
|
||||||
printDiv,
|
printDiv,
|
||||||
extractLastNumberOrderId,
|
extractLastNumberOrderId,
|
||||||
|
|
@ -187,7 +187,7 @@ import { getCombolist } from '../../../../../Features/ComboMaster/ComboMaster.js
|
||||||
import WhatsAppShare from '../../../../WhatsAppShare/whatsAppShare.jsx';
|
import WhatsAppShare from '../../../../WhatsAppShare/whatsAppShare.jsx';
|
||||||
import SMSShare from '../../../../WhatsAppShare/SmsShare.jsx';
|
import SMSShare from '../../../../WhatsAppShare/SmsShare.jsx';
|
||||||
import { MdSms } from 'react-icons/md';
|
import { MdSms } from 'react-icons/md';
|
||||||
import { FaWhatsapp, FaPrint } from 'react-icons/fa';
|
import { FaWhatsapp, FaPrint, FaCartPlus } from 'react-icons/fa';
|
||||||
import BSTipAmount from '../../UtillComponents/BSTipAmount.jsx';
|
import BSTipAmount from '../../UtillComponents/BSTipAmount.jsx';
|
||||||
import { ApplicationPreferences } from '../../../../../Features/BrachLogin/BranchLogin.js';
|
import { ApplicationPreferences } from '../../../../../Features/BrachLogin/BranchLogin.js';
|
||||||
import { TfiClipboard } from 'react-icons/tfi';
|
import { TfiClipboard } from 'react-icons/tfi';
|
||||||
|
|
@ -211,6 +211,7 @@ import PaymentGatewayEmbedded from '../../UtillComponents/PaymentGatewayEmbedded
|
||||||
import pozologoimg from '../../../../../Images/pozologoimg.png';
|
import pozologoimg from '../../../../../Images/pozologoimg.png';
|
||||||
import MobileMultiPdfPrintTrigger from '../../UtillComponents/MobileMultiPdfPrintTrigger.jsx';
|
import MobileMultiPdfPrintTrigger from '../../UtillComponents/MobileMultiPdfPrintTrigger.jsx';
|
||||||
import { useDateStore } from '../../../../../Features/BookingScreen/BookingData/DateStore.js';
|
import { useDateStore } from '../../../../../Features/BookingScreen/BookingData/DateStore.js';
|
||||||
|
import CustomerOrders from '../../BookingFunctionality/CustomerOrders.jsx';
|
||||||
|
|
||||||
const subDirectory = import.meta.env.ENV_BASE_URL;
|
const subDirectory = import.meta.env.ENV_BASE_URL;
|
||||||
const MainHomeUrl = import.meta.env.ENV_MAIN_BASE_URL;
|
const MainHomeUrl = import.meta.env.ENV_MAIN_BASE_URL;
|
||||||
|
|
@ -360,6 +361,7 @@ const BST6Payment = () => {
|
||||||
const [UpiPayOption, setUpiPayOption] = useState([]);
|
const [UpiPayOption, setUpiPayOption] = useState([]);
|
||||||
const [CardPayOption, setCardPayOption] = useState([]);
|
const [CardPayOption, setCardPayOption] = useState([]);
|
||||||
const [Splitpayment, setSplitpayment] = useState(false);
|
const [Splitpayment, setSplitpayment] = useState(false);
|
||||||
|
const [customerPreviesOrders, setCustomerPreviesOrders] = useState(false);
|
||||||
|
|
||||||
//Total calculation
|
//Total calculation
|
||||||
const [failedOrderData, setFailedOrderData] = useState();
|
const [failedOrderData, setFailedOrderData] = useState();
|
||||||
|
|
@ -3998,6 +4000,40 @@ const BST6Payment = () => {
|
||||||
) : (
|
) : (
|
||||||
''
|
''
|
||||||
)}
|
)}
|
||||||
|
{/* Customer Orders */}
|
||||||
|
{GetCustId && (
|
||||||
|
<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>
|
||||||
|
)}
|
||||||
{tabledata?.length > 0 && dinePreference && (
|
{tabledata?.length > 0 && dinePreference && (
|
||||||
<div style={{ width: '2rem' }}>
|
<div style={{ width: '2rem' }}>
|
||||||
{tableOptions
|
{tableOptions
|
||||||
|
|
@ -4531,7 +4567,23 @@ const BST6Payment = () => {
|
||||||
)
|
)
|
||||||
// ))
|
// ))
|
||||||
}
|
}
|
||||||
|
{customerPreviesOrders && (
|
||||||
|
<DefaultModal
|
||||||
|
open={customerPreviesOrders}
|
||||||
|
handleCancel={() => setCustomerPreviesOrders(false)}
|
||||||
|
footer={false}
|
||||||
|
width={700}
|
||||||
|
className={'ModalPaymentGatewayEmbedded'}
|
||||||
|
children={
|
||||||
|
<>
|
||||||
|
<CustomerOrders
|
||||||
|
CustomerDetails={selOption}
|
||||||
|
close={() => setCustomerPreviesOrders(false)}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
<DefaultModal
|
<DefaultModal
|
||||||
className={'paymentoptionsModal'}
|
className={'paymentoptionsModal'}
|
||||||
open={OtherServicesModal}
|
open={OtherServicesModal}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import React, { useEffect, useState, useRef } from 'react';
|
||||||
import { shallowEqual, useDispatch, useSelector } from 'react-redux';
|
import { shallowEqual, useDispatch, useSelector } from 'react-redux';
|
||||||
import { useNavigate } from 'react-router-dom';
|
import { useNavigate } from 'react-router-dom';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { Badge, Popover, Modal } from 'antd';
|
import { Badge, Popover, Modal, Tooltip } from 'antd';
|
||||||
import { BiRightArrowAlt } from 'react-icons/bi';
|
import { BiRightArrowAlt } from 'react-icons/bi';
|
||||||
import { AiOutlineClose } from 'react-icons/ai';
|
import { AiOutlineClose } from 'react-icons/ai';
|
||||||
import BSSummery from '../BSBillingTableSummery/BSSummery.jsx';
|
import BSSummery from '../BSBillingTableSummery/BSSummery.jsx';
|
||||||
|
|
@ -185,7 +185,7 @@ import { getCombolist } from '../../../../../Features/ComboMaster/ComboMaster.js
|
||||||
import WhatsAppShare from '../../../../WhatsAppShare/whatsAppShare.jsx';
|
import WhatsAppShare from '../../../../WhatsAppShare/whatsAppShare.jsx';
|
||||||
import SMSShare from '../../../../WhatsAppShare/SmsShare.jsx';
|
import SMSShare from '../../../../WhatsAppShare/SmsShare.jsx';
|
||||||
import { MdSms } from 'react-icons/md';
|
import { MdSms } from 'react-icons/md';
|
||||||
import { FaWhatsapp, FaPrint } from 'react-icons/fa';
|
import { FaWhatsapp, FaPrint, FaCartPlus } from 'react-icons/fa';
|
||||||
import BSTipAmount from '../../UtillComponents/BSTipAmount.jsx';
|
import BSTipAmount from '../../UtillComponents/BSTipAmount.jsx';
|
||||||
import { ApplicationPreferences } from '../../../../../Features/BrachLogin/BranchLogin.js';
|
import { ApplicationPreferences } from '../../../../../Features/BrachLogin/BranchLogin.js';
|
||||||
import { TfiClipboard } from 'react-icons/tfi';
|
import { TfiClipboard } from 'react-icons/tfi';
|
||||||
|
|
@ -209,7 +209,7 @@ import pozologoimg from '../../../../../Images/pozologoimg.png';
|
||||||
import PaymentGatewayEmbedded from '../../UtillComponents/PaymentGatewayEmbedded.jsx';
|
import PaymentGatewayEmbedded from '../../UtillComponents/PaymentGatewayEmbedded.jsx';
|
||||||
import MobileMultiPdfPrintTrigger from '../../UtillComponents/MobileMultiPdfPrintTrigger.jsx';
|
import MobileMultiPdfPrintTrigger from '../../UtillComponents/MobileMultiPdfPrintTrigger.jsx';
|
||||||
import { useDateStore } from '../../../../../Features/BookingScreen/BookingData/DateStore.js';
|
import { useDateStore } from '../../../../../Features/BookingScreen/BookingData/DateStore.js';
|
||||||
|
import CustomerOrders from '../../BookingFunctionality/CustomerOrders.jsx';
|
||||||
const subDirectory = import.meta.env.ENV_BASE_URL;
|
const subDirectory = import.meta.env.ENV_BASE_URL;
|
||||||
const MainHomeUrl = import.meta.env.ENV_MAIN_BASE_URL;
|
const MainHomeUrl = import.meta.env.ENV_MAIN_BASE_URL;
|
||||||
const RetailApiurl = import.meta.env.ENV_API_URL;
|
const RetailApiurl = import.meta.env.ENV_API_URL;
|
||||||
|
|
@ -329,7 +329,7 @@ const BSBilling7Payment = () => {
|
||||||
const [hold, setHold] = useState(false);
|
const [hold, setHold] = useState(false);
|
||||||
const [addcustomer, setAddCustomer] = useState(false);
|
const [addcustomer, setAddCustomer] = useState(false);
|
||||||
const [PrintOrderDetails, setPrintOrderDetails] = useState([]);
|
const [PrintOrderDetails, setPrintOrderDetails] = useState([]);
|
||||||
const OverAllSales = useSelector(GlobalOverAllDiscSales);
|
const [customerPreviesOrders, setCustomerPreviesOrders] = useState(false); const OverAllSales = useSelector(GlobalOverAllDiscSales);
|
||||||
const OverAllEstimate = useSelector(GlobalOverAllDiscEstimate);
|
const OverAllEstimate = useSelector(GlobalOverAllDiscEstimate);
|
||||||
//Total calculation
|
//Total calculation
|
||||||
const TotalItems = OrderCardDetail?.length;
|
const TotalItems = OrderCardDetail?.length;
|
||||||
|
|
@ -3556,6 +3556,41 @@ const BSBilling7Payment = () => {
|
||||||
) : (
|
) : (
|
||||||
''
|
''
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{/* Customer Orders */}
|
||||||
|
{GetCustId && (
|
||||||
|
<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>
|
||||||
|
)}
|
||||||
{tabledata?.length > 0 && dinePreference && (
|
{tabledata?.length > 0 && dinePreference && (
|
||||||
<div style={{ width: '2rem' }}>
|
<div style={{ width: '2rem' }}>
|
||||||
{tableOptions
|
{tableOptions
|
||||||
|
|
@ -4638,6 +4673,23 @@ const BSBilling7Payment = () => {
|
||||||
Do you want to cancel the payment?
|
Do you want to cancel the payment?
|
||||||
</Modal>
|
</Modal>
|
||||||
)}
|
)}
|
||||||
|
{customerPreviesOrders && (
|
||||||
|
<DefaultModal
|
||||||
|
open={customerPreviesOrders}
|
||||||
|
handleCancel={() => setCustomerPreviesOrders(false)}
|
||||||
|
footer={false}
|
||||||
|
width={700}
|
||||||
|
className={'ModalPaymentGatewayEmbedded'}
|
||||||
|
children={
|
||||||
|
<>
|
||||||
|
<CustomerOrders
|
||||||
|
CustomerDetails={selOption}
|
||||||
|
close={() => setCustomerPreviesOrders(false)}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import {
|
import {
|
||||||
FaAngleDown,
|
FaAngleDown,
|
||||||
|
FaCartPlus,
|
||||||
FaMoneyBillWave,
|
FaMoneyBillWave,
|
||||||
FaPrint,
|
FaPrint,
|
||||||
FaWhatsapp,
|
FaWhatsapp,
|
||||||
|
|
@ -200,6 +201,7 @@ import {
|
||||||
getLowStockAlertProductsList,
|
getLowStockAlertProductsList,
|
||||||
} from '../../../../../Features/ProductPage/ProductPage.js';
|
} from '../../../../../Features/ProductPage/ProductPage.js';
|
||||||
import { PostBlockSlots } from '../../../../../Features/Kiosk/kiosk.js';
|
import { PostBlockSlots } from '../../../../../Features/Kiosk/kiosk.js';
|
||||||
|
import CustomerOrders from '../../BookingFunctionality/CustomerOrders.jsx';
|
||||||
const subDirectory = import.meta.env.ENV_BASE_URL;
|
const subDirectory = import.meta.env.ENV_BASE_URL;
|
||||||
const MainHomeUrl = import.meta.env.ENV_MAIN_BASE_URL;
|
const MainHomeUrl = import.meta.env.ENV_MAIN_BASE_URL;
|
||||||
const RetailApiurl = import.meta.env.ENV_API_URL;
|
const RetailApiurl = import.meta.env.ENV_API_URL;
|
||||||
|
|
@ -342,6 +344,7 @@ const StandardTablePayment = () => {
|
||||||
const [showCancelConfirm, setShowCancelConfirm] = useState(false);
|
const [showCancelConfirm, setShowCancelConfirm] = useState(false);
|
||||||
const [creditCustomerOpen, setcreditCustomerOpen] = useState(false);
|
const [creditCustomerOpen, setcreditCustomerOpen] = useState(false);
|
||||||
const [Splitpayment, setSplitpayment] = useState(false);
|
const [Splitpayment, setSplitpayment] = useState(false);
|
||||||
|
const [customerPreviesOrders, setCustomerPreviesOrders] = useState(false);
|
||||||
const [PrintOrderDetails, setPrintOrderDetails] = useState([]);
|
const [PrintOrderDetails, setPrintOrderDetails] = useState([]);
|
||||||
const [PaymentUpiOptions, setPaymentUpiOptions] = useState([]);
|
const [PaymentUpiOptions, setPaymentUpiOptions] = useState([]);
|
||||||
const [PaymentDeviceCard, setPaymentDeviceCard] = useState([]);
|
const [PaymentDeviceCard, setPaymentDeviceCard] = useState([]);
|
||||||
|
|
@ -3430,6 +3433,42 @@ const StandardTablePayment = () => {
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{/* Customer Orders */}
|
||||||
|
{GetCustId && (
|
||||||
|
|
||||||
|
<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>
|
||||||
|
)}
|
||||||
|
|
||||||
{tabledata?.length > 0 && dinePreference && (
|
{tabledata?.length > 0 && dinePreference && (
|
||||||
<div style={{ width: '2rem' }}>
|
<div style={{ width: '2rem' }}>
|
||||||
{tableOptions
|
{tableOptions
|
||||||
|
|
@ -3975,6 +4014,23 @@ const StandardTablePayment = () => {
|
||||||
Do you want to cancel the payment?
|
Do you want to cancel the payment?
|
||||||
</Modal>
|
</Modal>
|
||||||
)}
|
)}
|
||||||
|
{customerPreviesOrders && (
|
||||||
|
<DefaultModal
|
||||||
|
open={customerPreviesOrders}
|
||||||
|
handleCancel={() => setCustomerPreviesOrders(false)}
|
||||||
|
footer={false}
|
||||||
|
width={700}
|
||||||
|
className={'ModalPaymentGatewayEmbedded'}
|
||||||
|
children={
|
||||||
|
<>
|
||||||
|
<CustomerOrders
|
||||||
|
CustomerDetails={selOption}
|
||||||
|
close={() => setCustomerPreviesOrders(false)}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
{
|
{
|
||||||
OtherServicesPrintDetails?.length > 0 && (
|
OtherServicesPrintDetails?.length > 0 && (
|
||||||
// PrintOrderDetails?.[0]?.OrderDetails?.map((orderDetail, index) => (
|
// PrintOrderDetails?.[0]?.OrderDetails?.map((orderDetail, index) => (
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,339 @@
|
||||||
|
import { useDispatch } from "react-redux";
|
||||||
|
import { changeOrderCardDetails, CustomerOrderList, getProductsearch } from "../../../../Features/BookingScreen/BookingData/BookingData";
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
|
import { ExtractDateFormate, getSession } from "../../../../Services/Others";
|
||||||
|
import { Tables } from "../../../../Components/Tables/Table";
|
||||||
|
import { IoEye } from "react-icons/io5";
|
||||||
|
import { DatePicker, Modal } from "antd";
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
|
|
||||||
|
const CustomerOrders = ({ CustomerDetails, close }) => {
|
||||||
|
|
||||||
|
const CompId = getSession('CompId');
|
||||||
|
const BranchId = getSession('BranchId');
|
||||||
|
const AppId = getSession('AppId');
|
||||||
|
const { RangePicker } = DatePicker;
|
||||||
|
const dispatch = useDispatch();
|
||||||
|
const [custpmerOrderData, setCustpmerOrderData] = useState();
|
||||||
|
console.log(CustomerDetails, 'CustomerDetails');
|
||||||
|
|
||||||
|
const [page, setpage] = useState(1);
|
||||||
|
const [selectedProducts, setSelectedProducts] = useState();
|
||||||
|
const [productModal, setProductModal] = useState(false);
|
||||||
|
const [selectedRange, setSelectedRange] = useState([dayjs(), dayjs()]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
setSelectedRange([dayjs(), dayjs()]);
|
||||||
|
customerFetch();
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (selectedRange && selectedRange[0] && selectedRange[1]) {
|
||||||
|
customerFetch();
|
||||||
|
}
|
||||||
|
}, [selectedRange]);
|
||||||
|
|
||||||
|
const getApiRange = () => {
|
||||||
|
if (!selectedRange || !selectedRange[0] || !selectedRange[1]) return { fromDate: '', toDate: '' };
|
||||||
|
|
||||||
|
return {
|
||||||
|
fromDate: selectedRange[0].format('YYYY-MM-DD'),
|
||||||
|
toDate: selectedRange[1].format('YYYY-MM-DD'),
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
const customerFetch = async () => {
|
||||||
|
const { fromDate, toDate } = getApiRange();
|
||||||
|
const data = {
|
||||||
|
AppId: AppId,
|
||||||
|
BranchId: BranchId,
|
||||||
|
CompId: CompId,
|
||||||
|
MobileNo: CustomerDetails?.value,
|
||||||
|
FromDate: fromDate,
|
||||||
|
ToDate: toDate,
|
||||||
|
}
|
||||||
|
const response = await dispatch(CustomerOrderList(data)).unwrap();
|
||||||
|
if (response?.data?.statusCode === 1) {
|
||||||
|
setCustpmerOrderData(response?.data?.data)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setCustpmerOrderData()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const ViewProductdetails = (products) => {
|
||||||
|
setSelectedProducts(products);
|
||||||
|
setProductModal(true);
|
||||||
|
};
|
||||||
|
const handlePageChange = (current) => {
|
||||||
|
setpage(current);
|
||||||
|
};
|
||||||
|
// const handleRowDataClick = (record) => {
|
||||||
|
// dispatch(changeOrderCardDetails(record?.productDetails));
|
||||||
|
// close();
|
||||||
|
// };
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const getProductsearchData = async (prodName) => {
|
||||||
|
const data = {
|
||||||
|
CompId,
|
||||||
|
BranchId,
|
||||||
|
AppId,
|
||||||
|
ProdName: prodName
|
||||||
|
}
|
||||||
|
const response = await dispatch(getProductsearch(data)).unwrap();
|
||||||
|
console.log(response, 'response23232323');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleRowDataClick = (record) => {
|
||||||
|
if (!record?.productDetails?.length) return;
|
||||||
|
const prodName = record.productDetails[0]?.ProdName;
|
||||||
|
getProductsearchData(prodName);
|
||||||
|
|
||||||
|
console.log(record.productDetails[0]?.ProdName, 'record?.productDetails');
|
||||||
|
|
||||||
|
const formattedData = record.productDetails.map((prod) => ({
|
||||||
|
ProdCat: prod.ProdCat,
|
||||||
|
Type: prod.Type,
|
||||||
|
|
||||||
|
OverallQuantity: prod.OverallQuantity ?? 0,
|
||||||
|
ActiveStatus: record.ActiveStatus,
|
||||||
|
|
||||||
|
AvailableFrom: prod.AvailableFrom,
|
||||||
|
AvailableTo: prod.AvailableTo,
|
||||||
|
|
||||||
|
Cess: prod.Cess ?? 0,
|
||||||
|
HSNCode: prod.HSN ?? null,
|
||||||
|
|
||||||
|
BrandName: prod.BrandName ?? null,
|
||||||
|
OpeningQty: prod.OpeningQty ?? 0,
|
||||||
|
PartNumber: prod.PartNumber ?? null,
|
||||||
|
|
||||||
|
ProdId: prod.ProdId,
|
||||||
|
ProdLogo: prod.ProdLogo ?? null,
|
||||||
|
ProdName: prod.ProdName,
|
||||||
|
|
||||||
|
QRCode: prod.QRCode ?? null,
|
||||||
|
QtyBasedPrice: prod.QtyBasedPrice ?? null,
|
||||||
|
Rack: prod.Rack ?? null,
|
||||||
|
Size: prod.Size,
|
||||||
|
|
||||||
|
StockAvailable: prod.StockAvailable ?? null,
|
||||||
|
TokenAvailable: prod.TokenAvailable ?? null,
|
||||||
|
|
||||||
|
TaxId: prod.ProdTaxId ?? null,
|
||||||
|
TaxPercentage: prod.ProdTaxPercentage ?? 0,
|
||||||
|
TaxName: prod.TaxName ?? null,
|
||||||
|
|
||||||
|
UniqueId: prod.UniqueId ?? null,
|
||||||
|
UomName: prod.UomName,
|
||||||
|
|
||||||
|
SinglePc: prod.SinglePc ?? null,
|
||||||
|
NoOfPcs: prod.NoOfPcs ?? 0,
|
||||||
|
|
||||||
|
ProdVariantName: prod.ProdVariantName ?? null,
|
||||||
|
VariantAvailableFrom: prod.VariantAvailableFrom ?? null,
|
||||||
|
VariantAvailableTo: prod.VariantAvailableTo ?? null,
|
||||||
|
|
||||||
|
BalanceQty: prod.BalanceQty ?? 0,
|
||||||
|
BatchRef: prod.BatchRef ?? null,
|
||||||
|
|
||||||
|
FullProductIdentifierDtls: prod.ProductIdentifierDtls ?? [],
|
||||||
|
|
||||||
|
InwardDate: prod.BookingDate ?? null,
|
||||||
|
InwardDtlId: prod.InwardDtlId ?? null,
|
||||||
|
InwardId: prod.InwardId ?? null,
|
||||||
|
|
||||||
|
MRP: prod.MRP ?? 0,
|
||||||
|
OrderRate: prod.Rate ?? 0,
|
||||||
|
SellingPrice: prod.Rate ?? 0,
|
||||||
|
|
||||||
|
SuppId: prod.SuppId ?? null,
|
||||||
|
SuppName: prod.SuppName ?? null,
|
||||||
|
|
||||||
|
OverAllPcs: prod.OverAllPcs ?? 0,
|
||||||
|
Offer: prod.OfferAmt ?? 0,
|
||||||
|
|
||||||
|
BookingTypeName: prod.BookingTypeName ?? null,
|
||||||
|
CounterName: prod.CounterName ?? null,
|
||||||
|
|
||||||
|
DiscountLimitType: prod.DiscountLimitType ?? null,
|
||||||
|
DiscountLimit: prod.DiscountLimit ?? 0,
|
||||||
|
|
||||||
|
BookedDate: prod.BookedDate ?? [],
|
||||||
|
BalanceBookedQty: prod.BalanceBookedQty ?? null,
|
||||||
|
|
||||||
|
ScaleType: prod.ScaleType ?? "",
|
||||||
|
|
||||||
|
localId: prod.localId ?? uuidv4(),
|
||||||
|
|
||||||
|
OrderQty: prod.SalesQty ?? 0,
|
||||||
|
TotalAmt: prod.TotalAmt ?? 0,
|
||||||
|
TaxAmt: prod.TaxAmt ?? 0,
|
||||||
|
WithoutTaxRate: prod.WithoutTaxRate ?? 0,
|
||||||
|
}));
|
||||||
|
|
||||||
|
dispatch(changeOrderCardDetails(formattedData));
|
||||||
|
close();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const columns = [
|
||||||
|
{
|
||||||
|
title: 'Sl.No',
|
||||||
|
key: 'sno',
|
||||||
|
align: 'center',
|
||||||
|
render: (_, __, index) => (page - 1) * 10 + index + 1,
|
||||||
|
onCell: (record) => ({
|
||||||
|
onClick: () => handleRowDataClick(record),
|
||||||
|
style: { cursor: 'pointer' },
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Sales Date',
|
||||||
|
dataIndex: 'SalesDate',
|
||||||
|
key: 'SalesDate',
|
||||||
|
align: 'center',
|
||||||
|
render: (text) => ExtractDateFormate(text),
|
||||||
|
onCell: (record) => ({
|
||||||
|
onClick: () => handleRowDataClick(record),
|
||||||
|
style: { cursor: 'pointer' },
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Amount',
|
||||||
|
dataIndex: 'NetAmount',
|
||||||
|
key: 'NetAmount',
|
||||||
|
align: 'center',
|
||||||
|
onCell: (record) => ({
|
||||||
|
onClick: () => handleRowDataClick(record),
|
||||||
|
style: { cursor: 'pointer' },
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
title: 'No of Products',
|
||||||
|
key: 'productCount',
|
||||||
|
align: 'center',
|
||||||
|
render: (_, record) => (
|
||||||
|
<span
|
||||||
|
style={{ color: '#1292EE', fontSize: '16px', cursor: 'pointer' }}
|
||||||
|
onClick={(e) => {
|
||||||
|
e.stopPropagation(); // 👈 IMPORTANT
|
||||||
|
ViewProductdetails(record.productDetails);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{record?.productDetails?.length || 0}
|
||||||
|
</span>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const productColumns = [
|
||||||
|
{
|
||||||
|
title: 'Sl.No',
|
||||||
|
key: 'sno',
|
||||||
|
align: 'center',
|
||||||
|
render: (_, __, index) => index + 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Product Name',
|
||||||
|
dataIndex: 'ProdName',
|
||||||
|
key: 'ProdName',
|
||||||
|
align: 'center',
|
||||||
|
render: (_, record) =>
|
||||||
|
`${record?.ProdName || '-'}${record?.UomName ? ` ${record.Size + record.UomName}` : ''}`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Qty',
|
||||||
|
dataIndex: 'SalesQty',
|
||||||
|
key: 'SalesQty',
|
||||||
|
align: 'center',
|
||||||
|
render: (_, record) =>
|
||||||
|
record?.SalesQty || '-',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Variant',
|
||||||
|
key: 'ProdVariantName',
|
||||||
|
align: 'ProdVariantName',
|
||||||
|
render: (_, record) =>
|
||||||
|
record?.ProdVariantName || '-',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Rate',
|
||||||
|
key: 'Rate',
|
||||||
|
align: 'right',
|
||||||
|
render: (_, record) =>
|
||||||
|
record?.Rate || 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'MRP',
|
||||||
|
key: 'MRP',
|
||||||
|
align: 'right',
|
||||||
|
render: (_, record) =>
|
||||||
|
record?.MRP || 0,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const disableFutureDates = (current) => {
|
||||||
|
return current && current > dayjs().endOf('day');
|
||||||
|
};
|
||||||
|
const onRangeChange = (dates) => {
|
||||||
|
setSelectedRange(dates);
|
||||||
|
};
|
||||||
|
const getRangePickerValue = () => selectedRange || [dayjs(), dayjs()];
|
||||||
|
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
|
||||||
|
<div>
|
||||||
|
<p>Customer Name : {CustomerDetails?.CustName}</p>
|
||||||
|
<p>Customer Name : {CustomerDetails?.value}</p>
|
||||||
|
</div>
|
||||||
|
<div className='fromlabelDate'>
|
||||||
|
<label>Select Date</label>
|
||||||
|
<RangePicker
|
||||||
|
onChange={onRangeChange}
|
||||||
|
format="DD-MMM-YYYY" // display format
|
||||||
|
disabledDate={disableFutureDates}
|
||||||
|
inputReadOnly={true}
|
||||||
|
value={getRangePickerValue()}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="reportTable">
|
||||||
|
<Tables
|
||||||
|
columns={columns}
|
||||||
|
data={custpmerOrderData}
|
||||||
|
dataSource={custpmerOrderData}
|
||||||
|
pagination={handlePageChange}
|
||||||
|
/>{' '}
|
||||||
|
|
||||||
|
|
||||||
|
<Modal
|
||||||
|
open={productModal}
|
||||||
|
title="Product Details"
|
||||||
|
width={700}
|
||||||
|
footer={null}
|
||||||
|
onCancel={() => setProductModal(false)}
|
||||||
|
>
|
||||||
|
<Tables
|
||||||
|
columns={productColumns}
|
||||||
|
data={selectedProducts}
|
||||||
|
pagination={false}
|
||||||
|
/>
|
||||||
|
</Modal>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default CustomerOrders;
|
||||||
4680
src/check.jsx
4680
src/check.jsx
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue