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,21 +274,49 @@ const BSBillingTable1 = () => {
|
|||
setshortKeyMethod(method);
|
||||
};
|
||||
|
||||
// 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) => {
|
||||
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;
|
||||
|
||||
const key = event.key.toLowerCase();
|
||||
|
||||
if (key === 'q') {
|
||||
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 () => {
|
||||
|
|
|
|||
|
|
@ -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,22 +228,34 @@ const BSBillingTable3 = () => {
|
|||
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;
|
||||
|
||||
const handleKeyDown = (event) => {
|
||||
if (!event.ctrlKey) return;
|
||||
|
||||
const key = event.key.toLowerCase();
|
||||
|
||||
if (key === 'q') {
|
||||
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 () => {
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -281,22 +281,34 @@ const BSBillingTable4 = () => {
|
|||
setshortKeyMethod(method);
|
||||
};
|
||||
|
||||
const handleKeyDown = (event) => {
|
||||
if (!preferenceshortcutkey) return;
|
||||
if (!event.ctrlKey) return;
|
||||
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;
|
||||
|
||||
const key = event.key.toLowerCase();
|
||||
|
||||
if (key === 'q') {
|
||||
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,
|
||||
|
|
|
|||
|
|
@ -1927,22 +1927,34 @@ const BsBill = () => {
|
|||
setshortKeyMethod(method);
|
||||
};
|
||||
|
||||
const handleKeyDown = (event) => {
|
||||
if (!preferenceshortcutkey) return;
|
||||
if (!event.ctrlKey) return;
|
||||
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;
|
||||
|
||||
const key = event.key.toLowerCase();
|
||||
|
||||
if (key === 'q') {
|
||||
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 () => {
|
||||
|
|
|
|||
|
|
@ -255,24 +255,33 @@ const BSBillingTable6 = () => {
|
|||
setshortKeyMethod(method);
|
||||
};
|
||||
|
||||
const handleKeyDown = (event) => {
|
||||
|
||||
if (!preferenceshortcutkey) return
|
||||
if (!event.ctrlKey) return;
|
||||
|
||||
const key = event.key.toLowerCase();
|
||||
|
||||
if (key === 'q') {
|
||||
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);
|
||||
|
||||
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,21 +250,31 @@ const BSBillingTable7 = () => {
|
|||
};
|
||||
|
||||
const handleKeyDown = (event) => {
|
||||
if (!preferenceshortcutkey) return;
|
||||
if (!event.ctrlKey) return;
|
||||
|
||||
const key = event.key.toLowerCase();
|
||||
|
||||
if (key === 'q') {
|
||||
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);
|
||||
|
||||
return () => {
|
||||
|
|
|
|||
|
|
@ -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,15 +622,18 @@ const BSEditTotalAmt = (props) => {
|
|||
},
|
||||
]}
|
||||
>
|
||||
<InputField
|
||||
field="SalesDisc"
|
||||
name="SalesDisc"
|
||||
fieldState={true}
|
||||
fieldApi={true}
|
||||
autocomplete="off"
|
||||
onChange={(e) => SalesChangefun(e)}
|
||||
maxLength={8}
|
||||
/>
|
||||
<div ref={salesDiscInputRef}>
|
||||
<InputField
|
||||
field="SalesDisc"
|
||||
name="SalesDisc"
|
||||
fieldState={true}
|
||||
fieldApi={true}
|
||||
autocomplete="off"
|
||||
onChange={(e) => SalesChangefun(e)}
|
||||
onKeyDown={(e) => handleSalesKeyDown(e)}
|
||||
maxLength={8}
|
||||
/>
|
||||
</div>
|
||||
</Form.Item>
|
||||
</Form>{' '}
|
||||
</td>
|
||||
|
|
@ -593,18 +683,21 @@ const BSEditTotalAmt = (props) => {
|
|||
},
|
||||
]}
|
||||
>
|
||||
<InputField
|
||||
field="SellPrice"
|
||||
name="SellPrice"
|
||||
// value={NewPrice1}
|
||||
label="Reduction"
|
||||
fieldState={true}
|
||||
fieldApi={true}
|
||||
// id="error2"
|
||||
autocomplete="off"
|
||||
onChange={(e) => PriceChangefun(e)}
|
||||
// isOnChange={formType == "edit" || formRef.current?.getFieldsValue()?.CustName ? true : false}
|
||||
/>
|
||||
<div ref={salesMoreOptInputRef}>
|
||||
<InputField
|
||||
field="SellPrice"
|
||||
name="SellPrice"
|
||||
// value={NewPrice1}
|
||||
label="Reduction"
|
||||
fieldState={true}
|
||||
fieldApi={true}
|
||||
// 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,16 +777,19 @@ const BSEditTotalAmt = (props) => {
|
|||
},
|
||||
]}
|
||||
>
|
||||
<InputField
|
||||
field="ESTSalesDisc"
|
||||
name="ESTSalesDisc"
|
||||
fieldState={true}
|
||||
fieldApi={true}
|
||||
// id="error2"
|
||||
autocomplete="off"
|
||||
onChange={(e) => EstChangefun(e)}
|
||||
maxLength={8}
|
||||
/>
|
||||
<div ref={estDiscInputRef}>
|
||||
<InputField
|
||||
field="ESTSalesDisc"
|
||||
name="ESTSalesDisc"
|
||||
fieldState={true}
|
||||
fieldApi={true}
|
||||
// id="error2"
|
||||
autocomplete="off"
|
||||
onChange={(e) => EstChangefun(e)}
|
||||
onKeyDown={(e) => handleEstKeyDown(e)}
|
||||
maxLength={8}
|
||||
/>
|
||||
</div>
|
||||
</Form.Item>
|
||||
</Form>
|
||||
</td>
|
||||
|
|
@ -742,18 +838,21 @@ const BSEditTotalAmt = (props) => {
|
|||
},
|
||||
]}
|
||||
>
|
||||
<InputField
|
||||
field="SellPrice"
|
||||
name="ESTSellingPrice"
|
||||
// value={NewPrice1}
|
||||
label="Reduction"
|
||||
fieldState={true}
|
||||
fieldApi={true}
|
||||
// id="error2"
|
||||
autocomplete="off"
|
||||
onChange={(e) => PriceChangefunEst(e)}
|
||||
// isOnChange={formType == "edit" || formRef.current?.getFieldsValue()?.CustName ? true : false}
|
||||
/>
|
||||
<div ref={estMoreOptInputRef}>
|
||||
<InputField
|
||||
field="SellPrice"
|
||||
name="ESTSellingPrice"
|
||||
// value={NewPrice1}
|
||||
label="Reduction"
|
||||
fieldState={true}
|
||||
fieldApi={true}
|
||||
// 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)}
|
||||
|
|
|
|||
|
|
@ -148,13 +148,13 @@ const ComboSalesBillTable = () => {
|
|||
OrderType === 'Hold'
|
||||
? tableData?.filter((a, b) => a.BookingTypeName === 'TakeAway')
|
||||
: tableData?.filter(
|
||||
(a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId
|
||||
);
|
||||
(a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId
|
||||
);
|
||||
const OldtableDataTakeAway =
|
||||
OrderType != 'Hold'
|
||||
? tableData?.filter(
|
||||
(a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId
|
||||
)
|
||||
(a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId
|
||||
)
|
||||
: [];
|
||||
|
||||
const [EditQuantity, setEditQuantity] = useState(false);
|
||||
|
|
@ -249,27 +249,59 @@ const ComboSalesBillTable = () => {
|
|||
// );
|
||||
// setBillOrderPre(BillOrder?.SettingValue);
|
||||
// }, [preferenceDatas]);
|
||||
|
||||
useEffect(() => {
|
||||
const handleKeyDown = (event) => {
|
||||
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);
|
||||
}
|
||||
const getSelectedItem = () => {
|
||||
const getItem = (data = []) => {
|
||||
if (!data.length) return null;
|
||||
return BillOrderPre === 'Y' ? data[0] : data[data.length - 1];
|
||||
};
|
||||
|
||||
if (tableDataTakeAway?.length > 0) {
|
||||
return getItem(tableDataTakeAway);
|
||||
} else if (tableDataDinein?.length > 0) {
|
||||
return getItem(tableDataDinein);
|
||||
}
|
||||
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);
|
||||
};
|
||||
|
|
@ -1122,9 +1154,9 @@ const ComboSalesBillTable = () => {
|
|||
)?.map((item, idx) =>
|
||||
idx === 0
|
||||
? {
|
||||
...item,
|
||||
FreeQty,
|
||||
}
|
||||
...item,
|
||||
FreeQty,
|
||||
}
|
||||
: item
|
||||
),
|
||||
};
|
||||
|
|
@ -2246,20 +2278,20 @@ const ComboSalesBillTable = () => {
|
|||
tableDataDinein?.length >= PreviousdataLength
|
||||
? 'wheat'
|
||||
: BookingType !== 'Dine In' &&
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length + index === 0 &&
|
||||
tableDataDinein?.length >= PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
triggerAnimation &&
|
||||
OldtableDataTakeAway?.length + index === 0 &&
|
||||
tableDataDinein?.length >= PreviousdataLength &&
|
||||
!HoldOrderDtl &&
|
||||
!UnpaidData
|
||||
? 'wheat'
|
||||
: 'inherit'
|
||||
: 'none',
|
||||
background: row?.SalesId
|
||||
? 'rgb(243, 248, 213)'
|
||||
: GlobEstBooking === 'ParEst' &&
|
||||
GlobProdwisedata?.includes(
|
||||
row?.InwardDtlId + ' ' + row?.BookingTypeName
|
||||
)
|
||||
GlobProdwisedata?.includes(
|
||||
row?.InwardDtlId + ' ' + row?.BookingTypeName
|
||||
)
|
||||
? '#b2d1f7'
|
||||
: (OldtableDataTakeAway?.length + index) % 2 === 0
|
||||
? 'white'
|
||||
|
|
@ -2294,37 +2326,37 @@ const ComboSalesBillTable = () => {
|
|||
{/* Product Name / Item */}
|
||||
{(item.OptionName === 'Item' ||
|
||||
item.OptionName === 'Product Name') && (
|
||||
<td
|
||||
key={`prod-${index}`}
|
||||
className="productNameTd"
|
||||
onClick={() =>
|
||||
row.FullProductIdentifierDtls?.length > 0 ||
|
||||
row.ProductIdentifierDtls?.length > 0
|
||||
? handleImeiDetails(row)
|
||||
: editField && handleEditQuantity(row)
|
||||
}
|
||||
>
|
||||
{row?.Type !== 'OS' ? row.ProdName : row.ServiceName}
|
||||
{row?.BrandName ? ` ${row.BrandName}` : ''}
|
||||
{row?.Type !== 'C' && (
|
||||
<p className="Tbl3-Variant">
|
||||
{/* {row?.ProdVariantName} {row?.Size} {row?.UomName} */}
|
||||
(
|
||||
{!row?.ProdVariantName?.toLowerCase()?.includes(
|
||||
'variant'
|
||||
) && <span>{row?.ProdVariantName} </span>}
|
||||
{row?.Size}
|
||||
{row?.SinglePc == 'Y' ? 'PCS' : row?.UomName})
|
||||
</p>
|
||||
)}
|
||||
{row?.Type === 'C' &&
|
||||
row.ProdDetail?.map((prod, idx) => (
|
||||
<p key={idx}>
|
||||
{prod.ProdName} - {prod.Size} {prod.UomName}
|
||||
<td
|
||||
key={`prod-${index}`}
|
||||
className="productNameTd"
|
||||
onClick={() =>
|
||||
row.FullProductIdentifierDtls?.length > 0 ||
|
||||
row.ProductIdentifierDtls?.length > 0
|
||||
? handleImeiDetails(row)
|
||||
: editField && handleEditQuantity(row)
|
||||
}
|
||||
>
|
||||
{row?.Type !== 'OS' ? row.ProdName : row.ServiceName}
|
||||
{row?.BrandName ? ` ${row.BrandName}` : ''}
|
||||
{row?.Type !== 'C' && (
|
||||
<p className="Tbl3-Variant">
|
||||
{/* {row?.ProdVariantName} {row?.Size} {row?.UomName} */}
|
||||
(
|
||||
{!row?.ProdVariantName?.toLowerCase()?.includes(
|
||||
'variant'
|
||||
) && <span>{row?.ProdVariantName} </span>}
|
||||
{row?.Size}
|
||||
{row?.SinglePc == 'Y' ? 'PCS' : row?.UomName})
|
||||
</p>
|
||||
))}
|
||||
</td>
|
||||
)}
|
||||
)}
|
||||
{row?.Type === 'C' &&
|
||||
row.ProdDetail?.map((prod, idx) => (
|
||||
<p key={idx}>
|
||||
{prod.ProdName} - {prod.Size} {prod.UomName}
|
||||
</p>
|
||||
))}
|
||||
</td>
|
||||
)}
|
||||
|
||||
{/* Barcode */}
|
||||
{item.OptionName === 'Barcode' && (
|
||||
|
|
@ -2351,7 +2383,7 @@ const ComboSalesBillTable = () => {
|
|||
onClick={() =>
|
||||
editField && handleEditQuantityCombo(row)
|
||||
}
|
||||
// onClick={() => handleEditQTYcombo()}
|
||||
// onClick={() => handleEditQTYcombo()}
|
||||
>
|
||||
{(!EditQtyCombo || row?.localId !== Index) && (
|
||||
<>{row.OrderQty}</>
|
||||
|
|
@ -2367,7 +2399,7 @@ const ComboSalesBillTable = () => {
|
|||
Index={Index}
|
||||
setIndex={setIndex}
|
||||
setEditQtyCombo={setEditQtyCombo}
|
||||
// id={`qty-${index}`}
|
||||
// id={`qty-${index}`}
|
||||
/>
|
||||
)}
|
||||
</td>
|
||||
|
|
@ -2414,9 +2446,9 @@ const ComboSalesBillTable = () => {
|
|||
>
|
||||
{row?.Offer > 0
|
||||
? `${(
|
||||
(row.Offer / (row?.OrderQty * row?.OrderRate)) *
|
||||
100
|
||||
).toFixed(2)}%`
|
||||
(row.Offer / (row?.OrderQty * row?.OrderRate)) *
|
||||
100
|
||||
).toFixed(2)}%`
|
||||
: '-'}
|
||||
</td>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ const StandardTable = () => {
|
|||
window.removeEventListener('keydown', handleKeyDown);
|
||||
};
|
||||
}, [GetCustId, OrderCardDetail]);
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
if (!preferenceshortcutkey) return;
|
||||
|
||||
|
|
@ -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);
|
||||
|
|
@ -244,7 +247,7 @@ const BSComboItemCard = (props) => {
|
|||
const paymentloader = useSelector(GlobalPayementloader, shallowEqual);
|
||||
const SessionData = useSelector(StoredSessionData, shallowEqual);
|
||||
const GlobalCombocarddatas = useSelector(GlobalCombocarddata);
|
||||
console.log(GlobalCombocarddatas, 'GlobalCombocarddatas combo card');
|
||||
console.log(GlobalCombocarddatas, 'GlobalCombocarddatas combo card');
|
||||
const [messageType, setMessageType] = useState(null);
|
||||
const [messageData, setMessageData] = useState(null);
|
||||
const [repeatedModel, setRepeatedModel] = useState(false);
|
||||
|
|
@ -297,7 +300,7 @@ console.log(GlobalCombocarddatas, 'GlobalCombocarddatas combo card');
|
|||
: GlobalCombocarddatas
|
||||
: '';
|
||||
//
|
||||
console.log(cardData, 'cardData combo card');
|
||||
console.log(cardData, 'cardData combo card');
|
||||
useEffect(() => {
|
||||
// fetchedit();
|
||||
getPreferenceStock();
|
||||
|
|
@ -307,10 +310,25 @@ console.log(cardData, 'cardData combo card');
|
|||
useEffect(() => {
|
||||
if (AppId && CompId && BranchId) {
|
||||
fetchedit();
|
||||
GetmultipleSearchData()
|
||||
}
|
||||
|
||||
// dispatch(changepreOrder(false)); Commented to Add Normal Produts After Adding the Combo Pack !!!!!! Dont Touch Without Shifayath Permission
|
||||
}, [AppId, CompId, BranchId]);
|
||||
const GetmultipleSearchData = async () => {
|
||||
const data = {
|
||||
AppId,
|
||||
CompId,
|
||||
BranchId,
|
||||
};
|
||||
|
||||
try {
|
||||
const response = await dispatch(getmultipleSearch(data))
|
||||
|
||||
} catch (error) {
|
||||
console.error("Get Search Terms Error:", error);
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
setPreOrderSelectedProdNames([]);
|
||||
|
|
@ -328,10 +346,13 @@ console.log(cardData, 'cardData combo card');
|
|||
if (noSubcatCardData) {
|
||||
setNoSubcatCardData();
|
||||
}
|
||||
if (ProductSearch?.length > 5) {
|
||||
|
||||
if (ProductSearch?.length > 5 && GetmultipleSearchDatas.some(
|
||||
e => e.toLowerCase() === "qrcode"
|
||||
)) {
|
||||
setQuickAdd(true);
|
||||
}
|
||||
}, [ProductSearch]);
|
||||
}, [ProductSearch,GetmultipleSearchDatas]);
|
||||
|
||||
// useEffect(() => {
|
||||
// if (
|
||||
|
|
@ -4620,7 +4641,9 @@ console.log(cardData, 'cardData combo card');
|
|||
</SortableContext>
|
||||
</DndContext>
|
||||
</>
|
||||
) : ProductSearch?.length > 5 &&
|
||||
) : ProductSearch?.length > 5 && GetmultipleSearchDatas.some(
|
||||
e => e.toLowerCase() === "qrcode"
|
||||
) &&
|
||||
(cardData?.length == 0 || cardData == undefined) ? (
|
||||
<div>
|
||||
{/* cardData mohan 18-04-2025 */}
|
||||
|
|
@ -4632,7 +4655,7 @@ console.log(cardData, 'cardData combo card');
|
|||
cardData={cardDataForNewPrd}
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
) : (
|
||||
<>
|
||||
<div
|
||||
className={!temp5 ? 'NodataFound' : 'NodataFound5'}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -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);
|
||||
}
|
||||
|
|
@ -55,7 +59,7 @@ const MultipleSearch = ({ close }) => {
|
|||
}
|
||||
};
|
||||
|
||||
const GetmultipleSearchData = async () => {
|
||||
const GetmultipleSearchData = async () => {
|
||||
const data = {
|
||||
AppId,
|
||||
CompId,
|
||||
|
|
@ -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
|
||||
|
|
@ -115,7 +110,7 @@ const MultipleSearch = ({ close }) => {
|
|||
<Buttons
|
||||
buttonText={"Submit"}
|
||||
handleSubmit={postMultipleSearch}
|
||||
color="901D77"
|
||||
color="901D77"
|
||||
/>
|
||||
</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) => ({
|
||||
AppId: getSession('AppId'),
|
||||
CompId: getSession('CompId'),
|
||||
BranchId: getSession('BranchId'),
|
||||
CreatedBy: getSession('UserId'),
|
||||
const FilterData = Exceldatasubmit?.filter(
|
||||
a => a.ProductName !== ''
|
||||
);
|
||||
|
||||
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(
|
||||
'YYYY-MM-DDTHH:mm:ss'
|
||||
),
|
||||
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')
|
||||
: '',
|
||||
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,
|
||||
}));
|
||||
|
||||
let postDatas = { prodDetails: formattedData };
|
||||
|
||||
let response = await dispatch(bulkpostdata(postDatas)).unwrap();
|
||||
if (response?.data?.statusCode == 1) {
|
||||
setMessageType('success');
|
||||
setMessageData(response?.data?.response);
|
||||
setBulkpost(false);
|
||||
setpage(1);
|
||||
|
||||
var 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);
|
||||
}
|
||||
} else {
|
||||
setMessageType('error');
|
||||
setMessageData(responseData?.data?.response);
|
||||
}
|
||||
|
||||
handleResetExcelData();
|
||||
handleCancel();
|
||||
} else {
|
||||
if (!FilterData || FilterData.length === 0) {
|
||||
setBulkpost(false);
|
||||
setMessageType('error');
|
||||
setMessageData('No data to submit. Please upload an Excel file.');
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
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(
|
||||
(taxIdName, index) => `${taxIdName} - ${TaxData1[index]}%`
|
||||
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 || '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(
|
||||
'YYYY-MM-DDTHH: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')
|
||||
: '',
|
||||
OnePcsAvailable: data.Amountperpiece || 'No',
|
||||
OnePcsPrice: data.AmountperpiecePrice,
|
||||
AutoGenerateSingleQr: data.AutoGenerateOnePieceQrcode || 'No',
|
||||
OnePcQR: data.AutoGenerateOnePieceQrcodeNumber,
|
||||
TokenAvailable: data.TokenAvailable || 'No',
|
||||
ProdLogo: data.Productimage,
|
||||
}));
|
||||
|
||||
const postDatas = { prodDetails: formattedData };
|
||||
|
||||
const response = await dispatch(bulkpostdata(postDatas)).unwrap();
|
||||
|
||||
if (response?.data?.statusCode === 1) {
|
||||
setMessageType('success');
|
||||
setMessageData(response.data.response);
|
||||
setpage(1);
|
||||
|
||||
const responseData = await dispatch(
|
||||
getProductDataPageNo({ CompId, BranchId, AppId, PageNumber: 1 })
|
||||
).unwrap();
|
||||
|
||||
if (responseData?.data?.statusCode === 1) {
|
||||
setCachedData({ 1: responseData.data.data });
|
||||
setproductData(responseData.data.data);
|
||||
setCurrentPage(1);
|
||||
}
|
||||
} else {
|
||||
setMessageType('error');
|
||||
setMessageData(response?.data?.response);
|
||||
}
|
||||
|
||||
setBulkpost(false);
|
||||
handleResetExcelData();
|
||||
handleCancel();
|
||||
}, [
|
||||
Exceldatasubmit,
|
||||
|
||||
CompId,
|
||||
BranchId,
|
||||
AppId,
|
||||
handleResetExcelData,
|
||||
handleCancel
|
||||
]);
|
||||
|
||||
const Unit = useMemo(
|
||||
() => UomPreference?.map((e) => e.ConfigName),
|
||||
[UomPreference]
|
||||
);
|
||||
|
||||
const CategoryId = useMemo(
|
||||
() => ProdCatData?.map((e) => e.ConfigId),
|
||||
[ProdCatData]
|
||||
);
|
||||
|
||||
const CategoryNames = useMemo(
|
||||
() => ProdCatData?.map((e) => e.ConfigName),
|
||||
[ProdCatData]
|
||||
);
|
||||
|
||||
const CatconfigId = useMemo(
|
||||
() => ProdCatData?.map((e) => e.ConfigId),
|
||||
[ProdCatData]
|
||||
);
|
||||
|
||||
const Subcatnames = useMemo(
|
||||
() => subCatData?.map((e) => e.ConfigName),
|
||||
[subCatData]
|
||||
);
|
||||
|
||||
const SubcatId = useMemo(
|
||||
() => subCatData?.map((e) => e.ConfigId),
|
||||
[subCatData]
|
||||
);
|
||||
|
||||
const SubcatNumFId = useMemo(
|
||||
() => subCatData?.map((e) => e.NumFId),
|
||||
[subCatData]
|
||||
);
|
||||
|
||||
const BrandNumFId = useMemo(
|
||||
() => allBrandData?.map((e) => e.NumFId),
|
||||
[allBrandData]
|
||||
);
|
||||
|
||||
const BrandId = useMemo(
|
||||
() => allBrandData?.map((e) => e.ConfigId),
|
||||
[allBrandData]
|
||||
);
|
||||
|
||||
const BrandName = useMemo(
|
||||
() => allBrandData?.map((e) => e.ConfigName),
|
||||
[allBrandData]
|
||||
);
|
||||
|
||||
const SuplierNames = useMemo(
|
||||
() => SupplierData?.map((e) => e.SuppName),
|
||||
[SupplierData]
|
||||
);
|
||||
|
||||
const TaxDatas = useMemo(
|
||||
() => TaxData?.map((e) => e.TaxIdName),
|
||||
[TaxData]
|
||||
);
|
||||
|
||||
const TaxData1 = useMemo(
|
||||
() => TaxData?.map((e) => e.TaxPercentage),
|
||||
[TaxData]
|
||||
);
|
||||
|
||||
const combinedTaxData = useMemo(
|
||||
() =>
|
||||
TaxDatas?.map(
|
||||
(taxIdName, index) => `${taxIdName} - ${TaxData1[index]}%`
|
||||
),
|
||||
[TaxDatas, TaxData1]
|
||||
);
|
||||
const Deletebulk = async () => {
|
||||
let data = {
|
||||
|
|
@ -2641,7 +2706,7 @@ const ProductList = () => {
|
|||
generateQRCodeCopy={(code) =>
|
||||
generateQRCodeCopy(QrandbarcodeDatas, code)
|
||||
}
|
||||
generateCodeImage={(code, codeType = 'Q') => generateCodeImage(code, codeType, QrandbarcodeDatas) }
|
||||
generateCodeImage={(code, codeType = 'Q') => generateCodeImage(code, codeType, QrandbarcodeDatas)}
|
||||
imageTagBarcodeAndQR={imageTagBarcodeAndQR}
|
||||
dropdownValue={dropdownValue}
|
||||
barcodeTemplateDetails={barcodeTemplateDetails}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -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;
|
||||
|
|
@ -592,12 +583,12 @@
|
|||
outline: none;
|
||||
}
|
||||
|
||||
>button:nth-child(1) {
|
||||
> button:nth-child(1) {
|
||||
background-color: #daecfd;
|
||||
color: #1292ee;
|
||||
}
|
||||
|
||||
>button:nth-child(2) {
|
||||
> button:nth-child(2) {
|
||||
background-color: #ffdcdc;
|
||||
color: #ee3333;
|
||||
}
|
||||
|
|
@ -616,7 +607,7 @@
|
|||
flex-direction: column;
|
||||
margin-bottom: 5px;
|
||||
|
||||
>div:nth-child(2) {
|
||||
> div:nth-child(2) {
|
||||
width: max-content;
|
||||
font-size: 12px !important;
|
||||
height: max-content;
|
||||
|
|
@ -669,7 +660,7 @@
|
|||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
// deilivery Address
|
||||
// deilivery Address
|
||||
|
||||
.Address-button {
|
||||
display: flex;
|
||||
|
|
@ -698,7 +689,7 @@
|
|||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.deliveryaddress{
|
||||
.deliveryaddress {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
flex-direction: column;
|
||||
|
|
@ -706,7 +697,7 @@
|
|||
padding: 10px;
|
||||
border-radius: 4px;
|
||||
height: max-content;
|
||||
.deliveryaddress_edit{
|
||||
.deliveryaddress_edit {
|
||||
color: #0cabf4;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
|
@ -718,7 +709,7 @@
|
|||
.add-slot-header {
|
||||
font-size: 25px;
|
||||
font-weight: 600;
|
||||
font-family: 'Gilroy';
|
||||
font-family: "Gilroy";
|
||||
padding-bottom: 6px;
|
||||
}
|
||||
|
||||
|
|
@ -744,7 +735,7 @@
|
|||
.swicthCardScanToggle {
|
||||
button {
|
||||
background-color: #1292ee !important;
|
||||
font-family: 'Poppins';
|
||||
font-family: "Poppins";
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
|
@ -756,7 +747,7 @@
|
|||
}
|
||||
|
||||
.searched-value {
|
||||
font-family: 'Poppins';
|
||||
font-family: "Poppins";
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
|
|
@ -764,7 +755,8 @@
|
|||
scrollbar-width: thin;
|
||||
padding-right: 8px;
|
||||
|
||||
@media (max-width: 600px) {}
|
||||
@media (max-width: 600px) {
|
||||
}
|
||||
|
||||
.ant-table-thead {
|
||||
&:hover {
|
||||
|
|
@ -915,14 +907,14 @@
|
|||
}
|
||||
|
||||
.table-notes {
|
||||
font-family: 'Poppins';
|
||||
font-family: "Poppins";
|
||||
font-style: italic;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.ant-table table {
|
||||
border-spacing: 0 !important;
|
||||
font-family: 'Poppins';
|
||||
font-family: "Poppins";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -956,13 +948,13 @@
|
|||
table {
|
||||
thead {
|
||||
th {
|
||||
font-family: 'Gilroy' !important;
|
||||
font-family: "Gilroy" !important;
|
||||
}
|
||||
}
|
||||
|
||||
tbody {
|
||||
td {
|
||||
font-family: 'Poppins' !important;
|
||||
font-family: "Poppins" !important;
|
||||
font-weight: 500;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
|
@ -1085,7 +1077,7 @@ table {
|
|||
border: 1px solid #dadada;
|
||||
border-radius: 4px;
|
||||
|
||||
>img {
|
||||
> img {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
object-fit: contain;
|
||||
|
|
@ -1210,7 +1202,7 @@ table {
|
|||
flex-direction: column;
|
||||
justify-content: center;
|
||||
|
||||
>img {
|
||||
> img {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
object-fit: contain;
|
||||
|
|
@ -1237,7 +1229,7 @@ table {
|
|||
flex-direction: column;
|
||||
justify-content: center;
|
||||
|
||||
>img {
|
||||
> img {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
object-fit: contain;
|
||||
|
|
@ -1273,7 +1265,7 @@ table {
|
|||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
|
||||
>img {
|
||||
> img {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
object-fit: contain;
|
||||
|
|
@ -1300,7 +1292,7 @@ table {
|
|||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
|
||||
>img {
|
||||
> img {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
object-fit: contain;
|
||||
|
|
@ -1328,7 +1320,7 @@ table {
|
|||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
>img {
|
||||
> img {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
object-fit: contain;
|
||||
|
|
@ -1416,8 +1408,7 @@ table {
|
|||
p {
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background-color: #C00000;
|
||||
|
||||
background-color: #c00000;
|
||||
}
|
||||
|
||||
span {
|
||||
|
|
@ -1433,7 +1424,7 @@ table {
|
|||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
background-color: #1292EE;
|
||||
background-color: #1292ee;
|
||||
color: #fff;
|
||||
font-family: "Poppins";
|
||||
font-weight: 500;
|
||||
|
|
@ -1487,14 +1478,14 @@ table {
|
|||
|
||||
.tab-item:hover {
|
||||
background: #f5f5f5;
|
||||
color: #901D77;
|
||||
color: #901d77;
|
||||
}
|
||||
|
||||
.tab-item.active {
|
||||
display: flex;
|
||||
background: #fff;
|
||||
color: #901D77;
|
||||
border-color: #901D77;
|
||||
color: #901d77;
|
||||
border-color: #901d77;
|
||||
border-bottom: 2px solid #fff;
|
||||
margin-bottom: -2px;
|
||||
z-index: 1;
|
||||
|
|
@ -1503,7 +1494,7 @@ table {
|
|||
}
|
||||
|
||||
.tab-item.active::after {
|
||||
content: '';
|
||||
content: "";
|
||||
position: absolute;
|
||||
bottom: -2px;
|
||||
left: 0;
|
||||
|
|
@ -1528,5 +1519,45 @@ table {
|
|||
color: #c00000;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.bulkChangePriceTable {
|
||||
width: 83vw;
|
||||
overflow: auto;
|
||||
height: 60vh;
|
||||
scrollbar-width: thin;
|
||||
position: relative;
|
||||
|
||||
.ant-table-cell {
|
||||
padding: 2px 6px !important;
|
||||
}
|
||||
.ant-table-tbody {
|
||||
height: 60vh !important;
|
||||
}
|
||||
.ant-input {
|
||||
padding: 3px 14px 4px 11px !important;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
.PriChangeUpper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
|
||||
.btnbtninfo {
|
||||
background: #8f1e78;
|
||||
color: #fff;
|
||||
vertical-align: top;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 42px;
|
||||
border-radius: 4px;
|
||||
height: 42px;
|
||||
|
||||
&:hover {
|
||||
background: #d333b3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,16 @@
|
|||
.cropUploadFieldSmall {
|
||||
|
||||
:where(.css-dev-only-do-not-override-1v5z42l).ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item-container,
|
||||
:where(.css-dev-only-do-not-override-1v5z42l).ant-upload-wrapper.ant-upload-picture-circle-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item-container,
|
||||
:where(.css-dev-only-do-not-override-1v5z42l).ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-circle .ant-upload-list-item-container,
|
||||
:where(.css-dev-only-do-not-override-1v5z42l).ant-upload-wrapper.ant-upload-picture-circle-wrapper .ant-upload-list.ant-upload-list-picture-circle .ant-upload-list-item-container {
|
||||
:where(.css-dev-only-do-not-override-1v5z42l).ant-upload-wrapper.ant-upload-picture-card-wrapper
|
||||
.ant-upload-list.ant-upload-list-picture-card
|
||||
.ant-upload-list-item-container,
|
||||
:where(.css-dev-only-do-not-override-1v5z42l).ant-upload-wrapper.ant-upload-picture-circle-wrapper
|
||||
.ant-upload-list.ant-upload-list-picture-card
|
||||
.ant-upload-list-item-container,
|
||||
:where(.css-dev-only-do-not-override-1v5z42l).ant-upload-wrapper.ant-upload-picture-card-wrapper
|
||||
.ant-upload-list.ant-upload-list-picture-circle
|
||||
.ant-upload-list-item-container,
|
||||
:where(.css-dev-only-do-not-override-1v5z42l).ant-upload-wrapper.ant-upload-picture-circle-wrapper
|
||||
.ant-upload-list.ant-upload-list-picture-circle
|
||||
.ant-upload-list-item-container {
|
||||
width: 65px;
|
||||
height: 65px;
|
||||
}
|
||||
|
|
@ -45,7 +52,7 @@
|
|||
font-weight: 600;
|
||||
font-size: 14px;
|
||||
color: #000000;
|
||||
background-color: 'rgba(0, 0, 0, 0.02)';
|
||||
background-color: "rgba(0, 0, 0, 0.02)";
|
||||
|
||||
& .ant-form-item .ant-form-item-explain-error {
|
||||
font-weight: 400 !important;
|
||||
|
|
@ -290,7 +297,7 @@
|
|||
color: #23378a;
|
||||
padding: 12px 24px;
|
||||
border: none;
|
||||
font-family: 'Poppins', sans-serif;
|
||||
font-family: "Poppins", sans-serif;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
|
|
@ -319,14 +326,14 @@
|
|||
}
|
||||
|
||||
.viewerExcelupload .ant-table-wrapper,
|
||||
.viewerExcelupload .ant-table-tbody>tr.ant-table-row>td {
|
||||
.viewerExcelupload .ant-table-tbody > tr.ant-table-row > td {
|
||||
padding: 4px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.viewerExcelupload .ant-table-wrapper,
|
||||
.viewerExcelupload .ant-table-thead>tr>th {
|
||||
.viewerExcelupload .ant-table-thead > tr > th {
|
||||
padding: 1px 8px !important;
|
||||
}
|
||||
|
||||
|
|
@ -381,7 +388,7 @@
|
|||
}
|
||||
|
||||
.productinputForm {
|
||||
.ant-input-affix-wrapper>input.ant-input {
|
||||
.ant-input-affix-wrapper > input.ant-input {
|
||||
padding-top: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
|
@ -412,7 +419,7 @@
|
|||
border: none;
|
||||
outline: none;
|
||||
cursor: pointer;
|
||||
font-family: 'Poppins', sans-serif;
|
||||
font-family: "Poppins", sans-serif;
|
||||
color: #fff;
|
||||
background-color: #1677ff;
|
||||
border-radius: 6px;
|
||||
|
|
@ -435,7 +442,7 @@
|
|||
}
|
||||
|
||||
.product-Add-HSN {
|
||||
.ant-input-affix-wrapper>input.ant-input {
|
||||
.ant-input-affix-wrapper > input.ant-input {
|
||||
padding: 12px 0 0 0 !important;
|
||||
}
|
||||
}
|
||||
|
|
@ -446,7 +453,7 @@
|
|||
background-color: #d4e7ff;
|
||||
font-weight: 500;
|
||||
font-size: 13px;
|
||||
font-family: 'Poppins';
|
||||
font-family: "Poppins";
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
border-radius: 6px;
|
||||
|
|
@ -473,9 +480,13 @@
|
|||
.ant-form-item {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.ant-input {
|
||||
padding: 4px 14px 6px 11px !important;
|
||||
text-decoration: underline;
|
||||
text-decoration-color: #b8b8b8;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.productFormproductImg {
|
||||
width: 350px;
|
||||
align-items: center;
|
||||
|
|
@ -483,8 +494,19 @@
|
|||
|
||||
.Customized_QuickAdd {
|
||||
margin-bottom: 10px;
|
||||
font-family: 'Poppins', sans-serif;
|
||||
font-family: "Poppins", sans-serif;
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.ProductSubBTN {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
@media (max-width: 500px) {
|
||||
position: fixed;
|
||||
right: 10px;
|
||||
bottom: 8px;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,7 +107,6 @@
|
|||
}
|
||||
|
||||
.ant-table-cell {
|
||||
|
||||
.ant-form-item {
|
||||
margin-bottom: unset;
|
||||
|
||||
|
|
@ -116,4 +115,38 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.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