after resolving conflicts
This commit is contained in:
commit
e815840d83
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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') && (
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
.productils {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.weightCalBTN {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -256,23 +256,32 @@ const BSBillingTable6 = () => {
|
|||
};
|
||||
|
||||
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);
|
||||
|
||||
return () => {
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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)}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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 () => {
|
||||
|
|
|
|||
|
|
@ -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
|
|
@ -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);
|
||||
|
|
@ -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 */}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
@ -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 && (
|
||||
|
|
|
|||
|
|
@ -59,6 +59,8 @@ import {
|
|||
changeCardData,
|
||||
GlobaldraggingComponent,
|
||||
GlobalCombocarddata,
|
||||
GlobalGetmultipleSearchDatas,
|
||||
getmultipleSearch,
|
||||
} from '../../../../Features/BookingScreen/BookingData/BookingData';
|
||||
import {
|
||||
GlobalPreOrderAdditem,
|
||||
|
|
@ -183,6 +185,7 @@ const BSOtherServiceItemCard = (props) => {
|
|||
SelectedGlobalCardColorDetail,
|
||||
shallowEqual
|
||||
);
|
||||
const GetmultipleSearchDatas = useSelector(GlobalGetmultipleSearchDatas, shallowEqual)
|
||||
const SelectedCardFont = useSelector(SelectedGlobalCardFont, shallowEqual);
|
||||
const CartOrderDetails = useSelector(GlobalOrderCardDetails, shallowEqual);
|
||||
console.log(CartOrderDetails, "CartOrderDetailsOTHERSERVICESITEMCARD");
|
||||
|
|
@ -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 (
|
||||
|
|
@ -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 */}
|
||||
|
|
|
|||
|
|
@ -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 &&
|
||||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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' },
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -543,10 +543,10 @@ export default function BSCombo1() {
|
|||
</div>
|
||||
)}
|
||||
</div>
|
||||
{preferenceshortcutkey && (
|
||||
{/* {preferenceshortcutkey && (
|
||||
<div className="keyboardShortcut">
|
||||
<ShortcutKeyHelper />
|
||||
</div>)}
|
||||
</div>)} */}
|
||||
</div>
|
||||
</div>
|
||||
{/* </div> */}
|
||||
|
|
|
|||
|
|
@ -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
|
|
@ -4035,7 +4035,7 @@ const ProductForm = ({ formType }) => {
|
|||
</div>
|
||||
)}
|
||||
|
||||
<div className="submitButton">
|
||||
<div className="ProductSubBTN">
|
||||
<Buttons
|
||||
buttonText="SUBMIT"
|
||||
color="901D77"
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
@ -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;
|
||||
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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;
|
||||
|
|
@ -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;
|
||||
|
|
@ -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,8 +480,12 @@
|
|||
.ant-form-item {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.ant-input {
|
||||
padding: 4px 14px 6px 11px !important;
|
||||
text-decoration: underline;
|
||||
text-decoration-color: #b8b8b8;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.productFormproductImg {
|
||||
width: 350px;
|
||||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue