after resolving conflicts

This commit is contained in:
unknown 2026-02-10 12:54:45 +05:30
commit e815840d83
42 changed files with 6092 additions and 5845 deletions

View File

@ -22,6 +22,7 @@
"@reduxjs/toolkit": "^1.9.5",
"@tanstack/react-query": "^5.90.11",
"@tanstack/react-query-devtools": "^5.91.1",
"@tanstack/react-virtual": "^3.13.18",
"antd": "^5.17.4",
"antd-img-crop": "^4.22.0",
"aos": "^2.3.4",

View File

@ -37,9 +37,9 @@ const Loader = () => {
<p>Loading</p>
<div className="words">
<span className="word">PozoApp</span>
<span className="word">BillingApp</span>
<span className="word">PozoApp</span>
<span className="word">BillingApp</span>
<span className="word">PozoApp</span>
<span className="word">PozoApp</span>
<span className="word">PozoApp</span>
</div>
<p></p>

View File

@ -1609,6 +1609,7 @@ const initialState = {
salesBillEdit: false,
previousOrderPayment: [],
previousOrderOfferDetails: [],
getmultipleSearchDatas: []
};
const BookingData = createSlice({
@ -2110,6 +2111,13 @@ const BookingData = createSlice({
state.AllCustomers = [];
}
});
builder.addCase(getmultipleSearch.fulfilled, (state, action) => {
if (action?.payload?.data?.statusCode === 1) {
state.getmultipleSearchDatas = action?.payload?.data?.data[0]?.SearchTermDtl?.map((e) => e?.SearchTerm) || [];
} else {
state.getmultipleSearchDatas = [];
}
});
},
});
@ -2387,5 +2395,7 @@ export const GlobalPreviousOrderPayment = (state) =>
state?.BookingData?.previousOrderPayment;
export const GlobalPreviousOrderOfferDetails = (state) =>
state?.BookingData?.previousOrderOfferDetails;
export const GlobalGetmultipleSearchDatas = (state) =>
state?.BookingData?.getmultipleSearchDatas;
export default BookingData.reducer;

View File

@ -40,6 +40,7 @@ import {
} from '../../../../../Features/Offer/Offernew/BookingOffernew.js';
import { validateOffers } from '../../BSItemCards/ValidateOffer.jsx';
import { v4 as uuidv4 } from 'uuid';
import WeightCalculatePrice from './WeightCalculatePrice.jsx';
const BSBillingEditQuantity = (props) => {
const dispatch = useDispatch();
@ -101,15 +102,33 @@ const BSBillingEditQuantity = (props) => {
const SettingDataSelector = useSelector(PreferenceData);
const OrderType = useSelector(GlobalOrderType);
const [BillOrderPre, setBillOrderPre] = useState(null);
const [RadioBtnSelection, setRadioBtnSelection] = useState(
props?.shortKeyMethod == 'price'
? 'Price'
: ItemData?.ScaleType !== 'weight'
? 'Quantity'
: PriceChangeaccess
? 'Price'
: 'Parcel'
);
const SHORTKEY_TO_RADIO = {
price: 'Price',
quantity: 'qty',
Parcel: 'Parcel',
weightAmount: 'weightAmount'
};
const [RadioBtnSelection, setRadioBtnSelection] = useState(() => {
if (props?.shortKeyMethod && SHORTKEY_TO_RADIO[props.shortKeyMethod]) {
return SHORTKEY_TO_RADIO[props.shortKeyMethod];
}
if (ItemData?.ScaleType !== 'weight') {
return 'Quantity';
}
if (PriceChangeaccess) {
return 'Price';
}
return 'Parcel';
});
// const [RadioBtnSelection, setRadioBtnSelection] = useState(
// props?.shortKeyMethod == 'price'
// ? 'Price'
// : ItemData?.ScaleType !== 'weight'
// ? 'Quantity'
// : PriceChangeaccess
// ? 'Price'
// : 'Parcel'
// );
const [PercentageSelection, setPercentageSelection] = useState('Fixed');
const [RadioDetails, setRadioDetails] = useState(false);
const [editedPrice, setEditedPrice] = useState(0);
@ -678,12 +697,12 @@ const BSBillingEditQuantity = (props) => {
const handleEditQuantity = async (
editedProduct,
editedProductIndex,
newPrice
newPrice,
overrideQty = null
) => {
// check itself is a offer product
const editedQty =
props?.Productdata?.ScaleType !== 'weight'
const editedQty = overrideQty !== null
? overrideQty
: props?.Productdata?.ScaleType !== 'weight'
? parseInt(Quantity)
: props.Productdata.OrderQty;
const addFirst = BillOrderPre === 'Y';
@ -3096,9 +3115,10 @@ const BSBillingEditQuantity = (props) => {
newPrice = 0,
offerApply = false
) => {
const fixedQty = Number(qty.toFixed(3));
const updatedProduct = {
...editedProduct,
OrderQty: qty,
OrderQty: fixedQty,
OrderRate: newPrice > 0 ? newPrice : editedProduct?.OrderRate,
...calculateTaxAmounts({
qty: qty,
@ -3236,289 +3256,6 @@ const BSBillingEditQuantity = (props) => {
OfferValue: offerValue,
};
};
// const AddProductQuantity = async () => {
// let NewPrice = NewPrice1 > 0 ? NewPrice1 : props.Productdata.OrderRate;
// await dispatch(changeHoldOrderDtl(false));
// await dispatch(changePreviousOrderLength(CartOrderDetails?.length));
// const OtherOrderDatas = CartOrderDetails?.filter(
// (cartItem) =>
// !(
// cartItem?.ProdId === props?.Productdata?.ProdId &&
// cartItem.InwardDtlId === props?.Productdata?.InwardDtlId &&
// cartItem?.OrderRate === props?.Productdata?.OrderRate &&
// cartItem?.BookingTypeName === props?.Productdata?.BookingTypeName
// ) && !cartItem?.SalesId
// );
// const OtherOrderDatawithsales = CartOrderDetails?.filter(
// (cartItem) => cartItem?.SalesId
// );
// const OtherorderDataforNormal = CartOrderDetails?.filter(
// (cartItem) =>
// !(
// cartItem?.ProdId === props?.Productdata?.ProdId &&
// cartItem?.InwardDtlId === props?.Productdata?.InwardDtlId &&
// cartItem?.OrderRate === props?.Productdata?.OrderRate &&
// cartItem?.BookingTypeName === props?.Productdata?.BookingTypeName &&
// !cartItem?.SalesId
// )
// );
// const isItemInCart = CartOrderDetails?.find(
// (cartItem) =>
// cartItem?.ProdId === props?.Productdata?.ProdId &&
// cartItem?.InwardDtlId === props?.Productdata?.InwardDtlId &&
// cartItem?.OrderRate === props?.Productdata?.OrderRate &&
// cartItem?.BookingTypeName === props?.Productdata?.BookingTypeName &&
// !cartItem?.SalesId
// ); // check if the item is already in the cart
// // changing for one piece stock checking
// const isItemInCartfilter = CartOrderDetails?.filter(
// (cartItem) =>
// cartItem?.ProdId === props?.Productdata?.ProdId &&
// cartItem?.InwardDtlId === props?.Productdata?.InwardDtlId &&
// !(
// cartItem?.OrderRate === props?.Productdata?.OrderRate &&
// cartItem?.BookingTypeName === props?.Productdata?.BookingTypeName
// ) &&
// !cartItem?.SalesId
// ); // check if the item is already in the cart
// let OverallQuantity = CalculateOverallQty(isItemInCart, isItemInCartfilter);
// const BookingTypeProd = props?.Productdata?.BookingTypeName;
// const isItemInCartHold = CartOrderDetails?.find(
// (cartItem) =>
// cartItem?.ProdId === props?.Productdata?.ProdId &&
// cartItem?.InwardDtlId === props?.Productdata?.InwardDtlId &&
// cartItem?.OrderRate === props?.Productdata?.OrderRate &&
// cartItem?.BookingTypeName === props?.Productdata?.BookingTypeName
// ); // check if the item is already in the cart
// const isItemInCartHoldfilter = CartOrderDetails?.filter(
// (cartItem) =>
// cartItem?.ProdId === props?.Productdata?.ProdId &&
// cartItem?.InwardDtlId === props?.Productdata?.InwardDtlId &&
// !(
// cartItem?.OrderRate === props?.Productdata?.OrderRate &&
// cartItem?.BookingTypeName === props?.Productdata?.BookingTypeName
// )
// ); // check if the item is already in the cart
// const holddataproduct = ReorderProductData?.filter(
// (cartItem) =>
// cartItem?.ProdId === props?.Productdata?.ProdId &&
// cartItem?.InwardDtlId === props?.Productdata?.InwardDtlId
// );
// let totalSelectedProductQty = holddataproduct?.reduce(
// (accumulator, card) => {
// return (
// accumulator +
// parseInt(
// card?.StockAvailable === 'Y'
// ? props?.Productdata?.SinglePc === 'Y'
// ? card.SinglePc !== 'Y'
// ? card.OrderQty * card.NoOfPcs
// : card.OrderQty
// : card.SinglePc !== 'Y'
// ? card.OrderQty
// : card.OverAllPcs % card.NoOfPcs >= card.OrderQty
// ? 0
// : card.OrderQty % card.NoOfPcs === 0
// ? Math.floor(card.OrderQty / card.NoOfPcs)
// : Math.floor(card.OrderQty / card.NoOfPcs) + 1
// : 0
// )
// );
// },
// 0
// );
// let OverallQuantityhold =
// CalculateOverallQty(isItemInCartHold, isItemInCartHoldfilter) +
// totalSelectedProductQty;
// const OtherorderDataforNormalWithoutSalesId = CartOrderDetails?.filter(
// (cartItem) =>
// !(
// cartItem?.ProdId === props?.Productdata?.ProdId &&
// cartItem?.InwardDtlId === props?.Productdata?.InwardDtlId &&
// cartItem?.OrderRate === props?.Productdata?.OrderRate &&
// cartItem?.BookingTypeName === props?.Productdata?.BookingTypeName
// )
// );
// if (parseInt(Quantity) === 0 || Quantity === '') {
// setMessageType('error');
// setMessageData('Please enter valid quantity');
// setQuantity('');
// }
// else {
// if (isItemInCart && BookingTypeProd != 'Dine In' && OrderType != 'Hold') {
// if (isItemInCart?.StockAvailable === 'Y') {
// let Condition = OverallQuantity >= Quantity;
// if (Condition) {
// const UpdatedCartItem = await createUpdatedCartItem(
// isItemInCart,
// Quantity,
// NewPrice
// );
// const Cartdata = MergecardItem(
// UpdatedCartItem,
// BillOrderPre,
// OtherorderDataforNormal
// );
// await dispatch(changeOrderCardDetails(Cartdata));
// if (OfferCheckedInSetup && preferenceOffer) {
// await applyOffer(Cartdata);
// } else {
// dispatch(changeOrderCardDetails(Cartdata));
// }
// props.handleEditQuantityCancel();
// setClearQuantity(false);
// } else {
// setMessageType('error');
// setMessageData('Stock Not Available');
// setQuantity('');
// }
// } else {
// if (
// isItemInCart &&
// BookingTypeProd != 'Dine In' &&
// OrderType != 'Hold'
// ) {
// const UpdatedCartItem = createUpdatedCartItem(
// isItemInCart,
// Quantity,
// NewPrice
// );
// const Cartdata = MergecardItem(
// UpdatedCartItem,
// BillOrderPre,
// OtherorderDataforNormal
// );
// await dispatch(changeOrderCardDetails(Cartdata));
// if (OfferCheckedInSetup && preferenceOffer) {
// await applyOffer(Cartdata);
// } else {
// dispatch(changeOrderCardDetails(Cartdata));
// }
// }
// props.handleEditQuantityCancel();
// setClearQuantity(false);
// }
// }
// else if (isItemInCartHold && OrderType === 'Hold') {
// if (isItemInCartHold?.StockAvailable === 'Y') {
// let Condition = OverallQuantityhold >= Quantity;
// if (Condition) {
// const UpdatedCartItem = createUpdatedCartItem(
// isItemInCartHold,
// Quantity,
// NewPrice
// );
// const Cartdata = MergecardItem(
// UpdatedCartItem,
// BillOrderPre,
// OtherorderDataforNormalWithoutSalesId
// );
// if (OfferCheckedInSetup && preferenceOffer) {
// await applyOffer(Cartdata);
// } else {
// dispatch(changeOrderCardDetails(Cartdata));
// }
// await dispatch(changeOrderCardDetails(Cartdata));
// props.handleEditQuantityCancel();
// setClearQuantity(false);
// } else {
// setMessageType('error');
// setMessageData('Stock Not Available');
// setQuantity('');
// }
// } else {
// if (isItemInCartHold && OrderType === 'Hold') {
// const UpdatedCartItem = createUpdatedCartItem(
// isItemInCartHold,
// Quantity,
// NewPrice
// );
// const Cartdata = MergecardItem(
// UpdatedCartItem,
// BillOrderPre,
// OtherorderDataforNormalWithoutSalesId
// );
// await dispatch(changeOrderCardDetails(Cartdata));
// if (OfferCheckedInSetup && preferenceOffer) {
// await applyOffer(Cartdata);
// } else {
// dispatch(changeOrderCardDetails(Cartdata));
// }
// }
// props.handleEditQuantityCancel();
// setClearQuantity(false);
// }
// }
// else if (
// isItemInCart &&
// BookingTypeProd === 'Dine In' &&
// OrderType != 'Hold'
// ) {
// if (isItemInCart?.StockAvailable === 'Y') {
// let Condition = OverallQuantity >= Quantity;
// if (Condition) {
// const UpdatedCartItem = createUpdatedCartItem(
// isItemInCart,
// Quantity,
// NewPrice
// );
// const Cartdata = MergecardItem(
// UpdatedCartItem,
// BillOrderPre,
// OtherOrderDatas
// );
// await dispatch(
// changeOrderCardDetails([...OtherOrderDatawithsales, ...Cartdata])
// );
// if (OfferCheckedInSetup && preferenceOffer) {
// await applyOffer(Cartdata);
// } else {
// dispatch(changeOrderCardDetails(Cartdata));
// }
// props.handleEditQuantityCancel();
// setClearQuantity(false);
// } else {
// setMessageType('error');
// setMessageData('Stock Not Available');
// setQuantity('');
// }
// }
// else {
// if (
// isItemInCart &&
// BookingTypeProd === 'Dine In' &&
// OrderType != 'Hold'
// ) {
// const UpdatedCartItem = createUpdatedCartItem(
// isItemInCart,
// Quantity,
// NewPrice
// );
// const Cartdata = MergecardItem(
// UpdatedCartItem,
// BillOrderPre,
// OtherorderDataforNormal
// );
// await dispatch(changeOrderCardDetails(Cartdata));
// if (OfferCheckedInSetup && preferenceOffer) {
// await applyOffer(Cartdata);
// } else {
// dispatch(changeOrderCardDetails(Cartdata));
// }
// }
// props.handleEditQuantityCancel();
// setClearQuantity(false);
// }
// }
// }
// };
const CloseModal = () => {
props.handleEditQuantityCancel();
setClearQuantity(false);
@ -3656,19 +3393,19 @@ const BSBillingEditQuantity = (props) => {
const enteredDiscount = parseFloat(data?.target.value);
if (limit === null || limit === undefined || limit === 0) {
if (
parseFloat(enteredDiscount) < parseFloat(sellingPrice) ||
parseFloat(enteredDiscount) === parseFloat(sellingPrice)
) {
// if (
// parseFloat(enteredDiscount) < parseFloat(sellingPrice) ||
// parseFloat(enteredDiscount) === parseFloat(sellingPrice)
// ) {
setEditedPrice(enteredDiscount);
setDisableSubmitButton(true);
} else {
setMessageType('error');
setMessageData('Please Give less than value for sell price');
setDisableSubmitButton(false);
setEditedPrice(0);
formRef.current?.resetFields();
}
// } else {
// setMessageType('error');
// setMessageData('Please Give less than value for sell price');
// setDisableSubmitButton(false);
// setEditedPrice(0);
// formRef.current?.resetFields();
// }
return;
}
@ -3706,6 +3443,33 @@ const BSBillingEditQuantity = (props) => {
setPackageDtl(data || []);
};
const handleWeightCalculation = async (data) => {
const { price, quantity } = data;
setQuantity(quantity);
setEditedPrice(price);
await handleWeightSubmit(quantity, price);
};
const handleWeightSubmit = async (qty, price) => {
await dispatch(changeHoldOrderDtl(false));
await dispatch(changePreviousOrderLength(CartOrderDetails?.length));
let localId = props.Index;
let editedProductIndex = CartOrderDetails?.findIndex(
(e) => e?.localId == localId
);
const editedProduct = {
...CartOrderDetails[editedProductIndex],
OrderQty: qty
};
await handleEditQuantity(editedProduct, editedProductIndex, editedProduct.OrderRate, qty);
props.handleEditQuantityCancel();
setClearQuantity(false);
};
const isKg =
props?.Productdata?.Size == 1 &&
["KG", "KGS"].includes(props?.Productdata?.UomName?.toUpperCase());
return (
<div className="BSBilling-EditQuantity-Modal">
<Messages
@ -3802,6 +3566,19 @@ const BSBillingEditQuantity = (props) => {
>
Packing
</button>
{isKg && (<button
type="button"
className={
RadioBtnSelection === 'weightAmount'
? 'SelecBtn weightAmount'
: 'ChangeBtn'
}
onClick={() => onRadioBtnChange('weightAmount')}
>
Weight / Amount
</button>)}
</div>
{RadioBtnSelection == 'Quantity' && (
@ -4007,6 +3784,15 @@ const BSBillingEditQuantity = (props) => {
/>
</>
)}
{RadioBtnSelection == 'weightAmount' && (
<>
<WeightCalculatePrice
CartOrderDetails={CartOrderDetails}
itemData={ItemData}
onSubmit={handleWeightCalculation}
/>
</>
)}
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
{((RadioBtnSelection == 'Price' && disableSubmitButton) ||
RadioBtnSelection == 'Quantity') && (

View File

@ -0,0 +1,169 @@
import { useState, useEffect, useRef } from 'react';
import { InputField } from '../../../../../Components/Forms/InputField.jsx';
import { Form, Radio } from 'antd';
import Buttons from '../../../../../Components/Forms/Buttons.jsx';
import { ArrowRightOutlined } from '@ant-design/icons';
import "./WeightCalculatePrice.scss"
const WeightCalculatePrice = ({ itemData, CartOrderDetails, onSubmit }) => {
const [enteredPrice, setEnteredPrice] = useState('');
const [enteredQty, setEnteredQty] = useState('');
const [calculatedQty, setCalculatedQty] = useState(0);
const [calcMode, setCalcMode] = useState('kgs');
const priceInputRef = useRef(null);
const [form] = Form.useForm();
const basePrice = parseFloat(
itemData?.OrderRate || itemData?.SellingPrice || 0
);
// Auto focus input
useEffect(() => {
setTimeout(() => {
const input = priceInputRef.current?.querySelector('input');
if (input) input.focus();
}, 100);
}, [calcMode]);
// AMT → calculate QTY
const handlePriceChange = (e) => {
const value = e.target.value;
setEnteredPrice(value);
if (value && basePrice > 0) {
const qty = parseFloat(value) / basePrice;
setCalculatedQty(qty);
} else {
setCalculatedQty(0);
}
};
// KGS → calculate AMT
const handleQtyChange = (e) => {
const value = e.target.value;
setEnteredQty(value);
if (value && basePrice > 0) {
const qty = parseFloat(value);
const price = qty * basePrice;
setEnteredPrice(price.toFixed(2));
setCalculatedQty(qty);
} else {
setEnteredPrice('');
setCalculatedQty(0);
}
};
const handleSubmit = (e) => {
if (e && e.preventDefault) e.preventDefault();
if (calculatedQty > 0 && enteredPrice > 0) {
onSubmit?.({
price: parseFloat(enteredPrice),
quantity: parseFloat(calculatedQty),
});
}
};
return (
<div className="weight-calculate-price">
<Form form={form} onFinish={handleSubmit}>
{/* MODE SELECTION */}
<div className="weight-info">
<div className="productils">
<Radio.Group
value={calcMode}
onChange={(e) => {
setCalcMode(e.target.value);
setEnteredPrice('');
setEnteredQty('');
setCalculatedQty(0);
form.resetFields();
}}
>
<Radio.Button value="kgs">KGS</Radio.Button>
<Radio.Button value="amt">AMT</Radio.Button>
</Radio.Group>
<p>
<strong>Base Price:</strong> ₹{basePrice.toFixed(2)} per{' '}
{itemData?.UomName || 'unit'}
</p>
</div>
</div>
{/* AMOUNT INPUT */}
{calcMode === 'amt' && (
<Form.Item
name="enteredPrice"
rules={[
{ required: true, message: 'Please enter amount' },
{ pattern: /^[1-9]\d*(\.\d+)?$/, message: 'Invalid amount' },
]}
>
<InputField
ref={priceInputRef}
label="Enter Amount (₹)"
value={enteredPrice}
onChange={handlePriceChange}
inputMode="decimal"
onInput={(e) => {
e.target.value = e.target.value.replace(/[^0-9.]/g, '');
}}
/>
</Form.Item>
)}
{/* QUANTITY INPUT */}
{calcMode === 'kgs' && (
<Form.Item
name="enteredQty"
rules={[
{ required: true, message: 'Please enter quantity' },
{ pattern: /^\d*(\.\d+)?$/, message: 'Invalid quantity' },
]}
>
<InputField
ref={priceInputRef}
label={`Enter Quantity (${itemData?.UomName || 'KGS'})`}
value={enteredQty}
onChange={handleQtyChange}
inputMode="decimal"
onInput={(e) => {
e.target.value = e.target.value.replace(/[^0-9.]/g, '');
}}
/>
</Form.Item>
)}
<div className="calculated-quantity-display">
<div className="quantity-row">
<label>Calculated Quantity : </label>
<span>
{calculatedQty > 0 ? calculatedQty.toFixed(3) : '0.000'}{' '}
{itemData?.UomName || 'units'}
</span>
</div>
{enteredPrice > 0 && (
<div className="total-display">
<label>Total Amount:</label>
<span>₹{parseFloat(enteredPrice).toFixed(2)}</span>
</div>
)}
</div>
<div className="weightCalBTN">
<Buttons
buttonText="Apply"
color="901D77"
htmlType="button"
handleSubmit={handleSubmit}
icon={<ArrowRightOutlined />}
/>
</div>
</Form>
</div>
);
};
export default WeightCalculatePrice;

View File

@ -0,0 +1,9 @@
.productils {
margin: 10px 0;
}
.weightCalBTN {
width: 100%;
display: flex;
justify-content: flex-end;
}

View File

@ -274,20 +274,48 @@ const BSBillingTable1 = () => {
setshortKeyMethod(method);
};
const handleKeyDown = (event) => {
if (!event.ctrlKey) return;
// const handleKeyDown = (event) => {
// if (!event.ctrlKey) return;
// const key = event.key.toLowerCase();
// if (key === 'q') {
// event.preventDefault();
// handleShortcut('qty');
// }
// if (key === 'e') {
// event.preventDefault();
// handleShortcut('price');
// }
// };
const handleKeyDown = (event) => {
const key = event.key.toLowerCase();
// 👉 ALT + P → Open Edit Total Amount
if (event.altKey && key === 'p') {
event.preventDefault();
if (tableData?.length > 0) {
OpenEditTotalAmount();
}
return;
}
// 👉 CTRL shortcuts
if (!event.ctrlKey) return;
if (key === 'q') {
event.preventDefault();
handleShortcut('qty');
}
if (key === 'e') {
} else if (key === 'e') {
event.preventDefault();
handleShortcut('price');
} else if (key === 'y') {
event.preventDefault();
handleShortcut('Parcel');
} else if (key === 'b') {
event.preventDefault();
handleShortcut('weightAmount');
}
};
window.addEventListener('keydown', handleKeyDown);

View File

@ -505,7 +505,8 @@ export default function BST1Payment() {
useEffect(() => {
if (!preOrder) {
const totalSum = OrderCardDetail?.reduce(
(acc, card) => acc + parseFloat(card.OrderRate * card.OrderQty || 0),
// (acc, card) => acc + parseFloat(card.OrderRate * card.OrderQty || 0),
(acc, card) => acc + parseFloat(card.TotalAmt || 0),
0
);
@ -1994,7 +1995,8 @@ export default function BST1Payment() {
Type: a.Type,
OrderQty: a.OrderQty,
OrderRate: a.OrderRate,
TotalAmt: a.OrderQty * a.OrderRate,
// TotalAmt: a.OrderQty * a.OrderRate,
TotalAmt: a.TotalAmt,
TaxAmt: a.TaxAmt,
RefundQty: 0,
InwardDtlId: a.InwardDtlId,

View File

@ -539,7 +539,8 @@ const BSBillingTable2 = () => {
useEffect(() => {
if (!preOrder) {
const totalSum = OrderCardDetail?.reduce(
(acc, card) => acc + parseFloat(card.OrderRate * card.OrderQty || 0),
// (acc, card) => acc + parseFloat(card.OrderRate * card.OrderQty || 0),
(acc, card) => acc + parseFloat(card.TotalAmt || 0),
0
);
@ -2034,7 +2035,8 @@ const BSBillingTable2 = () => {
Type: a.Type,
OrderQty: a.OrderQty,
OrderRate: a.OrderRate,
TotalAmt: a.OrderQty * a.OrderRate,
// TotalAmt: a.OrderQty * a.OrderRate,
TotalAmt: a.TotalAmt,
TaxAmt: a.TaxAmt,
RefundQty: 0,
InwardDtlId: a.InwardDtlId,

View File

@ -228,21 +228,33 @@ const BSBillingTable3 = () => {
handleEditQuantity(item);
setshortKeyMethod(method);
};
const handleKeyDown = (event) => {
if (!event.ctrlKey) return;
const key = event.key.toLowerCase();
// 👉 ALT + P → Open Edit Total Amount
if (event.altKey && key === 'p') {
event.preventDefault();
if (tableData?.length > 0) {
OpenEditTotalAmount();
}
return;
}
// 👉 CTRL shortcuts
if (!event.ctrlKey) return;
if (key === 'q') {
event.preventDefault();
handleShortcut('qty');
}
if (key === 'e') {
} else if (key === 'e') {
event.preventDefault();
handleShortcut('price');
} else if (key === 'y') {
event.preventDefault();
handleShortcut('Parcel');
} else if (key === 'b') {
event.preventDefault();
handleShortcut('weightAmount');
}
};
window.addEventListener('keydown', handleKeyDown);

View File

@ -534,7 +534,8 @@ const BSBillingTable3Pay = () => {
useEffect(() => {
if (!preOrder) {
const totalSum = OrderCardDetail?.reduce(
(acc, card) => acc + parseFloat(card.OrderRate * card.OrderQty || 0),
// (acc, card) => acc + parseFloat(card.OrderRate * card.OrderQty || 0), //sree
(acc, card) => acc + parseFloat(card.TotalAmt || 0),
0
);
@ -2180,7 +2181,8 @@ const BSBillingTable3Pay = () => {
Type: a.Type,
OrderQty: a.OrderQty,
OrderRate: a.OrderRate,
TotalAmt: a.OrderQty * a.OrderRate,
// TotalAmt: a.OrderQty * a.OrderRate, //sri
TotalAmt: a.TotalAmt,
TaxAmt: a.TaxAmt,
RefundQty: 0,
InwardDtlId: a.InwardDtlId,

View File

@ -591,7 +591,8 @@ const BSBilling4Payment = () => {
useEffect(() => {
if (!preOrder) {
const totalSum = OrderCardDetail?.reduce(
(acc, card) => acc + parseFloat(card.OrderRate * card.OrderQty || 0),
// (acc, card) => acc + parseFloat(card.OrderRate * card.OrderQty || 0),
(acc, card) => acc + parseFloat(card.TotalAmt || 0),
0
);
@ -2062,7 +2063,8 @@ const BSBilling4Payment = () => {
Type: a.Type,
OrderQty: a.OrderQty,
OrderRate: a.OrderRate,
TotalAmt: a.OrderQty * a.OrderRate,
// TotalAmt: a.OrderQty * a.OrderRate,
TotalAmt: a.TotalAmt,
TaxAmt: a.TaxAmt,
RefundQty: 0,
InwardDtlId: a.InwardDtlId,

View File

@ -282,20 +282,32 @@ const BSBillingTable4 = () => {
};
const handleKeyDown = (event) => {
if (!preferenceshortcutkey) return;
if (!event.ctrlKey) return;
const key = event.key.toLowerCase();
// 👉 ALT + P → Open Edit Total Amount
if (event.altKey && key === 'p') {
event.preventDefault();
if (tableData?.length > 0) {
OpenEditTotalAmount();
}
return;
}
// 👉 CTRL shortcuts
if (!event.ctrlKey) return;
if (key === 'q') {
event.preventDefault();
handleShortcut('qty');
}
if (key === 'e') {
} else if (key === 'e') {
event.preventDefault();
handleShortcut('price');
} else if (key === 'y') {
event.preventDefault();
handleShortcut('Parcel');
} else if (key === 'b') {
event.preventDefault();
handleShortcut('weightAmount');
}
};
window.addEventListener('keydown', handleKeyDown);

View File

@ -579,7 +579,8 @@ const BSBillingTable5 = () => {
useEffect(() => {
if (!preOrder) {
const totalSum = OrderCardDetail?.reduce(
(acc, card) => acc + parseFloat(card.OrderRate * card.OrderQty || 0),
// (acc, card) => acc + parseFloat(card.OrderRate * card.OrderQty || 0),
(acc, card) => acc + parseFloat(card.TotalAmt || 0),
0
);
@ -2077,7 +2078,8 @@ const BSBillingTable5 = () => {
Type: a.Type,
OrderQty: a.OrderQty,
OrderRate: a.OrderRate,
TotalAmt: a.OrderQty * a.OrderRate,
// TotalAmt: a.OrderQty * a.OrderRate,
TotalAmt: a.TotalAmt,
TaxAmt: a.TaxAmt,
RefundQty: 0,
InwardDtlId: a.InwardDtlId,

View File

@ -1928,20 +1928,32 @@ const BsBill = () => {
};
const handleKeyDown = (event) => {
if (!preferenceshortcutkey) return;
if (!event.ctrlKey) return;
const key = event.key.toLowerCase();
// 👉 ALT + P → Open Edit Total Amount
if (event.altKey && key === 'p') {
event.preventDefault();
if (TableData?.length > 0) {
OpenEditTotalAmount();
}
return;
}
// 👉 CTRL shortcuts
if (!event.ctrlKey) return;
if (key === 'q') {
event.preventDefault();
handleShortcut('qty');
}
if (key === 'e') {
} else if (key === 'e') {
event.preventDefault();
handleShortcut('price');
} else if (key === 'y') {
event.preventDefault();
handleShortcut('Parcel');
} else if (key === 'b') {
event.preventDefault();
handleShortcut('weightAmount');
}
};
window.addEventListener('keydown', handleKeyDown);

View File

@ -256,23 +256,32 @@ const BSBillingTable6 = () => {
};
const handleKeyDown = (event) => {
if (!preferenceshortcutkey) return
if (!event.ctrlKey) return;
const key = event.key.toLowerCase();
if (key === 'q') {
// 👉 ALT + P → Open Edit Total Amount
if (event.altKey && key === 'p') {
event.preventDefault();
if (tableData?.length > 0) {
OpenEditTotalAmount();
}
return;
}
// 👉 CTRL shortcuts
if (!event.ctrlKey) return;
if (key === 'q') {
event.preventDefault();
handleShortcut('qty');
}
if (key === 'e') {
} else if (key === 'e') {
event.preventDefault();
handleShortcut('price');
} else if (key === 'y') {
event.preventDefault();
handleShortcut('Parcel');
} else if (key === 'b') {
event.preventDefault();
handleShortcut('weightAmount');
}
};
};
window.addEventListener('keydown', handleKeyDown);
return () => {

View File

@ -551,7 +551,8 @@ const BST6Payment = () => {
useEffect(() => {
if (!preOrder) {
const totalSum = OrderCardDetail?.reduce(
(acc, card) => acc + parseFloat(card.OrderRate * card.OrderQty || 0),
// (acc, card) => acc + parseFloat(card.OrderRate * card.OrderQty || 0),
(acc, card) => acc + parseFloat(card.TotalAmt || 0),
0
);
@ -2118,7 +2119,8 @@ const BST6Payment = () => {
Type: a.Type,
OrderQty: a.OrderQty,
OrderRate: a.OrderRate,
TotalAmt: a.OrderQty * a.OrderRate,
// TotalAmt: a.OrderQty * a.OrderRate,
TotalAmt: a.TotalAmt,
TaxAmt: a.TaxAmt,
RefundQty: 0,
InwardDtlId: a.InwardDtlId,

View File

@ -570,7 +570,8 @@ const BSBilling7Payment = () => {
useEffect(() => {
if (!preOrder) {
const totalSum = OrderCardDetail?.reduce(
(acc, card) => acc + parseFloat(card.OrderRate * card.OrderQty || 0),
// (acc, card) => acc + parseFloat(card.OrderRate * card.OrderQty || 0),
(acc, card) => acc + parseFloat(card.TotalAmt || 0),
0
);
@ -2086,7 +2087,8 @@ const BSBilling7Payment = () => {
Type: a.Type,
OrderQty: a.OrderQty,
OrderRate: a.OrderRate,
TotalAmt: a.OrderQty * a.OrderRate,
// TotalAmt: a.OrderQty * a.OrderRate,
TotalAmt: a.TotalAmt,
TaxAmt: a.TaxAmt,
RefundQty: 0,
InwardDtlId: a.InwardDtlId,

View File

@ -225,35 +225,6 @@ const BSBillingTable7 = () => {
setPreviousdataLength(PreviousOrderLength);
}, [PreviousOrderLength]);
// useEffect(() => {
// const handleKeyDown = (event) => {
// // Ctrl + Q
// if (event.ctrlKey && event.key.toLowerCase() === 'q') {
// event.preventDefault();
// const getItem = (data = []) => {
// if (!data.length) return null;
// return BillOrderPre === 'Y' ? data[0] : data[data.length - 1];
// };
// let item = null;
// if (tableDataTakeAway?.length > 0) {
// item = getItem(tableDataTakeAway);
// } else if (tableDataDinein?.length > 0) {
// item = getItem(tableDataDinein);
// }
// if (item) {
// handleEditQuantity(item);
// }
// }
// };
// window.addEventListener('keydown', handleKeyDown);
// return () => {
// window.removeEventListener('keydown', handleKeyDown);
// };
// }, [tableDataTakeAway, tableDataDinein, BillOrderPre]);
useEffect(() => {
if (!preferenceshortcutkey) return;
const getSelectedItem = () => {
@ -279,20 +250,30 @@ const BSBillingTable7 = () => {
};
const handleKeyDown = (event) => {
if (!preferenceshortcutkey) return;
if (!event.ctrlKey) return;
const key = event.key.toLowerCase();
// 👉 ALT + P → Open Edit Total Amount
if (event.altKey && key === 'p') {
event.preventDefault();
if (tableData?.length > 0) {
OpenEditTotalAmount();
}
return;
}
if (!event.ctrlKey) return;
if (key === 'q') {
event.preventDefault();
handleShortcut('qty');
}
if (key === 'e') {
} else if (key === 'e') {
event.preventDefault();
handleShortcut('price');
} else if (key === 'y') {
event.preventDefault();
handleShortcut('Parcel');
} else if (key === 'b') {
event.preventDefault();
handleShortcut('weightAmount');
}
};
window.addEventListener('keydown', handleKeyDown);

View File

@ -38,6 +38,10 @@ const BSEditTotalAmt = (props) => {
console.log(OverAllSales, 'OverAllEstimateOverAllEstimate');
const formRef = useRef(null);
const formEstRef = useRef(null);
const salesDiscInputRef = useRef(null);
const salesMoreOptInputRef = useRef(null);
const estDiscInputRef = useRef(null);
const estMoreOptInputRef = useRef(null);
const dispatch = useDispatch();
const [messageType, setMessageType] = useState(null);
const [messageData, setMessageData] = useState(null);
@ -87,6 +91,29 @@ const BSEditTotalAmt = (props) => {
return () => clearInterval(timer);
}, [timeLeft]);
useEffect(() => {
const focusInput = (ref) => {
setTimeout(() => {
const inputElement = ref.current?.querySelector('input');
inputElement?.focus();
}, 100);
};
if (SalesData?.length > 0) {
if (MoreOpt) {
focusInput(salesMoreOptInputRef);
} else if (EditTotalAmt) {
focusInput(salesDiscInputRef);
}
} else if (EstimateData?.length > 0 && EditTotalAmt) {
if (ESTMoreOpt) {
focusInput(estMoreOptInputRef);
} else {
focusInput(estDiscInputRef);
}
}
}, [EditTotalAmt, MoreOpt, ESTMoreOpt, SalesData, EstimateData]);
const handleOtpChange = (index, value) => {
// Allow empty value for clearing
if (value === '' || value.match(/^[0-9]$/)) {
@ -201,6 +228,10 @@ const BSEditTotalAmt = (props) => {
setMessageData('Please Give less than value for sell price');
setESTSellingPrice(0);
formEstRef?.current?.resetFields();
setTimeout(() => {
const inputElement = estDiscInputRef.current?.querySelector('input');
inputElement?.focus();
}, 100);
} else {
setESTSellingPrice(inputValue);
// Check if entered amount is 0 or equals total amount
@ -214,6 +245,13 @@ const BSEditTotalAmt = (props) => {
handleOk();
}
};
const handleEstKeyDown = (e) => {
if (e.key === 'Enter') {
e.preventDefault();
SetTotalDiscount();
}
};
const SalesChangefun = (e) => {
const inputValue = e.target.value.trim();
console.log(e, e.target.value, 'SalesChangefun');
@ -223,6 +261,10 @@ const BSEditTotalAmt = (props) => {
setMessageData('Please Give less than value for sell price');
setSellingPrice(0);
formRef?.current?.resetFields();
setTimeout(() => {
const inputElement = salesDiscInputRef.current?.querySelector('input');
inputElement?.focus();
}, 100);
} else {
setSellingPrice(inputValue);
// SalesTotalAmount()
@ -232,6 +274,13 @@ const BSEditTotalAmt = (props) => {
// setSalesDiscAmount(0)
}
};
const handleSalesKeyDown = (e) => {
if (e.key === 'Enter') {
e.preventDefault();
SetTotalDiscount();
}
};
const orderscolumns = [
{
title: 'Sl.No',
@ -347,6 +396,10 @@ const BSEditTotalAmt = (props) => {
setSalesDiscAmount(0);
// setFinalTotalAmt()
formRef.current?.resetFields();
setTimeout(() => {
const inputElement = salesMoreOptInputRef.current?.querySelector('input');
inputElement?.focus();
}, 100);
};
const onEstPercentageSelectionChange = (data) => {
setESTPercentageSelection(data);
@ -354,6 +407,10 @@ const BSEditTotalAmt = (props) => {
setEstDiscAmount(0);
// setFinalTotalAmt()
formEstRef.current?.resetFields();
setTimeout(() => {
const inputElement = estMoreOptInputRef.current?.querySelector('input');
inputElement?.focus();
}, 100);
};
const PriceChangefun = (data) => {
@ -375,6 +432,10 @@ const BSEditTotalAmt = (props) => {
setSalesDiscAmount(0);
// setNewPrice1(0)
formRef.current?.resetFields();
setTimeout(() => {
const inputElement = salesMoreOptInputRef.current?.querySelector('input');
inputElement?.focus();
}, 100);
}
} else {
// Percentage mode
@ -391,6 +452,10 @@ const BSEditTotalAmt = (props) => {
setMessageData('Please Give less than or equal to 100');
setSalesDiscAmount(0);
formRef.current?.resetFields();
setTimeout(() => {
const inputElement = salesMoreOptInputRef.current?.querySelector('input');
inputElement?.focus();
}, 100);
}
}
} else {
@ -400,6 +465,13 @@ const BSEditTotalAmt = (props) => {
}
};
const handlePriceKeyDown = (e) => {
if (e.key === 'Enter') {
e.preventDefault();
SetTotalDiscount();
}
};
const PriceChangefunEst = (data) => {
console.log(data?.target.value, PercentageSelection, 'datadata');
if (data?.target.value) {
@ -418,6 +490,10 @@ const BSEditTotalAmt = (props) => {
setMessageData('Please Give less than value for sell price');
setEstDiscAmount(0);
formEstRef.current?.resetFields();
setTimeout(() => {
const inputElement = estMoreOptInputRef.current?.querySelector('input');
inputElement?.focus();
}, 100);
}
} else {
// Percentage mode
@ -434,6 +510,10 @@ const BSEditTotalAmt = (props) => {
setMessageData('Please Give less than or equal to 100');
setEstDiscAmount(0);
formEstRef.current?.resetFields();
setTimeout(() => {
const inputElement = estMoreOptInputRef.current?.querySelector('input');
inputElement?.focus();
}, 100);
}
}
} else {
@ -444,6 +524,13 @@ const BSEditTotalAmt = (props) => {
}
};
const handlePriceEstKeyDown = (e) => {
if (e.key === 'Enter') {
e.preventDefault();
SetTotalDiscount();
}
};
const moreOptions = () => {
setMoreOpt((prev) => !prev);
setSalesDiscAmount(0);
@ -535,6 +622,7 @@ const BSEditTotalAmt = (props) => {
},
]}
>
<div ref={salesDiscInputRef}>
<InputField
field="SalesDisc"
name="SalesDisc"
@ -542,8 +630,10 @@ const BSEditTotalAmt = (props) => {
fieldApi={true}
autocomplete="off"
onChange={(e) => SalesChangefun(e)}
onKeyDown={(e) => handleSalesKeyDown(e)}
maxLength={8}
/>
</div>
</Form.Item>
</Form>{' '}
</td>
@ -593,6 +683,7 @@ const BSEditTotalAmt = (props) => {
},
]}
>
<div ref={salesMoreOptInputRef}>
<InputField
field="SellPrice"
name="SellPrice"
@ -603,8 +694,10 @@ const BSEditTotalAmt = (props) => {
// id="error2"
autocomplete="off"
onChange={(e) => PriceChangefun(e)}
onKeyDown={(e) => handlePriceKeyDown(e)}
// isOnChange={formType == "edit" || formRef.current?.getFieldsValue()?.CustName ? true : false}
/>
</div>
</Form.Item>
{/* <input type="text"
onChange={(e)=>PriceChangefun(e)}
@ -684,6 +777,7 @@ const BSEditTotalAmt = (props) => {
},
]}
>
<div ref={estDiscInputRef}>
<InputField
field="ESTSalesDisc"
name="ESTSalesDisc"
@ -692,8 +786,10 @@ const BSEditTotalAmt = (props) => {
// id="error2"
autocomplete="off"
onChange={(e) => EstChangefun(e)}
onKeyDown={(e) => handleEstKeyDown(e)}
maxLength={8}
/>
</div>
</Form.Item>
</Form>
</td>
@ -742,6 +838,7 @@ const BSEditTotalAmt = (props) => {
},
]}
>
<div ref={estMoreOptInputRef}>
<InputField
field="SellPrice"
name="ESTSellingPrice"
@ -752,8 +849,10 @@ const BSEditTotalAmt = (props) => {
// id="error2"
autocomplete="off"
onChange={(e) => PriceChangefunEst(e)}
onKeyDown={(e) => handlePriceEstKeyDown(e)}
// isOnChange={formType == "edit" || formRef.current?.getFieldsValue()?.CustName ? true : false}
/>
</div>
</Form.Item>
{/* <input type="text"
onChange={(e)=>PriceChangefun(e)}

View File

@ -249,27 +249,59 @@ const ComboSalesBillTable = () => {
// );
// setBillOrderPre(BillOrder?.SettingValue);
// }, [preferenceDatas]);
useEffect(() => {
const handleKeyDown = (event) => {
if (event.ctrlKey && event.key.toLowerCase() === 'q') {
event.preventDefault();
const getSelectedItem = () => {
const getItem = (data = []) => {
if (!data.length) return null;
return BillOrderPre === 'Y' ? data[0] : data[data.length - 1];
};
let item = null;
if (tableDataTakeAway?.length > 0) {
item = getItem(tableDataTakeAway);
return getItem(tableDataTakeAway);
} else if (tableDataDinein?.length > 0) {
item = getItem(tableDataDinein);
return getItem(tableDataDinein);
}
if (item) {
return null;
};
const handleShortcut = (method) => {
const item = getSelectedItem();
if (!item) return;
handleEditQuantity(item);
setshortKeyMethod(method);
};
const handleKeyDown = (event) => {
const key = event.key.toLowerCase();
// 👉 ALT + P → Open Edit Total Amount
if (event.altKey && key === 'p') {
event.preventDefault();
if (tableData?.length > 0) {
OpenEditTotalAmount();
}
return;
}
// 👉 CTRL shortcuts
if (!event.ctrlKey) return;
if (key === 'q') {
event.preventDefault();
handleShortcut('qty');
} else if (key === 'e') {
event.preventDefault();
handleShortcut('price');
} else if (key === 'y') {
event.preventDefault();
handleShortcut('Parcel');
} else if (key === 'b') {
event.preventDefault();
handleShortcut('weightAmount');
}
};
window.addEventListener('keydown', handleKeyDown);
return () => {
window.removeEventListener('keydown', handleKeyDown);
};

View File

@ -262,23 +262,40 @@ const StandardTable = () => {
handleEditQuantity(item);
setshortKeyMethod(method);
};
const handleKeyDown = (event) => {
if (!event.ctrlKey) return;
const key = event.key.toLowerCase();
// 👉 ALT + P → Open Edit Total Amount
if (event.altKey && key === 'p') {
event.preventDefault();
if (OrderCardDetail?.length > 0) {
OpenEditTotalAmount();
}
return;
}
// 👉 CTRL shortcuts
if (!event.ctrlKey) return;
// if (key === 'q') {
// event.preventDefault();
// handleShortcut('qty');
// }
// if (key === 'e') {
// event.preventDefault();
// handleShortcut('price');
// }
if (key === 'q') {
event.preventDefault();
handleShortcut('qty');
}
if (key === 'e') {
} else if (key === 'e') {
event.preventDefault();
handleShortcut('price');
} else if (key === 'y') {
event.preventDefault();
handleShortcut('Parcel');
} else if (key === 'b') {
event.preventDefault();
handleShortcut('weightAmount');
}
};
window.addEventListener('keydown', handleKeyDown);
return () => {

View File

@ -841,7 +841,8 @@ const StandardTablePayment = () => {
if (!preOrder) {
const totalSum = orderCardDetail?.reduce(
(acc, card) => acc + parseFloat(card.OrderRate * card.OrderQty || 0),
// (acc, card) => acc + parseFloat(card.OrderRate * card.OrderQty || 0),
(acc, card) => acc + parseFloat(card.TotalAmt || 0),
0
);
@ -1417,7 +1418,8 @@ const StandardTablePayment = () => {
Type: a.Type,
OrderQty: a.OrderQty,
OrderRate: a.OrderRate,
TotalAmt: a.OrderQty * a.OrderRate,
// TotalAmt: a.OrderQty * a.OrderRate,
TotalAmt: a.TotalAmt,
TaxAmt: a.TaxAmt,
RefundQty: 0,
InwardDtlId: a.InwardDtlId,

File diff suppressed because it is too large Load Diff

View File

@ -59,6 +59,8 @@ import {
changeCardData,
GlobaldraggingComponent,
GlobalCombocarddata,
GlobalGetmultipleSearchDatas,
getmultipleSearch,
} from '../../../../Features/BookingScreen/BookingData/BookingData';
import {
GlobalPreOrderAdditem,
@ -223,6 +225,7 @@ const BSComboItemCard = (props) => {
SelectedGlobalCardColorDetail,
shallowEqual
);
const GetmultipleSearchDatas = useSelector(GlobalGetmultipleSearchDatas, shallowEqual)
const SelectedCardFont = useSelector(SelectedGlobalCardFont, shallowEqual);
const CartOrderDetails = useSelector(GlobalOrderCardDetails, shallowEqual);
const SelectedDatas = useSelector(GlobalSelectedDatas, shallowEqual);
@ -244,7 +247,7 @@ const BSComboItemCard = (props) => {
const paymentloader = useSelector(GlobalPayementloader, shallowEqual);
const SessionData = useSelector(StoredSessionData, shallowEqual);
const GlobalCombocarddatas = useSelector(GlobalCombocarddata);
console.log(GlobalCombocarddatas, 'GlobalCombocarddatas combo card');
console.log(GlobalCombocarddatas, 'GlobalCombocarddatas combo card');
const [messageType, setMessageType] = useState(null);
const [messageData, setMessageData] = useState(null);
const [repeatedModel, setRepeatedModel] = useState(false);
@ -297,7 +300,7 @@ console.log(GlobalCombocarddatas, 'GlobalCombocarddatas combo card');
: GlobalCombocarddatas
: '';
//
console.log(cardData, 'cardData combo card');
console.log(cardData, 'cardData combo card');
useEffect(() => {
// fetchedit();
getPreferenceStock();
@ -307,10 +310,25 @@ console.log(cardData, 'cardData combo card');
useEffect(() => {
if (AppId && CompId && BranchId) {
fetchedit();
GetmultipleSearchData()
}
// dispatch(changepreOrder(false)); Commented to Add Normal Produts After Adding the Combo Pack !!!!!! Dont Touch Without Shifayath Permission
}, [AppId, CompId, BranchId]);
const GetmultipleSearchData = async () => {
const data = {
AppId,
CompId,
BranchId,
};
try {
const response = await dispatch(getmultipleSearch(data))
} catch (error) {
console.error("Get Search Terms Error:", error);
}
};
useEffect(() => {
setPreOrderSelectedProdNames([]);
@ -328,10 +346,13 @@ console.log(cardData, 'cardData combo card');
if (noSubcatCardData) {
setNoSubcatCardData();
}
if (ProductSearch?.length > 5) {
if (ProductSearch?.length > 5 && GetmultipleSearchDatas.some(
e => e.toLowerCase() === "qrcode"
)) {
setQuickAdd(true);
}
}, [ProductSearch]);
}, [ProductSearch,GetmultipleSearchDatas]);
// useEffect(() => {
// if (
@ -4620,7 +4641,9 @@ console.log(cardData, 'cardData combo card');
</SortableContext>
</DndContext>
</>
) : ProductSearch?.length > 5 &&
) : ProductSearch?.length > 5 && GetmultipleSearchDatas.some(
e => e.toLowerCase() === "qrcode"
) &&
(cardData?.length == 0 || cardData == undefined) ? (
<div>
{/* cardData mohan 18-04-2025 */}

View File

@ -1,12 +1,10 @@
import React, { useCallback, useEffect, useRef, useState } from 'react';
import { shallowEqual, useDispatch, useSelector } from 'react-redux';
import moment from 'moment';
import { Badge, Modal, Tooltip } from 'antd';
import { ExclamationCircleOutlined } from '@ant-design/icons';
import { Badge, Tooltip } from 'antd';
import defaultimage from '../../../../Images/defaultItemImg.png';
import FormHeader from '../../../PageComponents/FormHeader';
import {
GlobalPricingAppPricingName,
SelectedGlobalCardColorDetail,
SelectedGlobalCardFont,
StoredSessionData,
@ -44,15 +42,12 @@ import {
GlobalReorderHoldDetails,
GlobalWeightScalePort,
GlobalWeightScaleWeight,
changeWeightScaleWeight,
GlobalExpDateforHeight,
GlobalBookingTypeBoth,
GlobalOrderType,
GlobalReorderProductDetails,
getConfigType,
GlobalPayementloader,
GlobalPaymentTransactionNumber,
GlobalSelOption,
PreferenceData,
changeCardData,
GlobaldraggingComponent,
@ -64,6 +59,8 @@ import {
GlobalCategorieData,
GlobalSubcategorieData,
GlobalProductCardTrigger,
GlobalGetmultipleSearchDatas,
getmultipleSearch,
} from '../../../../Features/BookingScreen/BookingData/BookingData';
import {
GlobalPreOrderAdditem,
@ -125,6 +122,7 @@ import AddProduct from '../../../../Components/AddProduct/AddProduct.jsx';
import { MdOutlineAddShoppingCart } from 'react-icons/md';
import { bulkpostdata } from '../../../../Features/ProductPage/ProductPage.js';
import ProductPriceChange from '../UtillComponents/ProductPriceChange.jsx';
import ExpireConfirmModal from '../BookingFunctionality/ExpireConfirmModal.jsx';
export function SortableCard({ id, children, item }) {
const {
@ -191,18 +189,14 @@ const BSItemCard = (props) => {
const AllCategoryDatas = useSelector(GlobalCategorieData, shallowEqual);
const AllsubcatgoryDatas = useSelector(GlobalSubcategorieData, shallowEqual);
const RetailWSSalesType = useSelector(GlobalRetailWSSalesType, shallowEqual);
// const CustDetails = SelectedCust ? SelectedCust : AddCustomerDetails?.[0];
const BookingTypeBoth = useSelector(GlobalBookingTypeBoth);
const GPreOrderList = useSelector(GlobalPreOrderList, shallowEqual);
const [modelQty, setModelQty] = useState(false);
const [modelstock, setModelstock] = useState(false);
const [ModalVarient, setModalVarient] = useState(false);
const [QtyIndex, setQtyIndex] = useState(0);
const [VarientIndex, setVarientIndex] = useState(0);
const [expModel, setexpModel] = useState(false);
const [prodexpir, setProdexpir] = useState(false);
const [expVarModel, setexpVarModel] = useState(false);
const [expStockModel, setexpStockModel] = useState(false);
const [initialRun, setInitialRun] = useState(false);
const [Item, setItem] = useState();
const [VarItem, setVarItem] = useState(0);
@ -244,6 +238,7 @@ const BSItemCard = (props) => {
SelectedGlobalCardColorDetail,
shallowEqual
);
const GetmultipleSearchDatas = useSelector(GlobalGetmultipleSearchDatas, shallowEqual)
const SelectedCardFont = useSelector(SelectedGlobalCardFont, shallowEqual);
const CartOrderDetails = useSelector(GlobalOrderCardDetails, shallowEqual);
const SelectedDatas = useSelector(GlobalSelectedDatas, shallowEqual);
@ -251,6 +246,7 @@ const BSItemCard = (props) => {
const WSProductdata = useSelector(GlobalWSProduct, shallowEqual);
const NewQrProductData = useSelector(GlobalNewQrProduct, shallowEqual);
const ReportholdData = useSelector(GlobalReorderHoldDetails, shallowEqual);
console.log(GetmultipleSearchDatas, "GetmultipleSearchDatas")
const ReorderProductData = useSelector(
GlobalReorderProductDetails,
shallowEqual
@ -281,12 +277,11 @@ const BSItemCard = (props) => {
const [QuickAdd, setQuickAdd] = useState(true);
const [onePeiceFlow, setOnePeiceFlow] = useState(false);
const [BillOrderPre, setBillOrderPre] = useState();
const [expQtyModel, setExpQtyModel] = useState(false);
const [qtyExpData, setQtyExpData] = useState();
const OrderOfferDetail = useSelector(Global_OrderOfferDetail);
const [freeProductsOffers, setfreeProductsOffers] = useState([]);
// const [freeProductsOffers, setfreeProductsOffers] = useState([]);
const [screenWidth, setScreenWidth] = useState(window.innerWidth);
const [screenHeight, setScreenHeight] = useState(window.innerHeight);
// const [screenHeight, setScreenHeight] = useState(window.innerHeight);
const ProdCat = useSelector(GlobalProductCategorie, shallowEqual);
const paymentloader = useSelector(GlobalPayementloader, shallowEqual);
const SessionData = useSelector(StoredSessionData, shallowEqual);
@ -314,6 +309,12 @@ const BSItemCard = (props) => {
const triggerOfferFree = useSelector(GlobalTriggerOfferFree);
const productCardTrigger = useSelector(GlobalProductCardTrigger);
const appPreferences = useSelector(ApplicationPreferences);
const [expireModal, setExpireModal] = useState({
open: false,
title: '',
onOk: null,
onCancel: null,
});
const salespagefields = appPreferences?.find(
(pref) => pref?.PreferredCatName === 'Sales Page Fields'
)?.PreferenceCatDetails;
@ -322,7 +323,7 @@ const BSItemCard = (props) => {
type?.PreferredSubCatName?.toLowerCase() === 'available date' &&
type?.PreferredStatus === 'Y'
);
console.log(AvailableDate, salespagefields, 'Available Date');
const SingleMember = salespagefields?.find(
(type) =>
type?.PreferredSubCatName?.toLowerCase() === 'single member' &&
@ -930,6 +931,19 @@ const BSItemCard = (props) => {
};
}
const openExpireModal = ({ title, onOk, onCancel }) => {
setExpireModal({
open: true,
title,
onOk,
onCancel,
});
};
const closeExpireModal = () => {
setExpireModal((prev) => ({ ...prev, open: false }));
};
// Usage example:
// const result = handleLoyaltyFreeProducts(orderCardDtls, freeProdDtls);
// console.log(result.ModifiedData);
@ -937,13 +951,9 @@ const BSItemCard = (props) => {
// console.log(result.AppliedOffers);
async function getOffers() {
let response = await dispatch(
await dispatch(
getOfferinBooking({ AppId: AppId, CompId: CompId, BranchId: BranchId })
).unwrap();
if (response?.data?.statusCode == 1) {
let expiredProd = response?.data?.data;
}
}
useEffect(() => {
@ -964,7 +974,7 @@ const BSItemCard = (props) => {
if (TableName === 'BuyXGetXOffers') return true;
}
);
setfreeProductsOffers(filteredOffers);
// setfreeProductsOffers(filteredOffers);
getOffers();
}, [OrderOfferDetail]);
@ -978,12 +988,7 @@ const BSItemCard = (props) => {
});
}
}, [SelectedCardFont]);
// const cardData = !globalAccessForOthers
// ? CardAccess
// ? SelectedDatas
// : ItemCard?.length == 0 ? noSubcatCardData : ItemCard
// : "";
//mohan 18-04-2025
const cardData = !globalAccessForOthers
? CardAccess
? SelectedDatas?.length > 1
@ -1025,10 +1030,27 @@ const BSItemCard = (props) => {
useEffect(() => {
if (AppId && CompId && BranchId) {
fetchedit();
GetmultipleSearchData()
}
// dispatch(changepreOrder(false)); Commented to Add Normal Produts After Adding the Combo Pack !!!!!! Dont Touch Without Shifayath Permission
}, [AppId, CompId, BranchId]);
const GetmultipleSearchData = async () => {
const data = {
AppId,
CompId,
BranchId,
};
try {
const response = await dispatch(getmultipleSearch(data))
} catch (error) {
console.error("Get Search Terms Error:", error);
}
};
useEffect(() => {
setPreOrderSelectedProdNames([]);
// dispatch(changePreOrderAdditem(null));
@ -1043,10 +1065,14 @@ const BSItemCard = (props) => {
if (noSubcatCardData) {
setNoSubcatCardData();
}
if (ProductSearch?.length > 5) {
if (ProductSearch?.length > 5 && GetmultipleSearchDatas.some(
e => e.toLowerCase() === "qrcode"
)) {
setQuickAdd(true);
}
}, [ProductSearch]);
}, [ProductSearch, GetmultipleSearchDatas]);
useEffect(() => {
if (
!initialRun &&
@ -1155,13 +1181,6 @@ const BSItemCard = (props) => {
if (tempconfigdata?.data?.statusCode == 1) {
setConfigDataList(tempconfigdata?.data?.data);
let configdata = tempconfigdata?.data?.data;
let checkName = BookingTypeBoth ? 'DineIn,TakeAway' : BookingType;
let filterconfigdata = configdata?.find(
(a) => a?.ConfigName === checkName
);
// setSelectedBookingType(filterconfigdata?.ConfigId);
}
};
@ -1195,7 +1214,10 @@ const BSItemCard = (props) => {
useEffect(() => {
if (ItemCard?.[0]?.QrBasedSearch === 'Y') {
if (ItemCard?.[0]?.OverAllExpStatus == 'Y' && ExpiredProduct) {
setexpModel(true);
openExpireModal({
title: 'Product Expires',
onOk: () => expFun(Item),
});
setItem(ItemCard?.[0]);
} else {
setQtydata(ItemCard?.[0]);
@ -1203,7 +1225,10 @@ const BSItemCard = (props) => {
}
} else if (ItemCard?.[0]?.OnePcQRBased === 'Y') {
if (ItemCard?.[0]?.OverAllExpStatus == 'Y' && ExpiredProduct) {
setexpModel(true);
openExpireModal({
title: 'Product Expires',
onOk: () => expFun(Item),
});
setItem(ItemCard?.[0]);
setOnePeiceFlow(true);
} else {
@ -1295,14 +1320,6 @@ const BSItemCard = (props) => {
)?.SettingValue === 'Y';
setExpiredProduct(expiredDate);
};
const to12Hour = (timeStr) => {
if (!timeStr) return '';
let [h, m] = timeStr.split(':');
h = parseInt(h, 10);
const suffix = h >= 12 ? 'PM' : 'AM';
h = h % 12 || 12; // 0 → 12
return `${h}${suffix}`;
};
const CloseModal = () => {
setModelQty(false);
@ -1464,55 +1481,6 @@ const BSItemCard = (props) => {
}
};
// const Stockfun = (index) => {
// setVarientIndex(index.key)
// let count = qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[index.key]?.StockDetails?.length;
// if (StockPreferenceDetail?.SettingValue === "Y") {
// if (count > 1) {
// if (qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[index.key]?.OverAllExpStatus == 'N') {
// setModalVarient(false)
// setModelstock(true)
// setVarItem(index.key)
// }
// else if (qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[index.key]?.OverAllExpStatus == 'Y') {
// if (prodexpir) {
// setRepeatedModel(true)
// setModalVarient(false)
// setModelstock(true)
// setVarItem(index.key)
// }
// else {
// setexpVarModel(true);
// setVarItem(index.key)
// }
// }
// // setVarientIndex(index.key)
// }
// else {
// if (qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[index.key]?.OverAllExpStatus == 'N') {
// dataTransfer(qtydata, QtyIndex, index.key, 0);
// setModelQty(false)
// setVarItem(index.key)
// }
// else if (qtydata?.ProductDetail?.[QtyIndex]?.ProdVariantDetails?.[index.key]?.OverAllExpStatus == 'Y') {
// if (prodexpir) {
// setProdexpir(false)
// setRepeatedModel(true)
// dataTransfer(qtydata, QtyIndex, index.key, 0);
// setModelQty(false)
// setVarItem(index.key)
// }
// else{
// setexpVarModel(true);
// setVarItem(index.key)
// }
// }
// }
// } else {
// dataTransfer(qtydata, QtyIndex, index.key, 0);
// setModelQty(false)
// }
// }
const Stockfun = (index) => {
setVarientIndex(index.key);
const variantDetails =
@ -1537,7 +1505,14 @@ const BSItemCard = (props) => {
}
} else if (overallExpStatus === 'Y' && ExpiredProduct) {
setVarItem(index.key);
setexpVarModel(true);
openExpireModal({
title: 'Variant Expires',
onOk: () => expVerFun(VarItem),
onCancel: () => {
setRepeatedModel(false);
setProdexpir(false);
},
});
}
} else {
if (
@ -1613,7 +1588,14 @@ const BSItemCard = (props) => {
}
} else if (overallExpStatus === 'Y' && ExpiredProduct) {
setVarItem(index.key);
setexpVarModel(true);
openExpireModal({
title: 'Variant Expires',
onOk: () => expVerFun(VarItem),
onCancel: () => {
setRepeatedModel(false);
setProdexpir(false);
},
});
return;
}
}
@ -1670,16 +1652,6 @@ const BSItemCard = (props) => {
dataTransfer(qtydata, QtyIndex, index.key, 0, onePeiceFlow);
}
} else {
// if (Isincart && Isincart?.StockAvailable === 'Y') {
// if (Isincart?.BalanceQty > Isincart?.OrderQty) {
// dataTransfer(qtydata, QtyIndex, index.key, 0, onePeiceFlow);
// } else {
// dataTransfer(qtydata, QtyIndex, index.key, 1, onePeiceFlow);
// }
// } else {
// dataTransfer(qtydata, QtyIndex, index.key, 0, onePeiceFlow);
// }
const findNextAvailableStockIndex = (
stockDetails,
CartOrderDetails,
@ -1745,7 +1717,14 @@ const BSItemCard = (props) => {
}
} else if (overallExpStatus === 'Y' && ExpiredProduct) {
setVarItem(index.key);
setexpVarModel(true);
openExpireModal({
title: 'Variant Expires',
onOk: () => expVerFun(VarItem),
onCancel: () => {
setRepeatedModel(false);
setProdexpir(false);
},
});
return;
}
setModelQty(false);
@ -1757,7 +1736,14 @@ const BSItemCard = (props) => {
(item) => item.OverAllExpStatus === 'Y'
);
if (QtyExpire && ExpiredProduct) {
setExpQtyModel(true);
openExpireModal({
title: 'Quantity Expires',
onOk: () => expQtyFun(qtyExpData),
onCancel: () => {
setRepeatedModel(false);
(setProdexpir(false),closeExpireModal());
},
});
setQtyExpData(index);
} else {
const selectedProIndex = qtydata?.ProductDetail?.findIndex(
@ -2023,7 +2009,14 @@ const BSItemCard = (props) => {
} else if (overallExpStatus === 'Y' && repeatedModel) {
dataTransfer(qtydata, QtyIndex, VarientIndex, item.key, onePeiceFlow);
} else {
setexpStockModel(true);
openExpireModal({
title: 'Stock Expires',
onOk: () => expStockFun(StockItem),
onCancel: () => {
setRepeatedModel(false);
setProdexpir(false);
},
});
setStockItem(item.key);
}
}
@ -2032,178 +2025,9 @@ const BSItemCard = (props) => {
setRepeatedModel(false);
};
const pressTimer = useRef(null);
const isLongPress = useRef(false);
const [priceChangeProduct, setPriceChangeProduct] = useState([]);
const [productPriceChange, setProductPriceChange] = useState(false);
const handleMouseDownItemCard = (e, item) => {
isLongPress.current = false;
pressTimer.current = setTimeout(() => {
if (
!(
(item?.OverAllQty !== undefined && !preferenceSingleSales
? returnCount(
item?.ProductDetail?.[0]?.ProdName,
item?.OverAllQty,
CartOrderDetails
)
: returnOnepcCount(
item?.ProductDetail?.[0]?.ProdName,
item?.OverAllPcs,
CartOrderDetails
)) > 0 ||
item?.ProductDetail?.some((item) => item?.StockAvailable !== 'Y')
)
) {
e.stopPropagation();
} else {
isLongPress.current = true;
handleLongPress(item);
}
}, 1000); // Adjust duration as needed
};
const handleMouseUpItemCard = (e, item, check) => {
clearTimeout(pressTimer.current);
if (!isLongPress.current) {
// Your existing onClick logic
if (
!(
(item?.OverAllQty !== undefined && !preferenceSingleSales
? returnCount(
item?.ProductDetail?.[0]?.ProdName,
item?.OverAllQty,
CartOrderDetails
)
: returnOnepcCount(
item?.ProductDetail?.[0]?.ProdName,
item?.OverAllPcs,
CartOrderDetails
)) > 0 ||
item?.ProductDetail?.some((item) => item?.StockAvailable !== 'Y')
)
) {
e.stopPropagation();
} else {
if (check && !e.target.closest('.card4Main-onepiece')) {
CardOnclick(
item,
item?.OnePcsAvailable === 'Y' &&
preferenceSingleSales &&
'OnePeiceProduct'
);
} else if (!check) {
CardOnclick(
item,
item?.OnePcsAvailable === 'Y' &&
preferenceSingleSales &&
'OnePeiceProduct'
);
}
}
}
isLongPress.current = false;
};
const handleMouseLeave = () => {
clearTimeout(pressTimer.current);
isLongPress.current = false;
};
// Mobile - Touch Start
const handleTouchStartItemCard = (e, item) => {
e.preventDefault();
isLongPress.current = false;
pressTimer.current = setTimeout(() => {
if (
!(
(item?.OverAllQty !== undefined && !preferenceSingleSales
? returnCount(
item?.ProductDetail?.[0]?.ProdName,
item?.OverAllQty,
CartOrderDetails
)
: returnOnepcCount(
item?.ProductDetail?.[0]?.ProdName,
item?.OverAllPcs,
CartOrderDetails
)) > 0 ||
item?.ProductDetail?.some((item) => item?.StockAvailable !== 'Y')
)
) {
e.stopPropagation();
} else {
isLongPress.current = true;
handleLongPress(item);
}
}, 1000);
};
// Mobile - Touch End
const handleTouchEndItemCard = (e, item, check = false) => {
e.preventDefault();
clearTimeout(pressTimer.current);
if (!isLongPress.current) {
// Same logic as mouse up
if (
!(
(item?.OverAllQty !== undefined && !preferenceSingleSales
? returnCount(
item?.ProductDetail?.[0]?.ProdName,
item?.OverAllQty,
CartOrderDetails
)
: returnOnepcCount(
item?.ProductDetail?.[0]?.ProdName,
item?.OverAllPcs,
CartOrderDetails
)) > 0 ||
item?.ProductDetail?.some((item) => item?.StockAvailable !== 'Y')
)
) {
e.stopPropagation();
} else {
if (check && !e.target.closest('.card4Main-onepiece')) {
CardOnclick(
item,
item?.OnePcsAvailable === 'Y' &&
preferenceSingleSales &&
'OnePeiceProduct'
);
} else if (!check) {
CardOnclick(
item,
item?.OnePcsAvailable === 'Y' &&
preferenceSingleSales &&
'OnePeiceProduct'
);
}
}
}
isLongPress.current = false;
};
// Mobile - Touch Cancel (when interrupted)
const handleTouchCancelItemCard = () => {
clearTimeout(pressTimer.current);
isLongPress.current = false;
};
const handleLongPress = (item) => {
console.log('Long press triggered for:', item);
setPriceChangeProduct([item]);
setProductPriceChange(true);
// Add your long press logic here
// For example: open a context menu, show options, etc.
};
const CardOnclick = async (item, Parameter) => {
setOnePeiceFlow(Parameter === 'OnePeiceProduct');
@ -2223,7 +2047,10 @@ const BSItemCard = (props) => {
Parameter === 'OnePeiceProduct' ? transformedItem : item;
setQtydata(modiffiedData);
if (modiffiedData.OverAllExpStatus === 'Y' && ExpiredProduct) {
setexpModel(true);
openExpireModal({
title: 'Product Expires',
onOk: () => expFun(Item),
});
setItem(modiffiedData);
} else if (modiffiedData) {
setQtydata(modiffiedData);
@ -2345,19 +2172,6 @@ const BSItemCard = (props) => {
)
: [];
const freeProductAvailableForThisItem = hasOffer
? OverAllproductBasedOfferDatas?.ProdDtl?.filter(
(o) =>
o?.ProdId === item?.ProdId &&
o?.ProdVariantDetails?.some((variant) =>
variant?.StockDetails?.some(
(stock) =>
stock?.InwardDtlId === item?.InwardDtlId && o?.MinQty > 0
)
)
)
: [];
const calculateTaxAmounts = (qty, rate, taxPercentage) => {
const totalAmount = qty * rate;
const taxAmount = (
@ -2422,7 +2236,8 @@ const BSItemCard = (props) => {
((cartItem?.OfferModeType && cartItem?.OfferMode === 'B'
? true
: cartItem?.OfferMode !== 'B') &&
cartItem?.OfferMode !== 'P' && cartItem?.OfferMode !== 'C' &&
cartItem?.OfferMode !== 'P' &&
cartItem?.OfferMode !== 'C' &&
cartItem?.OfferMode !== 'O' &&
cartItem?.OfferMode !== 'L'
? true
@ -2435,7 +2250,8 @@ const BSItemCard = (props) => {
((cartItem?.OfferModeType && cartItem?.OfferMode === 'B'
? true
: cartItem?.OfferMode !== 'B') &&
cartItem?.OfferMode !== 'P' && cartItem?.OfferMode !== 'C' &&
cartItem?.OfferMode !== 'P' &&
cartItem?.OfferMode !== 'C' &&
cartItem?.OfferMode !== 'O' &&
cartItem?.OfferMode !== 'L'
? true
@ -2451,7 +2267,8 @@ const BSItemCard = (props) => {
((cartItem?.OfferModeType && cartItem?.OfferMode === 'B'
? true
: cartItem?.OfferMode !== 'B') &&
cartItem?.OfferMode !== 'P' && cartItem?.OfferMode !== 'C' &&
cartItem?.OfferMode !== 'P' &&
cartItem?.OfferMode !== 'C' &&
cartItem?.OfferMode !== 'O' &&
cartItem?.OfferMode !== 'L'
? true
@ -2466,7 +2283,8 @@ const BSItemCard = (props) => {
((cartItem?.OfferModeType && cartItem?.OfferMode === 'B'
? true
: cartItem?.OfferMode !== 'B') &&
cartItem?.OfferMode !== 'P' && cartItem?.OfferMode !== 'C' &&
cartItem?.OfferMode !== 'P' &&
cartItem?.OfferMode !== 'C' &&
cartItem?.OfferMode !== 'O' &&
cartItem?.OfferMode !== 'L'
? true
@ -2800,9 +2618,12 @@ const BSItemCard = (props) => {
const UpdatedCartItemWithOffer = {
...item,
Offer: (sameProduct || bestOffer?.OfferMode === 'I' || bestOffer?.OfferMode === 'Q')
? (bestOffer?.OfferAmount || item.Offer)
: (item.Offer || bestOffer?.OfferAmount),
Offer:
sameProduct ||
bestOffer?.OfferMode === 'I' ||
bestOffer?.OfferMode === 'Q'
? bestOffer?.OfferAmount || item.Offer
: item.Offer || bestOffer?.OfferAmount,
OfferType: item?.OfferType || bestOffer?.OfferType,
OfferMessage: item?.OfferMessage || bestOffer?.OfferMessage,
OfferMode: item?.OfferMode || bestOffer?.OfferMode,
@ -2817,7 +2638,8 @@ const BSItemCard = (props) => {
((c?.OfferModeType && c?.OfferMode === 'B'
? true
: c?.OfferMode !== 'B') &&
c?.OfferMode !== 'P' && c?.OfferMode !== 'C' &&
c?.OfferMode !== 'P' &&
c?.OfferMode !== 'C' &&
c?.OfferMode !== 'O' &&
c?.OfferMode !== 'L'
? true
@ -3134,7 +2956,6 @@ const BSItemCard = (props) => {
};
});
console.log(Postdata, 'Postdata');
const response = await dispatch(
bulkpostdata({ ProdDetails: Postdata })
).unwrap();
@ -3838,7 +3659,7 @@ const BSItemCard = (props) => {
parseInt(totalSelectedProductQty || 0) +
parseInt(reorderComboConsumed || 0);
}
} catch (_) { }
} catch (_) {}
let getCurrentProdDtl = orderDetails?.filter(
(a) => a?.ProdName === ProdName
);
@ -4039,7 +3860,7 @@ const BSItemCard = (props) => {
parseInt(totalSelectedProductQty || 0) +
parseInt(reorderComboConsumed || 0);
}
} catch (_) { }
} catch (_) {}
let getCurrentProdDtl = orderDetails?.filter((a) => a?.ProdId === ProdId);
let totalOrderQty = getCurrentProdDtl?.reduce((accumulator, card) => {
return (
@ -4075,7 +3896,7 @@ const BSItemCard = (props) => {
}, 0);
totalOrderQty =
parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0);
} catch (_) { }
} catch (_) {}
let OverallProdQty = totalOrderQty - totalSelectedProductQty;
if (
parseInt(ItemQuantity) >
@ -4161,7 +3982,7 @@ const BSItemCard = (props) => {
parseInt(totalSelectedProductQty || 0) +
parseInt(reorderComboConsumed || 0);
}
} catch (_) { }
} catch (_) {}
let getCurrentProdDtl = orderDetails?.filter((a) => a?.ProdId === ProdId);
let totalOrderQty = getCurrentProdDtl?.reduce((accumulator, card) => {
return (
@ -4200,7 +4021,7 @@ const BSItemCard = (props) => {
}, 0);
totalOrderQty =
parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0);
} catch (_) { }
} catch (_) {}
let OverallProdQty = totalOrderQty - totalSelectedProductQty;
if (
parseInt(ItemQuantity) >
@ -4292,7 +4113,7 @@ const BSItemCard = (props) => {
parseInt(totalSelectedProductQty || 0) +
parseInt(reorderComboConsumed || 0);
}
} catch (_) { }
} catch (_) {}
let getCurrentProdDtl = orderDetails?.filter(
(a) => a?.ProdId === ProdId && a?.InwardDtlId === InwardDtlId
);
@ -4335,7 +4156,7 @@ const BSItemCard = (props) => {
}, 0);
totalOrderQty =
parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0);
} catch (_) { }
} catch (_) {}
let OverallProdQty = totalOrderQty - totalSelectedProductQty;
if (
@ -4419,7 +4240,7 @@ const BSItemCard = (props) => {
parseInt(totalSelectedProductQty || 0) +
parseInt(reorderComboConsumed || 0);
}
} catch (_) { }
} catch (_) {}
let getCurrentProdDtl = orderDetails?.filter(
(a) => a?.ProdId === ProdId && a?.InwardDtlId === InwardDtlId
);
@ -4466,7 +4287,7 @@ const BSItemCard = (props) => {
}, 0);
totalOrderQty =
parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0);
} catch (_) { }
} catch (_) {}
let OverallProdQty = totalOrderQty - totalSelectedProductQty;
if (
@ -5303,7 +5124,8 @@ const BSItemCard = (props) => {
setVarItem(0);
SingleQuantity(item, onePeiceFlow);
}
setexpModel(false);
closeExpireModal();
setProdexpir(true);
setQtydata(item);
};
@ -5409,7 +5231,7 @@ const BSItemCard = (props) => {
setQtyIndex(selectedProIndex);
setRepeatedModel(true);
setExpQtyModel(false);
closeExpireModal()
};
const expVerFun = (item) => {
@ -5426,12 +5248,12 @@ const BSItemCard = (props) => {
setModelQty(false);
setSelectedBrand('Others');
}
setexpVarModel(false);
closeExpireModal();
};
const expStockFun = (item) => {
dataTransfer(qtydata, QtyIndex, VarientIndex, item, onePeiceFlow);
setexpStockModel(false);
closeExpireModal();
};
const getMaxBrandWidth = () => {
@ -5463,17 +5285,7 @@ const BSItemCard = (props) => {
};
}, []);
useEffect(() => {
function handleResize() {
setScreenHeight(window.innerHeight);
}
window.addEventListener('resize', handleResize);
return () => {
window.removeEventListener('resize', handleResize);
};
}, []);
// Example usage for checking the length of 'ProdVariantDetails'
const widthBasedOnProdVariantDetails = getMaxBrandWidth();
@ -7433,7 +7245,12 @@ const BSItemCard = (props) => {
</SortableContext>
</DndContext>
</>
) : ProductSearch?.length > 5 &&
)
: ProductSearch?.length > 5 && GetmultipleSearchDatas.some(
e => e.toLowerCase() === "qrcode"
) &&
(cardData?.length == 0 || cardData == undefined) ? (
<div>
{/* cardData mohan 18-04-2025 */}
@ -7502,107 +7319,19 @@ const BSItemCard = (props) => {
</div>
</div>
</div>
{expModel && (
<Modal
title={
<div
style={{ display: 'flex', gap: '1rem', flexDirection: 'row' }}
>
<div>
<ExclamationCircleOutlined
style={{ color: 'rgb(231 176 12)', fontSize: '30px' }}
/>
</div>
<div>
<h4>Product Expires</h4>
</div>
</div>
}
open={expModel}
onOk={() => expFun(Item)}
onCancel={() => setexpModel(false)}
okText="Submit"
cancelText="Don't Submit"
maskTransitionName="" // Remove animation for the mask
transitionName=""
></Modal>
)}
{expQtyModel && (
<Modal
title={
<div
style={{ display: 'flex', gap: '1rem', flexDirection: 'row' }}
>
<ExclamationCircleOutlined
style={{ color: 'rgb(231 176 12)', fontSize: '30px' }}
/>
<h3>Quantity Expires</h3>
</div>
}
open={expQtyModel}
onOk={() => expQtyFun(qtyExpData)}
onCancel={() => {
(setRepeatedModel(false),
setProdexpir(false),
setExpQtyModel(false));
{expireModal?.open && (
<ExpireConfirmModal
open={expireModal?.open}
title={expireModal?.title}
onOk={() => {
expireModal.onOk?.();
closeExpireModal();
}}
okText="Submit"
cancelText="Don't Submit"
maskTransitionName=""
transitionName=""
></Modal>
)}
{expVarModel && (
<Modal
title={
<div
style={{ display: 'flex', gap: '1rem', flexDirection: 'row' }}
>
<ExclamationCircleOutlined
style={{ color: 'rgb(231 176 12)', fontSize: '30px' }}
/>
<h3>Variant Expires</h3>
</div>
}
open={expVarModel}
onOk={() => expVerFun(VarItem)}
onCancel={() => {
(setexpVarModel(false),
setRepeatedModel(false),
setProdexpir(false));
expireModal.onCancel?.();
closeExpireModal();
}}
okText="Submit"
cancelText="Don't Submit"
maskTransitionName=""
transitionName=""
></Modal>
)}
{expStockModel && (
<Modal
title={
<div
style={{ display: 'flex', gap: '1rem', flexDirection: 'row' }}
>
<ExclamationCircleOutlined
style={{ color: 'rgb(231 176 12)', fontSize: '30px' }}
/>
<h3>Stock Expires</h3>
</div>
}
open={expStockModel}
onOk={() => expStockFun(StockItem)}
onCancel={() => {
(setexpStockModel(false),
setRepeatedModel(false),
setProdexpir(false));
}}
okText="Submit"
cancelText="Don't Submit"
maskTransitionName=""
transitionName=""
></Modal>
)}
{modelQty && (

View File

@ -59,6 +59,8 @@ import {
changeCardData,
GlobaldraggingComponent,
GlobalCombocarddata,
GlobalGetmultipleSearchDatas,
getmultipleSearch,
} from '../../../../Features/BookingScreen/BookingData/BookingData';
import {
GlobalPreOrderAdditem,
@ -92,7 +94,7 @@ import {
import { useSortable } from '@dnd-kit/sortable';
import { CSS } from '@dnd-kit/utilities';
import { getCombolist } from '../../../../Features/ComboMaster/ComboMaster.js';
import {GlobalOtherServicesdata, OtherServicesCardlistdata} from '../../../../Features/OtherServices/OtherServices.js';
import { GlobalOtherServicesdata, OtherServicesCardlistdata } from '../../../../Features/OtherServices/OtherServices.js';
export function SortableCard({ id, children, item }) {
@ -183,9 +185,10 @@ const BSOtherServiceItemCard = (props) => {
SelectedGlobalCardColorDetail,
shallowEqual
);
const GetmultipleSearchDatas = useSelector(GlobalGetmultipleSearchDatas, shallowEqual)
const SelectedCardFont = useSelector(SelectedGlobalCardFont, shallowEqual);
const CartOrderDetails = useSelector(GlobalOrderCardDetails, shallowEqual);
console.log(CartOrderDetails,"CartOrderDetailsOTHERSERVICESITEMCARD");
console.log(CartOrderDetails, "CartOrderDetailsOTHERSERVICESITEMCARD");
const SelectedDatas = useSelector(GlobalSelectedDatas, shallowEqual);
const otherscarddata = useSelector(Globalothersdata, shallowEqual);
const WSProductdata = useSelector(GlobalWSProduct, shallowEqual);
@ -269,11 +272,25 @@ const BSOtherServiceItemCard = (props) => {
useEffect(() => {
if (AppId && CompId && BranchId) {
fetchedit();
GetmultipleSearchData()
}
// dispatch(changepreOrder(false)); Commented to Add Normal Produts After Adding the Combo Pack !!!!!! Dont Touch Without Shifayath Permission
}, [AppId, CompId, BranchId]);
const GetmultipleSearchData = async () => {
const data = {
AppId,
CompId,
BranchId,
};
try {
const response = await dispatch(getmultipleSearch(data))
} catch (error) {
console.error("Get Search Terms Error:", error);
}
};
useEffect(() => {
setPreOrderSelectedProdNames([]);
// dispatch(changePreOrderAdditem(null));
@ -290,10 +307,13 @@ const BSOtherServiceItemCard = (props) => {
if (noSubcatCardData) {
setNoSubcatCardData();
}
if (ProductSearch?.length > 5) {
if (ProductSearch?.length > 5 && GetmultipleSearchDatas.some(
e => e.toLowerCase() === "qrcode"
)) {
setQuickAdd(true);
}
}, [ProductSearch]);
}, [ProductSearch, GetmultipleSearchDatas]);
useEffect(() => {
if (
@ -402,7 +422,7 @@ const BSOtherServiceItemCard = (props) => {
}
};
let Otherservicedata = [
let Otherservicedata = [
{
"CompId": 1,
"BranchId": 101,
@ -479,7 +499,7 @@ let Otherservicedata = [
]
const processGlobalComboData = () => {
const processGlobalComboData = () => {
const serviceCategories = GlobalOtherServicescarddatas?.[0]?.ServiceDetails;
@ -496,9 +516,9 @@ const processGlobalComboData = () => {
}));
return comboList;
};
};
const comboList = processGlobalComboData() || [];
const comboList = processGlobalComboData() || [];
useEffect(() => {
@ -2885,7 +2905,7 @@ const comboList = processGlobalComboData() || [];
const onAutocompleteChange = async (selectedOption) => {
console.log(selectedOption,"selectedOptionselectedOption");
console.log(selectedOption, "selectedOptionselectedOption");
let data = {
@ -2913,9 +2933,9 @@ console.log(selectedOption,"selectedOptionselectedOption");
TotalSellPrice: selectedOption?.TotalAmt,
Price: selectedOption.TotalAmt,
TaxAmt:selectedOption?.TaxAmt,
TaxId:selectedOption?.TaxId,
TaxName:selectedOption?.TaxName,
TaxAmt: selectedOption?.TaxAmt,
TaxId: selectedOption?.TaxId,
TaxName: selectedOption?.TaxName,
TaxPercentage: selectedOption?.TaxPercentage,
QRCode: selectedOption?.ComboInwardDetails?.[0]?.QRCode,
@ -2943,7 +2963,7 @@ console.log(selectedOption,"selectedOptionselectedOption");
};
const AddOrderDetails = async (item) => {
console.log("AddOrderDetails item",item)
console.log("AddOrderDetails item", item)
if (preOrder) {
let Response = await dispatch(
getConfigType({ TypeName: 'Booking Type' })
@ -3099,7 +3119,7 @@ console.log("AddOrderDetails item",item)
);
const BookingTypeProd = item?.BookingTypeName;
if (isItemInCart && BookingTypeProd != 'Dine In' && OrderType != 'Hold' ) {
if (isItemInCart && BookingTypeProd != 'Dine In' && OrderType != 'Hold') {
if (BillOrderPre === 'Y') {
const UpdatedCartItem =
@ -3201,7 +3221,7 @@ console.log("AddOrderDetails item",item)
setMessageData("Service Already Exist")
}
}
}
}
else if (isItemInCart && BookingTypeProd === 'Dine In' && OrderType != 'Hold') {
@ -3530,49 +3550,49 @@ console.log("AddOrderDetails item",item)
);
}
// else {
// const baseItem = {
// ...item,
// OrderQty: 1,
// OfferPrice: item?.OfferPrice,
// TotalAmt:
// item?.OfferPrice > 0
// ? item?.OrderRate -
// (item?.OfferType === 'F'
// ? item?.OfferPrice
// : (item?.OrderRate * item?.OfferPrice) / 100)
// : item?.OrderRate,
// TaxAmt: (
// (item?.OrderRate * item?.TaxPercentage) /
// (100 + item?.TaxPercentage)
// ).toFixed(2),
// WithoutTaxRate: (
// item?.OrderRate -
// (item?.OrderRate * item?.TaxPercentage) /
// (100 + item?.TaxPercentage)
// ).toFixed(2),
// };
// else {
// const baseItem = {
// ...item,
// OrderQty: 1,
// OfferPrice: item?.OfferPrice,
// TotalAmt:
// item?.OfferPrice > 0
// ? item?.OrderRate -
// (item?.OfferType === 'F'
// ? item?.OfferPrice
// : (item?.OrderRate * item?.OfferPrice) / 100)
// : item?.OrderRate,
// TaxAmt: (
// (item?.OrderRate * item?.TaxPercentage) /
// (100 + item?.TaxPercentage)
// ).toFixed(2),
// WithoutTaxRate: (
// item?.OrderRate -
// (item?.OrderRate * item?.TaxPercentage) /
// (100 + item?.TaxPercentage)
// ).toFixed(2),
// };
// if (item?.ServiceType == 'I') {
// // Always add as a separate entry (individual)
// dispatch(changeOrderCardDetails([
// ...CartOrderDetails,
// baseItem,
// ]));
// } else {
// if (item?.ServiceType == 'I') {
// // Always add as a separate entry (individual)
// dispatch(changeOrderCardDetails([
// ...CartOrderDetails,
// baseItem,
// ]));
// } else {
// // Use your existing logic with BillOrderPre check
// BillOrderPre === 'Y'
// ? dispatch(changeOrderCardDetails([
// baseItem,
// ...CartOrderDetails,
// ]))
// : dispatch(changeOrderCardDetails([
// ...CartOrderDetails,
// baseItem,
// ]));
// }
// }
// // Use your existing logic with BillOrderPre check
// BillOrderPre === 'Y'
// ? dispatch(changeOrderCardDetails([
// baseItem,
// ...CartOrderDetails,
// ]))
// : dispatch(changeOrderCardDetails([
// ...CartOrderDetails,
// baseItem,
// ]));
// }
// }
else {
const baseItem = {
@ -4118,7 +4138,7 @@ console.log("AddOrderDetails item",item)
</p>
)} */}
</p>
{ cardFunction?.Price && (
{cardFunction?.Price && (
<p
className="BSItemCard-itemPrice"
style={{
@ -4493,7 +4513,9 @@ console.log("AddOrderDetails item",item)
</SortableContext>
</DndContext>
</>
) : ProductSearch?.length > 5 &&
) : ProductSearch?.length > 5 && GetmultipleSearchDatas.some(
e => e.toLowerCase() === "qrcode"
) &&
(cardData?.length == 0 || cardData == undefined) ? (
<div>
{/* cardData mohan 18-04-2025 */}

View File

@ -69,6 +69,8 @@ import {
slotTimeStatus,
changeAddBookingDetailsTrigger,
GlobalAddBookingDetailsTrigger,
GlobalGetmultipleSearchDatas,
getmultipleSearch,
} from '../../../../Features/BookingScreen/BookingData/BookingData';
import {
GlobalPreOrderAdditem,
@ -216,6 +218,7 @@ const BsBookingitemCard = (props) => {
shallowEqual
);
// const SelectedCust = useSelector(GlobalSelOption, shallowEqual);
const GetmultipleSearchDatas = useSelector(GlobalGetmultipleSearchDatas, shallowEqual)
const RetailWSSalesType = useSelector(GlobalRetailWSSalesType, shallowEqual);
// const CustDetails = SelectedCust ? SelectedCust : AddCustomerDetails?.[0];
const BookingTypeBoth = useSelector(GlobalBookingTypeBoth);
@ -1090,10 +1093,25 @@ const BsBookingitemCard = (props) => {
useEffect(() => {
if (AppId && CompId && BranchId) {
fetchedit();
GetmultipleSearchData()
}
// dispatch(changepreOrder(false)); Commented to Add Normal Produts After Adding the Combo Pack !!!!!! Dont Touch Without Shifayath Permission
}, [AppId, CompId, BranchId]);
const GetmultipleSearchData = async () => {
const data = {
AppId,
CompId,
BranchId,
};
try {
const response = await dispatch(getmultipleSearch(data))
} catch (error) {
console.error("Get Search Terms Error:", error);
}
};
useEffect(() => {
setPreOrderSelectedProdNames([]);
// dispatch(changePreOrderAdditem(null));
@ -1126,10 +1144,12 @@ const BsBookingitemCard = (props) => {
if (noSubcatCardData) {
setNoSubcatCardData();
}
if (ProductSearch?.length > 5) {
if (ProductSearch?.length > 5 && GetmultipleSearchDatas.some(
e => e.toLowerCase() === "qrcode"
)) {
setQuickAdd(true);
}
}, [ProductSearch]);
}, [ProductSearch, GetmultipleSearchDatas]);
useEffect(() => {
if (
!initialRun &&
@ -2318,7 +2338,7 @@ const BsBookingitemCard = (props) => {
parseInt(totalSelectedProductQty || 0) +
parseInt(reorderComboConsumed || 0);
}
} catch (_) {}
} catch (_) { }
let getCurrentProdDtl = orderDetails?.filter(
(a) => a?.ProdName === ProdName
);
@ -2519,7 +2539,7 @@ const BsBookingitemCard = (props) => {
parseInt(totalSelectedProductQty || 0) +
parseInt(reorderComboConsumed || 0);
}
} catch (_) {}
} catch (_) { }
let getCurrentProdDtl = orderDetails?.filter((a) => a?.ProdId === ProdId);
let totalOrderQty = getCurrentProdDtl?.reduce((accumulator, card) => {
return (
@ -2555,7 +2575,7 @@ const BsBookingitemCard = (props) => {
}, 0);
totalOrderQty =
parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0);
} catch (_) {}
} catch (_) { }
let OverallProdQty = totalOrderQty - totalSelectedProductQty;
if (
parseInt(ItemQuantity) >
@ -2641,7 +2661,7 @@ const BsBookingitemCard = (props) => {
parseInt(totalSelectedProductQty || 0) +
parseInt(reorderComboConsumed || 0);
}
} catch (_) {}
} catch (_) { }
let getCurrentProdDtl = orderDetails?.filter((a) => a?.ProdId === ProdId);
let totalOrderQty = getCurrentProdDtl?.reduce((accumulator, card) => {
return (
@ -2680,7 +2700,7 @@ const BsBookingitemCard = (props) => {
}, 0);
totalOrderQty =
parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0);
} catch (_) {}
} catch (_) { }
let OverallProdQty = totalOrderQty - totalSelectedProductQty;
if (
parseInt(ItemQuantity) >
@ -2772,7 +2792,7 @@ const BsBookingitemCard = (props) => {
parseInt(totalSelectedProductQty || 0) +
parseInt(reorderComboConsumed || 0);
}
} catch (_) {}
} catch (_) { }
let getCurrentProdDtl = orderDetails?.filter(
(a) => a?.ProdId === ProdId && a?.InwardDtlId === InwardDtlId
);
@ -2815,7 +2835,7 @@ const BsBookingitemCard = (props) => {
}, 0);
totalOrderQty =
parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0);
} catch (_) {}
} catch (_) { }
let OverallProdQty = totalOrderQty - totalSelectedProductQty;
if (
@ -2899,7 +2919,7 @@ const BsBookingitemCard = (props) => {
parseInt(totalSelectedProductQty || 0) +
parseInt(reorderComboConsumed || 0);
}
} catch (_) {}
} catch (_) { }
let getCurrentProdDtl = orderDetails?.filter(
(a) => a?.ProdId === ProdId && a?.InwardDtlId === InwardDtlId
);
@ -2946,7 +2966,7 @@ const BsBookingitemCard = (props) => {
}, 0);
totalOrderQty =
parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0);
} catch (_) {}
} catch (_) { }
let OverallProdQty = totalOrderQty - totalSelectedProductQty;
if (
@ -4883,7 +4903,7 @@ const BsBookingitemCard = (props) => {
className="BSItemCard-itemName"
>
{item?.ProdName}
{}
{ }
</p>
{cardFunction?.Price && (
<p
@ -5340,7 +5360,9 @@ const BsBookingitemCard = (props) => {
</SortableContext>
</DndContext>
</>
) : ProductSearch?.length > 5 &&
) : ProductSearch?.length > 5 && GetmultipleSearchDatas.some(
e => e.toLowerCase() === "qrcode"
) &&
(cardData?.length == 0 || cardData == undefined) ? (
<div>
{/* cardData mohan 18-04-2025 */}
@ -6072,8 +6094,7 @@ const BsBookingitemCard = (props) => {
return (
<div
key={idx}
className={`slotTimingSelect ${
isBooked
className={`slotTimingSelect ${isBooked
? 'booked'
: isAlreadyAdded
? 'incart'

View File

@ -0,0 +1,30 @@
import { Modal } from 'antd';
import { ExclamationCircleOutlined } from '@ant-design/icons';
const ExpireConfirmModal = ({
open,
title,
onOk,
onCancel,
okText = 'Submit',
cancelText = "Don't Submit",
}) => {
return (
<Modal
open={open}
onOk={onOk}
onCancel={onCancel}
okText={okText}
cancelText={cancelText}
>
<div style={{ display: 'flex', gap: '1rem', alignItems: 'center' }}>
<ExclamationCircleOutlined
style={{ color: 'rgb(231 176 12)', fontSize: 30 }}
/>
<h3 style={{ margin: 0 }}>{title}</h3>
</div>
</Modal>
);
};
export default ExpireConfirmModal;

View File

@ -1,8 +1,9 @@
import React, { useEffect, useState } from "react";
import { getSession } from "../../../../Services/Others";
import { useDispatch } from "react-redux";
import { shallowEqual, useDispatch, useSelector } from "react-redux";
import {
getmultipleSearch,
GlobalGetmultipleSearchDatas,
PostProductSearch,
} from "../../../../Features/BookingScreen/BookingData/BookingData";
import Buttons from "../../../../Components/Forms/Buttons";
@ -12,6 +13,7 @@ const MultipleSearch = ({ close }) => {
const BranchId = getSession("BranchId");
const AppId = getSession("AppId");
const dispatch = useDispatch();
const GetmultipleSearchDatas = useSelector(GlobalGetmultipleSearchDatas, shallowEqual)
const options = [
{ label: "Product Name", value: "ProdName" },
@ -29,7 +31,8 @@ const MultipleSearch = ({ close }) => {
console.log(selectedValues, "selectedValuesselectedValues");
useEffect(() => {
GetmultipleSearchData();
// GetmultipleSearchData();
setSelectedValues(GetmultipleSearchDatas)
}, []);
const postMultipleSearch = async () => {
@ -47,6 +50,7 @@ const MultipleSearch = ({ close }) => {
const response = await dispatch(PostProductSearch(data)).unwrap();
console.log("Search Response:", response);
if (response?.data?.statusCode == 1) {
GetmultipleSearchData();
setSelectedValues("");
close(false);
}
@ -63,21 +67,12 @@ const MultipleSearch = ({ close }) => {
};
try {
const response = await dispatch(getmultipleSearch(data)).unwrap();
const response = await dispatch(getmultipleSearch(data))
if (response?.data?.statusCode === 1) {
const selected =
response?.data?.data?.[0]?.SearchTermDtl?.map(
(item) => item?.SearchTerm,
) || [];
setSelectedValues(selected);
}
} catch (error) {
console.error("Get Search Terms Error:", error);
}
};
return (
<>
<div

View File

@ -16,6 +16,9 @@ const ShortcutKeyHelper = ({ }) => {
{ key: 'Alt + W', description: 'Hold and Recall' },
{ key: 'Ctrl + Q', description: 'Qty Change' },
{ key: 'Ctrl + E', description: 'Price Change' },
{ key: 'Ctrl + Y', description: 'Weight / Amount' },
{ key: 'Ctrl + B', description: 'Packing' },
{ key: 'Alt + P', description: 'Change Total Amount' },
{ key: 'Ctrl + I', description: 'Customer Rate History' },
];

View File

@ -543,10 +543,10 @@ export default function BSCombo1() {
</div>
)}
</div>
{preferenceshortcutkey && (
{/* {preferenceshortcutkey && (
<div className="keyboardShortcut">
<ShortcutKeyHelper />
</div>)}
</div>)} */}
</div>
</div>
{/* </div> */}

View File

@ -85,6 +85,13 @@ const SalesCountComponent = React.memo(
type?.PreferredSubCatName?.toLowerCase() === 'take away' &&
type?.PreferredStatus === 'Y'
);
const preferenceshortcutkey = preferencedata?.[0]?.[
'SettingDtlDetails'
]?.some(
(item) =>
item.SettingIdName.toLowerCase() === 'shortcutkeys' &&
item.SettingValue === 'Y'
);
const [messageType, setMessageType] = useState(null);
@ -1085,6 +1092,11 @@ const SalesCountComponent = React.memo(
)}
</Tooltip>
</div>
{/* {preferenceshortcutkey && <ShortcutKeyHelper />} */}
{preferenceshortcutkey && (
<div className="keyboardShortcut">
<ShortcutKeyHelper />
</div>)}
<AllSalesPageSettings />
<ProductPriceChange />
<ReceivedStocksModal

File diff suppressed because it is too large Load Diff

View File

@ -4035,7 +4035,7 @@ const ProductForm = ({ formType }) => {
</div>
)}
<div className="submitButton">
<div className="ProductSubBTN">
<Buttons
buttonText="SUBMIT"
color="901D77"

View File

@ -2029,125 +2029,190 @@ const ProductList = () => {
formRef?.current?.resetFields();
};
const handleCancel = () => {
const handleResetExcelData = useCallback(() => {
dispatch(emptyExcelData());
}, []);
const handleCancel = useCallback(() => {
setOpenExcel(false);
handleResetExcelData();
};
}, [handleResetExcelData]);
const openModal = () => {
const openModal = useCallback(() => {
setOpenExcel(true);
};
const handleResetExcelData = () => {
dispatch(emptyExcelData());
};
const handleSubmitbulk = (excelData) => {
}, []);
const handleSubmitbulk = useCallback((excelData) => {
setExceldatasubmit(excelData?.filter((e) => e?.isModified));
};
}, []);
const handleSubmit = async () => {
const handleSubmit = useCallback(async () => {
setBulkpost(true);
let FilterData = Exceldatasubmit?.filter((a) => a['ProductName'] != '');
if (FilterData && FilterData.length > 0) {
const formattedData = FilterData?.map((data) => ({
const FilterData = Exceldatasubmit?.filter(
a => a.ProductName !== ''
);
if (!FilterData || FilterData.length === 0) {
setBulkpost(false);
setMessageType('error');
setMessageData('No data to submit. Please upload an Excel file.');
return;
}
const formattedData = FilterData.map(data => ({
AppId: getSession('AppId'),
CompId: getSession('CompId'),
BranchId: getSession('BranchId'),
CreatedBy: getSession('UserId'),
ProdName: data?.ProductName,
ProdVariantName: data?.ProductVariantName,
Size: data?.Quantity,
UOM: data?.UOM,
MRP: data?.MRP,
WhSalePrice: data?.WhSalePrice,
SellPrice: data?.SellPrice,
ProdCat: data?.Category ? data?.Category : 'General',
ProdSubCat: data?.SubCategory,
Brand: data?.Brand ? data?.Brand : '',
AutoGenerateQr: data?.AutoGenerateQrcode
? data?.AutoGenerateQrcode
: 'No',
QRCode: data?.AddQrCode,
StockAvailable: data?.StockAvailable ? data?.StockAvailable : 'No',
TaxId: data?.Tax ? data?.Tax : 'NIL - 0%',
Cess: data?.Cess,
HSNCode: data?.HSN,
PartNumber: data?.PartNumber,
Rack: data?.Rack,
ManufDate: moment(data?.ManufactureDate, ['M/D/YY']).format(
ProdName: data.ProductName,
ProdVariantName: data.ProductVariantName,
Size: data.Quantity,
UOM: data.UOM,
MRP: data.MRP,
WhSalePrice: data.WhSalePrice,
SellPrice: data.SellPrice,
ProdCat: data.Category || 'General',
ProdSubCat: data.SubCategory,
Brand: data.Brand || '',
AutoGenerateQr: data.AutoGenerateQrcode || 'No',
QRCode: data.AddQrCode,
StockAvailable: data.StockAvailable || 'No',
TaxId: data.Tax || 'NIL - 0%',
Cess: data.Cess,
HSNCode: data.HSN,
PartNumber: data.PartNumber,
Rack: data.Rack,
ManufDate: moment(data.ManufactureDate, ['M/D/YY']).format(
'YYYY-MM-DDTHH:mm:ss'
),
ExpDate: moment(data?.ExpireDate, ['M/D/YY']).format(
ExpDate: moment(data.ExpireDate, ['M/D/YY']).format(
'YYYY-MM-DDTHH:mm:ss'
),
AvailableFrom: data?.AvailableFrom
? moment(data?.AvailableFrom, ['M/D/YY']).format('HH:mm:ss')
AvailableFrom: data.AvailableFrom
? moment(data.AvailableFrom, ['M/D/YY']).format('HH:mm:ss')
: '',
AvailableTo: data?.AvailableTo
? moment(data?.AvailableTo, ['M/D/YY']).format('HH:mm:ss')
AvailableTo: data.AvailableTo
? moment(data.AvailableTo, ['M/D/YY']).format('HH:mm:ss')
: '',
OnePcsAvailable: data?.Amountperpiece ? data?.Amountperpiece : 'No',
OnePcsPrice: data?.AmountperpiecePrice,
// NoOfPcs:data?.NumberOfPieceInside,
AutoGenerateSingleQr: data?.AutoGenerateOnePieceQrcode
? data?.AutoGenerateOnePieceQrcode
: 'No',
OnePcQR: data?.AutoGenerateOnePieceQrcodeNumber,
// ProductType:data?.ProductType,
TokenAvailable: data?.TokenAvailable ? data?.TokenAvailable : 'No',
ProdLogo: data?.Productimage,
OnePcsAvailable: data.Amountperpiece || 'No',
OnePcsPrice: data.AmountperpiecePrice,
AutoGenerateSingleQr: data.AutoGenerateOnePieceQrcode || 'No',
OnePcQR: data.AutoGenerateOnePieceQrcodeNumber,
TokenAvailable: data.TokenAvailable || 'No',
ProdLogo: data.Productimage,
}));
let postDatas = { prodDetails: formattedData };
const postDatas = { prodDetails: formattedData };
let response = await dispatch(bulkpostdata(postDatas)).unwrap();
if (response?.data?.statusCode == 1) {
const response = await dispatch(bulkpostdata(postDatas)).unwrap();
if (response?.data?.statusCode === 1) {
setMessageType('success');
setMessageData(response?.data?.response);
setBulkpost(false);
setMessageData(response.data.response);
setpage(1);
var responseData = await dispatch(
const responseData = await dispatch(
getProductDataPageNo({ CompId, BranchId, AppId, PageNumber: 1 })
).unwrap();
setCurrentPage(1);
if (responseData?.data?.statusCode === 1) {
setCachedData({ [currentPage]: responseData?.data?.data });
setproductData(responseData?.data?.data);
setCachedData({ 1: responseData.data.data });
setproductData(responseData.data.data);
setCurrentPage(1);
}
} else {
setMessageType('error');
setMessageData(responseData?.data?.response);
setMessageData(response?.data?.response);
}
setBulkpost(false);
handleResetExcelData();
handleCancel();
} else {
setBulkpost(false);
setMessageType('error');
setMessageData('No data to submit. Please upload an Excel file.');
}
};
}, [
Exceldatasubmit,
const Unit = UomPreference?.map((e) => e.ConfigName);
const CategoryId = ProdCatData?.map((e) => e.ConfigId);
const CategoryNames = ProdCatData?.map((e) => e.ConfigName);
const CatconfigId = ProdCatData?.map((e) => e.ConfigId);
const Subcatnames = subCatData?.map((e) => e.ConfigName);
const SubcatId = subCatData?.map((e) => e.ConfigId);
const SubcatNumFId = subCatData?.map((e) => e.NumFId);
const BrandNumFId = allBrandData?.map((e) => e.NumFId);
const BrandId = allBrandData?.map((e) => e.ConfigId);
const BrandName = allBrandData?.map((e) => e.ConfigName);
const SuplierNames = SupplierData?.map((e) => e.SuppName);
const TaxDatas = TaxData?.map((e) => e.TaxIdName);
const TaxData1 = TaxData?.map((e) => e.TaxPercentage);
const combinedTaxData = TaxDatas?.map(
CompId,
BranchId,
AppId,
handleResetExcelData,
handleCancel
]);
const Unit = useMemo(
() => UomPreference?.map((e) => e.ConfigName),
[UomPreference]
);
const CategoryId = useMemo(
() => ProdCatData?.map((e) => e.ConfigId),
[ProdCatData]
);
const CategoryNames = useMemo(
() => ProdCatData?.map((e) => e.ConfigName),
[ProdCatData]
);
const CatconfigId = useMemo(
() => ProdCatData?.map((e) => e.ConfigId),
[ProdCatData]
);
const Subcatnames = useMemo(
() => subCatData?.map((e) => e.ConfigName),
[subCatData]
);
const SubcatId = useMemo(
() => subCatData?.map((e) => e.ConfigId),
[subCatData]
);
const SubcatNumFId = useMemo(
() => subCatData?.map((e) => e.NumFId),
[subCatData]
);
const BrandNumFId = useMemo(
() => allBrandData?.map((e) => e.NumFId),
[allBrandData]
);
const BrandId = useMemo(
() => allBrandData?.map((e) => e.ConfigId),
[allBrandData]
);
const BrandName = useMemo(
() => allBrandData?.map((e) => e.ConfigName),
[allBrandData]
);
const SuplierNames = useMemo(
() => SupplierData?.map((e) => e.SuppName),
[SupplierData]
);
const TaxDatas = useMemo(
() => TaxData?.map((e) => e.TaxIdName),
[TaxData]
);
const TaxData1 = useMemo(
() => TaxData?.map((e) => e.TaxPercentage),
[TaxData]
);
const combinedTaxData = useMemo(
() =>
TaxDatas?.map(
(taxIdName, index) => `${taxIdName} - ${TaxData1[index]}%`
),
[TaxDatas, TaxData1]
);
const Deletebulk = async () => {
let data = {
@ -2641,7 +2706,7 @@ const ProductList = () => {
generateQRCodeCopy={(code) =>
generateQRCodeCopy(QrandbarcodeDatas, code)
}
generateCodeImage={(code, codeType = 'Q') => generateCodeImage(code, codeType, QrandbarcodeDatas) }
generateCodeImage={(code, codeType = 'Q') => generateCodeImage(code, codeType, QrandbarcodeDatas)}
imageTagBarcodeAndQR={imageTagBarcodeAndQR}
dropdownValue={dropdownValue}
barcodeTemplateDetails={barcodeTemplateDetails}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,76 @@
.viewerExcelupload {
.ant-table-tbody {
.old-row {
background-color: #97441d !important;
td {
background-color: #ffe1fb !important;
}
&:hover {
background-color: #ffe1fb !important;
> td {
background-color: #ffe1fb !important;
}
}
}
.modified-row {
background-color: #cdffd5 !important;
td {
background-color: #cdffd5 !important;
}
&:hover {
background-color: #cdffd5 !important;
> td {
background-color: #cdffd5 !important;
}
}
}
}
.ant-table-tbody > tr.old-row:hover > td {
background-color: #ff9595 !important;
}
.ant-table-tbody > tr.modified-row:hover > td {
background-color: #aeffbb !important;
}
.legend-container {
margin-bottom: 10px;
display: flex;
gap: 15px;
align-items: center;
}
.legend-item {
display: flex;
align-items: center;
gap: 5px;
}
.legend-box {
width: 20px;
height: 20px;
border-radius: 3px;
}
.old-box {
background: #ffe1fb;
border: 1px solid #ff43e6;
}
.modified-box {
background: #cdffd5;
border: 1px solid #72e018;
}
.legend-text {
font-size: 13px;
}
}

View File

@ -0,0 +1,26 @@
import { useEffect, useRef } from 'react';
function useWhyDidYouUpdate(componentName, props) {
const prevProps = useRef(props);
useEffect(() => {
const allKeys = Object.keys({ ...prevProps.current, ...props });
const changes = {};
allKeys.forEach((key) => {
if (prevProps.current[key] !== props[key]) {
changes[key] = {
from: prevProps.current[key],
to: props[key],
};
}
});
if (Object.keys(changes).length > 0) {
console.log(`🔍 ${componentName} re-rendered due to:`, changes);
}
prevProps.current = props;
});
}
export default useWhyDidYouUpdate

View File

@ -21,13 +21,9 @@
color: #fff;
padding: 15px;
border: 1px solid;
overflow: hidden;
width: 170px;
height: 45px;
background-color: var(--PRIMARY_BUTTON_BG_COLOR) !important;
@ -42,10 +38,6 @@
justify-content: space-between;
align-items: center;
z-index: 2;
}
.Counter-Category-mapping {
@ -198,7 +190,7 @@
.edit-btn,
.remove-btn {
border: none;
font-family: 'Poppins';
font-family: "Poppins";
padding: 4px 10px;
border-radius: 6px;
cursor: pointer;
@ -223,7 +215,6 @@
}
.address-type-section {
// padding: 12px;
// background-color: #f8fafc;
// border-radius: 8px;
@ -584,7 +575,7 @@
button {
padding: 14px 18px;
border: none;
font-family: 'Poppins', sans-serif;
font-family: "Poppins", sans-serif;
font-size: 14px;
font-weight: 500;
cursor: pointer;
@ -592,12 +583,12 @@
outline: none;
}
>button:nth-child(1) {
> button:nth-child(1) {
background-color: #daecfd;
color: #1292ee;
}
>button:nth-child(2) {
> button:nth-child(2) {
background-color: #ffdcdc;
color: #ee3333;
}
@ -616,7 +607,7 @@
flex-direction: column;
margin-bottom: 5px;
>div:nth-child(2) {
> div:nth-child(2) {
width: max-content;
font-size: 12px !important;
height: max-content;
@ -698,7 +689,7 @@
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.deliveryaddress{
.deliveryaddress {
display: flex;
align-items: flex-start;
flex-direction: column;
@ -706,7 +697,7 @@
padding: 10px;
border-radius: 4px;
height: max-content;
.deliveryaddress_edit{
.deliveryaddress_edit {
color: #0cabf4;
display: flex;
align-items: center;
@ -718,7 +709,7 @@
.add-slot-header {
font-size: 25px;
font-weight: 600;
font-family: 'Gilroy';
font-family: "Gilroy";
padding-bottom: 6px;
}
@ -744,7 +735,7 @@
.swicthCardScanToggle {
button {
background-color: #1292ee !important;
font-family: 'Poppins';
font-family: "Poppins";
font-weight: 500;
}
}
@ -756,7 +747,7 @@
}
.searched-value {
font-family: 'Poppins';
font-family: "Poppins";
font-weight: 500;
}
@ -764,7 +755,8 @@
scrollbar-width: thin;
padding-right: 8px;
@media (max-width: 600px) {}
@media (max-width: 600px) {
}
.ant-table-thead {
&:hover {
@ -915,14 +907,14 @@
}
.table-notes {
font-family: 'Poppins';
font-family: "Poppins";
font-style: italic;
margin-bottom: 10px;
}
.ant-table table {
border-spacing: 0 !important;
font-family: 'Poppins';
font-family: "Poppins";
}
}
@ -956,13 +948,13 @@
table {
thead {
th {
font-family: 'Gilroy' !important;
font-family: "Gilroy" !important;
}
}
tbody {
td {
font-family: 'Poppins' !important;
font-family: "Poppins" !important;
font-weight: 500;
font-size: 13px;
}
@ -1085,7 +1077,7 @@ table {
border: 1px solid #dadada;
border-radius: 4px;
>img {
> img {
max-width: 100%;
max-height: 100%;
object-fit: contain;
@ -1210,7 +1202,7 @@ table {
flex-direction: column;
justify-content: center;
>img {
> img {
max-width: 100%;
max-height: 100%;
object-fit: contain;
@ -1237,7 +1229,7 @@ table {
flex-direction: column;
justify-content: center;
>img {
> img {
max-width: 100%;
max-height: 100%;
object-fit: contain;
@ -1273,7 +1265,7 @@ table {
flex-direction: row;
justify-content: space-between;
>img {
> img {
max-width: 100%;
max-height: 100%;
object-fit: contain;
@ -1300,7 +1292,7 @@ table {
flex-direction: row;
justify-content: space-between;
>img {
> img {
max-width: 100%;
max-height: 100%;
object-fit: contain;
@ -1328,7 +1320,7 @@ table {
flex-direction: column;
justify-content: space-between;
>img {
> img {
max-width: 100%;
max-height: 100%;
object-fit: contain;
@ -1416,8 +1408,7 @@ table {
p {
width: 15px;
height: 15px;
background-color: #C00000;
background-color: #c00000;
}
span {
@ -1433,7 +1424,7 @@ table {
display: flex;
align-items: center;
gap: 6px;
background-color: #1292EE;
background-color: #1292ee;
color: #fff;
font-family: "Poppins";
font-weight: 500;
@ -1487,14 +1478,14 @@ table {
.tab-item:hover {
background: #f5f5f5;
color: #901D77;
color: #901d77;
}
.tab-item.active {
display: flex;
background: #fff;
color: #901D77;
border-color: #901D77;
color: #901d77;
border-color: #901d77;
border-bottom: 2px solid #fff;
margin-bottom: -2px;
z-index: 1;
@ -1503,7 +1494,7 @@ table {
}
.tab-item.active::after {
content: '';
content: "";
position: absolute;
bottom: -2px;
left: 0;
@ -1528,5 +1519,45 @@ table {
color: #c00000;
font-weight: 500;
}
}
.bulkChangePriceTable {
width: 83vw;
overflow: auto;
height: 60vh;
scrollbar-width: thin;
position: relative;
.ant-table-cell {
padding: 2px 6px !important;
}
.ant-table-tbody {
height: 60vh !important;
}
.ant-input {
padding: 3px 14px 4px 11px !important;
text-align: center;
}
}
.PriChangeUpper {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 10px;
.btnbtninfo {
background: #8f1e78;
color: #fff;
vertical-align: top;
display: flex;
align-items: center;
justify-content: center;
width: 42px;
border-radius: 4px;
height: 42px;
&:hover {
background: #d333b3;
}
}
}

View File

@ -1,9 +1,16 @@
.cropUploadFieldSmall {
:where(.css-dev-only-do-not-override-1v5z42l).ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item-container,
:where(.css-dev-only-do-not-override-1v5z42l).ant-upload-wrapper.ant-upload-picture-circle-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item-container,
:where(.css-dev-only-do-not-override-1v5z42l).ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-circle .ant-upload-list-item-container,
:where(.css-dev-only-do-not-override-1v5z42l).ant-upload-wrapper.ant-upload-picture-circle-wrapper .ant-upload-list.ant-upload-list-picture-circle .ant-upload-list-item-container {
:where(.css-dev-only-do-not-override-1v5z42l).ant-upload-wrapper.ant-upload-picture-card-wrapper
.ant-upload-list.ant-upload-list-picture-card
.ant-upload-list-item-container,
:where(.css-dev-only-do-not-override-1v5z42l).ant-upload-wrapper.ant-upload-picture-circle-wrapper
.ant-upload-list.ant-upload-list-picture-card
.ant-upload-list-item-container,
:where(.css-dev-only-do-not-override-1v5z42l).ant-upload-wrapper.ant-upload-picture-card-wrapper
.ant-upload-list.ant-upload-list-picture-circle
.ant-upload-list-item-container,
:where(.css-dev-only-do-not-override-1v5z42l).ant-upload-wrapper.ant-upload-picture-circle-wrapper
.ant-upload-list.ant-upload-list-picture-circle
.ant-upload-list-item-container {
width: 65px;
height: 65px;
}
@ -45,7 +52,7 @@
font-weight: 600;
font-size: 14px;
color: #000000;
background-color: 'rgba(0, 0, 0, 0.02)';
background-color: "rgba(0, 0, 0, 0.02)";
& .ant-form-item .ant-form-item-explain-error {
font-weight: 400 !important;
@ -290,7 +297,7 @@
color: #23378a;
padding: 12px 24px;
border: none;
font-family: 'Poppins', sans-serif;
font-family: "Poppins", sans-serif;
font-size: 14px;
font-weight: 500;
cursor: pointer;
@ -319,14 +326,14 @@
}
.viewerExcelupload .ant-table-wrapper,
.viewerExcelupload .ant-table-tbody>tr.ant-table-row>td {
.viewerExcelupload .ant-table-tbody > tr.ant-table-row > td {
padding: 4px;
font-size: 14px;
font-weight: 600;
}
.viewerExcelupload .ant-table-wrapper,
.viewerExcelupload .ant-table-thead>tr>th {
.viewerExcelupload .ant-table-thead > tr > th {
padding: 1px 8px !important;
}
@ -381,7 +388,7 @@
}
.productinputForm {
.ant-input-affix-wrapper>input.ant-input {
.ant-input-affix-wrapper > input.ant-input {
padding-top: 1.5rem;
}
}
@ -412,7 +419,7 @@
border: none;
outline: none;
cursor: pointer;
font-family: 'Poppins', sans-serif;
font-family: "Poppins", sans-serif;
color: #fff;
background-color: #1677ff;
border-radius: 6px;
@ -435,7 +442,7 @@
}
.product-Add-HSN {
.ant-input-affix-wrapper>input.ant-input {
.ant-input-affix-wrapper > input.ant-input {
padding: 12px 0 0 0 !important;
}
}
@ -446,7 +453,7 @@
background-color: #d4e7ff;
font-weight: 500;
font-size: 13px;
font-family: 'Poppins';
font-family: "Poppins";
border: none;
cursor: pointer;
border-radius: 6px;
@ -473,9 +480,13 @@
.ant-form-item {
margin-bottom: 0;
}
.ant-input {
padding: 4px 14px 6px 11px !important;
text-decoration: underline;
text-decoration-color: #b8b8b8;
}
}
.productFormproductImg {
width: 350px;
align-items: center;
@ -483,8 +494,19 @@
.Customized_QuickAdd {
margin-bottom: 10px;
font-family: 'Poppins', sans-serif;
font-family: "Poppins", sans-serif;
font-size: 16px;
font-weight: 400;
font-style: normal;
}
.ProductSubBTN {
width: 100%;
display: flex;
justify-content: flex-end;
@media (max-width: 500px) {
position: fixed;
right: 10px;
bottom: 8px;
}
}

View File

@ -107,7 +107,6 @@
}
.ant-table-cell {
.ant-form-item {
margin-bottom: unset;
@ -117,3 +116,37 @@
}
}
}
.SheetIndiacte {
display: flex;
align-items: center;
gap: 1rem;
div {
display: flex;
align-items: center;
gap: 5px;
}
.mdsheet {
width: 25px;
height: 25px;
border: 1px solid #5bff73;
background-color: #b3ffbf;
border-radius: 4px;
}
.mdsheet2 {
width: 25px;
border-radius: 4px;
height: 25px;
background-color: #ffc7f8;
border: 1px solid #ff74ec;
}
span {
color: #333;
font-family: "Poppins";
font-size: 14px;
font-weight: 500;
}
}