Merge pull request 'Optimization Code' (#161) from FridayOptim into main
Reviewed-on: Pozomind/pozo-retail-app#161
This commit is contained in:
commit
f717c55f67
File diff suppressed because it is too large
Load Diff
|
|
@ -53,6 +53,9 @@ export default function AddProduct({ products, setProducts }) {
|
|||
return (
|
||||
<div className="add-product__container">
|
||||
<div className="add-product__header">
|
||||
<div>
|
||||
Add Product
|
||||
</div>
|
||||
<button className="add-product__add-btn" onClick={addRow}>+ Add Row</button>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
import React from 'react';
|
||||
import React, { lazy } from 'react';
|
||||
import { DefaultModal } from './DefaultModal';
|
||||
import StockReceived from '../../Pages/StockTransfer/StockReceived';
|
||||
import Buttons from '../Forms/Buttons';
|
||||
import { BiPlus } from 'react-icons/bi';
|
||||
import { ArrowRightOutlined } from '@ant-design/icons';
|
||||
const StockReceived = lazy(
|
||||
() => import('../../Pages/StockTransfer/StockReceived.jsx')
|
||||
);
|
||||
|
||||
const ProductDetailsModal = ({
|
||||
open,
|
||||
|
|
@ -11,7 +13,7 @@ const ProductDetailsModal = ({
|
|||
productDetails,
|
||||
headerData,
|
||||
onDataChange,
|
||||
onSubmit
|
||||
onSubmit,
|
||||
}) => {
|
||||
return (
|
||||
<DefaultModal
|
||||
|
|
@ -23,17 +25,34 @@ const ProductDetailsModal = ({
|
|||
>
|
||||
<div style={{ overflowX: 'auto' }}>
|
||||
{headerData && (
|
||||
<div style={{
|
||||
display: 'flex',
|
||||
gap: '20px',
|
||||
marginBottom: '15px',
|
||||
padding: '10px',
|
||||
backgroundColor: '#f5f5f5',
|
||||
borderRadius: '4px'
|
||||
}}>
|
||||
<div><strong>Dispatch Id:</strong> <span style={{fontSize:"12px"}}> {headerData.Dispatch_Id} </span> </div>
|
||||
<div><strong>Date & Time:</strong> <span style={{fontSize:"12px"}}> {headerData.dateTime} </span></div>
|
||||
<div><strong>From Branch:</strong> <span style={{fontSize:"12px"}}> {headerData.fromBranch} </span> </div>
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
gap: '20px',
|
||||
marginBottom: '15px',
|
||||
padding: '10px',
|
||||
backgroundColor: '#f5f5f5',
|
||||
borderRadius: '4px',
|
||||
}}
|
||||
>
|
||||
<div>
|
||||
<strong>Dispatch Id:</strong>{' '}
|
||||
<span style={{ fontSize: '12px' }}>
|
||||
{' '}
|
||||
{headerData.Dispatch_Id}{' '}
|
||||
</span>{' '}
|
||||
</div>
|
||||
<div>
|
||||
<strong>Date & Time:</strong>{' '}
|
||||
<span style={{ fontSize: '12px' }}> {headerData.dateTime} </span>
|
||||
</div>
|
||||
<div>
|
||||
<strong>From Branch:</strong>{' '}
|
||||
<span style={{ fontSize: '12px' }}>
|
||||
{' '}
|
||||
{headerData.fromBranch}{' '}
|
||||
</span>{' '}
|
||||
</div>
|
||||
{/* <div><strong>dispatched By</strong> {headerData.Created_By}</div> */}
|
||||
</div>
|
||||
)}
|
||||
|
|
@ -43,12 +62,14 @@ const ProductDetailsModal = ({
|
|||
editable={true}
|
||||
/>
|
||||
|
||||
<div style={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
paddingTop: "10px",
|
||||
flexDirection: "row-reverse"
|
||||
}}>
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
paddingTop: '10px',
|
||||
flexDirection: 'row-reverse',
|
||||
}}
|
||||
>
|
||||
<Buttons
|
||||
buttonText={'SUBMIT'}
|
||||
handleSubmit={onSubmit}
|
||||
|
|
@ -63,4 +84,4 @@ const ProductDetailsModal = ({
|
|||
);
|
||||
};
|
||||
|
||||
export default ProductDetailsModal;
|
||||
export default ProductDetailsModal;
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
import React from 'react';
|
||||
import { DefaultModal } from './DefaultModal';
|
||||
import { Tables } from '../Tables/Table';
|
||||
import "./ReceivedStockModel.scss"
|
||||
import './ReceivedStockModel.scss';
|
||||
const ReceivedStocksModal = ({
|
||||
open,
|
||||
onClose,
|
||||
columns,
|
||||
tableData,
|
||||
handlePageChange,
|
||||
customTable = false
|
||||
customTable = false,
|
||||
}) => {
|
||||
const renderCell = (column, row, index) => {
|
||||
if (column.render) {
|
||||
|
|
@ -28,24 +28,32 @@ const ReceivedStocksModal = ({
|
|||
className={'receive-stocks-modal'}
|
||||
>
|
||||
<>
|
||||
|
||||
{!customTable && <div style={{overflowX:"auto"}}>
|
||||
|
||||
<Tables
|
||||
columns={columns}
|
||||
data={tableData}
|
||||
dataSource={tableData}
|
||||
pagination={handlePageChange}
|
||||
/>
|
||||
</div>}
|
||||
{
|
||||
customTable &&
|
||||
<div className="ReceivedStocksModalMaster" >
|
||||
<table style={{ width: "100%" }}>
|
||||
{!customTable && (
|
||||
<div style={{ overflowX: 'auto' }}>
|
||||
<Tables
|
||||
columns={columns}
|
||||
data={tableData}
|
||||
dataSource={tableData}
|
||||
pagination={handlePageChange}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
{customTable && (
|
||||
<div className="ReceivedStocksModalMaster">
|
||||
<table style={{ width: '100%' }}>
|
||||
<thead>
|
||||
<tr>
|
||||
{columns.map((column) => (
|
||||
<th key={column.key} style={{ textAlign: column.align, width: column.width, backgroundColor: '#f0f8ff', fontFamily: "poppins", fontWeight: "450" }}>
|
||||
<th
|
||||
key={column.key}
|
||||
style={{
|
||||
textAlign: column.align,
|
||||
width: column.width,
|
||||
backgroundColor: '#f0f8ff',
|
||||
fontFamily: 'poppins',
|
||||
fontWeight: '450',
|
||||
}}
|
||||
>
|
||||
{column.title?.toUpperCase()}
|
||||
</th>
|
||||
))}
|
||||
|
|
@ -53,9 +61,12 @@ const ReceivedStocksModal = ({
|
|||
</thead>
|
||||
<tbody>
|
||||
{tableData.map((row, index) => (
|
||||
<tr key={row.key || index} style={{ fontSize: "13px" }}>
|
||||
<tr key={row.key || index} style={{ fontSize: '13px' }}>
|
||||
{columns.map((column) => (
|
||||
<td key={column.key} style={{ textAlign: column.align, width: column.width }}>
|
||||
<td
|
||||
key={column.key}
|
||||
style={{ textAlign: column.align, width: column.width }}
|
||||
>
|
||||
{renderCell(column, row, index)}
|
||||
</td>
|
||||
))}
|
||||
|
|
@ -64,13 +75,10 @@ const ReceivedStocksModal = ({
|
|||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
)}
|
||||
</>
|
||||
|
||||
</DefaultModal>
|
||||
);
|
||||
};
|
||||
|
||||
export default ReceivedStocksModal;
|
||||
export default ReceivedStocksModal;
|
||||
|
|
|
|||
|
|
@ -149,6 +149,16 @@ export const getConfigType = createAsyncThunk(
|
|||
}
|
||||
}
|
||||
);
|
||||
export const getConfigTypeBookingType = createAsyncThunk(
|
||||
'BookingData/getConfigTypeBookingType',
|
||||
async ({ TypeName }) => {
|
||||
if (TypeName != null && TypeName != undefined) {
|
||||
return await axiosRetailInstanceData.get(
|
||||
`/configMaster?TypeName=${TypeName}`
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
export const PostBookingData = createAsyncThunk(
|
||||
'BookingData/PostBookingdata',
|
||||
async (postData) => {
|
||||
|
|
@ -682,7 +692,6 @@ export const getSelectedFavItems = createAsyncThunk(
|
|||
if (fromDate) params.append('fromDate', fromDate);
|
||||
if (toDate) params.append('toDate', toDate);
|
||||
// let url = `/productCardList?CompId=${data?.CompId}&BranchId=${data?.BranchId}&AppId=${data?.AppId}&Type=A`;
|
||||
|
||||
return await axiosRetailInstanceData.get(
|
||||
`/productCardList?${params.toString()}`
|
||||
);
|
||||
|
|
@ -858,7 +867,6 @@ export const getCardDataWithoutSubmodule = createAsyncThunk(
|
|||
? { fromDate: data?.fromDate, toDate: data?.toDate }
|
||||
: {}),
|
||||
});
|
||||
|
||||
return await axiosRetailInstanceData.get(
|
||||
`/productCardList?${params.toString()}`
|
||||
);
|
||||
|
|
@ -1609,7 +1617,8 @@ const initialState = {
|
|||
salesBillEdit: false,
|
||||
previousOrderPayment: [],
|
||||
previousOrderOfferDetails: [],
|
||||
getmultipleSearchDatas: []
|
||||
getmultipleSearchDatas: [],
|
||||
AllBookingType: [],
|
||||
};
|
||||
|
||||
const BookingData = createSlice({
|
||||
|
|
@ -1981,6 +1990,13 @@ const BookingData = createSlice({
|
|||
state.ItemCard = [];
|
||||
}
|
||||
}),
|
||||
builder.addCase(getConfigTypeBookingType.fulfilled, (state, action) => {
|
||||
if (action?.payload?.data?.statusCode === 1) {
|
||||
state.AllBookingType = action?.payload?.data?.data;
|
||||
} else {
|
||||
state.AllBookingType = [];
|
||||
}
|
||||
}),
|
||||
builder.addCase(getLayoutsearch.fulfilled, (state, action) => {
|
||||
if (action?.payload?.data?.statusCode === 1) {
|
||||
state.ItemCard = action?.payload?.data?.data;
|
||||
|
|
@ -2113,7 +2129,10 @@ const BookingData = createSlice({
|
|||
});
|
||||
builder.addCase(getmultipleSearch.fulfilled, (state, action) => {
|
||||
if (action?.payload?.data?.statusCode === 1) {
|
||||
state.getmultipleSearchDatas = action?.payload?.data?.data[0]?.SearchTermDtl?.map((e) => e?.SearchTerm) || [];
|
||||
state.getmultipleSearchDatas =
|
||||
action?.payload?.data?.data[0]?.SearchTermDtl?.map(
|
||||
(e) => e?.SearchTerm
|
||||
) || [];
|
||||
} else {
|
||||
state.getmultipleSearchDatas = [];
|
||||
}
|
||||
|
|
@ -2220,7 +2239,7 @@ export const {
|
|||
triggerProductCard,
|
||||
changeBillEditingMode,
|
||||
changePreviousOrderPayment,
|
||||
changePreviousOrderOfferDetail
|
||||
changePreviousOrderOfferDetail,
|
||||
} = BookingData.actions;
|
||||
|
||||
export const GlobalComboRedirectionToDefaultLayoutForParking = (state) =>
|
||||
|
|
@ -2389,13 +2408,14 @@ export const GlobalAddBookingDetailsTrigger = (state) =>
|
|||
state?.BookingData?.AddBookingDetailsTrigger;
|
||||
export const GlobalCurrentOrderId = (state) =>
|
||||
state?.BookingData?.CurrentOrderId;
|
||||
export const GlobalSalesBillEdit = (state) =>
|
||||
state?.BookingData?.salesBillEdit;
|
||||
export const GlobalSalesBillEdit = (state) => state?.BookingData?.salesBillEdit;
|
||||
export const GlobalPreviousOrderPayment = (state) =>
|
||||
state?.BookingData?.previousOrderPayment;
|
||||
export const GlobalPreviousOrderOfferDetails = (state) =>
|
||||
state?.BookingData?.previousOrderOfferDetails;
|
||||
export const GlobalGetmultipleSearchDatas = (state) =>
|
||||
state?.BookingData?.getmultipleSearchDatas;
|
||||
export const GlobalAllBookingType = (state) =>
|
||||
state?.BookingData?.AllBookingType;
|
||||
|
||||
export default BookingData.reducer;
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ export const putPaymentOptions = createAsyncThunk(
|
|||
}
|
||||
);
|
||||
export const getPaymentUPIDetails = createAsyncThunk(
|
||||
'getPaymentGatewayDetails',
|
||||
'getPaymentGatewayDetails',
|
||||
async ({ CompId, AppId, BranchId, DetailType }) => {
|
||||
if (
|
||||
CompId != undefined &&
|
||||
|
|
|
|||
|
|
@ -465,8 +465,8 @@ const WholesaleData = createSlice({
|
|||
state.WholeSaleEntryList = action?.payload;
|
||||
},
|
||||
changeWholeSaleSelectedEntryDtl: (state, action) => {
|
||||
(state.WholeSaleSelectedEntryDtl = action?.payload),
|
||||
(state.WholeSaleSelectedProdDtl = [action?.payload?.ProdDetails?.[0]]);
|
||||
((state.WholeSaleSelectedEntryDtl = action?.payload),
|
||||
(state.WholeSaleSelectedProdDtl = [action?.payload?.ProdDetails?.[0]]));
|
||||
state.WholeSaleSelectedGradeDtl = [
|
||||
action?.payload?.ProdDetails?.[0].GradeDetails?.[0],
|
||||
];
|
||||
|
|
@ -513,7 +513,7 @@ const WholesaleData = createSlice({
|
|||
},
|
||||
},
|
||||
extraReducers: (builder) => {
|
||||
builder.addCase(getWholeSaleSupplier.fulfilled, (state, action) => {
|
||||
(builder.addCase(getWholeSaleSupplier.fulfilled, (state, action) => {
|
||||
if (action?.payload?.data?.statusCode == 1) {
|
||||
state.SupplierDetails = action?.payload?.data?.data;
|
||||
} else {
|
||||
|
|
@ -636,7 +636,7 @@ const WholesaleData = createSlice({
|
|||
} else {
|
||||
state.WSBookingStatus = [];
|
||||
}
|
||||
});
|
||||
}));
|
||||
},
|
||||
});
|
||||
export const {
|
||||
|
|
|
|||
|
|
@ -1,11 +1,8 @@
|
|||
import React, { useState, useEffect } from 'react';
|
||||
import React, { useState, useEffect, lazy, Suspense } from 'react';
|
||||
import { useSelector } from 'react-redux';
|
||||
import { Button, Popover } from 'antd';
|
||||
import { AiOutlineClose } from 'react-icons/ai';
|
||||
import { IoIosArrowUp } from 'react-icons/io';
|
||||
import BSBillingTable1 from '../BSBillingTable1/BSBillingTable1';
|
||||
import BST1Payment from '../BSBillingTable1/BST1Payment';
|
||||
import BSSummery from '../BSBillingTableSummery/BSSummery';
|
||||
import {
|
||||
GlobalCustId,
|
||||
GlobalSelOption,
|
||||
|
|
@ -14,13 +11,23 @@ import {
|
|||
GlobalOrderStatus,
|
||||
} from '../../../../../Features/BookingScreen/BookingData/BookingData';
|
||||
import '../../../../../Styles/BookingScreen/Components/BSBillingTables/BSBillingTable1/BSBTOverall.scss';
|
||||
import FeaturesFunctionalities from '../../BookingFunctionality/FeaturesFunctionalities';
|
||||
import BSCustomerSelect from '../../UtillComponents/BSSelectCustomer.jsx';
|
||||
import PozoAddCustomerIcon from '../../UtillComponents/Pozo retail icons/PozoAddCustomerIcon';
|
||||
import { isMobile } from 'react-device-detect';
|
||||
import { getTemplateData } from '../../../../../Features/ThemeChange/ThemeChange.js';
|
||||
import PozoCartIcon from '../../../../../Pages/BookingScreen/Components/UtillComponents/PozoCartIcon.jsx';
|
||||
import TooltipWrapper from '../../../../../Components/Tooltip/Tooltip';
|
||||
// jsx File
|
||||
const BSBillingTable1 = lazy(
|
||||
() => import('../BSBillingTable1/BSBillingTable1.jsx')
|
||||
);
|
||||
const BST1Payment = lazy(() => import('../BSBillingTable1/BST1Payment'));
|
||||
const BSSummery = lazy(() => import('../BSBillingTableSummery/BSSummery'));
|
||||
const FeaturesFunctionalities = lazy(
|
||||
() => import('../../BookingFunctionality/FeaturesFunctionalities')
|
||||
);
|
||||
const BSCustomerSelect = lazy(
|
||||
() => import('../../UtillComponents/BSSelectCustomer.jsx')
|
||||
);
|
||||
|
||||
export default function BSBTOverall1() {
|
||||
const [open, setOpen] = useState(false);
|
||||
|
|
@ -73,7 +80,7 @@ export default function BSBTOverall1() {
|
|||
containerHeight = isMobile
|
||||
? ExpDate <= 7
|
||||
? '490px'
|
||||
: '475px' // billing table 1 height in POS
|
||||
: '475px' // billing table 1 height in POS
|
||||
: ExpDate <= 7
|
||||
? '85vh'
|
||||
: '';
|
||||
|
|
@ -121,126 +128,132 @@ export default function BSBTOverall1() {
|
|||
}, [width]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<div
|
||||
className={
|
||||
templateData?.BookingLayout?.[0] === 'Layout6'
|
||||
? 'BSBTOverall1-Default layout6-height'
|
||||
: 'BSBTOverall1-Default'
|
||||
}
|
||||
style={{ height: containerHeight }}
|
||||
>
|
||||
{width > 768 && <BSBillingTable1 />}
|
||||
{(addcustomer || hold) && (
|
||||
<FeaturesFunctionalities
|
||||
handleAddCustomerCancel={handleAddCustomerCancel}
|
||||
addcustomer={addcustomer}
|
||||
handleHoldCancel={handleHoldCancel}
|
||||
modalOpen={hold}
|
||||
/>
|
||||
)}
|
||||
<div className="BSBTOverall1-div">
|
||||
{width <= 768 && (
|
||||
<div
|
||||
className={`BSBillingTable1-summeryTable ${responsiveBill ? 'open' : 'closed'}`}
|
||||
style={{
|
||||
transition: 'max-height 0.3s ease-in-out',
|
||||
overflow: 'scroll',
|
||||
maxHeight: responsiveBill ? '210px' : '0px',
|
||||
}}
|
||||
>
|
||||
{tableData && <BSBillingTable1 />}
|
||||
</div>
|
||||
<Suspense fallback={<div>Loading…</div>}>
|
||||
<>
|
||||
<div
|
||||
className={
|
||||
templateData?.BookingLayout?.[0] === 'Layout6'
|
||||
? 'BSBTOverall1-Default layout6-height'
|
||||
: 'BSBTOverall1-Default'
|
||||
}
|
||||
style={{ height: containerHeight }}
|
||||
>
|
||||
{width > 768 && <BSBillingTable1 />}
|
||||
{(addcustomer || hold) && (
|
||||
<FeaturesFunctionalities
|
||||
handleAddCustomerCancel={handleAddCustomerCancel}
|
||||
addcustomer={addcustomer}
|
||||
handleHoldCancel={handleHoldCancel}
|
||||
modalOpen={hold}
|
||||
/>
|
||||
)}
|
||||
<div className="BSBTOverall1-Default-summary">
|
||||
{summeryopen == true && (
|
||||
<div className="BSBillingTable1-summary">
|
||||
<button
|
||||
className="BSBillingTable1-summary-close"
|
||||
onClick={() => {
|
||||
setSummeryopen(false);
|
||||
}}
|
||||
>
|
||||
X
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<Popover
|
||||
content={
|
||||
open && (
|
||||
<>
|
||||
<a onClick={hide}>
|
||||
<AiOutlineClose color="black" />
|
||||
</a>
|
||||
<BSSummery />
|
||||
</>
|
||||
)
|
||||
}
|
||||
trigger="click"
|
||||
open={open}
|
||||
onOpenChange={handleOpenChange}
|
||||
>
|
||||
<Button className="icon-button" onClick={handleOpenChange}>
|
||||
SUMMARY <IoIosArrowUp />
|
||||
</Button>
|
||||
</Popover>
|
||||
<div className="CustomerAddSrch">
|
||||
<div style={{ height: '2.1rem' }}>
|
||||
{tableOptions.find(
|
||||
(item) => item.OptionName === 'AddCustomer'
|
||||
) && (
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
columnGap: '0.5rem',
|
||||
}}
|
||||
>
|
||||
<BSCustomerSelect />
|
||||
|
||||
<TooltipWrapper title={'Add Customer'} isMobile={isMobile}>
|
||||
{' '}
|
||||
<PozoAddCustomerIcon
|
||||
className="BSBillingNav-icon-table-icon"
|
||||
onClick={handleAddCustomer}
|
||||
style={{
|
||||
fontSize: '25px',
|
||||
color: selOption || GetCustId ? '#52c41a' : '#1292EE',
|
||||
cursor: Custdisable ? 'not-allowed' : 'pointer',
|
||||
}}
|
||||
/>
|
||||
</TooltipWrapper>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
{tableData && (
|
||||
<div className="BSBTOverall1-div">
|
||||
{width <= 768 && (
|
||||
<div
|
||||
onClick={handleResponsiveBill}
|
||||
className="Btn-responsiveBill"
|
||||
style={{ color: responsiveBill ? '#52c41a' : '#1292ee' }}
|
||||
className={`BSBillingTable1-summeryTable ${responsiveBill ? 'open' : 'closed'}`}
|
||||
style={{
|
||||
transition: 'max-height 0.3s ease-in-out',
|
||||
overflow: 'scroll',
|
||||
maxHeight: responsiveBill ? '210px' : '0px',
|
||||
}}
|
||||
>
|
||||
{width <= 768 && (
|
||||
<div
|
||||
style={{
|
||||
width: '28px',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
height: '26px',
|
||||
}}
|
||||
>
|
||||
<PozoCartIcon />
|
||||
</div>
|
||||
)}
|
||||
{tableData && <BSBillingTable1 />}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div>
|
||||
<BST1Payment />
|
||||
<div className="BSBTOverall1-Default-summary">
|
||||
{summeryopen == true && (
|
||||
<div className="BSBillingTable1-summary">
|
||||
<button
|
||||
className="BSBillingTable1-summary-close"
|
||||
onClick={() => {
|
||||
setSummeryopen(false);
|
||||
}}
|
||||
>
|
||||
X
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<Popover
|
||||
content={
|
||||
open && (
|
||||
<>
|
||||
<a onClick={hide}>
|
||||
<AiOutlineClose color="black" />
|
||||
</a>
|
||||
<BSSummery />
|
||||
</>
|
||||
)
|
||||
}
|
||||
trigger="click"
|
||||
open={open}
|
||||
onOpenChange={handleOpenChange}
|
||||
>
|
||||
<Button className="icon-button" onClick={handleOpenChange}>
|
||||
SUMMARY <IoIosArrowUp />
|
||||
</Button>
|
||||
</Popover>
|
||||
<div className="CustomerAddSrch">
|
||||
<div style={{ height: '2.1rem' }}>
|
||||
{tableOptions.find(
|
||||
(item) => item.OptionName === 'AddCustomer'
|
||||
) && (
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
columnGap: '0.5rem',
|
||||
}}
|
||||
>
|
||||
<BSCustomerSelect />
|
||||
|
||||
<TooltipWrapper
|
||||
title={'Add Customer'}
|
||||
isMobile={isMobile}
|
||||
>
|
||||
{' '}
|
||||
<PozoAddCustomerIcon
|
||||
className="BSBillingNav-icon-table-icon"
|
||||
onClick={handleAddCustomer}
|
||||
style={{
|
||||
fontSize: '25px',
|
||||
color:
|
||||
selOption || GetCustId ? '#52c41a' : '#1292EE',
|
||||
cursor: Custdisable ? 'not-allowed' : 'pointer',
|
||||
}}
|
||||
/>
|
||||
</TooltipWrapper>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
{tableData && (
|
||||
<div
|
||||
onClick={handleResponsiveBill}
|
||||
className="Btn-responsiveBill"
|
||||
style={{ color: responsiveBill ? '#52c41a' : '#1292ee' }}
|
||||
>
|
||||
{width <= 768 && (
|
||||
<div
|
||||
style={{
|
||||
width: '28px',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
height: '26px',
|
||||
}}
|
||||
>
|
||||
<PozoCartIcon />
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div>
|
||||
<BST1Payment />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
</>
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -10,16 +10,13 @@ import {
|
|||
ChangeTotalAmount,
|
||||
globalExtraTotalAmount,
|
||||
} from '../../../../../Features/ExteraCharges/ExtraCharges.js';
|
||||
import BSBillingEditQuantity from '../BSBillingEditQuantity/BSBillingEditQuantity';
|
||||
import {
|
||||
changeholddata,
|
||||
gettinghold,
|
||||
puttinghold,
|
||||
} from '../../../../../Features/BookingScreen/HoldOption/HoldOption.js';
|
||||
import { getCustomerDisplayWindow } from '../../../../../Features/customerDisplayWindow/customerDisplayWindow.js';
|
||||
import BSEditTotalAmt from '../BSEditTotalAmount/BSEditTotalAmt.jsx';
|
||||
import { useApplyOfferto_CardDetail } from '../../UtillComponents/BSNavBarOffer/BSNavBarOffer_CustomHooks.jsx';
|
||||
import BSImeiDetails from '../BSImeiDetails/BSImeiDetails.jsx';
|
||||
import {
|
||||
getTemplateData,
|
||||
SelectedGlobalBillingColorDetail,
|
||||
|
|
@ -80,6 +77,10 @@ import {
|
|||
import { useRemoveProducts } from './RemoveCartWithOffer.jsx';
|
||||
import { useUtilsComponent } from '../../../../../Services/utils.js';
|
||||
import CustomerPriceHistory from '../../UtillComponents/CustomerPriceHistory.jsx';
|
||||
// jsx Files
|
||||
import BSBillingEditQuantity from '../BSBillingEditQuantity/BSBillingEditQuantity';
|
||||
import BSEditTotalAmt from '../BSEditTotalAmount/BSEditTotalAmt.jsx';
|
||||
import BSImeiDetails from '../BSImeiDetails/BSImeiDetails.jsx';
|
||||
|
||||
const BSBillingTable3 = () => {
|
||||
const { removeExtraCharge } = useUtilsComponent();
|
||||
|
|
@ -123,7 +124,6 @@ const BSBillingTable3 = () => {
|
|||
const UnpaidData = useSelector(GlobalUnpaidData);
|
||||
const GlobProdwisedata = useSelector(GlobalSelProdWiseEst);
|
||||
const ReportholdData = useSelector(GlobalReorderHoldDetails);
|
||||
const salesBillEdit = useSelector(GlobalSalesBillEdit);
|
||||
const prodCat = useSelector(GlobalProductCategorie);
|
||||
const ProdSubCat = useSelector(GlobalProductSubCategorie);
|
||||
const [PreviousdataLength, setPreviousdataLength] =
|
||||
|
|
@ -137,7 +137,8 @@ const BSBillingTable3 = () => {
|
|||
const GetCustId = useSelector(GlobalCustId);
|
||||
const selectedCustomer = useSelector(GlobalSelOption);
|
||||
|
||||
const [customerPriceHistoryOpen, setCustomerPriceHistoryOpen] = useState(false);
|
||||
const [customerPriceHistoryOpen, setCustomerPriceHistoryOpen] =
|
||||
useState(false);
|
||||
const [customerProduct, setCustomerProduct] = useState(null);
|
||||
const preferenceshortcutkey = preferenceDatas?.[0]?.[
|
||||
'SettingDtlDetails'
|
||||
|
|
@ -154,16 +155,16 @@ const BSBillingTable3 = () => {
|
|||
OrderType === 'Hold'
|
||||
? tableData?.filter((a, b) => a.BookingTypeName === 'TakeAway')
|
||||
: tableData?.filter(
|
||||
(a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId
|
||||
);
|
||||
(a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId
|
||||
);
|
||||
const OldtableDataDinein = tableData?.filter(
|
||||
(a, b) => a.BookingTypeName === 'Dine In' && a?.SalesId
|
||||
);
|
||||
const OldtableDataTakeAway =
|
||||
OrderType != 'Hold'
|
||||
? tableData?.filter(
|
||||
(a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId
|
||||
)
|
||||
(a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId
|
||||
)
|
||||
: [];
|
||||
const [EditQuantity, setEditQuantity] = useState(false);
|
||||
const [Modaldata, setModaldata] = useState([]);
|
||||
|
|
@ -259,7 +260,6 @@ const BSBillingTable3 = () => {
|
|||
event.preventDefault();
|
||||
handleShortcut('weightAmount');
|
||||
}
|
||||
|
||||
};
|
||||
window.addEventListener('keydown', handleKeyDown);
|
||||
|
||||
|
|
@ -389,7 +389,7 @@ const BSBillingTable3 = () => {
|
|||
const handleCustomerProductPriceHistory = (item) => {
|
||||
setCustomerPriceHistoryOpen(true);
|
||||
setCustomerProduct(item?.ProdId);
|
||||
}
|
||||
};
|
||||
|
||||
function safeRound(amountStr) {
|
||||
if (amountStr == null) return allowDecimal ? '0.00' : '0';
|
||||
|
|
@ -1057,9 +1057,9 @@ const BSBillingTable3 = () => {
|
|||
)?.map((item, idx) =>
|
||||
idx === 0
|
||||
? {
|
||||
...item,
|
||||
FreeQty,
|
||||
}
|
||||
...item,
|
||||
FreeQty,
|
||||
}
|
||||
: item
|
||||
),
|
||||
};
|
||||
|
|
@ -1983,7 +1983,6 @@ const BSBillingTable3 = () => {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// const removeFromCart = async (item) => {
|
||||
|
|
@ -2395,10 +2394,11 @@ const BSBillingTable3 = () => {
|
|||
{OldtableDataTakeAway?.map((item, index) => (
|
||||
<tr
|
||||
key={index}
|
||||
className={`${item?.SalesId && OrderType !== 'Hold'
|
||||
? 'BSBill-Table3-content-Disabled'
|
||||
: 'BSBill-Table3-content'
|
||||
}
|
||||
className={`${
|
||||
item?.SalesId && OrderType !== 'Hold'
|
||||
? 'BSBill-Table3-content-Disabled'
|
||||
: 'BSBill-Table3-content'
|
||||
}
|
||||
|
||||
`}
|
||||
style={{
|
||||
|
|
@ -2409,15 +2409,15 @@ const BSBillingTable3 = () => {
|
|||
? item?.SalesId && OrderType !== 'Hold'
|
||||
? 'rgb(243, 248, 213)'
|
||||
: triggerAnimation &&
|
||||
index === 0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataTakeAway?.length >= PreviousdataLength
|
||||
index === 0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataTakeAway?.length >= PreviousdataLength
|
||||
? 'wheat'
|
||||
: triggerAnimation &&
|
||||
index === 0 &&
|
||||
tableDataTakeAway?.length >= PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
index === 0 &&
|
||||
tableDataTakeAway?.length >= PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
? 'wheat'
|
||||
: 'inherit'
|
||||
: 'none',
|
||||
|
|
@ -2425,9 +2425,9 @@ const BSBillingTable3 = () => {
|
|||
item?.SalesId && OrderType !== 'Hold'
|
||||
? 'rgb(243, 248, 213)'
|
||||
: GlobEstBooking === 'ParEst' &&
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId + ' ' + item?.BookingTypeName
|
||||
)
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId + ' ' + item?.BookingTypeName
|
||||
)
|
||||
? '#b2d1f7'
|
||||
: index % 2 === 0
|
||||
? 'white'
|
||||
|
|
@ -2483,7 +2483,7 @@ const BSBillingTable3 = () => {
|
|||
style={{ fontFamily: 'Poppins' }}
|
||||
onClick={() =>
|
||||
item.FullProductIdentifierDtls?.length > 0 ||
|
||||
item.ProductIdentifierDtls?.length > 0
|
||||
item.ProductIdentifierDtls?.length > 0
|
||||
? handleImeiDetails(item)
|
||||
: editField && handleEditQuantity(item)
|
||||
}
|
||||
|
|
@ -2530,21 +2530,21 @@ const BSBillingTable3 = () => {
|
|||
{productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
) !== undefined && (
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
</td>
|
||||
</>
|
||||
)}
|
||||
|
|
@ -2637,8 +2637,8 @@ const BSBillingTable3 = () => {
|
|||
>
|
||||
{allowDecimal
|
||||
? Number(
|
||||
item?.TotalAmt - (item?.Offer || 0) || 0
|
||||
).toFixed(2)
|
||||
item?.TotalAmt - (item?.Offer || 0) || 0
|
||||
).toFixed(2)
|
||||
: Number(item?.TotalAmt - (item?.Offer || 0) || 0)}
|
||||
</td>
|
||||
)}
|
||||
|
|
@ -2673,10 +2673,11 @@ const BSBillingTable3 = () => {
|
|||
{OldtableDataDinein?.map((item, index) => (
|
||||
<tr
|
||||
key={OldtableDataTakeAway?.length + index}
|
||||
className={`${item?.SalesId
|
||||
? 'BSBill-Table3-content-Disabled'
|
||||
: 'BSBill-Table3-content'
|
||||
}
|
||||
className={`${
|
||||
item?.SalesId
|
||||
? 'BSBill-Table3-content-Disabled'
|
||||
: 'BSBill-Table3-content'
|
||||
}
|
||||
|
||||
`}
|
||||
style={{
|
||||
|
|
@ -2687,26 +2688,26 @@ const BSBillingTable3 = () => {
|
|||
? item?.SalesId
|
||||
? 'rgb(243, 248, 213)'
|
||||
: BookingType === 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length + index === 0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataDinein?.length >= PreviousdataLength
|
||||
? 'wheat'
|
||||
: BookingType !== 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length + index === 0 &&
|
||||
tableDataDinein?.length >= PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
!item?.SalesId &&
|
||||
tableDataDinein?.length >= PreviousdataLength
|
||||
? 'wheat'
|
||||
: BookingType !== 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length + index === 0 &&
|
||||
tableDataDinein?.length >= PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
? 'wheat'
|
||||
: 'inherit'
|
||||
: 'none',
|
||||
background: item?.SalesId
|
||||
? 'rgb(243, 248, 213)'
|
||||
: GlobEstBooking === 'ParEst' &&
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId + ' ' + item?.BookingTypeName
|
||||
)
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId + ' ' + item?.BookingTypeName
|
||||
)
|
||||
? '#b2d1f7'
|
||||
: (OldtableDataTakeAway?.length + index) % 2 === 0
|
||||
? 'white'
|
||||
|
|
@ -2807,21 +2808,21 @@ const BSBillingTable3 = () => {
|
|||
{productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
) !== undefined && (
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
</td>
|
||||
</>
|
||||
)}
|
||||
|
|
@ -2914,8 +2915,8 @@ const BSBillingTable3 = () => {
|
|||
>
|
||||
{allowDecimal
|
||||
? Number(
|
||||
item?.TotalAmt - (item?.Offer || 0) || 0
|
||||
).toFixed(2)
|
||||
item?.TotalAmt - (item?.Offer || 0) || 0
|
||||
).toFixed(2)
|
||||
: Number(item?.TotalAmt - (item?.Offer || 0) || 0)}
|
||||
</td>
|
||||
)}
|
||||
|
|
@ -2955,10 +2956,11 @@ const BSBillingTable3 = () => {
|
|||
OldtableDataTakeAway?.length +
|
||||
index
|
||||
}
|
||||
className={`${BookingType === 'Dine In' && item?.SalesId
|
||||
? 'BSBill-Table3-content-Disabled'
|
||||
: 'BSBill-Table3-content'
|
||||
}
|
||||
className={`${
|
||||
BookingType === 'Dine In' && item?.SalesId
|
||||
? 'BSBill-Table3-content-Disabled'
|
||||
: 'BSBill-Table3-content'
|
||||
}
|
||||
|
||||
`}
|
||||
style={{
|
||||
|
|
@ -2969,38 +2971,38 @@ const BSBillingTable3 = () => {
|
|||
? BookingType === 'Dine In' && item?.SalesId
|
||||
? 'rgb(243, 248, 213)'
|
||||
: BookingType === 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataTakeAway?.length >= PreviousdataLength
|
||||
? 'wheat'
|
||||
: BookingType !== 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
tableDataTakeAway?.length >= PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
OldtableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataTakeAway?.length >= PreviousdataLength
|
||||
? 'wheat'
|
||||
: BookingType !== 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
tableDataTakeAway?.length >= PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
? 'wheat'
|
||||
: (OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
OldtableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
? 'white'
|
||||
: SelectedBillColor?.['OverallBackgroundColor']
|
||||
? SelectedBillColor?.['OverallBackgroundColor']
|
||||
: '#d6d6d6'
|
||||
: (OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
OldtableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
? 'white'
|
||||
: SelectedBillColor?.['OverallBackgroundColor']
|
||||
? SelectedBillColor?.['OverallBackgroundColor']
|
||||
|
|
@ -3009,15 +3011,15 @@ const BSBillingTable3 = () => {
|
|||
BookingType === 'Dine In' && item?.SalesId
|
||||
? 'rgb(243, 248, 213)'
|
||||
: GlobEstBooking === 'ParEst' &&
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId + ' ' + item?.BookingTypeName
|
||||
)
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId + ' ' + item?.BookingTypeName
|
||||
)
|
||||
? '#b2d1f7'
|
||||
: (OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
OldtableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
? 'white'
|
||||
: SelectedBillColor?.['OverallBackgroundColor']
|
||||
? SelectedBillColor?.['OverallBackgroundColor']
|
||||
|
|
@ -3026,9 +3028,9 @@ const BSBillingTable3 = () => {
|
|||
BillOrderPre === 'Y' && !BookingTypeBoth
|
||||
? triggerAnimation &&
|
||||
OldtableDataDinein?.length +
|
||||
OldtableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
OldtableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataTakeAway?.length >= PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
|
|
@ -3077,7 +3079,7 @@ const BSBillingTable3 = () => {
|
|||
style={{ fontFamily: 'Poppins' }}
|
||||
onClick={() =>
|
||||
item.FullProductIdentifierDtls?.length > 0 ||
|
||||
item.ProductIdentifierDtls?.length > 0
|
||||
item.ProductIdentifierDtls?.length > 0
|
||||
? handleImeiDetails(item)
|
||||
: editField && handleEditQuantity(item, index)
|
||||
}
|
||||
|
|
@ -3131,21 +3133,21 @@ const BSBillingTable3 = () => {
|
|||
{productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
) !== undefined && (
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
</td>
|
||||
</>
|
||||
)}
|
||||
|
|
@ -3239,8 +3241,8 @@ const BSBillingTable3 = () => {
|
|||
>
|
||||
{allowDecimal
|
||||
? Number(
|
||||
item?.TotalAmt - (item?.Offer || 0) || 0
|
||||
).toFixed(2)
|
||||
item?.TotalAmt - (item?.Offer || 0) || 0
|
||||
).toFixed(2)
|
||||
: Number(item?.TotalAmt - (item?.Offer || 0) || 0)}
|
||||
</td>
|
||||
)}
|
||||
|
|
@ -3280,10 +3282,11 @@ const BSBillingTable3 = () => {
|
|||
tableDataTakeAway?.length +
|
||||
index
|
||||
}
|
||||
className={`${BookingType === 'Dine In' && item?.SalesId
|
||||
? 'BSBill-Table3-content-Disabled'
|
||||
: 'BSBill-Table3-content'
|
||||
}
|
||||
className={`${
|
||||
BookingType === 'Dine In' && item?.SalesId
|
||||
? 'BSBill-Table3-content-Disabled'
|
||||
: 'BSBill-Table3-content'
|
||||
}
|
||||
|
||||
`}
|
||||
style={{
|
||||
|
|
@ -3296,44 +3299,44 @@ const BSBillingTable3 = () => {
|
|||
!BookingTypeBoth
|
||||
? 'rgb(243, 248, 213)'
|
||||
: BookingType === 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length +
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataDinein?.length >= PreviousdataLength
|
||||
? 'wheat'
|
||||
: BookingType !== 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length +
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
tableDataDinein?.length >= PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataDinein?.length >= PreviousdataLength
|
||||
? 'wheat'
|
||||
: BookingType !== 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length +
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
tableDataDinein?.length >= PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
? 'wheat'
|
||||
: 'inherit'
|
||||
: 'none',
|
||||
background:
|
||||
BookingType === 'Dine In' &&
|
||||
item?.SalesId &&
|
||||
!BookingTypeBoth
|
||||
item?.SalesId &&
|
||||
!BookingTypeBoth
|
||||
? 'rgb(243, 248, 213)'
|
||||
: GlobEstBooking === 'ParEst' &&
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId + ' ' + item?.BookingTypeName
|
||||
)
|
||||
GlobProdwisedata?.includes(
|
||||
item?.InwardDtlId + ' ' + item?.BookingTypeName
|
||||
)
|
||||
? '#b2d1f7'
|
||||
: (OldtableDataTakeAway?.length +
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index) %
|
||||
2 ===
|
||||
0
|
||||
? 'white'
|
||||
: SelectedBillColor?.['OverallBackgroundColor']
|
||||
? SelectedBillColor?.['OverallBackgroundColor']
|
||||
|
|
@ -3342,10 +3345,10 @@ const BSBillingTable3 = () => {
|
|||
BillOrderPre === 'Y' && !BookingTypeBoth
|
||||
? triggerAnimation &&
|
||||
OldtableDataTakeAway?.length +
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
OldtableDataDinein?.length +
|
||||
tableDataTakeAway?.length +
|
||||
index ===
|
||||
0 &&
|
||||
!item?.SalesId &&
|
||||
tableDataDinein?.length >= PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
|
|
@ -3441,21 +3444,21 @@ const BSBillingTable3 = () => {
|
|||
{productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
) !== undefined && (
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
<div
|
||||
style={{
|
||||
fontSize: '10px',
|
||||
fontWeight: '500',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
Extra Charges :{' '}
|
||||
{
|
||||
productBasedExtraCharges?.find(
|
||||
(find) => find.ProdId === item.ProdId
|
||||
)?.TotalAmt
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
</td>
|
||||
</>
|
||||
)}
|
||||
|
|
@ -3548,8 +3551,8 @@ const BSBillingTable3 = () => {
|
|||
>
|
||||
{allowDecimal
|
||||
? Number(
|
||||
item?.TotalAmt - (item?.Offer || 0) || 0
|
||||
).toFixed(2)
|
||||
item?.TotalAmt - (item?.Offer || 0) || 0
|
||||
).toFixed(2)
|
||||
: Number(item?.TotalAmt - (item?.Offer || 0) || 0)}
|
||||
</td>
|
||||
)}
|
||||
|
|
@ -3592,7 +3595,7 @@ const BSBillingTable3 = () => {
|
|||
ProductDetail={Modaldata}
|
||||
/>
|
||||
)}
|
||||
{(customerPriceHistoryOpen && GetCustId) &&
|
||||
{customerPriceHistoryOpen && GetCustId && (
|
||||
<CustomerPriceHistory
|
||||
open={customerPriceHistoryOpen}
|
||||
custId={GetCustId}
|
||||
|
|
@ -3601,7 +3604,7 @@ const BSBillingTable3 = () => {
|
|||
setCustomerProduct={setCustomerProduct}
|
||||
selectedCustomer={selectedCustomer}
|
||||
/>
|
||||
}
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -7,7 +7,7 @@ import { BiRightArrowAlt } from 'react-icons/bi';
|
|||
import { AiOutlineClose } from 'react-icons/ai';
|
||||
import BSSummery from '../BSBillingTableSummery/BSSummery.jsx';
|
||||
import BSBillingTable7 from './BSBillingTable7';
|
||||
import { UpCircleOutlined, UpOutlined } from '@ant-design/icons';
|
||||
import { UpCircleOutlined } from '@ant-design/icons';
|
||||
import '../../../../../Styles/BookingScreen/Components/BSBillingTables/BSBillingTable4/BSBillingTable4.scss';
|
||||
import {
|
||||
GlobalSelectedFont,
|
||||
|
|
@ -17,7 +17,7 @@ import {
|
|||
GlobalprintDatas,
|
||||
GlobalPrinterMappingDtls,
|
||||
getPrinterMappingDetails,
|
||||
getPrintSelectionComponentData,
|
||||
// getPrintSelectionComponentData,
|
||||
} from '../../../../../Features/ThemeChange/ThemeChange.js';
|
||||
import { PrintStyleFunction } from '../../../../paymentpdfPage/PrintStyleFunction.js';
|
||||
import FeaturesFunctionalities from '../../BookingFunctionality/FeaturesFunctionalities.jsx';
|
||||
|
|
@ -94,7 +94,7 @@ import {
|
|||
GlobalOverAllDiscSales,
|
||||
ChangeOverAllDiscSales,
|
||||
ChangeOverAllDiscEstimate,
|
||||
getAllCustomer,
|
||||
|
||||
GlobalBranchFinancialStatus,
|
||||
changeSummeryComboOfferAmount,
|
||||
ChangeComboCarddata,
|
||||
|
|
@ -119,6 +119,7 @@ import {
|
|||
changeBillEditingMode,
|
||||
changePreviousOrderPayment,
|
||||
changePreviousOrderOfferDetail,
|
||||
GlobalAllBookingType,
|
||||
} from '../../../../../Features/BookingScreen/BookingData/BookingData.js';
|
||||
import {
|
||||
globalExtraTotalAmount,
|
||||
|
|
@ -174,11 +175,8 @@ import { getEmpAccess } from '../../../../../Features/AppPage/CenterPage.js';
|
|||
import PozoSplitPaymentIcon from '../../UtillComponents/Pozo retail icons/PozoSplitPaymentIcon.jsx';
|
||||
import PozoCartIcon from '../../../../../Pages/BookingScreen/Components/UtillComponents/PozoCartIcon.jsx';
|
||||
import {
|
||||
Global_CoupenCodeAmount,
|
||||
Global_loyaltyPointsDiscountAmount,
|
||||
Global_OrderOfferDetail,
|
||||
Global_OverallOfferAmount,
|
||||
Global_SalesWiseOfferAmount,
|
||||
Global_OverallOfferAmount
|
||||
} from '../../../../../Features/Offer/Offer.js';
|
||||
import { useApplyOfferto_CardDetail } from '../../UtillComponents/BSNavBarOffer/BSNavBarOffer_CustomHooks.jsx';
|
||||
import TooltipWrapper from '../../../../../Components/Tooltip/Tooltip';
|
||||
|
|
@ -242,6 +240,7 @@ const BSBilling7Payment = () => {
|
|||
const screenwidth = useSelector(GlobalScreenSize);
|
||||
const defaultBookingType = useSelector(GlobalDefaultBookingType);
|
||||
const printerTemplateStyle = useSelector(SelectedPrintTemplate);
|
||||
const AllBookingType=useSelector(GlobalAllBookingType)
|
||||
const FontFamily = useSelector(GlobalSelectedFont);
|
||||
const OrderCardDetail = useSelector(GlobalOrderCardDetails);
|
||||
const GetCustId = useSelector(GlobalCustId);
|
||||
|
|
@ -269,6 +268,9 @@ const BSBilling7Payment = () => {
|
|||
const templateData = useSelector(getTemplateData);
|
||||
const appPreferences = useSelector(ApplicationPreferences);
|
||||
const Combodata = useSelector(GlobalCombocarddata, shallowEqual);
|
||||
const holdCheckedSalesSetup = tableOptions?.some(
|
||||
(item) => item?.OptionName === 'Hold'
|
||||
);
|
||||
const bookingTypePreference = appPreferences?.find(
|
||||
(preference) => preference?.PreferredCatName === 'Booking Type'
|
||||
)?.PreferenceCatDetails;
|
||||
|
|
@ -306,11 +308,9 @@ const BSBilling7Payment = () => {
|
|||
const offerAppliedProducts = useSelector(GlobalOfferAppliedProducts);
|
||||
const GlobEstBooking = useSelector(GlobalEstimateBooking);
|
||||
const GlobProdwisedata = useSelector(GlobalSelProdWiseEst);
|
||||
const BranchFinancialStatus = useSelector(GlobalBranchFinancialStatus);
|
||||
const preOrder = useSelector(GlobalpreOrderOpen);
|
||||
const OrderType = useSelector(GlobalOrderType);
|
||||
const FailedTotalAmt = useSelector(GlobalFailedTotalAmt);
|
||||
const OrderOfferDetail = useSelector(Global_OrderOfferDetail, shallowEqual);
|
||||
const defaultPaymentTrigger = useSelector(GlobalPaymentTrigger);
|
||||
const [defaultPaymentMode, setDefaultPaymentMode] = useState([]);
|
||||
const [defaultEnabled, setDefaultEnabled] = useState(false);
|
||||
|
|
@ -324,8 +324,6 @@ const BSBilling7Payment = () => {
|
|||
const BranchId = SessionData?.BranchId;
|
||||
const UserId = SessionData?.UserId;
|
||||
const UserType = SessionData?.UserType;
|
||||
const AuthToken = SessionData?.AuthToken;
|
||||
const SessionMobileNo = SessionData?.SessionMobileNo;
|
||||
const [FirstPaymentclick, setFirstPaymentclick] = useState(false);
|
||||
const [open, setOpen] = useState(false);
|
||||
const [unpaidopen, setUnpaidOpen] = useState(false);
|
||||
|
|
@ -692,13 +690,16 @@ const BSBilling7Payment = () => {
|
|||
UserId: UserId,
|
||||
};
|
||||
dispatch(getPrinterMappingDetails(data)).unwrap();
|
||||
const Data1 = { AppId, CompId, BranchId };
|
||||
dispatch(getPrintSelectionComponentData(Data1)).unwrap();
|
||||
// const Data1 = { AppId, CompId, BranchId };
|
||||
// dispatch(getPrintSelectionComponentData(Data1)).unwrap();
|
||||
}, []);
|
||||
useEffect(() => {
|
||||
if (CompId && BranchId && AppId) {
|
||||
if(holdCheckedSalesSetup)
|
||||
{
|
||||
getHolddata();
|
||||
getUnpaiddatas();
|
||||
}
|
||||
// getUnpaiddatas();
|
||||
getCustomerData();
|
||||
}
|
||||
}, [CompId, BranchId, AppId]);
|
||||
|
|
@ -814,9 +815,7 @@ const BSBilling7Payment = () => {
|
|||
: parseInt(value || 0);
|
||||
};
|
||||
const getCustomerData = async () => {
|
||||
await dispatch(
|
||||
getAllCustomer({ CompId: CompId, AppId: AppId, branchId: BranchId })
|
||||
);
|
||||
|
||||
await dispatch(
|
||||
getAddCustomerDetails({
|
||||
CompId: CompId,
|
||||
|
|
@ -1627,20 +1626,14 @@ const BSBilling7Payment = () => {
|
|||
};
|
||||
|
||||
const getBookingTypeId = async () => {
|
||||
let tempconfigdata = await dispatch(
|
||||
getConfigType({ TypeName: 'Booking Type' })
|
||||
).unwrap();
|
||||
|
||||
if (tempconfigdata?.data?.statusCode == 1) {
|
||||
setConfigDataList(tempconfigdata?.data?.data);
|
||||
let configdata = tempconfigdata?.data?.data;
|
||||
setConfigDataList(AllBookingType);
|
||||
let configdata = AllBookingType;
|
||||
let checkName = BookingTypeBoth ? 'DineIn,TakeAway' : BookingType;
|
||||
|
||||
let filterconfigdata = configdata?.find(
|
||||
(a) => a?.ConfigName === checkName
|
||||
);
|
||||
setSelectedBookingType(filterconfigdata?.ConfigId);
|
||||
}
|
||||
};
|
||||
const gettodaydate = () => {
|
||||
const currentDate = new Date();
|
||||
|
|
@ -1932,7 +1925,10 @@ const BSBilling7Payment = () => {
|
|||
setCurrentOrderNetAmount(0);
|
||||
setPreviousNetAmount(0);
|
||||
setUpinotSelected(false);
|
||||
if(holdCheckedSalesSetup)
|
||||
{
|
||||
getHolddata();
|
||||
}
|
||||
if (defaultBookingType === 'Both') {
|
||||
await dispatch(changeBookingType('TakeAway'));
|
||||
}
|
||||
|
|
@ -3331,8 +3327,10 @@ const BSBilling7Payment = () => {
|
|||
setDefaultPaymentMode([]);
|
||||
}
|
||||
};
|
||||
setDefaultPaymentOption();
|
||||
}, [defaultPaymentTrigger]);
|
||||
if(salesBillEdit){
|
||||
setDefaultPaymentOption();
|
||||
}
|
||||
}, [defaultPaymentTrigger,salesBillEdit]);
|
||||
|
||||
const Otherserviceprint = async () => {
|
||||
if (OtherServicesPrintDetails?.length > 0) {
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,7 +1,5 @@
|
|||
import { useCallback, useEffect, useRef, useState } from 'react';
|
||||
import { shallowEqual, useDispatch, useSelector } from 'react-redux';
|
||||
import { DefaultModal } from '../../../../../Components/Modal/DefaultModal';
|
||||
import FormHeader from '../../../../PageComponents/FormHeader.jsx';
|
||||
import { Form } from 'antd';
|
||||
import {
|
||||
GlobalOrderCardDetails,
|
||||
|
|
@ -11,38 +9,29 @@ import {
|
|||
GlobalOrderType,
|
||||
GlobalReorderProductDetails,
|
||||
PreferenceData,
|
||||
getConfigType,
|
||||
GlobalAllBookingType,
|
||||
} from '../../../../../Features/BookingScreen/BookingData/BookingData';
|
||||
import { ArrowRightOutlined } from '@ant-design/icons';
|
||||
import { Messages } from '../../../../../Components/Notifications/Messages';
|
||||
import '../../../../../Styles/BookingScreen/Components/BSBillingTables/BSBillingEditQuantity/BSBillingEditQuantity.scss';
|
||||
import { settingDataSelector } from '../../../../../Features/PreferenceMaster/PreferenceMaster.js';
|
||||
import { RadioGrpButton } from '../../../../../Components/Forms/RadioGroup.jsx';
|
||||
import Buttons from '../../../../../Components/Forms/Buttons.jsx';
|
||||
import { InputField } from '../../../../../Components/Forms/InputField.jsx';
|
||||
import { useApplyOfferto_CardDetail } from '../../UtillComponents/BSNavBarOffer/BSNavBarOffer_CustomHooks.jsx';
|
||||
import {
|
||||
getTemplateData,
|
||||
StoredSessionData,
|
||||
} from '../../../../../Features/ThemeChange/ThemeChange.js';
|
||||
import { validateSafeInput } from '../../../../../Services/Others.js';
|
||||
import { GlobalEmpAccessDetail } from '../../../../../Features/AppPage/CenterPage.js';
|
||||
import {
|
||||
ChangeFullFreeProductList,
|
||||
changeFullOfferAppliedProducts,
|
||||
ChangeOfferAppliedProducts,
|
||||
changeOfferAppliedProductsForLoyalty,
|
||||
GlobalFreeProdList,
|
||||
GlobalOfferAppliedProducts,
|
||||
RemoveOfferAppliedProduct,
|
||||
} from '../../../../../Features/Offer/Offernew/BookingOffernew.js';
|
||||
import { validateOffers } from '../../BSItemCards/ValidateOffer.jsx';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import "./ComboBillTableEdit.scss"
|
||||
import './ComboBillTableEdit.scss';
|
||||
|
||||
const ComboEditQty = (props) => {
|
||||
const dispatch = useDispatch();
|
||||
const formRef = useRef(null);
|
||||
const quantityInputRef = useRef(null);
|
||||
const priceChangeInputRef = useRef(null);
|
||||
const reductionInputRef = useRef(null);
|
||||
|
|
@ -54,7 +43,7 @@ const ComboEditQty = (props) => {
|
|||
// const CompId = SessionData?.CompId;
|
||||
// const BranchId = SessionData?.BranchId;
|
||||
const UserType = SessionData?.UserType;
|
||||
const applyOffer = useApplyOfferto_CardDetail();
|
||||
const AllBookingType = useSelector(GlobalAllBookingType);
|
||||
const preferenceDatas = useSelector(PreferenceData);
|
||||
const EmpAccessDetail = useSelector(GlobalEmpAccessDetail);
|
||||
const OverAllproductBasedOfferDatas = useSelector(
|
||||
|
|
@ -75,7 +64,7 @@ const ComboEditQty = (props) => {
|
|||
console.log(preferenceshortcutkey, 'preferenceshortcutkey');
|
||||
const [PriceChangeaccess, setPriceChangeaccess] = useState(true);
|
||||
|
||||
const [ConfigDataList, setConfigDataList] = useState([]);
|
||||
const [ConfigDataList, setConfigDataList] = useState(AllBookingType);
|
||||
const [messageType, setMessageType] = useState(null);
|
||||
const [messageData, setMessageData] = useState(null);
|
||||
const [EditOpen, setEditOpen] = useState(props?.BSBillingEditQuantity);
|
||||
|
|
@ -104,7 +93,7 @@ const ComboEditQty = (props) => {
|
|||
? 'Price'
|
||||
: 'Parcel'
|
||||
);
|
||||
const [PercentageSelection, setPercentageSelection] = useState('Fixed');
|
||||
|
||||
const [RadioDetails, setRadioDetails] = useState(false);
|
||||
const [editedPrice, setEditedPrice] = useState(0);
|
||||
const allowDecimal = preferenceDatas?.[0]?.SettingDtlDetails?.find(
|
||||
|
|
@ -265,11 +254,7 @@ const ComboEditQty = (props) => {
|
|||
setEditedPrice(0);
|
||||
};
|
||||
|
||||
// const AddQuantityonly = () => {
|
||||
// setMessageType('success');
|
||||
// setMessageData('Quantity Added');
|
||||
// };
|
||||
|
||||
|
||||
const createUpdatedCartItem = (cartItem, quantity, newPrice) => {
|
||||
const qty = parseInt(quantity);
|
||||
const rate = parseFloat(newPrice);
|
||||
|
|
|
|||
|
|
@ -29,16 +29,18 @@ import {
|
|||
} from '../../../../../Features/Offer/Offernew/BookingOffernew.js';
|
||||
import { validateOffers } from '../../BSItemCards/ValidateOffer.jsx';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import "./ComboBillTableEdit.scss"
|
||||
import './ComboBillTableEdit.scss';
|
||||
|
||||
const ComboEditQtyAndRate = (props) => {
|
||||
const dispatch = useDispatch();
|
||||
const formRef = useRef(null);
|
||||
const quantityInputRef = useRef(null);
|
||||
const priceChangeInputRef = useRef(null);
|
||||
const modalRef = useRef(null);
|
||||
const { setIndex = () => {}, setEditQtyCombo = () => {}, setEditRateCombo = () => {} } = props;
|
||||
|
||||
const {
|
||||
setIndex = () => {},
|
||||
setEditQtyCombo = () => {},
|
||||
setEditRateCombo = () => {},
|
||||
} = props;
|
||||
|
||||
const [disableSubmitButton, setDisableSubmitButton] = useState(false);
|
||||
const SessionData = useSelector(StoredSessionData);
|
||||
|
|
@ -70,7 +72,9 @@ const ComboEditQtyAndRate = (props) => {
|
|||
const [ConfigDataList, setConfigDataList] = useState([]);
|
||||
const [messageType, setMessageType] = useState(null);
|
||||
const [messageData, setMessageData] = useState(null);
|
||||
const [EditOpen, setEditOpen] = useState(props?.BSBillingEditQuantity || props?.BSBillingEditRate);
|
||||
const [EditOpen, setEditOpen] = useState(
|
||||
props?.BSBillingEditQuantity || props?.BSBillingEditRate
|
||||
);
|
||||
const [ItemData, setItemData] = useState(props?.Productdata);
|
||||
const [Quantity, setQuantity] = useState('');
|
||||
const ReorderProductData = useSelector(GlobalReorderProductDetails);
|
||||
|
|
@ -123,7 +127,7 @@ const ComboEditQtyAndRate = (props) => {
|
|||
setEditOpen(props.BSBillingEditQuantity || props.BSBillingEditRate);
|
||||
setItemData(props.Productdata);
|
||||
setQuantity('');
|
||||
setEditedPrice('');
|
||||
setEditedPrice('');
|
||||
},
|
||||
[props.BSBillingEditQuantity],
|
||||
[props.Productdata],
|
||||
|
|
@ -141,21 +145,26 @@ const ComboEditQtyAndRate = (props) => {
|
|||
}, [RadioBtnSelection, props.BSBillingEditQuantity, props.BSBillingEditRate]);
|
||||
|
||||
useEffect(() => {
|
||||
const handleKeyDown = (event) => {
|
||||
const navigationKeys = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown'];
|
||||
if (event.key === 'Escape' || navigationKeys.includes(event.key)) {
|
||||
event.preventDefault();
|
||||
if (props.BSBillingEditQuantity) {
|
||||
props.handleEditQuantityCancel?.();
|
||||
setEditQtyCombo(false);
|
||||
}
|
||||
if (props.BSBillingEditRate) {
|
||||
props.handleEditRateComboCancel?.();
|
||||
setEditRateCombo(false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
};
|
||||
const handleKeyDown = (event) => {
|
||||
const navigationKeys = [
|
||||
'ArrowLeft',
|
||||
'ArrowRight',
|
||||
'ArrowUp',
|
||||
'ArrowDown',
|
||||
];
|
||||
if (event.key === 'Escape' || navigationKeys.includes(event.key)) {
|
||||
event.preventDefault();
|
||||
if (props.BSBillingEditQuantity) {
|
||||
props.handleEditQuantityCancel?.();
|
||||
setEditQtyCombo(false);
|
||||
}
|
||||
if (props.BSBillingEditRate) {
|
||||
props.handleEditRateComboCancel?.();
|
||||
setEditRateCombo(false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
if (EditOpen) {
|
||||
document.addEventListener('keydown', handleKeyDown);
|
||||
|
|
@ -173,8 +182,6 @@ const handleKeyDown = (event) => {
|
|||
props.BSBillingEditRate,
|
||||
]);
|
||||
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
const BillOrder = SettingDataSelector?.[0]?.SettingDtlDetails?.find(
|
||||
(item) => item.SettingIdName === 'BillItemsOrder'
|
||||
|
|
@ -198,7 +205,11 @@ const handleKeyDown = (event) => {
|
|||
} else if (props?.BSBillingEditQuantity) {
|
||||
setRadioBtnSelection('Quantity');
|
||||
}
|
||||
}, [props?.BSBillingEditRate, props?.BSBillingEditQuantity, props.Productdata?.OrderRate]);
|
||||
}, [
|
||||
props?.BSBillingEditRate,
|
||||
props?.BSBillingEditQuantity,
|
||||
props.Productdata?.OrderRate,
|
||||
]);
|
||||
const getBookingTypeId = async () => {
|
||||
let tempconfigdata = await dispatch(
|
||||
getConfigType({ TypeName: 'Booking Type' })
|
||||
|
|
@ -209,7 +220,6 @@ const handleKeyDown = (event) => {
|
|||
}
|
||||
};
|
||||
|
||||
|
||||
const calculateOverAllQty = (item, filterItems) => {
|
||||
if (!item) return 0;
|
||||
|
||||
|
|
@ -256,25 +266,25 @@ const handleKeyDown = (event) => {
|
|||
setMessageData('Product not found in cart');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
const editedProduct = CartOrderDetails[editedProductIndex];
|
||||
const existingQty = editedProduct.OrderQty;
|
||||
|
||||
|
||||
// Validate rate value
|
||||
if (!newPrice || newPrice <= 0) {
|
||||
setMessageType('error');
|
||||
setMessageData('Please enter a valid rate');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Update ONLY the rate, use existing quantity
|
||||
await handleNormalEditQuantity(
|
||||
editedProduct,
|
||||
editedProductIndex,
|
||||
existingQty,
|
||||
existingQty,
|
||||
newPrice
|
||||
);
|
||||
|
||||
|
||||
// Reset and close
|
||||
setClearQuantity(false);
|
||||
setIndex(null);
|
||||
|
|
@ -3216,14 +3226,13 @@ const handleKeyDown = (event) => {
|
|||
ref={quantityInputRef}
|
||||
type="number"
|
||||
value={Quantity}
|
||||
min="0"
|
||||
min="0"
|
||||
onChange={(e) => setQuantity(e.target.value)}
|
||||
onBlur={() => {
|
||||
if (Quantity && Quantity.trim() !== '') {
|
||||
AddProductQuantity();
|
||||
}
|
||||
}}
|
||||
min={0}
|
||||
className="EditQTYcomboInput"
|
||||
placeholder="Enter Qty"
|
||||
/>
|
||||
|
|
@ -3239,7 +3248,11 @@ const handleKeyDown = (event) => {
|
|||
autoComplete="off"
|
||||
onChange={SellingPriceChange}
|
||||
onBlur={() => {
|
||||
if (editedPrice && editedPrice !== '' && disableSubmitButton) {
|
||||
if (
|
||||
editedPrice &&
|
||||
editedPrice !== '' &&
|
||||
disableSubmitButton
|
||||
) {
|
||||
AddProductQuantity();
|
||||
}
|
||||
}}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import './ComboSalesBillTable.scss';
|
||||
import React, { lazy, useEffect, useRef, useState } from 'react';
|
||||
import { shallowEqual, useDispatch, useSelector } from 'react-redux';
|
||||
import { Popconfirm, Tooltip } from 'antd';
|
||||
import WebFont from 'webfontloader';
|
||||
|
|
@ -9,16 +8,12 @@ import {
|
|||
ChangeTotalAmount,
|
||||
globalExtraTotalAmount,
|
||||
} from '../../../../../Features/ExteraCharges/ExtraCharges.js';
|
||||
import BSBillingEditQuantity from '../BSBillingEditQuantity/BSBillingEditQuantity';
|
||||
import {
|
||||
changeholddata,
|
||||
gettinghold,
|
||||
puttinghold,
|
||||
} from '../../../../../Features/BookingScreen/HoldOption/HoldOption.js';
|
||||
import { getCustomerDisplayWindow } from '../../../../../Features/customerDisplayWindow/customerDisplayWindow.js';
|
||||
import BSEditTotalAmt from '../BSEditTotalAmount/BSEditTotalAmt.jsx';
|
||||
import { useApplyOfferto_CardDetail } from '../../UtillComponents/BSNavBarOffer/BSNavBarOffer_CustomHooks.jsx';
|
||||
import BSImeiDetails from '../BSImeiDetails/BSImeiDetails.jsx';
|
||||
import {
|
||||
getTemplateData,
|
||||
SelectedGlobalBillingColorDetail,
|
||||
|
|
@ -66,8 +61,6 @@ import {
|
|||
GlobalSalesBillEdit,
|
||||
} from '../../../../../Features/BookingScreen/BookingData/BookingData';
|
||||
import {
|
||||
ChangeOfferAppliedProducts,
|
||||
ChangeFreeProductList,
|
||||
ChangeFullFreeProductList,
|
||||
GlobalFreeProdList,
|
||||
GlobalOfferAppliedProducts,
|
||||
|
|
@ -75,11 +68,24 @@ import {
|
|||
changeLoyaltyConsumedQuantities,
|
||||
ClearOfferAppliedProducts,
|
||||
} from '../../../../../Features/Offer/Offernew/BookingOffernew.js';
|
||||
import { useRemoveProducts } from '../BSBillingTable3/RemoveCartWithOffer.jsx';
|
||||
import { useUtilsComponent } from '../../../../../Services/utils.js';
|
||||
import ComboEditRate from '../ComboBillTableEdit/ComboEditRate.jsx';
|
||||
import CustomerPriceHistory from '../../UtillComponents/CustomerPriceHistory.jsx';
|
||||
import ComboEditQtyAndRate from '../ComboBillTableEdit/ComboEditQtyAndRate.jsx';
|
||||
import { useRemoveProducts } from '../BSBillingTable3/RemoveCartWithOffer.jsx';
|
||||
import { useApplyOfferto_CardDetail } from '../../UtillComponents/BSNavBarOffer/BSNavBarOffer_CustomHooks.jsx';
|
||||
// jsx files
|
||||
const CustomerPriceHistory = lazy(
|
||||
() => import('../../UtillComponents/CustomerPriceHistory.jsx')
|
||||
);
|
||||
const ComboEditQtyAndRate = lazy(
|
||||
() => import('../ComboBillTableEdit/ComboEditQtyAndRate.jsx')
|
||||
);
|
||||
const BSEditTotalAmt = lazy(
|
||||
() => import('../BSEditTotalAmount/BSEditTotalAmt.jsx')
|
||||
);
|
||||
const BSImeiDetails = lazy(() => import('../BSImeiDetails/BSImeiDetails.jsx'));
|
||||
const BSBillingEditQuantity = lazy(
|
||||
() => import('../BSBillingEditQuantity/BSBillingEditQuantity.jsx')
|
||||
); // Scss Files
|
||||
import './ComboSalesBillTable.scss';
|
||||
|
||||
const ComboSalesBillTable = () => {
|
||||
const { removeExtraCharge } = useUtilsComponent();
|
||||
|
|
@ -152,13 +158,13 @@ const ComboSalesBillTable = () => {
|
|||
OrderType === 'Hold'
|
||||
? tableData?.filter((a, b) => a.BookingTypeName === 'TakeAway')
|
||||
: tableData?.filter(
|
||||
(a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId
|
||||
);
|
||||
(a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId
|
||||
);
|
||||
const OldtableDataTakeAway =
|
||||
OrderType != 'Hold'
|
||||
? tableData?.filter(
|
||||
(a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId
|
||||
)
|
||||
(a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId
|
||||
)
|
||||
: [];
|
||||
|
||||
const [EditQuantity, setEditQuantity] = useState(false);
|
||||
|
|
@ -267,7 +273,9 @@ const ComboSalesBillTable = () => {
|
|||
...sameItems[0],
|
||||
OrderQty: totalQty,
|
||||
TotalAmt: totalQty * item.OrderRate,
|
||||
TaxAmt: ((totalQty * item.OrderRate * item.TaxPercentage) / (100 + item.TaxPercentage)),
|
||||
TaxAmt:
|
||||
(totalQty * item.OrderRate * item.TaxPercentage) /
|
||||
(100 + item.TaxPercentage),
|
||||
};
|
||||
mergedData.push(mergedItem);
|
||||
} else {
|
||||
|
|
@ -313,13 +321,7 @@ const ComboSalesBillTable = () => {
|
|||
};
|
||||
}, [GetCustId, tableData]);
|
||||
|
||||
// useEffect(() => {
|
||||
// const BillOrder = preferenceDatas?.[0]?.SettingDtlDetails?.find(
|
||||
// (item) => item.SettingIdName === 'BillItemsOrder'
|
||||
// );
|
||||
// setBillOrderPre(BillOrder?.SettingValue);
|
||||
// }, [preferenceDatas]);
|
||||
useEffect(() => {
|
||||
useEffect(() => {
|
||||
const getSelectedItem = () => {
|
||||
const getItem = (data = []) => {
|
||||
if (!data.length) return null;
|
||||
|
|
@ -463,6 +465,7 @@ const ComboSalesBillTable = () => {
|
|||
BranchId: BranchId,
|
||||
AppId: AppId,
|
||||
};
|
||||
|
||||
await dispatch(getSelectedFavItems(data)).unwrap();
|
||||
|
||||
let data1 = {
|
||||
|
|
@ -1229,9 +1232,9 @@ const ComboSalesBillTable = () => {
|
|||
)?.map((item, idx) =>
|
||||
idx === 0
|
||||
? {
|
||||
...item,
|
||||
FreeQty,
|
||||
}
|
||||
...item,
|
||||
FreeQty,
|
||||
}
|
||||
: item
|
||||
),
|
||||
};
|
||||
|
|
@ -2136,7 +2139,6 @@ const ComboSalesBillTable = () => {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
|
|
@ -2468,24 +2470,25 @@ const ComboSalesBillTable = () => {
|
|||
tableDataDinein?.length >= PreviousdataLength
|
||||
? 'wheat'
|
||||
: BookingType !== 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length + index === 0 &&
|
||||
tableDataDinein?.length >= PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length + index === 0 &&
|
||||
tableDataDinein?.length >= PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
? 'wheat'
|
||||
: 'inherit'
|
||||
: 'none',
|
||||
background: row?.SalesId && OrderType !== 'Hold'
|
||||
? 'rgb(243, 248, 213)'
|
||||
: GlobEstBooking === 'ParEst' &&
|
||||
GlobProdwisedata?.includes(
|
||||
row?.InwardDtlId + ' ' + row?.BookingTypeName
|
||||
)
|
||||
? '#b2d1f7'
|
||||
: (OldtableDataTakeAway?.length + index) % 2 === 0
|
||||
? 'white'
|
||||
: SelectedBillColor?.['OverallBackgroundColor'],
|
||||
background:
|
||||
row?.SalesId && OrderType !== 'Hold'
|
||||
? 'rgb(243, 248, 213)'
|
||||
: GlobEstBooking === 'ParEst' &&
|
||||
GlobProdwisedata?.includes(
|
||||
row?.InwardDtlId + ' ' + row?.BookingTypeName
|
||||
)
|
||||
? '#b2d1f7'
|
||||
: (OldtableDataTakeAway?.length + index) % 2 === 0
|
||||
? 'white'
|
||||
: SelectedBillColor?.['OverallBackgroundColor'],
|
||||
|
||||
animation:
|
||||
BillOrderPre === 'Y' && !BookingTypeBoth
|
||||
|
|
@ -2524,44 +2527,44 @@ const ComboSalesBillTable = () => {
|
|||
{/* Product Name / Item */}
|
||||
{(item.OptionName === 'Item' ||
|
||||
item.OptionName === 'Product Name') && (
|
||||
<td
|
||||
key={`prod-${index}`}
|
||||
className={`productNameTd ${isActiveCell ? 'active-cell' : ''}`}
|
||||
onClick={() =>
|
||||
row.FullProductIdentifierDtls?.length > 0 ||
|
||||
row.ProductIdentifierDtls?.length > 0
|
||||
? handleImeiDetails(row)
|
||||
: editField && handleEditQuantity(row)
|
||||
}
|
||||
>
|
||||
{row?.Type !== 'OS' ? row.ProdName : row.ServiceName}
|
||||
{row?.BrandName ? ` ${row.BrandName}` : ''}
|
||||
{row?.Type !== 'C' && (
|
||||
<p
|
||||
// className="Tbl3-Variant"
|
||||
className={
|
||||
isActiveCell
|
||||
? 'Tbl3VariantActve'
|
||||
: 'Tbl3-Variant'
|
||||
}
|
||||
>
|
||||
{/* {row?.ProdVariantName} {row?.Size} {row?.UomName} */}
|
||||
(
|
||||
{!row?.ProdVariantName?.toLowerCase()?.includes(
|
||||
'variant'
|
||||
) && <span>{row?.ProdVariantName} </span>}
|
||||
{row?.Size}
|
||||
{row?.SinglePc == 'Y' ? 'PCS' : row?.UomName})
|
||||
<td
|
||||
key={`prod-${index}`}
|
||||
className={`productNameTd ${isActiveCell ? 'active-cell' : ''}`}
|
||||
onClick={() =>
|
||||
row.FullProductIdentifierDtls?.length > 0 ||
|
||||
row.ProductIdentifierDtls?.length > 0
|
||||
? handleImeiDetails(row)
|
||||
: editField && handleEditQuantity(row)
|
||||
}
|
||||
>
|
||||
{row?.Type !== 'OS' ? row.ProdName : row.ServiceName}
|
||||
{row?.BrandName ? ` ${row.BrandName}` : ''}
|
||||
{row?.Type !== 'C' && (
|
||||
<p
|
||||
// className="Tbl3-Variant"
|
||||
className={
|
||||
isActiveCell
|
||||
? 'Tbl3VariantActve'
|
||||
: 'Tbl3-Variant'
|
||||
}
|
||||
>
|
||||
{/* {row?.ProdVariantName} {row?.Size} {row?.UomName} */}
|
||||
(
|
||||
{!row?.ProdVariantName?.toLowerCase()?.includes(
|
||||
'variant'
|
||||
) && <span>{row?.ProdVariantName} </span>}
|
||||
{row?.Size}
|
||||
{row?.SinglePc == 'Y' ? 'PCS' : row?.UomName})
|
||||
</p>
|
||||
)}
|
||||
{row?.Type === 'C' &&
|
||||
row.ProdDetail?.map((prod, idx) => (
|
||||
<p key={idx}>
|
||||
{prod.ProdName} - {prod.Size} {prod.UomName}
|
||||
</p>
|
||||
)}
|
||||
{row?.Type === 'C' &&
|
||||
row.ProdDetail?.map((prod, idx) => (
|
||||
<p key={idx}>
|
||||
{prod.ProdName} - {prod.Size} {prod.UomName}
|
||||
</p>
|
||||
))}
|
||||
</td>
|
||||
)}
|
||||
))}
|
||||
</td>
|
||||
)}
|
||||
|
||||
{/* Barcode */}
|
||||
{item.OptionName === 'Barcode' && (
|
||||
|
|
@ -2588,10 +2591,11 @@ const ComboSalesBillTable = () => {
|
|||
}}
|
||||
key={`qty-${index}`}
|
||||
tabIndex={0}
|
||||
className={`${EditQtyCombo && row?.localId === Index
|
||||
? 'EditQTYcomboTD'
|
||||
: 'qtyTd'
|
||||
} ${isActiveCell ? 'active-cell' : ''}`}
|
||||
className={`${
|
||||
EditQtyCombo && row?.localId === Index
|
||||
? 'EditQTYcomboTD'
|
||||
: 'qtyTd'
|
||||
} ${isActiveCell ? 'active-cell' : ''}`}
|
||||
onClick={() =>
|
||||
editField && handleEditQuantityCombo(row)
|
||||
}
|
||||
|
|
@ -2654,9 +2658,9 @@ const ComboSalesBillTable = () => {
|
|||
>
|
||||
{row?.Offer > 0
|
||||
? `${(
|
||||
(row.Offer / (row?.OrderQty * row?.OrderRate)) *
|
||||
100
|
||||
).toFixed(2)}%`
|
||||
(row.Offer / (row?.OrderQty * row?.OrderRate)) *
|
||||
100
|
||||
).toFixed(2)}%`
|
||||
: '-'}
|
||||
</td>
|
||||
)}
|
||||
|
|
@ -2688,8 +2692,8 @@ const ComboSalesBillTable = () => {
|
|||
>
|
||||
{allowDecimal
|
||||
? Number(row.TotalAmt - (row?.Offer || 0)).toFixed(
|
||||
2
|
||||
)
|
||||
2
|
||||
)
|
||||
: Number(row.TotalAmt - (row?.Offer || 0))}
|
||||
</td>
|
||||
)}
|
||||
|
|
@ -2732,7 +2736,7 @@ const ComboSalesBillTable = () => {
|
|||
<td
|
||||
key={`delete-${index}`}
|
||||
className={`deleteTd ${isActiveCell ? 'active-cell' : ''}`}
|
||||
// className=""
|
||||
// className=""
|
||||
>
|
||||
<AiOutlineClose
|
||||
onClick={() => removeFromCart(row)}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -524,36 +524,6 @@ function BSCategoryHorizontal(props) {
|
|||
await dispatch(changeProductSubCategorieProdCatfun());
|
||||
}
|
||||
};
|
||||
// const handleClick = async (e, ProdCat, index) => {
|
||||
// let data1 = {
|
||||
// compId: CompId,
|
||||
// branchId: BranchId,
|
||||
// appId: AppId,
|
||||
// prodCat: ProdCat,
|
||||
// };
|
||||
// let data = false;
|
||||
// setaccessToCard(false);
|
||||
// await dispatch(changeCombosearch(false));
|
||||
// dispatch(ChangeisFavClicked(false));
|
||||
// setAccessOther(false);
|
||||
// setIsModalOpen(false);
|
||||
// setIndexVal(index);
|
||||
|
||||
// await dispatch(changeProductCategorie(ProdCat));
|
||||
// // await dispatch(changeProductSubCategorie(ProdCat));
|
||||
// await dispatch(changeAccessForOthers(data));
|
||||
// await dispatch(ChangeFocusCatCard(!FocusStatus));
|
||||
// let tempSubCat = templateData?.BookingLayout?.[1]?.filter(
|
||||
// (a, b) => a?.OptionName === 'SubCategory'
|
||||
// );
|
||||
// if (tempSubCat.length === 0) {
|
||||
// await dispatch(changeProductSubCategorieProdCatfun());
|
||||
// }
|
||||
// if (templateData?.BookingLayout?.[0] === 'Layout2') {
|
||||
// setSubCat(true);
|
||||
// }
|
||||
|
||||
// };
|
||||
|
||||
useEffect(() => {
|
||||
if (productCardTrigger && FavSelected) {
|
||||
|
|
@ -584,27 +554,15 @@ function BSCategoryHorizontal(props) {
|
|||
}
|
||||
: {}),
|
||||
};
|
||||
await dispatch(getSelectedFavItems(data1));
|
||||
|
||||
// await dispatch(getSelectedFavItems(data1));
|
||||
await dispatch(ChangeFocusCatCard(!FocusStatus));
|
||||
};
|
||||
const handleClickOtherItems = async () => {
|
||||
dispatch(ChangedraggingComponent(null));
|
||||
dispatch(Changedragging(false));
|
||||
let data = false;
|
||||
setIndexVal(Infinity);
|
||||
// setaccessToCard(true);
|
||||
// dispatch(ChangeisFavClicked(true));
|
||||
// setAccessOther(false);
|
||||
setIsModalOpen(true);
|
||||
// // await dispatch(ChangeSubcategoryData(null));
|
||||
// await dispatch(changeAccessForOthers(data));
|
||||
// let data1 = {
|
||||
// CompId: CompId,
|
||||
// BranchId: BranchId,
|
||||
// AppId: AppId,
|
||||
// };
|
||||
// await dispatch(getSelectedFavItems(data1));
|
||||
// await dispatch(ChangeFocusCatCard(!FocusStatus));
|
||||
};
|
||||
|
||||
const handleClick2 = async () => {
|
||||
|
|
@ -690,8 +648,10 @@ function BSCategoryHorizontal(props) {
|
|||
};
|
||||
|
||||
useEffect(() => {
|
||||
holdnamedrop();
|
||||
}, [AppId, CompId, BranchId]);
|
||||
if (isModalOpen) {
|
||||
holdnamedrop();
|
||||
}
|
||||
}, [isModalOpen]);
|
||||
|
||||
const holdnamedrop = async () => {
|
||||
let data = {
|
||||
|
|
@ -896,16 +856,16 @@ function BSCategoryHorizontal(props) {
|
|||
|
||||
formRef?.current?.resetFields();
|
||||
resetForm();
|
||||
let data = {
|
||||
CompId: CompId,
|
||||
BranchId: BranchId,
|
||||
AppId: AppId,
|
||||
ProdType: 'O',
|
||||
};
|
||||
const respons = await dispatch(othernamedrop(data)).unwrap();
|
||||
if (respons?.data?.statusCode == 1) {
|
||||
setTabledropname(respons?.data?.data);
|
||||
}
|
||||
// let data = {
|
||||
// CompId: CompId,
|
||||
// BranchId: BranchId,
|
||||
// AppId: AppId,
|
||||
// ProdType: 'O',
|
||||
// };
|
||||
// const respons = await dispatch(othernamedrop(data)).unwrap();
|
||||
// if (respons?.data?.statusCode == 1) {
|
||||
// setTabledropname(respons?.data?.data);
|
||||
// }
|
||||
};
|
||||
|
||||
const handleValuesChange = (values) => {
|
||||
|
|
@ -1702,7 +1662,7 @@ function BSCategoryHorizontal(props) {
|
|||
}))}
|
||||
className="field-DropDown"
|
||||
// placeholder="ConfigType"
|
||||
label={<label class="required">Tax</label>}
|
||||
label={<label className="required">Tax</label>}
|
||||
// optionsNames={{ value: "TaxPercentage", label: "TaxIdName" }}
|
||||
onChangeFunction={(selectedValue) =>
|
||||
onChangeFunction(selectedValue)
|
||||
|
|
@ -1773,7 +1733,7 @@ function BSCategoryHorizontal(props) {
|
|||
// }}
|
||||
className="size-input"
|
||||
label={
|
||||
<label class="required">No.of.Units :</label>
|
||||
<label className="required">No.of.Units :</label>
|
||||
}
|
||||
autocomplete="off"
|
||||
onChange={(e) =>
|
||||
|
|
@ -1885,7 +1845,7 @@ function BSCategoryHorizontal(props) {
|
|||
]}
|
||||
>
|
||||
<InputField
|
||||
label={<label class="required">Quantity</label>}
|
||||
label={<label className="required">Quantity</label>}
|
||||
valueData={defaultQuantity}
|
||||
autocomplete="off"
|
||||
onChange={(e) =>
|
||||
|
|
@ -1953,7 +1913,9 @@ function BSCategoryHorizontal(props) {
|
|||
>
|
||||
<InputField
|
||||
label={
|
||||
<label class="required">Amount / Per Item</label>
|
||||
<label className="required">
|
||||
Amount / Per Item
|
||||
</label>
|
||||
}
|
||||
autocomplete="off"
|
||||
onChange={(e) =>
|
||||
|
|
|
|||
|
|
@ -510,8 +510,10 @@ function BSCategoryVertical(props) {
|
|||
};
|
||||
|
||||
useEffect(() => {
|
||||
holdnamedrop();
|
||||
}, [AppId, CompId, BranchId]);
|
||||
if (isModalOpen) {
|
||||
holdnamedrop();
|
||||
}
|
||||
}, [isModalOpen]);
|
||||
|
||||
const holdnamedrop = async () => {
|
||||
let data = {
|
||||
|
|
@ -708,16 +710,16 @@ function BSCategoryVertical(props) {
|
|||
|
||||
formRef?.current?.resetFields();
|
||||
resetForm();
|
||||
let data = {
|
||||
CompId: CompId,
|
||||
BranchId: BranchId,
|
||||
AppId: AppId,
|
||||
ProdType: 'O',
|
||||
};
|
||||
const respons = await dispatch(othernamedrop(data)).unwrap();
|
||||
if (respons?.data?.statusCode == 1) {
|
||||
setTabledropname(respons?.data?.data);
|
||||
}
|
||||
// let data = {
|
||||
// CompId: CompId,
|
||||
// BranchId: BranchId,
|
||||
// AppId: AppId,
|
||||
// ProdType: 'O',
|
||||
// };
|
||||
// const respons = await dispatch(othernamedrop(data)).unwrap();
|
||||
// if (respons?.data?.statusCode == 1) {
|
||||
// setTabledropname(respons?.data?.data);
|
||||
// }
|
||||
};
|
||||
|
||||
const handleValuesChange = (values) => {
|
||||
|
|
@ -1422,7 +1424,7 @@ function BSCategoryVertical(props) {
|
|||
<p
|
||||
style={{
|
||||
textTransform: Uppercase,
|
||||
fontWeight: '600',
|
||||
fontWeight: '500',
|
||||
// paddingTop: !item.SmallIcon && "4px",
|
||||
fontFamily: SelectedFontFamily ? SelectedFontFamily : '',
|
||||
color: SelectedCatgColor
|
||||
|
|
|
|||
|
|
@ -62,7 +62,10 @@ import { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';
|
|||
import { BsSortAlphaDown } from 'react-icons/bs';
|
||||
import { BsSortAlphaDownAlt } from 'react-icons/bs';
|
||||
import { ApplicationPreferences } from '../../../../Features/BrachLogin/BranchLogin.js';
|
||||
import {changeothersdatas, OtherServicesCardlistdata} from '../../../../Features/OtherServices/OtherServices.js';
|
||||
import {
|
||||
changeothersdatas,
|
||||
OtherServicesCardlistdata,
|
||||
} from '../../../../Features/OtherServices/OtherServices.js';
|
||||
|
||||
function BSOtherServicesHorizontalcat(props) {
|
||||
const formRef = useRef(null);
|
||||
|
|
@ -93,7 +96,6 @@ function BSOtherServicesHorizontalcat(props) {
|
|||
const draggingComponent = useSelector(GlobaldraggingComponent);
|
||||
const alphabeticFormat = useSelector(GlobalisAlphabeticFormat);
|
||||
|
||||
|
||||
const [isDragging, setIsDragging] = useState(false);
|
||||
const [startX, setStartX] = useState(null);
|
||||
const [accessToCard, setaccessToCard] = useState(false);
|
||||
|
|
@ -375,14 +377,19 @@ function BSOtherServicesHorizontalcat(props) {
|
|||
};
|
||||
|
||||
const handleClick = async (e, ProdCat, index) => {
|
||||
let Filterdata1 = ComboCardata?.filter(
|
||||
(item) => item?.ServiceCategory === ProdCat
|
||||
);
|
||||
let Filterdata2 = ComboCardata?.filter(
|
||||
(item) => item?.ServiceCategory === ProdCat
|
||||
);
|
||||
|
||||
let Filterdata1 = ComboCardata?.filter((item) => item?.ServiceCategory === ProdCat)
|
||||
let Filterdata2 = ComboCardata?.filter((item) => item?.ServiceCategory === ProdCat)
|
||||
|
||||
|
||||
let Filterdata = ComboCardata?.filter((item) => item?.ServiceCategory === ProdCat)?.[0]?.ServiceDetails;
|
||||
let Filterdatas = ComboCardata?.filter((item) => item?.ServiceCategory === ProdCat)?.[0]?.ServiceDetails;
|
||||
|
||||
let Filterdata = ComboCardata?.filter(
|
||||
(item) => item?.ServiceCategory === ProdCat
|
||||
)?.[0]?.ServiceDetails;
|
||||
let Filterdatas = ComboCardata?.filter(
|
||||
(item) => item?.ServiceCategory === ProdCat
|
||||
)?.[0]?.ServiceDetails;
|
||||
|
||||
let data1 = {
|
||||
compId: CompId,
|
||||
|
|
@ -430,7 +437,6 @@ let Filterdatas = ComboCardata?.filter((item) => item?.ServiceCategory === ProdC
|
|||
};
|
||||
|
||||
const handleClick2 = async () => {
|
||||
|
||||
getTaxname();
|
||||
getUom();
|
||||
setIndexVal(-1);
|
||||
|
|
@ -511,8 +517,10 @@ let Filterdatas = ComboCardata?.filter((item) => item?.ServiceCategory === ProdC
|
|||
};
|
||||
|
||||
useEffect(() => {
|
||||
holdnamedrop();
|
||||
}, [AppId, CompId, BranchId]);
|
||||
if (isModalOpen) {
|
||||
holdnamedrop();
|
||||
}
|
||||
}, [isModalOpen]);
|
||||
|
||||
const holdnamedrop = async () => {
|
||||
let data = {
|
||||
|
|
@ -526,13 +534,7 @@ let Filterdatas = ComboCardata?.filter((item) => item?.ServiceCategory === ProdC
|
|||
|
||||
const response = await dispatch(getUomData()).unwrap();
|
||||
|
||||
// setTableuomname(response?.data?.data);
|
||||
// let UomId = response?.data?.data?.filter(
|
||||
// (item) => item.ConfigName?.toLowerCase() === 'pcs'
|
||||
// )?.[0]?.['ConfigId'];
|
||||
// formRef.current?.setFieldsValue({ UOM: UomId });
|
||||
// setselectedUom(UomId);
|
||||
|
||||
|
||||
const UomTypePreference = ApplicationPreferenceData?.find(
|
||||
(preference) => preference?.PreferredCatName === 'Product Uom'
|
||||
)?.PreferenceCatDetails;
|
||||
|
|
@ -718,17 +720,7 @@ let Filterdatas = ComboCardata?.filter((item) => item?.ServiceCategory === ProdC
|
|||
handleCancel();
|
||||
|
||||
formRef?.current?.resetFields();
|
||||
resetForm();
|
||||
let data = {
|
||||
CompId: CompId,
|
||||
BranchId: BranchId,
|
||||
AppId: AppId,
|
||||
ProdType: 'O',
|
||||
};
|
||||
const respons = await dispatch(othernamedrop(data)).unwrap();
|
||||
if (respons?.data?.statusCode == 1) {
|
||||
setTabledropname(respons?.data?.data);
|
||||
}
|
||||
resetForm();
|
||||
};
|
||||
|
||||
const handleValuesChange = (values) => {
|
||||
|
|
@ -860,20 +852,19 @@ let Filterdatas = ComboCardata?.filter((item) => item?.ServiceCategory === ProdC
|
|||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (typeof searchData === 'string' && categoryData?.length > 0) {
|
||||
const searchTerm = searchData?.trim()?.toLowerCase();
|
||||
const foundIndex = categoryData.findIndex(
|
||||
(cat) =>
|
||||
typeof cat.ProdCatName === 'string' &&
|
||||
cat.ProdCatName?.trim()?.toLowerCase() === searchTerm
|
||||
);
|
||||
if (foundIndex !== -1) {
|
||||
setIndexVal(foundIndex);
|
||||
if (typeof searchData === 'string' && categoryData?.length > 0) {
|
||||
const searchTerm = searchData?.trim()?.toLowerCase();
|
||||
const foundIndex = categoryData.findIndex(
|
||||
(cat) =>
|
||||
typeof cat.ProdCatName === 'string' &&
|
||||
cat.ProdCatName?.trim()?.toLowerCase() === searchTerm
|
||||
);
|
||||
if (foundIndex !== -1) {
|
||||
setIndexVal(foundIndex);
|
||||
}
|
||||
} else if (categoryData?.length > 0) {
|
||||
setIndexVal(0);
|
||||
}
|
||||
} else if (categoryData?.length > 0) {
|
||||
setIndexVal(0);
|
||||
}
|
||||
|
||||
}, [searchData, categoryData]);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
@ -893,14 +884,13 @@ let Filterdatas = ComboCardata?.filter((item) => item?.ServiceCategory === ProdC
|
|||
let Data = response?.data?.data;
|
||||
|
||||
setCombocardata(Data?.ServiceCategories);
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
<div className="CategoryHorizontal bs1"
|
||||
<div
|
||||
className="CategoryHorizontal bs1"
|
||||
ref={containerRef}
|
||||
style={{ maxWidth: '100%' }}
|
||||
>
|
||||
|
|
@ -1026,7 +1016,7 @@ let Filterdatas = ComboCardata?.filter((item) => item?.ServiceCategory === ProdC
|
|||
option,
|
||||
selectedTaxPercentage === option.TaxId
|
||||
),
|
||||
// label: option.TaxIdName + ' - ' + option.TaxPercentage + ' % ',
|
||||
// label: option.NameTaxIdName + ' - ' + option.TaxPercentage + ' % ',
|
||||
}))}
|
||||
className="field-DropDown"
|
||||
// placeholder="ConfigType"
|
||||
|
|
@ -1099,13 +1089,11 @@ let Filterdatas = ComboCardata?.filter((item) => item?.ServiceCategory === ProdC
|
|||
}
|
||||
// inputMode="numeric"
|
||||
// onInput={(e) => {
|
||||
// e.target.value = e.target.value.replace(/\D/g, "");
|
||||
// e.target.Namevalue = e.target.value.replace(/\D/g, "");
|
||||
// }}
|
||||
className="size-input"
|
||||
label={
|
||||
<label class="required">
|
||||
No.of.Units :
|
||||
</label>
|
||||
<label class="required">No.of.Units :</label>
|
||||
}
|
||||
autocomplete="off"
|
||||
onChange={(e) =>
|
||||
|
|
@ -1147,32 +1135,7 @@ let Filterdatas = ComboCardata?.filter((item) => item?.ServiceCategory === ProdC
|
|||
/>
|
||||
</Form.Item>
|
||||
</div>
|
||||
</div>
|
||||
{/* <Form.Item
|
||||
name="UOM"
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: "Please Select UOM",
|
||||
},
|
||||
]}
|
||||
>
|
||||
<DropDowns
|
||||
options={Tableuomname?.map((option) => ({
|
||||
value: option.ConfigId,
|
||||
label: option.ConfigName,
|
||||
}))}
|
||||
placeholder="ConfigType"
|
||||
label={<label class="required">UOM</label>}
|
||||
optionsNames={{ value: "TypeId", label: "TypeName" }}
|
||||
className="field-DropDown"
|
||||
onChangeFunction={(selectedValues) =>
|
||||
onChangeuomFunction(selectedValues)
|
||||
}
|
||||
valueData={selectedUom}
|
||||
disabled={add || !EditState ? false : true}
|
||||
/>
|
||||
</Form.Item> */}
|
||||
</div>
|
||||
<div
|
||||
className="quantity-amt"
|
||||
style={{
|
||||
|
|
@ -1420,7 +1383,7 @@ let Filterdatas = ComboCardata?.filter((item) => item?.ServiceCategory === ProdC
|
|||
index={indexval}
|
||||
onClick={() => handleClick1()}
|
||||
> */}
|
||||
{/* <div
|
||||
{/* <div
|
||||
style={{ flexDirection: Reverse1 }}
|
||||
className="CategoryHorizontal-sub-samplecard"
|
||||
>
|
||||
|
|
@ -1438,7 +1401,7 @@ let Filterdatas = ComboCardata?.filter((item) => item?.ServiceCategory === ProdC
|
|||
Favourites
|
||||
</p>
|
||||
</div> */}
|
||||
{/* </div> */}
|
||||
{/* </div> */}
|
||||
{/* )} */}
|
||||
|
||||
{(!Isdragging || draggingComponent !== 'category') &&
|
||||
|
|
@ -1469,7 +1432,7 @@ let Filterdatas = ComboCardata?.filter((item) => item?.ServiceCategory === ProdC
|
|||
|
||||
borderColor:
|
||||
index === indexval
|
||||
? '#000000'
|
||||
? '#000000'
|
||||
: SelectedCatgColor?.['BackgroundColor'],
|
||||
}}
|
||||
// key={}
|
||||
|
|
@ -1569,7 +1532,9 @@ let Filterdatas = ComboCardata?.filter((item) => item?.ServiceCategory === ProdC
|
|||
minWidth: 'max-content', // set a width if needed
|
||||
}}
|
||||
className="sampleCard"
|
||||
onClick={(e) => handleClick(e, item.ServiceCategory, index)}
|
||||
onClick={(e) =>
|
||||
handleClick(e, item.ServiceCategory, index)
|
||||
}
|
||||
>
|
||||
<div
|
||||
style={{ flexDirection: Reverse1 }}
|
||||
|
|
@ -1672,7 +1637,7 @@ let Filterdatas = ComboCardata?.filter((item) => item?.ServiceCategory === ProdC
|
|||
index={indexval}
|
||||
onClick={() => handleClick2()}
|
||||
> */}
|
||||
{/* <div
|
||||
{/* <div
|
||||
style={{ flexDirection: Reverse1 }}
|
||||
className="CategoryHorizontal-sub-samplecard"
|
||||
>
|
||||
|
|
@ -1703,9 +1668,7 @@ let Filterdatas = ComboCardata?.filter((item) => item?.ServiceCategory === ProdC
|
|||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,10 @@ import { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';
|
|||
import { BsSortAlphaDown } from 'react-icons/bs';
|
||||
import { BsSortAlphaDownAlt } from 'react-icons/bs';
|
||||
import { ApplicationPreferences } from '../../../../Features/BrachLogin/BranchLogin.js';
|
||||
import { changeothersdatas, OtherServicesCardlistdata } from '../../../../Features/OtherServices/OtherServices.js';
|
||||
import {
|
||||
changeothersdatas,
|
||||
OtherServicesCardlistdata,
|
||||
} from '../../../../Features/OtherServices/OtherServices.js';
|
||||
|
||||
function BSOtherServicesVerticalcat(props) {
|
||||
const formRef = useRef(null);
|
||||
|
|
@ -105,7 +108,7 @@ function BSOtherServicesVerticalcat(props) {
|
|||
const [add, setAdd] = useState(false);
|
||||
const [defaultQuantity, setdefaultQuantity] = useState(1);
|
||||
const [isSortClicked, setIsSortClicked] = useState(false);
|
||||
const [otherServiceCategoryData,setOtherServiceCategoryData] = useState([])
|
||||
const [otherServiceCategoryData, setOtherServiceCategoryData] = useState([]);
|
||||
const AppId = SessionData?.AppId;
|
||||
const CompId = SessionData?.CompId;
|
||||
const BranchId = SessionData?.BranchId;
|
||||
|
|
@ -147,7 +150,7 @@ function BSOtherServicesVerticalcat(props) {
|
|||
);
|
||||
}
|
||||
};
|
||||
OtherServicesCategoryList()
|
||||
OtherServicesCategoryList();
|
||||
const container = scrollContainerRef?.current;
|
||||
if (container) {
|
||||
container.addEventListener('scroll', handleScroll);
|
||||
|
|
@ -299,7 +302,9 @@ function BSOtherServicesVerticalcat(props) {
|
|||
};
|
||||
|
||||
const handleClick = async (e, ProdCat, index) => {
|
||||
const selectedOtherServiceCategory = otherServiceCategoryData?.filter(({ServiceCategory}) => ServiceCategory === ProdCat)
|
||||
const selectedOtherServiceCategory = otherServiceCategoryData?.filter(
|
||||
({ ServiceCategory }) => ServiceCategory === ProdCat
|
||||
);
|
||||
let data = false;
|
||||
setaccessToCard(false);
|
||||
setAccessOther(false);
|
||||
|
|
@ -416,8 +421,10 @@ function BSOtherServicesVerticalcat(props) {
|
|||
};
|
||||
|
||||
useEffect(() => {
|
||||
holdnamedrop();
|
||||
}, [AppId, CompId, BranchId]);
|
||||
if (isModalOpen) {
|
||||
holdnamedrop();
|
||||
}
|
||||
}, [isModalOpen]);
|
||||
|
||||
const holdnamedrop = async () => {
|
||||
let data = {
|
||||
|
|
@ -614,16 +621,16 @@ function BSOtherServicesVerticalcat(props) {
|
|||
|
||||
formRef?.current?.resetFields();
|
||||
resetForm();
|
||||
let data = {
|
||||
CompId: CompId,
|
||||
BranchId: BranchId,
|
||||
AppId: AppId,
|
||||
ProdType: 'O',
|
||||
};
|
||||
const respons = await dispatch(othernamedrop(data)).unwrap();
|
||||
if (respons?.data?.statusCode == 1) {
|
||||
setTabledropname(respons?.data?.data);
|
||||
}
|
||||
// let data = {
|
||||
// CompId: CompId,
|
||||
// BranchId: BranchId,
|
||||
// AppId: AppId,
|
||||
// ProdType: 'O',
|
||||
// };
|
||||
// const respons = await dispatch(othernamedrop(data)).unwrap();
|
||||
// if (respons?.data?.statusCode == 1) {
|
||||
// setTabledropname(respons?.data?.data);
|
||||
// }
|
||||
};
|
||||
|
||||
const handleValuesChange = (values) => {
|
||||
|
|
@ -778,31 +785,32 @@ function BSOtherServicesVerticalcat(props) {
|
|||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (typeof searchData === 'string' && categoryData?.length > 0) {
|
||||
const searchTerm = searchData?.trim()?.toLowerCase();
|
||||
const foundIndex = categoryData.findIndex(
|
||||
(cat) =>
|
||||
typeof cat.ProdCatName === 'string' &&
|
||||
cat.ProdCatName?.trim()?.toLowerCase() === searchTerm
|
||||
);
|
||||
if (foundIndex !== -1) {
|
||||
setIndexVal(foundIndex);
|
||||
}
|
||||
} else if (categoryData?.length > 0) {
|
||||
setIndexVal(0);
|
||||
if (typeof searchData === 'string' && categoryData?.length > 0) {
|
||||
const searchTerm = searchData?.trim()?.toLowerCase();
|
||||
const foundIndex = categoryData.findIndex(
|
||||
(cat) =>
|
||||
typeof cat.ProdCatName === 'string' &&
|
||||
cat.ProdCatName?.trim()?.toLowerCase() === searchTerm
|
||||
);
|
||||
if (foundIndex !== -1) {
|
||||
setIndexVal(foundIndex);
|
||||
}
|
||||
|
||||
} else if (categoryData?.length > 0) {
|
||||
setIndexVal(0);
|
||||
}
|
||||
}, [searchData, categoryData]);
|
||||
|
||||
const OtherServicesCategoryList = async () => {
|
||||
let response = await dispatch(OtherServicesCardlistdata({CompId,BranchId,AppId})).unwrap();
|
||||
if (response?.data?.statusCode === 1) {
|
||||
setOtherServiceCategoryData(response?.data?.data?.ServiceCategories);
|
||||
}else{
|
||||
setMessageType("error")
|
||||
setMessageData(response?.data?.response)
|
||||
}
|
||||
};
|
||||
const OtherServicesCategoryList = async () => {
|
||||
let response = await dispatch(
|
||||
OtherServicesCardlistdata({ CompId, BranchId, AppId })
|
||||
).unwrap();
|
||||
if (response?.data?.statusCode === 1) {
|
||||
setOtherServiceCategoryData(response?.data?.data?.ServiceCategories);
|
||||
} else {
|
||||
setMessageType('error');
|
||||
setMessageData(response?.data?.response);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="CategoryVertical">
|
||||
|
|
@ -919,7 +927,7 @@ function BSOtherServicesVerticalcat(props) {
|
|||
),
|
||||
// label:
|
||||
// option.TaxIdName +
|
||||
// " - " +
|
||||
// " - " +Name
|
||||
// option.TaxPercentage +
|
||||
// " % ",
|
||||
}))}
|
||||
|
|
@ -951,7 +959,7 @@ function BSOtherServicesVerticalcat(props) {
|
|||
);
|
||||
}
|
||||
|
||||
return Promise.resolve();
|
||||
return Promise.Nameresolve();
|
||||
},
|
||||
},
|
||||
]}
|
||||
|
|
@ -1099,6 +1107,7 @@ function BSOtherServicesVerticalcat(props) {
|
|||
|
||||
return Promise.resolve();
|
||||
},
|
||||
Name,
|
||||
},
|
||||
]}
|
||||
>
|
||||
|
|
@ -1210,51 +1219,7 @@ function BSOtherServicesVerticalcat(props) {
|
|||
pointerEvents: OrderType === 'Failed' ? 'none' : 'auto',
|
||||
}}
|
||||
>
|
||||
{/* {globalAllItemdata?.length > 0 && (
|
||||
<div
|
||||
style={{
|
||||
borderRadius: Radius,
|
||||
backgroundColor:
|
||||
!accessOther && accessToCard
|
||||
? lightenColor(SelectedCatgColor?.['BackgroundColor'], 0.4)
|
||||
: SelectedCatgColor?.['BackgroundColor'],
|
||||
padding: padding,
|
||||
border: accessToCard && '1px solid',
|
||||
borderColor:
|
||||
accessToCard &&
|
||||
!accessOther &&
|
||||
SelectedCatgColor?.['BackgroundColor'] == '#ffffff'
|
||||
? '#000000'
|
||||
: SelectedCatgColor?.['BackgroundColor'] === '#000000'
|
||||
? '#ffffff'
|
||||
: darkenColor(SelectedCatgColor?.['BackgroundColor'], 70),
|
||||
}}
|
||||
// key={}
|
||||
className="sampleCard"
|
||||
index={indexval}
|
||||
onClick={() => handleClick1()}
|
||||
>
|
||||
<div
|
||||
style={{ flexDirection: Reverse1 }}
|
||||
className="CategoryHorizontal-sub-samplecard"
|
||||
>
|
||||
{categoryFunction?.Image && <img src={catLogo} alt="" />}
|
||||
<p
|
||||
style={{
|
||||
textTransform: Uppercase,
|
||||
fontWeight: '600',
|
||||
fontFamily: SelectedFontFamily ? SelectedFontFamily : '',
|
||||
color: SelectedCatgColor
|
||||
? SelectedCatgColor?.['FontColor']
|
||||
: '',
|
||||
}}
|
||||
>
|
||||
Favourites
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
)} */}
|
||||
|
||||
|
||||
{(!Isdragging || draggingComponent !== 'category') &&
|
||||
otherServiceCategoryData?.map((item, index) => (
|
||||
<div
|
||||
|
|
@ -1281,7 +1246,7 @@ function BSOtherServicesVerticalcat(props) {
|
|||
|
||||
borderColor:
|
||||
index === indexval
|
||||
? '#000000'
|
||||
? '#000000'
|
||||
: SelectedCatgColor?.['BackgroundColor'],
|
||||
}}
|
||||
className="sampleCard"
|
||||
|
|
@ -1418,91 +1383,7 @@ function BSOtherServicesVerticalcat(props) {
|
|||
</DragDropContext>
|
||||
)}
|
||||
|
||||
{/* {globalAllItemdata?.length === 0 && (
|
||||
<div
|
||||
style={{
|
||||
borderRadius: Radius,
|
||||
backgroundColor:
|
||||
!accessOther && accessToCard
|
||||
? lightenColor(SelectedCatgColor?.['BackgroundColor'], 0.4)
|
||||
: SelectedCatgColor?.['BackgroundColor'],
|
||||
padding: padding,
|
||||
border: accessToCard && '1px solid',
|
||||
borderColor:
|
||||
accessToCard &&
|
||||
!accessOther &&
|
||||
SelectedCatgColor?.['BackgroundColor'] == '#ffffff'
|
||||
? '#000000'
|
||||
: SelectedCatgColor?.['BackgroundColor'] === '#000000'
|
||||
? '#ffffff'
|
||||
: SelectedCatgColor?.['BackgroundColor'],
|
||||
}}
|
||||
// key={}
|
||||
className="sampleCard"
|
||||
index={indexval}
|
||||
onClick={() => handleClick1()}
|
||||
>
|
||||
<div
|
||||
style={{ flexDirection: Reverse1 }}
|
||||
className="CategoryHorizontal-sub-samplecard"
|
||||
>
|
||||
{categoryFunction?.Image && <img src={catLogo} alt="" />}
|
||||
<p
|
||||
style={{
|
||||
textTransform: Uppercase,
|
||||
fontWeight: '600',
|
||||
fontFamily: SelectedFontFamily ? SelectedFontFamily : '',
|
||||
color: SelectedCatgColor
|
||||
? SelectedCatgColor?.['FontColor']
|
||||
: '',
|
||||
}}
|
||||
>
|
||||
Favourites
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
)} */}
|
||||
|
||||
{/* <div
|
||||
style={{
|
||||
borderRadius: Radius,
|
||||
backgroundColor: accessOther
|
||||
? lightenColor(SelectedCatgColor?.['BackgroundColor'], 0.4)
|
||||
: SelectedCatgColor?.['BackgroundColor'],
|
||||
padding: padding,
|
||||
border: accessOther && '1px solid',
|
||||
borderColor:
|
||||
accessOther && SelectedCatgColor?.['BackgroundColor'] == '#ffffff'
|
||||
? '#000000'
|
||||
: SelectedCatgColor?.['BackgroundColor'] === '#000000'
|
||||
? '#ffffff'
|
||||
: SelectedCatgColor?.['BackgroundColor'],
|
||||
}}
|
||||
// key={}
|
||||
className="sampleCard"
|
||||
index={indexval}
|
||||
onClick={() => handleClick2()}
|
||||
>
|
||||
<div
|
||||
style={{ flexDirection: Reverse1 }}
|
||||
className="CategoryHorizontal-sub-samplecard"
|
||||
>
|
||||
{categoryFunction?.Image && <img src={horizontal} alt="" />}
|
||||
<p
|
||||
style={{
|
||||
textTransform: Uppercase,
|
||||
fontWeight: '600',
|
||||
fontFamily: SelectedFontFamily ? SelectedFontFamily : '',
|
||||
color: SelectedCatgColor
|
||||
? SelectedCatgColor?.['FontColor']
|
||||
: '',
|
||||
}}
|
||||
>
|
||||
Others
|
||||
</p>
|
||||
</div>
|
||||
</div> */}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import React, { lazy, Suspense, useEffect, useRef, useState } from 'react';
|
||||
import { useDispatch, useSelector } from 'react-redux';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { TiLocation } from 'react-icons/ti';
|
||||
|
|
@ -24,30 +24,31 @@ import BSPrinterSetting from '../UtillComponents/BSPrinterSetting.jsx';
|
|||
import { isMobile } from 'react-device-detect';
|
||||
import { FaDisplay } from 'react-icons/fa6';
|
||||
import {
|
||||
FeatureAddon,
|
||||
GlobalFeatAddOnData,
|
||||
PreferenceData,
|
||||
} from '../../../../Features/BookingScreen/BookingData/BookingData.js';
|
||||
import {
|
||||
setCustomerDisplayWindow,
|
||||
closeCustomerDisplayWindow,
|
||||
} from '../../../../Features/customerDisplayWindow/customerDisplayWindow';
|
||||
import { setCustomerDisplayWindow } from '../../../../Features/customerDisplayWindow/customerDisplayWindow';
|
||||
import TooltipWrapper from '../../../../Components/Tooltip/Tooltip';
|
||||
import {
|
||||
getUserProfile,
|
||||
userDataByUserId,
|
||||
} from '../../../../Features/UserAccount/userData.js';
|
||||
import UserRelieveManager from '../../Template/RealivingUser.jsx';
|
||||
import BSNavBarUserInfo from '../BSNavbar/BSNavBarUserInfo.jsx';
|
||||
import BSScanTemplate from '../UtillComponents/BSScanTemplate.jsx';
|
||||
import { userDataByUserId } from '../../../../Features/UserAccount/userData.js';
|
||||
import { RiFullscreenExitFill, RiFullscreenFill } from 'react-icons/ri';
|
||||
import { Popconfirm, Tooltip } from 'antd';
|
||||
import { FaCaretDown } from 'react-icons/fa';
|
||||
const UserRelieveManager = lazy(
|
||||
() => import('../../Template/RealivingUser.jsx')
|
||||
);
|
||||
|
||||
const BSNavBarUserInfo = lazy(() => import('../BSNavbar/BSNavBarUserInfo.jsx'));
|
||||
|
||||
const BSScanTemplate = lazy(
|
||||
() => import('../UtillComponents/BSScanTemplate.jsx')
|
||||
);
|
||||
|
||||
const BSPrinterSetting = lazy(
|
||||
() => import('../UtillComponents/BSPrinterSetting.jsx')
|
||||
);
|
||||
const subDirectory = import.meta.env.ENV_BASE_URL;
|
||||
const commonUrl = import.meta.env.ENV_COMMON_BASE_URL;
|
||||
const BSC1NavBar = (props) => {
|
||||
const BSComboData = props?.hasOwnProperty('data') ? props['data'] : null;
|
||||
const divRef = useRef(null);
|
||||
|
||||
const navigate = useNavigate();
|
||||
|
|
@ -109,16 +110,7 @@ const BSC1NavBar = (props) => {
|
|||
).unwrap();
|
||||
}
|
||||
};
|
||||
// const getFeatureAddonData = async () => {
|
||||
// let featureAddon = await dispatch(
|
||||
// FeatureAddon({ AppId: AppId, UserId: UserId })
|
||||
// ).unwrap();
|
||||
// if (featureAddon?.data?.statusCode === 1) {
|
||||
// setFeatureAddonData(featureAddon?.data?.data?.[0]?.FeatAddonHdr?.[0]);
|
||||
// } else {
|
||||
// setFeatureAddonData([]);
|
||||
// }
|
||||
// };
|
||||
|
||||
const UserAcc = () => {
|
||||
setAccIsOpen(!isAccOpen);
|
||||
};
|
||||
|
|
@ -197,25 +189,6 @@ const BSC1NavBar = (props) => {
|
|||
console.error('Customer display window failed to open.');
|
||||
}
|
||||
};
|
||||
// const openNewTab = async () => {
|
||||
|
||||
// const initialData = {
|
||||
// Paymentgateway: false,
|
||||
// };
|
||||
|
||||
// const customerDisplayWindow = window.open(`${subDirectory}customer-display`, 'CustomerDisplayWindow', 'width=2000,height=5000,scrollbars=yes,resizable=yes');
|
||||
// if (customerDisplayWindow && !customerDisplayWindow.closed) {
|
||||
// setCustomerDisplayWindow(customerDisplayWindow);
|
||||
|
||||
// customerDisplayWindow.onload = () => {
|
||||
// setTimeout(() => {
|
||||
// customerDisplayWindow.postMessage(initialData, '*'); // Or use targetOrigin for CORS
|
||||
// }, 500); // Slight delay to ensure window is ready
|
||||
// };
|
||||
// } else {
|
||||
// console.error("Customer display window failed to open.");
|
||||
// }
|
||||
// };
|
||||
const handleEditProfile = async () => {
|
||||
navigate(`${subDirectory}app-page/redirect-userprofile`);
|
||||
};
|
||||
|
|
@ -240,161 +213,167 @@ const BSC1NavBar = (props) => {
|
|||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<div
|
||||
className="BSC1NavBar-Container"
|
||||
style={{
|
||||
// backgroundColor:
|
||||
// BSComboData?.BookingLayout?.[0] === 'Combo1'
|
||||
// ? '#645CAA'
|
||||
// : '#08A7B8',
|
||||
background: 'linear-gradient(to bottom right, #1e2536, #2a3447)',
|
||||
}}
|
||||
>
|
||||
<div className="BSC1NavBar-div1">
|
||||
<div className="BSC1NavBar-manu">
|
||||
<Popconfirm
|
||||
title="Are you sure you want to go to home?"
|
||||
onConfirm={handleHome}
|
||||
okText="Yes"
|
||||
cancelText="No"
|
||||
>
|
||||
<PozoHomeIcon
|
||||
style={{ color: '#1292EE', fontSize: '30px' }}
|
||||
className="BSC1NavBar-manu-icon"
|
||||
/>
|
||||
</Popconfirm>{' '}
|
||||
<div
|
||||
className={`BSC1NavBar-manu-content ${menu ? 'BSC1NavBar-manu-menu' : ''}`}
|
||||
>
|
||||
<div className="BSC1NavBar-manu-div">
|
||||
<TooltipWrapper
|
||||
placement="right"
|
||||
title="DashBoard"
|
||||
isMobile={isMobile}
|
||||
>
|
||||
<BiSolidDashboard className="BSC1Nav-menu-icon" />
|
||||
</TooltipWrapper>
|
||||
|
||||
<TooltipWrapper
|
||||
placement="right"
|
||||
title="Booking / Sale"
|
||||
isMobile={isMobile}
|
||||
>
|
||||
<CgMenuGridR className="BSC1Nav-menu-icon" />
|
||||
</TooltipWrapper>
|
||||
|
||||
<TooltipWrapper
|
||||
placement="right"
|
||||
title="TableBooking"
|
||||
isMobile={isMobile}
|
||||
>
|
||||
<MdTableChart className="BSC1Nav-menu-icon" />
|
||||
</TooltipWrapper>
|
||||
|
||||
<TooltipWrapper
|
||||
placement="right"
|
||||
title="Report"
|
||||
isMobile={isMobile}
|
||||
>
|
||||
<BiSolidReport className="BSC1Nav-menu-icon" />
|
||||
</TooltipWrapper>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="BSC1NavBar-name">
|
||||
{/* <PiStorefrontFill className="BSC1NavBar-name-icon" /> */}
|
||||
<TooltipWrapper placement="bottom" title={branchName}>
|
||||
<span className="BSC1NavBar-ellipsisname">{branchName}</span>{' '}
|
||||
</TooltipWrapper>
|
||||
{BranchCity && (
|
||||
<span className="BSC1NavBar-location">
|
||||
{' '}
|
||||
<TiLocation className="BSC1NavBar-location-icon" />
|
||||
<span className="BSC1NavBar-name-ellipsis">
|
||||
{BranchCity}
|
||||
</span>{' '}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="BSC1NavBar-name">
|
||||
{ScanLayoutScreen?.SettingValue === 'Y' && (
|
||||
<span className="BSC1NavBarlocation">
|
||||
<BSScanTemplate />
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div></div>
|
||||
</div>
|
||||
<div className="BSC1NavBar-div2">
|
||||
<div className="BSC1NavBar-date">
|
||||
{/* {formattedDate} */}
|
||||
<TimeDisplay />
|
||||
|
||||
<DateDisplay />
|
||||
</div>
|
||||
|
||||
<Tooltip title={isFullscreen ? 'Exit Full Screen' : 'Full Screen'}>
|
||||
<div
|
||||
className={
|
||||
isFullscreen ? 'BsNavbar1FullScreenExit' : 'BsNavbar1FullScreen'
|
||||
}
|
||||
onClick={handleFullscreen}
|
||||
>
|
||||
{isFullscreen ? <RiFullscreenExitFill /> : <RiFullscreenFill />}
|
||||
</div>
|
||||
</Tooltip>
|
||||
|
||||
{FeatureAddonData?.FeatureDtls?.find(
|
||||
(item) =>
|
||||
item?.FeatureAddonName?.toLowerCase() === 'customer display'
|
||||
) && (
|
||||
<TooltipWrapper title="Customer Display" isMobile={isMobile}>
|
||||
<div
|
||||
onClick={openNewTab}
|
||||
style={{
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
cursor: 'pointer',
|
||||
}}
|
||||
<Suspense fallback={<div>Loading...</div>}>
|
||||
<>
|
||||
<div
|
||||
className="BSC1NavBar-Container"
|
||||
style={{
|
||||
// backgroundColor:
|
||||
// BSComboData?.BookingLayout?.[0] === 'Combo1'
|
||||
// ? '#645CAA'
|
||||
// : '#08A7B8',
|
||||
background: 'linear-gradient(to bottom right, #1e2536, #2a3447)',
|
||||
}}
|
||||
>
|
||||
<div className="BSC1NavBar-div1">
|
||||
<div className="BSC1NavBar-manu">
|
||||
<Popconfirm
|
||||
title="Are you sure you want to go to home?"
|
||||
onConfirm={handleHome}
|
||||
okText="Yes"
|
||||
cancelText="No"
|
||||
>
|
||||
<FaDisplay color="#1292ee" size={18} />
|
||||
</div>
|
||||
</TooltipWrapper>
|
||||
)}
|
||||
<PozoHomeIcon
|
||||
style={{ color: '#1292EE', fontSize: '30px' }}
|
||||
className="BSC1NavBar-manu-icon"
|
||||
/>
|
||||
</Popconfirm>{' '}
|
||||
<div
|
||||
className={`BSC1NavBar-manu-content ${menu ? 'BSC1NavBar-manu-menu' : ''}`}
|
||||
>
|
||||
<div className="BSC1NavBar-manu-div">
|
||||
<TooltipWrapper
|
||||
placement="right"
|
||||
title="DashBoard"
|
||||
isMobile={isMobile}
|
||||
>
|
||||
<BiSolidDashboard className="BSC1Nav-menu-icon" />
|
||||
</TooltipWrapper>
|
||||
|
||||
{!isMobile && (
|
||||
<div className="comboPrinterIcon">
|
||||
<BSPrinterSetting />
|
||||
<TooltipWrapper
|
||||
placement="right"
|
||||
title="Booking / Sale"
|
||||
isMobile={isMobile}
|
||||
>
|
||||
<CgMenuGridR className="BSC1Nav-menu-icon" />
|
||||
</TooltipWrapper>
|
||||
|
||||
<TooltipWrapper
|
||||
placement="right"
|
||||
title="TableBooking"
|
||||
isMobile={isMobile}
|
||||
>
|
||||
<MdTableChart className="BSC1Nav-menu-icon" />
|
||||
</TooltipWrapper>
|
||||
|
||||
<TooltipWrapper
|
||||
placement="right"
|
||||
title="Report"
|
||||
isMobile={isMobile}
|
||||
>
|
||||
<BiSolidReport className="BSC1Nav-menu-icon" />
|
||||
</TooltipWrapper>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="BSC1NavBar-person" onClick={UserAcc}>
|
||||
<TooltipWrapper title="Account " isMobile={isMobile}>
|
||||
<div className="myProfileIconDrDown">
|
||||
<BsFillPersonFill className="BSC1NavBar-person-icon" />
|
||||
<FaCaretDown />
|
||||
</div>
|
||||
</TooltipWrapper>
|
||||
<div className="BSC1NavBar-name">
|
||||
{/* <PiStorefrontFill className="BSC1NavBar-name-icon" /> */}
|
||||
<TooltipWrapper placement="bottom" title={branchName}>
|
||||
<span className="BSC1NavBar-ellipsisname">
|
||||
{branchName}
|
||||
</span>{' '}
|
||||
</TooltipWrapper>
|
||||
{BranchCity && (
|
||||
<span className="BSC1NavBar-location">
|
||||
{' '}
|
||||
<TiLocation className="BSC1NavBar-location-icon" />
|
||||
<span className="BSC1NavBar-name-ellipsis">
|
||||
{BranchCity}
|
||||
</span>{' '}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="BSC1NavBar-name">
|
||||
{ScanLayoutScreen?.SettingValue === 'Y' && (
|
||||
<span className="BSC1NavBarlocation">
|
||||
<BSScanTemplate />
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div></div>
|
||||
</div>
|
||||
<div className="BSC1NavBar-div2">
|
||||
<div className="BSC1NavBar-date">
|
||||
{/* {formattedDate} */}
|
||||
<TimeDisplay />
|
||||
|
||||
<DateDisplay />
|
||||
</div>
|
||||
|
||||
<Tooltip title={isFullscreen ? 'Exit Full Screen' : 'Full Screen'}>
|
||||
<div
|
||||
className={
|
||||
isFullscreen
|
||||
? 'BsNavbar1FullScreenExit'
|
||||
: 'BsNavbar1FullScreen'
|
||||
}
|
||||
onClick={handleFullscreen}
|
||||
>
|
||||
{isFullscreen ? <RiFullscreenExitFill /> : <RiFullscreenFill />}
|
||||
</div>
|
||||
</Tooltip>
|
||||
|
||||
{FeatureAddonData?.FeatureDtls?.find(
|
||||
(item) =>
|
||||
item?.FeatureAddonName?.toLowerCase() === 'customer display'
|
||||
) && (
|
||||
<TooltipWrapper title="Customer Display" isMobile={isMobile}>
|
||||
<div
|
||||
onClick={openNewTab}
|
||||
style={{
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
cursor: 'pointer',
|
||||
}}
|
||||
>
|
||||
<FaDisplay color="#1292ee" size={18} />
|
||||
</div>
|
||||
</TooltipWrapper>
|
||||
)}
|
||||
|
||||
{!isMobile && (
|
||||
<div className="comboPrinterIcon">
|
||||
<BSPrinterSetting />
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="BSC1NavBar-person" onClick={UserAcc}>
|
||||
<TooltipWrapper title="Account " isMobile={isMobile}>
|
||||
<div className="myProfileIconDrDown">
|
||||
<BsFillPersonFill className="BSC1NavBar-person-icon" />
|
||||
<FaCaretDown />
|
||||
</div>
|
||||
</TooltipWrapper>
|
||||
</div>
|
||||
{isAccOpen && (
|
||||
<BSNavBarUserInfo
|
||||
isOpen={isAccOpen}
|
||||
divRef={divRef}
|
||||
CompBranchData={CompBranchData}
|
||||
BacktoLogin={BacktoLogin}
|
||||
userProfileData={userProfileData}
|
||||
handleEditProfile={handleEditProfile}
|
||||
UserRelieveManager={<UserRelieveManager />}
|
||||
Logout={Logout}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
{isAccOpen && (
|
||||
<BSNavBarUserInfo
|
||||
isOpen={isAccOpen}
|
||||
divRef={divRef}
|
||||
CompBranchData={CompBranchData}
|
||||
BacktoLogin={BacktoLogin}
|
||||
userProfileData={userProfileData}
|
||||
handleEditProfile={handleEditProfile}
|
||||
UserRelieveManager={<UserRelieveManager />}
|
||||
Logout={Logout}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
</>
|
||||
</Suspense>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,4 +1,11 @@
|
|||
import { useEffect, useRef, useState, useCallback } from 'react';
|
||||
import {
|
||||
useEffect,
|
||||
useRef,
|
||||
useState,
|
||||
useCallback,
|
||||
Suspense,
|
||||
lazy,
|
||||
} from 'react';
|
||||
import { shallowEqual, useDispatch, useSelector } from 'react-redux';
|
||||
import moment from 'moment';
|
||||
import { BiBarcodeReader } from 'react-icons/bi';
|
||||
|
|
@ -54,7 +61,9 @@ import { Messages } from '../../../../Components/Notifications/Messages';
|
|||
import FormHeader from '../../../PageComponents/FormHeader';
|
||||
import { DefaultModal } from '../../../../Components/Modal/DefaultModal';
|
||||
import { Tables } from '../../../../Components/Tables/Table';
|
||||
import FeaturesFunctionalities from '../BookingFunctionality/FeaturesFunctionalities';
|
||||
const FeaturesFunctionalities = lazy(
|
||||
() => import('../BookingFunctionality/FeaturesFunctionalities')
|
||||
);
|
||||
import { isMobile } from 'react-device-detect';
|
||||
import BarcodeScanner from '../UtillComponents/BarcodeScanner.jsx';
|
||||
import {
|
||||
|
|
@ -80,11 +89,20 @@ import {
|
|||
import { Global_PromoCodeOffers } from '../../../../Features/Offer/Offer.js';
|
||||
import { validateOffers } from '../BSItemCards/ValidateOffer.jsx';
|
||||
import { useSaleswiseOfferWatcher } from '../BSItemCards/SalesWiseOffer.jsx';
|
||||
import ExpireConfirmModal from '../BookingFunctionality/ExpireConfirmModal.jsx';
|
||||
import BarCodeScan from '../../../../Services/BarCodeScan.jsx';
|
||||
const ExpireConfirmModal = lazy(
|
||||
() => import('../BookingFunctionality/ExpireConfirmModal.jsx')
|
||||
);
|
||||
|
||||
const BarcodeScanner = lazy(
|
||||
() => import('../UtillComponents/BarcodeScanner.jsx')
|
||||
);
|
||||
|
||||
const BSNavBarWeightScale = lazy(
|
||||
() => import('../UtillComponents/BSNavBarWeightScale.jsx')
|
||||
);
|
||||
|
||||
export default function BSC1Search(props) {
|
||||
const dispatch = useDispatch();
|
||||
const dispatch = useDispatch();
|
||||
const searchPromiseRef = useRef(null);
|
||||
const debounceTimerRef = useRef(null);
|
||||
const SessionData = useSelector(StoredSessionData);
|
||||
|
|
@ -4499,335 +4517,349 @@ export default function BSC1Search(props) {
|
|||
const widthBasedOnProdVariantDetails = getMaxBrandWidth();
|
||||
|
||||
return (
|
||||
<>
|
||||
<div
|
||||
className="BSC1Search-container"
|
||||
ref={containerRef}
|
||||
onFocus={handleFocus}
|
||||
>
|
||||
<Messages
|
||||
messageType={messageType}
|
||||
messageData={messageData}
|
||||
onComplete={onComplete}
|
||||
/>
|
||||
<Suspense fallback={<div>Loading...</div>}>
|
||||
<>
|
||||
<div
|
||||
className="BSC1Search-div1"
|
||||
style={{ pointerEvents: OrderType === 'Failed' ? 'none' : 'auto' }}
|
||||
onClick={() => OnfocusTrue()}
|
||||
className="BSC1Search-container"
|
||||
ref={containerRef}
|
||||
onFocus={handleFocus}
|
||||
>
|
||||
<Form ref={formRef}>
|
||||
<Form.Item name="ItemName">
|
||||
<AutoComplete
|
||||
options={
|
||||
Array.isArray(ProductList) &&
|
||||
ProductList?.map((option) => ({
|
||||
value: option.ProdName,
|
||||
label: (
|
||||
<div style={{ display: 'flex' }}>
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
justifyContent: 'space-between',
|
||||
width: '100%',
|
||||
}}
|
||||
onClick={() => {
|
||||
setOnePeiceFlow(false);
|
||||
}}
|
||||
>
|
||||
{option.ProdName}
|
||||
</div>
|
||||
<div>
|
||||
{option.ProductDetail?.filter(
|
||||
(item) => item.OnePcsAvailable == 'Y'
|
||||
).length !== 0 && (
|
||||
<GoTriangleRight
|
||||
style={{
|
||||
fontSize: '25px',
|
||||
}}
|
||||
onClick={() => {
|
||||
setOnePeiceFlow(true);
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
),
|
||||
}))
|
||||
}
|
||||
className="Search-auto-field"
|
||||
ref={inputRef}
|
||||
onChange={ProductNameOnChange}
|
||||
onSelect={ProductOnSelect}
|
||||
placeholder="Product Name (SHIFT + S)"
|
||||
allowClear={{
|
||||
clearIcon: <CloseSquareFilled />,
|
||||
}}
|
||||
autoFocus={autoCompleteVisible}
|
||||
onFocus={handleFocus}
|
||||
/>
|
||||
</Form.Item>
|
||||
</Form>
|
||||
{isMobile && screenWidth <= 768 && (
|
||||
// <BiBarcodeReader
|
||||
// className="BSC1Search-barcodeicon"
|
||||
// onClick={() => handleQrcode()}
|
||||
// // onClick={() => OnfocusTrue()}
|
||||
// />
|
||||
<BarCodeScan
|
||||
onScan={(value) => {
|
||||
ProductNameOnChange(value, true);
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
|
||||
<FiSearch
|
||||
className="BSC1Search-searchicon"
|
||||
// onClick={() => OnfocusTrue()}
|
||||
<Messages
|
||||
messageType={messageType}
|
||||
messageData={messageData}
|
||||
onComplete={onComplete}
|
||||
/>
|
||||
</div>
|
||||
{ProductSearch?.length > 5 &&
|
||||
QuickAdd &&
|
||||
GetmultipleSearchDatas.some((e) => e.toLowerCase() === 'qrcode') && (
|
||||
<div>
|
||||
<FeaturesFunctionalities
|
||||
handleQuickAddCancel={handleQuickCancel}
|
||||
QuickAdd={QuickAdd}
|
||||
ProductSearch={true}
|
||||
ProductSearchType={'C'}
|
||||
cardData={SelectedDatas}
|
||||
<div
|
||||
className="BSC1Search-div1"
|
||||
style={{ pointerEvents: OrderType === 'Failed' ? 'none' : 'auto' }}
|
||||
onClick={() => OnfocusTrue()}
|
||||
>
|
||||
<Form ref={formRef}>
|
||||
<Form.Item name="ItemName">
|
||||
<AutoComplete
|
||||
options={
|
||||
Array.isArray(ProductList) &&
|
||||
ProductList?.map((option) => ({
|
||||
value: option.ProdName,
|
||||
label: (
|
||||
<div style={{ display: 'flex' }}>
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
justifyContent: 'space-between',
|
||||
width: '100%',
|
||||
}}
|
||||
onClick={() => {
|
||||
setOnePeiceFlow(false);
|
||||
}}
|
||||
>
|
||||
{option.ProdName}
|
||||
</div>
|
||||
<div>
|
||||
{option.ProductDetail?.filter(
|
||||
(item) => item.OnePcsAvailable == 'Y'
|
||||
).length !== 0 && (
|
||||
<GoTriangleRight
|
||||
style={{
|
||||
fontSize: '25px',
|
||||
}}
|
||||
onClick={() => {
|
||||
setOnePeiceFlow(true);
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
),
|
||||
}))
|
||||
}
|
||||
className="Search-auto-field"
|
||||
ref={inputRef}
|
||||
onChange={ProductNameOnChange}
|
||||
onSelect={ProductOnSelect}
|
||||
placeholder="Product Name (SHIFT + S)"
|
||||
allowClear={{
|
||||
clearIcon: <CloseSquareFilled />,
|
||||
}}
|
||||
autoFocus={autoCompleteVisible}
|
||||
onFocus={handleFocus}
|
||||
/>
|
||||
</Form.Item>
|
||||
</Form>
|
||||
{isMobile && screenWidth <= 768 && (
|
||||
// <BiBarcodeReader
|
||||
// className="BSC1Search-barcodeicon"
|
||||
// onClick={() => handleQrcode()}
|
||||
// // onClick={() => OnfocusTrue()}
|
||||
// />
|
||||
<BarCodeScan
|
||||
onScan={(value) => {
|
||||
ProductNameOnChange(value, true);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
{BSComboData == 'Combo1' &&
|
||||
FeatureAddonData?.FeatureDtls?.find(
|
||||
(item) => item?.FeatureAddonName?.toLowerCase() === 'weight scale'
|
||||
) && <BSNavBarWeightScale Combo="combolayout" />}
|
||||
</div>
|
||||
{expireModal?.open && (
|
||||
<ExpireConfirmModal
|
||||
open={expireModal?.open}
|
||||
title={expireModal?.title}
|
||||
onOk={() => {
|
||||
expireModal.onOk?.();
|
||||
closeExpireModal();
|
||||
}}
|
||||
onCancel={() => {
|
||||
expireModal.onCancel?.();
|
||||
closeExpireModal();
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
)}
|
||||
|
||||
<DefaultModal
|
||||
title={
|
||||
<div className="EditQuantity-title">
|
||||
<FormHeader title={'Item Quantity'} />
|
||||
<FiSearch
|
||||
className="BSC1Search-searchicon"
|
||||
// onClick={() => OnfocusTrue()}
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
open={modelQty}
|
||||
width={widthBasedOnProdVariantDetails}
|
||||
footer={null}
|
||||
handleCancel={CloseModal}
|
||||
>
|
||||
<div>
|
||||
<div className="EditQuantity-heading">
|
||||
<div className="EditQuantity-headingname">
|
||||
<p className="EditQuantity-itemname">Item Name:</p>
|
||||
{ProductSearch?.length > 5 &&
|
||||
QuickAdd &&
|
||||
GetmultipleSearchDatas.some(
|
||||
(e) => e.toLowerCase() === 'qrcode'
|
||||
) && (
|
||||
<div>
|
||||
<FeaturesFunctionalities
|
||||
handleQuickAddCancel={handleQuickCancel}
|
||||
QuickAdd={QuickAdd}
|
||||
ProductSearch={true}
|
||||
ProductSearchType={'C'}
|
||||
cardData={SelectedDatas}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
{BSComboData == 'Combo1' &&
|
||||
FeatureAddonData?.FeatureDtls?.find(
|
||||
(item) => item?.FeatureAddonName?.toLowerCase() === 'weight scale'
|
||||
) && <BSNavBarWeightScale Combo="combolayout" />}
|
||||
</div>
|
||||
{expireModal?.open && (
|
||||
<ExpireConfirmModal
|
||||
open={expireModal?.open}
|
||||
title={expireModal?.title}
|
||||
onOk={() => {
|
||||
expireModal.onOk?.();
|
||||
closeExpireModal();
|
||||
}}
|
||||
onCancel={() => {
|
||||
expireModal.onCancel?.();
|
||||
closeExpireModal();
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
|
||||
<DefaultModal
|
||||
title={
|
||||
<div className="EditQuantity-title">
|
||||
<FormHeader title={'Item Quantity'} />
|
||||
</div>
|
||||
}
|
||||
open={modelQty}
|
||||
width={widthBasedOnProdVariantDetails}
|
||||
footer={null}
|
||||
handleCancel={CloseModal}
|
||||
>
|
||||
<div>
|
||||
<div className="EditQuantity-heading">
|
||||
<div className="EditQuantity-headingname">
|
||||
<p className="EditQuantity-itemname">Item Name:</p>
|
||||
</div>
|
||||
<div
|
||||
className="EditQuantity-headingproductname"
|
||||
style={{ marginLeft: '1rem' }}
|
||||
>
|
||||
<p className="EditQuantity-productname">{qtydata?.ProdName}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="EditQuantity-headingproductname"
|
||||
style={{ marginLeft: '1rem' }}
|
||||
className={
|
||||
BrandCheckresult ? 'Card-modal-table' : 'Brand-Card-modal-table'
|
||||
}
|
||||
>
|
||||
<p className="EditQuantity-productname">{qtydata?.ProdName}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className={
|
||||
BrandCheckresult ? 'Card-modal-table' : 'Brand-Card-modal-table'
|
||||
}
|
||||
>
|
||||
{Object.keys(brandMapping)?.map((brandId) => (
|
||||
<div key={brandId} className="Brand-Card">
|
||||
<div className="Brandname">
|
||||
<h4>
|
||||
{' '}
|
||||
{brandId !== 'null' && brandId !== 'undefined'
|
||||
? brandId
|
||||
: ''}
|
||||
</h4>
|
||||
</div>
|
||||
{Object.keys(brandMapping)?.map((brandId) => (
|
||||
<div key={brandId} className="Brand-Card">
|
||||
<div className="Brandname">
|
||||
<h4>
|
||||
{' '}
|
||||
{brandId !== 'null' && brandId !== 'undefined'
|
||||
? brandId
|
||||
: ''}
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div className="BrandDetail">
|
||||
{brandMapping[brandId]?.map((item, index) => (
|
||||
<div key={index}>
|
||||
<div
|
||||
className={
|
||||
returnQtyCount(item?.ProdId, item, CartOrderDetails) >
|
||||
0 || item?.StockAvailable !== 'Y'
|
||||
? 'ItemQtyCard'
|
||||
: 'ItemQtyCard-disabled'
|
||||
}
|
||||
onClick={() => VarientFun(item)}
|
||||
>
|
||||
<div className="ItemQtyImgCard">
|
||||
<img
|
||||
src={
|
||||
item?.ProdLogo &&
|
||||
item?.ProdLogo != null &&
|
||||
item?.ProdLogo != undefined
|
||||
? item?.ProdLogo
|
||||
: defaultimage
|
||||
}
|
||||
width={'80px'}
|
||||
height={'70px'}
|
||||
alt={`Product ${index}`}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="qtyDetail">
|
||||
<p className="qtyUomName">
|
||||
{item?.Size + ' ' + item?.UomName}
|
||||
</p>
|
||||
{returnQtyCount(
|
||||
item?.ProdId,
|
||||
item,
|
||||
CartOrderDetails
|
||||
) > 0 || item?.StockAvailable !== 'Y' ? (
|
||||
<p className="qtyprice">
|
||||
<sup style={{ fontFamily: 'Gilroy' }}>₹</sup>
|
||||
|
||||
{
|
||||
item?.ProdVariantDetails?.[0]?.StockDetails?.[0]
|
||||
?.SellPrice
|
||||
<div className="BrandDetail">
|
||||
{brandMapping[brandId]?.map((item, index) => (
|
||||
<div key={index}>
|
||||
<div
|
||||
className={
|
||||
returnQtyCount(
|
||||
item?.ProdId,
|
||||
item,
|
||||
CartOrderDetails
|
||||
) > 0 || item?.StockAvailable !== 'Y'
|
||||
? 'ItemQtyCard'
|
||||
: 'ItemQtyCard-disabled'
|
||||
}
|
||||
onClick={() => VarientFun(item)}
|
||||
>
|
||||
<div className="ItemQtyImgCard">
|
||||
<img
|
||||
src={
|
||||
item?.ProdLogo &&
|
||||
item?.ProdLogo != null &&
|
||||
item?.ProdLogo != undefined
|
||||
? item?.ProdLogo
|
||||
: defaultimage
|
||||
}
|
||||
width={'80px'}
|
||||
height={'70px'}
|
||||
alt={`Product ${index}`}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="qtyDetail">
|
||||
<p className="qtyUomName">
|
||||
{item?.Size + ' ' + item?.UomName}
|
||||
</p>
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
{returnQtyCount(
|
||||
item?.ProdId,
|
||||
item,
|
||||
CartOrderDetails
|
||||
) > 0 || item?.StockAvailable !== 'Y' ? (
|
||||
<p className="qtyprice">
|
||||
<sup style={{ fontFamily: 'Gilroy' }}>₹</sup>
|
||||
|
||||
{
|
||||
item?.ProdVariantDetails?.[0]
|
||||
?.StockDetails?.[0]?.SellPrice
|
||||
}
|
||||
</p>
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
))}
|
||||
</div>
|
||||
{brandId !== 'null' && brandId !== 'undefined' ? (
|
||||
<hr></hr>
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
</div>
|
||||
{brandId !== 'null' && brandId !== 'undefined' ? <hr></hr> : ''}
|
||||
</div>
|
||||
))}
|
||||
))}
|
||||
|
||||
{Object.keys(brandMapping).length === 0 && (
|
||||
<p>No product details available</p>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</DefaultModal>
|
||||
<DefaultModal
|
||||
title={
|
||||
<div className="EditQuantity-title">
|
||||
<FormHeader title={'Item Stock'} />
|
||||
</div>
|
||||
}
|
||||
open={modelstock}
|
||||
// width={500}
|
||||
footer={null}
|
||||
handleCancel={CloseModal1}
|
||||
>
|
||||
<div>
|
||||
<div
|
||||
className="EditQuantity-heading"
|
||||
style={{
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
marginBottom: '3rem',
|
||||
alignItems: 'start',
|
||||
}}
|
||||
>
|
||||
<div style={{ display: 'flex' }}>
|
||||
<div className="EditQuantity-headingname">
|
||||
<p className="EditQuantity-itemname">Item Name:</p>
|
||||
</div>
|
||||
<div
|
||||
className="EditQuantity-headingproductname"
|
||||
style={{ marginLeft: '1rem' }}
|
||||
>
|
||||
<p className="EditQuantity-productname">{qtydata?.ProdName}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div style={{ display: 'flex' }}>
|
||||
<div className="EditQuantity-headingname">
|
||||
<p className="EditQuantity-itemname">Item Quantity:</p>
|
||||
</div>
|
||||
<div
|
||||
className="EditQuantity-headingproductname"
|
||||
style={{ marginLeft: '1rem' }}
|
||||
>
|
||||
<p className="EditQuantity-productname">
|
||||
{qtydata?.ProductDetail?.[QtyIndex]?.Size}{' '}
|
||||
{onePeiceFlow
|
||||
? 'PCS'
|
||||
: qtydata?.ProductDetail?.[QtyIndex]?.UomName}
|
||||
</p>
|
||||
</div>
|
||||
{Object.keys(brandMapping).length === 0 && (
|
||||
<p>No product details available</p>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<div className="StockVariantModal">
|
||||
<Tables columns={stockcolumns} data={stockdataSource} />
|
||||
</div>
|
||||
</div>
|
||||
</DefaultModal>
|
||||
<DefaultModal
|
||||
title={
|
||||
<div className="EditQuantity-title">
|
||||
<FormHeader title={'Item Varients'} />
|
||||
</div>
|
||||
}
|
||||
open={ModalVarient}
|
||||
width={500}
|
||||
footer={null}
|
||||
handleCancel={CloseVarientModal}
|
||||
>
|
||||
<div>
|
||||
<div
|
||||
className="EditQuantity-heading"
|
||||
style={{
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
marginBottom: '3rem',
|
||||
alignItems: 'start',
|
||||
}}
|
||||
>
|
||||
<div style={{ display: 'flex' }}>
|
||||
<div className="EditQuantity-headingname">
|
||||
<p className="EditQuantity-itemname">Item Name:</p>
|
||||
</DefaultModal>
|
||||
<DefaultModal
|
||||
title={
|
||||
<div className="EditQuantity-title">
|
||||
<FormHeader title={'Item Stock'} />
|
||||
</div>
|
||||
}
|
||||
open={modelstock}
|
||||
// width={500}
|
||||
footer={null}
|
||||
handleCancel={CloseModal1}
|
||||
>
|
||||
<div>
|
||||
<div
|
||||
className="EditQuantity-heading"
|
||||
style={{
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
marginBottom: '3rem',
|
||||
alignItems: 'start',
|
||||
}}
|
||||
>
|
||||
<div style={{ display: 'flex' }}>
|
||||
<div className="EditQuantity-headingname">
|
||||
<p className="EditQuantity-itemname">Item Name:</p>
|
||||
</div>
|
||||
<div
|
||||
className="EditQuantity-headingproductname"
|
||||
style={{ marginLeft: '1rem' }}
|
||||
>
|
||||
<p className="EditQuantity-productname">
|
||||
{qtydata?.ProdName}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="EditQuantity-headingproductname"
|
||||
style={{ marginLeft: '1rem' }}
|
||||
>
|
||||
<p className="EditQuantity-productname">{qtydata?.ProdName}</p>
|
||||
<div style={{ display: 'flex' }}>
|
||||
<div className="EditQuantity-headingname">
|
||||
<p className="EditQuantity-itemname">Item Quantity:</p>
|
||||
</div>
|
||||
<div
|
||||
className="EditQuantity-headingproductname"
|
||||
style={{ marginLeft: '1rem' }}
|
||||
>
|
||||
<p className="EditQuantity-productname">
|
||||
{qtydata?.ProductDetail?.[QtyIndex]?.Size}{' '}
|
||||
{onePeiceFlow
|
||||
? 'PCS'
|
||||
: qtydata?.ProductDetail?.[QtyIndex]?.UomName}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style={{ display: 'flex' }}>
|
||||
<div className="EditQuantity-headingname">
|
||||
<p className="EditQuantity-itemname">Item Quantity:</p>
|
||||
</div>
|
||||
<div
|
||||
className="EditQuantity-headingproductname"
|
||||
style={{ marginLeft: '1rem' }}
|
||||
>
|
||||
<p className="EditQuantity-productname">
|
||||
{qtydata?.ProductDetail?.[QtyIndex]?.Size}{' '}
|
||||
{onePeiceFlow
|
||||
? 'PCS'
|
||||
: qtydata?.ProductDetail?.[QtyIndex]?.UomName}
|
||||
</p>
|
||||
</div>
|
||||
<div className="StockVariantModal">
|
||||
<Tables columns={stockcolumns} data={stockdataSource} />
|
||||
</div>
|
||||
</div>
|
||||
<div className="Card-modal-table">
|
||||
<Tables columns={varientcolumns} data={varientdataSource} />
|
||||
</DefaultModal>
|
||||
<DefaultModal
|
||||
title={
|
||||
<div className="EditQuantity-title">
|
||||
<FormHeader title={'Item Varients'} />
|
||||
</div>
|
||||
}
|
||||
open={ModalVarient}
|
||||
width={500}
|
||||
footer={null}
|
||||
handleCancel={CloseVarientModal}
|
||||
>
|
||||
<div>
|
||||
<div
|
||||
className="EditQuantity-heading"
|
||||
style={{
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
marginBottom: '3rem',
|
||||
alignItems: 'start',
|
||||
}}
|
||||
>
|
||||
<div style={{ display: 'flex' }}>
|
||||
<div className="EditQuantity-headingname">
|
||||
<p className="EditQuantity-itemname">Item Name:</p>
|
||||
</div>
|
||||
<div
|
||||
className="EditQuantity-headingproductname"
|
||||
style={{ marginLeft: '1rem' }}
|
||||
>
|
||||
<p className="EditQuantity-productname">
|
||||
{qtydata?.ProdName}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div style={{ display: 'flex' }}>
|
||||
<div className="EditQuantity-headingname">
|
||||
<p className="EditQuantity-itemname">Item Quantity:</p>
|
||||
</div>
|
||||
<div
|
||||
className="EditQuantity-headingproductname"
|
||||
style={{ marginLeft: '1rem' }}
|
||||
>
|
||||
<p className="EditQuantity-productname">
|
||||
{qtydata?.ProductDetail?.[QtyIndex]?.Size}{' '}
|
||||
{onePeiceFlow
|
||||
? 'PCS'
|
||||
: qtydata?.ProductDetail?.[QtyIndex]?.UomName}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="Card-modal-table">
|
||||
<Tables columns={varientcolumns} data={varientdataSource} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</DefaultModal>
|
||||
{/* {isMobile && screenWidth <= 768 && (
|
||||
</DefaultModal>
|
||||
{/* {isMobile && screenWidth <= 768 && (
|
||||
<DefaultModal
|
||||
title="Barcode Reader"
|
||||
width={800}
|
||||
|
|
@ -4846,6 +4878,7 @@ export default function BSC1Search(props) {
|
|||
)}
|
||||
</DefaultModal>
|
||||
)} */}
|
||||
</>
|
||||
</>
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6098,7 +6098,7 @@ const BSItemCard = (props) => {
|
|||
style={{
|
||||
position: 'relative',
|
||||
overflow: 'hidden',
|
||||
scrollbarWidth:"none"
|
||||
scrollbarWidth: 'none',
|
||||
}}
|
||||
className={
|
||||
(item?.OverAllQty !== undefined &&
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -223,9 +223,9 @@ export const useRemoveFromCart = () => {
|
|||
AppId: AppId,
|
||||
...(AvailableDate && selectedDate
|
||||
? {
|
||||
fromDate: selectedDate?.[0],
|
||||
toDate: selectedDate?.[1],
|
||||
}
|
||||
fromDate: selectedDate?.[0],
|
||||
toDate: selectedDate?.[1],
|
||||
}
|
||||
: {}),
|
||||
};
|
||||
await dispatch(getSelectedFavItems(data)).unwrap();
|
||||
|
|
@ -237,9 +237,9 @@ export const useRemoveFromCart = () => {
|
|||
ProdSubCat: useSelector((state) => state.BookingData.ProductSubCategorie),
|
||||
...(AvailableDate && selectedDate
|
||||
? {
|
||||
fromDate: selectedDate?.[0],
|
||||
toDate: selectedDate?.[1],
|
||||
}
|
||||
fromDate: selectedDate?.[0],
|
||||
toDate: selectedDate?.[1],
|
||||
}
|
||||
: {}),
|
||||
};
|
||||
|
||||
|
|
@ -250,9 +250,9 @@ export const useRemoveFromCart = () => {
|
|||
prodCat: useSelector((state) => state.BookingData.ProductCategorie),
|
||||
...(AvailableDate && selectedDate
|
||||
? {
|
||||
fromDate: selectedDate?.[0],
|
||||
toDate: selectedDate?.[1],
|
||||
}
|
||||
fromDate: selectedDate?.[0],
|
||||
toDate: selectedDate?.[1],
|
||||
}
|
||||
: {}),
|
||||
};
|
||||
|
||||
|
|
@ -345,26 +345,26 @@ export const useRemoveFromCart = () => {
|
|||
console.log('isItemInCart', isItemInCart);
|
||||
if (isItemInCart?.OrderQty > 1) {
|
||||
const UpdatedCartItem =
|
||||
// if the item is already in the cart, increase the quantity of the item
|
||||
{
|
||||
...isItemInCart,
|
||||
OrderQty: isItemInCart?.OrderQty - 1,
|
||||
TotalAmt: (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate,
|
||||
TaxAmt: (
|
||||
((isItemInCart?.OrderQty - 1) *
|
||||
isItemInCart?.OrderRate *
|
||||
isItemInCart?.TaxPercentage) /
|
||||
(100 + isItemInCart?.TaxPercentage)
|
||||
).toFixed(2),
|
||||
WithoutTaxRate:
|
||||
(isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate -
|
||||
(
|
||||
// if the item is already in the cart, increase the quantity of the item
|
||||
{
|
||||
...isItemInCart,
|
||||
OrderQty: isItemInCart?.OrderQty - 1,
|
||||
TotalAmt: (isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate,
|
||||
TaxAmt: (
|
||||
((isItemInCart?.OrderQty - 1) *
|
||||
isItemInCart?.OrderRate *
|
||||
isItemInCart?.TaxPercentage) /
|
||||
(100 + isItemInCart?.TaxPercentage)
|
||||
).toFixed(2),
|
||||
};
|
||||
WithoutTaxRate:
|
||||
(isItemInCart?.OrderQty - 1) * isItemInCart?.OrderRate -
|
||||
(
|
||||
((isItemInCart?.OrderQty - 1) *
|
||||
isItemInCart?.OrderRate *
|
||||
isItemInCart?.TaxPercentage) /
|
||||
(100 + isItemInCart?.TaxPercentage)
|
||||
).toFixed(2),
|
||||
};
|
||||
const UpdatedcardData = [UpdatedCartItem, ...UpdatedData];
|
||||
|
||||
if (OfferCheckedInSetup && preferenceOffer) {
|
||||
|
|
|
|||
|
|
@ -1,15 +1,16 @@
|
|||
import React from 'react';
|
||||
import React, { lazy, Suspense } from 'react';
|
||||
import { MdEdit } from 'react-icons/md';
|
||||
import { FaUserLarge } from 'react-icons/fa6';
|
||||
import { BiSolidPhoneCall } from 'react-icons/bi';
|
||||
import { PiSignOutLight } from 'react-icons/pi';
|
||||
import user from '../../../../Images/dashboard/user.jpg';
|
||||
import { clearSession, getSession } from '../../../../Services/Others';
|
||||
import UserRelieveManager from '../../Template/RealivingUser';
|
||||
import { GlobalCompBranchData } from '../../../../Features/BrachLogin/BranchLogin';
|
||||
import { userDataByUserId } from '../../../../Features/UserAccount/userData';
|
||||
import { useSelector } from 'react-redux';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
const UserRelieveManager = lazy(() => import('../../Template/RealivingUser'));
|
||||
// Scss
|
||||
import "../../../../Styles/BookingScreen/Components/BSNavbar/BSNavbar1.scss"
|
||||
const subDirectory = import.meta.env.ENV_BASE_URL;
|
||||
|
||||
|
|
@ -37,65 +38,67 @@ const BSNavBarUserInfo = ({
|
|||
navigate(`${subDirectory}app-page/branch-login`);
|
||||
};
|
||||
return (
|
||||
<div ref={divRef} className="BSNavBar1-Accmenu">
|
||||
<div className="BSNavBar1-Acc-menu">
|
||||
{CompBranchData?.length > 1 && (
|
||||
<div onClick={BacktoLogin}>
|
||||
<p className="BSNavBar1-Acc-menu-list">Back to Signin</p>
|
||||
</div>
|
||||
)}
|
||||
<div className="salesUserProfile" style={{ position: 'relative' }}>
|
||||
<div
|
||||
style={{
|
||||
position: 'absolute',
|
||||
top: '5px',
|
||||
right: '5px',
|
||||
cursor: 'pointer',
|
||||
display: 'flex',
|
||||
justifyContent: 'flex-end',
|
||||
gap: '1rem',
|
||||
}}
|
||||
>
|
||||
{/* {UserType != 'Employee' && */}
|
||||
<MdEdit size={16} onClick={handleEditProfile} />
|
||||
{/* } */}
|
||||
<UserRelieveManager />
|
||||
</div>
|
||||
<img
|
||||
src={
|
||||
userProfileData?.UserImage && userProfileData.UserImage !== ''
|
||||
? userProfileData.UserImage
|
||||
: user
|
||||
}
|
||||
alt={userProfileData?.UserName || 'User'}
|
||||
onError={(e) => {
|
||||
e.target.onerror = null;
|
||||
e.target.src = user;
|
||||
}}
|
||||
/>
|
||||
<div>
|
||||
<FaUserLarge size={14} /> {userProfileData?.UserName || 'Name'}
|
||||
<p
|
||||
<Suspense fallback={<div>Loading…</div>}>
|
||||
<div ref={divRef} className="BSNavBar1-Accmenu">
|
||||
<div className="BSNavBar1-Acc-menu">
|
||||
{CompBranchData?.length > 1 && (
|
||||
<div onClick={BacktoLogin}>
|
||||
<p className="BSNavBar1-Acc-menu-list">Back to Signin</p>
|
||||
</div>
|
||||
)}
|
||||
<div className="salesUserProfile" style={{ position: 'relative' }}>
|
||||
<div
|
||||
style={{
|
||||
fontSize: '12px',
|
||||
textTransform: 'uppercase',
|
||||
color: '#0b53b3',
|
||||
fontWeight: '500',
|
||||
position: 'absolute',
|
||||
top: '5px',
|
||||
right: '5px',
|
||||
cursor: 'pointer',
|
||||
display: 'flex',
|
||||
justifyContent: 'flex-end',
|
||||
gap: '1rem',
|
||||
}}
|
||||
>
|
||||
({UserType})
|
||||
{/* {UserType != 'Employee' && */}
|
||||
<MdEdit size={16} onClick={handleEditProfile} />
|
||||
{/* } */}
|
||||
<UserRelieveManager />
|
||||
</div>
|
||||
<img
|
||||
src={
|
||||
userProfileData?.UserImage && userProfileData.UserImage !== ''
|
||||
? userProfileData.UserImage
|
||||
: user
|
||||
}
|
||||
alt={userProfileData?.UserName || 'User'}
|
||||
onError={(e) => {
|
||||
e.target.onerror = null;
|
||||
e.target.src = user;
|
||||
}}
|
||||
/>
|
||||
<div>
|
||||
<FaUserLarge size={14} /> {userProfileData?.UserName || 'Name'}
|
||||
<p
|
||||
style={{
|
||||
fontSize: '12px',
|
||||
textTransform: 'uppercase',
|
||||
color: '#0b53b3',
|
||||
fontWeight: '500',
|
||||
}}
|
||||
>
|
||||
({UserType})
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<BiSolidPhoneCall size={16} />{' '}
|
||||
{userProfileData?.MobileNo || 'Number'}
|
||||
</div>
|
||||
<p className="BSNavBar1-Acc-menu-list" onClick={Logout}>
|
||||
Sign Out <PiSignOutLight size={16} strokeWidth={10} />
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<BiSolidPhoneCall size={16} />{' '}
|
||||
{userProfileData?.MobileNo || 'Number'}
|
||||
</div>
|
||||
<p className="BSNavBar1-Acc-menu-list" onClick={Logout}>
|
||||
Sign Out <PiSignOutLight size={16} strokeWidth={10} />
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Suspense>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -1,4 +1,11 @@
|
|||
import { useEffect, useRef, useState, useCallback } from 'react';
|
||||
import {
|
||||
useEffect,
|
||||
useRef,
|
||||
useState,
|
||||
useCallback,
|
||||
Suspense,
|
||||
lazy,
|
||||
} from 'react';
|
||||
import { shallowEqual, useDispatch, useSelector } from 'react-redux';
|
||||
import {
|
||||
getConfigType,
|
||||
|
|
@ -43,13 +50,17 @@ import {
|
|||
validateSafeInput,
|
||||
} from '../../../../Services/Others.js';
|
||||
import WpIcon from '../../../../Images/message.png';
|
||||
import QrinScreen from '../BookingFunctionality/DynamicScreenQr.jsx';
|
||||
const QrinScreen = lazy(
|
||||
() => import('../BookingFunctionality/DynamicScreenQr.jsx')
|
||||
);
|
||||
import {
|
||||
getTemplateData,
|
||||
SelectedPrintTemplate,
|
||||
} from '../../../../Features/ThemeChange/ThemeChange.js';
|
||||
import '../../../../Styles/BookingScreen/Components/BookingFunctionality/SplitPayment.scss';
|
||||
import FeaturesFunctionalities from './FeaturesFunctionalities.jsx';
|
||||
const FeaturesFunctionalities = lazy(
|
||||
() => import('./FeaturesFunctionalities.jsx')
|
||||
);
|
||||
import numberToWords from 'number-to-words';
|
||||
import { getCustomerDisplayWindow } from '../../../../Features/customerDisplayWindow/customerDisplayWindow.js';
|
||||
import { getConfigTypeData } from '../../../../Features/ConfigMasterPage/ConfigMasterPage.js';
|
||||
|
|
@ -93,7 +104,7 @@ const CreditCustSplitPayment = (props) => {
|
|||
const [UpiPayOption, setUpiPayOption] = useState([]);
|
||||
const [CardPayOption, setCardPayOption] = useState([]);
|
||||
const GlobaluseOptions = useSelector(GlobalCommonPaymentOptions);
|
||||
const RetailWSSalesType= useSelector(GlobalRetailWSSalesType, shallowEqual);
|
||||
const RetailWSSalesType = useSelector(GlobalRetailWSSalesType, shallowEqual);
|
||||
const [useOptions, setuseOptions] = useState([]);
|
||||
const BookingType = useSelector(GlobalBookingType);
|
||||
const BookingTypeBoth = useSelector(GlobalBookingTypeBoth);
|
||||
|
|
@ -730,7 +741,7 @@ const CreditCustSplitPayment = (props) => {
|
|||
(item) => item?.ConfigName?.toLowerCase() == 'DEP'.toLowerCase()
|
||||
);
|
||||
let postData = {
|
||||
SalesMode:RetailWSSalesType || 'R',
|
||||
SalesMode: RetailWSSalesType || 'R',
|
||||
CompId: CompId,
|
||||
BranchId: BranchId,
|
||||
Type: obId?.[0]?.ConfigId,
|
||||
|
|
@ -1241,139 +1252,141 @@ const CreditCustSplitPayment = (props) => {
|
|||
: 'Debit amount not available';
|
||||
|
||||
return (
|
||||
<>
|
||||
<Messages messageType={messageType} messageData={messageData} />
|
||||
<div className="splitmodal">
|
||||
<DefaultModal
|
||||
open={Splitpayment}
|
||||
title="Split Payment"
|
||||
handleCancel={() => {
|
||||
SplitSelPayMode[`PaymentStatus-0`] !== 'S' && HandleModalClose();
|
||||
}}
|
||||
footer={false}
|
||||
width={1000}
|
||||
children={
|
||||
<div>
|
||||
<p>Total Amount:{TotalAmount}</p>
|
||||
<Suspense fallback={<div>Loading features...</div>}>
|
||||
<>
|
||||
<Messages messageType={messageType} messageData={messageData} />
|
||||
<div className="splitmodal">
|
||||
<DefaultModal
|
||||
open={Splitpayment}
|
||||
title="Split Payment"
|
||||
handleCancel={() => {
|
||||
SplitSelPayMode[`PaymentStatus-0`] !== 'S' && HandleModalClose();
|
||||
}}
|
||||
footer={false}
|
||||
width={1000}
|
||||
children={
|
||||
<div>
|
||||
<p>Total Amount:{TotalAmount}</p>
|
||||
|
||||
<>{calculateField()}</>
|
||||
{TotalAmount > TotalSplitAmount &&
|
||||
SplitSelPayMode[`PaymentStatus-${count}`] === 'S' && (
|
||||
<Form.Item>
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
justifyContent: 'flex-end',
|
||||
}}
|
||||
>
|
||||
<PlusOutlined
|
||||
<>{calculateField()}</>
|
||||
{TotalAmount > TotalSplitAmount &&
|
||||
SplitSelPayMode[`PaymentStatus-${count}`] === 'S' && (
|
||||
<Form.Item>
|
||||
<div
|
||||
style={{
|
||||
backgroundColor: '#37943C',
|
||||
color: 'white',
|
||||
borderRadius: '50px',
|
||||
padding: '5px',
|
||||
display: 'flex',
|
||||
justifyContent: 'flex-end',
|
||||
}}
|
||||
onClick={() => setCount(count + 1)}
|
||||
/>
|
||||
</div>
|
||||
</Form.Item>
|
||||
)}
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
{TotalAmount == 0 && Success && (
|
||||
<div>
|
||||
<QrComponent com={`WelcomeScreen**${branchName}`} />
|
||||
>
|
||||
<PlusOutlined
|
||||
style={{
|
||||
backgroundColor: '#37943C',
|
||||
color: 'white',
|
||||
borderRadius: '50px',
|
||||
padding: '5px',
|
||||
}}
|
||||
onClick={() => setCount(count + 1)}
|
||||
/>
|
||||
</div>
|
||||
</Form.Item>
|
||||
)}
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
{TotalAmount > 0 &&
|
||||
qrCode &&
|
||||
PaymentUpiOptions?.length > 0 &&
|
||||
SelUpiId && (
|
||||
{TotalAmount == 0 && Success && (
|
||||
<div>
|
||||
<QrComponent
|
||||
com={`DisplayQRCodeScreen**upi://pay?pa=${SelUpiId}&pn=Bonrix&cu=INR&am=${TotalAmount}&pn=Bonrix%20Software%20Systems**${TotalAmount}**${SelUpiId}`}
|
||||
/>
|
||||
<QrComponent com={`WelcomeScreen**${branchName}`} />
|
||||
</div>
|
||||
)}
|
||||
{UpiOpen && (
|
||||
<DefaultModal
|
||||
open={UpiOpen}
|
||||
title="UPI PAYMENT"
|
||||
width={500}
|
||||
handleCancel={() => {
|
||||
Upimodel('Cancel');
|
||||
}}
|
||||
footer={false}
|
||||
children={
|
||||
<div style={{ overflow: 'scroll' }}>
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
justifyContent: 'space-evenly',
|
||||
alignItems: 'center',
|
||||
}}
|
||||
>
|
||||
<div>
|
||||
<QrinScreen Amount={CurrentPayAmount} UpiId={SelUpiId} />
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h1> RS :{CurrentPayAmount} </h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="sentok">
|
||||
{(selOption || SelCustId) && (
|
||||
<div className="sentLink" onClick={onFinalSubmit}>
|
||||
Sent Payment Link
|
||||
<img
|
||||
src={WpIcon}
|
||||
alt="Your Alt Text"
|
||||
style={{ width: '30px', height: '30px' }}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{TotalAmount > 0 &&
|
||||
qrCode &&
|
||||
PaymentUpiOptions?.length > 0 &&
|
||||
SelUpiId && (
|
||||
<div>
|
||||
<QrComponent
|
||||
com={`DisplayQRCodeScreen**upi://pay?pa=${SelUpiId}&pn=Bonrix&cu=INR&am=${TotalAmount}&pn=Bonrix%20Software%20Systems**${TotalAmount}**${SelUpiId}`}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
{UpiOpen && (
|
||||
<DefaultModal
|
||||
open={UpiOpen}
|
||||
title="UPI PAYMENT"
|
||||
width={500}
|
||||
handleCancel={() => {
|
||||
Upimodel('Cancel');
|
||||
}}
|
||||
footer={false}
|
||||
children={
|
||||
<div style={{ overflow: 'scroll' }}>
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
flexDirection: 'row-reverse',
|
||||
width: '100px',
|
||||
flexDirection: 'column',
|
||||
justifyContent: 'space-evenly',
|
||||
alignItems: 'center',
|
||||
}}
|
||||
>
|
||||
<Buttons
|
||||
buttonText="OK"
|
||||
color="901D77"
|
||||
icon={<ArrowRightOutlined />}
|
||||
handleSubmit={() => {
|
||||
Upimodel('Submit');
|
||||
<div>
|
||||
<QrinScreen Amount={CurrentPayAmount} UpiId={SelUpiId} />
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h1> RS :{CurrentPayAmount} </h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="sentok">
|
||||
{(selOption || SelCustId) && (
|
||||
<div className="sentLink" onClick={onFinalSubmit}>
|
||||
Sent Payment Link
|
||||
<img
|
||||
src={WpIcon}
|
||||
alt="Your Alt Text"
|
||||
style={{ width: '30px', height: '30px' }}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
flexDirection: 'row-reverse',
|
||||
width: '100px',
|
||||
}}
|
||||
/>
|
||||
>
|
||||
<Buttons
|
||||
buttonText="OK"
|
||||
color="901D77"
|
||||
icon={<ArrowRightOutlined />}
|
||||
handleSubmit={() => {
|
||||
Upimodel('Submit');
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
)}
|
||||
{addcustomer && (
|
||||
<FeaturesFunctionalities
|
||||
handleAddCustomerCancel={handleAddCustomerCancel}
|
||||
addcustomer={addcustomer}
|
||||
/>
|
||||
)}
|
||||
{Object.keys(PrintDatas).length > 0 && (
|
||||
<div id="Credit-customer1" style={{ display: 'none' }}>
|
||||
<BSCreditCustomerPrint
|
||||
words={words}
|
||||
PrintDatas={PrintDatas}
|
||||
url={qrData}
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
{addcustomer && (
|
||||
<FeaturesFunctionalities
|
||||
handleAddCustomerCancel={handleAddCustomerCancel}
|
||||
addcustomer={addcustomer}
|
||||
/>
|
||||
)}
|
||||
{Object.keys(PrintDatas).length > 0 && (
|
||||
<div id="Credit-customer1" style={{ display: 'none' }}>
|
||||
<BSCreditCustomerPrint
|
||||
words={words}
|
||||
PrintDatas={PrintDatas}
|
||||
url={qrData}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
</Suspense>
|
||||
);
|
||||
};
|
||||
export default CreditCustSplitPayment;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import React, {
|
|||
useEffect,
|
||||
useCallback,
|
||||
useContext,
|
||||
lazy,
|
||||
} from 'react';
|
||||
import { useDispatch, useSelector } from 'react-redux';
|
||||
import {
|
||||
|
|
@ -16,7 +17,6 @@ import {
|
|||
Checkbox,
|
||||
AutoComplete,
|
||||
Switch,
|
||||
Tooltip,
|
||||
Popconfirm,
|
||||
Tabs,
|
||||
} from 'antd';
|
||||
|
|
@ -58,7 +58,6 @@ import {
|
|||
ChangeOverAllDiscSales,
|
||||
PreferenceData,
|
||||
ChangeComboCarddata,
|
||||
getPreferenceData,
|
||||
getCustomerForHold,
|
||||
PostBlockSlots,
|
||||
} from '../../../../Features/BookingScreen/BookingData/BookingData';
|
||||
|
|
@ -68,7 +67,6 @@ import { ArrowRightOutlined, CloseSquareFilled } from '@ant-design/icons';
|
|||
import { InputField } from '../../../../Components/Forms/InputField';
|
||||
import { Messages } from '../../../../Components/Notifications/Messages';
|
||||
import Buttons from '../../../../Components/Forms/Buttons';
|
||||
import ProductForm from '../../../../Pages/BookingScreen/Forms/QuickAdd/QuickAdd.jsx';
|
||||
import {
|
||||
GlobalAddCustomerDetails,
|
||||
getAddCustomerDetails,
|
||||
|
|
@ -86,7 +84,6 @@ import {
|
|||
ChangeTotalAmount,
|
||||
globalExtraTotalAmount,
|
||||
} from '../../../../Features/ExteraCharges/ExtraCharges.js';
|
||||
import WeightScaleComp from '../../../../Components/WeightScale/weightScale.jsx';
|
||||
import {
|
||||
gettinghold,
|
||||
puttinghold,
|
||||
|
|
@ -98,7 +95,6 @@ import {
|
|||
getProductsearch,
|
||||
} from '../../../../Features/BookingScreen/BookingData/BookingData';
|
||||
import { AiOutlineDownCircle, AiOutlineUpCircle } from 'react-icons/ai';
|
||||
import '../../../../Styles/BookingScreen/Components/BookingFunctionality/FeaturesFunctionalities.scss';
|
||||
import {
|
||||
IoCloseSharp,
|
||||
IoPersonAddSharp,
|
||||
|
|
@ -111,7 +107,6 @@ import {
|
|||
GlobalPreOrderList,
|
||||
GlobalpreOrderOpen,
|
||||
} from '../../../../Features/BookingScreen/PreOrder/PreOrder.js';
|
||||
import Imageupload from '../../../../Components/Forms/Upload.jsx';
|
||||
import { useApplyOfferto_CardDetail } from '../UtillComponents/BSNavBarOffer/BSNavBarOffer_CustomHooks.jsx';
|
||||
import { getCombolist } from '../../../../Features/ComboMaster/ComboMaster.js';
|
||||
import {
|
||||
|
|
@ -122,12 +117,24 @@ import {
|
|||
import { v4 as uuidv4 } from 'uuid';
|
||||
import { ApplicationPreferences } from '../../../../Features/BrachLogin/BranchLogin.js';
|
||||
import { useDateStore } from '../../../../Features/BookingScreen/BookingData/DateStore.js';
|
||||
import { FaEdit, FaMapMarkedAlt, FaTrash } from 'react-icons/fa';
|
||||
import { FaEdit, FaTrash } from 'react-icons/fa';
|
||||
import { MdHome, MdLocationOn } from 'react-icons/md';
|
||||
import { RadioGrpButton } from '../../../../Components/Forms/RadioGroup.jsx';
|
||||
// jsx Files
|
||||
const ProductForm = lazy(
|
||||
() => import('../../../../Pages/BookingScreen/Forms/QuickAdd/QuickAdd.jsx')
|
||||
);
|
||||
const WeightScaleComp = lazy(
|
||||
() => import('../../../../Components/WeightScale/weightScale.jsx')
|
||||
);
|
||||
const Imageupload = lazy(
|
||||
() => import('../../../../Components/Forms/Upload.jsx')
|
||||
);
|
||||
// Scss
|
||||
import '../../../../Styles/BookingScreen/Components/BookingFunctionality/FeaturesFunctionalities.scss';
|
||||
|
||||
const FeaturesFunctionalities = (props) => {
|
||||
const { closeModal = () => { } } = props;
|
||||
const { closeModal = () => {} } = props;
|
||||
const applyOffer = useApplyOfferto_CardDetail();
|
||||
const EditableContext = React.createContext(null);
|
||||
const EditableContext1 = React.createContext(null);
|
||||
|
|
@ -141,7 +148,6 @@ const FeaturesFunctionalities = (props) => {
|
|||
const formRefExtraCharges = useRef();
|
||||
const ExtraChargesType = useSelector(globalExtraChargesType);
|
||||
const GlobalExtraCharge = useSelector(globalExtraTotalAmount);
|
||||
console.log(GlobalExtraCharge, "GlobalExtraCharge")
|
||||
const ReorderHoldDetails = useSelector(GlobalReorderHoldDetails);
|
||||
const BookingType = useSelector(GlobalBookingType);
|
||||
const BookingTypeBoth = useSelector(GlobalBookingTypeBoth);
|
||||
|
|
@ -370,30 +376,30 @@ const FeaturesFunctionalities = (props) => {
|
|||
|
||||
const options = suggestions
|
||||
? suggestions
|
||||
?.filter((item) =>
|
||||
selectedSearchValue === 'CustName' ? item.CustName !== null : item
|
||||
)
|
||||
.map((item) => ({
|
||||
value: item?.CustMobile,
|
||||
label:
|
||||
selectedSearchValue === 'CustMobile'
|
||||
? `${item?.CustMobile} - ${item?.CustName ? item?.CustName : ''} ${item?.CustName ? ' - ' : ''} ${'Id:' + item?.CustId?.match(/-(\d+)$/)?.[1]}`
|
||||
: selectedSearchValue === 'CustId'
|
||||
? `${'Id:' + item?.CustId?.match(/-(\d+)$/)?.[1]}${item?.CustName ? ' - ' : ''} ${item?.CustName ? item?.CustName : ''} - ${item?.CustMobile}`
|
||||
: selectedSearchValue === 'CustName' &&
|
||||
item?.CustName !== null &&
|
||||
`${item?.CustName ? item?.CustName : ''} ${item?.CustName ? ' - ' : ''} ${item?.CustMobile} - ${'Id:' + item?.CustId?.match(/-(\d+)$/)?.[1]}`,
|
||||
CustMobile: item?.CustMobile,
|
||||
CustId: item?.CustId?.match(/-(\d+)$/)?.[1],
|
||||
CustName: item?.CustName,
|
||||
}))
|
||||
?.filter((item) =>
|
||||
selectedSearchValue === 'CustName' ? item.CustName !== null : item
|
||||
)
|
||||
.map((item) => ({
|
||||
value: item?.CustMobile,
|
||||
label:
|
||||
selectedSearchValue === 'CustMobile'
|
||||
? `${item?.CustMobile} - ${item?.CustName ? item?.CustName : ''} ${item?.CustName ? ' - ' : ''} ${'Id:' + item?.CustId?.match(/-(\d+)$/)?.[1]}`
|
||||
: selectedSearchValue === 'CustId'
|
||||
? `${'Id:' + item?.CustId?.match(/-(\d+)$/)?.[1]}${item?.CustName ? ' - ' : ''} ${item?.CustName ? item?.CustName : ''} - ${item?.CustMobile}`
|
||||
: selectedSearchValue === 'CustName' &&
|
||||
item?.CustName !== null &&
|
||||
`${item?.CustName ? item?.CustName : ''} ${item?.CustName ? ' - ' : ''} ${item?.CustMobile} - ${'Id:' + item?.CustId?.match(/-(\d+)$/)?.[1]}`,
|
||||
CustMobile: item?.CustMobile,
|
||||
CustId: item?.CustId?.match(/-(\d+)$/)?.[1],
|
||||
CustName: item?.CustName,
|
||||
}))
|
||||
: GlobalAddCustomerDetails1?.map((item) => ({
|
||||
value: item.CustMobile,
|
||||
label: `${item?.CustName} ${item?.CustMobile}`,
|
||||
CustMobile: item?.CustMobile,
|
||||
CustId: item?.CustId,
|
||||
CustName: item?.CustName,
|
||||
}));
|
||||
value: item.CustMobile,
|
||||
label: `${item?.CustName} ${item?.CustMobile}`,
|
||||
CustMobile: item?.CustMobile,
|
||||
CustId: item?.CustId,
|
||||
CustName: item?.CustName,
|
||||
}));
|
||||
const handleYesOrNoChange = (value) => {
|
||||
setSelectedValue(value);
|
||||
formRef.current?.setFieldsValue({ OfferActiveStatus: value });
|
||||
|
|
@ -456,34 +462,34 @@ const FeaturesFunctionalities = (props) => {
|
|||
},
|
||||
...(sportsAppPreference
|
||||
? [
|
||||
{
|
||||
title: 'Subcategory',
|
||||
key: 'productDetails',
|
||||
dataIndex: 'productDetails',
|
||||
align: 'center',
|
||||
width: '150px',
|
||||
onCell: (record) => {
|
||||
const productDetails = record?.productDetails;
|
||||
const Combodtl =
|
||||
record?.productDetails?.[0]?.comboDtl?.[0]
|
||||
?.ComboInwardDetails?.[0]?.ComboDetails;
|
||||
{
|
||||
title: 'Subcategory',
|
||||
key: 'productDetails',
|
||||
dataIndex: 'productDetails',
|
||||
align: 'center',
|
||||
width: '150px',
|
||||
onCell: (record) => {
|
||||
const productDetails = record?.productDetails;
|
||||
const Combodtl =
|
||||
record?.productDetails?.[0]?.comboDtl?.[0]
|
||||
?.ComboInwardDetails?.[0]?.ComboDetails;
|
||||
|
||||
return {
|
||||
onClick: () => {
|
||||
HoldPutfun(productDetails, record, Combodtl);
|
||||
},
|
||||
};
|
||||
return {
|
||||
onClick: () => {
|
||||
HoldPutfun(productDetails, record, Combodtl);
|
||||
},
|
||||
};
|
||||
},
|
||||
render: (productDetails, record) => (
|
||||
<a
|
||||
style={{ color: 'black' }}
|
||||
onClick={() => HoldPutfun(productDetails, record)}
|
||||
>
|
||||
{record?.productDetails?.[0]?.ProdSubCatName}
|
||||
</a>
|
||||
),
|
||||
},
|
||||
render: (productDetails, record) => (
|
||||
<a
|
||||
style={{ color: 'black' }}
|
||||
onClick={() => HoldPutfun(productDetails, record)}
|
||||
>
|
||||
{record?.productDetails?.[0]?.ProdSubCatName}
|
||||
</a>
|
||||
),
|
||||
},
|
||||
]
|
||||
]
|
||||
: []),
|
||||
{
|
||||
title: 'Orders',
|
||||
|
|
@ -581,13 +587,7 @@ const FeaturesFunctionalities = (props) => {
|
|||
];
|
||||
useEffect(() => {
|
||||
setWeightScale(props.WeightScale);
|
||||
}, [props.WeightScale]);
|
||||
// useEffect(() => {
|
||||
// if (!props.addcustomer) {
|
||||
// formRef.current?.resetFields();
|
||||
// setZipCodeData(false);
|
||||
// }
|
||||
// }, [props.addcustomer]);
|
||||
}, [props.WeightScale]);
|
||||
const ExtTabledata = async () => {
|
||||
const data = {
|
||||
CompId: CompId,
|
||||
|
|
@ -761,7 +761,7 @@ const FeaturesFunctionalities = (props) => {
|
|||
TaxAmt: formatAmount(
|
||||
((record.Price * record.TaxPercentage) /
|
||||
(100 + record.TaxPercentage)) *
|
||||
record.QTY
|
||||
record.QTY
|
||||
),
|
||||
TaxId: record.TaxId,
|
||||
TaxPercentage: record.TaxPercentage,
|
||||
|
|
@ -788,11 +788,11 @@ const FeaturesFunctionalities = (props) => {
|
|||
const isDuplicate = TableName?.some(
|
||||
(item) =>
|
||||
item.InwardDtlId +
|
||||
' ' +
|
||||
item.BookingTypeName +
|
||||
' ' +
|
||||
item.SinglePc ===
|
||||
selectedProduct && item.UniqueId === record.UniqueId
|
||||
' ' +
|
||||
item.BookingTypeName +
|
||||
' ' +
|
||||
item.SinglePc ===
|
||||
selectedProduct && item.UniqueId === record.UniqueId
|
||||
);
|
||||
|
||||
if (!isDuplicate) {
|
||||
|
|
@ -810,7 +810,7 @@ const FeaturesFunctionalities = (props) => {
|
|||
TaxAmt: formatAmount(
|
||||
((record.Price * record.TaxPercentage) /
|
||||
(100 + record.TaxPercentage)) *
|
||||
record.QTY
|
||||
record.QTY
|
||||
),
|
||||
TaxId: record?.TaxId,
|
||||
TaxPercentage: record.TaxPercentage,
|
||||
|
|
@ -1057,7 +1057,7 @@ const FeaturesFunctionalities = (props) => {
|
|||
...record,
|
||||
...values,
|
||||
});
|
||||
} catch (errInfo) { }
|
||||
} catch (errInfo) {}
|
||||
};
|
||||
|
||||
let childNode = children;
|
||||
|
|
@ -1109,7 +1109,7 @@ const FeaturesFunctionalities = (props) => {
|
|||
return (
|
||||
record.Price * record.QTY -
|
||||
((record.Price * record.TaxPercentage) / (100 + record.TaxPercentage)) *
|
||||
record.QTY
|
||||
record.QTY
|
||||
);
|
||||
};
|
||||
const WithTaxAmountTaxAmount = (record) => {
|
||||
|
|
@ -1182,10 +1182,10 @@ const FeaturesFunctionalities = (props) => {
|
|||
onClick={() => addeddata(record)}
|
||||
disabled={
|
||||
Object.keys(ReorderHoldDetails).length !== 0 &&
|
||||
BookingType === 'Dine In' &&
|
||||
GlobalExtraCharge.some(
|
||||
(item) => item.ExtraChargeId === record.UniqueId
|
||||
)
|
||||
BookingType === 'Dine In' &&
|
||||
GlobalExtraCharge.some(
|
||||
(item) => item.ExtraChargeId === record.UniqueId
|
||||
)
|
||||
? true
|
||||
: false
|
||||
}
|
||||
|
|
@ -1194,11 +1194,6 @@ const FeaturesFunctionalities = (props) => {
|
|||
),
|
||||
},
|
||||
];
|
||||
|
||||
console.log(ReorderHoldDetails,
|
||||
BookingType,
|
||||
GlobalExtraCharge, "GlobalExtraCharge");
|
||||
|
||||
const defaultColumns1 = [
|
||||
{
|
||||
title: 'ExtraCharge Type',
|
||||
|
|
@ -1286,7 +1281,7 @@ const FeaturesFunctionalities = (props) => {
|
|||
QTY: parseInt(row.QTY),
|
||||
TaxAmt: formatAmount(
|
||||
((row.Price * row.TaxPercentage) / (100 + row.TaxPercentage)) *
|
||||
row.QTY
|
||||
row.QTY
|
||||
),
|
||||
TotalAmt: row.Price * row.QTY,
|
||||
// ((row.Price * row.TaxPercentage) / (100 + row.TaxPercentage) *row.QTY ).toFixed(2),
|
||||
|
|
@ -1435,12 +1430,12 @@ const FeaturesFunctionalities = (props) => {
|
|||
<Space size="middle">
|
||||
<a>
|
||||
{Object.keys(ReorderHoldDetails).length !== 0 &&
|
||||
BookingType === 'Dine In' &&
|
||||
GlobalExtraCharge?.some(
|
||||
(item) =>
|
||||
item.ExtraChargeId === record.UniqueId &&
|
||||
item.InwardDtlId === record.InwardDtlId
|
||||
) ? (
|
||||
BookingType === 'Dine In' &&
|
||||
GlobalExtraCharge?.some(
|
||||
(item) =>
|
||||
item.ExtraChargeId === record.UniqueId &&
|
||||
item.InwardDtlId === record.InwardDtlId
|
||||
) ? (
|
||||
<DeleteFilled
|
||||
style={{
|
||||
color: '#FF4D4F',
|
||||
|
|
@ -1710,7 +1705,7 @@ const FeaturesFunctionalities = (props) => {
|
|||
dispatch(
|
||||
changeCustomerID(
|
||||
response?.data?.CustomerDetails?.[
|
||||
response?.data?.CustomerDetails.length - 1
|
||||
response?.data?.CustomerDetails.length - 1
|
||||
]
|
||||
)
|
||||
);
|
||||
|
|
@ -2194,9 +2189,9 @@ const FeaturesFunctionalities = (props) => {
|
|||
AppId: AppId,
|
||||
...(AvailableDate && selectedDate
|
||||
? {
|
||||
fromDate: selectedDate?.[0],
|
||||
toDate: selectedDate?.[1],
|
||||
}
|
||||
fromDate: selectedDate?.[0],
|
||||
toDate: selectedDate?.[1],
|
||||
}
|
||||
: {}),
|
||||
};
|
||||
await dispatch(getSelectedFavItems(data)).unwrap();
|
||||
|
|
@ -2208,9 +2203,9 @@ const FeaturesFunctionalities = (props) => {
|
|||
ProdSubCat: ProdSubCat,
|
||||
...(AvailableDate && selectedDate
|
||||
? {
|
||||
fromDate: selectedDate?.[0],
|
||||
toDate: selectedDate?.[1],
|
||||
}
|
||||
fromDate: selectedDate?.[0],
|
||||
toDate: selectedDate?.[1],
|
||||
}
|
||||
: {}),
|
||||
};
|
||||
|
||||
|
|
@ -2221,9 +2216,9 @@ const FeaturesFunctionalities = (props) => {
|
|||
prodCat: prodCat,
|
||||
...(AvailableDate && selectedDate
|
||||
? {
|
||||
fromDate: selectedDate?.[0],
|
||||
toDate: selectedDate?.[1],
|
||||
}
|
||||
fromDate: selectedDate?.[0],
|
||||
toDate: selectedDate?.[1],
|
||||
}
|
||||
: {}),
|
||||
};
|
||||
|
||||
|
|
@ -2596,7 +2591,7 @@ const FeaturesFunctionalities = (props) => {
|
|||
e?.stopPropagation();
|
||||
removeAll();
|
||||
}}
|
||||
// onClick={() => statusFormatter(record,index)}
|
||||
// onClick={() => statusFormatter(record,index)}
|
||||
>
|
||||
Clear All
|
||||
</Button>
|
||||
|
|
@ -2723,7 +2718,7 @@ const FeaturesFunctionalities = (props) => {
|
|||
: selectedSearchValue == 'CustName'
|
||||
? 'Please Enter Valid Name'
|
||||
: selectedSearchValue == 'CustId' &&
|
||||
'Please EnterCustomer Id',
|
||||
'Please EnterCustomer Id',
|
||||
},
|
||||
]}
|
||||
>
|
||||
|
|
@ -2812,7 +2807,7 @@ const FeaturesFunctionalities = (props) => {
|
|||
: selectedSearchValue == 'CustName'
|
||||
? 'Enter Name'
|
||||
: selectedSearchValue == 'CustId' &&
|
||||
'Enter Customer Id'
|
||||
'Enter Customer Id'
|
||||
: ' Mobile Number'}
|
||||
</label>
|
||||
}
|
||||
|
|
@ -2994,7 +2989,7 @@ const FeaturesFunctionalities = (props) => {
|
|||
autocomplete="off"
|
||||
isOnChange={
|
||||
formRef.current?.getFieldsValue()?.CustName ||
|
||||
inputValue
|
||||
inputValue
|
||||
? true
|
||||
: false
|
||||
}
|
||||
|
|
@ -3060,9 +3055,9 @@ const FeaturesFunctionalities = (props) => {
|
|||
<p>Upload Profile</p>
|
||||
<Form.Item
|
||||
name="CustomerProfile"
|
||||
// getValueFromEvent={(e) =>
|
||||
// formType === 'edit' ? editstate?.EmpPhotoLink : e
|
||||
// }
|
||||
// getValueFromEvent={(e) =>
|
||||
// formType === 'edit' ? editstate?.EmpPhotoLink : e
|
||||
// }
|
||||
>
|
||||
<Imageupload
|
||||
singleImage={true}
|
||||
|
|
@ -3316,7 +3311,9 @@ const FeaturesFunctionalities = (props) => {
|
|||
<Popconfirm
|
||||
title="Remove Address"
|
||||
description="Are you sure you want to remove this address?"
|
||||
onConfirm={() => handleRemoveAddress(idx)}
|
||||
onConfirm={() =>
|
||||
handleRemoveAddress(idx)
|
||||
}
|
||||
okText="Yes, Remove"
|
||||
cancelText="Cancel"
|
||||
okType="danger"
|
||||
|
|
@ -3492,7 +3489,7 @@ const FeaturesFunctionalities = (props) => {
|
|||
|
||||
<Form.Item
|
||||
name="State"
|
||||
// rules={[{ required: true }]}
|
||||
// rules={[{ required: true }]}
|
||||
>
|
||||
<InputField
|
||||
field="State"
|
||||
|
|
@ -3535,13 +3532,13 @@ const FeaturesFunctionalities = (props) => {
|
|||
style={
|
||||
offerType == 'P'
|
||||
? {
|
||||
opacity: '1',
|
||||
boxShadow:
|
||||
'rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px',
|
||||
margin: '3px',
|
||||
padding: '5px',
|
||||
backgroundColor: '#fff',
|
||||
}
|
||||
opacity: '1',
|
||||
boxShadow:
|
||||
'rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px',
|
||||
margin: '3px',
|
||||
padding: '5px',
|
||||
backgroundColor: '#fff',
|
||||
}
|
||||
: { opacity: '0.6', boxShadow: 'none' }
|
||||
}
|
||||
onClick={() => {
|
||||
|
|
@ -3557,13 +3554,13 @@ const FeaturesFunctionalities = (props) => {
|
|||
style={
|
||||
offerType == 'F'
|
||||
? {
|
||||
opacity: '1',
|
||||
boxShadow:
|
||||
'rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px',
|
||||
margin: '3px',
|
||||
padding: '5px',
|
||||
backgroundColor: '#fff',
|
||||
}
|
||||
opacity: '1',
|
||||
boxShadow:
|
||||
'rgba(0, 0, 0, 0.05) 0px 6px 24px 0px, rgba(0, 0, 0, 0.08) 0px 0px 0px 1px',
|
||||
margin: '3px',
|
||||
padding: '5px',
|
||||
backgroundColor: '#fff',
|
||||
}
|
||||
: { opacity: '0.6', boxShadow: 'none' }
|
||||
}
|
||||
onClick={() => {
|
||||
|
|
@ -3660,7 +3657,7 @@ const FeaturesFunctionalities = (props) => {
|
|||
}
|
||||
isOnChange={
|
||||
formRef.current?.getFieldsValue()?.CustEmail ||
|
||||
inputValue
|
||||
inputValue
|
||||
? true
|
||||
: false
|
||||
}
|
||||
|
|
@ -3688,7 +3685,7 @@ const FeaturesFunctionalities = (props) => {
|
|||
autocomplete="off"
|
||||
isOnChange={
|
||||
formRef.current?.getFieldsValue()?.CreditLimit ||
|
||||
inputValue
|
||||
inputValue
|
||||
? true
|
||||
: false
|
||||
}
|
||||
|
|
@ -3921,7 +3918,7 @@ const FeaturesFunctionalities = (props) => {
|
|||
onChange={setActiveTab}
|
||||
items={[
|
||||
{ key: 'quickAdd', label: 'Quick Add' },
|
||||
{ key: 'directSale', label: 'Direct Sale' }
|
||||
{ key: 'directSale', label: 'Direct Sale' },
|
||||
]}
|
||||
/>
|
||||
<ProductForm
|
||||
|
|
@ -4045,7 +4042,7 @@ const FeaturesFunctionalities = (props) => {
|
|||
buttonText="SAVE"
|
||||
color="901D77"
|
||||
icon={<ArrowRightOutlined />}
|
||||
// handleSubmit={() => { globalamount1() }}
|
||||
// handleSubmit={() => { globalamount1() }}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -4059,7 +4056,7 @@ const FeaturesFunctionalities = (props) => {
|
|||
bordered
|
||||
dataSource={TableName}
|
||||
width={'120px'}
|
||||
//pagination={column2?.length < "11" ? false : true}
|
||||
//pagination={column2?.length < "11" ? false : true}
|
||||
></Table>
|
||||
</div>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,28 @@
|
|||
import { useEffect, useRef, useState, useCallback } from 'react';
|
||||
import {
|
||||
useEffect,
|
||||
useRef,
|
||||
useState,
|
||||
useCallback,
|
||||
lazy,
|
||||
Suspense,
|
||||
} from 'react';
|
||||
import { shallowEqual, useDispatch, useSelector } from 'react-redux';
|
||||
import moment from 'moment';
|
||||
import { Form, Radio } from 'antd';
|
||||
import {
|
||||
ArrowRightOutlined,
|
||||
CheckCircleOutlined,
|
||||
CloseCircleOutlined,
|
||||
PlusOutlined,
|
||||
} from '@ant-design/icons';
|
||||
import { InputField } from '../../../../Components/Forms/InputField';
|
||||
import { DefaultModal } from '../../../../Components/Modal/DefaultModal.jsx';
|
||||
import { DropDowns } from '../../../../Components/Forms/DropDown.jsx';
|
||||
import Buttons from '../../../../Components/Forms/Buttons';
|
||||
import { Messages } from '../../../../Components/Notifications/Messages';
|
||||
import { isMobile } from 'react-device-detect';
|
||||
|
||||
// Js files
|
||||
import {
|
||||
getConfigType,
|
||||
GlobalCommonPaymentOptions,
|
||||
|
|
@ -58,54 +80,61 @@ import {
|
|||
putSalesBillEdit,
|
||||
changeBillEditingMode,
|
||||
changePreviousOrderPayment,
|
||||
changePreviousOrderOfferDetail
|
||||
changePreviousOrderOfferDetail,
|
||||
GlobalAllBookingType,
|
||||
} from '../../../../Features/BookingScreen/BookingData/BookingData';
|
||||
import { Form, Radio } from 'antd';
|
||||
import {
|
||||
ArrowRightOutlined,
|
||||
CheckCircleOutlined,
|
||||
CloseCircleOutlined,
|
||||
PlusOutlined,
|
||||
} from '@ant-design/icons';
|
||||
import { InputField } from '../../../../Components/Forms/InputField';
|
||||
import { DefaultModal } from '../../../../Components/Modal/DefaultModal.jsx';
|
||||
import { DropDowns } from '../../../../Components/Forms/DropDown.jsx';
|
||||
import Buttons from '../../../../Components/Forms/Buttons';
|
||||
import QrComponent from '../BookingFunctionality/DynamicQr.jsx';
|
||||
import { Messages } from '../../../../Components/Notifications/Messages';
|
||||
import {
|
||||
extractLastNumberOrderId,
|
||||
getSession,
|
||||
printDiv,
|
||||
validateSafeInput,
|
||||
} from '../../../../Services/Others.js';
|
||||
import WpIcon from '../../../../Images/message.png';
|
||||
import {
|
||||
ChangeTotalAmount,
|
||||
globalExtraTotalAmount,
|
||||
} from '../../../../Features/ExteraCharges/ExtraCharges.js';
|
||||
import QrinScreen from '../BookingFunctionality/DynamicScreenQr.jsx';
|
||||
import PaymentPdfBooking from '../../../paymentpdfPage/PaymentPdfBooking.jsx';
|
||||
import { isMobile } from 'react-device-detect';
|
||||
import { PrintStyleFunction } from '../../../paymentpdfPage/PrintStyleFunction.js';
|
||||
import {
|
||||
getTemplateData,
|
||||
GlobalprintDatas,
|
||||
SelectedPrintTemplate,
|
||||
} from '../../../../Features/ThemeChange/ThemeChange.js';
|
||||
import '../../../../Styles/BookingScreen/Components/BookingFunctionality/SplitPayment.scss';
|
||||
import BsBillingCreditCustomer from '../BookingFunctionality/BSBillingCreditCustomer.jsx';
|
||||
import MobilePrint from '../BookingFunctionality/MobilePrint.jsx';
|
||||
import FeaturesFunctionalities from './FeaturesFunctionalities.jsx';
|
||||
import TokensinglePrint from '../../../paymentpdfPage/TokenOnlyPrints/TokeninsinglePrint.jsx';
|
||||
import TokenOnlyMobilePrint from './TokenOnlyMobilePrint.jsx';
|
||||
import AllProductTokenMobilePrint from './AllProductTokenMobilePrint.jsx';
|
||||
import { getCustomerDisplayWindow } from '../../../../Features/customerDisplayWindow/customerDisplayWindow.js';
|
||||
import { gettinghold } from '../../../../Features/BookingScreen/HoldOption/HoldOption.js';
|
||||
import { Global_OrderOfferDetail } from '../../../../Features/Offer/Offer.js';
|
||||
import { useApplyOfferto_CardDetail } from '../UtillComponents/BSNavBarOffer/BSNavBarOffer_CustomHooks.jsx';
|
||||
import { ApplicationPreferences } from '../../../../Features/BrachLogin/BranchLogin.js';
|
||||
import { ChangeFullFreeProductList, changeFullOfferAppliedProducts, GlobalOfferAppliedProducts } from '../../../../Features/Offer/Offernew/BookingOffernew.js';
|
||||
import {
|
||||
ChangeFullFreeProductList,
|
||||
changeFullOfferAppliedProducts,
|
||||
GlobalOfferAppliedProducts,
|
||||
} from '../../../../Features/Offer/Offernew/BookingOffernew.js';
|
||||
|
||||
// jsx
|
||||
const QrinScreen = lazy(
|
||||
() => import('../BookingFunctionality/DynamicScreenQr.jsx')
|
||||
);
|
||||
const MobilePrint = lazy(
|
||||
() => import('../BookingFunctionality/MobilePrint.jsx')
|
||||
);
|
||||
const FeaturesFunctionalities = lazy(
|
||||
() => import('./FeaturesFunctionalities.jsx')
|
||||
);
|
||||
const PaymentPdfBooking = lazy(
|
||||
() => import('../../../paymentpdfPage/PaymentPdfBooking.jsx')
|
||||
);
|
||||
const BsBillingCreditCustomer = lazy(
|
||||
() => import('../BookingFunctionality/BSBillingCreditCustomer.jsx')
|
||||
);
|
||||
const TokensinglePrint = lazy(
|
||||
() => import('../../../paymentpdfPage/TokenOnlyPrints/TokeninsinglePrint.jsx')
|
||||
);
|
||||
const QrComponent = lazy(() => import('../BookingFunctionality/DynamicQr.jsx'));
|
||||
|
||||
import { useApplyOfferto_CardDetail } from '../UtillComponents/BSNavBarOffer/BSNavBarOffer_CustomHooks.jsx';
|
||||
|
||||
// Style and Icon
|
||||
import '../../../../Styles/BookingScreen/Components/BookingFunctionality/SplitPayment.scss';
|
||||
import WpIcon from '../../../../Images/message.png';
|
||||
|
||||
const subDirectory = import.meta.env.BASE_URL;
|
||||
const MainHomeUrl = import.meta.env.ENV_MAIN_BASE_URL;
|
||||
|
|
@ -119,12 +148,13 @@ const SplitPayment = (props) => {
|
|||
const AppId = getSession('AppId');
|
||||
const UserId = getSession('UserId');
|
||||
const appPreferences = useSelector(ApplicationPreferences);
|
||||
const AllBookingType = useSelector(GlobalAllBookingType);
|
||||
|
||||
const applyOffer = useApplyOfferto_CardDetail();
|
||||
const globalTipAmount = useSelector(GlobaltipAmount);
|
||||
const TotalNetAmount = (props.hasOwnProperty('TotalNetAmount')
|
||||
const TotalNetAmount = props.hasOwnProperty('TotalNetAmount')
|
||||
? props['TotalNetAmount']
|
||||
: null);
|
||||
: null;
|
||||
const TableOrderId = props.hasOwnProperty('TableBookingOrderId')
|
||||
? props['TableBookingOrderId']
|
||||
: null;
|
||||
|
|
@ -138,10 +168,16 @@ const SplitPayment = (props) => {
|
|||
const SelCustId = useSelector(GlobalSelCustId);
|
||||
const salesBillEdit = useSelector(GlobalSalesBillEdit);
|
||||
const previousOrderPayment = useSelector(GlobalPreviousOrderPayment);
|
||||
const previousOrderOfferDetails = useSelector(GlobalPreviousOrderOfferDetails);
|
||||
const previousOrderOfferDetails = useSelector(
|
||||
GlobalPreviousOrderOfferDetails
|
||||
);
|
||||
const filteredPayments =
|
||||
previousOrderPayment?.filter(
|
||||
p => p?.LastOrderTran === 'Y' && p?.AfterAdjustment != null && p?.AfterAdjustment !== '' && p?.AfterAdjustment
|
||||
(p) =>
|
||||
p?.LastOrderTran === 'Y' &&
|
||||
p?.AfterAdjustment != null &&
|
||||
p?.AfterAdjustment !== '' &&
|
||||
p?.AfterAdjustment
|
||||
) || [];
|
||||
const paymentsToUse =
|
||||
filteredPayments.length > 0 ? filteredPayments : previousOrderPayment || [];
|
||||
|
|
@ -150,7 +186,8 @@ const SplitPayment = (props) => {
|
|||
0
|
||||
);
|
||||
const totalPreviouspayment = paymentsToUse?.reduce(
|
||||
(acc, payment) => acc + parseFloat(payment.AfterAdjustment || payment.Amount || 0),
|
||||
(acc, payment) =>
|
||||
acc + parseFloat(payment.AfterAdjustment || payment.Amount || 0),
|
||||
0
|
||||
);
|
||||
const [paybtns, setpaybtns] = useState([]);
|
||||
|
|
@ -193,7 +230,11 @@ const SplitPayment = (props) => {
|
|||
const OverAllSales = useSelector(GlobalOverAllDiscSales);
|
||||
const OverAllEstimate = useSelector(GlobalOverAllDiscEstimate);
|
||||
const printDatas = useSelector(GlobalprintDatas);
|
||||
const allowDecimal = SettingDataSelector?.[0]?.SettingDtlDetails?.find((setting) => setting?.SettingIdName?.toLowerCase() === "decimal" && setting?.SettingValue === 'Y');
|
||||
const allowDecimal = SettingDataSelector?.[0]?.SettingDtlDetails?.find(
|
||||
(setting) =>
|
||||
setting?.SettingIdName?.toLowerCase() === 'decimal' &&
|
||||
setting?.SettingValue === 'Y'
|
||||
);
|
||||
const UomPrint = SettingDataSelector?.[0]?.SettingDtlDetails.filter(
|
||||
(i) => i.SettingIdName === 'PrintUom'
|
||||
)?.[0];
|
||||
|
|
@ -223,7 +264,7 @@ const SplitPayment = (props) => {
|
|||
(item) => item?.OptionName == 'Offer'
|
||||
);
|
||||
const [TotalAmount, setTotalAmount] = useState(0);
|
||||
console.log(TotalAmount, "TotalSplitAmount", TotalSplitAmount)
|
||||
console.log(TotalAmount, 'TotalSplitAmount', TotalSplitAmount);
|
||||
const preferenceOffer =
|
||||
SettingDataSelector?.[0]?.['SettingDtlDetails']?.find(
|
||||
(item) => item.SettingIdName === 'Offer'
|
||||
|
|
@ -237,9 +278,8 @@ const SplitPayment = (props) => {
|
|||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
if (salesBillEdit) {
|
||||
const previousNetAmount = (totalPreviouspayment || 0);
|
||||
const previousNetAmount = totalPreviouspayment || 0;
|
||||
if (TotalNetAmount > previousNetAmount) {
|
||||
setTotalAmount(TotalNetAmount - previousNetAmount);
|
||||
} else {
|
||||
|
|
@ -248,8 +288,7 @@ const SplitPayment = (props) => {
|
|||
} else {
|
||||
setTotalAmount(TotalNetAmount);
|
||||
}
|
||||
|
||||
}, [totalPreviousOfferAmount, totalPreviouspayment, TotalNetAmount])
|
||||
}, [totalPreviousOfferAmount, totalPreviouspayment, TotalNetAmount]);
|
||||
|
||||
useEffect(() => {
|
||||
if (SelCustId) {
|
||||
|
|
@ -272,7 +311,7 @@ const SplitPayment = (props) => {
|
|||
}, [Splitpayment]);
|
||||
useEffect(() => {
|
||||
const totalPayAmount = Object.keys(SplitSelPayMode)
|
||||
.filter(key => key.startsWith('PayAmount-'))
|
||||
.filter((key) => key.startsWith('PayAmount-'))
|
||||
.reduce((sum, key) => {
|
||||
const value = parseInt(SplitSelPayMode[key], 10);
|
||||
return sum + (isNaN(value) ? 0 : value);
|
||||
|
|
@ -360,20 +399,12 @@ const SplitPayment = (props) => {
|
|||
setUpiPayOption(options);
|
||||
};
|
||||
const getBookingTypeId = async () => {
|
||||
let tempconfigdata = await dispatch(
|
||||
getConfigType({ TypeName: 'Booking Type' })
|
||||
).unwrap();
|
||||
setConfigDataList(AllBookingType);
|
||||
let configdata = AllBookingType;
|
||||
let checkName = BookingTypeBoth ? 'DineIn,TakeAway' : BookingType;
|
||||
|
||||
if (tempconfigdata?.data?.statusCode == 1) {
|
||||
setConfigDataList(tempconfigdata?.data?.data);
|
||||
let configdata = tempconfigdata?.data?.data;
|
||||
let checkName = BookingTypeBoth ? 'DineIn,TakeAway' : BookingType;
|
||||
|
||||
let filterconfigdata = configdata?.find(
|
||||
(a) => a?.ConfigName === checkName
|
||||
);
|
||||
setSelectedBookingType(filterconfigdata?.ConfigId);
|
||||
}
|
||||
let filterconfigdata = configdata?.find((a) => a?.ConfigName === checkName);
|
||||
setSelectedBookingType(filterconfigdata?.ConfigId);
|
||||
};
|
||||
const gettodaydate = () => {
|
||||
const currentDate = new Date();
|
||||
|
|
@ -547,7 +578,8 @@ const SplitPayment = (props) => {
|
|||
SingleTokenMobilePrint(PrintOrderDetails, SelUpiId, 'Booking');
|
||||
}
|
||||
} else {
|
||||
MobilePrint(appPreferences,
|
||||
MobilePrint(
|
||||
appPreferences,
|
||||
PrintOrderDetails,
|
||||
SelUpiId,
|
||||
'Booking',
|
||||
|
|
@ -570,8 +602,9 @@ const SplitPayment = (props) => {
|
|||
await Promise.all(
|
||||
PrintOrderDetails?.[0]?.OrderDetails?.map(
|
||||
async (orderDetail, index) => {
|
||||
const groupedTokens = orderDetail?.productDetails?.filter(data => data?.EditTokenAvailable !== 'N')?.reduce(
|
||||
(acc, item, idx) => {
|
||||
const groupedTokens = orderDetail?.productDetails
|
||||
?.filter((data) => data?.EditTokenAvailable !== 'N')
|
||||
?.reduce((acc, item, idx) => {
|
||||
if (item.TokenAvailable === 'Y') {
|
||||
if (!item.CounterName) {
|
||||
// If CounterName is null or empty
|
||||
|
|
@ -584,9 +617,7 @@ const SplitPayment = (props) => {
|
|||
}
|
||||
}
|
||||
return acc;
|
||||
},
|
||||
{}
|
||||
);
|
||||
}, {});
|
||||
|
||||
// Iterate over grouped tokens and print them
|
||||
const tokensToPrint = Object.entries(groupedTokens).map(
|
||||
|
|
@ -605,11 +636,11 @@ const SplitPayment = (props) => {
|
|||
);
|
||||
} else {
|
||||
await Promise.all(
|
||||
PrintOrderDetails?.[0]?.OrderDetails?.filter(data => data?.EditTokenAvailable !== 'N')?.map(
|
||||
async (orderDetail, index) => {
|
||||
await TokenPrint(`${index}-${orderDetail?.OrderId}`);
|
||||
}
|
||||
)
|
||||
PrintOrderDetails?.[0]?.OrderDetails?.filter(
|
||||
(data) => data?.EditTokenAvailable !== 'N'
|
||||
)?.map(async (orderDetail, index) => {
|
||||
await TokenPrint(`${index}-${orderDetail?.OrderId}`);
|
||||
})
|
||||
);
|
||||
setPrintOrderDetails([]);
|
||||
}
|
||||
|
|
@ -641,7 +672,7 @@ const SplitPayment = (props) => {
|
|||
|
||||
const selectedStyle =
|
||||
stylesMap[
|
||||
printerTemplateStyle == undefined ? 'Style 13' : printerTemplateStyle
|
||||
printerTemplateStyle == undefined ? 'Style 13' : printerTemplateStyle
|
||||
];
|
||||
|
||||
if (selectedStyle) {
|
||||
|
|
@ -650,8 +681,9 @@ const SplitPayment = (props) => {
|
|||
async (orderDetail, index) => {
|
||||
await printDiv(`${selectedStyle}-${index}`, style); // Use unique IDs for each print
|
||||
if (orderDetail?.BookingTypeName !== 'Dine In') {
|
||||
const groupedTokens = orderDetail?.productDetails?.filter(data => data?.EditTokenAvailable !== 'N')?.reduce(
|
||||
(acc, item, idx) => {
|
||||
const groupedTokens = orderDetail?.productDetails
|
||||
?.filter((data) => data?.EditTokenAvailable !== 'N')
|
||||
?.reduce((acc, item, idx) => {
|
||||
if (item.TokenAvailable === 'Y') {
|
||||
if (!item.CounterName) {
|
||||
// If CounterName is null or empty
|
||||
|
|
@ -664,9 +696,7 @@ const SplitPayment = (props) => {
|
|||
}
|
||||
}
|
||||
return acc;
|
||||
},
|
||||
{}
|
||||
);
|
||||
}, {});
|
||||
|
||||
// Iterate over grouped tokens and print them
|
||||
const tokensToPrint = Object.entries(groupedTokens).map(
|
||||
|
|
@ -1033,11 +1063,11 @@ const SplitPayment = (props) => {
|
|||
<button
|
||||
className={
|
||||
SplitSelPayMode[`PaymentStatus-${i}`] === 'S' ||
|
||||
SplitSelPayMode[`FirstPaymentclick-${i}`] === 'Y'
|
||||
SplitSelPayMode[`FirstPaymentclick-${i}`] === 'Y'
|
||||
? 'Splitbutton-diabled'
|
||||
: 'Splitbutton'
|
||||
}
|
||||
// onClick={(e) => (SplitSelPayMode[`PaymentStatus-${i}`] === "S" || SplitSelPayMode[`FirstPaymentclick-${i}`] === "Y") ? e.stopPropagation() : onFinish(i)}
|
||||
// onClick={(e) => (SplitSelPayMode[`PaymentStatus-${i}`] === "S" || SplitSelPayMode[`FirstPaymentclick-${i}`] === "Y") ? e.stopPropagation() : onFinish(i)}
|
||||
>
|
||||
Pay
|
||||
</button>
|
||||
|
|
@ -1365,8 +1395,8 @@ const SplitPayment = (props) => {
|
|||
? 'E'
|
||||
: GlobEstBooking === 'ParEst'
|
||||
? GlobProdwisedata?.includes(
|
||||
a.InwardDtlId + ' ' + a?.BookingTypeName
|
||||
)
|
||||
a.InwardDtlId + ' ' + a?.BookingTypeName
|
||||
)
|
||||
? 'E'
|
||||
: 'S'
|
||||
: 'S',
|
||||
|
|
@ -1448,7 +1478,14 @@ const SplitPayment = (props) => {
|
|||
// SalesTableLinkDetails:
|
||||
// SelectedTableDetails?.length > 0 ? SelectedTableDetails : null,
|
||||
SalesTableLinkDetails:
|
||||
SelectedTableDetails?.length > 0 ? globalTipAmount === 0 ? SelectedTableDetails : SelectedTableDetails?.map(item => ({ ...item, "TipsAmount": globalTipAmount })) : null,
|
||||
SelectedTableDetails?.length > 0
|
||||
? globalTipAmount === 0
|
||||
? SelectedTableDetails
|
||||
: SelectedTableDetails?.map((item) => ({
|
||||
...item,
|
||||
TipsAmount: globalTipAmount,
|
||||
}))
|
||||
: null,
|
||||
|
||||
// "Credit": TotalAmount,
|
||||
// "Debit": 0,
|
||||
|
|
@ -1472,37 +1509,37 @@ const SplitPayment = (props) => {
|
|||
: SplitSelPayMode[`PaymentMode-${i}`]?.toLowerCase() === 'card'
|
||||
? SplitSelPayMode[`CardSelection-${i}`]
|
||||
: SplitSelPayMode[`UPISelection-${i}`]?.toLowerCase() ===
|
||||
'default'
|
||||
'default'
|
||||
? 'PC'
|
||||
: SplitSelPayMode[`UPISelection-${i}`],
|
||||
ModeOfPayment:
|
||||
SplitSelPayMode[`UPISelection-${i}`]?.toLowerCase() === 'default'
|
||||
? PaymentUpiOptions?.find(
|
||||
(upipay) => upipay?.Mode === SplitSelPayMode[`UPIMode-${i}`]
|
||||
)?.UPIDetailId
|
||||
(upipay) => upipay?.Mode === SplitSelPayMode[`UPIMode-${i}`]
|
||||
)?.UPIDetailId
|
||||
: null,
|
||||
AccountDtl:
|
||||
SplitSelPayMode[`PaymentMode-${i}`]?.toLowerCase() === 'upi' &&
|
||||
SplitSelPayMode[`UPISelection-${i}`]?.toLowerCase() === 'default'
|
||||
SplitSelPayMode[`UPISelection-${i}`]?.toLowerCase() === 'default'
|
||||
? useOptions?.[0]?.PaymentDetails?.Payatthecounter?.find(
|
||||
(upipay) => upipay?.Mode === SplitSelPayMode[`UPIMode-${i}`]
|
||||
)
|
||||
(upipay) => upipay?.Mode === SplitSelPayMode[`UPIMode-${i}`]
|
||||
)
|
||||
: (SplitSelPayMode[`PaymentMode-${i}`]?.toLowerCase() === 'upi' &&
|
||||
SplitSelPayMode[`UPISelection-${i}`]?.toLowerCase() ===
|
||||
'pd') ||
|
||||
(SplitSelPayMode[`PaymentMode-${i}`]?.toLowerCase() ===
|
||||
'card' &&
|
||||
SplitSelPayMode[`CardSelection-${i}`]?.toLowerCase() ===
|
||||
'pd')
|
||||
? useOptions?.[0]?.PaymentDetails?.PaymentDevice
|
||||
: (SplitSelPayMode[`PaymentMode-${i}`]?.toLowerCase() ===
|
||||
'upi' &&
|
||||
SplitSelPayMode[`UPISelection-${i}`]?.toLowerCase() ===
|
||||
'pg') ||
|
||||
SplitSelPayMode[`UPISelection-${i}`]?.toLowerCase() ===
|
||||
'pd') ||
|
||||
(SplitSelPayMode[`PaymentMode-${i}`]?.toLowerCase() ===
|
||||
'card' &&
|
||||
SplitSelPayMode[`CardSelection-${i}`]?.toLowerCase() ===
|
||||
'pg')
|
||||
'pd')
|
||||
? useOptions?.[0]?.PaymentDetails?.PaymentDevice
|
||||
: (SplitSelPayMode[`PaymentMode-${i}`]?.toLowerCase() ===
|
||||
'upi' &&
|
||||
SplitSelPayMode[`UPISelection-${i}`]?.toLowerCase() ===
|
||||
'pg') ||
|
||||
(SplitSelPayMode[`PaymentMode-${i}`]?.toLowerCase() ===
|
||||
'card' &&
|
||||
SplitSelPayMode[`CardSelection-${i}`]?.toLowerCase() ===
|
||||
'pg')
|
||||
? useOptions?.[0]?.PaymentDetails?.PaymentGateway
|
||||
: [],
|
||||
PaymentStatus:
|
||||
|
|
@ -1511,9 +1548,9 @@ const SplitPayment = (props) => {
|
|||
: SplitSelPayMode[`PaymentMode-${i}`]?.toLowerCase() === 'credit'
|
||||
? 'S'
|
||||
: SplitSelPayMode[`PaymentMode-${i}`]?.toLowerCase() ===
|
||||
'upi' &&
|
||||
SplitSelPayMode[`UPISelection-${i}`]?.toLowerCase() ===
|
||||
'default'
|
||||
'upi' &&
|
||||
SplitSelPayMode[`UPISelection-${i}`]?.toLowerCase() ===
|
||||
'default'
|
||||
? 'S'
|
||||
: 'P',
|
||||
Debit: 0,
|
||||
|
|
@ -1527,7 +1564,7 @@ const SplitPayment = (props) => {
|
|||
};
|
||||
let PostData = temppostdata;
|
||||
(i === 0 && SplitSelPayMode[`PaymentStatus-${i}`] === 'F') ||
|
||||
(i === 0 && props.hasOwnProperty('TableBookingOrderId'))
|
||||
(i === 0 && props.hasOwnProperty('TableBookingOrderId'))
|
||||
? PutSplitPayment(i)
|
||||
: i === 0
|
||||
? Object.keys(ReportholdData)?.length > 0
|
||||
|
|
@ -1576,14 +1613,14 @@ const SplitPayment = (props) => {
|
|||
}
|
||||
setMessageData(
|
||||
response?.data?.response +
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
);
|
||||
if (response?.data?.OrderDetails?.length > 0) {
|
||||
setPrintOrderDetails([response?.data]);
|
||||
|
|
@ -1635,10 +1672,16 @@ const SplitPayment = (props) => {
|
|||
|
||||
if (response?.data?.statusCode == 1) {
|
||||
setSalesOrderId(response?.data?.OrderId);
|
||||
const salesEditAmount = response?.data?.PaymentOrderDtl?.find(payment =>
|
||||
payment?.LastOrderTran === 'Y' && payment?.AdjustmentType &&
|
||||
payment?.AdjustmentType != null && payment?.AfterAdjustment && payment?.BeforeAdjustment && payment?.AfterAdjustment != null && payment?.BeforeAdjustment != null
|
||||
)
|
||||
const salesEditAmount = response?.data?.PaymentOrderDtl?.find(
|
||||
(payment) =>
|
||||
payment?.LastOrderTran === 'Y' &&
|
||||
payment?.AdjustmentType &&
|
||||
payment?.AdjustmentType != null &&
|
||||
payment?.AfterAdjustment &&
|
||||
payment?.BeforeAdjustment &&
|
||||
payment?.AfterAdjustment != null &&
|
||||
payment?.BeforeAdjustment != null
|
||||
);
|
||||
setBeforeAdjAmount(salesEditAmount?.BeforeAdjustment || null);
|
||||
setAfterAdjAmount(salesEditAmount?.AfterAdjustment || null);
|
||||
setAdjustmentType(salesEditAmount?.AdjustmentType || null);
|
||||
|
|
@ -1677,14 +1720,14 @@ const SplitPayment = (props) => {
|
|||
}
|
||||
setMessageData(
|
||||
response?.data?.response +
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
);
|
||||
if (response?.data?.OrderDetails?.length > 0) {
|
||||
setPrintOrderDetails([response?.data]);
|
||||
|
|
@ -1722,7 +1765,13 @@ const SplitPayment = (props) => {
|
|||
OrderId: props.hasOwnProperty('TableBookingOrderId')
|
||||
? TableOrderId
|
||||
: SalesOrderId,
|
||||
...(i === 0 ? { SalesId: props.hasOwnProperty('TableBookingSalesId') ? TableSalesId : SalesOrderId } : {}),
|
||||
...(i === 0
|
||||
? {
|
||||
SalesId: props.hasOwnProperty('TableBookingSalesId')
|
||||
? TableSalesId
|
||||
: SalesOrderId,
|
||||
}
|
||||
: {}),
|
||||
PaymentType:
|
||||
SplitSelPayMode[`PaymentMode-${i}`]?.toLowerCase() === 'upi'
|
||||
? SplitSelPayMode[`UPISelection-${i}`]?.toLowerCase() === 'pd'
|
||||
|
|
@ -1743,32 +1792,32 @@ const SplitPayment = (props) => {
|
|||
: SplitSelPayMode[`PaymentMode-${i}`]?.toLowerCase() === 'card'
|
||||
? SplitSelPayMode[`CardSelection-${i}`]
|
||||
: SplitSelPayMode[`UPISelection-${i}`]?.toLowerCase() ===
|
||||
'default'
|
||||
'default'
|
||||
? 'PC'
|
||||
: SplitSelPayMode[`UPISelection-${i}`],
|
||||
ModeOfPayment:
|
||||
SplitSelPayMode[`UPISelection-${i}`]?.toLowerCase() === 'default'
|
||||
? PaymentUpiOptions?.find(
|
||||
(upipay) => upipay?.Mode === SplitSelPayMode[`UPIMode-${i}`]
|
||||
)?.UPIDetailId
|
||||
(upipay) => upipay?.Mode === SplitSelPayMode[`UPIMode-${i}`]
|
||||
)?.UPIDetailId
|
||||
: null,
|
||||
AccountDtl:
|
||||
SplitSelPayMode[`PaymentMode-${i}`]?.toLowerCase() === 'upi' &&
|
||||
SplitSelPayMode[`UPISelection-${i}`]?.toLowerCase() === 'default'
|
||||
SplitSelPayMode[`UPISelection-${i}`]?.toLowerCase() === 'default'
|
||||
? useOptions?.[0]?.PaymentDetails?.Payatthecounter?.find(
|
||||
(upipay) => upipay?.Mode === SplitSelPayMode[`UPIMode-${i}`]
|
||||
)
|
||||
(upipay) => upipay?.Mode === SplitSelPayMode[`UPIMode-${i}`]
|
||||
)
|
||||
: (SplitSelPayMode[`PaymentMode-${i}`]?.toLowerCase() === 'upi' &&
|
||||
SplitSelPayMode[`UPISelection-${i}`]?.toLowerCase() === 'pd') ||
|
||||
(SplitSelPayMode[`PaymentMode-${i}`]?.toLowerCase() === 'card' &&
|
||||
SplitSelPayMode[`UPISelection-${i}`]?.toLowerCase() === 'pd')
|
||||
SplitSelPayMode[`UPISelection-${i}`]?.toLowerCase() === 'pd') ||
|
||||
(SplitSelPayMode[`PaymentMode-${i}`]?.toLowerCase() === 'card' &&
|
||||
SplitSelPayMode[`UPISelection-${i}`]?.toLowerCase() === 'pd')
|
||||
? useOptions?.[0]?.PaymentDetails?.PaymentDevice
|
||||
: (SplitSelPayMode[`PaymentMode-${i}`]?.toLowerCase() === 'upi' &&
|
||||
SplitSelPayMode[`UPISelection-${i}`]?.toLowerCase() ===
|
||||
'pg') ||
|
||||
(SplitSelPayMode[`PaymentMode-${i}`]?.toLowerCase() ===
|
||||
'card' &&
|
||||
SplitSelPayMode[`UPISelection-${i}`]?.toLowerCase() === 'pg')
|
||||
SplitSelPayMode[`UPISelection-${i}`]?.toLowerCase() ===
|
||||
'pg') ||
|
||||
(SplitSelPayMode[`PaymentMode-${i}`]?.toLowerCase() ===
|
||||
'card' &&
|
||||
SplitSelPayMode[`UPISelection-${i}`]?.toLowerCase() === 'pg')
|
||||
? useOptions?.[0]?.PaymentDetails?.PaymentGateway
|
||||
: [],
|
||||
PaymentStatus:
|
||||
|
|
@ -1777,8 +1826,8 @@ const SplitPayment = (props) => {
|
|||
: SplitSelPayMode[`PaymentMode-${i}`]?.toLowerCase() === 'credit'
|
||||
? 'S'
|
||||
: SplitSelPayMode[`PaymentMode-${i}`]?.toLowerCase() === 'upi' &&
|
||||
SplitSelPayMode[`UPISelection-${i}`]?.toLowerCase() ===
|
||||
'default'
|
||||
SplitSelPayMode[`UPISelection-${i}`]?.toLowerCase() ===
|
||||
'default'
|
||||
? 'S'
|
||||
: 'P',
|
||||
Debit: 0,
|
||||
|
|
@ -1789,7 +1838,6 @@ const SplitPayment = (props) => {
|
|||
BeforeAdjAmount: beforeAdjAmount || null,
|
||||
AfterAdjAmount: afterAdjAmount || null,
|
||||
AdjustmentType: adjustmentType || null,
|
||||
|
||||
};
|
||||
|
||||
let response = await dispatch(
|
||||
|
|
@ -1836,14 +1884,14 @@ const SplitPayment = (props) => {
|
|||
}
|
||||
setMessageData(
|
||||
response?.data?.response +
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
' ' +
|
||||
(response?.data?.OrderDetails?.length > 0
|
||||
? response?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
response?.data?.OrderId,
|
||||
response?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
);
|
||||
if (response?.data?.OrderDetails?.length > 0) {
|
||||
setPrintOrderDetails([response?.data]);
|
||||
|
|
@ -1945,14 +1993,14 @@ const SplitPayment = (props) => {
|
|||
});
|
||||
setMessageData(
|
||||
bookingpaymentupdate?.data?.response +
|
||||
' ' +
|
||||
(bookingpaymentupdate?.data?.OrderDetails?.length > 0
|
||||
? bookingpaymentupdate?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
bookingpaymentupdate?.data?.OrderId,
|
||||
bookingpaymentupdate?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
' ' +
|
||||
(bookingpaymentupdate?.data?.OrderDetails?.length > 0
|
||||
? bookingpaymentupdate?.data?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
bookingpaymentupdate?.data?.OrderId,
|
||||
bookingpaymentupdate?.data?.OrderDetails?.[0]?.FYStatus
|
||||
)
|
||||
: '')
|
||||
);
|
||||
if (bookingpaymentupdate?.data?.OrderDetails?.length > 0) {
|
||||
setPrintOrderDetails([bookingpaymentupdate?.data]);
|
||||
|
|
@ -1970,7 +2018,7 @@ const SplitPayment = (props) => {
|
|||
if (
|
||||
Date.now() - startTime >
|
||||
useOptions?.[0]?.PDConfigDetails?.[0]?.AutoCancelDurationInMinutes *
|
||||
60000
|
||||
60000
|
||||
) {
|
||||
// 60,000 ms = 1 minute
|
||||
|
||||
|
|
@ -2125,195 +2173,200 @@ const SplitPayment = (props) => {
|
|||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<Messages messageType={messageType} messageData={messageData} />
|
||||
<div className="splitmodal">
|
||||
<DefaultModal
|
||||
open={Splitpayment}
|
||||
title="Split Payment"
|
||||
handleCancel={() => {
|
||||
SplitSelPayMode[`PaymentStatus-0`] !== 'S' && HandleModalClose();
|
||||
}}
|
||||
footer={false}
|
||||
width={1000}
|
||||
className={'splitpaymentModal'}
|
||||
children={
|
||||
<div className="splitpaymentModal-content">
|
||||
<p>Total Amount : {safeRound(TotalAmount)}</p>
|
||||
<p>
|
||||
Remaining Balance : {TotalAmount - (isNaN(TotalSplitAmount) ? 0 : TotalSplitAmount)} </p>
|
||||
<Suspense fallback={<div>Loading...</div>}>
|
||||
<>
|
||||
<Messages messageType={messageType} messageData={messageData} />
|
||||
<div className="splitmodal">
|
||||
<DefaultModal
|
||||
open={Splitpayment}
|
||||
title="Split Payment"
|
||||
handleCancel={() => {
|
||||
SplitSelPayMode[`PaymentStatus-0`] !== 'S' && HandleModalClose();
|
||||
}}
|
||||
footer={false}
|
||||
width={1000}
|
||||
className={'splitpaymentModal'}
|
||||
children={
|
||||
<div className="splitpaymentModal-content">
|
||||
<p>Total Amount : {safeRound(TotalAmount)}</p>
|
||||
<p>
|
||||
Remaining Balance :{' '}
|
||||
{TotalAmount -
|
||||
(isNaN(TotalSplitAmount) ? 0 : TotalSplitAmount)}{' '}
|
||||
</p>
|
||||
|
||||
<>{calculateField()}</>
|
||||
{TotalAmount > TotalSplitAmount &&
|
||||
SplitSelPayMode[`PaymentStatus-${count}`] === 'S' && (
|
||||
<Form.Item>
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
justifyContent: 'flex-end',
|
||||
}}
|
||||
>
|
||||
<PlusOutlined
|
||||
<>{calculateField()}</>
|
||||
{TotalAmount > TotalSplitAmount &&
|
||||
SplitSelPayMode[`PaymentStatus-${count}`] === 'S' && (
|
||||
<Form.Item>
|
||||
<div
|
||||
style={{
|
||||
backgroundColor: '#37943C',
|
||||
color: 'white',
|
||||
borderRadius: '50px',
|
||||
padding: '5px',
|
||||
display: 'flex',
|
||||
justifyContent: 'flex-end',
|
||||
}}
|
||||
onClick={() => setCount(count + 1)}
|
||||
/>
|
||||
</div>
|
||||
</Form.Item>
|
||||
)}
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
{TotalAmount == 0 && Success && (
|
||||
<div>
|
||||
<QrComponent com={`WelcomeScreen**${branchName}`} />
|
||||
>
|
||||
<PlusOutlined
|
||||
style={{
|
||||
backgroundColor: '#37943C',
|
||||
color: 'white',
|
||||
borderRadius: '50px',
|
||||
padding: '5px',
|
||||
}}
|
||||
onClick={() => setCount(count + 1)}
|
||||
/>
|
||||
</div>
|
||||
</Form.Item>
|
||||
)}
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
{TotalAmount > 0 &&
|
||||
qrCode &&
|
||||
PaymentUpiOptions?.length > 0 &&
|
||||
SelUpiId && (
|
||||
{TotalAmount == 0 && Success && (
|
||||
<div>
|
||||
<QrComponent com={`WelcomeScreen**${branchName}`} />
|
||||
</div>
|
||||
)}
|
||||
{TotalAmount > 0 &&
|
||||
qrCode &&
|
||||
PaymentUpiOptions?.length > 0 &&
|
||||
SelUpiId && (
|
||||
<div>
|
||||
<QrComponent
|
||||
com={`DisplayQRCodeScreen**upi://pay?pa=${SelUpiId}&pn=Bonrix&cu=INR&am=${TotalAmount}&pn=Bonrix%20Software%20Systems**${TotalAmount}**${SelUpiId}`}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{PaymentUpiOptions?.length > 0 && OrderId && (
|
||||
<div>
|
||||
<QrComponent
|
||||
com={`DisplayQRCodeScreen**upi://pay?pa=${SelUpiId}&pn=Bonrix&cu=INR&am=${TotalAmount}&pn=Bonrix%20Software%20Systems**${TotalAmount}**${SelUpiId}`}
|
||||
com={`DisplaySuccessQRCodeScreen**...**${extractLastNumberOrderId(OrderId, PrintOrderDetails?.[0]?.OrderDetails?.[0]?.FYStatus)}**${Todaydate}`}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{PaymentUpiOptions?.length > 0 && OrderId && (
|
||||
<div>
|
||||
<QrComponent
|
||||
com={`DisplaySuccessQRCodeScreen**...**${extractLastNumberOrderId(OrderId, PrintOrderDetails?.[0]?.OrderDetails?.[0]?.FYStatus)}**${Todaydate}`}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
{PrintOrderDetails?.length > 0 &&
|
||||
PrintOrderDetails?.[0]?.OrderDetails?.map((orderDetail, index) => (
|
||||
{PrintOrderDetails?.length > 0 &&
|
||||
PrintOrderDetails?.[0]?.OrderDetails?.map((orderDetail, index) => (
|
||||
<div style={{ display: 'none' }}>
|
||||
<PaymentPdfBooking
|
||||
index={index}
|
||||
table2Data={orderDetail}
|
||||
singleData2={orderDetail?.productDetails}
|
||||
orderId={
|
||||
orderDetail?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
orderDetail?.OrderId,
|
||||
orderDetail?.FYStatus
|
||||
)
|
||||
}
|
||||
CreatedDate={orderDetail?.CreatedDate}
|
||||
PaymentStatus={PrintOrderDetails?.[0]?.PaymentOrderDtl}
|
||||
Preference={SettingDataSelector}
|
||||
printDatas={printDatas}
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
{CreditCustomer && (
|
||||
<div style={{ display: 'none' }}>
|
||||
<PaymentPdfBooking
|
||||
index={index}
|
||||
table2Data={orderDetail}
|
||||
singleData2={orderDetail?.productDetails}
|
||||
orderId={
|
||||
orderDetail?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
orderDetail?.OrderId,
|
||||
orderDetail?.FYStatus
|
||||
)
|
||||
}
|
||||
CreatedDate={orderDetail?.CreatedDate}
|
||||
PaymentStatus={PrintOrderDetails?.[0]?.PaymentOrderDtl}
|
||||
Preference={SettingDataSelector}
|
||||
printDatas={printDatas}
|
||||
<BsBillingCreditCustomer
|
||||
ModalCreditCustomer={CreditCustomer}
|
||||
handlemodalclose={() => {
|
||||
handleCreditCustomer('Cancel');
|
||||
}}
|
||||
handleOk={() => {
|
||||
handleCreditCustomer('Submit');
|
||||
}}
|
||||
SplitPayAmount={SplitSelPayMode[`PayAmount-${count}`]}
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
{CreditCustomer && (
|
||||
<div style={{ display: 'none' }}>
|
||||
<BsBillingCreditCustomer
|
||||
ModalCreditCustomer={CreditCustomer}
|
||||
handlemodalclose={() => {
|
||||
handleCreditCustomer('Cancel');
|
||||
)}
|
||||
{PrintOrderDetails?.length > 0 &&
|
||||
(TokenOnly?.SettingValue === 'Y' ||
|
||||
IndividualToken?.SettingValue === 'Y') &&
|
||||
PrintOrderDetails?.[0]?.OrderDetails?.map((orderDetail, index) => (
|
||||
<div style={{ display: 'none' }}>
|
||||
<TokensinglePrint
|
||||
index={index}
|
||||
table2Data={orderDetail}
|
||||
singleData2={orderDetail?.productDetails}
|
||||
orderId={
|
||||
orderDetail?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
orderDetail?.OrderId,
|
||||
orderDetail?.FYStatus
|
||||
)
|
||||
}
|
||||
CreatedDate={orderDetail?.CreatedDate}
|
||||
PaymentStatus={PrintOrderDetails?.[0]?.PaymentOrderDtl}
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
{UpiOpen && (
|
||||
<DefaultModal
|
||||
open={UpiOpen}
|
||||
title="UPI PAYMENT"
|
||||
width={500}
|
||||
handleCancel={() => {
|
||||
Upimodel('Cancel');
|
||||
}}
|
||||
handleOk={() => {
|
||||
handleCreditCustomer('Submit');
|
||||
}}
|
||||
SplitPayAmount={SplitSelPayMode[`PayAmount-${count}`]}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
{PrintOrderDetails?.length > 0 &&
|
||||
(TokenOnly?.SettingValue === 'Y' ||
|
||||
IndividualToken?.SettingValue === 'Y') &&
|
||||
PrintOrderDetails?.[0]?.OrderDetails?.map((orderDetail, index) => (
|
||||
<div style={{ display: 'none' }}>
|
||||
<TokensinglePrint
|
||||
index={index}
|
||||
table2Data={orderDetail}
|
||||
singleData2={orderDetail?.productDetails}
|
||||
orderId={
|
||||
orderDetail?.OrderId &&
|
||||
extractLastNumberOrderId(
|
||||
orderDetail?.OrderId,
|
||||
orderDetail?.FYStatus
|
||||
)
|
||||
}
|
||||
CreatedDate={orderDetail?.CreatedDate}
|
||||
PaymentStatus={PrintOrderDetails?.[0]?.PaymentOrderDtl}
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
{UpiOpen && (
|
||||
<DefaultModal
|
||||
open={UpiOpen}
|
||||
title="UPI PAYMENT"
|
||||
width={500}
|
||||
handleCancel={() => {
|
||||
Upimodel('Cancel');
|
||||
}}
|
||||
footer={false}
|
||||
children={
|
||||
<div style={{ overflow: 'scroll' }}>
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
justifyContent: 'space-evenly',
|
||||
alignItems: 'center',
|
||||
}}
|
||||
>
|
||||
<div>
|
||||
<QrinScreen Amount={CurrentPayAmount} UpiId={SelUpiId} />
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h1> RS :{CurrentPayAmount} </h1>
|
||||
</div>
|
||||
</div>
|
||||
<div className="sentok">
|
||||
{(selOption || SelCustId) && (
|
||||
<div className="sentLink" onClick={onFinalSubmit}>
|
||||
Sent Payment Link
|
||||
<img
|
||||
src={WpIcon}
|
||||
alt="Your Alt Text"
|
||||
style={{ width: '30px', height: '30px' }}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
footer={false}
|
||||
children={
|
||||
<div style={{ overflow: 'scroll' }}>
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
flexDirection: 'row-reverse',
|
||||
width: '100px',
|
||||
flexDirection: 'column',
|
||||
justifyContent: 'space-evenly',
|
||||
alignItems: 'center',
|
||||
}}
|
||||
>
|
||||
<Buttons
|
||||
buttonText="OK"
|
||||
color="901D77"
|
||||
icon={<ArrowRightOutlined />}
|
||||
handleSubmit={() => {
|
||||
Upimodel('Submit');
|
||||
<div>
|
||||
<QrinScreen Amount={CurrentPayAmount} UpiId={SelUpiId} />
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h1> RS :{CurrentPayAmount} </h1>
|
||||
</div>
|
||||
</div>
|
||||
<div className="sentok">
|
||||
{(selOption || SelCustId) && (
|
||||
<div className="sentLink" onClick={onFinalSubmit}>
|
||||
Sent Payment Link
|
||||
<img
|
||||
src={WpIcon}
|
||||
alt="Your Alt Text"
|
||||
style={{ width: '30px', height: '30px' }}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
flexDirection: 'row-reverse',
|
||||
width: '100px',
|
||||
}}
|
||||
/>
|
||||
>
|
||||
<Buttons
|
||||
buttonText="OK"
|
||||
color="901D77"
|
||||
icon={<ArrowRightOutlined />}
|
||||
handleSubmit={() => {
|
||||
Upimodel('Submit');
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
)}
|
||||
{addcustomer && (
|
||||
<FeaturesFunctionalities
|
||||
handleAddCustomerCancel={handleAddCustomerCancel}
|
||||
addcustomer={addcustomer}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
}
|
||||
/>
|
||||
)}
|
||||
{addcustomer && (
|
||||
<FeaturesFunctionalities
|
||||
handleAddCustomerCancel={handleAddCustomerCancel}
|
||||
addcustomer={addcustomer}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
</Suspense>
|
||||
);
|
||||
};
|
||||
export default SplitPayment;
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@ import {
|
|||
} from '../../Features/BrachLogin/BranchLogin.js';
|
||||
import RackForm from '../Rack/RackForm.jsx';
|
||||
import { isMobile } from 'react-device-detect';
|
||||
import BarCodeScan from '../../Services/BarCodeScan.jsx';
|
||||
const subDirectory = import.meta.env.ENV_BASE_URL;
|
||||
|
||||
const ProductForm = ({ formType }) => {
|
||||
|
|
@ -818,12 +819,19 @@ const ProductForm = ({ formType }) => {
|
|||
// dispatch(changeSetup_OfferValue(e?.target?.value))
|
||||
};
|
||||
const handleInput = async (val) => {
|
||||
if (val?.target?.value?.length >= 5) {
|
||||
// normalize whether we receive an event (e.target.value) or a raw string
|
||||
const inputVal = val && val.target && typeof val.target.value === 'string' ? val.target.value : val;
|
||||
if (!inputVal) return;
|
||||
|
||||
if (inputVal.length >= 5) {
|
||||
let QRCodeData = await dispatch(
|
||||
getQrcodeData({ QRCode: val?.target?.value })
|
||||
getQrcodeData({ QRCode: inputVal })
|
||||
).unwrap();
|
||||
|
||||
if (QRCodeData?.data?.statusCode == 0) {
|
||||
await setQrcodeFinalVal(val?.target?.value);
|
||||
// valid & unique - update component state and the form field
|
||||
setQrcodeFinalVal(inputVal);
|
||||
formRef.current?.setFieldsValue({ QRCode: inputVal });
|
||||
} else {
|
||||
let existsQrcodeData = QRCodeData?.data?.data?.filter(
|
||||
(item) =>
|
||||
|
|
@ -831,17 +839,18 @@ const ProductForm = ({ formType }) => {
|
|||
item.CompId === CompId &&
|
||||
item.BranchId === BranchId
|
||||
);
|
||||
|
||||
if (existsQrcodeData?.length > 0) {
|
||||
setQrcodeFinalVal(null);
|
||||
formRef.current?.setFieldsValue({ QRCode: null });
|
||||
setQrcodeExistsVal(existsQrcodeData?.[0]?.QRCode);
|
||||
|
||||
setMessageType('error');
|
||||
setMessageData('Qrcode Already Exists');
|
||||
} else {
|
||||
setQrcodeExistsData(QRCodeData.data?.data);
|
||||
setQrcodeExistsDataOpen(true);
|
||||
await setQrcodeFinalVal(val?.target?.value);
|
||||
setQrcodeFinalVal(inputVal);
|
||||
formRef.current?.setFieldsValue({ QRCode: inputVal });
|
||||
setQrcodeAuto('N');
|
||||
}
|
||||
}
|
||||
|
|
@ -2685,11 +2694,19 @@ const ProductForm = ({ formType }) => {
|
|||
autoComplete="off"
|
||||
label="Scanner / AddQrcode"
|
||||
onKeyPress={handleKeyPress}
|
||||
value={QrcodeFinalVal}
|
||||
valueData={QrcodeFinalVal}
|
||||
isOnChange={QrcodeFinalVal ? true : false}
|
||||
onChange={handleInput}
|
||||
disabled={editstate?.QRCode ? true : false}
|
||||
/>
|
||||
{isMobile &&
|
||||
<BarCodeScan
|
||||
onScan={(value) => {
|
||||
handleInput(value);
|
||||
}}
|
||||
/>
|
||||
}
|
||||
{QrcodeExistsVal && QrcodeExistsVal}
|
||||
</Form.Item>
|
||||
</div>
|
||||
|
|
@ -2904,6 +2921,7 @@ const ProductForm = ({ formType }) => {
|
|||
autoComplete="off"
|
||||
label="Scanner / AddOnePcQrcode"
|
||||
onKeyPress={handleKeyPressSingle}
|
||||
value={QrcodeSingleFinalVal}
|
||||
valueData={QrcodeSingleFinalVal}
|
||||
isOnChange={
|
||||
QrcodeSingleFinalVal ? true : false
|
||||
|
|
|
|||
11896
src/check.jsx
11896
src/check.jsx
File diff suppressed because it is too large
Load Diff
|
|
@ -684,7 +684,7 @@ const initSession = () => {
|
|||
|
||||
sessionStorage.setItem(
|
||||
'auth',
|
||||
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiOTM2MDY0MjI0NCIsIlBhc3N3b3JkIjoiWkB6MTIzNCIsImF1ZCI6WyJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTMiLCJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTIiLCJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTQiLCJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTMiXSwiZXhwIjoxNzcwOTIyMDEyLCJpc3MiOiJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMDEifQ.8iuEF8S7kW1OvVUda3YAx9v7ilp-uy9PVfbBvCPoq20'
|
||||
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiOTM2MDY0MjI0NCIsIlBhc3N3b3JkIjoiWkB6MTIzNCIsImF1ZCI6WyJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTMiLCJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTIiLCJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTQiLCJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMTMiXSwiZXhwIjoxNzcxODcyOTYwLCJpc3MiOiJodHRwOi8vMTkyLjE2OC4xLjM3OjgwMDEifQ.tRA41-3-m2VYm_jkndGPLzB-jxzuO1XvG94Fmf6NTGQ'
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue