after resolving conflicts
This commit is contained in:
commit
e815840d83
|
|
@ -22,6 +22,7 @@
|
||||||
"@reduxjs/toolkit": "^1.9.5",
|
"@reduxjs/toolkit": "^1.9.5",
|
||||||
"@tanstack/react-query": "^5.90.11",
|
"@tanstack/react-query": "^5.90.11",
|
||||||
"@tanstack/react-query-devtools": "^5.91.1",
|
"@tanstack/react-query-devtools": "^5.91.1",
|
||||||
|
"@tanstack/react-virtual": "^3.13.18",
|
||||||
"antd": "^5.17.4",
|
"antd": "^5.17.4",
|
||||||
"antd-img-crop": "^4.22.0",
|
"antd-img-crop": "^4.22.0",
|
||||||
"aos": "^2.3.4",
|
"aos": "^2.3.4",
|
||||||
|
|
|
||||||
|
|
@ -37,9 +37,9 @@ const Loader = () => {
|
||||||
<p>Loading</p>
|
<p>Loading</p>
|
||||||
<div className="words">
|
<div className="words">
|
||||||
<span className="word">PozoApp</span>
|
<span className="word">PozoApp</span>
|
||||||
<span className="word">BillingApp</span>
|
|
||||||
<span className="word">PozoApp</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>
|
<span className="word">PozoApp</span>
|
||||||
</div>
|
</div>
|
||||||
<p></p>
|
<p></p>
|
||||||
|
|
|
||||||
|
|
@ -1609,6 +1609,7 @@ const initialState = {
|
||||||
salesBillEdit: false,
|
salesBillEdit: false,
|
||||||
previousOrderPayment: [],
|
previousOrderPayment: [],
|
||||||
previousOrderOfferDetails: [],
|
previousOrderOfferDetails: [],
|
||||||
|
getmultipleSearchDatas: []
|
||||||
};
|
};
|
||||||
|
|
||||||
const BookingData = createSlice({
|
const BookingData = createSlice({
|
||||||
|
|
@ -2110,6 +2111,13 @@ const BookingData = createSlice({
|
||||||
state.AllCustomers = [];
|
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;
|
state?.BookingData?.previousOrderPayment;
|
||||||
export const GlobalPreviousOrderOfferDetails = (state) =>
|
export const GlobalPreviousOrderOfferDetails = (state) =>
|
||||||
state?.BookingData?.previousOrderOfferDetails;
|
state?.BookingData?.previousOrderOfferDetails;
|
||||||
|
export const GlobalGetmultipleSearchDatas = (state) =>
|
||||||
|
state?.BookingData?.getmultipleSearchDatas;
|
||||||
|
|
||||||
export default BookingData.reducer;
|
export default BookingData.reducer;
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ import {
|
||||||
} from '../../../../../Features/Offer/Offernew/BookingOffernew.js';
|
} from '../../../../../Features/Offer/Offernew/BookingOffernew.js';
|
||||||
import { validateOffers } from '../../BSItemCards/ValidateOffer.jsx';
|
import { validateOffers } from '../../BSItemCards/ValidateOffer.jsx';
|
||||||
import { v4 as uuidv4 } from 'uuid';
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
|
import WeightCalculatePrice from './WeightCalculatePrice.jsx';
|
||||||
|
|
||||||
const BSBillingEditQuantity = (props) => {
|
const BSBillingEditQuantity = (props) => {
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
|
|
@ -101,15 +102,33 @@ const BSBillingEditQuantity = (props) => {
|
||||||
const SettingDataSelector = useSelector(PreferenceData);
|
const SettingDataSelector = useSelector(PreferenceData);
|
||||||
const OrderType = useSelector(GlobalOrderType);
|
const OrderType = useSelector(GlobalOrderType);
|
||||||
const [BillOrderPre, setBillOrderPre] = useState(null);
|
const [BillOrderPre, setBillOrderPre] = useState(null);
|
||||||
const [RadioBtnSelection, setRadioBtnSelection] = useState(
|
const SHORTKEY_TO_RADIO = {
|
||||||
props?.shortKeyMethod == 'price'
|
price: 'Price',
|
||||||
? 'Price'
|
quantity: 'qty',
|
||||||
: ItemData?.ScaleType !== 'weight'
|
Parcel: 'Parcel',
|
||||||
? 'Quantity'
|
weightAmount: 'weightAmount'
|
||||||
: PriceChangeaccess
|
};
|
||||||
? 'Price'
|
const [RadioBtnSelection, setRadioBtnSelection] = useState(() => {
|
||||||
: 'Parcel'
|
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 [PercentageSelection, setPercentageSelection] = useState('Fixed');
|
||||||
const [RadioDetails, setRadioDetails] = useState(false);
|
const [RadioDetails, setRadioDetails] = useState(false);
|
||||||
const [editedPrice, setEditedPrice] = useState(0);
|
const [editedPrice, setEditedPrice] = useState(0);
|
||||||
|
|
@ -678,12 +697,12 @@ const BSBillingEditQuantity = (props) => {
|
||||||
const handleEditQuantity = async (
|
const handleEditQuantity = async (
|
||||||
editedProduct,
|
editedProduct,
|
||||||
editedProductIndex,
|
editedProductIndex,
|
||||||
newPrice
|
newPrice,
|
||||||
|
overrideQty = null
|
||||||
) => {
|
) => {
|
||||||
// check itself is a offer product
|
const editedQty = overrideQty !== null
|
||||||
|
? overrideQty
|
||||||
const editedQty =
|
: props?.Productdata?.ScaleType !== 'weight'
|
||||||
props?.Productdata?.ScaleType !== 'weight'
|
|
||||||
? parseInt(Quantity)
|
? parseInt(Quantity)
|
||||||
: props.Productdata.OrderQty;
|
: props.Productdata.OrderQty;
|
||||||
const addFirst = BillOrderPre === 'Y';
|
const addFirst = BillOrderPre === 'Y';
|
||||||
|
|
@ -3096,9 +3115,10 @@ const BSBillingEditQuantity = (props) => {
|
||||||
newPrice = 0,
|
newPrice = 0,
|
||||||
offerApply = false
|
offerApply = false
|
||||||
) => {
|
) => {
|
||||||
|
const fixedQty = Number(qty.toFixed(3));
|
||||||
const updatedProduct = {
|
const updatedProduct = {
|
||||||
...editedProduct,
|
...editedProduct,
|
||||||
OrderQty: qty,
|
OrderQty: fixedQty,
|
||||||
OrderRate: newPrice > 0 ? newPrice : editedProduct?.OrderRate,
|
OrderRate: newPrice > 0 ? newPrice : editedProduct?.OrderRate,
|
||||||
...calculateTaxAmounts({
|
...calculateTaxAmounts({
|
||||||
qty: qty,
|
qty: qty,
|
||||||
|
|
@ -3236,289 +3256,6 @@ const BSBillingEditQuantity = (props) => {
|
||||||
OfferValue: offerValue,
|
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 = () => {
|
const CloseModal = () => {
|
||||||
props.handleEditQuantityCancel();
|
props.handleEditQuantityCancel();
|
||||||
setClearQuantity(false);
|
setClearQuantity(false);
|
||||||
|
|
@ -3656,19 +3393,19 @@ const BSBillingEditQuantity = (props) => {
|
||||||
const enteredDiscount = parseFloat(data?.target.value);
|
const enteredDiscount = parseFloat(data?.target.value);
|
||||||
|
|
||||||
if (limit === null || limit === undefined || limit === 0) {
|
if (limit === null || limit === undefined || limit === 0) {
|
||||||
if (
|
// if (
|
||||||
parseFloat(enteredDiscount) < parseFloat(sellingPrice) ||
|
// parseFloat(enteredDiscount) < parseFloat(sellingPrice) ||
|
||||||
parseFloat(enteredDiscount) === parseFloat(sellingPrice)
|
// parseFloat(enteredDiscount) === parseFloat(sellingPrice)
|
||||||
) {
|
// ) {
|
||||||
setEditedPrice(enteredDiscount);
|
setEditedPrice(enteredDiscount);
|
||||||
setDisableSubmitButton(true);
|
setDisableSubmitButton(true);
|
||||||
} else {
|
// } else {
|
||||||
setMessageType('error');
|
// setMessageType('error');
|
||||||
setMessageData('Please Give less than value for sell price');
|
// setMessageData('Please Give less than value for sell price');
|
||||||
setDisableSubmitButton(false);
|
// setDisableSubmitButton(false);
|
||||||
setEditedPrice(0);
|
// setEditedPrice(0);
|
||||||
formRef.current?.resetFields();
|
// formRef.current?.resetFields();
|
||||||
}
|
// }
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3706,6 +3443,33 @@ const BSBillingEditQuantity = (props) => {
|
||||||
setPackageDtl(data || []);
|
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 (
|
return (
|
||||||
<div className="BSBilling-EditQuantity-Modal">
|
<div className="BSBilling-EditQuantity-Modal">
|
||||||
<Messages
|
<Messages
|
||||||
|
|
@ -3802,6 +3566,19 @@ const BSBillingEditQuantity = (props) => {
|
||||||
>
|
>
|
||||||
Packing
|
Packing
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
{isKg && (<button
|
||||||
|
type="button"
|
||||||
|
className={
|
||||||
|
RadioBtnSelection === 'weightAmount'
|
||||||
|
? 'SelecBtn weightAmount'
|
||||||
|
: 'ChangeBtn'
|
||||||
|
}
|
||||||
|
onClick={() => onRadioBtnChange('weightAmount')}
|
||||||
|
>
|
||||||
|
Weight / Amount
|
||||||
|
</button>)}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{RadioBtnSelection == 'Quantity' && (
|
{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' }}>
|
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
|
||||||
{((RadioBtnSelection == 'Price' && disableSubmitButton) ||
|
{((RadioBtnSelection == 'Price' && disableSubmitButton) ||
|
||||||
RadioBtnSelection == 'Quantity') && (
|
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);
|
setshortKeyMethod(method);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleKeyDown = (event) => {
|
// const handleKeyDown = (event) => {
|
||||||
if (!event.ctrlKey) return;
|
// 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();
|
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') {
|
if (key === 'q') {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
handleShortcut('qty');
|
handleShortcut('qty');
|
||||||
}
|
} else if (key === 'e') {
|
||||||
|
|
||||||
if (key === 'e') {
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
handleShortcut('price');
|
handleShortcut('price');
|
||||||
|
} else if (key === 'y') {
|
||||||
|
event.preventDefault();
|
||||||
|
handleShortcut('Parcel');
|
||||||
|
} else if (key === 'b') {
|
||||||
|
event.preventDefault();
|
||||||
|
handleShortcut('weightAmount');
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
window.addEventListener('keydown', handleKeyDown);
|
window.addEventListener('keydown', handleKeyDown);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -505,7 +505,8 @@ export default function BST1Payment() {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!preOrder) {
|
if (!preOrder) {
|
||||||
const totalSum = OrderCardDetail?.reduce(
|
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
|
0
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -1994,7 +1995,8 @@ export default function BST1Payment() {
|
||||||
Type: a.Type,
|
Type: a.Type,
|
||||||
OrderQty: a.OrderQty,
|
OrderQty: a.OrderQty,
|
||||||
OrderRate: a.OrderRate,
|
OrderRate: a.OrderRate,
|
||||||
TotalAmt: a.OrderQty * a.OrderRate,
|
// TotalAmt: a.OrderQty * a.OrderRate,
|
||||||
|
TotalAmt: a.TotalAmt,
|
||||||
TaxAmt: a.TaxAmt,
|
TaxAmt: a.TaxAmt,
|
||||||
RefundQty: 0,
|
RefundQty: 0,
|
||||||
InwardDtlId: a.InwardDtlId,
|
InwardDtlId: a.InwardDtlId,
|
||||||
|
|
|
||||||
|
|
@ -539,7 +539,8 @@ const BSBillingTable2 = () => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!preOrder) {
|
if (!preOrder) {
|
||||||
const totalSum = OrderCardDetail?.reduce(
|
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
|
0
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -2034,7 +2035,8 @@ const BSBillingTable2 = () => {
|
||||||
Type: a.Type,
|
Type: a.Type,
|
||||||
OrderQty: a.OrderQty,
|
OrderQty: a.OrderQty,
|
||||||
OrderRate: a.OrderRate,
|
OrderRate: a.OrderRate,
|
||||||
TotalAmt: a.OrderQty * a.OrderRate,
|
// TotalAmt: a.OrderQty * a.OrderRate,
|
||||||
|
TotalAmt: a.TotalAmt,
|
||||||
TaxAmt: a.TaxAmt,
|
TaxAmt: a.TaxAmt,
|
||||||
RefundQty: 0,
|
RefundQty: 0,
|
||||||
InwardDtlId: a.InwardDtlId,
|
InwardDtlId: a.InwardDtlId,
|
||||||
|
|
|
||||||
|
|
@ -228,21 +228,33 @@ const BSBillingTable3 = () => {
|
||||||
handleEditQuantity(item);
|
handleEditQuantity(item);
|
||||||
setshortKeyMethod(method);
|
setshortKeyMethod(method);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleKeyDown = (event) => {
|
const handleKeyDown = (event) => {
|
||||||
if (!event.ctrlKey) return;
|
|
||||||
|
|
||||||
const key = event.key.toLowerCase();
|
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') {
|
if (key === 'q') {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
handleShortcut('qty');
|
handleShortcut('qty');
|
||||||
}
|
} else if (key === 'e') {
|
||||||
|
|
||||||
if (key === 'e') {
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
handleShortcut('price');
|
handleShortcut('price');
|
||||||
|
} else if (key === 'y') {
|
||||||
|
event.preventDefault();
|
||||||
|
handleShortcut('Parcel');
|
||||||
|
} else if (key === 'b') {
|
||||||
|
event.preventDefault();
|
||||||
|
handleShortcut('weightAmount');
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
window.addEventListener('keydown', handleKeyDown);
|
window.addEventListener('keydown', handleKeyDown);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -534,7 +534,8 @@ const BSBillingTable3Pay = () => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!preOrder) {
|
if (!preOrder) {
|
||||||
const totalSum = OrderCardDetail?.reduce(
|
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
|
0
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -2180,7 +2181,8 @@ const BSBillingTable3Pay = () => {
|
||||||
Type: a.Type,
|
Type: a.Type,
|
||||||
OrderQty: a.OrderQty,
|
OrderQty: a.OrderQty,
|
||||||
OrderRate: a.OrderRate,
|
OrderRate: a.OrderRate,
|
||||||
TotalAmt: a.OrderQty * a.OrderRate,
|
// TotalAmt: a.OrderQty * a.OrderRate, //sri
|
||||||
|
TotalAmt: a.TotalAmt,
|
||||||
TaxAmt: a.TaxAmt,
|
TaxAmt: a.TaxAmt,
|
||||||
RefundQty: 0,
|
RefundQty: 0,
|
||||||
InwardDtlId: a.InwardDtlId,
|
InwardDtlId: a.InwardDtlId,
|
||||||
|
|
|
||||||
|
|
@ -591,7 +591,8 @@ const BSBilling4Payment = () => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!preOrder) {
|
if (!preOrder) {
|
||||||
const totalSum = OrderCardDetail?.reduce(
|
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
|
0
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -2062,7 +2063,8 @@ const BSBilling4Payment = () => {
|
||||||
Type: a.Type,
|
Type: a.Type,
|
||||||
OrderQty: a.OrderQty,
|
OrderQty: a.OrderQty,
|
||||||
OrderRate: a.OrderRate,
|
OrderRate: a.OrderRate,
|
||||||
TotalAmt: a.OrderQty * a.OrderRate,
|
// TotalAmt: a.OrderQty * a.OrderRate,
|
||||||
|
TotalAmt: a.TotalAmt,
|
||||||
TaxAmt: a.TaxAmt,
|
TaxAmt: a.TaxAmt,
|
||||||
RefundQty: 0,
|
RefundQty: 0,
|
||||||
InwardDtlId: a.InwardDtlId,
|
InwardDtlId: a.InwardDtlId,
|
||||||
|
|
|
||||||
|
|
@ -282,20 +282,32 @@ const BSBillingTable4 = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleKeyDown = (event) => {
|
const handleKeyDown = (event) => {
|
||||||
if (!preferenceshortcutkey) return;
|
|
||||||
if (!event.ctrlKey) return;
|
|
||||||
|
|
||||||
const key = event.key.toLowerCase();
|
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') {
|
if (key === 'q') {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
handleShortcut('qty');
|
handleShortcut('qty');
|
||||||
}
|
} else if (key === 'e') {
|
||||||
|
|
||||||
if (key === 'e') {
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
handleShortcut('price');
|
handleShortcut('price');
|
||||||
|
} else if (key === 'y') {
|
||||||
|
event.preventDefault();
|
||||||
|
handleShortcut('Parcel');
|
||||||
|
} else if (key === 'b') {
|
||||||
|
event.preventDefault();
|
||||||
|
handleShortcut('weightAmount');
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
window.addEventListener('keydown', handleKeyDown);
|
window.addEventListener('keydown', handleKeyDown);
|
||||||
|
|
|
||||||
|
|
@ -579,7 +579,8 @@ const BSBillingTable5 = () => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!preOrder) {
|
if (!preOrder) {
|
||||||
const totalSum = OrderCardDetail?.reduce(
|
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
|
0
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -2077,7 +2078,8 @@ const BSBillingTable5 = () => {
|
||||||
Type: a.Type,
|
Type: a.Type,
|
||||||
OrderQty: a.OrderQty,
|
OrderQty: a.OrderQty,
|
||||||
OrderRate: a.OrderRate,
|
OrderRate: a.OrderRate,
|
||||||
TotalAmt: a.OrderQty * a.OrderRate,
|
// TotalAmt: a.OrderQty * a.OrderRate,
|
||||||
|
TotalAmt: a.TotalAmt,
|
||||||
TaxAmt: a.TaxAmt,
|
TaxAmt: a.TaxAmt,
|
||||||
RefundQty: 0,
|
RefundQty: 0,
|
||||||
InwardDtlId: a.InwardDtlId,
|
InwardDtlId: a.InwardDtlId,
|
||||||
|
|
|
||||||
|
|
@ -1928,20 +1928,32 @@ const BsBill = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleKeyDown = (event) => {
|
const handleKeyDown = (event) => {
|
||||||
if (!preferenceshortcutkey) return;
|
|
||||||
if (!event.ctrlKey) return;
|
|
||||||
|
|
||||||
const key = event.key.toLowerCase();
|
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') {
|
if (key === 'q') {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
handleShortcut('qty');
|
handleShortcut('qty');
|
||||||
}
|
} else if (key === 'e') {
|
||||||
|
|
||||||
if (key === 'e') {
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
handleShortcut('price');
|
handleShortcut('price');
|
||||||
|
} else if (key === 'y') {
|
||||||
|
event.preventDefault();
|
||||||
|
handleShortcut('Parcel');
|
||||||
|
} else if (key === 'b') {
|
||||||
|
event.preventDefault();
|
||||||
|
handleShortcut('weightAmount');
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
window.addEventListener('keydown', handleKeyDown);
|
window.addEventListener('keydown', handleKeyDown);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -256,23 +256,32 @@ const BSBillingTable6 = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleKeyDown = (event) => {
|
const handleKeyDown = (event) => {
|
||||||
|
|
||||||
if (!preferenceshortcutkey) return
|
|
||||||
if (!event.ctrlKey) return;
|
|
||||||
|
|
||||||
const key = event.key.toLowerCase();
|
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') {
|
if (key === 'q') {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
handleShortcut('qty');
|
handleShortcut('qty');
|
||||||
}
|
} else if (key === 'e') {
|
||||||
|
|
||||||
if (key === 'e') {
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
handleShortcut('price');
|
handleShortcut('price');
|
||||||
|
} else if (key === 'y') {
|
||||||
|
event.preventDefault();
|
||||||
|
handleShortcut('Parcel');
|
||||||
|
} else if (key === 'b') {
|
||||||
|
event.preventDefault();
|
||||||
|
handleShortcut('weightAmount');
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
|
||||||
|
};
|
||||||
window.addEventListener('keydown', handleKeyDown);
|
window.addEventListener('keydown', handleKeyDown);
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
|
|
|
||||||
|
|
@ -551,7 +551,8 @@ const BST6Payment = () => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!preOrder) {
|
if (!preOrder) {
|
||||||
const totalSum = OrderCardDetail?.reduce(
|
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
|
0
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -2118,7 +2119,8 @@ const BST6Payment = () => {
|
||||||
Type: a.Type,
|
Type: a.Type,
|
||||||
OrderQty: a.OrderQty,
|
OrderQty: a.OrderQty,
|
||||||
OrderRate: a.OrderRate,
|
OrderRate: a.OrderRate,
|
||||||
TotalAmt: a.OrderQty * a.OrderRate,
|
// TotalAmt: a.OrderQty * a.OrderRate,
|
||||||
|
TotalAmt: a.TotalAmt,
|
||||||
TaxAmt: a.TaxAmt,
|
TaxAmt: a.TaxAmt,
|
||||||
RefundQty: 0,
|
RefundQty: 0,
|
||||||
InwardDtlId: a.InwardDtlId,
|
InwardDtlId: a.InwardDtlId,
|
||||||
|
|
|
||||||
|
|
@ -570,7 +570,8 @@ const BSBilling7Payment = () => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!preOrder) {
|
if (!preOrder) {
|
||||||
const totalSum = OrderCardDetail?.reduce(
|
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
|
0
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -2086,7 +2087,8 @@ const BSBilling7Payment = () => {
|
||||||
Type: a.Type,
|
Type: a.Type,
|
||||||
OrderQty: a.OrderQty,
|
OrderQty: a.OrderQty,
|
||||||
OrderRate: a.OrderRate,
|
OrderRate: a.OrderRate,
|
||||||
TotalAmt: a.OrderQty * a.OrderRate,
|
// TotalAmt: a.OrderQty * a.OrderRate,
|
||||||
|
TotalAmt: a.TotalAmt,
|
||||||
TaxAmt: a.TaxAmt,
|
TaxAmt: a.TaxAmt,
|
||||||
RefundQty: 0,
|
RefundQty: 0,
|
||||||
InwardDtlId: a.InwardDtlId,
|
InwardDtlId: a.InwardDtlId,
|
||||||
|
|
|
||||||
|
|
@ -225,35 +225,6 @@ const BSBillingTable7 = () => {
|
||||||
setPreviousdataLength(PreviousOrderLength);
|
setPreviousdataLength(PreviousOrderLength);
|
||||||
}, [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(() => {
|
useEffect(() => {
|
||||||
if (!preferenceshortcutkey) return;
|
if (!preferenceshortcutkey) return;
|
||||||
const getSelectedItem = () => {
|
const getSelectedItem = () => {
|
||||||
|
|
@ -279,20 +250,30 @@ const BSBillingTable7 = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleKeyDown = (event) => {
|
const handleKeyDown = (event) => {
|
||||||
if (!preferenceshortcutkey) return;
|
|
||||||
if (!event.ctrlKey) return;
|
|
||||||
|
|
||||||
const key = event.key.toLowerCase();
|
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') {
|
if (key === 'q') {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
handleShortcut('qty');
|
handleShortcut('qty');
|
||||||
}
|
} else if (key === 'e') {
|
||||||
|
|
||||||
if (key === 'e') {
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
handleShortcut('price');
|
handleShortcut('price');
|
||||||
|
} else if (key === 'y') {
|
||||||
|
event.preventDefault();
|
||||||
|
handleShortcut('Parcel');
|
||||||
|
} else if (key === 'b') {
|
||||||
|
event.preventDefault();
|
||||||
|
handleShortcut('weightAmount');
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
window.addEventListener('keydown', handleKeyDown);
|
window.addEventListener('keydown', handleKeyDown);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,10 @@ const BSEditTotalAmt = (props) => {
|
||||||
console.log(OverAllSales, 'OverAllEstimateOverAllEstimate');
|
console.log(OverAllSales, 'OverAllEstimateOverAllEstimate');
|
||||||
const formRef = useRef(null);
|
const formRef = useRef(null);
|
||||||
const formEstRef = 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 dispatch = useDispatch();
|
||||||
const [messageType, setMessageType] = useState(null);
|
const [messageType, setMessageType] = useState(null);
|
||||||
const [messageData, setMessageData] = useState(null);
|
const [messageData, setMessageData] = useState(null);
|
||||||
|
|
@ -87,6 +91,29 @@ const BSEditTotalAmt = (props) => {
|
||||||
return () => clearInterval(timer);
|
return () => clearInterval(timer);
|
||||||
}, [timeLeft]);
|
}, [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) => {
|
const handleOtpChange = (index, value) => {
|
||||||
// Allow empty value for clearing
|
// Allow empty value for clearing
|
||||||
if (value === '' || value.match(/^[0-9]$/)) {
|
if (value === '' || value.match(/^[0-9]$/)) {
|
||||||
|
|
@ -201,6 +228,10 @@ const BSEditTotalAmt = (props) => {
|
||||||
setMessageData('Please Give less than value for sell price');
|
setMessageData('Please Give less than value for sell price');
|
||||||
setESTSellingPrice(0);
|
setESTSellingPrice(0);
|
||||||
formEstRef?.current?.resetFields();
|
formEstRef?.current?.resetFields();
|
||||||
|
setTimeout(() => {
|
||||||
|
const inputElement = estDiscInputRef.current?.querySelector('input');
|
||||||
|
inputElement?.focus();
|
||||||
|
}, 100);
|
||||||
} else {
|
} else {
|
||||||
setESTSellingPrice(inputValue);
|
setESTSellingPrice(inputValue);
|
||||||
// Check if entered amount is 0 or equals total amount
|
// Check if entered amount is 0 or equals total amount
|
||||||
|
|
@ -214,6 +245,13 @@ const BSEditTotalAmt = (props) => {
|
||||||
handleOk();
|
handleOk();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleEstKeyDown = (e) => {
|
||||||
|
if (e.key === 'Enter') {
|
||||||
|
e.preventDefault();
|
||||||
|
SetTotalDiscount();
|
||||||
|
}
|
||||||
|
};
|
||||||
const SalesChangefun = (e) => {
|
const SalesChangefun = (e) => {
|
||||||
const inputValue = e.target.value.trim();
|
const inputValue = e.target.value.trim();
|
||||||
console.log(e, e.target.value, 'SalesChangefun');
|
console.log(e, e.target.value, 'SalesChangefun');
|
||||||
|
|
@ -223,6 +261,10 @@ const BSEditTotalAmt = (props) => {
|
||||||
setMessageData('Please Give less than value for sell price');
|
setMessageData('Please Give less than value for sell price');
|
||||||
setSellingPrice(0);
|
setSellingPrice(0);
|
||||||
formRef?.current?.resetFields();
|
formRef?.current?.resetFields();
|
||||||
|
setTimeout(() => {
|
||||||
|
const inputElement = salesDiscInputRef.current?.querySelector('input');
|
||||||
|
inputElement?.focus();
|
||||||
|
}, 100);
|
||||||
} else {
|
} else {
|
||||||
setSellingPrice(inputValue);
|
setSellingPrice(inputValue);
|
||||||
// SalesTotalAmount()
|
// SalesTotalAmount()
|
||||||
|
|
@ -232,6 +274,13 @@ const BSEditTotalAmt = (props) => {
|
||||||
// setSalesDiscAmount(0)
|
// setSalesDiscAmount(0)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleSalesKeyDown = (e) => {
|
||||||
|
if (e.key === 'Enter') {
|
||||||
|
e.preventDefault();
|
||||||
|
SetTotalDiscount();
|
||||||
|
}
|
||||||
|
};
|
||||||
const orderscolumns = [
|
const orderscolumns = [
|
||||||
{
|
{
|
||||||
title: 'Sl.No',
|
title: 'Sl.No',
|
||||||
|
|
@ -347,6 +396,10 @@ const BSEditTotalAmt = (props) => {
|
||||||
setSalesDiscAmount(0);
|
setSalesDiscAmount(0);
|
||||||
// setFinalTotalAmt()
|
// setFinalTotalAmt()
|
||||||
formRef.current?.resetFields();
|
formRef.current?.resetFields();
|
||||||
|
setTimeout(() => {
|
||||||
|
const inputElement = salesMoreOptInputRef.current?.querySelector('input');
|
||||||
|
inputElement?.focus();
|
||||||
|
}, 100);
|
||||||
};
|
};
|
||||||
const onEstPercentageSelectionChange = (data) => {
|
const onEstPercentageSelectionChange = (data) => {
|
||||||
setESTPercentageSelection(data);
|
setESTPercentageSelection(data);
|
||||||
|
|
@ -354,6 +407,10 @@ const BSEditTotalAmt = (props) => {
|
||||||
setEstDiscAmount(0);
|
setEstDiscAmount(0);
|
||||||
// setFinalTotalAmt()
|
// setFinalTotalAmt()
|
||||||
formEstRef.current?.resetFields();
|
formEstRef.current?.resetFields();
|
||||||
|
setTimeout(() => {
|
||||||
|
const inputElement = estMoreOptInputRef.current?.querySelector('input');
|
||||||
|
inputElement?.focus();
|
||||||
|
}, 100);
|
||||||
};
|
};
|
||||||
|
|
||||||
const PriceChangefun = (data) => {
|
const PriceChangefun = (data) => {
|
||||||
|
|
@ -375,6 +432,10 @@ const BSEditTotalAmt = (props) => {
|
||||||
setSalesDiscAmount(0);
|
setSalesDiscAmount(0);
|
||||||
// setNewPrice1(0)
|
// setNewPrice1(0)
|
||||||
formRef.current?.resetFields();
|
formRef.current?.resetFields();
|
||||||
|
setTimeout(() => {
|
||||||
|
const inputElement = salesMoreOptInputRef.current?.querySelector('input');
|
||||||
|
inputElement?.focus();
|
||||||
|
}, 100);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Percentage mode
|
// Percentage mode
|
||||||
|
|
@ -391,6 +452,10 @@ const BSEditTotalAmt = (props) => {
|
||||||
setMessageData('Please Give less than or equal to 100');
|
setMessageData('Please Give less than or equal to 100');
|
||||||
setSalesDiscAmount(0);
|
setSalesDiscAmount(0);
|
||||||
formRef.current?.resetFields();
|
formRef.current?.resetFields();
|
||||||
|
setTimeout(() => {
|
||||||
|
const inputElement = salesMoreOptInputRef.current?.querySelector('input');
|
||||||
|
inputElement?.focus();
|
||||||
|
}, 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -400,6 +465,13 @@ const BSEditTotalAmt = (props) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handlePriceKeyDown = (e) => {
|
||||||
|
if (e.key === 'Enter') {
|
||||||
|
e.preventDefault();
|
||||||
|
SetTotalDiscount();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const PriceChangefunEst = (data) => {
|
const PriceChangefunEst = (data) => {
|
||||||
console.log(data?.target.value, PercentageSelection, 'datadata');
|
console.log(data?.target.value, PercentageSelection, 'datadata');
|
||||||
if (data?.target.value) {
|
if (data?.target.value) {
|
||||||
|
|
@ -418,6 +490,10 @@ const BSEditTotalAmt = (props) => {
|
||||||
setMessageData('Please Give less than value for sell price');
|
setMessageData('Please Give less than value for sell price');
|
||||||
setEstDiscAmount(0);
|
setEstDiscAmount(0);
|
||||||
formEstRef.current?.resetFields();
|
formEstRef.current?.resetFields();
|
||||||
|
setTimeout(() => {
|
||||||
|
const inputElement = estMoreOptInputRef.current?.querySelector('input');
|
||||||
|
inputElement?.focus();
|
||||||
|
}, 100);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Percentage mode
|
// Percentage mode
|
||||||
|
|
@ -434,6 +510,10 @@ const BSEditTotalAmt = (props) => {
|
||||||
setMessageData('Please Give less than or equal to 100');
|
setMessageData('Please Give less than or equal to 100');
|
||||||
setEstDiscAmount(0);
|
setEstDiscAmount(0);
|
||||||
formEstRef.current?.resetFields();
|
formEstRef.current?.resetFields();
|
||||||
|
setTimeout(() => {
|
||||||
|
const inputElement = estMoreOptInputRef.current?.querySelector('input');
|
||||||
|
inputElement?.focus();
|
||||||
|
}, 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -444,6 +524,13 @@ const BSEditTotalAmt = (props) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handlePriceEstKeyDown = (e) => {
|
||||||
|
if (e.key === 'Enter') {
|
||||||
|
e.preventDefault();
|
||||||
|
SetTotalDiscount();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const moreOptions = () => {
|
const moreOptions = () => {
|
||||||
setMoreOpt((prev) => !prev);
|
setMoreOpt((prev) => !prev);
|
||||||
setSalesDiscAmount(0);
|
setSalesDiscAmount(0);
|
||||||
|
|
@ -535,6 +622,7 @@ const BSEditTotalAmt = (props) => {
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
|
<div ref={salesDiscInputRef}>
|
||||||
<InputField
|
<InputField
|
||||||
field="SalesDisc"
|
field="SalesDisc"
|
||||||
name="SalesDisc"
|
name="SalesDisc"
|
||||||
|
|
@ -542,8 +630,10 @@ const BSEditTotalAmt = (props) => {
|
||||||
fieldApi={true}
|
fieldApi={true}
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
onChange={(e) => SalesChangefun(e)}
|
onChange={(e) => SalesChangefun(e)}
|
||||||
|
onKeyDown={(e) => handleSalesKeyDown(e)}
|
||||||
maxLength={8}
|
maxLength={8}
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Form>{' '}
|
</Form>{' '}
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -593,6 +683,7 @@ const BSEditTotalAmt = (props) => {
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
|
<div ref={salesMoreOptInputRef}>
|
||||||
<InputField
|
<InputField
|
||||||
field="SellPrice"
|
field="SellPrice"
|
||||||
name="SellPrice"
|
name="SellPrice"
|
||||||
|
|
@ -603,8 +694,10 @@ const BSEditTotalAmt = (props) => {
|
||||||
// id="error2"
|
// id="error2"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
onChange={(e) => PriceChangefun(e)}
|
onChange={(e) => PriceChangefun(e)}
|
||||||
|
onKeyDown={(e) => handlePriceKeyDown(e)}
|
||||||
// isOnChange={formType == "edit" || formRef.current?.getFieldsValue()?.CustName ? true : false}
|
// isOnChange={formType == "edit" || formRef.current?.getFieldsValue()?.CustName ? true : false}
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
{/* <input type="text"
|
{/* <input type="text"
|
||||||
onChange={(e)=>PriceChangefun(e)}
|
onChange={(e)=>PriceChangefun(e)}
|
||||||
|
|
@ -684,6 +777,7 @@ const BSEditTotalAmt = (props) => {
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
|
<div ref={estDiscInputRef}>
|
||||||
<InputField
|
<InputField
|
||||||
field="ESTSalesDisc"
|
field="ESTSalesDisc"
|
||||||
name="ESTSalesDisc"
|
name="ESTSalesDisc"
|
||||||
|
|
@ -692,8 +786,10 @@ const BSEditTotalAmt = (props) => {
|
||||||
// id="error2"
|
// id="error2"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
onChange={(e) => EstChangefun(e)}
|
onChange={(e) => EstChangefun(e)}
|
||||||
|
onKeyDown={(e) => handleEstKeyDown(e)}
|
||||||
maxLength={8}
|
maxLength={8}
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Form>
|
</Form>
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -742,6 +838,7 @@ const BSEditTotalAmt = (props) => {
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
|
<div ref={estMoreOptInputRef}>
|
||||||
<InputField
|
<InputField
|
||||||
field="SellPrice"
|
field="SellPrice"
|
||||||
name="ESTSellingPrice"
|
name="ESTSellingPrice"
|
||||||
|
|
@ -752,8 +849,10 @@ const BSEditTotalAmt = (props) => {
|
||||||
// id="error2"
|
// id="error2"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
onChange={(e) => PriceChangefunEst(e)}
|
onChange={(e) => PriceChangefunEst(e)}
|
||||||
|
onKeyDown={(e) => handlePriceEstKeyDown(e)}
|
||||||
// isOnChange={formType == "edit" || formRef.current?.getFieldsValue()?.CustName ? true : false}
|
// isOnChange={formType == "edit" || formRef.current?.getFieldsValue()?.CustName ? true : false}
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
{/* <input type="text"
|
{/* <input type="text"
|
||||||
onChange={(e)=>PriceChangefun(e)}
|
onChange={(e)=>PriceChangefun(e)}
|
||||||
|
|
|
||||||
|
|
@ -249,27 +249,59 @@ const ComboSalesBillTable = () => {
|
||||||
// );
|
// );
|
||||||
// setBillOrderPre(BillOrder?.SettingValue);
|
// setBillOrderPre(BillOrder?.SettingValue);
|
||||||
// }, [preferenceDatas]);
|
// }, [preferenceDatas]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const handleKeyDown = (event) => {
|
const getSelectedItem = () => {
|
||||||
if (event.ctrlKey && event.key.toLowerCase() === 'q') {
|
|
||||||
event.preventDefault();
|
|
||||||
const getItem = (data = []) => {
|
const getItem = (data = []) => {
|
||||||
if (!data.length) return null;
|
if (!data.length) return null;
|
||||||
return BillOrderPre === 'Y' ? data[0] : data[data.length - 1];
|
return BillOrderPre === 'Y' ? data[0] : data[data.length - 1];
|
||||||
};
|
};
|
||||||
let item = null;
|
|
||||||
if (tableDataTakeAway?.length > 0) {
|
if (tableDataTakeAway?.length > 0) {
|
||||||
item = getItem(tableDataTakeAway);
|
return getItem(tableDataTakeAway);
|
||||||
} else if (tableDataDinein?.length > 0) {
|
} 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);
|
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);
|
window.addEventListener('keydown', handleKeyDown);
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
window.removeEventListener('keydown', handleKeyDown);
|
window.removeEventListener('keydown', handleKeyDown);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -262,23 +262,40 @@ const StandardTable = () => {
|
||||||
handleEditQuantity(item);
|
handleEditQuantity(item);
|
||||||
setshortKeyMethod(method);
|
setshortKeyMethod(method);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleKeyDown = (event) => {
|
const handleKeyDown = (event) => {
|
||||||
if (!event.ctrlKey) return;
|
|
||||||
|
|
||||||
const key = event.key.toLowerCase();
|
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') {
|
if (key === 'q') {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
handleShortcut('qty');
|
handleShortcut('qty');
|
||||||
}
|
} else if (key === 'e') {
|
||||||
|
|
||||||
if (key === 'e') {
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
handleShortcut('price');
|
handleShortcut('price');
|
||||||
|
} else if (key === 'y') {
|
||||||
|
event.preventDefault();
|
||||||
|
handleShortcut('Parcel');
|
||||||
|
} else if (key === 'b') {
|
||||||
|
event.preventDefault();
|
||||||
|
handleShortcut('weightAmount');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
window.addEventListener('keydown', handleKeyDown);
|
window.addEventListener('keydown', handleKeyDown);
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
|
|
|
||||||
|
|
@ -841,7 +841,8 @@ const StandardTablePayment = () => {
|
||||||
|
|
||||||
if (!preOrder) {
|
if (!preOrder) {
|
||||||
const totalSum = orderCardDetail?.reduce(
|
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
|
0
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -1417,7 +1418,8 @@ const StandardTablePayment = () => {
|
||||||
Type: a.Type,
|
Type: a.Type,
|
||||||
OrderQty: a.OrderQty,
|
OrderQty: a.OrderQty,
|
||||||
OrderRate: a.OrderRate,
|
OrderRate: a.OrderRate,
|
||||||
TotalAmt: a.OrderQty * a.OrderRate,
|
// TotalAmt: a.OrderQty * a.OrderRate,
|
||||||
|
TotalAmt: a.TotalAmt,
|
||||||
TaxAmt: a.TaxAmt,
|
TaxAmt: a.TaxAmt,
|
||||||
RefundQty: 0,
|
RefundQty: 0,
|
||||||
InwardDtlId: a.InwardDtlId,
|
InwardDtlId: a.InwardDtlId,
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -59,6 +59,8 @@ import {
|
||||||
changeCardData,
|
changeCardData,
|
||||||
GlobaldraggingComponent,
|
GlobaldraggingComponent,
|
||||||
GlobalCombocarddata,
|
GlobalCombocarddata,
|
||||||
|
GlobalGetmultipleSearchDatas,
|
||||||
|
getmultipleSearch,
|
||||||
} from '../../../../Features/BookingScreen/BookingData/BookingData';
|
} from '../../../../Features/BookingScreen/BookingData/BookingData';
|
||||||
import {
|
import {
|
||||||
GlobalPreOrderAdditem,
|
GlobalPreOrderAdditem,
|
||||||
|
|
@ -223,6 +225,7 @@ const BSComboItemCard = (props) => {
|
||||||
SelectedGlobalCardColorDetail,
|
SelectedGlobalCardColorDetail,
|
||||||
shallowEqual
|
shallowEqual
|
||||||
);
|
);
|
||||||
|
const GetmultipleSearchDatas = useSelector(GlobalGetmultipleSearchDatas, shallowEqual)
|
||||||
const SelectedCardFont = useSelector(SelectedGlobalCardFont, shallowEqual);
|
const SelectedCardFont = useSelector(SelectedGlobalCardFont, shallowEqual);
|
||||||
const CartOrderDetails = useSelector(GlobalOrderCardDetails, shallowEqual);
|
const CartOrderDetails = useSelector(GlobalOrderCardDetails, shallowEqual);
|
||||||
const SelectedDatas = useSelector(GlobalSelectedDatas, shallowEqual);
|
const SelectedDatas = useSelector(GlobalSelectedDatas, shallowEqual);
|
||||||
|
|
@ -307,10 +310,25 @@ console.log(cardData, 'cardData combo card');
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (AppId && CompId && BranchId) {
|
if (AppId && CompId && BranchId) {
|
||||||
fetchedit();
|
fetchedit();
|
||||||
|
GetmultipleSearchData()
|
||||||
}
|
}
|
||||||
|
|
||||||
// dispatch(changepreOrder(false)); Commented to Add Normal Produts After Adding the Combo Pack !!!!!! Dont Touch Without Shifayath Permission
|
// dispatch(changepreOrder(false)); Commented to Add Normal Produts After Adding the Combo Pack !!!!!! Dont Touch Without Shifayath Permission
|
||||||
}, [AppId, CompId, BranchId]);
|
}, [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(() => {
|
useEffect(() => {
|
||||||
setPreOrderSelectedProdNames([]);
|
setPreOrderSelectedProdNames([]);
|
||||||
|
|
@ -328,10 +346,13 @@ console.log(cardData, 'cardData combo card');
|
||||||
if (noSubcatCardData) {
|
if (noSubcatCardData) {
|
||||||
setNoSubcatCardData();
|
setNoSubcatCardData();
|
||||||
}
|
}
|
||||||
if (ProductSearch?.length > 5) {
|
|
||||||
|
if (ProductSearch?.length > 5 && GetmultipleSearchDatas.some(
|
||||||
|
e => e.toLowerCase() === "qrcode"
|
||||||
|
)) {
|
||||||
setQuickAdd(true);
|
setQuickAdd(true);
|
||||||
}
|
}
|
||||||
}, [ProductSearch]);
|
}, [ProductSearch,GetmultipleSearchDatas]);
|
||||||
|
|
||||||
// useEffect(() => {
|
// useEffect(() => {
|
||||||
// if (
|
// if (
|
||||||
|
|
@ -4620,7 +4641,9 @@ console.log(cardData, 'cardData combo card');
|
||||||
</SortableContext>
|
</SortableContext>
|
||||||
</DndContext>
|
</DndContext>
|
||||||
</>
|
</>
|
||||||
) : ProductSearch?.length > 5 &&
|
) : ProductSearch?.length > 5 && GetmultipleSearchDatas.some(
|
||||||
|
e => e.toLowerCase() === "qrcode"
|
||||||
|
) &&
|
||||||
(cardData?.length == 0 || cardData == undefined) ? (
|
(cardData?.length == 0 || cardData == undefined) ? (
|
||||||
<div>
|
<div>
|
||||||
{/* cardData mohan 18-04-2025 */}
|
{/* cardData mohan 18-04-2025 */}
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,10 @@
|
||||||
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
||||||
import { shallowEqual, useDispatch, useSelector } from 'react-redux';
|
import { shallowEqual, useDispatch, useSelector } from 'react-redux';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { Badge, Modal, Tooltip } from 'antd';
|
import { Badge, Tooltip } from 'antd';
|
||||||
import { ExclamationCircleOutlined } from '@ant-design/icons';
|
|
||||||
import defaultimage from '../../../../Images/defaultItemImg.png';
|
import defaultimage from '../../../../Images/defaultItemImg.png';
|
||||||
import FormHeader from '../../../PageComponents/FormHeader';
|
import FormHeader from '../../../PageComponents/FormHeader';
|
||||||
import {
|
import {
|
||||||
GlobalPricingAppPricingName,
|
|
||||||
SelectedGlobalCardColorDetail,
|
SelectedGlobalCardColorDetail,
|
||||||
SelectedGlobalCardFont,
|
SelectedGlobalCardFont,
|
||||||
StoredSessionData,
|
StoredSessionData,
|
||||||
|
|
@ -44,15 +42,12 @@ import {
|
||||||
GlobalReorderHoldDetails,
|
GlobalReorderHoldDetails,
|
||||||
GlobalWeightScalePort,
|
GlobalWeightScalePort,
|
||||||
GlobalWeightScaleWeight,
|
GlobalWeightScaleWeight,
|
||||||
changeWeightScaleWeight,
|
|
||||||
GlobalExpDateforHeight,
|
GlobalExpDateforHeight,
|
||||||
GlobalBookingTypeBoth,
|
|
||||||
GlobalOrderType,
|
GlobalOrderType,
|
||||||
GlobalReorderProductDetails,
|
GlobalReorderProductDetails,
|
||||||
getConfigType,
|
getConfigType,
|
||||||
GlobalPayementloader,
|
GlobalPayementloader,
|
||||||
GlobalPaymentTransactionNumber,
|
GlobalPaymentTransactionNumber,
|
||||||
GlobalSelOption,
|
|
||||||
PreferenceData,
|
PreferenceData,
|
||||||
changeCardData,
|
changeCardData,
|
||||||
GlobaldraggingComponent,
|
GlobaldraggingComponent,
|
||||||
|
|
@ -64,6 +59,8 @@ import {
|
||||||
GlobalCategorieData,
|
GlobalCategorieData,
|
||||||
GlobalSubcategorieData,
|
GlobalSubcategorieData,
|
||||||
GlobalProductCardTrigger,
|
GlobalProductCardTrigger,
|
||||||
|
GlobalGetmultipleSearchDatas,
|
||||||
|
getmultipleSearch,
|
||||||
} from '../../../../Features/BookingScreen/BookingData/BookingData';
|
} from '../../../../Features/BookingScreen/BookingData/BookingData';
|
||||||
import {
|
import {
|
||||||
GlobalPreOrderAdditem,
|
GlobalPreOrderAdditem,
|
||||||
|
|
@ -125,6 +122,7 @@ import AddProduct from '../../../../Components/AddProduct/AddProduct.jsx';
|
||||||
import { MdOutlineAddShoppingCart } from 'react-icons/md';
|
import { MdOutlineAddShoppingCart } from 'react-icons/md';
|
||||||
import { bulkpostdata } from '../../../../Features/ProductPage/ProductPage.js';
|
import { bulkpostdata } from '../../../../Features/ProductPage/ProductPage.js';
|
||||||
import ProductPriceChange from '../UtillComponents/ProductPriceChange.jsx';
|
import ProductPriceChange from '../UtillComponents/ProductPriceChange.jsx';
|
||||||
|
import ExpireConfirmModal from '../BookingFunctionality/ExpireConfirmModal.jsx';
|
||||||
|
|
||||||
export function SortableCard({ id, children, item }) {
|
export function SortableCard({ id, children, item }) {
|
||||||
const {
|
const {
|
||||||
|
|
@ -191,18 +189,14 @@ const BSItemCard = (props) => {
|
||||||
const AllCategoryDatas = useSelector(GlobalCategorieData, shallowEqual);
|
const AllCategoryDatas = useSelector(GlobalCategorieData, shallowEqual);
|
||||||
const AllsubcatgoryDatas = useSelector(GlobalSubcategorieData, shallowEqual);
|
const AllsubcatgoryDatas = useSelector(GlobalSubcategorieData, shallowEqual);
|
||||||
const RetailWSSalesType = useSelector(GlobalRetailWSSalesType, shallowEqual);
|
const RetailWSSalesType = useSelector(GlobalRetailWSSalesType, shallowEqual);
|
||||||
// const CustDetails = SelectedCust ? SelectedCust : AddCustomerDetails?.[0];
|
|
||||||
const BookingTypeBoth = useSelector(GlobalBookingTypeBoth);
|
|
||||||
const GPreOrderList = useSelector(GlobalPreOrderList, shallowEqual);
|
const GPreOrderList = useSelector(GlobalPreOrderList, shallowEqual);
|
||||||
const [modelQty, setModelQty] = useState(false);
|
const [modelQty, setModelQty] = useState(false);
|
||||||
const [modelstock, setModelstock] = useState(false);
|
const [modelstock, setModelstock] = useState(false);
|
||||||
const [ModalVarient, setModalVarient] = useState(false);
|
const [ModalVarient, setModalVarient] = useState(false);
|
||||||
const [QtyIndex, setQtyIndex] = useState(0);
|
const [QtyIndex, setQtyIndex] = useState(0);
|
||||||
const [VarientIndex, setVarientIndex] = useState(0);
|
const [VarientIndex, setVarientIndex] = useState(0);
|
||||||
const [expModel, setexpModel] = useState(false);
|
|
||||||
const [prodexpir, setProdexpir] = useState(false);
|
const [prodexpir, setProdexpir] = useState(false);
|
||||||
const [expVarModel, setexpVarModel] = useState(false);
|
|
||||||
const [expStockModel, setexpStockModel] = useState(false);
|
|
||||||
const [initialRun, setInitialRun] = useState(false);
|
const [initialRun, setInitialRun] = useState(false);
|
||||||
const [Item, setItem] = useState();
|
const [Item, setItem] = useState();
|
||||||
const [VarItem, setVarItem] = useState(0);
|
const [VarItem, setVarItem] = useState(0);
|
||||||
|
|
@ -244,6 +238,7 @@ const BSItemCard = (props) => {
|
||||||
SelectedGlobalCardColorDetail,
|
SelectedGlobalCardColorDetail,
|
||||||
shallowEqual
|
shallowEqual
|
||||||
);
|
);
|
||||||
|
const GetmultipleSearchDatas = useSelector(GlobalGetmultipleSearchDatas, shallowEqual)
|
||||||
const SelectedCardFont = useSelector(SelectedGlobalCardFont, shallowEqual);
|
const SelectedCardFont = useSelector(SelectedGlobalCardFont, shallowEqual);
|
||||||
const CartOrderDetails = useSelector(GlobalOrderCardDetails, shallowEqual);
|
const CartOrderDetails = useSelector(GlobalOrderCardDetails, shallowEqual);
|
||||||
const SelectedDatas = useSelector(GlobalSelectedDatas, shallowEqual);
|
const SelectedDatas = useSelector(GlobalSelectedDatas, shallowEqual);
|
||||||
|
|
@ -251,6 +246,7 @@ const BSItemCard = (props) => {
|
||||||
const WSProductdata = useSelector(GlobalWSProduct, shallowEqual);
|
const WSProductdata = useSelector(GlobalWSProduct, shallowEqual);
|
||||||
const NewQrProductData = useSelector(GlobalNewQrProduct, shallowEqual);
|
const NewQrProductData = useSelector(GlobalNewQrProduct, shallowEqual);
|
||||||
const ReportholdData = useSelector(GlobalReorderHoldDetails, shallowEqual);
|
const ReportholdData = useSelector(GlobalReorderHoldDetails, shallowEqual);
|
||||||
|
console.log(GetmultipleSearchDatas, "GetmultipleSearchDatas")
|
||||||
const ReorderProductData = useSelector(
|
const ReorderProductData = useSelector(
|
||||||
GlobalReorderProductDetails,
|
GlobalReorderProductDetails,
|
||||||
shallowEqual
|
shallowEqual
|
||||||
|
|
@ -281,12 +277,11 @@ const BSItemCard = (props) => {
|
||||||
const [QuickAdd, setQuickAdd] = useState(true);
|
const [QuickAdd, setQuickAdd] = useState(true);
|
||||||
const [onePeiceFlow, setOnePeiceFlow] = useState(false);
|
const [onePeiceFlow, setOnePeiceFlow] = useState(false);
|
||||||
const [BillOrderPre, setBillOrderPre] = useState();
|
const [BillOrderPre, setBillOrderPre] = useState();
|
||||||
const [expQtyModel, setExpQtyModel] = useState(false);
|
|
||||||
const [qtyExpData, setQtyExpData] = useState();
|
const [qtyExpData, setQtyExpData] = useState();
|
||||||
const OrderOfferDetail = useSelector(Global_OrderOfferDetail);
|
const OrderOfferDetail = useSelector(Global_OrderOfferDetail);
|
||||||
const [freeProductsOffers, setfreeProductsOffers] = useState([]);
|
// const [freeProductsOffers, setfreeProductsOffers] = useState([]);
|
||||||
const [screenWidth, setScreenWidth] = useState(window.innerWidth);
|
const [screenWidth, setScreenWidth] = useState(window.innerWidth);
|
||||||
const [screenHeight, setScreenHeight] = useState(window.innerHeight);
|
// const [screenHeight, setScreenHeight] = useState(window.innerHeight);
|
||||||
const ProdCat = useSelector(GlobalProductCategorie, shallowEqual);
|
const ProdCat = useSelector(GlobalProductCategorie, shallowEqual);
|
||||||
const paymentloader = useSelector(GlobalPayementloader, shallowEqual);
|
const paymentloader = useSelector(GlobalPayementloader, shallowEqual);
|
||||||
const SessionData = useSelector(StoredSessionData, shallowEqual);
|
const SessionData = useSelector(StoredSessionData, shallowEqual);
|
||||||
|
|
@ -314,6 +309,12 @@ const BSItemCard = (props) => {
|
||||||
const triggerOfferFree = useSelector(GlobalTriggerOfferFree);
|
const triggerOfferFree = useSelector(GlobalTriggerOfferFree);
|
||||||
const productCardTrigger = useSelector(GlobalProductCardTrigger);
|
const productCardTrigger = useSelector(GlobalProductCardTrigger);
|
||||||
const appPreferences = useSelector(ApplicationPreferences);
|
const appPreferences = useSelector(ApplicationPreferences);
|
||||||
|
const [expireModal, setExpireModal] = useState({
|
||||||
|
open: false,
|
||||||
|
title: '',
|
||||||
|
onOk: null,
|
||||||
|
onCancel: null,
|
||||||
|
});
|
||||||
const salespagefields = appPreferences?.find(
|
const salespagefields = appPreferences?.find(
|
||||||
(pref) => pref?.PreferredCatName === 'Sales Page Fields'
|
(pref) => pref?.PreferredCatName === 'Sales Page Fields'
|
||||||
)?.PreferenceCatDetails;
|
)?.PreferenceCatDetails;
|
||||||
|
|
@ -322,7 +323,7 @@ const BSItemCard = (props) => {
|
||||||
type?.PreferredSubCatName?.toLowerCase() === 'available date' &&
|
type?.PreferredSubCatName?.toLowerCase() === 'available date' &&
|
||||||
type?.PreferredStatus === 'Y'
|
type?.PreferredStatus === 'Y'
|
||||||
);
|
);
|
||||||
console.log(AvailableDate, salespagefields, 'Available Date');
|
|
||||||
const SingleMember = salespagefields?.find(
|
const SingleMember = salespagefields?.find(
|
||||||
(type) =>
|
(type) =>
|
||||||
type?.PreferredSubCatName?.toLowerCase() === 'single member' &&
|
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:
|
// Usage example:
|
||||||
// const result = handleLoyaltyFreeProducts(orderCardDtls, freeProdDtls);
|
// const result = handleLoyaltyFreeProducts(orderCardDtls, freeProdDtls);
|
||||||
// console.log(result.ModifiedData);
|
// console.log(result.ModifiedData);
|
||||||
|
|
@ -937,13 +951,9 @@ const BSItemCard = (props) => {
|
||||||
// console.log(result.AppliedOffers);
|
// console.log(result.AppliedOffers);
|
||||||
|
|
||||||
async function getOffers() {
|
async function getOffers() {
|
||||||
let response = await dispatch(
|
await dispatch(
|
||||||
getOfferinBooking({ AppId: AppId, CompId: CompId, BranchId: BranchId })
|
getOfferinBooking({ AppId: AppId, CompId: CompId, BranchId: BranchId })
|
||||||
).unwrap();
|
).unwrap();
|
||||||
|
|
||||||
if (response?.data?.statusCode == 1) {
|
|
||||||
let expiredProd = response?.data?.data;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
@ -964,7 +974,7 @@ const BSItemCard = (props) => {
|
||||||
if (TableName === 'BuyXGetXOffers') return true;
|
if (TableName === 'BuyXGetXOffers') return true;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
setfreeProductsOffers(filteredOffers);
|
// setfreeProductsOffers(filteredOffers);
|
||||||
|
|
||||||
getOffers();
|
getOffers();
|
||||||
}, [OrderOfferDetail]);
|
}, [OrderOfferDetail]);
|
||||||
|
|
@ -978,12 +988,7 @@ const BSItemCard = (props) => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, [SelectedCardFont]);
|
}, [SelectedCardFont]);
|
||||||
// const cardData = !globalAccessForOthers
|
|
||||||
// ? CardAccess
|
|
||||||
// ? SelectedDatas
|
|
||||||
// : ItemCard?.length == 0 ? noSubcatCardData : ItemCard
|
|
||||||
// : "";
|
|
||||||
//mohan 18-04-2025
|
|
||||||
const cardData = !globalAccessForOthers
|
const cardData = !globalAccessForOthers
|
||||||
? CardAccess
|
? CardAccess
|
||||||
? SelectedDatas?.length > 1
|
? SelectedDatas?.length > 1
|
||||||
|
|
@ -1025,10 +1030,27 @@ const BSItemCard = (props) => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (AppId && CompId && BranchId) {
|
if (AppId && CompId && BranchId) {
|
||||||
fetchedit();
|
fetchedit();
|
||||||
|
GetmultipleSearchData()
|
||||||
}
|
}
|
||||||
|
|
||||||
// dispatch(changepreOrder(false)); Commented to Add Normal Produts After Adding the Combo Pack !!!!!! Dont Touch Without Shifayath Permission
|
// dispatch(changepreOrder(false)); Commented to Add Normal Produts After Adding the Combo Pack !!!!!! Dont Touch Without Shifayath Permission
|
||||||
}, [AppId, CompId, BranchId]);
|
}, [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(() => {
|
useEffect(() => {
|
||||||
setPreOrderSelectedProdNames([]);
|
setPreOrderSelectedProdNames([]);
|
||||||
// dispatch(changePreOrderAdditem(null));
|
// dispatch(changePreOrderAdditem(null));
|
||||||
|
|
@ -1043,10 +1065,14 @@ const BSItemCard = (props) => {
|
||||||
if (noSubcatCardData) {
|
if (noSubcatCardData) {
|
||||||
setNoSubcatCardData();
|
setNoSubcatCardData();
|
||||||
}
|
}
|
||||||
if (ProductSearch?.length > 5) {
|
|
||||||
|
if (ProductSearch?.length > 5 && GetmultipleSearchDatas.some(
|
||||||
|
e => e.toLowerCase() === "qrcode"
|
||||||
|
)) {
|
||||||
setQuickAdd(true);
|
setQuickAdd(true);
|
||||||
}
|
}
|
||||||
}, [ProductSearch]);
|
}, [ProductSearch, GetmultipleSearchDatas]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (
|
if (
|
||||||
!initialRun &&
|
!initialRun &&
|
||||||
|
|
@ -1155,13 +1181,6 @@ const BSItemCard = (props) => {
|
||||||
|
|
||||||
if (tempconfigdata?.data?.statusCode == 1) {
|
if (tempconfigdata?.data?.statusCode == 1) {
|
||||||
setConfigDataList(tempconfigdata?.data?.data);
|
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(() => {
|
useEffect(() => {
|
||||||
if (ItemCard?.[0]?.QrBasedSearch === 'Y') {
|
if (ItemCard?.[0]?.QrBasedSearch === 'Y') {
|
||||||
if (ItemCard?.[0]?.OverAllExpStatus == 'Y' && ExpiredProduct) {
|
if (ItemCard?.[0]?.OverAllExpStatus == 'Y' && ExpiredProduct) {
|
||||||
setexpModel(true);
|
openExpireModal({
|
||||||
|
title: 'Product Expires',
|
||||||
|
onOk: () => expFun(Item),
|
||||||
|
});
|
||||||
setItem(ItemCard?.[0]);
|
setItem(ItemCard?.[0]);
|
||||||
} else {
|
} else {
|
||||||
setQtydata(ItemCard?.[0]);
|
setQtydata(ItemCard?.[0]);
|
||||||
|
|
@ -1203,7 +1225,10 @@ const BSItemCard = (props) => {
|
||||||
}
|
}
|
||||||
} else if (ItemCard?.[0]?.OnePcQRBased === 'Y') {
|
} else if (ItemCard?.[0]?.OnePcQRBased === 'Y') {
|
||||||
if (ItemCard?.[0]?.OverAllExpStatus == 'Y' && ExpiredProduct) {
|
if (ItemCard?.[0]?.OverAllExpStatus == 'Y' && ExpiredProduct) {
|
||||||
setexpModel(true);
|
openExpireModal({
|
||||||
|
title: 'Product Expires',
|
||||||
|
onOk: () => expFun(Item),
|
||||||
|
});
|
||||||
setItem(ItemCard?.[0]);
|
setItem(ItemCard?.[0]);
|
||||||
setOnePeiceFlow(true);
|
setOnePeiceFlow(true);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1295,14 +1320,6 @@ const BSItemCard = (props) => {
|
||||||
)?.SettingValue === 'Y';
|
)?.SettingValue === 'Y';
|
||||||
setExpiredProduct(expiredDate);
|
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 = () => {
|
const CloseModal = () => {
|
||||||
setModelQty(false);
|
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) => {
|
const Stockfun = (index) => {
|
||||||
setVarientIndex(index.key);
|
setVarientIndex(index.key);
|
||||||
const variantDetails =
|
const variantDetails =
|
||||||
|
|
@ -1537,7 +1505,14 @@ const BSItemCard = (props) => {
|
||||||
}
|
}
|
||||||
} else if (overallExpStatus === 'Y' && ExpiredProduct) {
|
} else if (overallExpStatus === 'Y' && ExpiredProduct) {
|
||||||
setVarItem(index.key);
|
setVarItem(index.key);
|
||||||
setexpVarModel(true);
|
openExpireModal({
|
||||||
|
title: 'Variant Expires',
|
||||||
|
onOk: () => expVerFun(VarItem),
|
||||||
|
onCancel: () => {
|
||||||
|
setRepeatedModel(false);
|
||||||
|
setProdexpir(false);
|
||||||
|
},
|
||||||
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (
|
if (
|
||||||
|
|
@ -1613,7 +1588,14 @@ const BSItemCard = (props) => {
|
||||||
}
|
}
|
||||||
} else if (overallExpStatus === 'Y' && ExpiredProduct) {
|
} else if (overallExpStatus === 'Y' && ExpiredProduct) {
|
||||||
setVarItem(index.key);
|
setVarItem(index.key);
|
||||||
setexpVarModel(true);
|
openExpireModal({
|
||||||
|
title: 'Variant Expires',
|
||||||
|
onOk: () => expVerFun(VarItem),
|
||||||
|
onCancel: () => {
|
||||||
|
setRepeatedModel(false);
|
||||||
|
setProdexpir(false);
|
||||||
|
},
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1670,16 +1652,6 @@ const BSItemCard = (props) => {
|
||||||
dataTransfer(qtydata, QtyIndex, index.key, 0, onePeiceFlow);
|
dataTransfer(qtydata, QtyIndex, index.key, 0, onePeiceFlow);
|
||||||
}
|
}
|
||||||
} else {
|
} 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 = (
|
const findNextAvailableStockIndex = (
|
||||||
stockDetails,
|
stockDetails,
|
||||||
CartOrderDetails,
|
CartOrderDetails,
|
||||||
|
|
@ -1745,7 +1717,14 @@ const BSItemCard = (props) => {
|
||||||
}
|
}
|
||||||
} else if (overallExpStatus === 'Y' && ExpiredProduct) {
|
} else if (overallExpStatus === 'Y' && ExpiredProduct) {
|
||||||
setVarItem(index.key);
|
setVarItem(index.key);
|
||||||
setexpVarModel(true);
|
openExpireModal({
|
||||||
|
title: 'Variant Expires',
|
||||||
|
onOk: () => expVerFun(VarItem),
|
||||||
|
onCancel: () => {
|
||||||
|
setRepeatedModel(false);
|
||||||
|
setProdexpir(false);
|
||||||
|
},
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
setModelQty(false);
|
setModelQty(false);
|
||||||
|
|
@ -1757,7 +1736,14 @@ const BSItemCard = (props) => {
|
||||||
(item) => item.OverAllExpStatus === 'Y'
|
(item) => item.OverAllExpStatus === 'Y'
|
||||||
);
|
);
|
||||||
if (QtyExpire && ExpiredProduct) {
|
if (QtyExpire && ExpiredProduct) {
|
||||||
setExpQtyModel(true);
|
openExpireModal({
|
||||||
|
title: 'Quantity Expires',
|
||||||
|
onOk: () => expQtyFun(qtyExpData),
|
||||||
|
onCancel: () => {
|
||||||
|
setRepeatedModel(false);
|
||||||
|
(setProdexpir(false),closeExpireModal());
|
||||||
|
},
|
||||||
|
});
|
||||||
setQtyExpData(index);
|
setQtyExpData(index);
|
||||||
} else {
|
} else {
|
||||||
const selectedProIndex = qtydata?.ProductDetail?.findIndex(
|
const selectedProIndex = qtydata?.ProductDetail?.findIndex(
|
||||||
|
|
@ -2023,7 +2009,14 @@ const BSItemCard = (props) => {
|
||||||
} else if (overallExpStatus === 'Y' && repeatedModel) {
|
} else if (overallExpStatus === 'Y' && repeatedModel) {
|
||||||
dataTransfer(qtydata, QtyIndex, VarientIndex, item.key, onePeiceFlow);
|
dataTransfer(qtydata, QtyIndex, VarientIndex, item.key, onePeiceFlow);
|
||||||
} else {
|
} else {
|
||||||
setexpStockModel(true);
|
openExpireModal({
|
||||||
|
title: 'Stock Expires',
|
||||||
|
onOk: () => expStockFun(StockItem),
|
||||||
|
onCancel: () => {
|
||||||
|
setRepeatedModel(false);
|
||||||
|
setProdexpir(false);
|
||||||
|
},
|
||||||
|
});
|
||||||
setStockItem(item.key);
|
setStockItem(item.key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2032,178 +2025,9 @@ const BSItemCard = (props) => {
|
||||||
setRepeatedModel(false);
|
setRepeatedModel(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
const pressTimer = useRef(null);
|
|
||||||
const isLongPress = useRef(false);
|
|
||||||
const [priceChangeProduct, setPriceChangeProduct] = useState([]);
|
const [priceChangeProduct, setPriceChangeProduct] = useState([]);
|
||||||
const [productPriceChange, setProductPriceChange] = useState(false);
|
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) => {
|
const CardOnclick = async (item, Parameter) => {
|
||||||
setOnePeiceFlow(Parameter === 'OnePeiceProduct');
|
setOnePeiceFlow(Parameter === 'OnePeiceProduct');
|
||||||
|
|
||||||
|
|
@ -2223,7 +2047,10 @@ const BSItemCard = (props) => {
|
||||||
Parameter === 'OnePeiceProduct' ? transformedItem : item;
|
Parameter === 'OnePeiceProduct' ? transformedItem : item;
|
||||||
setQtydata(modiffiedData);
|
setQtydata(modiffiedData);
|
||||||
if (modiffiedData.OverAllExpStatus === 'Y' && ExpiredProduct) {
|
if (modiffiedData.OverAllExpStatus === 'Y' && ExpiredProduct) {
|
||||||
setexpModel(true);
|
openExpireModal({
|
||||||
|
title: 'Product Expires',
|
||||||
|
onOk: () => expFun(Item),
|
||||||
|
});
|
||||||
setItem(modiffiedData);
|
setItem(modiffiedData);
|
||||||
} else if (modiffiedData) {
|
} else if (modiffiedData) {
|
||||||
setQtydata(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 calculateTaxAmounts = (qty, rate, taxPercentage) => {
|
||||||
const totalAmount = qty * rate;
|
const totalAmount = qty * rate;
|
||||||
const taxAmount = (
|
const taxAmount = (
|
||||||
|
|
@ -2422,7 +2236,8 @@ const BSItemCard = (props) => {
|
||||||
((cartItem?.OfferModeType && cartItem?.OfferMode === 'B'
|
((cartItem?.OfferModeType && cartItem?.OfferMode === 'B'
|
||||||
? true
|
? true
|
||||||
: cartItem?.OfferMode !== 'B') &&
|
: cartItem?.OfferMode !== 'B') &&
|
||||||
cartItem?.OfferMode !== 'P' && cartItem?.OfferMode !== 'C' &&
|
cartItem?.OfferMode !== 'P' &&
|
||||||
|
cartItem?.OfferMode !== 'C' &&
|
||||||
cartItem?.OfferMode !== 'O' &&
|
cartItem?.OfferMode !== 'O' &&
|
||||||
cartItem?.OfferMode !== 'L'
|
cartItem?.OfferMode !== 'L'
|
||||||
? true
|
? true
|
||||||
|
|
@ -2435,7 +2250,8 @@ const BSItemCard = (props) => {
|
||||||
((cartItem?.OfferModeType && cartItem?.OfferMode === 'B'
|
((cartItem?.OfferModeType && cartItem?.OfferMode === 'B'
|
||||||
? true
|
? true
|
||||||
: cartItem?.OfferMode !== 'B') &&
|
: cartItem?.OfferMode !== 'B') &&
|
||||||
cartItem?.OfferMode !== 'P' && cartItem?.OfferMode !== 'C' &&
|
cartItem?.OfferMode !== 'P' &&
|
||||||
|
cartItem?.OfferMode !== 'C' &&
|
||||||
cartItem?.OfferMode !== 'O' &&
|
cartItem?.OfferMode !== 'O' &&
|
||||||
cartItem?.OfferMode !== 'L'
|
cartItem?.OfferMode !== 'L'
|
||||||
? true
|
? true
|
||||||
|
|
@ -2451,7 +2267,8 @@ const BSItemCard = (props) => {
|
||||||
((cartItem?.OfferModeType && cartItem?.OfferMode === 'B'
|
((cartItem?.OfferModeType && cartItem?.OfferMode === 'B'
|
||||||
? true
|
? true
|
||||||
: cartItem?.OfferMode !== 'B') &&
|
: cartItem?.OfferMode !== 'B') &&
|
||||||
cartItem?.OfferMode !== 'P' && cartItem?.OfferMode !== 'C' &&
|
cartItem?.OfferMode !== 'P' &&
|
||||||
|
cartItem?.OfferMode !== 'C' &&
|
||||||
cartItem?.OfferMode !== 'O' &&
|
cartItem?.OfferMode !== 'O' &&
|
||||||
cartItem?.OfferMode !== 'L'
|
cartItem?.OfferMode !== 'L'
|
||||||
? true
|
? true
|
||||||
|
|
@ -2466,7 +2283,8 @@ const BSItemCard = (props) => {
|
||||||
((cartItem?.OfferModeType && cartItem?.OfferMode === 'B'
|
((cartItem?.OfferModeType && cartItem?.OfferMode === 'B'
|
||||||
? true
|
? true
|
||||||
: cartItem?.OfferMode !== 'B') &&
|
: cartItem?.OfferMode !== 'B') &&
|
||||||
cartItem?.OfferMode !== 'P' && cartItem?.OfferMode !== 'C' &&
|
cartItem?.OfferMode !== 'P' &&
|
||||||
|
cartItem?.OfferMode !== 'C' &&
|
||||||
cartItem?.OfferMode !== 'O' &&
|
cartItem?.OfferMode !== 'O' &&
|
||||||
cartItem?.OfferMode !== 'L'
|
cartItem?.OfferMode !== 'L'
|
||||||
? true
|
? true
|
||||||
|
|
@ -2800,9 +2618,12 @@ const BSItemCard = (props) => {
|
||||||
|
|
||||||
const UpdatedCartItemWithOffer = {
|
const UpdatedCartItemWithOffer = {
|
||||||
...item,
|
...item,
|
||||||
Offer: (sameProduct || bestOffer?.OfferMode === 'I' || bestOffer?.OfferMode === 'Q')
|
Offer:
|
||||||
? (bestOffer?.OfferAmount || item.Offer)
|
sameProduct ||
|
||||||
: (item.Offer || bestOffer?.OfferAmount),
|
bestOffer?.OfferMode === 'I' ||
|
||||||
|
bestOffer?.OfferMode === 'Q'
|
||||||
|
? bestOffer?.OfferAmount || item.Offer
|
||||||
|
: item.Offer || bestOffer?.OfferAmount,
|
||||||
OfferType: item?.OfferType || bestOffer?.OfferType,
|
OfferType: item?.OfferType || bestOffer?.OfferType,
|
||||||
OfferMessage: item?.OfferMessage || bestOffer?.OfferMessage,
|
OfferMessage: item?.OfferMessage || bestOffer?.OfferMessage,
|
||||||
OfferMode: item?.OfferMode || bestOffer?.OfferMode,
|
OfferMode: item?.OfferMode || bestOffer?.OfferMode,
|
||||||
|
|
@ -2817,7 +2638,8 @@ const BSItemCard = (props) => {
|
||||||
((c?.OfferModeType && c?.OfferMode === 'B'
|
((c?.OfferModeType && c?.OfferMode === 'B'
|
||||||
? true
|
? true
|
||||||
: c?.OfferMode !== 'B') &&
|
: c?.OfferMode !== 'B') &&
|
||||||
c?.OfferMode !== 'P' && c?.OfferMode !== 'C' &&
|
c?.OfferMode !== 'P' &&
|
||||||
|
c?.OfferMode !== 'C' &&
|
||||||
c?.OfferMode !== 'O' &&
|
c?.OfferMode !== 'O' &&
|
||||||
c?.OfferMode !== 'L'
|
c?.OfferMode !== 'L'
|
||||||
? true
|
? true
|
||||||
|
|
@ -3134,7 +2956,6 @@ const BSItemCard = (props) => {
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(Postdata, 'Postdata');
|
|
||||||
const response = await dispatch(
|
const response = await dispatch(
|
||||||
bulkpostdata({ ProdDetails: Postdata })
|
bulkpostdata({ ProdDetails: Postdata })
|
||||||
).unwrap();
|
).unwrap();
|
||||||
|
|
@ -5303,7 +5124,8 @@ const BSItemCard = (props) => {
|
||||||
setVarItem(0);
|
setVarItem(0);
|
||||||
SingleQuantity(item, onePeiceFlow);
|
SingleQuantity(item, onePeiceFlow);
|
||||||
}
|
}
|
||||||
setexpModel(false);
|
|
||||||
|
closeExpireModal();
|
||||||
setProdexpir(true);
|
setProdexpir(true);
|
||||||
setQtydata(item);
|
setQtydata(item);
|
||||||
};
|
};
|
||||||
|
|
@ -5409,7 +5231,7 @@ const BSItemCard = (props) => {
|
||||||
|
|
||||||
setQtyIndex(selectedProIndex);
|
setQtyIndex(selectedProIndex);
|
||||||
setRepeatedModel(true);
|
setRepeatedModel(true);
|
||||||
setExpQtyModel(false);
|
closeExpireModal()
|
||||||
};
|
};
|
||||||
|
|
||||||
const expVerFun = (item) => {
|
const expVerFun = (item) => {
|
||||||
|
|
@ -5426,12 +5248,12 @@ const BSItemCard = (props) => {
|
||||||
setModelQty(false);
|
setModelQty(false);
|
||||||
setSelectedBrand('Others');
|
setSelectedBrand('Others');
|
||||||
}
|
}
|
||||||
setexpVarModel(false);
|
closeExpireModal();
|
||||||
};
|
};
|
||||||
|
|
||||||
const expStockFun = (item) => {
|
const expStockFun = (item) => {
|
||||||
dataTransfer(qtydata, QtyIndex, VarientIndex, item, onePeiceFlow);
|
dataTransfer(qtydata, QtyIndex, VarientIndex, item, onePeiceFlow);
|
||||||
setexpStockModel(false);
|
closeExpireModal();
|
||||||
};
|
};
|
||||||
|
|
||||||
const getMaxBrandWidth = () => {
|
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'
|
// Example usage for checking the length of 'ProdVariantDetails'
|
||||||
const widthBasedOnProdVariantDetails = getMaxBrandWidth();
|
const widthBasedOnProdVariantDetails = getMaxBrandWidth();
|
||||||
|
|
@ -7433,7 +7245,12 @@ const BSItemCard = (props) => {
|
||||||
</SortableContext>
|
</SortableContext>
|
||||||
</DndContext>
|
</DndContext>
|
||||||
</>
|
</>
|
||||||
) : ProductSearch?.length > 5 &&
|
)
|
||||||
|
|
||||||
|
|
||||||
|
: ProductSearch?.length > 5 && GetmultipleSearchDatas.some(
|
||||||
|
e => e.toLowerCase() === "qrcode"
|
||||||
|
) &&
|
||||||
(cardData?.length == 0 || cardData == undefined) ? (
|
(cardData?.length == 0 || cardData == undefined) ? (
|
||||||
<div>
|
<div>
|
||||||
{/* cardData mohan 18-04-2025 */}
|
{/* cardData mohan 18-04-2025 */}
|
||||||
|
|
@ -7502,107 +7319,19 @@ const BSItemCard = (props) => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{expModel && (
|
{expireModal?.open && (
|
||||||
<Modal
|
<ExpireConfirmModal
|
||||||
title={
|
open={expireModal?.open}
|
||||||
<div
|
title={expireModal?.title}
|
||||||
style={{ display: 'flex', gap: '1rem', flexDirection: 'row' }}
|
onOk={() => {
|
||||||
>
|
expireModal.onOk?.();
|
||||||
<div>
|
closeExpireModal();
|
||||||
<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));
|
|
||||||
}}
|
}}
|
||||||
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={() => {
|
onCancel={() => {
|
||||||
(setexpVarModel(false),
|
expireModal.onCancel?.();
|
||||||
setRepeatedModel(false),
|
closeExpireModal();
|
||||||
setProdexpir(false));
|
|
||||||
}}
|
}}
|
||||||
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 && (
|
{modelQty && (
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,8 @@ import {
|
||||||
changeCardData,
|
changeCardData,
|
||||||
GlobaldraggingComponent,
|
GlobaldraggingComponent,
|
||||||
GlobalCombocarddata,
|
GlobalCombocarddata,
|
||||||
|
GlobalGetmultipleSearchDatas,
|
||||||
|
getmultipleSearch,
|
||||||
} from '../../../../Features/BookingScreen/BookingData/BookingData';
|
} from '../../../../Features/BookingScreen/BookingData/BookingData';
|
||||||
import {
|
import {
|
||||||
GlobalPreOrderAdditem,
|
GlobalPreOrderAdditem,
|
||||||
|
|
@ -183,6 +185,7 @@ const BSOtherServiceItemCard = (props) => {
|
||||||
SelectedGlobalCardColorDetail,
|
SelectedGlobalCardColorDetail,
|
||||||
shallowEqual
|
shallowEqual
|
||||||
);
|
);
|
||||||
|
const GetmultipleSearchDatas = useSelector(GlobalGetmultipleSearchDatas, shallowEqual)
|
||||||
const SelectedCardFont = useSelector(SelectedGlobalCardFont, shallowEqual);
|
const SelectedCardFont = useSelector(SelectedGlobalCardFont, shallowEqual);
|
||||||
const CartOrderDetails = useSelector(GlobalOrderCardDetails, shallowEqual);
|
const CartOrderDetails = useSelector(GlobalOrderCardDetails, shallowEqual);
|
||||||
console.log(CartOrderDetails, "CartOrderDetailsOTHERSERVICESITEMCARD");
|
console.log(CartOrderDetails, "CartOrderDetailsOTHERSERVICESITEMCARD");
|
||||||
|
|
@ -269,11 +272,25 @@ const BSOtherServiceItemCard = (props) => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (AppId && CompId && BranchId) {
|
if (AppId && CompId && BranchId) {
|
||||||
fetchedit();
|
fetchedit();
|
||||||
|
GetmultipleSearchData()
|
||||||
}
|
}
|
||||||
|
|
||||||
// dispatch(changepreOrder(false)); Commented to Add Normal Produts After Adding the Combo Pack !!!!!! Dont Touch Without Shifayath Permission
|
// dispatch(changepreOrder(false)); Commented to Add Normal Produts After Adding the Combo Pack !!!!!! Dont Touch Without Shifayath Permission
|
||||||
}, [AppId, CompId, BranchId]);
|
}, [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(() => {
|
useEffect(() => {
|
||||||
setPreOrderSelectedProdNames([]);
|
setPreOrderSelectedProdNames([]);
|
||||||
// dispatch(changePreOrderAdditem(null));
|
// dispatch(changePreOrderAdditem(null));
|
||||||
|
|
@ -290,10 +307,13 @@ const BSOtherServiceItemCard = (props) => {
|
||||||
if (noSubcatCardData) {
|
if (noSubcatCardData) {
|
||||||
setNoSubcatCardData();
|
setNoSubcatCardData();
|
||||||
}
|
}
|
||||||
if (ProductSearch?.length > 5) {
|
if (ProductSearch?.length > 5 && GetmultipleSearchDatas.some(
|
||||||
|
e => e.toLowerCase() === "qrcode"
|
||||||
|
)) {
|
||||||
setQuickAdd(true);
|
setQuickAdd(true);
|
||||||
}
|
}
|
||||||
}, [ProductSearch]);
|
|
||||||
|
}, [ProductSearch, GetmultipleSearchDatas]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (
|
if (
|
||||||
|
|
@ -4493,7 +4513,9 @@ console.log("AddOrderDetails item",item)
|
||||||
</SortableContext>
|
</SortableContext>
|
||||||
</DndContext>
|
</DndContext>
|
||||||
</>
|
</>
|
||||||
) : ProductSearch?.length > 5 &&
|
) : ProductSearch?.length > 5 && GetmultipleSearchDatas.some(
|
||||||
|
e => e.toLowerCase() === "qrcode"
|
||||||
|
) &&
|
||||||
(cardData?.length == 0 || cardData == undefined) ? (
|
(cardData?.length == 0 || cardData == undefined) ? (
|
||||||
<div>
|
<div>
|
||||||
{/* cardData mohan 18-04-2025 */}
|
{/* cardData mohan 18-04-2025 */}
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,8 @@ import {
|
||||||
slotTimeStatus,
|
slotTimeStatus,
|
||||||
changeAddBookingDetailsTrigger,
|
changeAddBookingDetailsTrigger,
|
||||||
GlobalAddBookingDetailsTrigger,
|
GlobalAddBookingDetailsTrigger,
|
||||||
|
GlobalGetmultipleSearchDatas,
|
||||||
|
getmultipleSearch,
|
||||||
} from '../../../../Features/BookingScreen/BookingData/BookingData';
|
} from '../../../../Features/BookingScreen/BookingData/BookingData';
|
||||||
import {
|
import {
|
||||||
GlobalPreOrderAdditem,
|
GlobalPreOrderAdditem,
|
||||||
|
|
@ -216,6 +218,7 @@ const BsBookingitemCard = (props) => {
|
||||||
shallowEqual
|
shallowEqual
|
||||||
);
|
);
|
||||||
// const SelectedCust = useSelector(GlobalSelOption, shallowEqual);
|
// const SelectedCust = useSelector(GlobalSelOption, shallowEqual);
|
||||||
|
const GetmultipleSearchDatas = useSelector(GlobalGetmultipleSearchDatas, shallowEqual)
|
||||||
const RetailWSSalesType = useSelector(GlobalRetailWSSalesType, shallowEqual);
|
const RetailWSSalesType = useSelector(GlobalRetailWSSalesType, shallowEqual);
|
||||||
// const CustDetails = SelectedCust ? SelectedCust : AddCustomerDetails?.[0];
|
// const CustDetails = SelectedCust ? SelectedCust : AddCustomerDetails?.[0];
|
||||||
const BookingTypeBoth = useSelector(GlobalBookingTypeBoth);
|
const BookingTypeBoth = useSelector(GlobalBookingTypeBoth);
|
||||||
|
|
@ -1090,10 +1093,25 @@ const BsBookingitemCard = (props) => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (AppId && CompId && BranchId) {
|
if (AppId && CompId && BranchId) {
|
||||||
fetchedit();
|
fetchedit();
|
||||||
|
GetmultipleSearchData()
|
||||||
}
|
}
|
||||||
|
|
||||||
// dispatch(changepreOrder(false)); Commented to Add Normal Produts After Adding the Combo Pack !!!!!! Dont Touch Without Shifayath Permission
|
// dispatch(changepreOrder(false)); Commented to Add Normal Produts After Adding the Combo Pack !!!!!! Dont Touch Without Shifayath Permission
|
||||||
}, [AppId, CompId, BranchId]);
|
}, [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(() => {
|
useEffect(() => {
|
||||||
setPreOrderSelectedProdNames([]);
|
setPreOrderSelectedProdNames([]);
|
||||||
// dispatch(changePreOrderAdditem(null));
|
// dispatch(changePreOrderAdditem(null));
|
||||||
|
|
@ -1126,10 +1144,12 @@ const BsBookingitemCard = (props) => {
|
||||||
if (noSubcatCardData) {
|
if (noSubcatCardData) {
|
||||||
setNoSubcatCardData();
|
setNoSubcatCardData();
|
||||||
}
|
}
|
||||||
if (ProductSearch?.length > 5) {
|
if (ProductSearch?.length > 5 && GetmultipleSearchDatas.some(
|
||||||
|
e => e.toLowerCase() === "qrcode"
|
||||||
|
)) {
|
||||||
setQuickAdd(true);
|
setQuickAdd(true);
|
||||||
}
|
}
|
||||||
}, [ProductSearch]);
|
}, [ProductSearch, GetmultipleSearchDatas]);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (
|
if (
|
||||||
!initialRun &&
|
!initialRun &&
|
||||||
|
|
@ -5340,7 +5360,9 @@ const BsBookingitemCard = (props) => {
|
||||||
</SortableContext>
|
</SortableContext>
|
||||||
</DndContext>
|
</DndContext>
|
||||||
</>
|
</>
|
||||||
) : ProductSearch?.length > 5 &&
|
) : ProductSearch?.length > 5 && GetmultipleSearchDatas.some(
|
||||||
|
e => e.toLowerCase() === "qrcode"
|
||||||
|
) &&
|
||||||
(cardData?.length == 0 || cardData == undefined) ? (
|
(cardData?.length == 0 || cardData == undefined) ? (
|
||||||
<div>
|
<div>
|
||||||
{/* cardData mohan 18-04-2025 */}
|
{/* cardData mohan 18-04-2025 */}
|
||||||
|
|
@ -6072,8 +6094,7 @@ const BsBookingitemCard = (props) => {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
key={idx}
|
key={idx}
|
||||||
className={`slotTimingSelect ${
|
className={`slotTimingSelect ${isBooked
|
||||||
isBooked
|
|
||||||
? 'booked'
|
? 'booked'
|
||||||
: isAlreadyAdded
|
: isAlreadyAdded
|
||||||
? 'incart'
|
? '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 React, { useEffect, useState } from "react";
|
||||||
import { getSession } from "../../../../Services/Others";
|
import { getSession } from "../../../../Services/Others";
|
||||||
import { useDispatch } from "react-redux";
|
import { shallowEqual, useDispatch, useSelector } from "react-redux";
|
||||||
import {
|
import {
|
||||||
getmultipleSearch,
|
getmultipleSearch,
|
||||||
|
GlobalGetmultipleSearchDatas,
|
||||||
PostProductSearch,
|
PostProductSearch,
|
||||||
} from "../../../../Features/BookingScreen/BookingData/BookingData";
|
} from "../../../../Features/BookingScreen/BookingData/BookingData";
|
||||||
import Buttons from "../../../../Components/Forms/Buttons";
|
import Buttons from "../../../../Components/Forms/Buttons";
|
||||||
|
|
@ -12,6 +13,7 @@ const MultipleSearch = ({ close }) => {
|
||||||
const BranchId = getSession("BranchId");
|
const BranchId = getSession("BranchId");
|
||||||
const AppId = getSession("AppId");
|
const AppId = getSession("AppId");
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
|
const GetmultipleSearchDatas = useSelector(GlobalGetmultipleSearchDatas, shallowEqual)
|
||||||
|
|
||||||
const options = [
|
const options = [
|
||||||
{ label: "Product Name", value: "ProdName" },
|
{ label: "Product Name", value: "ProdName" },
|
||||||
|
|
@ -29,7 +31,8 @@ const MultipleSearch = ({ close }) => {
|
||||||
console.log(selectedValues, "selectedValuesselectedValues");
|
console.log(selectedValues, "selectedValuesselectedValues");
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
GetmultipleSearchData();
|
// GetmultipleSearchData();
|
||||||
|
setSelectedValues(GetmultipleSearchDatas)
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const postMultipleSearch = async () => {
|
const postMultipleSearch = async () => {
|
||||||
|
|
@ -47,6 +50,7 @@ const MultipleSearch = ({ close }) => {
|
||||||
const response = await dispatch(PostProductSearch(data)).unwrap();
|
const response = await dispatch(PostProductSearch(data)).unwrap();
|
||||||
console.log("Search Response:", response);
|
console.log("Search Response:", response);
|
||||||
if (response?.data?.statusCode == 1) {
|
if (response?.data?.statusCode == 1) {
|
||||||
|
GetmultipleSearchData();
|
||||||
setSelectedValues("");
|
setSelectedValues("");
|
||||||
close(false);
|
close(false);
|
||||||
}
|
}
|
||||||
|
|
@ -63,21 +67,12 @@ const MultipleSearch = ({ close }) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
try {
|
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) {
|
} catch (error) {
|
||||||
console.error("Get Search Terms Error:", error);
|
console.error("Get Search Terms Error:", error);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div
|
<div
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,9 @@ const ShortcutKeyHelper = ({ }) => {
|
||||||
{ key: 'Alt + W', description: 'Hold and Recall' },
|
{ key: 'Alt + W', description: 'Hold and Recall' },
|
||||||
{ key: 'Ctrl + Q', description: 'Qty Change' },
|
{ key: 'Ctrl + Q', description: 'Qty Change' },
|
||||||
{ key: 'Ctrl + E', description: 'Price 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' },
|
{ key: 'Ctrl + I', description: 'Customer Rate History' },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -543,10 +543,10 @@ export default function BSCombo1() {
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
{preferenceshortcutkey && (
|
{/* {preferenceshortcutkey && (
|
||||||
<div className="keyboardShortcut">
|
<div className="keyboardShortcut">
|
||||||
<ShortcutKeyHelper />
|
<ShortcutKeyHelper />
|
||||||
</div>)}
|
</div>)} */}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/* </div> */}
|
{/* </div> */}
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,13 @@ const SalesCountComponent = React.memo(
|
||||||
type?.PreferredSubCatName?.toLowerCase() === 'take away' &&
|
type?.PreferredSubCatName?.toLowerCase() === 'take away' &&
|
||||||
type?.PreferredStatus === 'Y'
|
type?.PreferredStatus === 'Y'
|
||||||
);
|
);
|
||||||
|
const preferenceshortcutkey = preferencedata?.[0]?.[
|
||||||
|
'SettingDtlDetails'
|
||||||
|
]?.some(
|
||||||
|
(item) =>
|
||||||
|
item.SettingIdName.toLowerCase() === 'shortcutkeys' &&
|
||||||
|
item.SettingValue === 'Y'
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
const [messageType, setMessageType] = useState(null);
|
const [messageType, setMessageType] = useState(null);
|
||||||
|
|
@ -1085,6 +1092,11 @@ const SalesCountComponent = React.memo(
|
||||||
)}
|
)}
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
{/* {preferenceshortcutkey && <ShortcutKeyHelper />} */}
|
||||||
|
{preferenceshortcutkey && (
|
||||||
|
<div className="keyboardShortcut">
|
||||||
|
<ShortcutKeyHelper />
|
||||||
|
</div>)}
|
||||||
<AllSalesPageSettings />
|
<AllSalesPageSettings />
|
||||||
<ProductPriceChange />
|
<ProductPriceChange />
|
||||||
<ReceivedStocksModal
|
<ReceivedStocksModal
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -4035,7 +4035,7 @@ const ProductForm = ({ formType }) => {
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div className="submitButton">
|
<div className="ProductSubBTN">
|
||||||
<Buttons
|
<Buttons
|
||||||
buttonText="SUBMIT"
|
buttonText="SUBMIT"
|
||||||
color="901D77"
|
color="901D77"
|
||||||
|
|
|
||||||
|
|
@ -2029,125 +2029,190 @@ const ProductList = () => {
|
||||||
formRef?.current?.resetFields();
|
formRef?.current?.resetFields();
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleCancel = () => {
|
|
||||||
|
|
||||||
|
|
||||||
|
const handleResetExcelData = useCallback(() => {
|
||||||
|
dispatch(emptyExcelData());
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
const handleCancel = useCallback(() => {
|
||||||
setOpenExcel(false);
|
setOpenExcel(false);
|
||||||
handleResetExcelData();
|
handleResetExcelData();
|
||||||
};
|
}, [handleResetExcelData]);
|
||||||
|
|
||||||
const openModal = () => {
|
const openModal = useCallback(() => {
|
||||||
setOpenExcel(true);
|
setOpenExcel(true);
|
||||||
};
|
}, []);
|
||||||
|
const handleSubmitbulk = useCallback((excelData) => {
|
||||||
const handleResetExcelData = () => {
|
|
||||||
dispatch(emptyExcelData());
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleSubmitbulk = (excelData) => {
|
|
||||||
setExceldatasubmit(excelData?.filter((e) => e?.isModified));
|
setExceldatasubmit(excelData?.filter((e) => e?.isModified));
|
||||||
};
|
}, []);
|
||||||
|
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = useCallback(async () => {
|
||||||
setBulkpost(true);
|
setBulkpost(true);
|
||||||
let FilterData = Exceldatasubmit?.filter((a) => a['ProductName'] != '');
|
|
||||||
|
|
||||||
if (FilterData && FilterData.length > 0) {
|
const FilterData = Exceldatasubmit?.filter(
|
||||||
const formattedData = FilterData?.map((data) => ({
|
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'),
|
AppId: getSession('AppId'),
|
||||||
CompId: getSession('CompId'),
|
CompId: getSession('CompId'),
|
||||||
BranchId: getSession('BranchId'),
|
BranchId: getSession('BranchId'),
|
||||||
CreatedBy: getSession('UserId'),
|
CreatedBy: getSession('UserId'),
|
||||||
|
|
||||||
ProdName: data?.ProductName,
|
ProdName: data.ProductName,
|
||||||
ProdVariantName: data?.ProductVariantName,
|
ProdVariantName: data.ProductVariantName,
|
||||||
Size: data?.Quantity,
|
Size: data.Quantity,
|
||||||
UOM: data?.UOM,
|
UOM: data.UOM,
|
||||||
MRP: data?.MRP,
|
MRP: data.MRP,
|
||||||
WhSalePrice: data?.WhSalePrice,
|
WhSalePrice: data.WhSalePrice,
|
||||||
SellPrice: data?.SellPrice,
|
SellPrice: data.SellPrice,
|
||||||
ProdCat: data?.Category ? data?.Category : 'General',
|
ProdCat: data.Category || 'General',
|
||||||
ProdSubCat: data?.SubCategory,
|
ProdSubCat: data.SubCategory,
|
||||||
Brand: data?.Brand ? data?.Brand : '',
|
Brand: data.Brand || '',
|
||||||
AutoGenerateQr: data?.AutoGenerateQrcode
|
AutoGenerateQr: data.AutoGenerateQrcode || 'No',
|
||||||
? data?.AutoGenerateQrcode
|
QRCode: data.AddQrCode,
|
||||||
: 'No',
|
StockAvailable: data.StockAvailable || 'No',
|
||||||
QRCode: data?.AddQrCode,
|
TaxId: data.Tax || 'NIL - 0%',
|
||||||
StockAvailable: data?.StockAvailable ? data?.StockAvailable : 'No',
|
Cess: data.Cess,
|
||||||
TaxId: data?.Tax ? data?.Tax : 'NIL - 0%',
|
HSNCode: data.HSN,
|
||||||
Cess: data?.Cess,
|
PartNumber: data.PartNumber,
|
||||||
HSNCode: data?.HSN,
|
Rack: data.Rack,
|
||||||
PartNumber: data?.PartNumber,
|
ManufDate: moment(data.ManufactureDate, ['M/D/YY']).format(
|
||||||
Rack: data?.Rack,
|
|
||||||
ManufDate: moment(data?.ManufactureDate, ['M/D/YY']).format(
|
|
||||||
'YYYY-MM-DDTHH:mm:ss'
|
'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'
|
'YYYY-MM-DDTHH:mm:ss'
|
||||||
),
|
),
|
||||||
AvailableFrom: data?.AvailableFrom
|
AvailableFrom: data.AvailableFrom
|
||||||
? moment(data?.AvailableFrom, ['M/D/YY']).format('HH:mm:ss')
|
? moment(data.AvailableFrom, ['M/D/YY']).format('HH:mm:ss')
|
||||||
: '',
|
: '',
|
||||||
AvailableTo: data?.AvailableTo
|
AvailableTo: data.AvailableTo
|
||||||
? moment(data?.AvailableTo, ['M/D/YY']).format('HH:mm:ss')
|
? moment(data.AvailableTo, ['M/D/YY']).format('HH:mm:ss')
|
||||||
: '',
|
: '',
|
||||||
OnePcsAvailable: data?.Amountperpiece ? data?.Amountperpiece : 'No',
|
OnePcsAvailable: data.Amountperpiece || 'No',
|
||||||
OnePcsPrice: data?.AmountperpiecePrice,
|
OnePcsPrice: data.AmountperpiecePrice,
|
||||||
// NoOfPcs:data?.NumberOfPieceInside,
|
AutoGenerateSingleQr: data.AutoGenerateOnePieceQrcode || 'No',
|
||||||
AutoGenerateSingleQr: data?.AutoGenerateOnePieceQrcode
|
OnePcQR: data.AutoGenerateOnePieceQrcodeNumber,
|
||||||
? data?.AutoGenerateOnePieceQrcode
|
TokenAvailable: data.TokenAvailable || 'No',
|
||||||
: 'No',
|
ProdLogo: data.Productimage,
|
||||||
OnePcQR: data?.AutoGenerateOnePieceQrcodeNumber,
|
|
||||||
// ProductType:data?.ProductType,
|
|
||||||
TokenAvailable: data?.TokenAvailable ? data?.TokenAvailable : 'No',
|
|
||||||
ProdLogo: data?.Productimage,
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
let postDatas = { prodDetails: formattedData };
|
const postDatas = { prodDetails: formattedData };
|
||||||
|
|
||||||
let response = await dispatch(bulkpostdata(postDatas)).unwrap();
|
const response = await dispatch(bulkpostdata(postDatas)).unwrap();
|
||||||
if (response?.data?.statusCode == 1) {
|
|
||||||
|
if (response?.data?.statusCode === 1) {
|
||||||
setMessageType('success');
|
setMessageType('success');
|
||||||
setMessageData(response?.data?.response);
|
setMessageData(response.data.response);
|
||||||
setBulkpost(false);
|
|
||||||
setpage(1);
|
setpage(1);
|
||||||
|
|
||||||
var responseData = await dispatch(
|
const responseData = await dispatch(
|
||||||
getProductDataPageNo({ CompId, BranchId, AppId, PageNumber: 1 })
|
getProductDataPageNo({ CompId, BranchId, AppId, PageNumber: 1 })
|
||||||
).unwrap();
|
).unwrap();
|
||||||
setCurrentPage(1);
|
|
||||||
|
|
||||||
if (responseData?.data?.statusCode === 1) {
|
if (responseData?.data?.statusCode === 1) {
|
||||||
setCachedData({ [currentPage]: responseData?.data?.data });
|
setCachedData({ 1: responseData.data.data });
|
||||||
setproductData(responseData?.data?.data);
|
setproductData(responseData.data.data);
|
||||||
|
setCurrentPage(1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
setMessageType('error');
|
setMessageType('error');
|
||||||
setMessageData(responseData?.data?.response);
|
setMessageData(response?.data?.response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setBulkpost(false);
|
||||||
handleResetExcelData();
|
handleResetExcelData();
|
||||||
handleCancel();
|
handleCancel();
|
||||||
} else {
|
}, [
|
||||||
setBulkpost(false);
|
Exceldatasubmit,
|
||||||
setMessageType('error');
|
|
||||||
setMessageData('No data to submit. Please upload an Excel file.');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const Unit = UomPreference?.map((e) => e.ConfigName);
|
CompId,
|
||||||
const CategoryId = ProdCatData?.map((e) => e.ConfigId);
|
BranchId,
|
||||||
const CategoryNames = ProdCatData?.map((e) => e.ConfigName);
|
AppId,
|
||||||
const CatconfigId = ProdCatData?.map((e) => e.ConfigId);
|
handleResetExcelData,
|
||||||
const Subcatnames = subCatData?.map((e) => e.ConfigName);
|
handleCancel
|
||||||
const SubcatId = subCatData?.map((e) => e.ConfigId);
|
]);
|
||||||
const SubcatNumFId = subCatData?.map((e) => e.NumFId);
|
|
||||||
const BrandNumFId = allBrandData?.map((e) => e.NumFId);
|
const Unit = useMemo(
|
||||||
const BrandId = allBrandData?.map((e) => e.ConfigId);
|
() => UomPreference?.map((e) => e.ConfigName),
|
||||||
const BrandName = allBrandData?.map((e) => e.ConfigName);
|
[UomPreference]
|
||||||
const SuplierNames = SupplierData?.map((e) => e.SuppName);
|
);
|
||||||
const TaxDatas = TaxData?.map((e) => e.TaxIdName);
|
|
||||||
const TaxData1 = TaxData?.map((e) => e.TaxPercentage);
|
const CategoryId = useMemo(
|
||||||
const combinedTaxData = TaxDatas?.map(
|
() => 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]}%`
|
(taxIdName, index) => `${taxIdName} - ${TaxData1[index]}%`
|
||||||
|
),
|
||||||
|
[TaxDatas, TaxData1]
|
||||||
);
|
);
|
||||||
const Deletebulk = async () => {
|
const Deletebulk = async () => {
|
||||||
let data = {
|
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;
|
color: #fff;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
border: 1px solid;
|
border: 1px solid;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
width: 170px;
|
width: 170px;
|
||||||
height: 45px;
|
height: 45px;
|
||||||
background-color: var(--PRIMARY_BUTTON_BG_COLOR) !important;
|
background-color: var(--PRIMARY_BUTTON_BG_COLOR) !important;
|
||||||
|
|
@ -42,10 +38,6 @@
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.Counter-Category-mapping {
|
.Counter-Category-mapping {
|
||||||
|
|
@ -198,7 +190,7 @@
|
||||||
.edit-btn,
|
.edit-btn,
|
||||||
.remove-btn {
|
.remove-btn {
|
||||||
border: none;
|
border: none;
|
||||||
font-family: 'Poppins';
|
font-family: "Poppins";
|
||||||
padding: 4px 10px;
|
padding: 4px 10px;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
@ -223,7 +215,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.address-type-section {
|
.address-type-section {
|
||||||
|
|
||||||
// padding: 12px;
|
// padding: 12px;
|
||||||
// background-color: #f8fafc;
|
// background-color: #f8fafc;
|
||||||
// border-radius: 8px;
|
// border-radius: 8px;
|
||||||
|
|
@ -584,7 +575,7 @@
|
||||||
button {
|
button {
|
||||||
padding: 14px 18px;
|
padding: 14px 18px;
|
||||||
border: none;
|
border: none;
|
||||||
font-family: 'Poppins', sans-serif;
|
font-family: "Poppins", sans-serif;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
@ -718,7 +709,7 @@
|
||||||
.add-slot-header {
|
.add-slot-header {
|
||||||
font-size: 25px;
|
font-size: 25px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-family: 'Gilroy';
|
font-family: "Gilroy";
|
||||||
padding-bottom: 6px;
|
padding-bottom: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -744,7 +735,7 @@
|
||||||
.swicthCardScanToggle {
|
.swicthCardScanToggle {
|
||||||
button {
|
button {
|
||||||
background-color: #1292ee !important;
|
background-color: #1292ee !important;
|
||||||
font-family: 'Poppins';
|
font-family: "Poppins";
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -756,7 +747,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.searched-value {
|
.searched-value {
|
||||||
font-family: 'Poppins';
|
font-family: "Poppins";
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -764,7 +755,8 @@
|
||||||
scrollbar-width: thin;
|
scrollbar-width: thin;
|
||||||
padding-right: 8px;
|
padding-right: 8px;
|
||||||
|
|
||||||
@media (max-width: 600px) {}
|
@media (max-width: 600px) {
|
||||||
|
}
|
||||||
|
|
||||||
.ant-table-thead {
|
.ant-table-thead {
|
||||||
&:hover {
|
&:hover {
|
||||||
|
|
@ -915,14 +907,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-notes {
|
.table-notes {
|
||||||
font-family: 'Poppins';
|
font-family: "Poppins";
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-table table {
|
.ant-table table {
|
||||||
border-spacing: 0 !important;
|
border-spacing: 0 !important;
|
||||||
font-family: 'Poppins';
|
font-family: "Poppins";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -956,13 +948,13 @@
|
||||||
table {
|
table {
|
||||||
thead {
|
thead {
|
||||||
th {
|
th {
|
||||||
font-family: 'Gilroy' !important;
|
font-family: "Gilroy" !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tbody {
|
tbody {
|
||||||
td {
|
td {
|
||||||
font-family: 'Poppins' !important;
|
font-family: "Poppins" !important;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
|
|
@ -1416,8 +1408,7 @@ table {
|
||||||
p {
|
p {
|
||||||
width: 15px;
|
width: 15px;
|
||||||
height: 15px;
|
height: 15px;
|
||||||
background-color: #C00000;
|
background-color: #c00000;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
span {
|
span {
|
||||||
|
|
@ -1433,7 +1424,7 @@ table {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 6px;
|
gap: 6px;
|
||||||
background-color: #1292EE;
|
background-color: #1292ee;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-family: "Poppins";
|
font-family: "Poppins";
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
|
@ -1487,14 +1478,14 @@ table {
|
||||||
|
|
||||||
.tab-item:hover {
|
.tab-item:hover {
|
||||||
background: #f5f5f5;
|
background: #f5f5f5;
|
||||||
color: #901D77;
|
color: #901d77;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-item.active {
|
.tab-item.active {
|
||||||
display: flex;
|
display: flex;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
color: #901D77;
|
color: #901d77;
|
||||||
border-color: #901D77;
|
border-color: #901d77;
|
||||||
border-bottom: 2px solid #fff;
|
border-bottom: 2px solid #fff;
|
||||||
margin-bottom: -2px;
|
margin-bottom: -2px;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
|
@ -1503,7 +1494,7 @@ table {
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-item.active::after {
|
.tab-item.active::after {
|
||||||
content: '';
|
content: "";
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: -2px;
|
bottom: -2px;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
|
@ -1528,5 +1519,45 @@ table {
|
||||||
color: #c00000;
|
color: #c00000;
|
||||||
font-weight: 500;
|
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 {
|
.cropUploadFieldSmall {
|
||||||
|
:where(.css-dev-only-do-not-override-1v5z42l).ant-upload-wrapper.ant-upload-picture-card-wrapper
|
||||||
: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,
|
.ant-upload-list.ant-upload-list-picture-card
|
||||||
: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,
|
.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
|
||||||
: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 {
|
.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;
|
width: 65px;
|
||||||
height: 65px;
|
height: 65px;
|
||||||
}
|
}
|
||||||
|
|
@ -45,7 +52,7 @@
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #000000;
|
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 {
|
& .ant-form-item .ant-form-item-explain-error {
|
||||||
font-weight: 400 !important;
|
font-weight: 400 !important;
|
||||||
|
|
@ -290,7 +297,7 @@
|
||||||
color: #23378a;
|
color: #23378a;
|
||||||
padding: 12px 24px;
|
padding: 12px 24px;
|
||||||
border: none;
|
border: none;
|
||||||
font-family: 'Poppins', sans-serif;
|
font-family: "Poppins", sans-serif;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
@ -412,7 +419,7 @@
|
||||||
border: none;
|
border: none;
|
||||||
outline: none;
|
outline: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-family: 'Poppins', sans-serif;
|
font-family: "Poppins", sans-serif;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background-color: #1677ff;
|
background-color: #1677ff;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
|
|
@ -446,7 +453,7 @@
|
||||||
background-color: #d4e7ff;
|
background-color: #d4e7ff;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
font-family: 'Poppins';
|
font-family: "Poppins";
|
||||||
border: none;
|
border: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
|
|
@ -473,8 +480,12 @@
|
||||||
.ant-form-item {
|
.ant-form-item {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
.ant-input {
|
||||||
|
padding: 4px 14px 6px 11px !important;
|
||||||
|
text-decoration: underline;
|
||||||
|
text-decoration-color: #b8b8b8;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.productFormproductImg {
|
.productFormproductImg {
|
||||||
width: 350px;
|
width: 350px;
|
||||||
|
|
@ -483,8 +494,19 @@
|
||||||
|
|
||||||
.Customized_QuickAdd {
|
.Customized_QuickAdd {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
font-family: 'Poppins', sans-serif;
|
font-family: "Poppins", sans-serif;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-style: normal;
|
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-table-cell {
|
||||||
|
|
||||||
.ant-form-item {
|
.ant-form-item {
|
||||||
margin-bottom: unset;
|
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