Implement dynamic header and table color functionality
This commit is contained in:
commit
6a0f23c752
|
|
@ -2607,6 +2607,7 @@ const ThemeSlice = createSlice({
|
||||||
'UnpaidBill',
|
'UnpaidBill',
|
||||||
'OverallBackground',
|
'OverallBackground',
|
||||||
'CreditCustomer',
|
'CreditCustomer',
|
||||||
|
'PreviousBillFetch'
|
||||||
];
|
];
|
||||||
const bookingBillingOptionsArray = tempDic['BookingBilling'][1];
|
const bookingBillingOptionsArray = tempDic['BookingBilling'][1];
|
||||||
const sortedBillingOptions = desiredOrder
|
const sortedBillingOptions = desiredOrder
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,9 @@ import {
|
||||||
GlobalReorderProductDetails,
|
GlobalReorderProductDetails,
|
||||||
PreferenceData,
|
PreferenceData,
|
||||||
getConfigType,
|
getConfigType,
|
||||||
|
changefocusStatusCust,
|
||||||
|
changeCombofocus,
|
||||||
|
GlobalfocusStatusCust,
|
||||||
} from '../../../../../Features/BookingScreen/BookingData/BookingData';
|
} from '../../../../../Features/BookingScreen/BookingData/BookingData';
|
||||||
import { ArrowRightOutlined } from '@ant-design/icons';
|
import { ArrowRightOutlined } from '@ant-design/icons';
|
||||||
import { Messages } from '../../../../../Components/Notifications/Messages';
|
import { Messages } from '../../../../../Components/Notifications/Messages';
|
||||||
|
|
@ -66,13 +69,24 @@ const BSBillingEditQuantity = (props) => {
|
||||||
shallowEqual
|
shallowEqual
|
||||||
);
|
);
|
||||||
|
|
||||||
const overAllLimitPreferenece =
|
const overAllLimitPreferenece = preferenceDatas?.[0]?.[
|
||||||
preferenceDatas?.[0]?.['SettingDtlDetails']?.find(
|
'SettingDtlDetails'
|
||||||
(item) => (item.SettingIdName?.toLowerCase() === 'overalllimit') && item?.SettingValue === 'Y');
|
]?.find(
|
||||||
const itemWiseLimitPreferenece =
|
(item) =>
|
||||||
preferenceDatas?.[0]?.['SettingDtlDetails']?.find(
|
item.SettingIdName?.toLowerCase() === 'overalllimit' &&
|
||||||
(item) => item.SettingIdName?.toLowerCase() === 'itemwiselimit' && item?.SettingValue === 'Y');
|
item?.SettingValue === 'Y'
|
||||||
const maxQtyLimit = itemWiseLimitPreferenece?.SettingCount || overAllLimitPreferenece?.SettingCount || null;
|
);
|
||||||
|
const itemWiseLimitPreferenece = preferenceDatas?.[0]?.[
|
||||||
|
'SettingDtlDetails'
|
||||||
|
]?.find(
|
||||||
|
(item) =>
|
||||||
|
item.SettingIdName?.toLowerCase() === 'itemwiselimit' &&
|
||||||
|
item?.SettingValue === 'Y'
|
||||||
|
);
|
||||||
|
const maxQtyLimit =
|
||||||
|
itemWiseLimitPreferenece?.SettingCount ||
|
||||||
|
overAllLimitPreferenece?.SettingCount ||
|
||||||
|
null;
|
||||||
const preferenceOffer =
|
const preferenceOffer =
|
||||||
preferenceDatas?.[0]?.['SettingDtlDetails']?.find(
|
preferenceDatas?.[0]?.['SettingDtlDetails']?.find(
|
||||||
(item) => item.SettingIdName === 'Offer'
|
(item) => item.SettingIdName === 'Offer'
|
||||||
|
|
@ -86,7 +100,7 @@ const BSBillingEditQuantity = (props) => {
|
||||||
);
|
);
|
||||||
console.log(preferenceshortcutkey, 'preferenceshortcutkey');
|
console.log(preferenceshortcutkey, 'preferenceshortcutkey');
|
||||||
const [PriceChangeaccess, setPriceChangeaccess] = useState(true);
|
const [PriceChangeaccess, setPriceChangeaccess] = useState(true);
|
||||||
|
const selectStatuscust = useSelector(GlobalfocusStatusCust);
|
||||||
const [ConfigDataList, setConfigDataList] = useState([]);
|
const [ConfigDataList, setConfigDataList] = useState([]);
|
||||||
const [messageType, setMessageType] = useState(null);
|
const [messageType, setMessageType] = useState(null);
|
||||||
const [messageData, setMessageData] = useState(null);
|
const [messageData, setMessageData] = useState(null);
|
||||||
|
|
@ -115,7 +129,7 @@ const BSBillingEditQuantity = (props) => {
|
||||||
price: 'Price',
|
price: 'Price',
|
||||||
quantity: 'qty',
|
quantity: 'qty',
|
||||||
Parcel: 'Parcel',
|
Parcel: 'Parcel',
|
||||||
weightAmount: 'weightAmount'
|
weightAmount: 'weightAmount',
|
||||||
};
|
};
|
||||||
const [RadioBtnSelection, setRadioBtnSelection] = useState(() => {
|
const [RadioBtnSelection, setRadioBtnSelection] = useState(() => {
|
||||||
if (props?.shortKeyMethod && SHORTKEY_TO_RADIO[props.shortKeyMethod]) {
|
if (props?.shortKeyMethod && SHORTKEY_TO_RADIO[props.shortKeyMethod]) {
|
||||||
|
|
@ -343,7 +357,6 @@ const BSBillingEditQuantity = (props) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const calculateOverAllQty = (item, filterItems) => {
|
const calculateOverAllQty = (item, filterItems) => {
|
||||||
|
|
||||||
if (!item) return 0;
|
if (!item) return 0;
|
||||||
|
|
||||||
const totalUsedQty =
|
const totalUsedQty =
|
||||||
|
|
@ -446,11 +459,18 @@ const BSBillingEditQuantity = (props) => {
|
||||||
);
|
);
|
||||||
const editedProduct = CartOrderDetails[editedProductIndex];
|
const editedProduct = CartOrderDetails[editedProductIndex];
|
||||||
|
|
||||||
if ((overAllLimitPreferenece || itemWiseLimitPreferenece) && maxQtyLimit) {
|
if (
|
||||||
|
(overAllLimitPreferenece || itemWiseLimitPreferenece) &&
|
||||||
|
maxQtyLimit
|
||||||
|
) {
|
||||||
if (overAllLimitPreferenece) {
|
if (overAllLimitPreferenece) {
|
||||||
const calculatedOverAllQty = calculateOverAllQtyLimit(CartOrderDetails?.filter((_, index) => index !== editedProductIndex));
|
const calculatedOverAllQty = calculateOverAllQtyLimit(
|
||||||
if ((calculatedOverAllQty + editedQty) > maxQtyLimit) {
|
CartOrderDetails?.filter((_, index) => index !== editedProductIndex)
|
||||||
setMessageData(`Overall Quantity Limit Exceeds than ${maxQtyLimit}`);
|
);
|
||||||
|
if (calculatedOverAllQty + editedQty > maxQtyLimit) {
|
||||||
|
setMessageData(
|
||||||
|
`Overall Quantity Limit Exceeds than ${maxQtyLimit}`
|
||||||
|
);
|
||||||
setMessageType('warning');
|
setMessageType('warning');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -722,7 +742,8 @@ const BSBillingEditQuantity = (props) => {
|
||||||
newPrice,
|
newPrice,
|
||||||
overrideQty = null
|
overrideQty = null
|
||||||
) => {
|
) => {
|
||||||
const editedQty = overrideQty !== null
|
const editedQty =
|
||||||
|
overrideQty !== null
|
||||||
? overrideQty
|
? overrideQty
|
||||||
: props?.Productdata?.ScaleType !== 'weight'
|
: props?.Productdata?.ScaleType !== 'weight'
|
||||||
? parseInt(Quantity)
|
? parseInt(Quantity)
|
||||||
|
|
@ -3481,16 +3502,21 @@ const BSBillingEditQuantity = (props) => {
|
||||||
);
|
);
|
||||||
const editedProduct = {
|
const editedProduct = {
|
||||||
...CartOrderDetails[editedProductIndex],
|
...CartOrderDetails[editedProductIndex],
|
||||||
OrderQty: qty
|
OrderQty: qty,
|
||||||
};
|
};
|
||||||
|
|
||||||
await handleEditQuantity(editedProduct, editedProductIndex, editedProduct.OrderRate, qty);
|
await handleEditQuantity(
|
||||||
|
editedProduct,
|
||||||
|
editedProductIndex,
|
||||||
|
editedProduct.OrderRate,
|
||||||
|
qty
|
||||||
|
);
|
||||||
props.handleEditQuantityCancel();
|
props.handleEditQuantityCancel();
|
||||||
setClearQuantity(false);
|
setClearQuantity(false);
|
||||||
};
|
};
|
||||||
const isKg =
|
const isKg =
|
||||||
props?.Productdata?.Size == 1 &&
|
props?.Productdata?.Size == 1 &&
|
||||||
["KG", "KGS"].includes(props?.Productdata?.UomName?.toUpperCase());
|
['KG', 'KGS'].includes(props?.Productdata?.UomName?.toUpperCase());
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="BSBilling-EditQuantity-Modal">
|
<div className="BSBilling-EditQuantity-Modal">
|
||||||
|
|
@ -3589,7 +3615,8 @@ const BSBillingEditQuantity = (props) => {
|
||||||
Packing
|
Packing
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{isKg && (<button
|
{isKg && (
|
||||||
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className={
|
className={
|
||||||
RadioBtnSelection === 'weightAmount'
|
RadioBtnSelection === 'weightAmount'
|
||||||
|
|
@ -3599,13 +3626,19 @@ const BSBillingEditQuantity = (props) => {
|
||||||
onClick={() => onRadioBtnChange('weightAmount')}
|
onClick={() => onRadioBtnChange('weightAmount')}
|
||||||
>
|
>
|
||||||
Weight / Amount
|
Weight / Amount
|
||||||
</button>)}
|
</button>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{RadioBtnSelection == 'Quantity' && (
|
{RadioBtnSelection == 'Quantity' && (
|
||||||
<>
|
<>
|
||||||
<div className="EditQuantity-Quantity">
|
<div
|
||||||
|
className="EditQuantity-Quantity"
|
||||||
|
onBlur={() => {
|
||||||
|
dispatch(changefocusStatusCust(!selectStatuscust));
|
||||||
|
dispatch(changeCombofocus(false));
|
||||||
|
}}
|
||||||
|
>
|
||||||
<label className="EditQuantity-itemname">
|
<label className="EditQuantity-itemname">
|
||||||
Item Quantity:
|
Item Quantity:
|
||||||
</label>
|
</label>
|
||||||
|
|
@ -3614,6 +3647,10 @@ const BSBillingEditQuantity = (props) => {
|
||||||
type="number"
|
type="number"
|
||||||
value={Quantity}
|
value={Quantity}
|
||||||
onChange={(e) => setQuantity(e.target.value)}
|
onChange={(e) => setQuantity(e.target.value)}
|
||||||
|
onBlur={() => {
|
||||||
|
dispatch(changefocusStatusCust(!selectStatuscust));
|
||||||
|
dispatch(changeCombofocus(false));
|
||||||
|
}}
|
||||||
className="EditQuantity-Quantitybox"
|
className="EditQuantity-Quantitybox"
|
||||||
/>
|
/>
|
||||||
<button
|
<button
|
||||||
|
|
@ -3806,7 +3843,7 @@ const BSBillingEditQuantity = (props) => {
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{(RadioBtnSelection == 'weightAmount') && isKg && (
|
{RadioBtnSelection == 'weightAmount' && isKg && (
|
||||||
<>
|
<>
|
||||||
<WeightCalculatePrice
|
<WeightCalculatePrice
|
||||||
CartOrderDetails={CartOrderDetails}
|
CartOrderDetails={CartOrderDetails}
|
||||||
|
|
|
||||||
|
|
@ -3859,7 +3859,8 @@ export default function BST1Payment() {
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* Customer Orders */}
|
{/* Customer Orders */}
|
||||||
{SelCustId && (
|
{(SelCustId && tableOptions?.filter((item) => item.OptionName === 'PreviousBillFetch')
|
||||||
|
.length === 1) && (
|
||||||
<Tooltip title="Customer Orders" isMobile={isMobile}>
|
<Tooltip title="Customer Orders" isMobile={isMobile}>
|
||||||
{' '}
|
{' '}
|
||||||
<div
|
<div
|
||||||
|
|
|
||||||
|
|
@ -4178,7 +4178,8 @@ const BSBillingTable2 = () => {
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* Customer Orders */}
|
{/* Customer Orders */}
|
||||||
{SelCustId && (
|
{(SelCustId && tableOptions?.filter((item) => item.OptionName === 'PreviousBillFetch')
|
||||||
|
.length === 1) && (
|
||||||
<Tooltip title="Customer Orders" isMobile={isMobile}>
|
<Tooltip title="Customer Orders" isMobile={isMobile}>
|
||||||
{' '}
|
{' '}
|
||||||
<div
|
<div
|
||||||
|
|
|
||||||
|
|
@ -301,7 +301,39 @@ const BsBill2 = () => {
|
||||||
const calculatedOverAllQty = calculateOverAllQtyLimit(CartOrderDetails);
|
const calculatedOverAllQty = calculateOverAllQtyLimit(CartOrderDetails);
|
||||||
if (calculatedOverAllQty + 1 > maxQtyLimit) {
|
if (calculatedOverAllQty + 1 > maxQtyLimit) {
|
||||||
message.warning(`Overall Quantity Limit Exceeds than ${maxQtyLimit}`);
|
message.warning(`Overall Quantity Limit Exceeds than ${maxQtyLimit}`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else if (itemWiseLimitPreferenece) {
|
||||||
|
|
||||||
|
const inwardQtyMap = CartOrderDetails.reduce((acc, curr) => {
|
||||||
|
const inwardId = curr.InwardDtlId;
|
||||||
|
const qty = Number(curr.OrderQty) || 0;
|
||||||
|
|
||||||
|
if (acc[inwardId]) {
|
||||||
|
acc[inwardId] += qty;
|
||||||
|
} else {
|
||||||
|
acc[inwardId] = qty;
|
||||||
|
}
|
||||||
|
|
||||||
|
return acc;
|
||||||
|
}, {});
|
||||||
|
|
||||||
|
const currentInwardId = item?.InwardDtlId;
|
||||||
|
const addQty = 1;
|
||||||
|
|
||||||
|
if (inwardQtyMap[currentInwardId]) {
|
||||||
|
inwardQtyMap[currentInwardId] += addQty;
|
||||||
|
} else {
|
||||||
|
inwardQtyMap[currentInwardId] = addQty;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log("Final InwardDtlId Qty Map:", inwardQtyMap);
|
||||||
|
const isExceeded = Object.values(inwardQtyMap).some(
|
||||||
|
(qty) => qty > maxQtyLimit
|
||||||
|
);
|
||||||
|
|
||||||
|
if (isExceeded) {
|
||||||
|
message.warning(`Item Quantity Limit Exceeds than ${maxQtyLimit}`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,11 @@ const BSBillingTable3 = () => {
|
||||||
setting?.SettingIdName?.toLowerCase() === 'decimal' &&
|
setting?.SettingIdName?.toLowerCase() === 'decimal' &&
|
||||||
setting?.SettingValue === 'Y'
|
setting?.SettingValue === 'Y'
|
||||||
);
|
);
|
||||||
|
const salesaskiosk = preferenceDatas?.[0]?.SettingDtlDetails?.find(
|
||||||
|
(setting) =>
|
||||||
|
setting?.SettingIdName?.toLowerCase() === 'salespageaskiosk' &&
|
||||||
|
setting?.SettingValue === 'Y'
|
||||||
|
);
|
||||||
const SessionData = useSelector(StoredSessionData);
|
const SessionData = useSelector(StoredSessionData);
|
||||||
const BranchId = SessionData?.BranchId;
|
const BranchId = SessionData?.BranchId;
|
||||||
const AppId = SessionData?.AppId;
|
const AppId = SessionData?.AppId;
|
||||||
|
|
@ -366,8 +371,6 @@ const BSBillingTable3 = () => {
|
||||||
await dispatch(changeUnpaidData(false));
|
await dispatch(changeUnpaidData(false));
|
||||||
await dispatch(changeReorderHoldDetails({}));
|
await dispatch(changeReorderHoldDetails({}));
|
||||||
await dispatch(changeReorderProductDetails([]));
|
await dispatch(changeReorderProductDetails([]));
|
||||||
await dispatch(ChangeSelectedCustDisable(false));
|
|
||||||
await dispatch(changeSelectedOption(false));
|
|
||||||
await dispatch(changeBookingType(defaultBookingType || 'TakeAway'));
|
await dispatch(changeBookingType(defaultBookingType || 'TakeAway'));
|
||||||
// await dispatch(changeholddata([]))
|
// await dispatch(changeholddata([]))
|
||||||
await dispatch(changeOrderType());
|
await dispatch(changeOrderType());
|
||||||
|
|
@ -2357,7 +2360,7 @@ const BSBillingTable3 = () => {
|
||||||
fontSize: '16px',
|
fontSize: '16px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{tableData?.length > 0 ? (
|
{(tableData?.length > 0)? (
|
||||||
<Popconfirm
|
<Popconfirm
|
||||||
title="Delete the items"
|
title="Delete the items"
|
||||||
description="Are you sure you want to clear these items?"
|
description="Are you sure you want to clear these items?"
|
||||||
|
|
|
||||||
|
|
@ -215,6 +215,7 @@ import UpiPopover from '../StandardTable/Utils/UpiPopOver.jsx';
|
||||||
import MobileMultiPdfPrintTrigger from '../../UtillComponents/MobileMultiPdfPrintTrigger.jsx';
|
import MobileMultiPdfPrintTrigger from '../../UtillComponents/MobileMultiPdfPrintTrigger.jsx';
|
||||||
import { useDateStore } from '../../../../../Features/BookingScreen/BookingData/DateStore.js';
|
import { useDateStore } from '../../../../../Features/BookingScreen/BookingData/DateStore.js';
|
||||||
import BillingTableSkeleton from '../../../../../Components/Skeleton/BillingTableSkeleton.jsx';
|
import BillingTableSkeleton from '../../../../../Components/Skeleton/BillingTableSkeleton.jsx';
|
||||||
|
import CustomerMobileNumberModal from '../../BookingFunctionality/CustomerOTP.jsx';
|
||||||
const PaymentGatewayEmbedded = lazy(
|
const PaymentGatewayEmbedded = lazy(
|
||||||
() => import('../../UtillComponents/PaymentGatewayEmbedded.jsx')
|
() => import('../../UtillComponents/PaymentGatewayEmbedded.jsx')
|
||||||
);
|
);
|
||||||
|
|
@ -269,6 +270,7 @@ const BSBillingTable3Pay = () => {
|
||||||
const previousOrderOfferDetails = useSelector(
|
const previousOrderOfferDetails = useSelector(
|
||||||
GlobalPreviousOrderOfferDetails
|
GlobalPreviousOrderOfferDetails
|
||||||
);
|
);
|
||||||
|
const CustomerMobileNumber = useSelector(GlobalSelCustId, shallowEqual);
|
||||||
const AllPaymentOptions = useSelector(GlobalpaymentOptionData);
|
const AllPaymentOptions = useSelector(GlobalpaymentOptionData);
|
||||||
const FreeProdList = useSelector(GlobalFreeProdList);
|
const FreeProdList = useSelector(GlobalFreeProdList);
|
||||||
const offerAppliedProducts = useSelector(
|
const offerAppliedProducts = useSelector(
|
||||||
|
|
@ -301,6 +303,7 @@ const BSBillingTable3Pay = () => {
|
||||||
const FontFamily = useSelector(GlobalSelectedFont);
|
const FontFamily = useSelector(GlobalSelectedFont);
|
||||||
const GetCustId = useSelector(GlobalCustId);
|
const GetCustId = useSelector(GlobalCustId);
|
||||||
const SelCustId = useSelector(GlobalSelCustId);
|
const SelCustId = useSelector(GlobalSelCustId);
|
||||||
|
console.log(GetCustId, SelCustId, 'GetCustId, SelCustId');
|
||||||
const selOption = useSelector(GlobalSelOption);
|
const selOption = useSelector(GlobalSelOption);
|
||||||
const SelectedTableDetails = useSelector(GlobalSelectedTableDetails);
|
const SelectedTableDetails = useSelector(GlobalSelectedTableDetails);
|
||||||
const defaultBookingType = useSelector(GlobalDefaultBookingType);
|
const defaultBookingType = useSelector(GlobalDefaultBookingType);
|
||||||
|
|
@ -378,6 +381,17 @@ const BSBillingTable3Pay = () => {
|
||||||
const [PrintOrderDetails, setPrintOrderDetails] = useState([]);
|
const [PrintOrderDetails, setPrintOrderDetails] = useState([]);
|
||||||
const OrderCardDetail = useSelector(GlobalOrderCardDetails);
|
const OrderCardDetail = useSelector(GlobalOrderCardDetails);
|
||||||
const [customerPreviesOrders, setCustomerPreviesOrders] = useState(false);
|
const [customerPreviesOrders, setCustomerPreviesOrders] = useState(false);
|
||||||
|
const [CustomerOtpmodalopen, setCustomerOtpmodalopen] = useState(false);
|
||||||
|
const isOtpEnabled = SettingDataSelector?.[0]?.SettingDtlDetails?.find(
|
||||||
|
(setting) =>
|
||||||
|
setting?.SettingIdName?.toLowerCase() === 'kioskotp' &&
|
||||||
|
setting?.SettingValue === 'Y'
|
||||||
|
);
|
||||||
|
const salesaskiosk = SettingDataSelector?.[0]?.SettingDtlDetails?.find(
|
||||||
|
(setting) =>
|
||||||
|
setting?.SettingIdName?.toLowerCase() === 'salespageaskiosk' &&
|
||||||
|
setting?.SettingValue === 'Y'
|
||||||
|
);
|
||||||
|
|
||||||
console.log(OrderCardDetail, 'OrderCardDetail');
|
console.log(OrderCardDetail, 'OrderCardDetail');
|
||||||
//Total calculation
|
//Total calculation
|
||||||
|
|
@ -707,6 +721,10 @@ const BSBillingTable3Pay = () => {
|
||||||
// dispatch(getPrintSelectionComponentData(Data1)).unwrap();
|
// dispatch(getPrintSelectionComponentData(Data1)).unwrap();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
(!CustomerMobileNumber && isOtpEnabled && salesaskiosk) && setCustomerOtpmodalopen(true);
|
||||||
|
}, [PrintOrderDetails, CustomerMobileNumber]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const getPrintData = async () => {
|
const getPrintData = async () => {
|
||||||
try {
|
try {
|
||||||
|
|
@ -875,7 +893,7 @@ const BSBillingTable3Pay = () => {
|
||||||
//mohan end
|
//mohan end
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (OrderCardDetail?.length <= 0) {
|
if (OrderCardDetail?.length <= 0 && !salesaskiosk) {
|
||||||
dispatch(changeCustomerID(null));
|
dispatch(changeCustomerID(null));
|
||||||
dispatch(changeSelectedCustId(null));
|
dispatch(changeSelectedCustId(null));
|
||||||
dispatch(changeSelectedOption(null));
|
dispatch(changeSelectedOption(null));
|
||||||
|
|
@ -1072,9 +1090,9 @@ const BSBillingTable3Pay = () => {
|
||||||
setDefaultPaymentMode([]);
|
setDefaultPaymentMode([]);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (salesBillEdit) {
|
// if (salesBillEdit) {
|
||||||
setDefaultPaymentOption();
|
setDefaultPaymentOption();
|
||||||
}
|
// }
|
||||||
}, [defaultPaymentTrigger, salesBillEdit]);
|
}, [defaultPaymentTrigger, salesBillEdit]);
|
||||||
|
|
||||||
const TokenPrint = async (index) => {
|
const TokenPrint = async (index) => {
|
||||||
|
|
@ -3791,7 +3809,8 @@ const BSBillingTable3Pay = () => {
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{/* Customer Orders */}
|
{/* Customer Orders */}
|
||||||
{SelCustId && (
|
{(SelCustId && tableOptions?.filter((item) => item.OptionName === 'PreviousBillFetch')
|
||||||
|
.length === 1) && (
|
||||||
<Tooltip title="Customer Orders" isMobile={isMobile}>
|
<Tooltip title="Customer Orders" isMobile={isMobile}>
|
||||||
{' '}
|
{' '}
|
||||||
<div
|
<div
|
||||||
|
|
@ -4917,6 +4936,13 @@ const BSBillingTable3Pay = () => {
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{(CustomerOtpmodalopen && isOtpEnabled && salesaskiosk) && (
|
||||||
|
<CustomerMobileNumberModal
|
||||||
|
open={CustomerOtpmodalopen}
|
||||||
|
HandleCloseModal={() => setCustomerOtpmodalopen(false)}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
</Suspense>
|
</Suspense>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -3920,7 +3920,8 @@ const BSBilling4Payment = () => {
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* Customer Orders */}
|
{/* Customer Orders */}
|
||||||
{SelCustId && (
|
{(SelCustId && tableOptions?.filter((item) => item.OptionName === 'PreviousBillFetch')
|
||||||
|
.length === 1) && (
|
||||||
<Tooltip title="Customer Orders" isMobile={isMobile}>
|
<Tooltip title="Customer Orders" isMobile={isMobile}>
|
||||||
{' '}
|
{' '}
|
||||||
<div
|
<div
|
||||||
|
|
|
||||||
|
|
@ -198,14 +198,12 @@ import CardPopover from '../StandardTable/Utils/CardPopover.jsx';
|
||||||
import UpiPopover from '../StandardTable/Utils/UpiPopOver.jsx';
|
import UpiPopover from '../StandardTable/Utils/UpiPopOver.jsx';
|
||||||
import { useDateStore } from '../../../../../Features/BookingScreen/BookingData/DateStore.js';
|
import { useDateStore } from '../../../../../Features/BookingScreen/BookingData/DateStore.js';
|
||||||
import BillingTableSkeleton from '../../../../../Components/Skeleton/BillingTableSkeleton.jsx';
|
import BillingTableSkeleton from '../../../../../Components/Skeleton/BillingTableSkeleton.jsx';
|
||||||
|
import OtherServiceMobilePrint from '../../BookingFunctionality/OtherServiceMobilePrint.jsx';
|
||||||
// Jsx Files
|
// Jsx Files
|
||||||
const OtherServicePrintStyle1 = lazy(
|
const OtherServicePrintStyle1 = lazy(
|
||||||
() =>
|
() =>
|
||||||
import('../../../PrintTemplates/ThermalPrinter/OtherServicePrintStyle1.jsx')
|
import('../../../PrintTemplates/ThermalPrinter/OtherServicePrintStyle1.jsx')
|
||||||
);
|
);
|
||||||
const OtherServiceMobilePrint = lazy(
|
|
||||||
() => import('../../BookingFunctionality/OtherServiceMobilePrint.jsx')
|
|
||||||
);
|
|
||||||
const BSOtherServiceClaim = lazy(
|
const BSOtherServiceClaim = lazy(
|
||||||
() => import('../../UtillComponents/BSOtherServiceClaim.jsx')
|
() => import('../../UtillComponents/BSOtherServiceClaim.jsx')
|
||||||
);
|
);
|
||||||
|
|
@ -4165,7 +4163,8 @@ const BSBillingTable5 = () => {
|
||||||
''
|
''
|
||||||
)}
|
)}
|
||||||
{/* Customer Orders */}
|
{/* Customer Orders */}
|
||||||
{SelCustId && (
|
{(SelCustId && tableOptions?.filter((item) => item.OptionName === 'PreviousBillFetch')
|
||||||
|
.length === 1) && (
|
||||||
<Tooltip title="Customer Orders" isMobile={isMobile}>
|
<Tooltip title="Customer Orders" isMobile={isMobile}>
|
||||||
{' '}
|
{' '}
|
||||||
<div
|
<div
|
||||||
|
|
|
||||||
|
|
@ -2161,6 +2161,39 @@ const BsBill = () => {
|
||||||
setMessageType('warning');
|
setMessageType('warning');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
} else if (itemWiseLimitPreferenece) {
|
||||||
|
const inwardQtyMap = TableData.reduce((acc, curr) => {
|
||||||
|
const inwardId = curr?.InwardDtlId;
|
||||||
|
const qty = Number(curr?.OrderQty) || 0;
|
||||||
|
|
||||||
|
if (acc[inwardId]) {
|
||||||
|
acc[inwardId] += qty;
|
||||||
|
} else {
|
||||||
|
acc[inwardId] = qty;
|
||||||
|
}
|
||||||
|
|
||||||
|
return acc;
|
||||||
|
}, {});
|
||||||
|
|
||||||
|
const currentInwardId = item?.InwardDtlId;
|
||||||
|
const addQty = 1;
|
||||||
|
|
||||||
|
if (inwardQtyMap[currentInwardId]) {
|
||||||
|
inwardQtyMap[currentInwardId] += addQty;
|
||||||
|
} else {
|
||||||
|
inwardQtyMap[currentInwardId] = addQty;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log("Final InwardDtlId Qty Map:", inwardQtyMap);
|
||||||
|
const isExceeded = Object.values(inwardQtyMap).some(
|
||||||
|
(qty) => qty > maxQtyLimit
|
||||||
|
);
|
||||||
|
|
||||||
|
if (isExceeded) {
|
||||||
|
setMessageData(`Item Quantity Limit Exceeds than ${maxQtyLimit}`);
|
||||||
|
setMessageType('warning');
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const OtherOrderDatas = TableData?.filter(
|
const OtherOrderDatas = TableData?.filter(
|
||||||
|
|
|
||||||
|
|
@ -4152,7 +4152,8 @@ const BST6Payment = () => {
|
||||||
''
|
''
|
||||||
)}
|
)}
|
||||||
{/* Customer Orders */}
|
{/* Customer Orders */}
|
||||||
{SelCustId && (
|
{(SelCustId && tableOptions?.filter((item) => item.OptionName === 'PreviousBillFetch')
|
||||||
|
.length === 1) && (
|
||||||
<Tooltip title="Customer Orders" isMobile={isMobile}>
|
<Tooltip title="Customer Orders" isMobile={isMobile}>
|
||||||
{' '}
|
{' '}
|
||||||
<div
|
<div
|
||||||
|
|
|
||||||
|
|
@ -3651,7 +3651,8 @@ const BSBilling7Payment = () => {
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* Customer Orders */}
|
{/* Customer Orders */}
|
||||||
{SelCustId && (
|
{(SelCustId && tableOptions?.filter((item) => item.OptionName === 'PreviousBillFetch')
|
||||||
|
.length === 1) && (
|
||||||
<Tooltip title="Customer Orders" isMobile={isMobile}>
|
<Tooltip title="Customer Orders" isMobile={isMobile}>
|
||||||
{' '}
|
{' '}
|
||||||
<div
|
<div
|
||||||
|
|
|
||||||
|
|
@ -11,17 +11,21 @@ import { InputField } from '../../../../../Components/Forms/InputField';
|
||||||
import {
|
import {
|
||||||
GlobalOrderCardDetails,
|
GlobalOrderCardDetails,
|
||||||
changeOrderCardDetails,
|
changeOrderCardDetails,
|
||||||
|
changefocusStatusCust,
|
||||||
|
changeCombofocus,
|
||||||
|
GlobalfocusStatusCust,
|
||||||
} from '../../../../../Features/BookingScreen/BookingData/BookingData';
|
} from '../../../../../Features/BookingScreen/BookingData/BookingData';
|
||||||
import { useDispatch, useSelector } from 'react-redux';
|
import { useDispatch, useSelector } from 'react-redux';
|
||||||
import { validateSafeInput } from '../../../../../Services/Others';
|
import { validateSafeInput } from '../../../../../Services/Others';
|
||||||
import { TextAreaInput } from '../../../../../../ownLib/my-ui-lib';
|
import { TextAreaInput } from '../../../../../../ownLib/my-ui-lib';
|
||||||
import "../../../../../Styles/BookingScreen/Components/BSBillingTables/BSBillingEditQuantity/BSBillingEditQuantity.scss"
|
import '../../../../../Styles/BookingScreen/Components/BSBillingTables/BSBillingEditQuantity/BSBillingEditQuantity.scss';
|
||||||
const BSImeiDetails = (props) => {
|
const BSImeiDetails = (props) => {
|
||||||
const formRef = useRef(null);
|
const formRef = useRef(null);
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const [messageType, setMessageType] = useState(null);
|
const [messageType, setMessageType] = useState(null);
|
||||||
const [messageData, setMessageData] = useState(null);
|
const [messageData, setMessageData] = useState(null);
|
||||||
const CartOrderDetails = useSelector(GlobalOrderCardDetails);
|
const CartOrderDetails = useSelector(GlobalOrderCardDetails);
|
||||||
|
const selectStatuscust = useSelector(GlobalfocusStatusCust);
|
||||||
const [DeviceDetailOpen, setDeviceDetailOpen] = useState(props.DeviceDetails);
|
const [DeviceDetailOpen, setDeviceDetailOpen] = useState(props.DeviceDetails);
|
||||||
const [ProductDetail, setProductDetail] = useState(props.ProductDetail);
|
const [ProductDetail, setProductDetail] = useState(props.ProductDetail);
|
||||||
const [RadioBtnSelection, setRadioBtnSelection] = useState('Serial');
|
const [RadioBtnSelection, setRadioBtnSelection] = useState('Serial');
|
||||||
|
|
@ -51,8 +55,8 @@ const BSImeiDetails = (props) => {
|
||||||
);
|
);
|
||||||
|
|
||||||
formRef?.current?.setFieldsValue({
|
formRef?.current?.setFieldsValue({
|
||||||
description: productidentifier?.[0]?.Description || "",
|
description: productidentifier?.[0]?.Description || '',
|
||||||
})
|
});
|
||||||
}, []);
|
}, []);
|
||||||
const CloseDeviceDetailModal = () => {
|
const CloseDeviceDetailModal = () => {
|
||||||
props.handleDeviceDetailClose();
|
props.handleDeviceDetailClose();
|
||||||
|
|
@ -72,8 +76,7 @@ const BSImeiDetails = (props) => {
|
||||||
} else {
|
} else {
|
||||||
setSerialNumberList([...SerialNumberList, e]);
|
setSerialNumberList([...SerialNumberList, e]);
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
setMessageType('error');
|
setMessageType('error');
|
||||||
setMessageData('Already Selected ');
|
setMessageData('Already Selected ');
|
||||||
}
|
}
|
||||||
|
|
@ -94,7 +97,6 @@ const BSImeiDetails = (props) => {
|
||||||
setMessageData('you cant enter more than Order Qty');
|
setMessageData('you cant enter more than Order Qty');
|
||||||
}
|
}
|
||||||
formRef.current?.resetFields(['SerialNumbertext', 'IMEINumbertext']);
|
formRef.current?.resetFields(['SerialNumbertext', 'IMEINumbertext']);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const IMEINumberOnchange = (e) => {
|
const IMEINumberOnchange = (e) => {
|
||||||
|
|
@ -139,8 +141,10 @@ const BSImeiDetails = (props) => {
|
||||||
setMessageType(null);
|
setMessageType(null);
|
||||||
}, []);
|
}, []);
|
||||||
const AddDeviceDetails = () => {
|
const AddDeviceDetails = () => {
|
||||||
|
console.log(
|
||||||
console.log(formRef?.current?.getFieldsValue, "formRef?.current?.getFieldsValue")
|
formRef?.current?.getFieldsValue,
|
||||||
|
'formRef?.current?.getFieldsValue'
|
||||||
|
);
|
||||||
const maxLength = Math.max(SerialNumberList.length, IMEINumberList.length);
|
const maxLength = Math.max(SerialNumberList.length, IMEINumberList.length);
|
||||||
// Create the new object array
|
// Create the new object array
|
||||||
const IdentifyDetails = Array.from({ length: maxLength }, (_, index) => {
|
const IdentifyDetails = Array.from({ length: maxLength }, (_, index) => {
|
||||||
|
|
@ -173,9 +177,8 @@ const BSImeiDetails = (props) => {
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
formRef?.current?.resetFields()
|
formRef?.current?.resetFields();
|
||||||
CloseDeviceDetailModal();
|
CloseDeviceDetailModal();
|
||||||
|
|
||||||
};
|
};
|
||||||
console.log(ProductDetail, 'ProductDetaildevice');
|
console.log(ProductDetail, 'ProductDetaildevice');
|
||||||
return (
|
return (
|
||||||
|
|
@ -239,7 +242,7 @@ const BSImeiDetails = (props) => {
|
||||||
{RadioBtnSelection == 'Serial' && (
|
{RadioBtnSelection == 'Serial' && (
|
||||||
<div>
|
<div>
|
||||||
<div className="SerialNumberColumn">
|
<div className="SerialNumberColumn">
|
||||||
{ProductDetail?.FullProductIdentifierDtls?.length > 0 &&
|
{ProductDetail?.FullProductIdentifierDtls?.length > 0 && (
|
||||||
<Form.Item name="SerialNumber">
|
<Form.Item name="SerialNumber">
|
||||||
<DropDowns
|
<DropDowns
|
||||||
options={ProductDetail?.FullProductIdentifierDtls?.filter(
|
options={ProductDetail?.FullProductIdentifierDtls?.filter(
|
||||||
|
|
@ -260,20 +263,24 @@ const BSImeiDetails = (props) => {
|
||||||
onChangeFunction={(e) => SerialNumberOnchange(e)}
|
onChangeFunction={(e) => SerialNumberOnchange(e)}
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
)}
|
||||||
}
|
|
||||||
|
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name="SerialNumbertext"
|
name="SerialNumbertext"
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
validator: async (_, value) => {
|
validator: async (_, value) => {
|
||||||
|
|
||||||
await validateSafeInput(value);
|
await validateSafeInput(value);
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
onBlur={() => {
|
||||||
|
dispatch(changefocusStatusCust(!selectStatuscust));
|
||||||
|
dispatch(changeCombofocus(false));
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<InputField
|
<InputField
|
||||||
field="SerialNumbertext"
|
field="SerialNumbertext"
|
||||||
|
|
@ -283,12 +290,12 @@ const BSImeiDetails = (props) => {
|
||||||
fieldApi={true}
|
fieldApi={true}
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
type="text"
|
type="text"
|
||||||
// onKeyDown={(e) => {
|
onBlur={() => {
|
||||||
// if (['e', 'E', '+', '-', '.'].includes(e.key)) {
|
dispatch(changefocusStatusCust(!selectStatuscust));
|
||||||
// e.preventDefault();
|
dispatch(changeCombofocus(false));
|
||||||
// }
|
}}
|
||||||
// }}
|
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Buttons
|
<Buttons
|
||||||
buttonText="Add"
|
buttonText="Add"
|
||||||
|
|
@ -315,11 +322,10 @@ const BSImeiDetails = (props) => {
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
||||||
{RadioBtnSelection == 'IMEI' && (
|
{RadioBtnSelection == 'IMEI' && (
|
||||||
<div>
|
<div>
|
||||||
<div className="SerialNumberColumn">
|
<div className="SerialNumberColumn">
|
||||||
{ProductDetail?.FullProductIdentifierDtls?.length > 0 &&
|
{ProductDetail?.FullProductIdentifierDtls?.length > 0 && (
|
||||||
<Form.Item name="IMEINumber">
|
<Form.Item name="IMEINumber">
|
||||||
<DropDowns
|
<DropDowns
|
||||||
options={ProductDetail?.FullProductIdentifierDtls?.filter(
|
options={ProductDetail?.FullProductIdentifierDtls?.filter(
|
||||||
|
|
@ -342,19 +348,25 @@ const BSImeiDetails = (props) => {
|
||||||
className="field-DropDown"
|
className="field-DropDown"
|
||||||
onChangeFunction={(e) => IMEINumberOnchange(e)}
|
onChangeFunction={(e) => IMEINumberOnchange(e)}
|
||||||
/>
|
/>
|
||||||
</Form.Item>}
|
</Form.Item>
|
||||||
|
)}
|
||||||
|
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name="IMEINumbertext"
|
name="IMEINumbertext"
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
validator: async (_, value) => {
|
validator: async (_, value) => {
|
||||||
|
|
||||||
await validateSafeInput(value);
|
await validateSafeInput(value);
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
onBlur={() => {
|
||||||
|
dispatch(changefocusStatusCust(!selectStatuscust));
|
||||||
|
dispatch(changeCombofocus(false));
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<InputField
|
<InputField
|
||||||
field="IMEINumbertext"
|
field="IMEINumbertext"
|
||||||
|
|
@ -364,12 +376,12 @@ const BSImeiDetails = (props) => {
|
||||||
fieldApi={true}
|
fieldApi={true}
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
type="text"
|
type="text"
|
||||||
// onKeyDown={(e) => {
|
onBlur={() => {
|
||||||
// if (['e', 'E', '+', '-', '.'].includes(e.key)) {
|
dispatch(changefocusStatusCust(!selectStatuscust));
|
||||||
// e.preventDefault();
|
dispatch(changeCombofocus(false));
|
||||||
// }
|
}}
|
||||||
// }}
|
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Buttons
|
<Buttons
|
||||||
buttonText="Add"
|
buttonText="Add"
|
||||||
|
|
@ -395,12 +407,12 @@ const BSImeiDetails = (props) => {
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div style={{ display: "flex", marginTop: "10px" }}>
|
<div style={{ display: 'flex', marginTop: '10px' }}>
|
||||||
<Form.Item name="description">
|
<Form.Item name="description">
|
||||||
<TextAreaInput
|
<TextAreaInput
|
||||||
disabled={
|
disabled={
|
||||||
(IMEINumberList?.length === 0) &&
|
IMEINumberList?.length === 0 &&
|
||||||
(SerialNumberList?.length === 0)
|
SerialNumberList?.length === 0
|
||||||
}
|
}
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
label={<label>Description..</label>}
|
label={<label>Description..</label>}
|
||||||
|
|
@ -411,7 +423,6 @@ const BSImeiDetails = (props) => {
|
||||||
</div>
|
</div>
|
||||||
</Form>
|
</Form>
|
||||||
|
|
||||||
|
|
||||||
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
|
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
|
||||||
<Buttons
|
<Buttons
|
||||||
buttonText="Submit"
|
buttonText="Submit"
|
||||||
|
|
|
||||||
|
|
@ -198,13 +198,9 @@ const CustomerOrders = lazy(
|
||||||
const PaymentGatewayEmbedded = lazy(
|
const PaymentGatewayEmbedded = lazy(
|
||||||
() => import('../../UtillComponents/PaymentGatewayEmbedded.jsx')
|
() => import('../../UtillComponents/PaymentGatewayEmbedded.jsx')
|
||||||
);
|
);
|
||||||
const MobileMultiPdfPrintTrigger = lazy(
|
import MobileMultiPdfPrintTrigger from '../../UtillComponents/MobileMultiPdfPrintTrigger.jsx';
|
||||||
() => import('../../UtillComponents/MobileMultiPdfPrintTrigger.jsx')
|
import OtherServicePrintStyle1 from '../../../PrintTemplates/ThermalPrinter/OtherServicePrintStyle1.jsx';
|
||||||
);
|
|
||||||
const OtherServicePrintStyle1 = lazy(
|
|
||||||
() =>
|
|
||||||
import('../../../PrintTemplates/ThermalPrinter/OtherServicePrintStyle1.jsx')
|
|
||||||
);
|
|
||||||
import OtherServiceMobilePrint from '../../BookingFunctionality/OtherServiceMobilePrint.jsx';
|
import OtherServiceMobilePrint from '../../BookingFunctionality/OtherServiceMobilePrint.jsx';
|
||||||
|
|
||||||
const QrinScreen = lazy(
|
const QrinScreen = lazy(
|
||||||
|
|
@ -215,9 +211,8 @@ const SMSShare = lazy(() => import('../../../../WhatsAppShare/SmsShare'));
|
||||||
const WhatsAppShare = lazy(
|
const WhatsAppShare = lazy(
|
||||||
() => import('../../../../WhatsAppShare/whatsAppShare')
|
() => import('../../../../WhatsAppShare/whatsAppShare')
|
||||||
);
|
);
|
||||||
const TokensinglePrint = lazy(
|
|
||||||
() => import('../../../../paymentpdfPage/TokenOnlyPrints/TokeninsinglePrint')
|
import TokensinglePrint from '../../../../paymentpdfPage/TokenOnlyPrints/TokeninsinglePrint';
|
||||||
);
|
|
||||||
import { useApplyOfferto_CardDetail } from '../../UtillComponents/BSNavBarOffer/BSNavBarOffer_CustomHooks.jsx';
|
import { useApplyOfferto_CardDetail } from '../../UtillComponents/BSNavBarOffer/BSNavBarOffer_CustomHooks.jsx';
|
||||||
|
|
||||||
// Icons File
|
// Icons File
|
||||||
|
|
@ -2840,7 +2835,10 @@ const StandardTablePayment = () => {
|
||||||
setPaybtnselected(PaymentOptionsModeId);
|
setPaybtnselected(PaymentOptionsModeId);
|
||||||
setQrCode(false);
|
setQrCode(false);
|
||||||
setUpinotSelected(false);
|
setUpinotSelected(false);
|
||||||
if (holdCheckedSalesSetup || NavBarOptions?.some((e) => e?.OptionName == 'Hold')) {
|
if (
|
||||||
|
holdCheckedSalesSetup ||
|
||||||
|
NavBarOptions?.some((e) => e?.OptionName == 'Hold')
|
||||||
|
) {
|
||||||
getHolddata();
|
getHolddata();
|
||||||
}
|
}
|
||||||
setCurrentOrderNetAmount(0);
|
setCurrentOrderNetAmount(0);
|
||||||
|
|
@ -3527,7 +3525,8 @@ const StandardTablePayment = () => {
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* Customer Orders */}
|
{/* Customer Orders */}
|
||||||
{SelCustId && (
|
{(SelCustId && tableOptions?.filter((item) => item.OptionName === 'PreviousBillFetch')
|
||||||
|
.length === 1) && (
|
||||||
<Tooltip title="Customer Orders" isMobile={isMobile}>
|
<Tooltip title="Customer Orders" isMobile={isMobile}>
|
||||||
{' '}
|
{' '}
|
||||||
<div
|
<div
|
||||||
|
|
|
||||||
|
|
@ -4403,7 +4403,8 @@ const BSC1Payment = (props) => {
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{/* Customer Orders */}
|
{/* Customer Orders */}
|
||||||
{SelCustId && (
|
{(SelCustId && tableOptions?.filter((item) => item.OptionName === 'PreviousBillFetch')
|
||||||
|
.length === 1) && (
|
||||||
<Tooltip title="Customer Orders" isMobile={isMobile}>
|
<Tooltip title="Customer Orders" isMobile={isMobile}>
|
||||||
{' '}
|
{' '}
|
||||||
<div
|
<div
|
||||||
|
|
|
||||||
|
|
@ -2851,6 +2851,40 @@ export default function BSC1Search(props) {
|
||||||
setMessageType('warning');
|
setMessageType('warning');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
} else if (itemWiseLimitPreferenece) {
|
||||||
|
|
||||||
|
const inwardQtyMap = CartOrderDetails.reduce((acc, curr) => {
|
||||||
|
const inwardId = curr?.InwardDtlId;
|
||||||
|
const qty = Number(curr?.OrderQty) || 0;
|
||||||
|
|
||||||
|
if (acc[inwardId]) {
|
||||||
|
acc[inwardId] += qty;
|
||||||
|
} else {
|
||||||
|
acc[inwardId] = qty;
|
||||||
|
}
|
||||||
|
|
||||||
|
return acc;
|
||||||
|
}, {});
|
||||||
|
|
||||||
|
const currentInwardId = item?.InwardDtlId;
|
||||||
|
const addQty = 1;
|
||||||
|
|
||||||
|
if (inwardQtyMap[currentInwardId]) {
|
||||||
|
inwardQtyMap[currentInwardId] += addQty;
|
||||||
|
} else {
|
||||||
|
inwardQtyMap[currentInwardId] = addQty;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log("Final InwardDtlId Qty Map:", inwardQtyMap);
|
||||||
|
const isExceeded = Object.values(inwardQtyMap).some(
|
||||||
|
(qty) => qty > maxQtyLimit
|
||||||
|
);
|
||||||
|
|
||||||
|
if (isExceeded) {
|
||||||
|
setMessageData(`Item Quantity Limit Exceeds than ${maxQtyLimit}`);
|
||||||
|
setMessageType('warning');
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2100,6 +2100,39 @@ const BSItemCard = (props) => {
|
||||||
setMessageType('warning');
|
setMessageType('warning');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
} else if (itemWiseLimitPreferenece) {
|
||||||
|
const inwardQtyMap = CartOrderDetails.reduce((acc, curr) => {
|
||||||
|
const inwardId = curr?.InwardDtlId;
|
||||||
|
const qty = Number(curr?.OrderQty) || 0;
|
||||||
|
|
||||||
|
if (acc[inwardId]) {
|
||||||
|
acc[inwardId] += qty;
|
||||||
|
} else {
|
||||||
|
acc[inwardId] = qty;
|
||||||
|
}
|
||||||
|
|
||||||
|
return acc;
|
||||||
|
}, {});
|
||||||
|
|
||||||
|
const currentInwardId = item?.InwardDtlId;
|
||||||
|
const addQty = Qty || 1;
|
||||||
|
|
||||||
|
if (inwardQtyMap[currentInwardId]) {
|
||||||
|
inwardQtyMap[currentInwardId] += addQty;
|
||||||
|
} else {
|
||||||
|
inwardQtyMap[currentInwardId] = addQty;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log('Final InwardDtlId Qty Map:', inwardQtyMap);
|
||||||
|
const isExceeded = Object.values(inwardQtyMap).some(
|
||||||
|
(qty) => qty > maxQtyLimit
|
||||||
|
);
|
||||||
|
|
||||||
|
if (isExceeded) {
|
||||||
|
setMessageData(`Item Quantity Limit Exceeds than ${maxQtyLimit}`);
|
||||||
|
setMessageType('warning');
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -157,6 +157,7 @@ import { FaParking } from 'react-icons/fa';
|
||||||
import { isMobile } from 'react-device-detect';
|
import { isMobile } from 'react-device-detect';
|
||||||
import { DefaultModal } from '../../../../Components/Modal/DefaultModal.jsx';
|
import { DefaultModal } from '../../../../Components/Modal/DefaultModal.jsx';
|
||||||
import '../../../../Styles/BookingScreen/Components/BSNavbar/BSNavbar1.scss';
|
import '../../../../Styles/BookingScreen/Components/BSNavbar/BSNavbar1.scss';
|
||||||
|
import { RiFullscreenExitFill, RiFullscreenFill } from 'react-icons/ri';
|
||||||
|
|
||||||
const subDirectory = import.meta.env.ENV_BASE_URL;
|
const subDirectory = import.meta.env.ENV_BASE_URL;
|
||||||
const commonUrl = import.meta.env.ENV_COMMON_BASE_URL;
|
const commonUrl = import.meta.env.ENV_COMMON_BASE_URL;
|
||||||
|
|
@ -263,6 +264,30 @@ const BSNavbar1 = (props) => {
|
||||||
setAccIsOpen(false);
|
setAccIsOpen(false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
const [isFullscreen, setIsFullscreen] = useState(false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const handleFullscreen = useCallback(async () => {
|
||||||
|
if (!isFullscreen) {
|
||||||
|
try {
|
||||||
|
await document.documentElement.requestFullscreen();
|
||||||
|
setIsFullscreen(true);
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Fullscreen error:', error);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
if (document.fullscreenElement) {
|
||||||
|
await document.exitFullscreen();
|
||||||
|
}
|
||||||
|
setIsFullscreen(false);
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Exit fullscreen error:', error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, [isFullscreen]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!FeatureAddonData?.FeatureDtls?.length) return;
|
if (!FeatureAddonData?.FeatureDtls?.length) return;
|
||||||
|
|
||||||
|
|
@ -967,6 +992,20 @@ const BSNavbar1 = (props) => {
|
||||||
{formattedDate}
|
{formattedDate}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<Tooltip title={isFullscreen ? 'Exit Full Screen' : 'Full Screen'}>
|
||||||
|
<div
|
||||||
|
className={
|
||||||
|
isFullscreen
|
||||||
|
? 'BsNavbar1FullScreenExit'
|
||||||
|
: 'BsNavbar1FullScreen'
|
||||||
|
}
|
||||||
|
onClick={handleFullscreen}
|
||||||
|
>
|
||||||
|
{isFullscreen ? <RiFullscreenExitFill /> : <RiFullscreenFill />}
|
||||||
|
</div>
|
||||||
|
</Tooltip>
|
||||||
|
|
||||||
<TooltipWrapper title="User Profile" isMobile={isMobile}>
|
<TooltipWrapper title="User Profile" isMobile={isMobile}>
|
||||||
<div className="UserProfile">
|
<div className="UserProfile">
|
||||||
<PozoUserIcon onClick={UserAcc} />
|
<PozoUserIcon onClick={UserAcc} />
|
||||||
|
|
|
||||||
|
|
@ -128,8 +128,8 @@ const FeaturesFunctionalities = lazy(
|
||||||
const BSCustomerSelect = lazy(
|
const BSCustomerSelect = lazy(
|
||||||
() => import('../UtillComponents/BSSelectCustomer.jsx')
|
() => import('../UtillComponents/BSSelectCustomer.jsx')
|
||||||
);
|
);
|
||||||
// Scss
|
|
||||||
import '../../../../Styles/BookingScreen/Components/BSNavbar/BSNavbar2.scss';
|
import '../../../../Styles/BookingScreen/Components/BSNavbar/BSNavbar2.scss';
|
||||||
|
import { RiFullscreenExitFill, RiFullscreenFill } from 'react-icons/ri';
|
||||||
|
|
||||||
const subDirectory = import.meta.env.ENV_BASE_URL;
|
const subDirectory = import.meta.env.ENV_BASE_URL;
|
||||||
const commonUrl = import.meta.env.ENV_COMMON_BASE_URL;
|
const commonUrl = import.meta.env.ENV_COMMON_BASE_URL;
|
||||||
|
|
@ -239,6 +239,27 @@ const BSNavbar2 = () => {
|
||||||
item.SettingIdName === 'VerifyProduct' && item?.SettingValue === 'Y'
|
item.SettingIdName === 'VerifyProduct' && item?.SettingValue === 'Y'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const [isFullscreen, setIsFullscreen] = useState(false);
|
||||||
|
const handleFullscreen = useCallback(async () => {
|
||||||
|
if (!isFullscreen) {
|
||||||
|
try {
|
||||||
|
await document.documentElement.requestFullscreen();
|
||||||
|
setIsFullscreen(true);
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Fullscreen error:', error);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
if (document.fullscreenElement) {
|
||||||
|
await document.exitFullscreen();
|
||||||
|
}
|
||||||
|
setIsFullscreen(false);
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Exit fullscreen error:', error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, [isFullscreen]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!FeatureAddonData?.FeatureDtls?.length) return;
|
if (!FeatureAddonData?.FeatureDtls?.length) return;
|
||||||
|
|
||||||
|
|
@ -871,8 +892,7 @@ const BSNavbar2 = () => {
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
<div className='Nav2BSNavBarWholeSale'>
|
<div className="Nav2BSNavBarWholeSale">
|
||||||
|
|
||||||
{SalesMode?.SettingValue === 'Y' && !OtherServicesglobal && (
|
{SalesMode?.SettingValue === 'Y' && !OtherServicesglobal && (
|
||||||
<BSNavBarWholeSale />
|
<BSNavBarWholeSale />
|
||||||
)}
|
)}
|
||||||
|
|
@ -1280,6 +1300,18 @@ const BSNavbar2 = () => {
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
<Tooltip title={isFullscreen ? 'Exit Full Screen' : 'Full Screen'}>
|
||||||
|
<div
|
||||||
|
className={
|
||||||
|
isFullscreen ? 'BsNavbar1FullScreenExit' : 'BsNavbar1FullScreen'
|
||||||
|
}
|
||||||
|
onClick={handleFullscreen}
|
||||||
|
>
|
||||||
|
{isFullscreen ? <RiFullscreenExitFill /> : <RiFullscreenFill />}
|
||||||
|
</div>
|
||||||
|
</Tooltip>
|
||||||
|
|
||||||
{isMobile && (
|
{isMobile && (
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,482 @@
|
||||||
|
import { shallowEqual, useSelector } from 'react-redux';
|
||||||
|
import {
|
||||||
|
changeCustomerID,
|
||||||
|
ChangeSelectedCustDisable,
|
||||||
|
changeSelectedCustId,
|
||||||
|
changeSelectedOption,
|
||||||
|
PreferenceData,
|
||||||
|
} from '../../../../Features/BookingScreen/BookingData/BookingData';
|
||||||
|
|
||||||
|
import { useCallback, useEffect, useState } from 'react';
|
||||||
|
import {
|
||||||
|
changeKioskCustomerMobileNo,
|
||||||
|
globalKioskCustomerMobileNo,
|
||||||
|
} from '../../../../Features/Kiosk/kiosk.js';
|
||||||
|
import { HiOutlineBackspace } from 'react-icons/hi';
|
||||||
|
import { useDispatch } from 'react-redux';
|
||||||
|
import { isIndianMobile } from '../../../../utils/calculations.js';
|
||||||
|
import { IoIosWarning } from 'react-icons/io';
|
||||||
|
import './CustomerOTP.scss';
|
||||||
|
import { Messages } from '../../../../Components/Notifications/Messages.jsx';
|
||||||
|
import { DefaultModal } from '../../../../Components/Modal/DefaultModal.jsx';
|
||||||
|
import {
|
||||||
|
checkLastOrderTimeLimit,
|
||||||
|
sendupiotp,
|
||||||
|
} from '../../../../Features/UpiDetails/UpiDetails.js';
|
||||||
|
import { StoredSessionData } from '../../../../Features/ThemeChange/ThemeChange.js';
|
||||||
|
import { getAddCustomerDetails, postAddCustomerDetails } from '../../../../Features/BookingScreen/Customer/addCustomer.js';
|
||||||
|
const CustomerMobileNumberModal = ({ open, HandleCloseModal }) => {
|
||||||
|
const SettingDataSelector = useSelector(PreferenceData);
|
||||||
|
const CustomerMobileNumber = useSelector(globalKioskCustomerMobileNo);
|
||||||
|
|
||||||
|
const SessionData = useSelector(StoredSessionData, shallowEqual);
|
||||||
|
const dispatch = useDispatch();
|
||||||
|
const [number, setNumber] = useState(
|
||||||
|
CustomerMobileNumber ? CustomerMobileNumber : ''
|
||||||
|
);
|
||||||
|
const [messageType, setMessageType] = useState(null);
|
||||||
|
const [messageData, setMessageData] = useState(null);
|
||||||
|
const [canResend, setCanResend] = useState(true);
|
||||||
|
const [otpInput, setOtpInput] = useState(['', '', '', '']);
|
||||||
|
const [otpIndex, setOtpIndex] = useState(0);
|
||||||
|
const [otpSent, setOtpSent] = useState(false);
|
||||||
|
const [otpVerifed, setOtpVerified] = useState(false);
|
||||||
|
const [otpNumber, setOTPNumber] = useState(null);
|
||||||
|
const [maxLimitExceeded, setMaxLimitExceeded] = useState(null);
|
||||||
|
const [maxLimitExceededMessage, setMaxLimitExceededMessage] = useState(null);
|
||||||
|
const isOtpEnabled = SettingDataSelector?.[0]?.SettingDtlDetails?.find(
|
||||||
|
(setting) =>
|
||||||
|
setting?.SettingIdName?.toLowerCase() === 'kioskotp' &&
|
||||||
|
setting?.SettingValue === 'Y'
|
||||||
|
);
|
||||||
|
const isTimeLimitEnabled = SettingDataSelector?.[0]?.SettingDtlDetails?.find(
|
||||||
|
(setting) =>
|
||||||
|
(setting?.SettingIdName?.toLowerCase() === 'hours' ||
|
||||||
|
setting?.SettingIdName?.toLowerCase() === 'minutes') &&
|
||||||
|
setting?.SettingValue === 'Y'
|
||||||
|
);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
isIndianMobile(number) && fetchCustomerDetails(number);
|
||||||
|
}, [number]);
|
||||||
|
useEffect(() => {
|
||||||
|
if (otpInput.every((input) => input !== '')) {
|
||||||
|
verifyOtp();
|
||||||
|
}
|
||||||
|
}, [otpInput]);
|
||||||
|
const fetchCustomerDetails = async (number) => {
|
||||||
|
const response = await dispatch(
|
||||||
|
getAddCustomerDetails({
|
||||||
|
MobileNo: number,
|
||||||
|
AppId: SessionData.AppId,
|
||||||
|
CompId: SessionData.CompId,
|
||||||
|
BranchId: SessionData.BranchId,
|
||||||
|
})
|
||||||
|
)?.unwrap();
|
||||||
|
if (response?.data?.statusCode === 1) {
|
||||||
|
console.log(
|
||||||
|
'response?.data?.CustomerId',
|
||||||
|
response?.data,
|
||||||
|
response?.data?.data?.[0]?.CustId
|
||||||
|
);
|
||||||
|
dispatch(changeCustomerID(response?.data?.data?.[0]?.CustId));
|
||||||
|
let custvalues = {
|
||||||
|
value: number,
|
||||||
|
label: response?.data?.data?.[0]?.CustName || number,
|
||||||
|
CustId: response?.data?.data?.[0]?.CustId,
|
||||||
|
...response?.data?.data?.[0],
|
||||||
|
};
|
||||||
|
// {value: '8428086416', label: 'mohan', CustId: 'CUST1-281-437-74', CustName: 'mohan', Address1: undefined, …}
|
||||||
|
await dispatch(changeSelectedOption(custvalues));
|
||||||
|
await dispatch(changeSelectedCustId(response?.data?.data?.[0]?.CustId));
|
||||||
|
await dispatch(
|
||||||
|
ChangeSelectedCustDisable(true)
|
||||||
|
);
|
||||||
|
}else{
|
||||||
|
let postdata = {
|
||||||
|
"CustMobile":number,
|
||||||
|
"CustomerProfile": null,
|
||||||
|
"AppId": SessionData.AppId,
|
||||||
|
"CompId": SessionData.CompId,
|
||||||
|
"BranchId": SessionData.BranchId,
|
||||||
|
"CreatedBy": SessionData.UserId,
|
||||||
|
"InitialOutStanding": null,
|
||||||
|
"OfferType": "P",
|
||||||
|
"MarriedStatus": "N",
|
||||||
|
"CustomerAddressDtl": []
|
||||||
|
}
|
||||||
|
let response1 = await dispatch(postAddCustomerDetails(postdata)).unwrap();
|
||||||
|
|
||||||
|
if (response1?.data?.statusCode == 1) {
|
||||||
|
dispatch(changeSelectedOption(null));
|
||||||
|
dispatch(
|
||||||
|
changeCustomerID(
|
||||||
|
response1?.data?.CustomerDetails?.[
|
||||||
|
response1?.data?.CustomerDetails.length - 1
|
||||||
|
]
|
||||||
|
)
|
||||||
|
);
|
||||||
|
dispatch(
|
||||||
|
changeSelectedCustId(response1?.data?.CustomerDetails?.[0]?.CustId)
|
||||||
|
);
|
||||||
|
dispatch(
|
||||||
|
ChangeSelectedCustDisable(true)
|
||||||
|
);
|
||||||
|
|
||||||
|
} else{
|
||||||
|
setMessageData('Invalid mobile No.');
|
||||||
|
setMessageType('error');
|
||||||
|
setNumber('');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const setNumberFun = (newValue) => {
|
||||||
|
setNumber((prevNumber) => {
|
||||||
|
if (prevNumber.length < 10) {
|
||||||
|
return prevNumber + newValue;
|
||||||
|
}
|
||||||
|
return prevNumber;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleOtpNumber = (num) => {
|
||||||
|
if (otpIndex > 3) return;
|
||||||
|
|
||||||
|
const newOtp = [...otpInput];
|
||||||
|
newOtp[otpIndex] = num.toString();
|
||||||
|
setOtpInput(newOtp);
|
||||||
|
|
||||||
|
if (otpIndex < 3) {
|
||||||
|
setOtpIndex(otpIndex + 1);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleOtpBackspace = () => {
|
||||||
|
if (otpIndex < 0) return;
|
||||||
|
|
||||||
|
const newOtp = [...otpInput];
|
||||||
|
|
||||||
|
if (newOtp[otpIndex]) {
|
||||||
|
newOtp[otpIndex] = '';
|
||||||
|
} else if (otpIndex > 0) {
|
||||||
|
newOtp[otpIndex - 1] = '';
|
||||||
|
setOtpIndex(otpIndex - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
setOtpInput(newOtp);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleBackspace = () => {
|
||||||
|
setNumber((prevNumber) => prevNumber.slice(0, -1));
|
||||||
|
};
|
||||||
|
const checkLast30MinOrder = async (MobileNo) => {
|
||||||
|
const response = await dispatch(
|
||||||
|
checkLastOrderTimeLimit({
|
||||||
|
MobileNo,
|
||||||
|
AppId: SessionData.AppId,
|
||||||
|
CompId: SessionData.CompId,
|
||||||
|
BranchId: SessionData.BranchId,
|
||||||
|
})
|
||||||
|
)?.unwrap();
|
||||||
|
return response?.data;
|
||||||
|
};
|
||||||
|
const sendOTP = async () => {
|
||||||
|
const valid = isIndianMobile(number);
|
||||||
|
if (valid) {
|
||||||
|
if (isTimeLimitEnabled) {
|
||||||
|
const withinTimeLimit = await checkLast30MinOrder(number);
|
||||||
|
if (withinTimeLimit?.IsEligible === false) {
|
||||||
|
// setMessageData(withinTimeLimit?.response);
|
||||||
|
// setMessageType('warning');
|
||||||
|
setMaxLimitExceededMessage(withinTimeLimit?.response);
|
||||||
|
setMaxLimitExceeded(true);
|
||||||
|
await dispatch(changeSelectedOption(null));
|
||||||
|
await dispatch(changeSelectedCustId(null));
|
||||||
|
// Reset after 3 seconds
|
||||||
|
setTimeout(() => {
|
||||||
|
setMaxLimitExceeded(false);
|
||||||
|
setMaxLimitExceededMessage(null);
|
||||||
|
}, 2500);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
setMessageData('Please enter valid mobile No.');
|
||||||
|
setMessageType('warning');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
setOtpIndex(0);
|
||||||
|
setOtpSent(true);
|
||||||
|
let response = await dispatch(
|
||||||
|
sendupiotp({
|
||||||
|
MobileNo: number,
|
||||||
|
CreatedBy: 0,
|
||||||
|
})
|
||||||
|
)?.unwrap();
|
||||||
|
if (response?.data?.statusCode == 1) {
|
||||||
|
setMessageData('OTP sent to your mobile number');
|
||||||
|
setMessageType('success');
|
||||||
|
setOTPNumber(response?.data?.OTP);
|
||||||
|
startResendTimer();
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const verifyOtp = () => {
|
||||||
|
const enteredOtp = otpInput.join('');
|
||||||
|
|
||||||
|
if (enteredOtp === otpNumber?.toString()) {
|
||||||
|
setMessageType('success');
|
||||||
|
setMessageData('OTP Verified Successfully');
|
||||||
|
setOtpSent(false);
|
||||||
|
setOtpInput(['', '', '', '']);
|
||||||
|
HandleCloseModal();
|
||||||
|
// setShowPaymentMethods(true);
|
||||||
|
setOtpVerified(true);
|
||||||
|
} else {
|
||||||
|
setMessageType('error');
|
||||||
|
setMessageData('Invalid OTP');
|
||||||
|
setOtpInput(['', '', '', '']);
|
||||||
|
setOtpIndex(0);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const onComplete = useCallback(() => {
|
||||||
|
setMessageData(null);
|
||||||
|
setMessageType(null);
|
||||||
|
}, []);
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Messages
|
||||||
|
messageType={messageType}
|
||||||
|
messageData={messageData}
|
||||||
|
onComplete={onComplete}
|
||||||
|
/>
|
||||||
|
<DefaultModal
|
||||||
|
open={open}
|
||||||
|
// handleCancel={HandleCloseModal}
|
||||||
|
footer={false}
|
||||||
|
width={900}
|
||||||
|
// {width > 768 ? 900 : 700}
|
||||||
|
children={
|
||||||
|
<div className="BSOTPpaymentModal-Master">
|
||||||
|
<h4 className="BSOTPTitlepayment">
|
||||||
|
{isOtpEnabled ? 'Enter Mobile Number To Order' : 'PAYMENT'}
|
||||||
|
</h4>
|
||||||
|
<div className="BSOTPpaymentModal_main">
|
||||||
|
{!otpSent && !otpVerifed && (
|
||||||
|
<>
|
||||||
|
<div className="BSOTPprompt">
|
||||||
|
{/* <p style={{ fontFamily: 'Poppins', fontWeight: '600' }}>
|
||||||
|
Get your order bill on your mobile <br />
|
||||||
|
via SMS / Whatsapp
|
||||||
|
</p> */}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div
|
||||||
|
className={`BSOTPinputModal ${number ? 'green-border' : ''}`}
|
||||||
|
>
|
||||||
|
<input type="text" value={number} readOnly />
|
||||||
|
{number?.length === 10 && !isIndianMobile(number) && (
|
||||||
|
<div className="input-err">
|
||||||
|
Please Enter Valid Mobile Number
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* input boxxes */}
|
||||||
|
<div
|
||||||
|
className="BSOTPdailpad-main"
|
||||||
|
// style={{
|
||||||
|
// pointerEvents: selectedPaymentOption && 'none',
|
||||||
|
// opacity: selectedPaymentOption && '40%',
|
||||||
|
// }}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className="BSOTPKiosk-dailpadModal"
|
||||||
|
// style={{ backgroundColor: getKioskLightColourdata }}
|
||||||
|
>
|
||||||
|
<div className="BSOTPKioskPayment-dailpad-1">
|
||||||
|
<p onClick={() => setNumberFun(1)}>1</p>
|
||||||
|
<p onClick={() => setNumberFun(2)}>2</p>
|
||||||
|
<p onClick={() => setNumberFun(3)}>3</p>
|
||||||
|
</div>
|
||||||
|
<div className="BSOTPKioskPayment-dailpad-2">
|
||||||
|
<p onClick={() => setNumberFun(4)}>4</p>
|
||||||
|
<p onClick={() => setNumberFun(5)}>5</p>
|
||||||
|
<p onClick={() => setNumberFun(6)}>6</p>
|
||||||
|
</div>
|
||||||
|
<div className="BSOTPKioskPayment-dailpad-3">
|
||||||
|
<p onClick={() => setNumberFun(7)}>7</p>
|
||||||
|
<p onClick={() => setNumberFun(8)}>8</p>
|
||||||
|
<p onClick={() => setNumberFun(9)}>9</p>
|
||||||
|
</div>
|
||||||
|
<div className="BSOTPKioskPayment-dailpad-4">
|
||||||
|
<p onClick={handleBackspace}>
|
||||||
|
<HiOutlineBackspace
|
||||||
|
size={30}
|
||||||
|
style={{ marginBottom: '-2px' }}
|
||||||
|
/>
|
||||||
|
</p>
|
||||||
|
<p onClick={() => setNumberFun(0)}>0</p>
|
||||||
|
<p style={{ background: 'none' }}></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{isOtpEnabled && (
|
||||||
|
<>
|
||||||
|
<button
|
||||||
|
className="BSOTPKioskOPTBTn"
|
||||||
|
// disabled={number?.length === 10}
|
||||||
|
onClick={() => sendOTP()}
|
||||||
|
>
|
||||||
|
Get OTP
|
||||||
|
</button>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
{isOtpEnabled && otpSent && (
|
||||||
|
<div className="BSOTPotp-section">
|
||||||
|
<div style={{ fontFamily: 'Poppins', fontSize: '16px' }}>
|
||||||
|
Enter OTP
|
||||||
|
</div>
|
||||||
|
{/* Mobile Number + Edit */}
|
||||||
|
<div className="BSOTPotp-mobile-row">
|
||||||
|
<span className="BSOTPotp-mobile-number">{number}</span>
|
||||||
|
<button
|
||||||
|
className="BSOTPotp-edit-btn"
|
||||||
|
onClick={() => {
|
||||||
|
setOtpSent(false);
|
||||||
|
setOtpInput(['', '', '', '']);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Edit
|
||||||
|
</button>
|
||||||
|
``{' '}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* 4 Digit OTP Input */}
|
||||||
|
<div className='optEnterResendOTP'>
|
||||||
|
<div className="BSOTPotp-input-container">
|
||||||
|
{otpInput.map((digit, index) => (
|
||||||
|
<input
|
||||||
|
key={index}
|
||||||
|
type="text"
|
||||||
|
value={digit}
|
||||||
|
className={`BSOTPotp-box ${index === otpIndex ? 'active' : ''}`}
|
||||||
|
onClick={() => setOtpIndex(index)}
|
||||||
|
readOnly
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="BSOTPotp-buttons">
|
||||||
|
{/* <button
|
||||||
|
className="verify-btn"
|
||||||
|
disabled={otpInput.join('').length !== 4}
|
||||||
|
onClick={verifyOtp}
|
||||||
|
>
|
||||||
|
Verify
|
||||||
|
</button> */}
|
||||||
|
|
||||||
|
<button
|
||||||
|
className="BSOTPresend-btn"
|
||||||
|
disabled={!canResend}
|
||||||
|
onClick={sendOTP}
|
||||||
|
>
|
||||||
|
{canResend ? 'Resend OTP' : `Resend in ${resendTimer}s`}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="BSOTPKioskPayment-dailpad-main">
|
||||||
|
<div
|
||||||
|
className="BSOTPKiosk-dailpadModal"
|
||||||
|
// style={{ backgroundColor: getKioskLightColourdata }}
|
||||||
|
>
|
||||||
|
<div className="BSOTPKioskPayment-dailpad-1">
|
||||||
|
<p onClick={() => handleOtpNumber(1)}>1</p>
|
||||||
|
<p onClick={() => handleOtpNumber(2)}>2</p>
|
||||||
|
<p onClick={() => handleOtpNumber(3)}>3</p>
|
||||||
|
</div>
|
||||||
|
<div className="BSOTPKioskPayment-dailpad-2">
|
||||||
|
<p onClick={() => handleOtpNumber(4)}>4</p>
|
||||||
|
<p onClick={() => handleOtpNumber(5)}>5</p>
|
||||||
|
<p onClick={() => handleOtpNumber(6)}>6</p>
|
||||||
|
</div>
|
||||||
|
<div className="BSOTPKioskPayment-dailpad-3">
|
||||||
|
<p onClick={() => handleOtpNumber(7)}>7</p>
|
||||||
|
<p onClick={() => handleOtpNumber(8)}>8</p>
|
||||||
|
<p onClick={() => handleOtpNumber(9)}>9</p>
|
||||||
|
</div>
|
||||||
|
<div className="BSOTPKioskPayment-dailpad-4">
|
||||||
|
<p onClick={handleOtpBackspace}>
|
||||||
|
<HiOutlineBackspace size={30} />
|
||||||
|
</p>
|
||||||
|
<p onClick={() => handleOtpNumber(0)}>0</p>
|
||||||
|
<p style={{ background: 'none' }}></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Buttons */}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{/* {(!isOtpEnabled || (otpVerifed)) && <>
|
||||||
|
<p className="choiseTitle">Select Payment Method</p>
|
||||||
|
{console.log('selectedOption', selectedPaymentOption)}
|
||||||
|
<div
|
||||||
|
className="paymentChoise"
|
||||||
|
style={{
|
||||||
|
pointerEvents:
|
||||||
|
(!isIndianMobile(number) || selectedPaymentOption) &&
|
||||||
|
'none',
|
||||||
|
opacity:
|
||||||
|
(!isIndianMobile(number) || selectedPaymentOption) && '40%',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
|
||||||
|
{counterAvailability && (
|
||||||
|
<div
|
||||||
|
className="upi"
|
||||||
|
onClick={() => handlePaymentOption('Counter')}
|
||||||
|
>
|
||||||
|
<MdOutlinePayments size={50} opacity={0.5} />
|
||||||
|
<p style={{ fontSize: '12px', textAlign: 'center' }}>
|
||||||
|
PAY AT THE COUNTER
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{paymentOptionDetailsBusinessUpi && (
|
||||||
|
<div
|
||||||
|
className="upi"
|
||||||
|
onClick={() => handlePaymentOption('BU')}
|
||||||
|
>
|
||||||
|
<img src={UPI} alt="" width={60} />
|
||||||
|
<p> UPI</p>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{!paymentOptionDetailsBusinessUpi && !counterAvailability && (
|
||||||
|
<div className="payment-error-msg">
|
||||||
|
Please Set Payment Options Contact Admin
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</>} */}
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
className={`BSOTPItem3Warning ${maxLimitExceeded ? 'showing' : ''}`}
|
||||||
|
>
|
||||||
|
<p>
|
||||||
|
<IoIosWarning size={30} color="#b99400" />
|
||||||
|
{maxLimitExceededMessage}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export default CustomerMobileNumberModal;
|
||||||
|
|
@ -0,0 +1,701 @@
|
||||||
|
.BSOTPpaymentModal_main {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
gap: 10px;
|
||||||
|
|
||||||
|
.BSOTPprompt {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
justify-content: flex-start;
|
||||||
|
text-align: left;
|
||||||
|
|
||||||
|
p {
|
||||||
|
text-align: left;
|
||||||
|
font-family: 'Gilroy';
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 26px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.BSOTPKioskPayment-inputModal {
|
||||||
|
align-content: center;
|
||||||
|
align-items: center;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 1rem 1rem;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
.input-err {
|
||||||
|
color: red;
|
||||||
|
font-size: 13px;
|
||||||
|
margin-top: 4px;
|
||||||
|
font-family: 'Poppins', sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
input {
|
||||||
|
width: 50vw;
|
||||||
|
height: 4rem;
|
||||||
|
padding: 0rem 1rem;
|
||||||
|
font-family: 'Gilroy', sans-serif;
|
||||||
|
font-size: 22px;
|
||||||
|
border: none;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
font-weight: 500;
|
||||||
|
border: 1px solid rgba(0, 0, 0, 0.199);
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.BSOTPKiosk-dailpadModal {
|
||||||
|
background-color: #e1eef1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
row-gap: 16px;
|
||||||
|
padding: 10px 10px;
|
||||||
|
border-radius: 8px;
|
||||||
|
width: 60%;
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.BSOTPpaymentChoise {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
column-gap: 3rem;
|
||||||
|
row-gap: 1rem;
|
||||||
|
|
||||||
|
.BSOTPupi {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-around;
|
||||||
|
width: 110px;
|
||||||
|
height: 110px;
|
||||||
|
border: 1px solid rgba(0, 0, 0, 0.199);
|
||||||
|
border-radius: 8px;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
p {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.BSOTPchoiseTitle {
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
align-items: flex-start;
|
||||||
|
padding: 1rem 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.BSOTPKioskPayment-dailpad-main {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
row-gap: 12px;
|
||||||
|
padding: 16px 0px;
|
||||||
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
|
overflow-x: hidden;
|
||||||
|
}
|
||||||
|
.BSOTPKioskPayment-dailpad-1,
|
||||||
|
.BSOTPKioskPayment-dailpad-2,
|
||||||
|
.BSOTPKioskPayment-dailpad-3 {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
column-gap: 1.5rem;
|
||||||
|
row-gap: 2rem;
|
||||||
|
|
||||||
|
p {
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 10px 10px;
|
||||||
|
width: 25%;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 12px;
|
||||||
|
cursor: pointer;
|
||||||
|
font-family: 'Gilroy', sans-serif;
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 28px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.BSOTPKioskPayment-dailpad-4 {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
flex-direction: row-reverse;
|
||||||
|
column-gap: 1.5rem;
|
||||||
|
|
||||||
|
p {
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 10px 10px;
|
||||||
|
width: 25%;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 12px;
|
||||||
|
cursor: pointer;
|
||||||
|
font-family: 'Gilroy', sans-serif;
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 28px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-modal .ant-modal-content {
|
||||||
|
height: 90vh !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.BSOTPTitlepayment {
|
||||||
|
margin: 0;
|
||||||
|
color: rgba(0, 0, 0, 0.88);
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 1.5;
|
||||||
|
word-wrap: break-word;
|
||||||
|
font-family: 'Barlow Condensed';
|
||||||
|
font-size: 24px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.BSOTPpaymentCardMain {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
width: 100%;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-around;
|
||||||
|
background-color: #fff;
|
||||||
|
box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
|
||||||
|
padding: 1rem 1rem;
|
||||||
|
height: 45vh;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.ant-radio-wrapper .ant-radio-checked .ant-radio-inner {
|
||||||
|
background-color: var(--SELECTED_COLOR) !important;
|
||||||
|
border-color: var(--SELECTED_COLOR) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.BSOTPcardChooice {
|
||||||
|
width: 40%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
row-gap: 10px;
|
||||||
|
column-gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.BSOTPcardoption {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
column-gap: 10px;
|
||||||
|
// box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
|
||||||
|
box-shadow:
|
||||||
|
rgba(0, 0, 0, 0.1) 0px 10px 36px 0px,
|
||||||
|
rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
|
||||||
|
border-radius: 6px;
|
||||||
|
|
||||||
|
padding: 4px 14px;
|
||||||
|
cursor: pointer;
|
||||||
|
width: 95%;
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 30px;
|
||||||
|
height: 22px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.BSOTPcardname {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 550;
|
||||||
|
}
|
||||||
|
|
||||||
|
.BSOTPcardname2 {
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 550;
|
||||||
|
margin-top: -1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.BSOTPbankChooice {
|
||||||
|
width: 60%;
|
||||||
|
border-radius: 6px;
|
||||||
|
|
||||||
|
.searchbar {
|
||||||
|
display: flex;
|
||||||
|
padding: 1px 12px;
|
||||||
|
// border: 1px solid #1c1c1c;
|
||||||
|
// box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
|
||||||
|
box-shadow:
|
||||||
|
rgba(0, 0, 0, 0.16) 0px 10px 36px 0px,
|
||||||
|
rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
|
||||||
|
|
||||||
|
border-radius: 6px;
|
||||||
|
align-items: center;
|
||||||
|
// border: 1px solid black;
|
||||||
|
}
|
||||||
|
|
||||||
|
input {
|
||||||
|
border: none;
|
||||||
|
outline: none;
|
||||||
|
padding: 1px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.titlechoose {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 16px;
|
||||||
|
column-gap: 1rem;
|
||||||
|
padding-bottom: 9px;
|
||||||
|
border-bottom: 1px solid #1c1c1c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.choosecardMain {
|
||||||
|
padding: 10px 10px;
|
||||||
|
margin-top: -1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bankname {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
column-gap: 10px;
|
||||||
|
font-size: 16px;
|
||||||
|
padding: 10px 10px;
|
||||||
|
font-weight: 500;
|
||||||
|
text-transform: capitalize;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.BSOTPbuttonOfpay {
|
||||||
|
position: absolute;
|
||||||
|
bottom: -60px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
width: 100%;
|
||||||
|
column-gap: 11rem;
|
||||||
|
padding: 1rem 4rem;
|
||||||
|
|
||||||
|
.inr {
|
||||||
|
font-size: 22px;
|
||||||
|
color: #4eb14e;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.primary_Button {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 10px 16px;
|
||||||
|
cursor: pointer;
|
||||||
|
background-color: #4eb14e !important;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.searchbar :focus {
|
||||||
|
.ant-input-outlined {
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.searchbar:focus-within {
|
||||||
|
.ant-input-outlined {
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.searchbar .ant-input-search .ant-input:focus {
|
||||||
|
background-color: #fff !important;
|
||||||
|
border: #fff !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.searchbar .ant-input-search .ant-input:focus {
|
||||||
|
border-color: #fff !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.paymentCardMain .ant-collapse {
|
||||||
|
width: 100%;
|
||||||
|
border: none;
|
||||||
|
// box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
|
||||||
|
box-shadow:
|
||||||
|
rgba(0, 0, 0, 0.16) 0px 10px 36px 0px,
|
||||||
|
rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.paymentCardMain .ant-radio-group,
|
||||||
|
.ant-radio-wrapper span.ant-radio + * {
|
||||||
|
padding: 10px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.paymentCardMain .ant-modal .ant-modal-content {
|
||||||
|
padding: 54px 35px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.paymentCardMain
|
||||||
|
.ant-collapse
|
||||||
|
.ant-collapse-item:last-child
|
||||||
|
> .ant-collapse-content {
|
||||||
|
overflow: scroll;
|
||||||
|
height: 26vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.paymentCardMain .ant-input-search .ant-input:hover,
|
||||||
|
.paymentCardMain .ant-input:hover {
|
||||||
|
border: none;
|
||||||
|
outline: none;
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
border: none;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.BSOTPpaymentModal_main .BSOTPKiosk-dailpadModal {
|
||||||
|
padding: 2rem 0rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.BSOTPpaymentModal_main .BSOTPpaymentChoise {
|
||||||
|
column-gap: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.BSOTPpaymentModal_main .BSOTPpaymentChoise .upi {
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.BSOTPpaymentModal_main .BSOTPbuttonOfpay {
|
||||||
|
width: max-content;
|
||||||
|
}
|
||||||
|
|
||||||
|
.BSOTPTitlepayment {
|
||||||
|
text-wrap: nowrap;
|
||||||
|
font-size: 19px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.BSOTPpayment-modal {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
background: white;
|
||||||
|
width: 420px;
|
||||||
|
height: 540px;
|
||||||
|
border-radius: 12px;
|
||||||
|
box-shadow: 0 4px 25px rgba(0, 0, 0, 0.2);
|
||||||
|
padding: 16px;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
.BSOTPmodal-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
// filter: blur(5px);
|
||||||
|
// pointer-events: none;
|
||||||
|
// user-select: none;
|
||||||
|
width: 70vw;
|
||||||
|
margin: 1rem 0;
|
||||||
|
font-family: 'Poppins';
|
||||||
|
font-weight: 500;
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
width: 95vw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.BSOTPpayment-modal {
|
||||||
|
position: fixed;
|
||||||
|
z-index: 1000;
|
||||||
|
top: 50%;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 0;
|
||||||
|
height: 100%;
|
||||||
|
backdrop-filter: blur(5px);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
background-color: rgba(255, 255, 255, 0.2);
|
||||||
|
backdrop-filter: blur(8px);
|
||||||
|
-webkit-backdrop-filter: blur(8px);
|
||||||
|
/* for Safari */
|
||||||
|
}
|
||||||
|
|
||||||
|
.BSOTPpaymentclose-btn {
|
||||||
|
width: max-content;
|
||||||
|
height: max-content;
|
||||||
|
border: none;
|
||||||
|
background-color: unset;
|
||||||
|
color: #ff0000;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 20px;
|
||||||
|
padding: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.BSOTPpayment-frame {
|
||||||
|
width: 70vw;
|
||||||
|
height: 70vh;
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
width: 95vw;
|
||||||
|
height: 80vh;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.BSOTPKioskOPTBTn {
|
||||||
|
width: 60%;
|
||||||
|
padding: 12px 16px;
|
||||||
|
font-size: 20px;
|
||||||
|
font-family: 'Poppins';
|
||||||
|
font-weight: 400;
|
||||||
|
border: none;
|
||||||
|
outline: none;
|
||||||
|
background-color: #000000;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 10px;
|
||||||
|
cursor: pointer;
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.BSOTPotp-section {
|
||||||
|
text-align: center;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.BSOTPotp-mobile-row {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
gap: 15px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
font-family: 'Poppins';
|
||||||
|
|
||||||
|
.BSOTPotp-mobile-number {
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: 600;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.BSOTPotp-edit-btn {
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
color: #007bff;
|
||||||
|
font-size: 14px;
|
||||||
|
cursor: pointer;
|
||||||
|
font-family: 'Poppins';
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.BSOTPotp-input-container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 20px;
|
||||||
|
|
||||||
|
.BSOTP-otp-box {
|
||||||
|
width: 65px;
|
||||||
|
height: 65px;
|
||||||
|
font-size: 28px;
|
||||||
|
text-align: center;
|
||||||
|
border: 2px solid #ccc;
|
||||||
|
border-radius: 8px;
|
||||||
|
outline: none;
|
||||||
|
transition: 0.2s ease;
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
border-color: #28a745;
|
||||||
|
box-shadow: 0 0 6px rgba(40, 167, 69, 0.4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.otp-box.active {
|
||||||
|
border: 2px solid #28a745;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.BSOTPotp-buttons {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 20px;
|
||||||
|
|
||||||
|
button {
|
||||||
|
min-width: 140px;
|
||||||
|
padding: 12px 18px;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 500;
|
||||||
|
border-radius: 8px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: 0.2s ease;
|
||||||
|
font-family: 'Poppins', sans-serif !important;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
&:disabled {
|
||||||
|
opacity: 0.5;
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.verify-btn {
|
||||||
|
background-color: #28a745;
|
||||||
|
border: none;
|
||||||
|
color: #fff;
|
||||||
|
|
||||||
|
&:hover:not(:disabled) {
|
||||||
|
background-color: #218838;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.BSOTPresend-btn {
|
||||||
|
background-color: #ffc107;
|
||||||
|
border: none;
|
||||||
|
color: #000;
|
||||||
|
|
||||||
|
&:hover:not(:disabled) {
|
||||||
|
background-color: #e0a800;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.BSOTPItem3Warning {
|
||||||
|
position: fixed;
|
||||||
|
top: 0%;
|
||||||
|
left: 0%;
|
||||||
|
bottom: 0;
|
||||||
|
right: 0%;
|
||||||
|
background-color: #00000096;
|
||||||
|
z-index: 100;
|
||||||
|
font-family: 'Poppins';
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 500;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 10px;
|
||||||
|
flex-direction: column;
|
||||||
|
backdrop-filter: blur(4px);
|
||||||
|
|
||||||
|
/* Animation initial state */
|
||||||
|
opacity: 0;
|
||||||
|
visibility: hidden;
|
||||||
|
transition:
|
||||||
|
opacity 0.3s ease,
|
||||||
|
visibility 0.3s ease;
|
||||||
|
|
||||||
|
p {
|
||||||
|
display: flex;
|
||||||
|
box-shadow:
|
||||||
|
rgba(0, 0, 0, 0.16) 0px 10px 36px 0px,
|
||||||
|
rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 10px;
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 15px 20px;
|
||||||
|
border-radius: 8px;
|
||||||
|
|
||||||
|
/* popup animation */
|
||||||
|
transform: scale(0.8);
|
||||||
|
transition: transform 0.3s ease;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* When visible */
|
||||||
|
.BSOTPItem3Warning.showing {
|
||||||
|
opacity: 1;
|
||||||
|
visibility: visible;
|
||||||
|
|
||||||
|
p {
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.BSOTPinputModal {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
flex-direction: column;
|
||||||
|
.input-err {
|
||||||
|
font-family: 'Poppins', sans-serif;
|
||||||
|
font-size: 12px;
|
||||||
|
margin-top: 6px;
|
||||||
|
color: rgb(224, 0, 0);
|
||||||
|
}
|
||||||
|
input {
|
||||||
|
width: 60%;
|
||||||
|
outline: none;
|
||||||
|
font-family: 'Poppins', sans-serif;
|
||||||
|
font-weight: 600;
|
||||||
|
margin: 0;
|
||||||
|
text-align: center;
|
||||||
|
height: 45px;
|
||||||
|
border-radius: 6px;
|
||||||
|
border: 1px solid #333;
|
||||||
|
font-size: 20px;
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.BSOTPdailpad-main {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
row-gap: 12px;
|
||||||
|
padding: 14px 0px;
|
||||||
|
align-items: center;
|
||||||
|
overflow-x: hidden;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.BSOTPotp-box {
|
||||||
|
width: 55px;
|
||||||
|
height: 55px;
|
||||||
|
font-size: 24px;
|
||||||
|
text-align: center;
|
||||||
|
border: 2px solid #ccc;
|
||||||
|
border-radius: 8px;
|
||||||
|
outline: none;
|
||||||
|
transition: 0.2s ease;
|
||||||
|
font-family: 'Poppins';
|
||||||
|
font-weight: 500;
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
border-color: #28a745;
|
||||||
|
box-shadow: 0 0 6px rgba(40, 167, 69, 0.4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.BSOTPotp-box.active {
|
||||||
|
border: 2px solid #28a745;
|
||||||
|
}
|
||||||
|
.BSOTPpaymentModal-Master {
|
||||||
|
scrollbar-width: thin;
|
||||||
|
height: 90vh;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
.optEnterResendOTP {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 1rem;
|
||||||
|
}
|
||||||
|
|
@ -136,8 +136,11 @@ const BSCustomerSelect = ({ TopName = null }) => {
|
||||||
);
|
);
|
||||||
const BSLayout1Data = useSelector(getTemplateData);
|
const BSLayout1Data = useSelector(getTemplateData);
|
||||||
const selOption = useSelector(GlobalSelOption);
|
const selOption = useSelector(GlobalSelOption);
|
||||||
|
console.log(selOption, 'selOption');
|
||||||
const GetCustId = useSelector(GlobalCustId);
|
const GetCustId = useSelector(GlobalCustId);
|
||||||
|
console.log(GetCustId, 'GetCustId');
|
||||||
const Custdisable = useSelector(GlobalSelectedCustDisable);
|
const Custdisable = useSelector(GlobalSelectedCustDisable);
|
||||||
|
console.log(Custdisable, 'Custdisable');
|
||||||
const SessionData = useSelector(StoredSessionData);
|
const SessionData = useSelector(StoredSessionData);
|
||||||
const OrderOfferDetails = useSelector(
|
const OrderOfferDetails = useSelector(
|
||||||
GlobalOfferAppliedProducts,
|
GlobalOfferAppliedProducts,
|
||||||
|
|
|
||||||
|
|
@ -172,7 +172,7 @@ const CustomisedInvoiceChange = () => {
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<div className='fromlabelDate'>
|
<div className='fromlabelDate'>
|
||||||
<label>From Date</label>
|
<label>Bill Date</label>
|
||||||
<DatePicker
|
<DatePicker
|
||||||
disabledDate={disablefutureDates}
|
disabledDate={disablefutureDates}
|
||||||
format="DD-MMM-YYYY"
|
format="DD-MMM-YYYY"
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -192,12 +192,25 @@ export const usePaymentOptions = ({ AppId, CompId, BranchId, UserId }) => {
|
||||||
) === undefined &&
|
) === undefined &&
|
||||||
Pay_at_the_counter !== undefined;
|
Pay_at_the_counter !== undefined;
|
||||||
|
|
||||||
if (UpiCondition) {
|
let BusinessUPI = Formated_Payment_Details?.find((item) => item.OptionName == 'Business Upi')
|
||||||
|
if (UpiCondition || BusinessUPI) {
|
||||||
let UpiDetailsResponse = await dispatch(
|
let UpiDetailsResponse = await dispatch(
|
||||||
getPaymentUPIDetails({ CompId, AppId, BranchId, DetailType: 'U' })
|
getPaymentUPIDetails({ CompId, AppId, BranchId, DetailType: 'U' })
|
||||||
).unwrap();
|
).unwrap();
|
||||||
|
let BusinessUpi = await dispatch(
|
||||||
|
getPaymentUPIDetails({ CompId, AppId, BranchId, DetailType: 'BU' })
|
||||||
|
).unwrap();
|
||||||
|
let data = BusinessUpi?.data?.data
|
||||||
|
const hasNonUPI = Formated_Payment_Details
|
||||||
|
?.find(item => item.OptionName === 'Pay at the counter')
|
||||||
|
?.ModeDetails
|
||||||
|
?.every(e => e?.ModeName !== "UPI");
|
||||||
|
|
||||||
|
const hasChooseBusinessUpi = Formated_Payment_Details
|
||||||
|
?.find(item => item.OptionName === 'Business Upi')
|
||||||
|
?.ModeDetails
|
||||||
if (
|
if (
|
||||||
UpiDetailsResponse?.data?.statusCode === 0 &&
|
UpiDetailsResponse?.data?.statusCode === 0 && BusinessUpi?.data?.statusCode === 0 && BusinessUpi?.data?.data?.length === 0 &&
|
||||||
UpiDetailsResponse?.data?.data?.length === 0
|
UpiDetailsResponse?.data?.data?.length === 0
|
||||||
) {
|
) {
|
||||||
Formated_Payment_Details = Formated_Payment_Details.map((item) => {
|
Formated_Payment_Details = Formated_Payment_Details.map((item) => {
|
||||||
|
|
@ -210,6 +223,62 @@ export const usePaymentOptions = ({ AppId, CompId, BranchId, UserId }) => {
|
||||||
return item;
|
return item;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
else if (BusinessUpi?.data?.data?.length === 1 && hasNonUPI && hasChooseBusinessUpi) {
|
||||||
|
Formated_Payment_Details = Formated_Payment_Details.map((item) => {
|
||||||
|
if (item.OptionName === 'Pay at the counter') {
|
||||||
|
let reqDatfromBusinessUpi = BusinessUPI?.ModeDetails?.[0]
|
||||||
|
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
ModeDetails: [
|
||||||
|
...item?.ModeDetails,
|
||||||
|
{
|
||||||
|
"PaymentOptionId": reqDatfromBusinessUpi?.PaymentOptionId,
|
||||||
|
"PaymentModeId": reqDatfromBusinessUpi?.PaymentModeId,
|
||||||
|
"ModeId": reqDatfromBusinessUpi?.ModeId,
|
||||||
|
"ModeName": "UPI",
|
||||||
|
"ModeDefault": "Y",
|
||||||
|
"ModeImage": "",
|
||||||
|
"PayOpt": null,
|
||||||
|
"CardType": null,
|
||||||
|
"MerchantUPIId": null,
|
||||||
|
"MerchantMobile": null,
|
||||||
|
"MerchantNumber": null,
|
||||||
|
"RefreshToken": null,
|
||||||
|
"Token": null,
|
||||||
|
"MerchantId": null,
|
||||||
|
"ActiveStatus": reqDatfromBusinessUpi?.ActiveStatus,
|
||||||
|
"CreatedBy": 0,
|
||||||
|
"CreatedDate": "2026-03-03T19:07:54.393",
|
||||||
|
"UpdatedBy": null,
|
||||||
|
"UpdatedDate": null,
|
||||||
|
"MethodDetails": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// IMPORTANT: return other items unchanged
|
||||||
|
return item;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else if (UpiDetailsResponse?.data?.statusCode === 0 && UpiDetailsResponse?.data?.data?.length === 0) {
|
||||||
|
Formated_Payment_Details = Formated_Payment_Details.map((item) => {
|
||||||
|
if (item.OptionName === 'Pay at the counter') {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
ModeDetails: Pay_at_the_counter_witoutUPIMode,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return item;
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
////
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -20,6 +20,15 @@ import {
|
||||||
GlobalprintSlNo,
|
GlobalprintSlNo,
|
||||||
GlobalprinttermsAndConditions,
|
GlobalprinttermsAndConditions,
|
||||||
GlobalPritdummyData,
|
GlobalPritdummyData,
|
||||||
|
GlobalRowType,
|
||||||
|
GlobalSelectedFooterColor,
|
||||||
|
GlobalSelectedFooterFontColor,
|
||||||
|
GlobalSelectedPrintHeaderColor,
|
||||||
|
GlobalSelectedPrintHeaderFontColor,
|
||||||
|
GlobalSelectedTableBodyColor,
|
||||||
|
GlobalSelectedTableBodyFontColor,
|
||||||
|
GlobalSelectedTableHeaderColor,
|
||||||
|
GlobalSelectedTableHeaderFontColor,
|
||||||
GlobalSignatureImage,
|
GlobalSignatureImage,
|
||||||
GlobalthemeFormat,
|
GlobalthemeFormat,
|
||||||
} from '../../../../Features/ThemeChange/ThemeChange';
|
} from '../../../../Features/ThemeChange/ThemeChange';
|
||||||
|
|
@ -200,6 +209,72 @@ const DCPrintA4Style11 = ({
|
||||||
lastChunkRows > (!isMobile ? 10 : PageSize === 'A5' ? 5 : 14);
|
lastChunkRows > (!isMobile ? 10 : PageSize === 'A5' ? 5 : 14);
|
||||||
console.log(lastChunkRows, shouldFooterBeOnNewPage, 'dataSourcedataSource');
|
console.log(lastChunkRows, shouldFooterBeOnNewPage, 'dataSourcedataSource');
|
||||||
|
|
||||||
|
//
|
||||||
|
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
|
||||||
|
const SelectedHeaderFontColor = useSelector(
|
||||||
|
GlobalSelectedPrintHeaderFontColor
|
||||||
|
);
|
||||||
|
const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
|
||||||
|
const SelectedTableHeaderFontColor = useSelector(
|
||||||
|
GlobalSelectedTableHeaderFontColor
|
||||||
|
);
|
||||||
|
const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
|
||||||
|
const SelectedTableBodyFontColor = useSelector(
|
||||||
|
GlobalSelectedTableBodyFontColor
|
||||||
|
);
|
||||||
|
const SelectedRowType = useSelector(GlobalRowType);
|
||||||
|
const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
|
||||||
|
const SelectedTableFooterFontColor = useSelector(
|
||||||
|
GlobalSelectedFooterFontColor
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
let printColors = DCPrintTemplateDtl?.PrintColors;
|
||||||
|
const headerColor = printColors?.find((obj) => obj.headerColor)?.headerColor;
|
||||||
|
const tableHeaderColor = printColors?.find(
|
||||||
|
(obj) => obj.tableHeaderColor
|
||||||
|
)?.tableHeaderColor;
|
||||||
|
const tableBodyColor = printColors?.find(
|
||||||
|
(obj) => obj.tableBodyColor
|
||||||
|
)?.tableBodyColor;
|
||||||
|
const footerColor = printColors?.find((obj) => obj.footerColor)?.footerColor;
|
||||||
|
|
||||||
|
//
|
||||||
|
const headerStyle = {
|
||||||
|
backgroundColor: GlobaldummyData
|
||||||
|
? SelectedHeaderColor
|
||||||
|
: headerColor?.background,
|
||||||
|
|
||||||
|
color: GlobaldummyData ? SelectedHeaderFontColor : headerColor?.font,
|
||||||
|
};
|
||||||
|
const tableHeaderStyle = {
|
||||||
|
backgroundColor: GlobaldummyData
|
||||||
|
? SelectedTableHeaderColor
|
||||||
|
: tableHeaderColor?.background,
|
||||||
|
|
||||||
|
color: GlobaldummyData
|
||||||
|
? SelectedTableHeaderFontColor
|
||||||
|
: tableHeaderColor?.font,
|
||||||
|
};
|
||||||
|
|
||||||
|
const tableBodyStyle = {
|
||||||
|
backgroundColor: GlobaldummyData
|
||||||
|
? SelectedTableBodyColor
|
||||||
|
: tableBodyColor?.background,
|
||||||
|
color: GlobaldummyData ? SelectedTableBodyFontColor : tableBodyColor?.font,
|
||||||
|
};
|
||||||
|
|
||||||
|
const rowtypeStyle = GlobaldummyData
|
||||||
|
? SelectedRowType
|
||||||
|
: tableBodyColor?.rowType;
|
||||||
|
|
||||||
|
const footerColorStyle = {
|
||||||
|
backgroundColor: GlobaldummyData
|
||||||
|
? SelectedTableFooterColor
|
||||||
|
: footerColor?.background,
|
||||||
|
color: GlobaldummyData ? SelectedTableFooterFontColor : footerColor?.font,
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
|
|
@ -215,6 +290,7 @@ const DCPrintA4Style11 = ({
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
width: '100%',
|
width: '100%',
|
||||||
minHeight: isMobile ? '257mm' : '297mm',
|
minHeight: isMobile ? '257mm' : '297mm',
|
||||||
|
...headerStyle,
|
||||||
}}
|
}}
|
||||||
id={`DCPrintStyleA4`}
|
id={`DCPrintStyleA4`}
|
||||||
>
|
>
|
||||||
|
|
@ -248,6 +324,8 @@ const DCPrintA4Style11 = ({
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
padding: '12px 0',
|
padding: '12px 0',
|
||||||
borderBottom: '1px solid black',
|
borderBottom: '1px solid black',
|
||||||
|
...headerStyle,
|
||||||
|
width: '100%',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{/* Logo Image */}
|
{/* Logo Image */}
|
||||||
|
|
@ -583,6 +661,7 @@ const DCPrintA4Style11 = ({
|
||||||
style={{
|
style={{
|
||||||
width: '10%',
|
width: '10%',
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
|
...tableHeaderStyle,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
S.No
|
S.No
|
||||||
|
|
@ -593,25 +672,30 @@ const DCPrintA4Style11 = ({
|
||||||
style={{
|
style={{
|
||||||
width: '10%',
|
width: '10%',
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
|
...tableHeaderStyle,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
S.No
|
S.No
|
||||||
</th>
|
</th>
|
||||||
)}
|
)}
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
? GlobalItem && <th>Item</th>
|
? GlobalItem && (
|
||||||
: Item == true && <th>Item</th>}
|
<th style={{ ...tableHeaderStyle }}>
|
||||||
{/* {GlobaldummyData
|
Item
|
||||||
? GlobalHsnCode && <th style={{ width: '10%', textAlign: "center" }}>HSN</th>
|
</th>
|
||||||
: HsnCode == true && (
|
)
|
||||||
<th style={{ width: '10%', textAlign: "center" }}>HSN</th>
|
: Item == true && (
|
||||||
)} */}
|
<th style={{ ...tableHeaderStyle }}>
|
||||||
|
Item
|
||||||
|
</th>
|
||||||
|
)}
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
? GlobalQuantity && (
|
? GlobalQuantity && (
|
||||||
<th
|
<th
|
||||||
style={{
|
style={{
|
||||||
width: '10%',
|
width: '10%',
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
|
...tableHeaderStyle,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Qty
|
Qty
|
||||||
|
|
@ -622,6 +706,7 @@ const DCPrintA4Style11 = ({
|
||||||
style={{
|
style={{
|
||||||
width: '10%',
|
width: '10%',
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
|
...tableHeaderStyle,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Qty
|
Qty
|
||||||
|
|
@ -656,7 +741,22 @@ const DCPrintA4Style11 = ({
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
{dataChunk?.map((item, index) => (
|
{dataChunk?.map((item, index) => (
|
||||||
<tr key={index}>
|
<tr
|
||||||
|
key={index}
|
||||||
|
style={{
|
||||||
|
...(index % 2 !== 1 &&
|
||||||
|
rowtypeStyle === 'even'
|
||||||
|
? {
|
||||||
|
...tableBodyStyle,
|
||||||
|
}
|
||||||
|
: index % 2 === 1 &&
|
||||||
|
rowtypeStyle === 'odd'
|
||||||
|
? {
|
||||||
|
...tableBodyStyle,
|
||||||
|
}
|
||||||
|
: {}),
|
||||||
|
}}
|
||||||
|
>
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
? GlobalSlNo && (
|
? GlobalSlNo && (
|
||||||
<td style={{ textAlign: 'center' }}>
|
<td style={{ textAlign: 'center' }}>
|
||||||
|
|
@ -1070,6 +1170,7 @@ const DCPrintA4Style11 = ({
|
||||||
? 'space-between'
|
? 'space-between'
|
||||||
: 'flex-end',
|
: 'flex-end',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
...footerColorStyle,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
|
|
@ -1260,6 +1361,7 @@ const DCPrintA4Style11 = ({
|
||||||
? 'space-between'
|
? 'space-between'
|
||||||
: 'flex-end',
|
: 'flex-end',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
...footerColorStyle,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
|
|
|
||||||
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
|
|
@ -23,6 +23,15 @@ import {
|
||||||
Globalnotes,
|
Globalnotes,
|
||||||
GlobalthemeFormat,
|
GlobalthemeFormat,
|
||||||
GlobalBillName,
|
GlobalBillName,
|
||||||
|
GlobalSelectedPrintHeaderColor,
|
||||||
|
GlobalSelectedPrintHeaderFontColor,
|
||||||
|
GlobalSelectedTableHeaderColor,
|
||||||
|
GlobalSelectedTableHeaderFontColor,
|
||||||
|
GlobalSelectedTableBodyColor,
|
||||||
|
GlobalSelectedTableBodyFontColor,
|
||||||
|
GlobalRowType,
|
||||||
|
GlobalSelectedFooterColor,
|
||||||
|
GlobalSelectedFooterFontColor,
|
||||||
} from '../../../../Features/ThemeChange/ThemeChange';
|
} from '../../../../Features/ThemeChange/ThemeChange';
|
||||||
import { GlobalUpiIDprint } from '../../../../Features/BookingScreen/BookingData/BookingData';
|
import { GlobalUpiIDprint } from '../../../../Features/BookingScreen/BookingData/BookingData';
|
||||||
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle10.scss';
|
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle10.scss';
|
||||||
|
|
@ -304,6 +313,72 @@ const DCPrintStyle10 = ({
|
||||||
const shouldFooterBeOnNewPage =
|
const shouldFooterBeOnNewPage =
|
||||||
lastChunkRows > (!isMobile ? 15 : PageSize == 'A5' ? 5 : 10);
|
lastChunkRows > (!isMobile ? 15 : PageSize == 'A5' ? 5 : 10);
|
||||||
|
|
||||||
|
//
|
||||||
|
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
|
||||||
|
const SelectedHeaderFontColor = useSelector(
|
||||||
|
GlobalSelectedPrintHeaderFontColor
|
||||||
|
);
|
||||||
|
const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
|
||||||
|
const SelectedTableHeaderFontColor = useSelector(
|
||||||
|
GlobalSelectedTableHeaderFontColor
|
||||||
|
);
|
||||||
|
const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
|
||||||
|
const SelectedTableBodyFontColor = useSelector(
|
||||||
|
GlobalSelectedTableBodyFontColor
|
||||||
|
);
|
||||||
|
const SelectedRowType = useSelector(GlobalRowType);
|
||||||
|
const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
|
||||||
|
const SelectedTableFooterFontColor = useSelector(
|
||||||
|
GlobalSelectedFooterFontColor
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
let printColors = DCPrintTemplateDtl?.PrintColors;
|
||||||
|
const headerColor = printColors?.find((obj) => obj.headerColor)?.headerColor;
|
||||||
|
const tableHeaderColor = printColors?.find(
|
||||||
|
(obj) => obj.tableHeaderColor
|
||||||
|
)?.tableHeaderColor;
|
||||||
|
const tableBodyColor = printColors?.find(
|
||||||
|
(obj) => obj.tableBodyColor
|
||||||
|
)?.tableBodyColor;
|
||||||
|
const footerColor = printColors?.find((obj) => obj.footerColor)?.footerColor;
|
||||||
|
|
||||||
|
//
|
||||||
|
const headerStyle = {
|
||||||
|
backgroundColor: GlobaldummyData
|
||||||
|
? SelectedHeaderColor
|
||||||
|
: headerColor?.background,
|
||||||
|
|
||||||
|
color: GlobaldummyData ? SelectedHeaderFontColor : headerColor?.font,
|
||||||
|
};
|
||||||
|
const tableHeaderStyle = {
|
||||||
|
backgroundColor: GlobaldummyData
|
||||||
|
? SelectedTableHeaderColor
|
||||||
|
: tableHeaderColor?.background,
|
||||||
|
|
||||||
|
color: GlobaldummyData
|
||||||
|
? SelectedTableHeaderFontColor
|
||||||
|
: tableHeaderColor?.font,
|
||||||
|
};
|
||||||
|
|
||||||
|
const tableBodyStyle = {
|
||||||
|
backgroundColor: GlobaldummyData
|
||||||
|
? SelectedTableBodyColor
|
||||||
|
: tableBodyColor?.background,
|
||||||
|
color: GlobaldummyData ? SelectedTableBodyFontColor : tableBodyColor?.font,
|
||||||
|
};
|
||||||
|
|
||||||
|
const rowtypeStyle = GlobaldummyData
|
||||||
|
? SelectedRowType
|
||||||
|
: tableBodyColor?.rowType;
|
||||||
|
|
||||||
|
const footerColorStyle = {
|
||||||
|
backgroundColor: GlobaldummyData
|
||||||
|
? SelectedTableFooterColor
|
||||||
|
: footerColor?.background,
|
||||||
|
color: GlobaldummyData ? SelectedTableFooterFontColor : footerColor?.font,
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{FormatTheme ? (
|
{FormatTheme ? (
|
||||||
|
|
@ -353,7 +428,7 @@ const DCPrintStyle10 = ({
|
||||||
width: '100%',
|
width: '100%',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="PrintStyle10-print">
|
<div className="PrintStyle10-print" style={{ ...headerStyle }}>
|
||||||
<div
|
<div
|
||||||
className="ShopName"
|
className="ShopName"
|
||||||
style={{
|
style={{
|
||||||
|
|
@ -591,40 +666,76 @@ const DCPrintStyle10 = ({
|
||||||
<tr>
|
<tr>
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
? GlobalSlNo && (
|
? GlobalSlNo && (
|
||||||
<th style={{ width: '10px' }}>S.N</th>
|
<th
|
||||||
|
style={{ width: '10px', ...tableHeaderStyle }}
|
||||||
|
>
|
||||||
|
S.N
|
||||||
|
</th>
|
||||||
)
|
)
|
||||||
: SLNO && <th style={{ width: '10px' }}>S.N</th>}
|
: SLNO && (
|
||||||
|
<th
|
||||||
|
style={{ width: '10px', ...tableHeaderStyle }}
|
||||||
|
>
|
||||||
|
S.N
|
||||||
|
</th>
|
||||||
|
)}
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
? GlobalItem && (
|
? GlobalItem && (
|
||||||
<th style={{ width: '10px' }}>Item</th>
|
<th
|
||||||
|
style={{ width: '10px', ...tableHeaderStyle }}
|
||||||
|
>
|
||||||
|
Item
|
||||||
|
</th>
|
||||||
)
|
)
|
||||||
: Item && <th style={{ width: '10px' }}>Item</th>}
|
: Item && (
|
||||||
|
<th
|
||||||
|
style={{ width: '10px', ...tableHeaderStyle }}
|
||||||
|
>
|
||||||
|
Item
|
||||||
|
</th>
|
||||||
|
)}
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
? GlobalQuantity && (
|
? GlobalQuantity && (
|
||||||
<th
|
<th
|
||||||
style={{ width: '10px', textAlign: 'right' }}
|
style={{
|
||||||
|
width: '10px',
|
||||||
|
textAlign: 'right',
|
||||||
|
...tableHeaderStyle,
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
Qty
|
Qty
|
||||||
</th>
|
</th>
|
||||||
)
|
)
|
||||||
: Quantity && (
|
: Quantity && (
|
||||||
<th
|
<th
|
||||||
style={{ width: '10px', textAlign: 'right' }}
|
style={{
|
||||||
|
width: '10px',
|
||||||
|
textAlign: 'right',
|
||||||
|
...tableHeaderStyle,
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
Qty
|
Qty
|
||||||
</th>
|
</th>
|
||||||
)}
|
)}
|
||||||
{/* {GlobaldummyData ? GlobalHsnCode && <th style={{ width: '10px', textAlign: 'right' }}>HSN</th> : HsnCode && <th style={{ width: '10px', textAlign: 'right' }}>HSN</th>}
|
|
||||||
{GlobaldummyData ? GlobalMRP && <th style={{ width: '10px', textAlign: 'right' }}>MRP</th> : MRP && <th style={{ width: '10px', textAlign: 'right' }}>MRP</th>}
|
|
||||||
{GlobaldummyData ? GlobalDiscount && <th style={{ width: '10px', textAlign: 'right' }}>Dis </th> : Discount && <th style={{ width: '10px', textAlign: 'right' }}>Dis </th>}
|
|
||||||
{GlobaldummyData ? GlobalRate && <th style={{ width: '10px', textAlign: 'right' }}>Rate</th> : Rate && <th style={{ width: '10px', textAlign: 'right' }}>Rate</th>}
|
|
||||||
{GlobaldummyData ? GlobalAmount && <th style={{ width: '10px', textAlign: 'right' }}>Amt</th> : Amount && <th style={{ width: '10px', textAlign: 'right' }}>Amt</th>} */}
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{dataChunk?.map((item, index) => {
|
{dataChunk?.map((item, index) => {
|
||||||
return (
|
return (
|
||||||
<tr key={index}>
|
<tr
|
||||||
|
key={index}
|
||||||
|
style={{
|
||||||
|
...(index % 2 !== 1 && rowtypeStyle === 'even'
|
||||||
|
? {
|
||||||
|
...tableBodyStyle,
|
||||||
|
}
|
||||||
|
: index % 2 === 1 && rowtypeStyle === 'odd'
|
||||||
|
? {
|
||||||
|
...tableBodyStyle,
|
||||||
|
}
|
||||||
|
: {}),
|
||||||
|
}}
|
||||||
|
>
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
? GlobalSlNo && (
|
? GlobalSlNo && (
|
||||||
<td
|
<td
|
||||||
|
|
@ -782,6 +893,7 @@ const DCPrintStyle10 = ({
|
||||||
? 'space-between'
|
? 'space-between'
|
||||||
: 'flex-end',
|
: 'flex-end',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
...footerColorStyle,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,15 @@ import {
|
||||||
Globalnotes,
|
Globalnotes,
|
||||||
GlobalthemeFormat,
|
GlobalthemeFormat,
|
||||||
GlobalBillName,
|
GlobalBillName,
|
||||||
|
GlobalSelectedPrintHeaderColor,
|
||||||
|
GlobalSelectedPrintHeaderFontColor,
|
||||||
|
GlobalSelectedTableHeaderColor,
|
||||||
|
GlobalSelectedTableHeaderFontColor,
|
||||||
|
GlobalSelectedTableBodyColor,
|
||||||
|
GlobalRowType,
|
||||||
|
GlobalSelectedFooterColor,
|
||||||
|
GlobalSelectedFooterFontColor,
|
||||||
|
GlobalSelectedTableBodyFontColor,
|
||||||
} from '../../../../Features/ThemeChange/ThemeChange';
|
} from '../../../../Features/ThemeChange/ThemeChange';
|
||||||
import { GlobalUpiIDprint } from '../../../../Features/BookingScreen/BookingData/BookingData';
|
import { GlobalUpiIDprint } from '../../../../Features/BookingScreen/BookingData/BookingData';
|
||||||
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle11.scss';
|
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle11.scss';
|
||||||
|
|
@ -287,6 +296,72 @@ const DCPrintStyle11 = ({
|
||||||
: 0;
|
: 0;
|
||||||
const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 5 : 10);
|
const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 5 : 10);
|
||||||
|
|
||||||
|
//
|
||||||
|
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
|
||||||
|
const SelectedHeaderFontColor = useSelector(
|
||||||
|
GlobalSelectedPrintHeaderFontColor
|
||||||
|
);
|
||||||
|
const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
|
||||||
|
const SelectedTableHeaderFontColor = useSelector(
|
||||||
|
GlobalSelectedTableHeaderFontColor
|
||||||
|
);
|
||||||
|
const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
|
||||||
|
const SelectedTableBodyFontColor = useSelector(
|
||||||
|
GlobalSelectedTableBodyFontColor
|
||||||
|
);
|
||||||
|
const SelectedRowType = useSelector(GlobalRowType);
|
||||||
|
const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
|
||||||
|
const SelectedTableFooterFontColor = useSelector(
|
||||||
|
GlobalSelectedFooterFontColor
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
let printColors = DCPrintTemplateDtl?.PrintColors;
|
||||||
|
const headerColor = printColors?.find((obj) => obj.headerColor)?.headerColor;
|
||||||
|
const tableHeaderColor = printColors?.find(
|
||||||
|
(obj) => obj.tableHeaderColor
|
||||||
|
)?.tableHeaderColor;
|
||||||
|
const tableBodyColor = printColors?.find(
|
||||||
|
(obj) => obj.tableBodyColor
|
||||||
|
)?.tableBodyColor;
|
||||||
|
const footerColor = printColors?.find((obj) => obj.footerColor)?.footerColor;
|
||||||
|
|
||||||
|
//
|
||||||
|
const headerStyle = {
|
||||||
|
backgroundColor: GlobaldummyData
|
||||||
|
? SelectedHeaderColor
|
||||||
|
: headerColor?.background,
|
||||||
|
|
||||||
|
color: GlobaldummyData ? SelectedHeaderFontColor : headerColor?.font,
|
||||||
|
};
|
||||||
|
const tableHeaderStyle = {
|
||||||
|
backgroundColor: GlobaldummyData
|
||||||
|
? SelectedTableHeaderColor
|
||||||
|
: tableHeaderColor?.background,
|
||||||
|
|
||||||
|
color: GlobaldummyData
|
||||||
|
? SelectedTableHeaderFontColor
|
||||||
|
: tableHeaderColor?.font,
|
||||||
|
};
|
||||||
|
|
||||||
|
const tableBodyStyle = {
|
||||||
|
backgroundColor: GlobaldummyData
|
||||||
|
? SelectedTableBodyColor
|
||||||
|
: tableBodyColor?.background,
|
||||||
|
color: GlobaldummyData ? SelectedTableBodyFontColor : tableBodyColor?.font,
|
||||||
|
};
|
||||||
|
|
||||||
|
const rowtypeStyle = GlobaldummyData
|
||||||
|
? SelectedRowType
|
||||||
|
: tableBodyColor?.rowType;
|
||||||
|
|
||||||
|
const footerColorStyle = {
|
||||||
|
backgroundColor: GlobaldummyData
|
||||||
|
? SelectedTableFooterColor
|
||||||
|
: footerColor?.background,
|
||||||
|
color: GlobaldummyData ? SelectedTableFooterFontColor : footerColor?.font,
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{FormatTheme ? (
|
{FormatTheme ? (
|
||||||
|
|
@ -331,6 +406,7 @@ const DCPrintStyle11 = ({
|
||||||
padding: 0,
|
padding: 0,
|
||||||
fontWeight: 600,
|
fontWeight: 600,
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
|
...headerStyle,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
|
@ -339,6 +415,7 @@ const DCPrintStyle11 = ({
|
||||||
margin: '2px 0 0 0',
|
margin: '2px 0 0 0',
|
||||||
padding: 0,
|
padding: 0,
|
||||||
fontWeight: 600,
|
fontWeight: 600,
|
||||||
|
...headerStyle,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
|
|
@ -360,7 +437,7 @@ const DCPrintStyle11 = ({
|
||||||
width: '100%',
|
width: '100%',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="PrintStyle11-print">
|
<div className="PrintStyle11-print" style={{ ...headerStyle }}>
|
||||||
{base64Image ? (
|
{base64Image ? (
|
||||||
<img
|
<img
|
||||||
className="PrintStyle11-BrandImage"
|
className="PrintStyle11-BrandImage"
|
||||||
|
|
@ -584,40 +661,76 @@ const DCPrintStyle11 = ({
|
||||||
<tr>
|
<tr>
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
? GlobalSlNo && (
|
? GlobalSlNo && (
|
||||||
<th style={{ width: '10px' }}>S.No</th>
|
<th
|
||||||
|
style={{ width: '10px', ...tableHeaderStyle }}
|
||||||
|
>
|
||||||
|
S.No
|
||||||
|
</th>
|
||||||
)
|
)
|
||||||
: SLNO && <th style={{ width: '10px' }}>S.No</th>}
|
: SLNO && (
|
||||||
|
<th
|
||||||
|
style={{ width: '10px', ...tableHeaderStyle }}
|
||||||
|
>
|
||||||
|
S.No
|
||||||
|
</th>
|
||||||
|
)}
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
? GlobalItem && (
|
? GlobalItem && (
|
||||||
<th style={{ width: '10px' }}>Item</th>
|
<th
|
||||||
|
style={{ width: '10px', ...tableHeaderStyle }}
|
||||||
|
>
|
||||||
|
Item
|
||||||
|
</th>
|
||||||
)
|
)
|
||||||
: Item && <th style={{ width: '10px' }}>Item</th>}
|
: Item && (
|
||||||
|
<th
|
||||||
|
style={{ width: '10px', ...tableHeaderStyle }}
|
||||||
|
>
|
||||||
|
Item
|
||||||
|
</th>
|
||||||
|
)}
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
? GlobalQuantity && (
|
? GlobalQuantity && (
|
||||||
<th
|
<th
|
||||||
style={{ width: '10px', textAlign: 'right' }}
|
style={{
|
||||||
|
width: '10px',
|
||||||
|
textAlign: 'right',
|
||||||
|
...tableHeaderStyle,
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
Qty
|
Qty
|
||||||
</th>
|
</th>
|
||||||
)
|
)
|
||||||
: Quantity && (
|
: Quantity && (
|
||||||
<th
|
<th
|
||||||
style={{ width: '10px', textAlign: 'right' }}
|
style={{
|
||||||
|
width: '10px',
|
||||||
|
textAlign: 'right',
|
||||||
|
...tableHeaderStyle,
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
Qty
|
Qty
|
||||||
</th>
|
</th>
|
||||||
)}
|
)}
|
||||||
{/* {GlobaldummyData ? GlobalHsnCode && <th style={{ width: '10px', textAlign: 'right' }}>HSN</th> : HsnCode && <th style={{ width: '10px', textAlign: 'right' }}>HSN</th>}
|
|
||||||
{GlobaldummyData ? GlobalMRP && <th style={{ width: '10px', textAlign: 'right' }}>MRP</th> : MRP && <th style={{ width: '10px', textAlign: 'right' }}>MRP</th>}
|
|
||||||
{GlobaldummyData ? GlobalDiscount && <th style={{ width: '10px', textAlign: 'right' }}>Dis </th> : Discount && <th style={{ width: '10px', textAlign: 'right' }}>Dis </th>}
|
|
||||||
{GlobaldummyData ? GlobalRate && <th style={{ width: '10px', textAlign: 'right' }}>Rate</th> : Rate && <th style={{ width: '10px', textAlign: 'right' }}>Rate</th>}
|
|
||||||
{GlobaldummyData ? GlobalAmount && <th style={{ width: '10px', textAlign: 'right' }}>Amt</th> : Amount && <th style={{ width: '10px', textAlign: 'right' }}>Amt</th>} */}
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{dataChunk?.map((item, index) => {
|
{dataChunk?.map((item, index) => {
|
||||||
return (
|
return (
|
||||||
<tr key={index}>
|
<tr
|
||||||
|
key={index}
|
||||||
|
style={{
|
||||||
|
...(index % 2 !== 1 && rowtypeStyle === 'even'
|
||||||
|
? {
|
||||||
|
...tableBodyStyle,
|
||||||
|
}
|
||||||
|
: index % 2 === 1 && rowtypeStyle === 'odd'
|
||||||
|
? {
|
||||||
|
...tableBodyStyle,
|
||||||
|
}
|
||||||
|
: {}),
|
||||||
|
}}
|
||||||
|
>
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
? GlobalSlNo && <td>{index + 1}</td>
|
? GlobalSlNo && <td>{index + 1}</td>
|
||||||
: SLNO && (
|
: SLNO && (
|
||||||
|
|
@ -695,11 +808,6 @@ const DCPrintStyle11 = ({
|
||||||
{item?.Qty || item?.DispatchedQty}
|
{item?.Qty || item?.DispatchedQty}
|
||||||
</td>
|
</td>
|
||||||
)}
|
)}
|
||||||
{/* {GlobaldummyData ? GlobalHsnCode && <td style={{ textAlign: 'right' }}>{item?.HSN}</td> : HsnCode && <td style={{ textAlign: 'right' }}>{item?.HSN}</td>}
|
|
||||||
{GlobaldummyData ? GlobalMRP && <td style={{ textAlign: 'right' }}>{item?.MRP}</td> : MRP && <td style={{ textAlign: 'right' }}>{item?.SinglePc === 'Y' ? item?.Rate : item?.MRP}</td>}
|
|
||||||
{GlobaldummyData ? GlobalDiscount && <td style={{ textAlign: 'right' }}>{item.discount}</td> : Discount && <td style={{ textAlign: 'right' }}>{item?.Type != "C" ? item?.OfferAmt || 0 : item?.OfferValue || 0}</td>}
|
|
||||||
{GlobaldummyData ? GlobalRate && <td style={{ textAlign: 'right' }}>{item?.Rate}</td> : Rate && <td style={{ textAlign: 'right' }}>{item?.Rate}</td>}
|
|
||||||
{GlobaldummyData ? GlobalAmount && <td style={{ textAlign: 'right' }}>{item?.TotalAmt}</td> : Amount && <td style={{ textAlign: 'right' }}>{item?.Type != "C" ? item?.TotalAmt - item?.OfferAmt || 0 : item?.TotalAmt - item?.OfferValue || 0}</td>} */}
|
|
||||||
</tr>
|
</tr>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|
@ -751,6 +859,7 @@ const DCPrintStyle11 = ({
|
||||||
? 'space-between'
|
? 'space-between'
|
||||||
: 'flex-end',
|
: 'flex-end',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
...footerColorStyle,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,15 @@ import {
|
||||||
Globalnotes,
|
Globalnotes,
|
||||||
GlobalthemeFormat,
|
GlobalthemeFormat,
|
||||||
GlobalBillName,
|
GlobalBillName,
|
||||||
|
GlobalSelectedPrintHeaderColor,
|
||||||
|
GlobalSelectedPrintHeaderFontColor,
|
||||||
|
GlobalSelectedTableHeaderColor,
|
||||||
|
GlobalSelectedTableHeaderFontColor,
|
||||||
|
GlobalSelectedTableBodyColor,
|
||||||
|
GlobalSelectedTableBodyFontColor,
|
||||||
|
GlobalRowType,
|
||||||
|
GlobalSelectedFooterColor,
|
||||||
|
GlobalSelectedFooterFontColor,
|
||||||
} from '../../../../Features/ThemeChange/ThemeChange';
|
} from '../../../../Features/ThemeChange/ThemeChange';
|
||||||
import { GlobalUpiIDprint } from '../../../../Features/BookingScreen/BookingData/BookingData';
|
import { GlobalUpiIDprint } from '../../../../Features/BookingScreen/BookingData/BookingData';
|
||||||
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle12.scss';
|
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle12.scss';
|
||||||
|
|
@ -433,6 +442,72 @@ const DCPrintstyle12 = ({
|
||||||
await printDiv('DCPrintStyle12', style12, 'FontApply');
|
await printDiv('DCPrintStyle12', style12, 'FontApply');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//
|
||||||
|
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
|
||||||
|
const SelectedHeaderFontColor = useSelector(
|
||||||
|
GlobalSelectedPrintHeaderFontColor
|
||||||
|
);
|
||||||
|
const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
|
||||||
|
const SelectedTableHeaderFontColor = useSelector(
|
||||||
|
GlobalSelectedTableHeaderFontColor
|
||||||
|
);
|
||||||
|
const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
|
||||||
|
const SelectedTableBodyFontColor = useSelector(
|
||||||
|
GlobalSelectedTableBodyFontColor
|
||||||
|
);
|
||||||
|
const SelectedRowType = useSelector(GlobalRowType);
|
||||||
|
const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
|
||||||
|
const SelectedTableFooterFontColor = useSelector(
|
||||||
|
GlobalSelectedFooterFontColor
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
let printColors = DCPrintTemplateDtl?.PrintColors;
|
||||||
|
const headerColor = printColors?.find((obj) => obj.headerColor)?.headerColor;
|
||||||
|
const tableHeaderColor = printColors?.find(
|
||||||
|
(obj) => obj.tableHeaderColor
|
||||||
|
)?.tableHeaderColor;
|
||||||
|
const tableBodyColor = printColors?.find(
|
||||||
|
(obj) => obj.tableBodyColor
|
||||||
|
)?.tableBodyColor;
|
||||||
|
const footerColor = printColors?.find((obj) => obj.footerColor)?.footerColor;
|
||||||
|
|
||||||
|
//
|
||||||
|
const headerStyle = {
|
||||||
|
backgroundColor: GlobaldummyData
|
||||||
|
? SelectedHeaderColor
|
||||||
|
: headerColor?.background,
|
||||||
|
|
||||||
|
color: GlobaldummyData ? SelectedHeaderFontColor : headerColor?.font,
|
||||||
|
};
|
||||||
|
const tableHeaderStyle = {
|
||||||
|
backgroundColor: GlobaldummyData
|
||||||
|
? SelectedTableHeaderColor
|
||||||
|
: tableHeaderColor?.background,
|
||||||
|
|
||||||
|
color: GlobaldummyData
|
||||||
|
? SelectedTableHeaderFontColor
|
||||||
|
: tableHeaderColor?.font,
|
||||||
|
};
|
||||||
|
|
||||||
|
const tableBodyStyle = {
|
||||||
|
backgroundColor: GlobaldummyData
|
||||||
|
? SelectedTableBodyColor
|
||||||
|
: tableBodyColor?.background,
|
||||||
|
color: GlobaldummyData ? SelectedTableBodyFontColor : tableBodyColor?.font,
|
||||||
|
};
|
||||||
|
|
||||||
|
const rowtypeStyle = GlobaldummyData
|
||||||
|
? SelectedRowType
|
||||||
|
: tableBodyColor?.rowType;
|
||||||
|
|
||||||
|
const footerColorStyle = {
|
||||||
|
backgroundColor: GlobaldummyData
|
||||||
|
? SelectedTableFooterColor
|
||||||
|
: footerColor?.background,
|
||||||
|
color: GlobaldummyData ? SelectedTableFooterFontColor : footerColor?.font,
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{FormatTheme ? (
|
{FormatTheme ? (
|
||||||
|
|
@ -483,7 +558,10 @@ const DCPrintstyle12 = ({
|
||||||
width: '100%',
|
width: '100%',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="PrintStyle12-firstDiv">
|
<div
|
||||||
|
className="PrintStyle12-firstDiv"
|
||||||
|
style={{ ...headerStyle }}
|
||||||
|
>
|
||||||
<div style={{ display: 'flex', flexDirection: 'column' }}>
|
<div style={{ display: 'flex', flexDirection: 'column' }}>
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
|
|
@ -735,29 +813,61 @@ const DCPrintstyle12 = ({
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
? GlobalSlNo && <th>S.No</th>
|
? GlobalSlNo && (
|
||||||
: SLNO && <th>S.No</th>}
|
<th style={{ ...tableHeaderStyle }}>S.No</th>
|
||||||
|
)
|
||||||
|
: SLNO && (
|
||||||
|
<th style={{ ...tableHeaderStyle }}>S.No</th>
|
||||||
|
)}
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
? GlobalItem && <th>Description</th>
|
? GlobalItem && (
|
||||||
: Item && <th>Des</th>}
|
<th style={{ ...tableHeaderStyle }}>
|
||||||
|
Description
|
||||||
|
</th>
|
||||||
|
)
|
||||||
|
: Item && (
|
||||||
|
<th style={{ ...tableHeaderStyle }}>Des</th>
|
||||||
|
)}
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
? GlobalQuantity && (
|
? GlobalQuantity && (
|
||||||
<th style={{ textAlign: 'right' }}>Qty</th>
|
<th
|
||||||
|
style={{
|
||||||
|
textAlign: 'right',
|
||||||
|
...tableHeaderStyle,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Qty
|
||||||
|
</th>
|
||||||
)
|
)
|
||||||
: Quantity && (
|
: Quantity && (
|
||||||
<th style={{ textAlign: 'right' }}>Qty</th>
|
<th
|
||||||
|
style={{
|
||||||
|
textAlign: 'right',
|
||||||
|
...tableHeaderStyle,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Qty
|
||||||
|
</th>
|
||||||
)}
|
)}
|
||||||
{/* {GlobaldummyData ? GlobalMRP && <th style={{ textAlign: 'right' }}>MRP</th> : MRP && <th style={{ textAlign: 'right' }}>MRP</th>}
|
|
||||||
{GlobaldummyData ? GlobalRate && <th style={{ textAlign: "right" }}>Rate</th> : Rate && <th style={{ textAlign: "right" }}>Rate</th>}
|
|
||||||
{GlobaldummyData ? GlobalHsnCode && <th style={{ textAlign: "right" }}>HSN</th> : HsnCode && <th style={{ textAlign: "right" }}>HSN</th>}
|
|
||||||
{GlobaldummyData ? GlobalDiscount && <th style={{ textAlign: 'right' }}>(%)</th> : Discount && <th style={{ textAlign: 'right' }}>(%)</th>}
|
|
||||||
{GlobaldummyData ? GlobalAmount && <th style={{ textAlign: "right" }}>Amt</th> : Amount && <th style={{ textAlign: "right" }}>Amt</th>} */}
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{dataChunk?.map((item, index) => {
|
{dataChunk?.map((item, index) => {
|
||||||
return (
|
return (
|
||||||
<tr key={index}>
|
<tr
|
||||||
|
key={index}
|
||||||
|
style={{
|
||||||
|
...(index % 2 !== 1 && rowtypeStyle === 'even'
|
||||||
|
? {
|
||||||
|
...tableBodyStyle,
|
||||||
|
}
|
||||||
|
: index % 2 === 1 && rowtypeStyle === 'odd'
|
||||||
|
? {
|
||||||
|
...tableBodyStyle,
|
||||||
|
}
|
||||||
|
: {}),
|
||||||
|
}}
|
||||||
|
>
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
? GlobalSlNo && (
|
? GlobalSlNo && (
|
||||||
<td style={{ textAlign: 'center' }}>
|
<td style={{ textAlign: 'center' }}>
|
||||||
|
|
@ -841,11 +951,6 @@ const DCPrintstyle12 = ({
|
||||||
{item?.Qty || item?.DispatchedQty}
|
{item?.Qty || item?.DispatchedQty}
|
||||||
</td>
|
</td>
|
||||||
)}
|
)}
|
||||||
{/* {GlobaldummyData ? GlobalMRP && <td style={{ textAlign: 'right' }}>{item?.MRP}</td> : MRP && <td style={{ textAlign: 'right' }}>{item?.SinglePc === 'Y' ? item?.Rate : item?.MRP}</td>}
|
|
||||||
{GlobaldummyData ? GlobalRate && <td style={{ textAlign: 'right' }}>{item?.Rate}</td> : Rate && <td style={{ textAlign: 'right' }}>{item?.Rate}</td>}
|
|
||||||
{GlobaldummyData ? GlobalHsnCode && <td style={{ textAlign: 'right' }}>{item?.HSN}</td> : HsnCode && <td style={{ textAlign: 'right' }}>{item?.HSN}</td>}
|
|
||||||
{GlobaldummyData ? GlobalDiscount && <td style={{ textAlign: 'right' }}>{item?.discount}</td> : Discount && <td style={{ textAlign: 'right' }}>{item?.Type != "C" ? item?.OfferAmt || 0 : item?.OfferValue || 0}</td>}
|
|
||||||
{GlobaldummyData ? GlobalAmount && <td style={{ textAlign: 'right' }}>{item?.TotalAmt}</td> : Amount && <td style={{ textAlign: 'right' }}>{item?.Type != "C" ? item?.TotalAmt - item?.OfferAmt || 0 : item?.TotalAmt - item?.OfferValue || 0}</td>} */}
|
|
||||||
</tr>
|
</tr>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|
@ -898,6 +1003,7 @@ const DCPrintstyle12 = ({
|
||||||
? 'space-between'
|
? 'space-between'
|
||||||
: 'flex-end',
|
: 'flex-end',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
...footerColorStyle,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -23,6 +23,15 @@ import {
|
||||||
Globalnotes,
|
Globalnotes,
|
||||||
GlobalthemeFormat,
|
GlobalthemeFormat,
|
||||||
GlobalBillName,
|
GlobalBillName,
|
||||||
|
GlobalSelectedPrintHeaderColor,
|
||||||
|
GlobalSelectedTableHeaderColor,
|
||||||
|
GlobalSelectedTableBodyColor,
|
||||||
|
GlobalSelectedPrintHeaderFontColor,
|
||||||
|
GlobalSelectedTableHeaderFontColor,
|
||||||
|
GlobalSelectedTableBodyFontColor,
|
||||||
|
GlobalSelectedFooterFontColor,
|
||||||
|
GlobalSelectedFooterColor,
|
||||||
|
GlobalRowType,
|
||||||
} from '../../../../Features/ThemeChange/ThemeChange';
|
} from '../../../../Features/ThemeChange/ThemeChange';
|
||||||
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.scss';
|
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.scss';
|
||||||
import QRCode from 'react-qr-code';
|
import QRCode from 'react-qr-code';
|
||||||
|
|
@ -232,6 +241,70 @@ const DCPrintStyle3 = ({
|
||||||
lastChunkRows > (!isMobile ? 10 : PageSize == 'A5' ? 5 : 10);
|
lastChunkRows > (!isMobile ? 10 : PageSize == 'A5' ? 5 : 10);
|
||||||
console.log(paginatedChunks, dataSource, 'dataSourcedataSource');
|
console.log(paginatedChunks, dataSource, 'dataSourcedataSource');
|
||||||
|
|
||||||
|
//
|
||||||
|
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
|
||||||
|
const SelectedHeaderFontColor = useSelector(
|
||||||
|
GlobalSelectedPrintHeaderFontColor
|
||||||
|
);
|
||||||
|
const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
|
||||||
|
const SelectedTableHeaderFontColor = useSelector(
|
||||||
|
GlobalSelectedTableHeaderFontColor
|
||||||
|
);
|
||||||
|
const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
|
||||||
|
const SelectedTableBodyFontColor = useSelector(
|
||||||
|
GlobalSelectedTableBodyFontColor
|
||||||
|
);
|
||||||
|
const SelectedRowType = useSelector(GlobalRowType);
|
||||||
|
const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
|
||||||
|
const SelectedTableFooterFontColor = useSelector(
|
||||||
|
GlobalSelectedFooterFontColor
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
let printColors = DCPrintTemplateDtl?.PrintColors;
|
||||||
|
const headerColor = printColors?.find((obj) => obj.headerColor)?.headerColor;
|
||||||
|
const tableHeaderColor = printColors?.find(
|
||||||
|
(obj) => obj.tableHeaderColor
|
||||||
|
)?.tableHeaderColor;
|
||||||
|
const tableBodyColor = printColors?.find(
|
||||||
|
(obj) => obj.tableBodyColor
|
||||||
|
)?.tableBodyColor;
|
||||||
|
const footerColor = printColors?.find((obj) => obj.footerColor)?.footerColor;
|
||||||
|
|
||||||
|
//
|
||||||
|
const headerStyle = {
|
||||||
|
backgroundColor: GlobaldummyData
|
||||||
|
? SelectedHeaderColor
|
||||||
|
: headerColor?.background,
|
||||||
|
color: GlobaldummyData ? SelectedHeaderFontColor : headerColor?.font,
|
||||||
|
};
|
||||||
|
const tableHeaderStyle = {
|
||||||
|
backgroundColor: GlobaldummyData
|
||||||
|
? SelectedTableHeaderColor
|
||||||
|
: tableHeaderColor?.background,
|
||||||
|
color: GlobaldummyData
|
||||||
|
? SelectedTableHeaderFontColor
|
||||||
|
: tableHeaderColor?.font,
|
||||||
|
};
|
||||||
|
|
||||||
|
const tableBodyStyle = {
|
||||||
|
backgroundColor: GlobaldummyData
|
||||||
|
? SelectedTableBodyColor
|
||||||
|
: tableBodyColor?.background,
|
||||||
|
color: GlobaldummyData ? SelectedTableBodyFontColor : tableBodyColor?.font,
|
||||||
|
};
|
||||||
|
|
||||||
|
const rowtypeStyle = GlobaldummyData
|
||||||
|
? SelectedRowType
|
||||||
|
: tableBodyColor?.rowType;
|
||||||
|
|
||||||
|
const footerColorStyle = {
|
||||||
|
backgroundColor: GlobaldummyData
|
||||||
|
? SelectedTableFooterColor
|
||||||
|
: footerColor?.background,
|
||||||
|
color: GlobaldummyData ? SelectedTableFooterFontColor : footerColor?.font,
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div
|
<div
|
||||||
|
|
@ -272,7 +345,7 @@ const DCPrintStyle3 = ({
|
||||||
width: '100%',
|
width: '100%',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="PrintStyle3-print">
|
<div className="PrintStyle3-print" style={{ ...headerStyle }}>
|
||||||
<div style={{ fontSize: '30px', fontweight: '900' }}>
|
<div style={{ fontSize: '30px', fontweight: '900' }}>
|
||||||
{GlobaldummyData ? 'XYZ Shop' : BranchName}
|
{GlobaldummyData ? 'XYZ Shop' : BranchName}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -473,6 +546,7 @@ const DCPrintStyle3 = ({
|
||||||
width: '100%',
|
width: '100%',
|
||||||
fontweight: '600',
|
fontweight: '600',
|
||||||
gap: '0.2rem',
|
gap: '0.2rem',
|
||||||
|
...tableHeaderStyle,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
|
|
@ -559,6 +633,11 @@ const DCPrintStyle3 = ({
|
||||||
justifyContent: 'space-between',
|
justifyContent: 'space-between',
|
||||||
width: '100%',
|
width: '100%',
|
||||||
gap: '0.2rem',
|
gap: '0.2rem',
|
||||||
|
...(index % 2 !== 1 && rowtypeStyle === 'even'
|
||||||
|
? { ...tableBodyStyle }
|
||||||
|
: index % 2 === 1 && rowtypeStyle === 'odd'
|
||||||
|
? { ...tableBodyStyle }
|
||||||
|
: {}),
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
|
|
@ -688,6 +767,7 @@ const DCPrintStyle3 = ({
|
||||||
? 'space-between'
|
? 'space-between'
|
||||||
: 'flex-end',
|
: 'flex-end',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
...footerColorStyle,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
|
|
|
||||||
|
|
@ -17,19 +17,25 @@ import {
|
||||||
GlobalprintQrcodet,
|
GlobalprintQrcodet,
|
||||||
GlobalPritdummyData,
|
GlobalPritdummyData,
|
||||||
changeReprintDataFound,
|
changeReprintDataFound,
|
||||||
GloabalFieldDetails,
|
|
||||||
GlobalprintSignature,
|
GlobalprintSignature,
|
||||||
GlobalprinttermsAndConditions,
|
GlobalprinttermsAndConditions,
|
||||||
GlobalSignatureImage,
|
GlobalSignatureImage,
|
||||||
Globalnotes,
|
Globalnotes,
|
||||||
GlobalthemeFormat,
|
GlobalthemeFormat,
|
||||||
GlobalBillName,
|
GlobalBillName,
|
||||||
|
GlobalSelectedPrintHeaderColor,
|
||||||
|
GlobalSelectedPrintHeaderFontColor,
|
||||||
|
GlobalSelectedTableHeaderColor,
|
||||||
|
GlobalSelectedTableHeaderFontColor,
|
||||||
|
GlobalSelectedTableBodyColor,
|
||||||
|
GlobalSelectedTableBodyFontColor,
|
||||||
|
GlobalRowType,
|
||||||
|
GlobalSelectedFooterColor,
|
||||||
|
GlobalSelectedFooterFontColor,
|
||||||
} from '../../../../Features/ThemeChange/ThemeChange';
|
} from '../../../../Features/ThemeChange/ThemeChange';
|
||||||
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.scss';
|
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.scss';
|
||||||
import { GlobalUpiIDprint } from '../../../../Features/BookingScreen/BookingData/BookingData';
|
|
||||||
import QRCode from 'react-qr-code';
|
import QRCode from 'react-qr-code';
|
||||||
import signature from '../../../../Images/signatureimage.jpg';
|
import signature from '../../../../Images/signatureimage.jpg';
|
||||||
import { ApplicationPreferences } from '../../../../Features/BrachLogin/BranchLogin';
|
|
||||||
import { isMobile } from 'react-device-detect';
|
import { isMobile } from 'react-device-detect';
|
||||||
|
|
||||||
const DCPrintstyle4 = ({
|
const DCPrintstyle4 = ({
|
||||||
|
|
@ -219,6 +225,71 @@ const DCPrintstyle4 = ({
|
||||||
? paginatedChunks[paginatedChunks.length - 1].length
|
? paginatedChunks[paginatedChunks.length - 1].length
|
||||||
: 0;
|
: 0;
|
||||||
const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 11 : 20);
|
const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 11 : 20);
|
||||||
|
|
||||||
|
//
|
||||||
|
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
|
||||||
|
const SelectedHeaderFontColor = useSelector(
|
||||||
|
GlobalSelectedPrintHeaderFontColor
|
||||||
|
);
|
||||||
|
const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
|
||||||
|
const SelectedTableHeaderFontColor = useSelector(
|
||||||
|
GlobalSelectedTableHeaderFontColor
|
||||||
|
);
|
||||||
|
const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
|
||||||
|
const SelectedTableBodyFontColor = useSelector(
|
||||||
|
GlobalSelectedTableBodyFontColor
|
||||||
|
);
|
||||||
|
const SelectedRowType = useSelector(GlobalRowType);
|
||||||
|
const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
|
||||||
|
const SelectedTableFooterFontColor = useSelector(
|
||||||
|
GlobalSelectedFooterFontColor
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
let printColors = DCPrintTemplateDtl?.PrintColors;
|
||||||
|
const headerColor = printColors?.find((obj) => obj.headerColor)?.headerColor;
|
||||||
|
const tableHeaderColor = printColors?.find(
|
||||||
|
(obj) => obj.tableHeaderColor
|
||||||
|
)?.tableHeaderColor;
|
||||||
|
const tableBodyColor = printColors?.find(
|
||||||
|
(obj) => obj.tableBodyColor
|
||||||
|
)?.tableBodyColor;
|
||||||
|
const footerColor = printColors?.find((obj) => obj.footerColor)?.footerColor;
|
||||||
|
|
||||||
|
//
|
||||||
|
const headerStyle = {
|
||||||
|
backgroundColor: GlobaldummyData
|
||||||
|
? SelectedHeaderColor
|
||||||
|
: headerColor?.background,
|
||||||
|
color: GlobaldummyData ? SelectedHeaderFontColor : headerColor?.font,
|
||||||
|
};
|
||||||
|
const tableHeaderStyle = {
|
||||||
|
backgroundColor: GlobaldummyData
|
||||||
|
? SelectedTableHeaderColor
|
||||||
|
: tableHeaderColor?.background,
|
||||||
|
color: GlobaldummyData
|
||||||
|
? SelectedTableHeaderFontColor
|
||||||
|
: tableHeaderColor?.font,
|
||||||
|
};
|
||||||
|
|
||||||
|
const tableBodyStyle = {
|
||||||
|
backgroundColor: GlobaldummyData
|
||||||
|
? SelectedTableBodyColor
|
||||||
|
: tableBodyColor?.background,
|
||||||
|
color: GlobaldummyData ? SelectedTableBodyFontColor : tableBodyColor?.font,
|
||||||
|
};
|
||||||
|
|
||||||
|
const rowtypeStyle = GlobaldummyData
|
||||||
|
? SelectedRowType
|
||||||
|
: tableBodyColor?.rowType;
|
||||||
|
|
||||||
|
const footerColorStyle = {
|
||||||
|
backgroundColor: GlobaldummyData
|
||||||
|
? SelectedTableFooterColor
|
||||||
|
: footerColor?.background,
|
||||||
|
color: GlobaldummyData ? SelectedTableFooterFontColor : footerColor?.font,
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div
|
<div
|
||||||
|
|
@ -261,7 +332,7 @@ const DCPrintstyle4 = ({
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="PrintStyle4-fistDiv"
|
className="PrintStyle4-fistDiv"
|
||||||
style={{ flexDirection: 'column' }}
|
style={{ flexDirection: 'column', ...headerStyle }}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
|
|
@ -470,38 +541,69 @@ const DCPrintstyle4 = ({
|
||||||
<tr>
|
<tr>
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
? GlobalSlNo && (
|
? GlobalSlNo && (
|
||||||
<th style={{ width: '10px' }}>S.No</th>
|
<th
|
||||||
|
style={{ width: '10px', ...tableHeaderStyle }}
|
||||||
|
>
|
||||||
|
S.No
|
||||||
|
</th>
|
||||||
)
|
)
|
||||||
: SLNO && <th style={{ width: '10px' }}>S.No</th>}
|
: SLNO && (
|
||||||
|
<th
|
||||||
|
style={{ width: '10px', ...tableHeaderStyle }}
|
||||||
|
>
|
||||||
|
S.No
|
||||||
|
</th>
|
||||||
|
)}
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
? GlobalItem && <th>Item</th>
|
? GlobalItem && (
|
||||||
: Item && <th>Item</th>}
|
<th style={{ ...tableHeaderStyle }}>Item</th>
|
||||||
|
)
|
||||||
|
: Item && (
|
||||||
|
<th style={{ ...tableHeaderStyle }}>Item</th>
|
||||||
|
)}
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
? GlobalQuantity && (
|
? GlobalQuantity && (
|
||||||
<th
|
<th
|
||||||
style={{ width: '10px', textAlign: 'right' }}
|
style={{
|
||||||
|
width: '10px',
|
||||||
|
textAlign: 'right',
|
||||||
|
...tableHeaderStyle,
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
Qty
|
Qty
|
||||||
</th>
|
</th>
|
||||||
)
|
)
|
||||||
: Quantity && (
|
: Quantity && (
|
||||||
<th
|
<th
|
||||||
style={{ width: '30px', textAlign: 'right' }}
|
style={{
|
||||||
|
width: '30px',
|
||||||
|
textAlign: 'right',
|
||||||
|
...tableHeaderStyle,
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
Qty
|
Qty
|
||||||
</th>
|
</th>
|
||||||
)}
|
)}
|
||||||
{/* {GlobaldummyData ? GlobalHsnCode && <th style={{ width: '10px', textAlign: 'right' }}>HSN</th> : HsnCode && <th style={{ width: '30px', textAlign: 'right' }}>HSN</th>}
|
|
||||||
{GlobaldummyData ? GlobalMRP && <th style={{ width: '10px', textAlign: 'right' }}>MRP</th> : MRP && <th style={{ width: '30px', textAlign: 'right' }}>MRP</th>}
|
|
||||||
{GlobaldummyData ? GlobalDiscount && <th style={{ width: '10px', textAlign: 'right' }}>Dis </th> : Discount && <th style={{ width: '30px', textAlign: 'right' }}>Dis </th>}
|
|
||||||
{GlobaldummyData ? GlobalRate && <th style={{ width: '10px', textAlign: 'right' }}>Rate</th> : Rate && <th style={{ width: '40px', textAlign: 'right' }}>Rate</th>}
|
|
||||||
{GlobaldummyData ? GlobalAmount && <th style={{ width: '10px', textAlign: 'right' }}>Amt</th> : Amount && <th style={{ width: '30px', textAlign: 'right' }}>Amt</th>} */}
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{dataChunk?.map((item, index) => {
|
{dataChunk?.map((item, index) => {
|
||||||
return (
|
return (
|
||||||
<tr key={index} style={{ gap: '0.2rem' }}>
|
<tr
|
||||||
|
key={index}
|
||||||
|
style={{
|
||||||
|
gap: '0.2rem',
|
||||||
|
...(index % 2 !== 1 && rowtypeStyle === 'even'
|
||||||
|
? {
|
||||||
|
...tableBodyStyle,
|
||||||
|
}
|
||||||
|
: index % 2 === 1 && rowtypeStyle === 'odd'
|
||||||
|
? {
|
||||||
|
...tableBodyStyle,
|
||||||
|
}
|
||||||
|
: {}),
|
||||||
|
}}
|
||||||
|
>
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
? GlobalSlNo && <td>{index + 1}</td>
|
? GlobalSlNo && <td>{index + 1}</td>
|
||||||
: SLNO && (
|
: SLNO && (
|
||||||
|
|
@ -547,11 +649,6 @@ const DCPrintstyle4 = ({
|
||||||
{item?.Qty || item?.DispatchedQty}
|
{item?.Qty || item?.DispatchedQty}
|
||||||
</td>
|
</td>
|
||||||
)}
|
)}
|
||||||
{/* {GlobaldummyData ? GlobalHsnCode && <td style={{ textAlign: 'right' }}>{item?.HSN}</td> : HsnCode && <td style={{ textAlign: 'right' }}>{item?.HSN}</td>}
|
|
||||||
{GlobaldummyData ? GlobalMRP && <td style={{ textAlign: 'right' }}>{item?.MRP}</td> : MRP && <td style={{ textAlign: 'right' }}>{item?.SinglePc === 'Y' ? item?.Rate : item?.MRP}</td>}
|
|
||||||
{GlobaldummyData ? GlobalDiscount && <td style={{ textAlign: 'right' }}>{item.discount}</td> : Discount && <td style={{ textAlign: 'right' }}>{item?.Type != "C" ? item?.OfferAmt || 0 : item?.OfferValue || 0}</td>}
|
|
||||||
{GlobaldummyData ? GlobalRate && <td style={{ textAlign: 'right' }}>{item?.Rate}</td> : Rate && <td style={{ textAlign: 'right' }}>{item?.Rate}</td>}
|
|
||||||
{GlobaldummyData ? GlobalAmount && <td style={{ textAlign: 'right' }}>{item?.TotalAmt}</td> : Amount && <td style={{ textAlign: 'right' }}> {item?.Type != "C" ? item?.TotalAmt - item?.OfferAmt || 0 : item?.TotalAmt - item?.OfferValue || 0}</td>} */}
|
|
||||||
</tr>
|
</tr>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|
@ -604,6 +701,7 @@ const DCPrintstyle4 = ({
|
||||||
? 'space-between'
|
? 'space-between'
|
||||||
: 'flex-end',
|
: 'flex-end',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
...footerColorStyle,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,15 @@ import {
|
||||||
Globalnotes,
|
Globalnotes,
|
||||||
GlobalthemeFormat,
|
GlobalthemeFormat,
|
||||||
GlobalBillName,
|
GlobalBillName,
|
||||||
|
GlobalSelectedPrintHeaderColor,
|
||||||
|
GlobalSelectedPrintHeaderFontColor,
|
||||||
|
GlobalSelectedTableHeaderColor,
|
||||||
|
GlobalSelectedTableHeaderFontColor,
|
||||||
|
GlobalSelectedTableBodyColor,
|
||||||
|
GlobalSelectedTableBodyFontColor,
|
||||||
|
GlobalSelectedFooterFontColor,
|
||||||
|
GlobalSelectedFooterColor,
|
||||||
|
GlobalRowType,
|
||||||
} from '../../../../Features/ThemeChange/ThemeChange';
|
} from '../../../../Features/ThemeChange/ThemeChange';
|
||||||
import { GlobalUpiIDprint } from '../../../../Features/BookingScreen/BookingData/BookingData';
|
import { GlobalUpiIDprint } from '../../../../Features/BookingScreen/BookingData/BookingData';
|
||||||
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle5.scss';
|
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle5.scss';
|
||||||
|
|
@ -203,6 +212,74 @@ const DCPrintStyle5 = ({
|
||||||
: 0;
|
: 0;
|
||||||
const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 15 : 15);
|
const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 15 : 15);
|
||||||
|
|
||||||
|
//
|
||||||
|
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
|
||||||
|
const SelectedHeaderFontColor = useSelector(
|
||||||
|
GlobalSelectedPrintHeaderFontColor
|
||||||
|
);
|
||||||
|
const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
|
||||||
|
const SelectedTableHeaderFontColor = useSelector(
|
||||||
|
GlobalSelectedTableHeaderFontColor
|
||||||
|
);
|
||||||
|
const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
|
||||||
|
const SelectedTableBodyFontColor = useSelector(
|
||||||
|
GlobalSelectedTableBodyFontColor
|
||||||
|
);
|
||||||
|
const SelectedRowType = useSelector(GlobalRowType);
|
||||||
|
const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
|
||||||
|
const SelectedTableFooterFontColor = useSelector(
|
||||||
|
GlobalSelectedFooterFontColor
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
let printColors = DCPrintTemplateDtl?.PrintColors;
|
||||||
|
const headerColor = printColors?.find((obj) => obj.headerColor)?.headerColor;
|
||||||
|
const tableHeaderColor = printColors?.find(
|
||||||
|
(obj) => obj.tableHeaderColor
|
||||||
|
)?.tableHeaderColor;
|
||||||
|
const tableBodyColor = printColors?.find(
|
||||||
|
(obj) => obj.tableBodyColor
|
||||||
|
)?.tableBodyColor;
|
||||||
|
const footerColor = printColors?.find((obj) => obj.footerColor)?.footerColor;
|
||||||
|
const netAmtColor = printColors?.find((obj) => obj.netAmtColor)?.netAmtColor;
|
||||||
|
|
||||||
|
//
|
||||||
|
const headerStyle = {
|
||||||
|
backgroundColor: GlobaldummyData
|
||||||
|
? SelectedHeaderColor
|
||||||
|
: headerColor?.background,
|
||||||
|
|
||||||
|
color: GlobaldummyData ? SelectedHeaderFontColor : headerColor?.font,
|
||||||
|
};
|
||||||
|
const tableHeaderStyle = {
|
||||||
|
backgroundColor: GlobaldummyData
|
||||||
|
? SelectedTableHeaderColor
|
||||||
|
: tableHeaderColor?.background,
|
||||||
|
|
||||||
|
color: GlobaldummyData
|
||||||
|
? SelectedTableHeaderFontColor
|
||||||
|
: tableHeaderColor?.font,
|
||||||
|
};
|
||||||
|
|
||||||
|
const tableBodyStyle = {
|
||||||
|
backgroundColor: GlobaldummyData
|
||||||
|
? SelectedTableBodyColor
|
||||||
|
: tableBodyColor?.background,
|
||||||
|
color: GlobaldummyData ? SelectedTableBodyFontColor : tableBodyColor?.font,
|
||||||
|
};
|
||||||
|
|
||||||
|
const rowtypeStyle = GlobaldummyData
|
||||||
|
? SelectedRowType
|
||||||
|
: tableBodyColor?.rowType;
|
||||||
|
|
||||||
|
const footerColorStyle = {
|
||||||
|
backgroundColor: GlobaldummyData
|
||||||
|
? SelectedTableFooterColor
|
||||||
|
: footerColor?.background,
|
||||||
|
|
||||||
|
color: GlobaldummyData ? SelectedTableFooterFontColor : footerColor?.font,
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div
|
<div
|
||||||
|
|
@ -243,7 +320,7 @@ const DCPrintStyle5 = ({
|
||||||
width: '100%',
|
width: '100%',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="PrintStyle5-Head">
|
<div className="PrintStyle5-Head" style={{ ...headerStyle }}>
|
||||||
<div>
|
<div>
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
|
|
@ -458,6 +535,7 @@ const DCPrintStyle5 = ({
|
||||||
fontSize: 'clamp(1rem, 2.5vw, 1.2rem)',
|
fontSize: 'clamp(1rem, 2.5vw, 1.2rem)',
|
||||||
width: '95%',
|
width: '95%',
|
||||||
gap: '0.5rem',
|
gap: '0.5rem',
|
||||||
|
...tableHeaderStyle,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
|
|
@ -502,10 +580,6 @@ const DCPrintStyle5 = ({
|
||||||
QTY
|
QTY
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{/* {GlobaldummyData ? GlobalMRP && <div style={{ width: '100%', textAlign: 'right' }}>MRP</div> : MRP && <div style={{ width: '100%', textAlign: 'right' }}>MRP</div>}
|
|
||||||
{GlobaldummyData ? GlobalRate && <div style={{ width: '100%', textAlign: 'right' }}>RATE</div> : Rate && <div style={{ width: '100%', textAlign: 'right' }}>RATE</div>}
|
|
||||||
{GlobaldummyData ? GlobalDiscount && <div style={{ width: '100%', textAlign: 'right' }}>DIS </div> : Discount && <div style={{ width: '100%', textAlign: 'right' }}>DIS </div>}
|
|
||||||
{GlobaldummyData ? GlobalAmount && <div style={{ width: '100%', textAlign: 'right' }}> Amt </div> : Amount && <div style={{ width: '100%', textAlign: 'right' }}> AMT </div>} */}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr className="hrline" />
|
<hr className="hrline" />
|
||||||
|
|
@ -521,6 +595,15 @@ const DCPrintStyle5 = ({
|
||||||
fontWeight: '600',
|
fontWeight: '600',
|
||||||
width: '95%',
|
width: '95%',
|
||||||
gap: '0.5rem',
|
gap: '0.5rem',
|
||||||
|
...(index % 2 !== 1 && rowtypeStyle === 'even'
|
||||||
|
? {
|
||||||
|
...tableBodyStyle,
|
||||||
|
}
|
||||||
|
: index % 2 === 1 && rowtypeStyle === 'odd'
|
||||||
|
? {
|
||||||
|
...tableBodyStyle,
|
||||||
|
}
|
||||||
|
: {}),
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
|
|
@ -576,31 +659,6 @@ const DCPrintStyle5 = ({
|
||||||
item?.RequestVariantName}{' '}
|
item?.RequestVariantName}{' '}
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
{/* <div>
|
|
||||||
{
|
|
||||||
(item?.Size || "1") +
|
|
||||||
(item?.SinglePc === "Y" ? "PCS" : item?.Type !== "C" ? item?.UomName : "COMBO") +
|
|
||||||
(item?.BrandName || "") +
|
|
||||||
(
|
|
||||||
item?.ProductIdentifierDtls?.filter(
|
|
||||||
(items) => items.SerialNumber && items.SerialNumber !== ""
|
|
||||||
)?.map((a, index) => <div key={`serial-${index}`}>{a.SerialNumber}</div>) || ""
|
|
||||||
) +
|
|
||||||
(
|
|
||||||
item?.ProductIdentifierDtls?.filter(
|
|
||||||
(item1) => item1.IMEI1 || item1.IMEI2
|
|
||||||
)?.map((item2, index) => {
|
|
||||||
const imei1 = item2.IMEI1 || "";
|
|
||||||
const imei2 = item2.IMEI2 || "";
|
|
||||||
return (
|
|
||||||
<div key={`imei-${index}`}>
|
|
||||||
{[imei1, imei2].filter(Boolean).join(",")}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}) || "") +
|
|
||||||
"-" + (GlobaldummyData ? (GlobalQuantity && item?.SalesQty) : item?.SalesQty)
|
|
||||||
}
|
|
||||||
</div> */}
|
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -617,9 +675,6 @@ const DCPrintStyle5 = ({
|
||||||
{item?.Qty || item?.DispatchedQty}
|
{item?.Qty || item?.DispatchedQty}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{/* {GlobaldummyData ? GlobalRate && <div style={{ width: '100%', textAlign: 'right' }}>{item?.Rate}</div> : Rate && <div style={{ width: '100%', textAlign: 'right' }}>{item?.Rate}</div>}
|
|
||||||
{GlobaldummyData ? GlobalDiscount && <div style={{ width: '100%', textAlign: 'right' }}>{item?.discount}</div> : Discount && <div style={{ width: '100%', textAlign: 'right' }}>{item?.Type != "C" ? item?.OfferAmt || 0 : item?.OfferValue || 0}</div>}
|
|
||||||
{GlobaldummyData ? GlobalAmount && <div style={{ width: "100%", textAlign: "right", }}>{item?.TotalAmt}</div> : Amount && <div style={{ width: "100%", textAlign: "right", }}> {item?.Type != "C" ? item?.TotalAmt - item?.OfferAmt || 0 : item?.TotalAmt - item?.OfferValue || 0}</div>} */}
|
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</>
|
</>
|
||||||
|
|
@ -666,6 +721,7 @@ const DCPrintStyle5 = ({
|
||||||
? 'space-between'
|
? 'space-between'
|
||||||
: 'flex-end',
|
: 'flex-end',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
...footerColorStyle,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,15 @@ import {
|
||||||
Globalnotes,
|
Globalnotes,
|
||||||
GlobalthemeFormat,
|
GlobalthemeFormat,
|
||||||
GlobalBillName,
|
GlobalBillName,
|
||||||
|
GlobalSelectedPrintHeaderColor,
|
||||||
|
GlobalSelectedPrintHeaderFontColor,
|
||||||
|
GlobalSelectedTableHeaderColor,
|
||||||
|
GlobalSelectedTableHeaderFontColor,
|
||||||
|
GlobalSelectedTableBodyColor,
|
||||||
|
GlobalSelectedTableBodyFontColor,
|
||||||
|
GlobalSelectedFooterFontColor,
|
||||||
|
GlobalSelectedFooterColor,
|
||||||
|
GlobalRowType,
|
||||||
} from '../../../../Features/ThemeChange/ThemeChange';
|
} from '../../../../Features/ThemeChange/ThemeChange';
|
||||||
import { GlobalUpiIDprint } from '../../../../Features/BookingScreen/BookingData/BookingData';
|
import { GlobalUpiIDprint } from '../../../../Features/BookingScreen/BookingData/BookingData';
|
||||||
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle6.scss';
|
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle6.scss';
|
||||||
|
|
@ -219,6 +228,72 @@ const DCPrintstyle6 = ({
|
||||||
: 0;
|
: 0;
|
||||||
const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 20 : 24);
|
const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 20 : 24);
|
||||||
|
|
||||||
|
//
|
||||||
|
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
|
||||||
|
const SelectedHeaderFontColor = useSelector(
|
||||||
|
GlobalSelectedPrintHeaderFontColor
|
||||||
|
);
|
||||||
|
const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
|
||||||
|
const SelectedTableHeaderFontColor = useSelector(
|
||||||
|
GlobalSelectedTableHeaderFontColor
|
||||||
|
);
|
||||||
|
const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
|
||||||
|
const SelectedTableBodyFontColor = useSelector(
|
||||||
|
GlobalSelectedTableBodyFontColor
|
||||||
|
);
|
||||||
|
const SelectedRowType = useSelector(GlobalRowType);
|
||||||
|
const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
|
||||||
|
const SelectedTableFooterFontColor = useSelector(
|
||||||
|
GlobalSelectedFooterFontColor
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
let printColors = DCPrintTemplateDtl?.PrintColors;
|
||||||
|
const headerColor = printColors?.find((obj) => obj.headerColor)?.headerColor;
|
||||||
|
const tableHeaderColor = printColors?.find(
|
||||||
|
(obj) => obj.tableHeaderColor
|
||||||
|
)?.tableHeaderColor;
|
||||||
|
const tableBodyColor = printColors?.find(
|
||||||
|
(obj) => obj.tableBodyColor
|
||||||
|
)?.tableBodyColor;
|
||||||
|
const footerColor = printColors?.find((obj) => obj.footerColor)?.footerColor;
|
||||||
|
|
||||||
|
//
|
||||||
|
const headerStyle = {
|
||||||
|
backgroundColor: GlobaldummyData
|
||||||
|
? SelectedHeaderColor
|
||||||
|
: headerColor?.background,
|
||||||
|
|
||||||
|
color: GlobaldummyData ? SelectedHeaderFontColor : headerColor?.font,
|
||||||
|
};
|
||||||
|
const tableHeaderStyle = {
|
||||||
|
backgroundColor: GlobaldummyData
|
||||||
|
? SelectedTableHeaderColor
|
||||||
|
: tableHeaderColor?.background,
|
||||||
|
|
||||||
|
color: GlobaldummyData
|
||||||
|
? SelectedTableHeaderFontColor
|
||||||
|
: tableHeaderColor?.font,
|
||||||
|
};
|
||||||
|
|
||||||
|
const tableBodyStyle = {
|
||||||
|
backgroundColor: GlobaldummyData
|
||||||
|
? SelectedTableBodyColor
|
||||||
|
: tableBodyColor?.background,
|
||||||
|
color: GlobaldummyData ? SelectedTableBodyFontColor : tableBodyColor?.font,
|
||||||
|
};
|
||||||
|
|
||||||
|
const rowtypeStyle = GlobaldummyData
|
||||||
|
? SelectedRowType
|
||||||
|
: tableBodyColor?.rowType;
|
||||||
|
|
||||||
|
const footerColorStyle = {
|
||||||
|
backgroundColor: GlobaldummyData
|
||||||
|
? SelectedTableFooterColor
|
||||||
|
: footerColor?.background,
|
||||||
|
color: GlobaldummyData ? SelectedTableFooterFontColor : footerColor?.font,
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div
|
<div
|
||||||
|
|
@ -259,7 +334,7 @@ const DCPrintstyle6 = ({
|
||||||
width: '100%',
|
width: '100%',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="PrintStyle6-firstDiv">
|
<div className="PrintStyle6-firstDiv" style={{ ...headerStyle }}>
|
||||||
<div
|
<div
|
||||||
className="P6HdBrnchName"
|
className="P6HdBrnchName"
|
||||||
style={{
|
style={{
|
||||||
|
|
@ -470,28 +545,38 @@ const DCPrintstyle6 = ({
|
||||||
<div className="PrintStyle6-print-tableMaster">
|
<div className="PrintStyle6-print-tableMaster">
|
||||||
<table className="PrintStyle6-print-table">
|
<table className="PrintStyle6-print-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr style={{ ...tableHeaderStyle }}>
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
? GlobalSlNo && (
|
? GlobalSlNo && (
|
||||||
<th style={{ width: '10px' }}>S.No</th>
|
<th
|
||||||
|
style={{ width: '10px', ...tableHeaderStyle }}
|
||||||
|
>
|
||||||
|
S.No
|
||||||
|
</th>
|
||||||
)
|
)
|
||||||
: SLNO && (
|
: SLNO && (
|
||||||
<th
|
<th
|
||||||
style={{ width: '10px', textAlign: 'left' }}
|
style={{
|
||||||
|
width: '10px',
|
||||||
|
textAlign: 'left',
|
||||||
|
...tableHeaderStyle,
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
S.No
|
S.No
|
||||||
</th>
|
</th>
|
||||||
)}
|
)}
|
||||||
{GlobaldummyData ? (
|
{GlobaldummyData ? (
|
||||||
(GlobalItem || GlobalQuantity) && (
|
(GlobalItem || GlobalQuantity) && (
|
||||||
<th style={{ width: '10px' }}>
|
<th
|
||||||
|
style={{ width: '10px', ...tableHeaderStyle }}
|
||||||
|
>
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
? GlobalItem && 'ITEM /DES'
|
? GlobalItem && 'ITEM /DES'
|
||||||
: 'ITEM /DES'}{' '}
|
: 'ITEM /DES'}{' '}
|
||||||
</th>
|
</th>
|
||||||
)
|
)
|
||||||
) : (
|
) : (
|
||||||
<th style={{ width: '10px' }}>
|
<th style={{ width: '10px', ...tableHeaderStyle }}>
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
? GlobalItem && 'ITEM /DES'
|
? GlobalItem && 'ITEM /DES'
|
||||||
: Item && 'ITEM /DES'}{' '}
|
: Item && 'ITEM /DES'}{' '}
|
||||||
|
|
@ -500,14 +585,22 @@ const DCPrintstyle6 = ({
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
? GlobalQuantity && (
|
? GlobalQuantity && (
|
||||||
<th
|
<th
|
||||||
style={{ width: '10px', textAlign: 'right' }}
|
style={{
|
||||||
|
width: '10px',
|
||||||
|
textAlign: 'right',
|
||||||
|
...tableHeaderStyle,
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
QTY
|
QTY
|
||||||
</th>
|
</th>
|
||||||
)
|
)
|
||||||
: Quantity && (
|
: Quantity && (
|
||||||
<th
|
<th
|
||||||
style={{ width: '10px', textAlign: 'right' }}
|
style={{
|
||||||
|
width: '10px',
|
||||||
|
textAlign: 'right',
|
||||||
|
...tableHeaderStyle,
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
QTY
|
QTY
|
||||||
</th>
|
</th>
|
||||||
|
|
@ -557,7 +650,20 @@ const DCPrintstyle6 = ({
|
||||||
<tbody>
|
<tbody>
|
||||||
{dataChunk?.map((item, index) => {
|
{dataChunk?.map((item, index) => {
|
||||||
return (
|
return (
|
||||||
<tr key={index}>
|
<tr
|
||||||
|
key={index}
|
||||||
|
style={{
|
||||||
|
...(index % 2 !== 1 && rowtypeStyle === 'even'
|
||||||
|
? {
|
||||||
|
...tableBodyStyle,
|
||||||
|
}
|
||||||
|
: index % 2 === 1 && rowtypeStyle === 'odd'
|
||||||
|
? {
|
||||||
|
...tableBodyStyle,
|
||||||
|
}
|
||||||
|
: {}),
|
||||||
|
}}
|
||||||
|
>
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
? GlobalSlNo && <td>{index + 1}</td>
|
? GlobalSlNo && <td>{index + 1}</td>
|
||||||
: SLNO && (
|
: SLNO && (
|
||||||
|
|
@ -749,6 +855,7 @@ const DCPrintstyle6 = ({
|
||||||
? 'space-between'
|
? 'space-between'
|
||||||
: 'flex-end',
|
: 'flex-end',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
...footerColorStyle,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,15 @@ import {
|
||||||
Globalnotes,
|
Globalnotes,
|
||||||
GlobalthemeFormat,
|
GlobalthemeFormat,
|
||||||
GlobalBillName,
|
GlobalBillName,
|
||||||
|
GlobalSelectedPrintHeaderColor,
|
||||||
|
GlobalSelectedPrintHeaderFontColor,
|
||||||
|
GlobalSelectedTableHeaderColor,
|
||||||
|
GlobalSelectedTableHeaderFontColor,
|
||||||
|
GlobalSelectedTableBodyColor,
|
||||||
|
GlobalSelectedTableBodyFontColor,
|
||||||
|
GlobalRowType,
|
||||||
|
GlobalSelectedFooterColor,
|
||||||
|
GlobalSelectedFooterFontColor,
|
||||||
} from '../../../../Features/ThemeChange/ThemeChange';
|
} from '../../../../Features/ThemeChange/ThemeChange';
|
||||||
import { GlobalUpiIDprint } from '../../../../Features/BookingScreen/BookingData/BookingData';
|
import { GlobalUpiIDprint } from '../../../../Features/BookingScreen/BookingData/BookingData';
|
||||||
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle7.scss';
|
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle7.scss';
|
||||||
|
|
@ -246,6 +255,73 @@ const DCPrintStyle7 = ({
|
||||||
: 0;
|
: 0;
|
||||||
const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 5 : 10);
|
const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 5 : 10);
|
||||||
console.log(BranchName, 'paginatedChunks');
|
console.log(BranchName, 'paginatedChunks');
|
||||||
|
|
||||||
|
//
|
||||||
|
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
|
||||||
|
const SelectedHeaderFontColor = useSelector(
|
||||||
|
GlobalSelectedPrintHeaderFontColor
|
||||||
|
);
|
||||||
|
const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
|
||||||
|
const SelectedTableHeaderFontColor = useSelector(
|
||||||
|
GlobalSelectedTableHeaderFontColor
|
||||||
|
);
|
||||||
|
const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
|
||||||
|
const SelectedTableBodyFontColor = useSelector(
|
||||||
|
GlobalSelectedTableBodyFontColor
|
||||||
|
);
|
||||||
|
const SelectedRowType = useSelector(GlobalRowType);
|
||||||
|
const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
|
||||||
|
const SelectedTableFooterFontColor = useSelector(
|
||||||
|
GlobalSelectedFooterFontColor
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
let printColors = DCPrintTemplateDtl?.PrintColors;
|
||||||
|
const headerColor = printColors?.find((obj) => obj.headerColor)?.headerColor;
|
||||||
|
const tableHeaderColor = printColors?.find(
|
||||||
|
(obj) => obj.tableHeaderColor
|
||||||
|
)?.tableHeaderColor;
|
||||||
|
const tableBodyColor = printColors?.find(
|
||||||
|
(obj) => obj.tableBodyColor
|
||||||
|
)?.tableBodyColor;
|
||||||
|
const footerColor = printColors?.find((obj) => obj.footerColor)?.footerColor;
|
||||||
|
|
||||||
|
//
|
||||||
|
const headerStyle = {
|
||||||
|
backgroundColor: GlobaldummyData
|
||||||
|
? SelectedHeaderColor
|
||||||
|
: headerColor?.background,
|
||||||
|
|
||||||
|
color: GlobaldummyData ? SelectedHeaderFontColor : headerColor?.font,
|
||||||
|
};
|
||||||
|
const tableHeaderStyle = {
|
||||||
|
backgroundColor: GlobaldummyData
|
||||||
|
? SelectedTableHeaderColor
|
||||||
|
: tableHeaderColor?.background,
|
||||||
|
|
||||||
|
color: GlobaldummyData
|
||||||
|
? SelectedTableHeaderFontColor
|
||||||
|
: tableHeaderColor?.font,
|
||||||
|
};
|
||||||
|
|
||||||
|
const tableBodyStyle = {
|
||||||
|
backgroundColor: GlobaldummyData
|
||||||
|
? SelectedTableBodyColor
|
||||||
|
: tableBodyColor?.background,
|
||||||
|
color: GlobaldummyData ? SelectedTableBodyFontColor : tableBodyColor?.font,
|
||||||
|
};
|
||||||
|
|
||||||
|
const rowtypeStyle = GlobaldummyData
|
||||||
|
? SelectedRowType
|
||||||
|
: tableBodyColor?.rowType;
|
||||||
|
|
||||||
|
const footerColorStyle = {
|
||||||
|
backgroundColor: GlobaldummyData
|
||||||
|
? SelectedTableFooterColor
|
||||||
|
: footerColor?.background,
|
||||||
|
color: GlobaldummyData ? SelectedTableFooterFontColor : footerColor?.font,
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div
|
<div
|
||||||
|
|
@ -287,7 +363,7 @@ const DCPrintStyle7 = ({
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<hr class="star-line" />
|
<hr class="star-line" />
|
||||||
<div className="PrintStyle7-print">
|
<div className="PrintStyle7-print" style={{ ...headerStyle }}>
|
||||||
<div style={{ fontSize: '16px', fontWeight: '600' }}>
|
<div style={{ fontSize: '16px', fontWeight: '600' }}>
|
||||||
{' '}
|
{' '}
|
||||||
{GlobaldummyData ? 'XYZ Shop' : BranchName}
|
{GlobaldummyData ? 'XYZ Shop' : BranchName}
|
||||||
|
|
@ -524,31 +600,71 @@ const DCPrintStyle7 = ({
|
||||||
<tr>
|
<tr>
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
? GlobalSlNo && (
|
? GlobalSlNo && (
|
||||||
<th style={{ width: '10px' }}>S.No</th>
|
<th
|
||||||
|
style={{
|
||||||
|
width: '10px',
|
||||||
|
...tableHeaderStyle,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
S.No
|
||||||
|
</th>
|
||||||
)
|
)
|
||||||
: SLNO == true && (
|
: SLNO == true && (
|
||||||
<th style={{ width: '10px' }}>S.No</th>
|
<th
|
||||||
|
style={{
|
||||||
|
width: '10px',
|
||||||
|
...tableHeaderStyle,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
S.No
|
||||||
|
</th>
|
||||||
)}
|
)}
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
? GlobalItem && <th>Item</th>
|
? GlobalItem && (
|
||||||
: Item == true && <th>Item</th>}
|
<th style={{ ...tableHeaderStyle }}>Item</th>
|
||||||
{/* {GlobaldummyData ? GlobalHsnCode && <th style={{ width: '10px', }}>HSN</th> : HsnCode == true && <th style={{ width: '10px', }}>HSN</th>} */}
|
)
|
||||||
|
: Item == true && (
|
||||||
|
<th style={{ ...tableHeaderStyle }}>Item</th>
|
||||||
|
)}
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
? GlobalQuantity && (
|
? GlobalQuantity && (
|
||||||
<th style={{ width: '10px' }}>Qty</th>
|
<th
|
||||||
|
style={{
|
||||||
|
width: '10px',
|
||||||
|
...tableHeaderStyle,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Qty
|
||||||
|
</th>
|
||||||
)
|
)
|
||||||
: Quantity == true && (
|
: Quantity == true && (
|
||||||
<th style={{ width: '10px' }}>Qty</th>
|
<th
|
||||||
|
style={{
|
||||||
|
width: '10px',
|
||||||
|
...tableHeaderStyle,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Qty
|
||||||
|
</th>
|
||||||
)}
|
)}
|
||||||
{/* {GlobaldummyData ? GlobalMRP && <th style={{ width: '10px' }}>MRP</th> : MRP == true && <th style={{ width: '10px' }}>MRP</th>}
|
|
||||||
{GlobaldummyData ? GlobalRate && <th style={{ width: '10px' }}>Rate</th> : Rate == true && <th style={{ width: '10px' }}>Rate</th>}
|
|
||||||
{GlobaldummyData ? GlobalDiscount && <th style={{ width: '10px' }}>Dis </th> : Discount == true && <th style={{ width: '10px' }}>Dis </th>}
|
|
||||||
{GlobaldummyData ? GlobalAmount && <th style={{ width: '10px', textAlign: 'right' }}>Amt</th> : Amount == true && <th style={{ width: '10px', textAlign: 'right' }}>Amt</th>} */}
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{dataChunk?.map((item, index) => (
|
{dataChunk?.map((item, index) => (
|
||||||
<tr key={index}>
|
<tr
|
||||||
|
key={index}
|
||||||
|
style={
|
||||||
|
index % 2 !== 1 && rowtypeStyle === 'even'
|
||||||
|
? {
|
||||||
|
...tableBodyStyle,
|
||||||
|
}
|
||||||
|
: index % 2 === 1 && rowtypeStyle === 'odd'
|
||||||
|
? {
|
||||||
|
...tableBodyStyle,
|
||||||
|
}
|
||||||
|
: {}
|
||||||
|
}
|
||||||
|
>
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
? GlobalSlNo && (
|
? GlobalSlNo && (
|
||||||
<td style={{ textAlign: 'center' }}>
|
<td style={{ textAlign: 'center' }}>
|
||||||
|
|
@ -598,10 +714,6 @@ const DCPrintStyle7 = ({
|
||||||
{item?.Qty || item?.DispatchedQty}
|
{item?.Qty || item?.DispatchedQty}
|
||||||
</td>
|
</td>
|
||||||
)}
|
)}
|
||||||
{/* {GlobaldummyData ? GlobalMRP && <td style={{ textAlign: 'right' }}>{item?.MRP}</td> : MRP == true && <td style={{ textAlign: 'right' }}>{item?.SinglePc === 'Y' ? item?.Rate : item?.MRP}</td>}
|
|
||||||
{GlobaldummyData ? GlobalRate && <td style={{ textAlign: 'right' }}>{item?.Rate}</td> : Rate == true && <td style={{ textAlign: 'right' }}>{item?.Rate}</td>}
|
|
||||||
{GlobaldummyData ? GlobalDiscount && <td>{item.discount}</td> : Discount == true && <td style={{ textAlign: 'right' }}>{item?.Type != "C" ? item?.OfferAmt || 0 : item?.OfferValue || 0}</td>}
|
|
||||||
{GlobaldummyData ? GlobalAmount && <td style={{ textAlign: 'right' }}>{item?.TotalAmt}</td> : Amount == true && <td style={{ textAlign: 'right' }}>{item?.Type != "C" ? item?.TotalAmt - item?.OfferAmt || 0 : item?.TotalAmt - item?.OfferValue || 0}</td>} */}
|
|
||||||
</tr>
|
</tr>
|
||||||
))}
|
))}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
@ -672,6 +784,7 @@ const DCPrintStyle7 = ({
|
||||||
? 'space-between'
|
? 'space-between'
|
||||||
: 'flex-end',
|
: 'flex-end',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
...footerColorStyle,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{GlobaldummyData
|
{GlobaldummyData
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -7,6 +7,7 @@ import moment from 'moment';
|
||||||
import DCPrintA4Style11 from './DCPrintTemplates/DCA4/DCPrintA4Style11';
|
import DCPrintA4Style11 from './DCPrintTemplates/DCA4/DCPrintA4Style11';
|
||||||
import { useSelector } from 'react-redux';
|
import { useSelector } from 'react-redux';
|
||||||
import { GlobalDCPrintTemplate } from '../../Features/ThemeChange/ThemeChange';
|
import { GlobalDCPrintTemplate } from '../../Features/ThemeChange/ThemeChange';
|
||||||
|
import DCPrintStyle1 from './DCPrintTemplates/DCThermalPrinter/DCPrintStyle1';
|
||||||
import DCPrintstyle2 from './DCPrintTemplates/DCThermalPrinter/DCPrintStyle2';
|
import DCPrintstyle2 from './DCPrintTemplates/DCThermalPrinter/DCPrintStyle2';
|
||||||
import DCPrintStyle3 from './DCPrintTemplates/DCThermalPrinter/DCPrintStyle3';
|
import DCPrintStyle3 from './DCPrintTemplates/DCThermalPrinter/DCPrintStyle3';
|
||||||
import DCPrintstyle4 from './DCPrintTemplates/DCThermalPrinter/DCPrintStyle4';
|
import DCPrintstyle4 from './DCPrintTemplates/DCThermalPrinter/DCPrintStyle4';
|
||||||
|
|
@ -20,32 +21,13 @@ import DCPrintStyle11 from './DCPrintTemplates/DCThermalPrinter/DCPrintStyle11';
|
||||||
import DCPrintstyle12 from './DCPrintTemplates/DCThermalPrinter/DCPrintStyle12';
|
import DCPrintstyle12 from './DCPrintTemplates/DCThermalPrinter/DCPrintStyle12';
|
||||||
import DCPrintStyleA5 from './DCPrintTemplates/DCA4/DCPrintStyleA5';
|
import DCPrintStyleA5 from './DCPrintTemplates/DCA4/DCPrintStyleA5';
|
||||||
import DCA4Standard from './DCPrintTemplates/DCA4/DCA4Standard';
|
import DCA4Standard from './DCPrintTemplates/DCA4/DCA4Standard';
|
||||||
import DCPrintStyle1 from './DCPrintTemplates/DCThermalPrinter/DCPrintStyle1';
|
|
||||||
import DCInvicePrint from './DCPrintTemplates/DCThermalPrinter/DCInvicePrint';
|
import DCInvicePrint from './DCPrintTemplates/DCThermalPrinter/DCInvicePrint';
|
||||||
|
|
||||||
// const PrintStyles = `
|
const DeliveryPrint = ({
|
||||||
// @media print {
|
PrintingData1,
|
||||||
// @page {
|
DCprinterTemplateStyle,
|
||||||
// size: A4;
|
DCPrintTemplateDtl,
|
||||||
// margin: 0;
|
}) => {
|
||||||
// }
|
|
||||||
// body {
|
|
||||||
// margin: 1.6cm;
|
|
||||||
// }
|
|
||||||
// .Quo-Print-Body {
|
|
||||||
// padding: 20px;
|
|
||||||
// page-break-after: always;
|
|
||||||
// }
|
|
||||||
// .Quo-Print-Content {
|
|
||||||
// break-inside: avoid;
|
|
||||||
// }
|
|
||||||
// .no-print {
|
|
||||||
// display: none;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// `;
|
|
||||||
|
|
||||||
const DeliveryPrint = ({ PrintingData1, DCprinterTemplateStyle, DCPrintTemplateDtl }) => {
|
|
||||||
const PrintingData = PrintingData1?.[0];
|
const PrintingData = PrintingData1?.[0];
|
||||||
console.log(PrintingData, 'PrintingData');
|
console.log(PrintingData, 'PrintingData');
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
|
|
@ -159,20 +141,29 @@ const DeliveryPrint = ({ PrintingData1, DCprinterTemplateStyle, DCPrintTemplateD
|
||||||
{/* <div className="Quo-Print-address">Gst No:33AAACH7409R1Z8</div> */}
|
{/* <div className="Quo-Print-address">Gst No:33AAACH7409R1Z8</div> */}
|
||||||
</div>
|
</div>
|
||||||
<div className="Quo-Print-Qno">
|
<div className="Quo-Print-Qno">
|
||||||
{PrintingData?.[0]?.DCNo && <div className="Quo-Print-address">
|
{PrintingData?.[0]?.DCNo && (
|
||||||
|
<div className="Quo-Print-address">
|
||||||
Delivery Challan No: {PrintingData?.[0]?.DCNo}
|
Delivery Challan No: {PrintingData?.[0]?.DCNo}
|
||||||
</div>}
|
</div>
|
||||||
{PrintingData?.[0]?.RequestId && <div className="Quo-Print-address">
|
)}
|
||||||
<strong>Ref No #:</strong> {PrintingData?.[0]?.RequestId}
|
{PrintingData?.[0]?.RequestId && (
|
||||||
</div>}
|
<div className="Quo-Print-address">
|
||||||
{PrintingData?.[0]?.DCDate && <div className="Quo-Print-address">
|
<strong>Ref No #:</strong>{' '}
|
||||||
|
{PrintingData?.[0]?.RequestId}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{PrintingData?.[0]?.DCDate && (
|
||||||
|
<div className="Quo-Print-address">
|
||||||
Order Date:{' '}
|
Order Date:{' '}
|
||||||
{dateFormatChange1(PrintingData?.[0]?.DCDate)}
|
{dateFormatChange1(PrintingData?.[0]?.DCDate)}
|
||||||
</div>}
|
</div>
|
||||||
{PrintingData?.[0]?.RequestedDate && <div className="Quo-Print-address">
|
)}
|
||||||
<strong>Requested Date:{' '}</strong>
|
{PrintingData?.[0]?.RequestedDate && (
|
||||||
|
<div className="Quo-Print-address">
|
||||||
|
<strong>Requested Date: </strong>
|
||||||
{dateFormatChange1(PrintingData?.[0]?.RequestedDate)}
|
{dateFormatChange1(PrintingData?.[0]?.RequestedDate)}
|
||||||
</div>}
|
</div>
|
||||||
|
)}
|
||||||
{PrintingData?.[0]?.ModeOfTransport && (
|
{PrintingData?.[0]?.ModeOfTransport && (
|
||||||
<div className="Quo-Print-address">
|
<div className="Quo-Print-address">
|
||||||
Transport Mode: {PrintingData?.[0]?.ModeOfTransport}
|
Transport Mode: {PrintingData?.[0]?.ModeOfTransport}
|
||||||
|
|
@ -193,41 +184,66 @@ const DeliveryPrint = ({ PrintingData1, DCprinterTemplateStyle, DCPrintTemplateD
|
||||||
Vehicle No: {PrintingData?.[0]?.VehicleNo}
|
Vehicle No: {PrintingData?.[0]?.VehicleNo}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{PrintingData?.[0]?.ToBranchDtl?.length > 0 && <div className="Quo-Print-Header">
|
{PrintingData?.[0]?.ToBranchDtl?.length > 0 && (
|
||||||
|
<div className="Quo-Print-Header">
|
||||||
<div>
|
<div>
|
||||||
<div style={{ marginBottom: '10px' }}><strong>Delivery To :</strong></div>
|
<div style={{ marginBottom: '10px' }}>
|
||||||
|
<strong>Delivery To :</strong>
|
||||||
|
</div>
|
||||||
<div className="Quo-Print-Company">
|
<div className="Quo-Print-Company">
|
||||||
<div className="Quo-Print-Cname">{PrintingData?.[0]?.ToBranchDtl?.[0]?.BranchName}</div>
|
<div className="Quo-Print-Cname">
|
||||||
{PrintingData?.[0]?.ToBranchDtl?.[0]?.Address1 && <div className="Quo-Print-address">{PrintingData?.[0]?.ToBranchDtl?.[0]?.Address1}</div>}
|
{PrintingData?.[0]?.ToBranchDtl?.[0]?.BranchName}
|
||||||
{(PrintingData?.[0]?.ToBranchDtl?.[0]?.City || PrintingData?.[0]?.ToBranchDtl?.[0]?.Dist || PrintingData?.[0]?.ToBranchDtl?.[0]?.Zip) && <div className="Quo-Print-address">{`${PrintingData?.[0]?.ToBranchDtl?.[0]?.City}, ${PrintingData?.[0]?.ToBranchDtl?.[0]?.Dist} - ${PrintingData?.[0]?.ToBranchDtl?.[0]?.Zip}`}</div>}
|
</div>
|
||||||
{PrintingData?.[0]?.ToBranchDtl?.[0]?.BrGSTIN && <div className="Quo-Print-address">{PrintingData?.[0]?.ToBranchDtl?.[0]?.BrGSTIN}</div>}
|
{PrintingData?.[0]?.ToBranchDtl?.[0]?.Address1 && (
|
||||||
|
<div className="Quo-Print-address">
|
||||||
|
{PrintingData?.[0]?.ToBranchDtl?.[0]?.Address1}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{(PrintingData?.[0]?.ToBranchDtl?.[0]?.City ||
|
||||||
|
PrintingData?.[0]?.ToBranchDtl?.[0]?.Dist ||
|
||||||
|
PrintingData?.[0]?.ToBranchDtl?.[0]?.Zip) && (
|
||||||
|
<div className="Quo-Print-address">{`${PrintingData?.[0]?.ToBranchDtl?.[0]?.City}, ${PrintingData?.[0]?.ToBranchDtl?.[0]?.Dist} - ${PrintingData?.[0]?.ToBranchDtl?.[0]?.Zip}`}</div>
|
||||||
|
)}
|
||||||
|
{PrintingData?.[0]?.ToBranchDtl?.[0]?.BrGSTIN && (
|
||||||
|
<div className="Quo-Print-address">
|
||||||
|
{PrintingData?.[0]?.ToBranchDtl?.[0]?.BrGSTIN}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
{/* <div className="Quo-Print-address">Gst No:33AAACH7409R1Z8</div> */}
|
{/* <div className="Quo-Print-address">Gst No:33AAACH7409R1Z8</div> */}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="Quo-Print-Qno">
|
<div className="Quo-Print-Qno">
|
||||||
{PrintingData?.[0]?.DispatchId && <div className="Quo-Print-address">
|
{PrintingData?.[0]?.DispatchId && (
|
||||||
<strong>Dispatch No #:</strong> {PrintingData?.[0]?.DispatchId}
|
<div className="Quo-Print-address">
|
||||||
</div>}
|
<strong>Dispatch No #:</strong>{' '}
|
||||||
{PrintingData?.[0]?.CreatedDate && <div className="Quo-Print-address">
|
{PrintingData?.[0]?.DispatchId}
|
||||||
<strong>Dispatch Date:{' '}</strong>
|
|
||||||
{dateFormatChange1(PrintingData?.[0]?.CreatedDate)}
|
|
||||||
</div>}
|
|
||||||
</div>
|
</div>
|
||||||
</div>}
|
)}
|
||||||
|
{PrintingData?.[0]?.CreatedDate && (
|
||||||
|
<div className="Quo-Print-address">
|
||||||
|
<strong>Dispatch Date: </strong>
|
||||||
|
{dateFormatChange1(PrintingData?.[0]?.CreatedDate)}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
<div className="Horizondal-line"></div>
|
<div className="Horizondal-line"></div>
|
||||||
<div className="Quo-Print-Customer">
|
<div className="Quo-Print-Customer">
|
||||||
<div className="Quo-Print-Cname">Delivery Details</div>
|
<div className="Quo-Print-Cname">Delivery Details</div>
|
||||||
{PrintingData?.[0]?.CustName && <div className="Quo-Print-address">
|
{PrintingData?.[0]?.CustName && (
|
||||||
|
<div className="Quo-Print-address">
|
||||||
Name: {PrintingData?.[0]?.CustName}
|
Name: {PrintingData?.[0]?.CustName}
|
||||||
</div>}
|
</div>
|
||||||
|
)}
|
||||||
{/* {PrintingData?.[0]?.CustMobile && ( */}
|
{/* {PrintingData?.[0]?.CustMobile && ( */}
|
||||||
{PrintingData?.[0]?.CustMobile && <div className="Quo-Print-address">
|
{PrintingData?.[0]?.CustMobile && (
|
||||||
|
<div className="Quo-Print-address">
|
||||||
Mobile: {PrintingData?.[0]?.CustMobile}
|
Mobile: {PrintingData?.[0]?.CustMobile}
|
||||||
</div>}
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -270,10 +286,16 @@ const DeliveryPrint = ({ PrintingData1, DCprinterTemplateStyle, DCPrintTemplateD
|
||||||
Variant: {item?.ProdVariantName}
|
Variant: {item?.ProdVariantName}
|
||||||
</div>
|
</div>
|
||||||
)} */}
|
)} */}
|
||||||
{(item?.ProdVariantName || item?.RequestVariantName) && (
|
{(item?.ProdVariantName ||
|
||||||
(item?.RequestVariantName || item?.ProdVariantName) !== 'Variant 1' &&
|
item?.RequestVariantName) &&
|
||||||
<div style={{ fontSize: '0.9em', color: '#666' }}>
|
(item?.RequestVariantName ||
|
||||||
Variant: {item?.RequestVariantName || item?.ProdVariantName}
|
item?.ProdVariantName) !== 'Variant 1' && (
|
||||||
|
<div
|
||||||
|
style={{ fontSize: '0.9em', color: '#666' }}
|
||||||
|
>
|
||||||
|
Variant:{' '}
|
||||||
|
{item?.RequestVariantName ||
|
||||||
|
item?.ProdVariantName}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -295,14 +317,12 @@ const DeliveryPrint = ({ PrintingData1, DCprinterTemplateStyle, DCPrintTemplateD
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
<div style={{ display: 'none' }}>
|
<div style={{ display: 'none' }}>
|
||||||
{DCprinterTemplateStyle === 'Style 1' && (
|
{DCprinterTemplateStyle === 'Style 1' && (
|
||||||
<DCPrintStyle1
|
<DCPrintStyle1
|
||||||
|
|
||||||
DCprinterTemplateStyle={DCprinterTemplateStyle}
|
DCprinterTemplateStyle={DCprinterTemplateStyle}
|
||||||
DCPrintTemplateDtl={DCPrintTemplateDtl}
|
DCPrintTemplateDtl={DCPrintTemplateDtl}
|
||||||
Date1={Date1}
|
Date1={Date1}
|
||||||
|
|
@ -375,7 +395,6 @@ const DeliveryPrint = ({ PrintingData1, DCprinterTemplateStyle, DCPrintTemplateD
|
||||||
)}
|
)}
|
||||||
{DCprinterTemplateStyle === 'Style 4' && (
|
{DCprinterTemplateStyle === 'Style 4' && (
|
||||||
<DCPrintstyle4
|
<DCPrintstyle4
|
||||||
|
|
||||||
DCprinterTemplateStyle={DCprinterTemplateStyle}
|
DCprinterTemplateStyle={DCprinterTemplateStyle}
|
||||||
DCPrintTemplateDtl={DCPrintTemplateDtl}
|
DCPrintTemplateDtl={DCPrintTemplateDtl}
|
||||||
Date1={Date1}
|
Date1={Date1}
|
||||||
|
|
@ -400,7 +419,6 @@ const DeliveryPrint = ({ PrintingData1, DCprinterTemplateStyle, DCPrintTemplateD
|
||||||
)}
|
)}
|
||||||
{DCprinterTemplateStyle === 'Style 5' && (
|
{DCprinterTemplateStyle === 'Style 5' && (
|
||||||
<DCPrintStyle5
|
<DCPrintStyle5
|
||||||
|
|
||||||
DCprinterTemplateStyle={DCprinterTemplateStyle}
|
DCprinterTemplateStyle={DCprinterTemplateStyle}
|
||||||
DCPrintTemplateDtl={DCPrintTemplateDtl}
|
DCPrintTemplateDtl={DCPrintTemplateDtl}
|
||||||
Date1={Date1}
|
Date1={Date1}
|
||||||
|
|
@ -458,7 +476,6 @@ const DeliveryPrint = ({ PrintingData1, DCprinterTemplateStyle, DCPrintTemplateD
|
||||||
BranchName={BranchName}
|
BranchName={BranchName}
|
||||||
BranchZip={BranchZip}
|
BranchZip={BranchZip}
|
||||||
BranchDetails={BranchDetails}
|
BranchDetails={BranchDetails}
|
||||||
|
|
||||||
// CashierName={CashierName}
|
// CashierName={CashierName}
|
||||||
// totalQuantity={totalQuantity}
|
// totalQuantity={totalQuantity}
|
||||||
// OrderDetailGST={OrderDetailGST}
|
// OrderDetailGST={OrderDetailGST}
|
||||||
|
|
@ -498,7 +515,6 @@ const DeliveryPrint = ({ PrintingData1, DCprinterTemplateStyle, DCPrintTemplateD
|
||||||
)}
|
)}
|
||||||
{DCprinterTemplateStyle === 'Style 9' && (
|
{DCprinterTemplateStyle === 'Style 9' && (
|
||||||
<DCPrintStyle9
|
<DCPrintStyle9
|
||||||
|
|
||||||
DCprinterTemplateStyle={DCprinterTemplateStyle}
|
DCprinterTemplateStyle={DCprinterTemplateStyle}
|
||||||
DCPrintTemplateDtl={DCPrintTemplateDtl}
|
DCPrintTemplateDtl={DCPrintTemplateDtl}
|
||||||
Date1={Date1}
|
Date1={Date1}
|
||||||
|
|
@ -523,7 +539,6 @@ const DeliveryPrint = ({ PrintingData1, DCprinterTemplateStyle, DCPrintTemplateD
|
||||||
)}
|
)}
|
||||||
{DCprinterTemplateStyle === 'Style 10' && (
|
{DCprinterTemplateStyle === 'Style 10' && (
|
||||||
<DCPrintStyle10
|
<DCPrintStyle10
|
||||||
|
|
||||||
DCprinterTemplateStyle={DCprinterTemplateStyle}
|
DCprinterTemplateStyle={DCprinterTemplateStyle}
|
||||||
DCPrintTemplateDtl={DCPrintTemplateDtl}
|
DCPrintTemplateDtl={DCPrintTemplateDtl}
|
||||||
Date1={Date1}
|
Date1={Date1}
|
||||||
|
|
@ -572,7 +587,6 @@ const DeliveryPrint = ({ PrintingData1, DCprinterTemplateStyle, DCPrintTemplateD
|
||||||
)}
|
)}
|
||||||
{DCprinterTemplateStyle === 'Style 12' && (
|
{DCprinterTemplateStyle === 'Style 12' && (
|
||||||
<DCPrintstyle12
|
<DCPrintstyle12
|
||||||
|
|
||||||
DCprinterTemplateStyle={DCprinterTemplateStyle}
|
DCprinterTemplateStyle={DCprinterTemplateStyle}
|
||||||
DCPrintTemplateDtl={DCPrintTemplateDtl}
|
DCPrintTemplateDtl={DCPrintTemplateDtl}
|
||||||
Date1={Date1}
|
Date1={Date1}
|
||||||
|
|
@ -597,7 +611,6 @@ const DeliveryPrint = ({ PrintingData1, DCprinterTemplateStyle, DCPrintTemplateD
|
||||||
)}
|
)}
|
||||||
{DCprinterTemplateStyle === 'A4' && (
|
{DCprinterTemplateStyle === 'A4' && (
|
||||||
<DCPrintA4Style11
|
<DCPrintA4Style11
|
||||||
|
|
||||||
DCprinterTemplateStyle={DCprinterTemplateStyle}
|
DCprinterTemplateStyle={DCprinterTemplateStyle}
|
||||||
DCPrintTemplateDtl={DCPrintTemplateDtl}
|
DCPrintTemplateDtl={DCPrintTemplateDtl}
|
||||||
Date1={Date1}
|
Date1={Date1}
|
||||||
|
|
@ -622,7 +635,6 @@ const DeliveryPrint = ({ PrintingData1, DCprinterTemplateStyle, DCPrintTemplateD
|
||||||
)}
|
)}
|
||||||
{DCprinterTemplateStyle === 'A5' && (
|
{DCprinterTemplateStyle === 'A5' && (
|
||||||
<DCPrintStyleA5
|
<DCPrintStyleA5
|
||||||
|
|
||||||
DCprinterTemplateStyle={DCprinterTemplateStyle}
|
DCprinterTemplateStyle={DCprinterTemplateStyle}
|
||||||
DCPrintTemplateDtl={DCPrintTemplateDtl}
|
DCPrintTemplateDtl={DCPrintTemplateDtl}
|
||||||
Date1={Date1}
|
Date1={Date1}
|
||||||
|
|
@ -647,7 +659,6 @@ const DeliveryPrint = ({ PrintingData1, DCprinterTemplateStyle, DCPrintTemplateD
|
||||||
)}
|
)}
|
||||||
{DCprinterTemplateStyle === 'A4Standard' && (
|
{DCprinterTemplateStyle === 'A4Standard' && (
|
||||||
<DCA4Standard
|
<DCA4Standard
|
||||||
|
|
||||||
DCprinterTemplateStyle={DCprinterTemplateStyle}
|
DCprinterTemplateStyle={DCprinterTemplateStyle}
|
||||||
DCPrintTemplateDtl={DCPrintTemplateDtl}
|
DCPrintTemplateDtl={DCPrintTemplateDtl}
|
||||||
Date1={Date1}
|
Date1={Date1}
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@ const CardPage1 = (props) => {
|
||||||
const [QtyIndex, setQtyIndex] = useState(0);
|
const [QtyIndex, setQtyIndex] = useState(0);
|
||||||
const [ConfigDataList, setConfigDataList] = useState([]);
|
const [ConfigDataList, setConfigDataList] = useState([]);
|
||||||
const [maxLimitExceeded, setMaxLimitExceeded] = useState(false);
|
const [maxLimitExceeded, setMaxLimitExceeded] = useState(false);
|
||||||
|
const [maxLimitExceededMessage, setMaxLimitExceededMessage] = useState(null);
|
||||||
const kioskTemplateData = props?.data;
|
const kioskTemplateData = props?.data;
|
||||||
const SettingDataSelector = useSelector(settingDataSelector);
|
const SettingDataSelector = useSelector(settingDataSelector);
|
||||||
const UomPrint = SettingDataSelector?.[0]?.SettingDtlDetails.filter(
|
const UomPrint = SettingDataSelector?.[0]?.SettingDtlDetails.filter(
|
||||||
|
|
@ -60,20 +61,6 @@ const CardPage1 = (props) => {
|
||||||
//Card on click function
|
//Card on click function
|
||||||
|
|
||||||
const CardOnClick = async (item, Parameter) => {
|
const CardOnClick = async (item, Parameter) => {
|
||||||
if ((overAllLimitPreferenece || itemWiseLimitPreferenece) && maxQtyLimit) {
|
|
||||||
if (overAllLimitPreferenece) {
|
|
||||||
const calculatedOverAllQty = calculateOverAllQtyLimit(KioskOrderDetails);
|
|
||||||
if ((calculatedOverAllQty + 1) > maxQtyLimit) {
|
|
||||||
setMaxLimitExceeded(true);
|
|
||||||
// Reset after 3 seconds
|
|
||||||
setTimeout(() => {
|
|
||||||
setMaxLimitExceeded(false);
|
|
||||||
}, 2000);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
setOnePeiceFlow(Parameter === 'OnePeiceProduct');
|
setOnePeiceFlow(Parameter === 'OnePeiceProduct');
|
||||||
|
|
||||||
const transformedItem = {
|
const transformedItem = {
|
||||||
|
|
@ -321,6 +308,61 @@ const CardPage1 = (props) => {
|
||||||
};
|
};
|
||||||
// add Product in cart state
|
// add Product in cart state
|
||||||
const AddOrderDetails = (item) => {
|
const AddOrderDetails = (item) => {
|
||||||
|
if ((overAllLimitPreferenece || itemWiseLimitPreferenece) && maxQtyLimit) {
|
||||||
|
if (overAllLimitPreferenece) {
|
||||||
|
const calculatedOverAllQty = calculateOverAllQtyLimit(KioskOrderDetails);
|
||||||
|
if ((calculatedOverAllQty + 1) > maxQtyLimit) {
|
||||||
|
setMaxLimitExceeded(true);
|
||||||
|
// Reset after 3 seconds
|
||||||
|
setMaxLimitExceededMessage(`Maximum Quantity (${maxQtyLimit}) Reached`);
|
||||||
|
setTimeout(() => {
|
||||||
|
setMaxLimitExceeded(false);
|
||||||
|
setMaxLimitExceededMessage(null);
|
||||||
|
}, 2000);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else if (itemWiseLimitPreferenece) {
|
||||||
|
|
||||||
|
const inwardQtyMap = KioskOrderDetails.reduce((acc, curr) => {
|
||||||
|
const inwardId = curr?.InwardDtlId;
|
||||||
|
const qty = Number(curr?.OrderQty) || 0;
|
||||||
|
|
||||||
|
if (acc[inwardId]) {
|
||||||
|
acc[inwardId] += qty;
|
||||||
|
} else {
|
||||||
|
acc[inwardId] = qty;
|
||||||
|
}
|
||||||
|
|
||||||
|
return acc;
|
||||||
|
}, {});
|
||||||
|
|
||||||
|
const currentInwardId = item?.InwardDtlId;
|
||||||
|
const addQty = 1;
|
||||||
|
|
||||||
|
if (inwardQtyMap[currentInwardId]) {
|
||||||
|
inwardQtyMap[currentInwardId] += addQty;
|
||||||
|
} else {
|
||||||
|
inwardQtyMap[currentInwardId] = addQty;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log("Final InwardDtlId Qty Map:", inwardQtyMap);
|
||||||
|
const isExceeded = Object.values(inwardQtyMap).some(
|
||||||
|
(qty) => qty > maxQtyLimit
|
||||||
|
);
|
||||||
|
|
||||||
|
if (isExceeded) {
|
||||||
|
setMaxLimitExceeded(true);
|
||||||
|
// Reset after 3 seconds
|
||||||
|
setMaxLimitExceededMessage(`Item Quantity Limit Exceeds than ${maxQtyLimit}`);
|
||||||
|
setTimeout(() => {
|
||||||
|
setMaxLimitExceeded(false);
|
||||||
|
setMaxLimitExceededMessage(null);
|
||||||
|
}, 2000);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
const isItemInCart = KioskOrderDetails?.find(
|
const isItemInCart = KioskOrderDetails?.find(
|
||||||
(cartItem) =>
|
(cartItem) =>
|
||||||
cartItem.ProdId === item.ProdId &&
|
cartItem.ProdId === item.ProdId &&
|
||||||
|
|
@ -792,7 +834,7 @@ const CardPage1 = (props) => {
|
||||||
/>
|
/>
|
||||||
<div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}>
|
<div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}>
|
||||||
<p>
|
<p>
|
||||||
<IoIosWarning size={30} color='#b99400' />Maximum Quantity ({maxQtyLimit}) Reached
|
<IoIosWarning size={30} color='#b99400' />{maxLimitExceededMessage}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ const CardPage2 = (props) => {
|
||||||
const BookingType = useSelector(GlobalBookingTypeKiosk);
|
const BookingType = useSelector(GlobalBookingTypeKiosk);
|
||||||
const kioskTemplateData = props?.data;
|
const kioskTemplateData = props?.data;
|
||||||
const [maxLimitExceeded, setMaxLimitExceeded] = useState(false);
|
const [maxLimitExceeded, setMaxLimitExceeded] = useState(false);
|
||||||
|
const [maxLimitExceededMessage, setMaxLimitExceededMessage] = useState(null);
|
||||||
const [openQuantity, setopenQuantity] = useState(false);
|
const [openQuantity, setopenQuantity] = useState(false);
|
||||||
const [VariantOpen, setVariantOpen] = useState(false);
|
const [VariantOpen, setVariantOpen] = useState(false);
|
||||||
const [onePeiceFlow, setOnePeiceFlow] = useState(false);
|
const [onePeiceFlow, setOnePeiceFlow] = useState(false);
|
||||||
|
|
@ -59,20 +60,6 @@ const CardPage2 = (props) => {
|
||||||
//Card on click function
|
//Card on click function
|
||||||
|
|
||||||
const CardOnClick = async (item, Parameter) => {
|
const CardOnClick = async (item, Parameter) => {
|
||||||
if ((overAllLimitPreferenece || itemWiseLimitPreferenece) && maxQtyLimit) {
|
|
||||||
if (overAllLimitPreferenece) {
|
|
||||||
const calculatedOverAllQty = calculateOverAllQtyLimit(KioskOrderDetails);
|
|
||||||
if ((calculatedOverAllQty + 1) > maxQtyLimit) {
|
|
||||||
setMaxLimitExceeded(true);
|
|
||||||
// Reset after 3 seconds
|
|
||||||
setTimeout(() => {
|
|
||||||
setMaxLimitExceeded(false);
|
|
||||||
}, 2000);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
setOnePeiceFlow(Parameter === 'OnePeiceProduct');
|
setOnePeiceFlow(Parameter === 'OnePeiceProduct');
|
||||||
|
|
||||||
const transformedItem = {
|
const transformedItem = {
|
||||||
|
|
@ -321,6 +308,61 @@ const CardPage2 = (props) => {
|
||||||
};
|
};
|
||||||
// add Product in cart state
|
// add Product in cart state
|
||||||
const AddOrderDetails = (item) => {
|
const AddOrderDetails = (item) => {
|
||||||
|
if ((overAllLimitPreferenece || itemWiseLimitPreferenece) && maxQtyLimit) {
|
||||||
|
if (overAllLimitPreferenece) {
|
||||||
|
const calculatedOverAllQty = calculateOverAllQtyLimit(KioskOrderDetails);
|
||||||
|
if ((calculatedOverAllQty + 1) > maxQtyLimit) {
|
||||||
|
setMaxLimitExceeded(true);
|
||||||
|
// Reset after 3 seconds
|
||||||
|
setMaxLimitExceededMessage(`Maximum Quantity (${maxQtyLimit}) Reached`);
|
||||||
|
setTimeout(() => {
|
||||||
|
setMaxLimitExceeded(false);
|
||||||
|
setMaxLimitExceededMessage(null);
|
||||||
|
}, 2000);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else if (itemWiseLimitPreferenece) {
|
||||||
|
|
||||||
|
const inwardQtyMap = KioskOrderDetails.reduce((acc, curr) => {
|
||||||
|
const inwardId = curr?.InwardDtlId;
|
||||||
|
const qty = Number(curr?.OrderQty) || 0;
|
||||||
|
|
||||||
|
if (acc[inwardId]) {
|
||||||
|
acc[inwardId] += qty;
|
||||||
|
} else {
|
||||||
|
acc[inwardId] = qty;
|
||||||
|
}
|
||||||
|
|
||||||
|
return acc;
|
||||||
|
}, {});
|
||||||
|
|
||||||
|
const currentInwardId = item?.InwardDtlId;
|
||||||
|
const addQty = 1;
|
||||||
|
|
||||||
|
if (inwardQtyMap[currentInwardId]) {
|
||||||
|
inwardQtyMap[currentInwardId] += addQty;
|
||||||
|
} else {
|
||||||
|
inwardQtyMap[currentInwardId] = addQty;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log("Final InwardDtlId Qty Map:", inwardQtyMap);
|
||||||
|
const isExceeded = Object.values(inwardQtyMap).some(
|
||||||
|
(qty) => qty > maxQtyLimit
|
||||||
|
);
|
||||||
|
|
||||||
|
if (isExceeded) {
|
||||||
|
setMaxLimitExceeded(true);
|
||||||
|
// Reset after 3 seconds
|
||||||
|
setMaxLimitExceededMessage(`Item Quantity Limit Exceeds than ${maxQtyLimit}`);
|
||||||
|
setTimeout(() => {
|
||||||
|
setMaxLimitExceeded(false);
|
||||||
|
setMaxLimitExceededMessage(null);
|
||||||
|
}, 2000);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
const isItemInCart = KioskOrderDetails?.find(
|
const isItemInCart = KioskOrderDetails?.find(
|
||||||
(cartItem) =>
|
(cartItem) =>
|
||||||
cartItem.ProdId === item.ProdId &&
|
cartItem.ProdId === item.ProdId &&
|
||||||
|
|
@ -601,7 +643,7 @@ const CardPage2 = (props) => {
|
||||||
)}
|
)}
|
||||||
<div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}>
|
<div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}>
|
||||||
<p>
|
<p>
|
||||||
<IoIosWarning size={30} color='#b99400' />Maximum Quantity ({maxQtyLimit}) Reached
|
<IoIosWarning size={30} color='#b99400' />{maxLimitExceededMessage}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<Drawer
|
<Drawer
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ const CardPage3 = (props) => {
|
||||||
const getKioskLightColourdata = useSelector(getKioskLightColour);
|
const getKioskLightColourdata = useSelector(getKioskLightColour);
|
||||||
const BookingType = useSelector(GlobalBookingTypeKiosk);
|
const BookingType = useSelector(GlobalBookingTypeKiosk);
|
||||||
const [maxLimitExceeded, setMaxLimitExceeded] = useState(false);
|
const [maxLimitExceeded, setMaxLimitExceeded] = useState(false);
|
||||||
|
const [maxLimitExceededMessage, setMaxLimitExceededMessage] = useState(null);
|
||||||
const [openQuantity, setopenQuantity] = useState(false);
|
const [openQuantity, setopenQuantity] = useState(false);
|
||||||
const [VariantOpen, setVariantOpen] = useState(false);
|
const [VariantOpen, setVariantOpen] = useState(false);
|
||||||
const [onePeiceFlow, setOnePeiceFlow] = useState(false);
|
const [onePeiceFlow, setOnePeiceFlow] = useState(false);
|
||||||
|
|
@ -58,19 +59,6 @@ const CardPage3 = (props) => {
|
||||||
}, []);
|
}, []);
|
||||||
//Card on click function
|
//Card on click function
|
||||||
const CardOnClick = async (item, Parameter) => {
|
const CardOnClick = async (item, Parameter) => {
|
||||||
if ((overAllLimitPreferenece || itemWiseLimitPreferenece) && maxQtyLimit) {
|
|
||||||
if (overAllLimitPreferenece) {
|
|
||||||
const calculatedOverAllQty = calculateOverAllQtyLimit(KioskOrderDetails);
|
|
||||||
if ((calculatedOverAllQty + 1) > maxQtyLimit) {
|
|
||||||
setMaxLimitExceeded(true);
|
|
||||||
// Reset after 3 seconds
|
|
||||||
setTimeout(() => {
|
|
||||||
setMaxLimitExceeded(false);
|
|
||||||
}, 2000);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
setOnePeiceFlow(Parameter === 'OnePeiceProduct');
|
setOnePeiceFlow(Parameter === 'OnePeiceProduct');
|
||||||
|
|
||||||
const transformedItem = {
|
const transformedItem = {
|
||||||
|
|
@ -318,6 +306,61 @@ const CardPage3 = (props) => {
|
||||||
};
|
};
|
||||||
// add Product in cart state
|
// add Product in cart state
|
||||||
const AddOrderDetails = (item) => {
|
const AddOrderDetails = (item) => {
|
||||||
|
if ((overAllLimitPreferenece || itemWiseLimitPreferenece) && maxQtyLimit) {
|
||||||
|
if (overAllLimitPreferenece) {
|
||||||
|
const calculatedOverAllQty = calculateOverAllQtyLimit(KioskOrderDetails);
|
||||||
|
if ((calculatedOverAllQty + 1) > maxQtyLimit) {
|
||||||
|
setMaxLimitExceeded(true);
|
||||||
|
// Reset after 3 seconds
|
||||||
|
setMaxLimitExceededMessage(`Maximum Quantity (${maxQtyLimit}) Reached`);
|
||||||
|
setTimeout(() => {
|
||||||
|
setMaxLimitExceeded(false);
|
||||||
|
setMaxLimitExceededMessage(null);
|
||||||
|
}, 2000);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else if (itemWiseLimitPreferenece) {
|
||||||
|
|
||||||
|
const inwardQtyMap = KioskOrderDetails.reduce((acc, curr) => {
|
||||||
|
const inwardId = curr?.InwardDtlId;
|
||||||
|
const qty = Number(curr?.OrderQty) || 0;
|
||||||
|
|
||||||
|
if (acc[inwardId]) {
|
||||||
|
acc[inwardId] += qty;
|
||||||
|
} else {
|
||||||
|
acc[inwardId] = qty;
|
||||||
|
}
|
||||||
|
|
||||||
|
return acc;
|
||||||
|
}, {});
|
||||||
|
|
||||||
|
const currentInwardId = item?.InwardDtlId;
|
||||||
|
const addQty = 1;
|
||||||
|
|
||||||
|
if (inwardQtyMap[currentInwardId]) {
|
||||||
|
inwardQtyMap[currentInwardId] += addQty;
|
||||||
|
} else {
|
||||||
|
inwardQtyMap[currentInwardId] = addQty;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log("Final InwardDtlId Qty Map:", inwardQtyMap);
|
||||||
|
const isExceeded = Object.values(inwardQtyMap).some(
|
||||||
|
(qty) => qty > maxQtyLimit
|
||||||
|
);
|
||||||
|
|
||||||
|
if (isExceeded) {
|
||||||
|
setMaxLimitExceeded(true);
|
||||||
|
// Reset after 3 seconds
|
||||||
|
setMaxLimitExceededMessage(`Item Quantity Limit Exceeds than ${maxQtyLimit}`);
|
||||||
|
setTimeout(() => {
|
||||||
|
setMaxLimitExceeded(false);
|
||||||
|
setMaxLimitExceededMessage(null);
|
||||||
|
}, 2000);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
const isItemInCart = KioskOrderDetails?.find(
|
const isItemInCart = KioskOrderDetails?.find(
|
||||||
(cartItem) =>
|
(cartItem) =>
|
||||||
cartItem.ProdId === item.ProdId &&
|
cartItem.ProdId === item.ProdId &&
|
||||||
|
|
@ -604,7 +647,7 @@ const CardPage3 = (props) => {
|
||||||
)}
|
)}
|
||||||
<div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}>
|
<div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}>
|
||||||
<p>
|
<p>
|
||||||
<IoIosWarning size={30} color='#b99400' />Maximum Quantity ({maxQtyLimit}) Reached
|
<IoIosWarning size={30} color='#b99400' />{maxLimitExceededMessage}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<Drawer
|
<Drawer
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ const CardPage4 = (props) => {
|
||||||
const getKioskLightColourdata = useSelector(getKioskLightColour);
|
const getKioskLightColourdata = useSelector(getKioskLightColour);
|
||||||
const BookingType = useSelector(GlobalBookingTypeKiosk);
|
const BookingType = useSelector(GlobalBookingTypeKiosk);
|
||||||
const [maxLimitExceeded, setMaxLimitExceeded] = useState(false);
|
const [maxLimitExceeded, setMaxLimitExceeded] = useState(false);
|
||||||
|
const [maxLimitExceededMessage, setMaxLimitExceededMessage] = useState(null);
|
||||||
const [quantities, setQuantities] = useState({});
|
const [quantities, setQuantities] = useState({});
|
||||||
const [openQuantity, setopenQuantity] = useState(false);
|
const [openQuantity, setopenQuantity] = useState(false);
|
||||||
const [VariantOpen, setVariantOpen] = useState(false);
|
const [VariantOpen, setVariantOpen] = useState(false);
|
||||||
|
|
@ -89,19 +90,6 @@ const CardPage4 = (props) => {
|
||||||
//Card on click function
|
//Card on click function
|
||||||
|
|
||||||
const CardOnClick = async (item, Parameter) => {
|
const CardOnClick = async (item, Parameter) => {
|
||||||
if ((overAllLimitPreferenece || itemWiseLimitPreferenece) && maxQtyLimit) {
|
|
||||||
if (overAllLimitPreferenece) {
|
|
||||||
const calculatedOverAllQty = calculateOverAllQtyLimit(KioskOrderDetails);
|
|
||||||
if ((calculatedOverAllQty + 1) > maxQtyLimit) {
|
|
||||||
setMaxLimitExceeded(true);
|
|
||||||
// Reset after 3 seconds
|
|
||||||
setTimeout(() => {
|
|
||||||
setMaxLimitExceeded(false);
|
|
||||||
}, 2000);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
setOnePeiceFlow(Parameter === 'OnePeiceProduct');
|
setOnePeiceFlow(Parameter === 'OnePeiceProduct');
|
||||||
|
|
||||||
const transformedItem = {
|
const transformedItem = {
|
||||||
|
|
@ -342,6 +330,61 @@ const CardPage4 = (props) => {
|
||||||
};
|
};
|
||||||
// add Product in cart state
|
// add Product in cart state
|
||||||
const AddOrderDetails = (item) => {
|
const AddOrderDetails = (item) => {
|
||||||
|
if ((overAllLimitPreferenece || itemWiseLimitPreferenece) && maxQtyLimit) {
|
||||||
|
if (overAllLimitPreferenece) {
|
||||||
|
const calculatedOverAllQty = calculateOverAllQtyLimit(KioskOrderDetails);
|
||||||
|
if ((calculatedOverAllQty + 1) > maxQtyLimit) {
|
||||||
|
setMaxLimitExceeded(true);
|
||||||
|
// Reset after 3 seconds
|
||||||
|
setMaxLimitExceededMessage(`Maximum Quantity (${maxQtyLimit}) Reached`);
|
||||||
|
setTimeout(() => {
|
||||||
|
setMaxLimitExceeded(false);
|
||||||
|
setMaxLimitExceededMessage(null);
|
||||||
|
}, 2000);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else if (itemWiseLimitPreferenece) {
|
||||||
|
|
||||||
|
const inwardQtyMap = KioskOrderDetails.reduce((acc, curr) => {
|
||||||
|
const inwardId = curr?.InwardDtlId;
|
||||||
|
const qty = Number(curr?.OrderQty) || 0;
|
||||||
|
|
||||||
|
if (acc[inwardId]) {
|
||||||
|
acc[inwardId] += qty;
|
||||||
|
} else {
|
||||||
|
acc[inwardId] = qty;
|
||||||
|
}
|
||||||
|
|
||||||
|
return acc;
|
||||||
|
}, {});
|
||||||
|
|
||||||
|
const currentInwardId = item?.InwardDtlId;
|
||||||
|
const addQty = 1;
|
||||||
|
|
||||||
|
if (inwardQtyMap[currentInwardId]) {
|
||||||
|
inwardQtyMap[currentInwardId] += addQty;
|
||||||
|
} else {
|
||||||
|
inwardQtyMap[currentInwardId] = addQty;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log("Final InwardDtlId Qty Map:", inwardQtyMap);
|
||||||
|
const isExceeded = Object.values(inwardQtyMap).some(
|
||||||
|
(qty) => qty > maxQtyLimit
|
||||||
|
);
|
||||||
|
|
||||||
|
if (isExceeded) {
|
||||||
|
setMaxLimitExceeded(true);
|
||||||
|
// Reset after 3 seconds
|
||||||
|
setMaxLimitExceededMessage(`Item Quantity Limit Exceeds than ${maxQtyLimit}`);
|
||||||
|
setTimeout(() => {
|
||||||
|
setMaxLimitExceeded(false);
|
||||||
|
setMaxLimitExceededMessage(null);
|
||||||
|
}, 2000);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
const isItemInCart = KioskOrderDetails?.find(
|
const isItemInCart = KioskOrderDetails?.find(
|
||||||
(cartItem) =>
|
(cartItem) =>
|
||||||
cartItem.ProdId === item.ProdId &&
|
cartItem.ProdId === item.ProdId &&
|
||||||
|
|
@ -625,7 +668,7 @@ const CardPage4 = (props) => {
|
||||||
)}
|
)}
|
||||||
<div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}>
|
<div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}>
|
||||||
<p>
|
<p>
|
||||||
<IoIosWarning size={30} color='#b99400' />Maximum Quantity ({maxQtyLimit}) Reached
|
<IoIosWarning size={30} color='#b99400' />{maxLimitExceededMessage}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<Drawer
|
<Drawer
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@ const apiUrlToken = import.meta.env.ENV_API_URL_TOKEN;
|
||||||
const KioskBookingPage = () => {
|
const KioskBookingPage = () => {
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const kioskTemplateData = useSelector(getKioskTemplateData);
|
const kioskTemplateData = useSelector(getKioskTemplateData);
|
||||||
|
console.log(kioskTemplateData, 'kioskTemplateData');
|
||||||
const [devicePresent, setDevicePresent] = useState(false);
|
const [devicePresent, setDevicePresent] = useState(false);
|
||||||
const [deviceAccess, setDeviceAccess] = useState(true);
|
const [deviceAccess, setDeviceAccess] = useState(true);
|
||||||
const [deviceAddress, setDeviceAddress] = useState(null);
|
const [deviceAddress, setDeviceAddress] = useState(null);
|
||||||
|
|
|
||||||
|
|
@ -9,9 +9,11 @@ import { PreferenceData } from '../../../Features/BookingScreen/BookingData/Book
|
||||||
import { calculateOverAllQtyLimit } from '../../../utils/calculations';
|
import { calculateOverAllQtyLimit } from '../../../utils/calculations';
|
||||||
import { IoIosWarning } from 'react-icons/io';
|
import { IoIosWarning } from 'react-icons/io';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
|
import { message } from 'antd';
|
||||||
|
|
||||||
const KisokOrderCart1 = (props) => {
|
const KisokOrderCart1 = (props) => {
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
|
const [maxLimitExceededMessage, setMaxLimitExceededMessage] = useState(null);
|
||||||
const [maxLimitExceeded, setMaxLimitExceeded] = useState(false);
|
const [maxLimitExceeded, setMaxLimitExceeded] = useState(false);
|
||||||
const preferenceDatas = useSelector(PreferenceData);
|
const preferenceDatas = useSelector(PreferenceData);
|
||||||
const overAllLimitPreferenece =
|
const overAllLimitPreferenece =
|
||||||
|
|
@ -45,10 +47,51 @@ const KisokOrderCart1 = (props) => {
|
||||||
if ((calculatedOverAllQty + 1) > maxQtyLimit) {
|
if ((calculatedOverAllQty + 1) > maxQtyLimit) {
|
||||||
setMaxLimitExceeded(true);
|
setMaxLimitExceeded(true);
|
||||||
// Reset after 3 seconds
|
// Reset after 3 seconds
|
||||||
|
setMaxLimitExceededMessage(`Maximum Quantity (${maxQtyLimit}) Reached`);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
setMaxLimitExceeded(false);
|
setMaxLimitExceeded(false);
|
||||||
|
setMaxLimitExceededMessage(null);
|
||||||
}, 2000);
|
}, 2000);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else if (itemWiseLimitPreferenece) {
|
||||||
|
|
||||||
|
const inwardQtyMap = KioskOrderDetails.reduce((acc, curr) => {
|
||||||
|
const inwardId = curr?.InwardDtlId;
|
||||||
|
const qty = Number(curr?.OrderQty) || 0;
|
||||||
|
|
||||||
|
if (acc[inwardId]) {
|
||||||
|
acc[inwardId] += qty;
|
||||||
|
} else {
|
||||||
|
acc[inwardId] = qty;
|
||||||
|
}
|
||||||
|
|
||||||
|
return acc;
|
||||||
|
}, {});
|
||||||
|
|
||||||
|
const currentInwardId = item?.InwardDtlId;
|
||||||
|
const addQty = 1;
|
||||||
|
|
||||||
|
if (inwardQtyMap[currentInwardId]) {
|
||||||
|
inwardQtyMap[currentInwardId] += addQty;
|
||||||
|
} else {
|
||||||
|
inwardQtyMap[currentInwardId] = addQty;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log("Final InwardDtlId Qty Map:", inwardQtyMap);
|
||||||
|
const isExceeded = Object.values(inwardQtyMap).some(
|
||||||
|
(qty) => qty > maxQtyLimit
|
||||||
|
);
|
||||||
|
|
||||||
|
if (isExceeded) {
|
||||||
|
setMaxLimitExceeded(true);
|
||||||
|
// Reset after 3 seconds
|
||||||
|
setMaxLimitExceededMessage(`Item Quantity Limit Exceeds than ${maxQtyLimit}`);
|
||||||
|
setTimeout(() => {
|
||||||
|
setMaxLimitExceeded(false);
|
||||||
|
setMaxLimitExceededMessage(null);
|
||||||
|
}, 2000);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -209,13 +252,14 @@ const KisokOrderCart1 = (props) => {
|
||||||
remove
|
remove
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}>
|
|
||||||
<p>
|
|
||||||
<IoIosWarning size={30} color='#b99400' />Maximum Quantity ({maxQtyLimit}) Reached
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
|
<div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}>
|
||||||
|
<p>
|
||||||
|
<IoIosWarning size={30} color='#b99400' />{maxLimitExceededMessage}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ const KisokOrderCart2 = (props) => {
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const preferenceDatas = useSelector(PreferenceData);
|
const preferenceDatas = useSelector(PreferenceData);
|
||||||
const [maxLimitExceeded, setMaxLimitExceeded] = useState(false);
|
const [maxLimitExceeded, setMaxLimitExceeded] = useState(false);
|
||||||
|
const [maxLimitExceededMessage, setMaxLimitExceededMessage] = useState(null);
|
||||||
const overAllLimitPreferenece =
|
const overAllLimitPreferenece =
|
||||||
preferenceDatas?.[0]?.['SettingDtlDetails']?.find(
|
preferenceDatas?.[0]?.['SettingDtlDetails']?.find(
|
||||||
(item) => (item.SettingIdName?.toLowerCase() === 'overalllimit') && item?.SettingValue === 'Y');
|
(item) => (item.SettingIdName?.toLowerCase() === 'overalllimit') && item?.SettingValue === 'Y');
|
||||||
|
|
@ -49,8 +50,50 @@ const KisokOrderCart2 = (props) => {
|
||||||
if ((calculatedOverAllQty + 1) > maxQtyLimit) {
|
if ((calculatedOverAllQty + 1) > maxQtyLimit) {
|
||||||
setMaxLimitExceeded(true);
|
setMaxLimitExceeded(true);
|
||||||
// Reset after 3 seconds
|
// Reset after 3 seconds
|
||||||
|
setMaxLimitExceededMessage(`Maximum Quantity (${maxQtyLimit}) Reached`);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
setMaxLimitExceeded(false);
|
setMaxLimitExceeded(false);
|
||||||
|
setMaxLimitExceededMessage(null);
|
||||||
|
}, 2000);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else if (itemWiseLimitPreferenece) {
|
||||||
|
|
||||||
|
const inwardQtyMap = KioskOrderDetails.reduce((acc, curr) => {
|
||||||
|
const inwardId = curr?.InwardDtlId;
|
||||||
|
const qty = Number(curr?.OrderQty) || 0;
|
||||||
|
|
||||||
|
if (acc[inwardId]) {
|
||||||
|
acc[inwardId] += qty;
|
||||||
|
} else {
|
||||||
|
acc[inwardId] = qty;
|
||||||
|
}
|
||||||
|
|
||||||
|
return acc;
|
||||||
|
}, {});
|
||||||
|
|
||||||
|
const currentInwardId = item?.InwardDtlId;
|
||||||
|
const addQty = 1;
|
||||||
|
|
||||||
|
if (inwardQtyMap[currentInwardId]) {
|
||||||
|
inwardQtyMap[currentInwardId] += addQty;
|
||||||
|
} else {
|
||||||
|
inwardQtyMap[currentInwardId] = addQty;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log("Final InwardDtlId Qty Map:", inwardQtyMap);
|
||||||
|
const isExceeded = Object.values(inwardQtyMap).some(
|
||||||
|
(qty) => qty > maxQtyLimit
|
||||||
|
);
|
||||||
|
|
||||||
|
if (isExceeded) {
|
||||||
|
setMaxLimitExceeded(true);
|
||||||
|
// Reset after 3 seconds
|
||||||
|
setMaxLimitExceededMessage(`Item Quantity Limit Exceeds than ${maxQtyLimit}`);
|
||||||
|
setTimeout(() => {
|
||||||
|
setMaxLimitExceeded(false);
|
||||||
|
setMaxLimitExceededMessage(null);
|
||||||
}, 2000);
|
}, 2000);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -232,7 +275,7 @@ const KisokOrderCart2 = (props) => {
|
||||||
</div>
|
</div>
|
||||||
<div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}>
|
<div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}>
|
||||||
<p>
|
<p>
|
||||||
<IoIosWarning size={30} color='#b99400' />Maximum Quantity ({maxQtyLimit}) Reached
|
<IoIosWarning size={30} color='#b99400' />{maxLimitExceededMessage}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ const KisokOrderCart3 = (props) => {
|
||||||
const [maxLimitExceeded, setMaxLimitExceeded] = useState(false);
|
const [maxLimitExceeded, setMaxLimitExceeded] = useState(false);
|
||||||
const getKioskDarkColourdata = useSelector(getKioskDarkColour);
|
const getKioskDarkColourdata = useSelector(getKioskDarkColour);
|
||||||
const preferenceDatas = useSelector(PreferenceData);
|
const preferenceDatas = useSelector(PreferenceData);
|
||||||
|
const [maxLimitExceededMessage, setMaxLimitExceededMessage] = useState(null);
|
||||||
const overAllLimitPreferenece =
|
const overAllLimitPreferenece =
|
||||||
preferenceDatas?.[0]?.['SettingDtlDetails']?.find(
|
preferenceDatas?.[0]?.['SettingDtlDetails']?.find(
|
||||||
(item) => (item.SettingIdName?.toLowerCase() === 'overalllimit') && item?.SettingValue === 'Y');
|
(item) => (item.SettingIdName?.toLowerCase() === 'overalllimit') && item?.SettingValue === 'Y');
|
||||||
|
|
@ -52,8 +53,50 @@ const KisokOrderCart3 = (props) => {
|
||||||
if ((calculatedOverAllQty + 1) > maxQtyLimit) {
|
if ((calculatedOverAllQty + 1) > maxQtyLimit) {
|
||||||
setMaxLimitExceeded(true);
|
setMaxLimitExceeded(true);
|
||||||
// Reset after 3 seconds
|
// Reset after 3 seconds
|
||||||
|
setMaxLimitExceededMessage(`Maximum Quantity (${maxQtyLimit}) Reached`);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
setMaxLimitExceeded(false);
|
setMaxLimitExceeded(false);
|
||||||
|
setMaxLimitExceededMessage(null);
|
||||||
|
}, 2000);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else if (itemWiseLimitPreferenece) {
|
||||||
|
|
||||||
|
const inwardQtyMap = KioskOrderDetails.reduce((acc, curr) => {
|
||||||
|
const inwardId = curr?.InwardDtlId;
|
||||||
|
const qty = Number(curr?.OrderQty) || 0;
|
||||||
|
|
||||||
|
if (acc[inwardId]) {
|
||||||
|
acc[inwardId] += qty;
|
||||||
|
} else {
|
||||||
|
acc[inwardId] = qty;
|
||||||
|
}
|
||||||
|
|
||||||
|
return acc;
|
||||||
|
}, {});
|
||||||
|
|
||||||
|
const currentInwardId = item?.InwardDtlId;
|
||||||
|
const addQty = 1;
|
||||||
|
|
||||||
|
if (inwardQtyMap[currentInwardId]) {
|
||||||
|
inwardQtyMap[currentInwardId] += addQty;
|
||||||
|
} else {
|
||||||
|
inwardQtyMap[currentInwardId] = addQty;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log("Final InwardDtlId Qty Map:", inwardQtyMap);
|
||||||
|
const isExceeded = Object.values(inwardQtyMap).some(
|
||||||
|
(qty) => qty > maxQtyLimit
|
||||||
|
);
|
||||||
|
|
||||||
|
if (isExceeded) {
|
||||||
|
setMaxLimitExceeded(true);
|
||||||
|
// Reset after 3 seconds
|
||||||
|
setMaxLimitExceededMessage(`Item Quantity Limit Exceeds than ${maxQtyLimit}`);
|
||||||
|
setTimeout(() => {
|
||||||
|
setMaxLimitExceeded(false);
|
||||||
|
setMaxLimitExceededMessage(null);
|
||||||
}, 2000);
|
}, 2000);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -245,7 +288,7 @@ const KisokOrderCart3 = (props) => {
|
||||||
</div>
|
</div>
|
||||||
<div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}>
|
<div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}>
|
||||||
<p>
|
<p>
|
||||||
<IoIosWarning size={30} color='#b99400' />Maximum Quantity ({maxQtyLimit}) Reached
|
<IoIosWarning size={30} color='#b99400' />{maxLimitExceededMessage}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ const OrderView1 = (props) => {
|
||||||
: null;
|
: null;
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const [maxLimitExceeded, setMaxLimitExceeded] = useState(false);
|
const [maxLimitExceeded, setMaxLimitExceeded] = useState(false);
|
||||||
|
const [maxLimitExceededMessage, setMaxLimitExceededMessage] = useState(null);
|
||||||
const KioskOrderDetails = useSelector(GlobalKioskOrderDetails);
|
const KioskOrderDetails = useSelector(GlobalKioskOrderDetails);
|
||||||
const getKioskLightColourdata = useSelector(getKioskLightColour);
|
const getKioskLightColourdata = useSelector(getKioskLightColour);
|
||||||
const preferenceDatas = useSelector(PreferenceData);
|
const preferenceDatas = useSelector(PreferenceData);
|
||||||
|
|
@ -57,16 +58,56 @@ const OrderView1 = (props) => {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
const increase = async (item) => {
|
const increase = async (item) => {
|
||||||
|
|
||||||
|
|
||||||
if ((overAllLimitPreferenece || itemWiseLimitPreferenece) && maxQtyLimit) {
|
if ((overAllLimitPreferenece || itemWiseLimitPreferenece) && maxQtyLimit) {
|
||||||
if (overAllLimitPreferenece) {
|
if (overAllLimitPreferenece) {
|
||||||
const calculatedOverAllQty = calculateOverAllQtyLimit(KioskOrderDetails);
|
const calculatedOverAllQty = calculateOverAllQtyLimit(KioskOrderDetails);
|
||||||
if ((calculatedOverAllQty + 1) > maxQtyLimit) {
|
if ((calculatedOverAllQty + 1) > maxQtyLimit) {
|
||||||
setMaxLimitExceeded(true);
|
setMaxLimitExceeded(true);
|
||||||
// Reset after 3 seconds
|
// Reset after 3 seconds
|
||||||
|
setMaxLimitExceededMessage(`Maximum Quantity (${maxQtyLimit}) Reached`);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
setMaxLimitExceeded(false);
|
setMaxLimitExceeded(false);
|
||||||
|
setMaxLimitExceededMessage(null);
|
||||||
|
}, 2000);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else if (itemWiseLimitPreferenece) {
|
||||||
|
|
||||||
|
const inwardQtyMap = KioskOrderDetails.reduce((acc, curr) => {
|
||||||
|
const inwardId = curr?.InwardDtlId;
|
||||||
|
const qty = Number(curr?.OrderQty) || 0;
|
||||||
|
|
||||||
|
if (acc[inwardId]) {
|
||||||
|
acc[inwardId] += qty;
|
||||||
|
} else {
|
||||||
|
acc[inwardId] = qty;
|
||||||
|
}
|
||||||
|
|
||||||
|
return acc;
|
||||||
|
}, {});
|
||||||
|
|
||||||
|
const currentInwardId = item?.InwardDtlId;
|
||||||
|
const addQty = 1;
|
||||||
|
|
||||||
|
if (inwardQtyMap[currentInwardId]) {
|
||||||
|
inwardQtyMap[currentInwardId] += addQty;
|
||||||
|
} else {
|
||||||
|
inwardQtyMap[currentInwardId] = addQty;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log("Final InwardDtlId Qty Map:", inwardQtyMap);
|
||||||
|
const isExceeded = Object.values(inwardQtyMap).some(
|
||||||
|
(qty) => qty > maxQtyLimit
|
||||||
|
);
|
||||||
|
|
||||||
|
if (isExceeded) {
|
||||||
|
setMaxLimitExceeded(true);
|
||||||
|
// Reset after 3 seconds
|
||||||
|
setMaxLimitExceededMessage(`Item Quantity Limit Exceeds than ${maxQtyLimit}`);
|
||||||
|
setTimeout(() => {
|
||||||
|
setMaxLimitExceeded(false);
|
||||||
|
setMaxLimitExceededMessage(null);
|
||||||
}, 2000);
|
}, 2000);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -258,13 +299,14 @@ const OrderView1 = (props) => {
|
||||||
remove
|
remove
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}>
|
|
||||||
<p>
|
|
||||||
<IoIosWarning size={30} color='#b99400' />Maximum Quantity ({maxQtyLimit}) Reached
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
|
<div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}>
|
||||||
|
<p>
|
||||||
|
<IoIosWarning size={30} color='#b99400' />{maxLimitExceededMessage}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ const KioskOrderView2 = (props) => {
|
||||||
: null;
|
: null;
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const preferenceDatas = useSelector(PreferenceData);
|
const preferenceDatas = useSelector(PreferenceData);
|
||||||
|
const [maxLimitExceededMessage, setMaxLimitExceededMessage] = useState(null);
|
||||||
const [maxLimitExceeded, setMaxLimitExceeded] = useState(false);
|
const [maxLimitExceeded, setMaxLimitExceeded] = useState(false);
|
||||||
const overAllLimitPreferenece =
|
const overAllLimitPreferenece =
|
||||||
preferenceDatas?.[0]?.['SettingDtlDetails']?.find(
|
preferenceDatas?.[0]?.['SettingDtlDetails']?.find(
|
||||||
|
|
@ -73,8 +74,50 @@ const KioskOrderView2 = (props) => {
|
||||||
if ((calculatedOverAllQty + 1) > maxQtyLimit) {
|
if ((calculatedOverAllQty + 1) > maxQtyLimit) {
|
||||||
setMaxLimitExceeded(true);
|
setMaxLimitExceeded(true);
|
||||||
// Reset after 3 seconds
|
// Reset after 3 seconds
|
||||||
|
setMaxLimitExceededMessage(`Maximum Quantity (${maxQtyLimit}) Reached`);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
setMaxLimitExceeded(false);
|
setMaxLimitExceeded(false);
|
||||||
|
setMaxLimitExceededMessage(null);
|
||||||
|
}, 2000);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else if (itemWiseLimitPreferenece) {
|
||||||
|
|
||||||
|
const inwardQtyMap = KioskOrderDetails.reduce((acc, curr) => {
|
||||||
|
const inwardId = curr?.InwardDtlId;
|
||||||
|
const qty = Number(curr?.OrderQty) || 0;
|
||||||
|
|
||||||
|
if (acc[inwardId]) {
|
||||||
|
acc[inwardId] += qty;
|
||||||
|
} else {
|
||||||
|
acc[inwardId] = qty;
|
||||||
|
}
|
||||||
|
|
||||||
|
return acc;
|
||||||
|
}, {});
|
||||||
|
|
||||||
|
const currentInwardId = item?.InwardDtlId;
|
||||||
|
const addQty = 1;
|
||||||
|
|
||||||
|
if (inwardQtyMap[currentInwardId]) {
|
||||||
|
inwardQtyMap[currentInwardId] += addQty;
|
||||||
|
} else {
|
||||||
|
inwardQtyMap[currentInwardId] = addQty;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log("Final InwardDtlId Qty Map:", inwardQtyMap);
|
||||||
|
const isExceeded = Object.values(inwardQtyMap).some(
|
||||||
|
(qty) => qty > maxQtyLimit
|
||||||
|
);
|
||||||
|
|
||||||
|
if (isExceeded) {
|
||||||
|
setMaxLimitExceeded(true);
|
||||||
|
// Reset after 3 seconds
|
||||||
|
setMaxLimitExceededMessage(`Item Quantity Limit Exceeds than ${maxQtyLimit}`);
|
||||||
|
setTimeout(() => {
|
||||||
|
setMaxLimitExceeded(false);
|
||||||
|
setMaxLimitExceededMessage(null);
|
||||||
}, 2000);
|
}, 2000);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -339,7 +382,7 @@ const KioskOrderView2 = (props) => {
|
||||||
</div>
|
</div>
|
||||||
<div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}>
|
<div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}>
|
||||||
<p>
|
<p>
|
||||||
<IoIosWarning size={30} color='#b99400' />Maximum Quantity ({maxQtyLimit}) Reached
|
<IoIosWarning size={30} color='#b99400' />{maxLimitExceededMessage}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ const KioskOrderView = (props) => {
|
||||||
const KioskOrderDetails = useSelector(GlobalKioskOrderDetails);
|
const KioskOrderDetails = useSelector(GlobalKioskOrderDetails);
|
||||||
const getKioskLightColourdata = useSelector(getKioskLightColour);
|
const getKioskLightColourdata = useSelector(getKioskLightColour);
|
||||||
const preferenceDatas = useSelector(PreferenceData);
|
const preferenceDatas = useSelector(PreferenceData);
|
||||||
|
const [maxLimitExceededMessage, setMaxLimitExceededMessage] = useState(null);
|
||||||
const [maxLimitExceeded, setMaxLimitExceeded] = useState(false);
|
const [maxLimitExceeded, setMaxLimitExceeded] = useState(false);
|
||||||
const overAllLimitPreferenece =
|
const overAllLimitPreferenece =
|
||||||
preferenceDatas?.[0]?.['SettingDtlDetails']?.find(
|
preferenceDatas?.[0]?.['SettingDtlDetails']?.find(
|
||||||
|
|
@ -60,15 +61,56 @@ const KioskOrderView = (props) => {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
const increase = async (item) => {
|
const increase = async (item) => {
|
||||||
|
|
||||||
if ((overAllLimitPreferenece || itemWiseLimitPreferenece) && maxQtyLimit) {
|
if ((overAllLimitPreferenece || itemWiseLimitPreferenece) && maxQtyLimit) {
|
||||||
if (overAllLimitPreferenece) {
|
if (overAllLimitPreferenece) {
|
||||||
const calculatedOverAllQty = calculateOverAllQtyLimit(KioskOrderDetails);
|
const calculatedOverAllQty = calculateOverAllQtyLimit(KioskOrderDetails);
|
||||||
if ((calculatedOverAllQty + 1) > maxQtyLimit) {
|
if ((calculatedOverAllQty + 1) > maxQtyLimit) {
|
||||||
setMaxLimitExceeded(true);
|
setMaxLimitExceeded(true);
|
||||||
// Reset after 3 seconds
|
// Reset after 3 seconds
|
||||||
|
setMaxLimitExceededMessage(`Maximum Quantity (${maxQtyLimit}) Reached`);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
setMaxLimitExceeded(false);
|
setMaxLimitExceeded(false);
|
||||||
|
setMaxLimitExceededMessage(null);
|
||||||
|
}, 2000);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else if (itemWiseLimitPreferenece) {
|
||||||
|
|
||||||
|
const inwardQtyMap = KioskOrderDetails.reduce((acc, curr) => {
|
||||||
|
const inwardId = curr?.InwardDtlId;
|
||||||
|
const qty = Number(curr?.OrderQty) || 0;
|
||||||
|
|
||||||
|
if (acc[inwardId]) {
|
||||||
|
acc[inwardId] += qty;
|
||||||
|
} else {
|
||||||
|
acc[inwardId] = qty;
|
||||||
|
}
|
||||||
|
|
||||||
|
return acc;
|
||||||
|
}, {});
|
||||||
|
|
||||||
|
const currentInwardId = item?.InwardDtlId;
|
||||||
|
const addQty = 1;
|
||||||
|
|
||||||
|
if (inwardQtyMap[currentInwardId]) {
|
||||||
|
inwardQtyMap[currentInwardId] += addQty;
|
||||||
|
} else {
|
||||||
|
inwardQtyMap[currentInwardId] = addQty;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log("Final InwardDtlId Qty Map:", inwardQtyMap);
|
||||||
|
const isExceeded = Object.values(inwardQtyMap).some(
|
||||||
|
(qty) => qty > maxQtyLimit
|
||||||
|
);
|
||||||
|
|
||||||
|
if (isExceeded) {
|
||||||
|
setMaxLimitExceeded(true);
|
||||||
|
// Reset after 3 seconds
|
||||||
|
setMaxLimitExceededMessage(`Item Quantity Limit Exceeds than ${maxQtyLimit}`);
|
||||||
|
setTimeout(() => {
|
||||||
|
setMaxLimitExceeded(false);
|
||||||
|
setMaxLimitExceededMessage(null);
|
||||||
}, 2000);
|
}, 2000);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -331,7 +373,7 @@ const KioskOrderView = (props) => {
|
||||||
</div>
|
</div>
|
||||||
<div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}>
|
<div className={`Item3Warning ${maxLimitExceeded ? 'showing' : ''}`}>
|
||||||
<p>
|
<p>
|
||||||
<IoIosWarning size={30} color='#b99400' />Maximum Quantity ({maxQtyLimit}) Reached
|
<IoIosWarning size={30} color='#b99400' />{maxLimitExceededMessage}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -968,16 +968,6 @@ const KioskPayment = (props) => {
|
||||||
};
|
};
|
||||||
await dispatch(sendSms(postData));
|
await dispatch(sendSms(postData));
|
||||||
}
|
}
|
||||||
const goFullScreen = () => {
|
|
||||||
const elem = document.documentElement;
|
|
||||||
|
|
||||||
if (!document.fullscreenElement) {
|
|
||||||
elem.requestFullscreen?.().catch((err) => {
|
|
||||||
console.log("Fullscreen error:", err);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
goFullScreen();
|
|
||||||
clearAllStates();
|
clearAllStates();
|
||||||
} else {
|
} else {
|
||||||
if (
|
if (
|
||||||
|
|
@ -1954,7 +1944,7 @@ const KioskPayment = (props) => {
|
||||||
open={open}
|
open={open}
|
||||||
handleCancel={!selectedPaymentOption && HandleCloseModal}
|
handleCancel={!selectedPaymentOption && HandleCloseModal}
|
||||||
footer={false}
|
footer={false}
|
||||||
width={width > 768 ? 900 : 700}
|
width={width > 768 ? 800 : 600}
|
||||||
children={
|
children={
|
||||||
showPaymentGatewayOptions ? (
|
showPaymentGatewayOptions ? (
|
||||||
<div className="paymentCardMain">
|
<div className="paymentCardMain">
|
||||||
|
|
|
||||||
|
|
@ -561,3 +561,4 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ import { DefaultModal } from '../../../Components/Modal/DefaultModal.jsx';
|
||||||
import { DropDowns } from '../../../Components/Forms/DropDown.jsx';
|
import { DropDowns } from '../../../Components/Forms/DropDown.jsx';
|
||||||
import { useAuth } from '../../../AuthContext.jsx';
|
import { useAuth } from '../../../AuthContext.jsx';
|
||||||
import { FeatureAddon } from '../../../Features/BookingScreen/BookingData/BookingData.js';
|
import { FeatureAddon } from '../../../Features/BookingScreen/BookingData/BookingData.js';
|
||||||
|
import "../../../Pages/openingStock/openingStockForm.scss"
|
||||||
|
|
||||||
const PaymentDetailsList = () => {
|
const PaymentDetailsList = () => {
|
||||||
const { SadminuserAccess } = useAuth();
|
const { SadminuserAccess } = useAuth();
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,7 @@ const PreferenceList = () => {
|
||||||
dashboard: allSettingsMap['dashboard']?.value === 'Y',
|
dashboard: allSettingsMap['dashboard']?.value === 'Y',
|
||||||
shortcutkeys: allSettingsMap['shortcutkeys']?.value === 'Y',
|
shortcutkeys: allSettingsMap['shortcutkeys']?.value === 'Y',
|
||||||
autoreceivestock: allSettingsMap['autoreceivestock']?.value === 'Y',
|
autoreceivestock: allSettingsMap['autoreceivestock']?.value === 'Y',
|
||||||
|
salespageaskiosk: allSettingsMap['salespageaskiosk']?.value === 'Y',
|
||||||
kioskotp: allSettingsMap['kioskotp']?.value === 'Y',
|
kioskotp: allSettingsMap['kioskotp']?.value === 'Y',
|
||||||
decimal: allSettingsMap['decimal']?.value === 'Y',
|
decimal: allSettingsMap['decimal']?.value === 'Y',
|
||||||
enabledModules: [
|
enabledModules: [
|
||||||
|
|
@ -308,6 +309,7 @@ const PreferenceList = () => {
|
||||||
dashboard: values.dashboard,
|
dashboard: values.dashboard,
|
||||||
shortcutkeys: values.shortcutkeys,
|
shortcutkeys: values.shortcutkeys,
|
||||||
autoreceivestock: values.autoreceivestock,
|
autoreceivestock: values.autoreceivestock,
|
||||||
|
salespageaskiosk: values.salespageaskiosk,
|
||||||
kioskotp: values.kioskotp,
|
kioskotp: values.kioskotp,
|
||||||
decimal: values.decimal,
|
decimal: values.decimal,
|
||||||
searchfocus: values.searchfocus,
|
searchfocus: values.searchfocus,
|
||||||
|
|
@ -512,6 +514,10 @@ const PreferenceList = () => {
|
||||||
{renderCheckbox(
|
{renderCheckbox(
|
||||||
'decimal',
|
'decimal',
|
||||||
'Display values with 2 decimal places throughout the app?'
|
'Display values with 2 decimal places throughout the app?'
|
||||||
|
)}
|
||||||
|
{renderCheckbox(
|
||||||
|
'salespageaskiosk',
|
||||||
|
'Do you want to open sales page as kiosk layout?'
|
||||||
)}
|
)}
|
||||||
{(allSettingsMap['onlineindividualslots'] !== undefined ||
|
{(allSettingsMap['onlineindividualslots'] !== undefined ||
|
||||||
allSettingsMap['allow individual booking'] !== undefined ||
|
allSettingsMap['allow individual booking'] !== undefined ||
|
||||||
|
|
@ -549,8 +555,12 @@ const PreferenceList = () => {
|
||||||
<>
|
<>
|
||||||
<Form.Item name="kiosktimelimittype" label="How would you like to apply the time restriction?">
|
<Form.Item name="kiosktimelimittype" label="How would you like to apply the time restriction?">
|
||||||
<Radio.Group onChange={() => formRef.current?.setFieldsValue({ maxtime: undefined })}>
|
<Radio.Group onChange={() => formRef.current?.setFieldsValue({ maxtime: undefined })}>
|
||||||
|
{allSettingsMap['minutes'] !== undefined && (
|
||||||
<Radio value="minutes">Minutes</Radio>
|
<Radio value="minutes">Minutes</Radio>
|
||||||
|
)}
|
||||||
|
{allSettingsMap['hours'] !== undefined && (
|
||||||
<Radio value="hours">Hours</Radio>
|
<Radio value="hours">Hours</Radio>
|
||||||
|
)}
|
||||||
</Radio.Group>
|
</Radio.Group>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
|
|
@ -739,8 +749,12 @@ const PreferenceList = () => {
|
||||||
<>
|
<>
|
||||||
<Form.Item name="quantityrestrictiontype" label="How would you like to apply the quantity restriction?">
|
<Form.Item name="quantityrestrictiontype" label="How would you like to apply the quantity restriction?">
|
||||||
<Radio.Group onChange={() => formRef.current?.setFieldsValue({ maxquantity: undefined })}>
|
<Radio.Group onChange={() => formRef.current?.setFieldsValue({ maxquantity: undefined })}>
|
||||||
|
{allSettingsMap['overalllimit'] !== undefined && (
|
||||||
<Radio value="overall">Overall Order Quantity</Radio>
|
<Radio value="overall">Overall Order Quantity</Radio>
|
||||||
|
)}
|
||||||
|
{allSettingsMap['itemwiselimit'] !== undefined && (
|
||||||
<Radio value="itemwise">Item-wise Quantity</Radio>
|
<Radio value="itemwise">Item-wise Quantity</Radio>
|
||||||
|
)}
|
||||||
</Radio.Group>
|
</Radio.Group>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -166,7 +166,6 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
width: 100%;
|
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 1.3rem;
|
bottom: 1.3rem;
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ import {
|
||||||
} from '../../Features/UpiDetails/UpiDetails.js';
|
} from '../../Features/UpiDetails/UpiDetails.js';
|
||||||
import { changeBreadCrumb } from '../../Features/AppPage/CenterPage.js';
|
import { changeBreadCrumb } from '../../Features/AppPage/CenterPage.js';
|
||||||
import { DefaultModal } from '../../Components/Modal/DefaultModal.jsx';
|
import { DefaultModal } from '../../Components/Modal/DefaultModal.jsx';
|
||||||
|
import "../../Pages/openingStock/openingStockForm.scss"
|
||||||
|
|
||||||
const UpiDetailslist = () => {
|
const UpiDetailslist = () => {
|
||||||
const navigateTo = useNavigate();
|
const navigateTo = useNavigate();
|
||||||
|
|
|
||||||
|
|
@ -299,3 +299,12 @@
|
||||||
.purchase-entry-form {
|
.purchase-entry-form {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
.otpInput {
|
||||||
|
width: 2.5rem !important;
|
||||||
|
height: 2.5rem;
|
||||||
|
margin: 0 0.14rem;
|
||||||
|
font-size: 1rem;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 4px;
|
||||||
|
border: 1px solid rgba(0, 0, 0, 0.3);
|
||||||
|
}
|
||||||
|
|
@ -144,7 +144,7 @@ input::-webkit-inner-spin-button {
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: 0.2rem;
|
gap: 0.2rem;
|
||||||
background-color: #dbdbdb;
|
background-color: #dbdbdb;
|
||||||
font-family: "Poppins", sans-serif;
|
font-family: 'Poppins', sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
.payment-div-0-userplus {
|
.payment-div-0-userplus {
|
||||||
|
|
@ -243,6 +243,7 @@ input::-webkit-inner-spin-button {
|
||||||
background-color: var(--DEFAULT_SELECTED_COLOR);
|
background-color: var(--DEFAULT_SELECTED_COLOR);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
border: none;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
width: 75px;
|
width: 75px;
|
||||||
border-radius: 7.2px;
|
border-radius: 7.2px;
|
||||||
|
|
@ -251,17 +252,20 @@ input::-webkit-inner-spin-button {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 0.2rem;
|
gap: 0.2rem;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
font-family: "Poppins";
|
font-family: 'Poppins';
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
text-transform: capitalize;
|
text-transform: capitalize;
|
||||||
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Btn-payment-mode {
|
.Btn-payment-mode {
|
||||||
background-color: var(--SELECTED_COLOR);
|
background-color: var(--SELECTED_COLOR);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
border: none;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
|
outline: none;
|
||||||
width: 75px;
|
width: 75px;
|
||||||
border-radius: 7.2px;
|
border-radius: 7.2px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
|
@ -269,8 +273,9 @@ input::-webkit-inner-spin-button {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 0.2rem;
|
gap: 0.2rem;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
font-family: "Poppins";
|
font-family: 'Poppins';
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
text-transform: capitalize;
|
text-transform: capitalize;
|
||||||
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -205,8 +205,9 @@ input::-webkit-inner-spin-button {
|
||||||
.Btn-payment-mode {
|
.Btn-payment-mode {
|
||||||
background-color: var(--SELECTED_COLOR);
|
background-color: var(--SELECTED_COLOR);
|
||||||
font-size: 13px !important;
|
font-size: 13px !important;
|
||||||
font-weight: 500;
|
font-weight: 500;border: none;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
|
outline: none;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
width: max-content !important;
|
width: max-content !important;
|
||||||
|
|
@ -242,6 +243,7 @@ input::-webkit-inner-spin-button {
|
||||||
background-color: var(--DEFAULT_SELECTED_COLOR);
|
background-color: var(--DEFAULT_SELECTED_COLOR);
|
||||||
font-size: 13px !important;
|
font-size: 13px !important;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
outline: none;border: none;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
width: max-content !important;
|
width: max-content !important;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|
|
||||||
|
|
@ -109,6 +109,7 @@
|
||||||
.Btn-payment-mode {
|
.Btn-payment-mode {
|
||||||
background-color: var(--SELECTED_COLOR);
|
background-color: var(--SELECTED_COLOR);
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
|
outline: none;border: none;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
|
@ -126,6 +127,8 @@
|
||||||
background-color: var(--DEFAULT_SELECTED_COLOR);
|
background-color: var(--DEFAULT_SELECTED_COLOR);
|
||||||
color: rgb(255, 255, 255);
|
color: rgb(255, 255, 255);
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
outline: none;
|
||||||
|
border: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
|
|
||||||
|
|
@ -514,6 +514,7 @@
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
left: 6px;
|
left: 6px;
|
||||||
|
background-color: unset !important;
|
||||||
}
|
}
|
||||||
.custom-input {
|
.custom-input {
|
||||||
padding: 10px 30px 10px 30px;
|
padding: 10px 30px 10px 30px;
|
||||||
|
|
@ -522,3 +523,28 @@
|
||||||
top: 53%;
|
top: 53%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.BsNavbar1FullScreen {
|
||||||
|
background-color: #1292ee;
|
||||||
|
height: 28px;
|
||||||
|
width: 28px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border-radius: 4px;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 18px;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.BsNavbar1FullScreenExit {
|
||||||
|
background-color: #ef4444;
|
||||||
|
height: 28px;
|
||||||
|
width: 28px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border-radius: 4px;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 18px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -423,3 +423,29 @@
|
||||||
left: 11px;
|
left: 11px;
|
||||||
top: 10px;
|
top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.BsNavbar1FullScreen {
|
||||||
|
background-color: #1292ee;
|
||||||
|
height: 28px;
|
||||||
|
width: 28px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border-radius: 4px;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 18px;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.BsNavbar1FullScreenExit {
|
||||||
|
background-color: #ef4444;
|
||||||
|
height: 28px;
|
||||||
|
width: 28px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border-radius: 4px;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 18px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
column-gap: 0.5rem;
|
column-gap: 0.5rem;
|
||||||
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.defaultandCustomisedTheme {
|
.defaultandCustomisedTheme {
|
||||||
|
|
|
||||||
|
|
@ -27,8 +27,8 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
column-gap: 0.5rem;
|
column-gap: 0.5rem;
|
||||||
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Branch Login Design by Vicky
|
// Branch Login Design by Vicky
|
||||||
|
|
||||||
.branchLoginMaster {
|
.branchLoginMaster {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue