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,21 +274,49 @@ const BSBillingTable1 = () => {
|
||||||
setshortKeyMethod(method);
|
setshortKeyMethod(method);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// const handleKeyDown = (event) => {
|
||||||
|
// if (!event.ctrlKey) return;
|
||||||
|
|
||||||
|
// const key = event.key.toLowerCase();
|
||||||
|
|
||||||
|
// if (key === 'q') {
|
||||||
|
// event.preventDefault();
|
||||||
|
// handleShortcut('qty');
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if (key === 'e') {
|
||||||
|
// event.preventDefault();
|
||||||
|
// handleShortcut('price');
|
||||||
|
// }
|
||||||
|
// };
|
||||||
const handleKeyDown = (event) => {
|
const handleKeyDown = (event) => {
|
||||||
if (!event.ctrlKey) return;
|
const key = event.key.toLowerCase();
|
||||||
|
// 👉 ALT + P → Open Edit Total Amount
|
||||||
|
if (event.altKey && key === 'p') {
|
||||||
|
event.preventDefault();
|
||||||
|
if (tableData?.length > 0) {
|
||||||
|
OpenEditTotalAmount();
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 👉 CTRL shortcuts
|
||||||
|
if (!event.ctrlKey) return;
|
||||||
|
|
||||||
const key = event.key.toLowerCase();
|
if (key === 'q') {
|
||||||
|
|
||||||
if (key === 'q') {
|
|
||||||
event.preventDefault();
|
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 () => {
|
||||||
|
|
|
||||||
|
|
@ -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,22 +228,34 @@ const BSBillingTable3 = () => {
|
||||||
handleEditQuantity(item);
|
handleEditQuantity(item);
|
||||||
setshortKeyMethod(method);
|
setshortKeyMethod(method);
|
||||||
};
|
};
|
||||||
|
const handleKeyDown = (event) => {
|
||||||
|
const key = event.key.toLowerCase();
|
||||||
|
// 👉 ALT + P → Open Edit Total Amount
|
||||||
|
if (event.altKey && key === 'p') {
|
||||||
|
event.preventDefault();
|
||||||
|
if (tableData?.length > 0) {
|
||||||
|
OpenEditTotalAmount();
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 👉 CTRL shortcuts
|
||||||
|
if (!event.ctrlKey) return;
|
||||||
|
|
||||||
const handleKeyDown = (event) => {
|
if (key === 'q') {
|
||||||
if (!event.ctrlKey) return;
|
|
||||||
|
|
||||||
const key = event.key.toLowerCase();
|
|
||||||
|
|
||||||
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 () => {
|
||||||
|
|
|
||||||
|
|
@ -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,
|
||||||
|
|
|
||||||
|
|
@ -281,22 +281,34 @@ const BSBillingTable4 = () => {
|
||||||
setshortKeyMethod(method);
|
setshortKeyMethod(method);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleKeyDown = (event) => {
|
const handleKeyDown = (event) => {
|
||||||
if (!preferenceshortcutkey) return;
|
const key = event.key.toLowerCase();
|
||||||
if (!event.ctrlKey) return;
|
// 👉 ALT + P → Open Edit Total Amount
|
||||||
|
if (event.altKey && key === 'p') {
|
||||||
|
event.preventDefault();
|
||||||
|
if (tableData?.length > 0) {
|
||||||
|
OpenEditTotalAmount();
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 👉 CTRL shortcuts
|
||||||
|
if (!event.ctrlKey) return;
|
||||||
|
|
||||||
const key = event.key.toLowerCase();
|
if (key === 'q') {
|
||||||
|
|
||||||
if (key === 'q') {
|
|
||||||
event.preventDefault();
|
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,
|
||||||
|
|
|
||||||
|
|
@ -1927,22 +1927,34 @@ const BsBill = () => {
|
||||||
setshortKeyMethod(method);
|
setshortKeyMethod(method);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleKeyDown = (event) => {
|
const handleKeyDown = (event) => {
|
||||||
if (!preferenceshortcutkey) return;
|
const key = event.key.toLowerCase();
|
||||||
if (!event.ctrlKey) return;
|
// 👉 ALT + P → Open Edit Total Amount
|
||||||
|
if (event.altKey && key === 'p') {
|
||||||
|
event.preventDefault();
|
||||||
|
if (TableData?.length > 0) {
|
||||||
|
OpenEditTotalAmount();
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 👉 CTRL shortcuts
|
||||||
|
if (!event.ctrlKey) return;
|
||||||
|
|
||||||
const key = event.key.toLowerCase();
|
if (key === 'q') {
|
||||||
|
|
||||||
if (key === 'q') {
|
|
||||||
event.preventDefault();
|
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 () => {
|
||||||
|
|
|
||||||
|
|
@ -255,24 +255,33 @@ const BSBillingTable6 = () => {
|
||||||
setshortKeyMethod(method);
|
setshortKeyMethod(method);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleKeyDown = (event) => {
|
const handleKeyDown = (event) => {
|
||||||
|
const key = event.key.toLowerCase();
|
||||||
if (!preferenceshortcutkey) return
|
// 👉 ALT + P → Open Edit Total Amount
|
||||||
if (!event.ctrlKey) return;
|
if (event.altKey && key === 'p') {
|
||||||
|
event.preventDefault();
|
||||||
const key = event.key.toLowerCase();
|
if (tableData?.length > 0) {
|
||||||
|
OpenEditTotalAmount();
|
||||||
if (key === 'q') {
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 👉 CTRL shortcuts
|
||||||
|
if (!event.ctrlKey) return;
|
||||||
|
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,21 +250,31 @@ const BSBillingTable7 = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleKeyDown = (event) => {
|
const handleKeyDown = (event) => {
|
||||||
if (!preferenceshortcutkey) return;
|
const key = event.key.toLowerCase();
|
||||||
if (!event.ctrlKey) return;
|
// 👉 ALT + P → Open Edit Total Amount
|
||||||
|
if (event.altKey && key === 'p') {
|
||||||
const key = event.key.toLowerCase();
|
event.preventDefault();
|
||||||
|
if (tableData?.length > 0) {
|
||||||
if (key === 'q') {
|
OpenEditTotalAmount();
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!event.ctrlKey) return;
|
||||||
|
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 () => {
|
||||||
|
|
|
||||||
|
|
@ -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,15 +622,18 @@ const BSEditTotalAmt = (props) => {
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<InputField
|
<div ref={salesDiscInputRef}>
|
||||||
field="SalesDisc"
|
<InputField
|
||||||
name="SalesDisc"
|
field="SalesDisc"
|
||||||
fieldState={true}
|
name="SalesDisc"
|
||||||
fieldApi={true}
|
fieldState={true}
|
||||||
autocomplete="off"
|
fieldApi={true}
|
||||||
onChange={(e) => SalesChangefun(e)}
|
autocomplete="off"
|
||||||
maxLength={8}
|
onChange={(e) => SalesChangefun(e)}
|
||||||
/>
|
onKeyDown={(e) => handleSalesKeyDown(e)}
|
||||||
|
maxLength={8}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Form>{' '}
|
</Form>{' '}
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -593,18 +683,21 @@ const BSEditTotalAmt = (props) => {
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<InputField
|
<div ref={salesMoreOptInputRef}>
|
||||||
field="SellPrice"
|
<InputField
|
||||||
name="SellPrice"
|
field="SellPrice"
|
||||||
// value={NewPrice1}
|
name="SellPrice"
|
||||||
label="Reduction"
|
// value={NewPrice1}
|
||||||
fieldState={true}
|
label="Reduction"
|
||||||
fieldApi={true}
|
fieldState={true}
|
||||||
// id="error2"
|
fieldApi={true}
|
||||||
autocomplete="off"
|
// id="error2"
|
||||||
onChange={(e) => PriceChangefun(e)}
|
autocomplete="off"
|
||||||
// isOnChange={formType == "edit" || formRef.current?.getFieldsValue()?.CustName ? true : false}
|
onChange={(e) => PriceChangefun(e)}
|
||||||
/>
|
onKeyDown={(e) => handlePriceKeyDown(e)}
|
||||||
|
// 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,16 +777,19 @@ const BSEditTotalAmt = (props) => {
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<InputField
|
<div ref={estDiscInputRef}>
|
||||||
field="ESTSalesDisc"
|
<InputField
|
||||||
name="ESTSalesDisc"
|
field="ESTSalesDisc"
|
||||||
fieldState={true}
|
name="ESTSalesDisc"
|
||||||
fieldApi={true}
|
fieldState={true}
|
||||||
// id="error2"
|
fieldApi={true}
|
||||||
autocomplete="off"
|
// id="error2"
|
||||||
onChange={(e) => EstChangefun(e)}
|
autocomplete="off"
|
||||||
maxLength={8}
|
onChange={(e) => EstChangefun(e)}
|
||||||
/>
|
onKeyDown={(e) => handleEstKeyDown(e)}
|
||||||
|
maxLength={8}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Form>
|
</Form>
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -742,18 +838,21 @@ const BSEditTotalAmt = (props) => {
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<InputField
|
<div ref={estMoreOptInputRef}>
|
||||||
field="SellPrice"
|
<InputField
|
||||||
name="ESTSellingPrice"
|
field="SellPrice"
|
||||||
// value={NewPrice1}
|
name="ESTSellingPrice"
|
||||||
label="Reduction"
|
// value={NewPrice1}
|
||||||
fieldState={true}
|
label="Reduction"
|
||||||
fieldApi={true}
|
fieldState={true}
|
||||||
// id="error2"
|
fieldApi={true}
|
||||||
autocomplete="off"
|
// id="error2"
|
||||||
onChange={(e) => PriceChangefunEst(e)}
|
autocomplete="off"
|
||||||
// isOnChange={formType == "edit" || formRef.current?.getFieldsValue()?.CustName ? true : false}
|
onChange={(e) => PriceChangefunEst(e)}
|
||||||
/>
|
onKeyDown={(e) => handlePriceEstKeyDown(e)}
|
||||||
|
// 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)}
|
||||||
|
|
|
||||||
|
|
@ -148,13 +148,13 @@ const ComboSalesBillTable = () => {
|
||||||
OrderType === 'Hold'
|
OrderType === 'Hold'
|
||||||
? tableData?.filter((a, b) => a.BookingTypeName === 'TakeAway')
|
? tableData?.filter((a, b) => a.BookingTypeName === 'TakeAway')
|
||||||
: tableData?.filter(
|
: tableData?.filter(
|
||||||
(a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId
|
(a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId
|
||||||
);
|
);
|
||||||
const OldtableDataTakeAway =
|
const OldtableDataTakeAway =
|
||||||
OrderType != 'Hold'
|
OrderType != 'Hold'
|
||||||
? tableData?.filter(
|
? tableData?.filter(
|
||||||
(a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId
|
(a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId
|
||||||
)
|
)
|
||||||
: [];
|
: [];
|
||||||
|
|
||||||
const [EditQuantity, setEditQuantity] = useState(false);
|
const [EditQuantity, setEditQuantity] = useState(false);
|
||||||
|
|
@ -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') {
|
const getItem = (data = []) => {
|
||||||
event.preventDefault();
|
if (!data.length) return null;
|
||||||
const getItem = (data = []) => {
|
return BillOrderPre === 'Y' ? data[0] : data[data.length - 1];
|
||||||
if (!data.length) return null;
|
};
|
||||||
return BillOrderPre === 'Y' ? data[0] : data[data.length - 1];
|
|
||||||
};
|
if (tableDataTakeAway?.length > 0) {
|
||||||
let item = null;
|
return getItem(tableDataTakeAway);
|
||||||
if (tableDataTakeAway?.length > 0) {
|
} else if (tableDataDinein?.length > 0) {
|
||||||
item = getItem(tableDataTakeAway);
|
return getItem(tableDataDinein);
|
||||||
} else if (tableDataDinein?.length > 0) {
|
|
||||||
item = getItem(tableDataDinein);
|
|
||||||
}
|
|
||||||
if (item) {
|
|
||||||
handleEditQuantity(item);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleShortcut = (method) => {
|
||||||
|
const item = getSelectedItem();
|
||||||
|
if (!item) return;
|
||||||
|
|
||||||
|
handleEditQuantity(item);
|
||||||
|
setshortKeyMethod(method);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleKeyDown = (event) => {
|
||||||
|
const key = event.key.toLowerCase();
|
||||||
|
// 👉 ALT + P → Open Edit Total Amount
|
||||||
|
if (event.altKey && key === 'p') {
|
||||||
|
event.preventDefault();
|
||||||
|
if (tableData?.length > 0) {
|
||||||
|
OpenEditTotalAmount();
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 👉 CTRL shortcuts
|
||||||
|
if (!event.ctrlKey) return;
|
||||||
|
|
||||||
|
if (key === 'q') {
|
||||||
|
event.preventDefault();
|
||||||
|
handleShortcut('qty');
|
||||||
|
} else if (key === 'e') {
|
||||||
|
event.preventDefault();
|
||||||
|
handleShortcut('price');
|
||||||
|
} else if (key === 'y') {
|
||||||
|
event.preventDefault();
|
||||||
|
handleShortcut('Parcel');
|
||||||
|
} else if (key === 'b') {
|
||||||
|
event.preventDefault();
|
||||||
|
handleShortcut('weightAmount');
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
window.addEventListener('keydown', handleKeyDown);
|
window.addEventListener('keydown', handleKeyDown);
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
window.removeEventListener('keydown', handleKeyDown);
|
window.removeEventListener('keydown', handleKeyDown);
|
||||||
};
|
};
|
||||||
|
|
@ -1122,9 +1154,9 @@ const ComboSalesBillTable = () => {
|
||||||
)?.map((item, idx) =>
|
)?.map((item, idx) =>
|
||||||
idx === 0
|
idx === 0
|
||||||
? {
|
? {
|
||||||
...item,
|
...item,
|
||||||
FreeQty,
|
FreeQty,
|
||||||
}
|
}
|
||||||
: item
|
: item
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
@ -2246,20 +2278,20 @@ const ComboSalesBillTable = () => {
|
||||||
tableDataDinein?.length >= PreviousdataLength
|
tableDataDinein?.length >= PreviousdataLength
|
||||||
? 'wheat'
|
? 'wheat'
|
||||||
: BookingType !== 'Dine In' &&
|
: BookingType !== 'Dine In' &&
|
||||||
triggerAnimation &&
|
triggerAnimation &&
|
||||||
OldtableDataTakeAway?.length + index === 0 &&
|
OldtableDataTakeAway?.length + index === 0 &&
|
||||||
tableDataDinein?.length >= PreviousdataLength &&
|
tableDataDinein?.length >= PreviousdataLength &&
|
||||||
!HoldOrderDtl &&
|
!HoldOrderDtl &&
|
||||||
!UnpaidData
|
!UnpaidData
|
||||||
? 'wheat'
|
? 'wheat'
|
||||||
: 'inherit'
|
: 'inherit'
|
||||||
: 'none',
|
: 'none',
|
||||||
background: row?.SalesId
|
background: row?.SalesId
|
||||||
? 'rgb(243, 248, 213)'
|
? 'rgb(243, 248, 213)'
|
||||||
: GlobEstBooking === 'ParEst' &&
|
: GlobEstBooking === 'ParEst' &&
|
||||||
GlobProdwisedata?.includes(
|
GlobProdwisedata?.includes(
|
||||||
row?.InwardDtlId + ' ' + row?.BookingTypeName
|
row?.InwardDtlId + ' ' + row?.BookingTypeName
|
||||||
)
|
)
|
||||||
? '#b2d1f7'
|
? '#b2d1f7'
|
||||||
: (OldtableDataTakeAway?.length + index) % 2 === 0
|
: (OldtableDataTakeAway?.length + index) % 2 === 0
|
||||||
? 'white'
|
? 'white'
|
||||||
|
|
@ -2294,37 +2326,37 @@ const ComboSalesBillTable = () => {
|
||||||
{/* Product Name / Item */}
|
{/* Product Name / Item */}
|
||||||
{(item.OptionName === 'Item' ||
|
{(item.OptionName === 'Item' ||
|
||||||
item.OptionName === 'Product Name') && (
|
item.OptionName === 'Product Name') && (
|
||||||
<td
|
<td
|
||||||
key={`prod-${index}`}
|
key={`prod-${index}`}
|
||||||
className="productNameTd"
|
className="productNameTd"
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
row.FullProductIdentifierDtls?.length > 0 ||
|
row.FullProductIdentifierDtls?.length > 0 ||
|
||||||
row.ProductIdentifierDtls?.length > 0
|
row.ProductIdentifierDtls?.length > 0
|
||||||
? handleImeiDetails(row)
|
? handleImeiDetails(row)
|
||||||
: editField && handleEditQuantity(row)
|
: editField && handleEditQuantity(row)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{row?.Type !== 'OS' ? row.ProdName : row.ServiceName}
|
{row?.Type !== 'OS' ? row.ProdName : row.ServiceName}
|
||||||
{row?.BrandName ? ` ${row.BrandName}` : ''}
|
{row?.BrandName ? ` ${row.BrandName}` : ''}
|
||||||
{row?.Type !== 'C' && (
|
{row?.Type !== 'C' && (
|
||||||
<p className="Tbl3-Variant">
|
<p className="Tbl3-Variant">
|
||||||
{/* {row?.ProdVariantName} {row?.Size} {row?.UomName} */}
|
{/* {row?.ProdVariantName} {row?.Size} {row?.UomName} */}
|
||||||
(
|
(
|
||||||
{!row?.ProdVariantName?.toLowerCase()?.includes(
|
{!row?.ProdVariantName?.toLowerCase()?.includes(
|
||||||
'variant'
|
'variant'
|
||||||
) && <span>{row?.ProdVariantName} </span>}
|
) && <span>{row?.ProdVariantName} </span>}
|
||||||
{row?.Size}
|
{row?.Size}
|
||||||
{row?.SinglePc == 'Y' ? 'PCS' : row?.UomName})
|
{row?.SinglePc == 'Y' ? 'PCS' : row?.UomName})
|
||||||
</p>
|
|
||||||
)}
|
|
||||||
{row?.Type === 'C' &&
|
|
||||||
row.ProdDetail?.map((prod, idx) => (
|
|
||||||
<p key={idx}>
|
|
||||||
{prod.ProdName} - {prod.Size} {prod.UomName}
|
|
||||||
</p>
|
</p>
|
||||||
))}
|
)}
|
||||||
</td>
|
{row?.Type === 'C' &&
|
||||||
)}
|
row.ProdDetail?.map((prod, idx) => (
|
||||||
|
<p key={idx}>
|
||||||
|
{prod.ProdName} - {prod.Size} {prod.UomName}
|
||||||
|
</p>
|
||||||
|
))}
|
||||||
|
</td>
|
||||||
|
)}
|
||||||
|
|
||||||
{/* Barcode */}
|
{/* Barcode */}
|
||||||
{item.OptionName === 'Barcode' && (
|
{item.OptionName === 'Barcode' && (
|
||||||
|
|
@ -2351,7 +2383,7 @@ const ComboSalesBillTable = () => {
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
editField && handleEditQuantityCombo(row)
|
editField && handleEditQuantityCombo(row)
|
||||||
}
|
}
|
||||||
// onClick={() => handleEditQTYcombo()}
|
// onClick={() => handleEditQTYcombo()}
|
||||||
>
|
>
|
||||||
{(!EditQtyCombo || row?.localId !== Index) && (
|
{(!EditQtyCombo || row?.localId !== Index) && (
|
||||||
<>{row.OrderQty}</>
|
<>{row.OrderQty}</>
|
||||||
|
|
@ -2367,7 +2399,7 @@ const ComboSalesBillTable = () => {
|
||||||
Index={Index}
|
Index={Index}
|
||||||
setIndex={setIndex}
|
setIndex={setIndex}
|
||||||
setEditQtyCombo={setEditQtyCombo}
|
setEditQtyCombo={setEditQtyCombo}
|
||||||
// id={`qty-${index}`}
|
// id={`qty-${index}`}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</td>
|
</td>
|
||||||
|
|
@ -2414,9 +2446,9 @@ const ComboSalesBillTable = () => {
|
||||||
>
|
>
|
||||||
{row?.Offer > 0
|
{row?.Offer > 0
|
||||||
? `${(
|
? `${(
|
||||||
(row.Offer / (row?.OrderQty * row?.OrderRate)) *
|
(row.Offer / (row?.OrderQty * row?.OrderRate)) *
|
||||||
100
|
100
|
||||||
).toFixed(2)}%`
|
).toFixed(2)}%`
|
||||||
: '-'}
|
: '-'}
|
||||||
</td>
|
</td>
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
|
|
@ -237,7 +237,7 @@ const StandardTable = () => {
|
||||||
window.removeEventListener('keydown', handleKeyDown);
|
window.removeEventListener('keydown', handleKeyDown);
|
||||||
};
|
};
|
||||||
}, [GetCustId, OrderCardDetail]);
|
}, [GetCustId, OrderCardDetail]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!preferenceshortcutkey) return;
|
if (!preferenceshortcutkey) return;
|
||||||
|
|
||||||
|
|
@ -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);
|
||||||
|
|
@ -244,7 +247,7 @@ const BSComboItemCard = (props) => {
|
||||||
const paymentloader = useSelector(GlobalPayementloader, shallowEqual);
|
const paymentloader = useSelector(GlobalPayementloader, shallowEqual);
|
||||||
const SessionData = useSelector(StoredSessionData, shallowEqual);
|
const SessionData = useSelector(StoredSessionData, shallowEqual);
|
||||||
const GlobalCombocarddatas = useSelector(GlobalCombocarddata);
|
const GlobalCombocarddatas = useSelector(GlobalCombocarddata);
|
||||||
console.log(GlobalCombocarddatas, 'GlobalCombocarddatas combo card');
|
console.log(GlobalCombocarddatas, 'GlobalCombocarddatas combo card');
|
||||||
const [messageType, setMessageType] = useState(null);
|
const [messageType, setMessageType] = useState(null);
|
||||||
const [messageData, setMessageData] = useState(null);
|
const [messageData, setMessageData] = useState(null);
|
||||||
const [repeatedModel, setRepeatedModel] = useState(false);
|
const [repeatedModel, setRepeatedModel] = useState(false);
|
||||||
|
|
@ -297,7 +300,7 @@ console.log(GlobalCombocarddatas, 'GlobalCombocarddatas combo card');
|
||||||
: GlobalCombocarddatas
|
: GlobalCombocarddatas
|
||||||
: '';
|
: '';
|
||||||
//
|
//
|
||||||
console.log(cardData, 'cardData combo card');
|
console.log(cardData, 'cardData combo card');
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// fetchedit();
|
// fetchedit();
|
||||||
getPreferenceStock();
|
getPreferenceStock();
|
||||||
|
|
@ -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 */}
|
||||||
|
|
@ -4632,7 +4655,7 @@ console.log(cardData, 'cardData combo card');
|
||||||
cardData={cardDataForNewPrd}
|
cardData={cardDataForNewPrd}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<div
|
<div
|
||||||
className={!temp5 ? 'NodataFound' : 'NodataFound5'}
|
className={!temp5 ? 'NodataFound' : 'NodataFound5'}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,30 @@
|
||||||
|
import { Modal } from 'antd';
|
||||||
|
import { ExclamationCircleOutlined } from '@ant-design/icons';
|
||||||
|
|
||||||
|
const ExpireConfirmModal = ({
|
||||||
|
open,
|
||||||
|
title,
|
||||||
|
onOk,
|
||||||
|
onCancel,
|
||||||
|
okText = 'Submit',
|
||||||
|
cancelText = "Don't Submit",
|
||||||
|
}) => {
|
||||||
|
return (
|
||||||
|
<Modal
|
||||||
|
open={open}
|
||||||
|
onOk={onOk}
|
||||||
|
onCancel={onCancel}
|
||||||
|
okText={okText}
|
||||||
|
cancelText={cancelText}
|
||||||
|
>
|
||||||
|
<div style={{ display: 'flex', gap: '1rem', alignItems: 'center' }}>
|
||||||
|
<ExclamationCircleOutlined
|
||||||
|
style={{ color: 'rgb(231 176 12)', fontSize: 30 }}
|
||||||
|
/>
|
||||||
|
<h3 style={{ margin: 0 }}>{title}</h3>
|
||||||
|
</div>
|
||||||
|
</Modal>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default ExpireConfirmModal;
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
import React, { useEffect, useState } from "react";
|
import 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);
|
||||||
}
|
}
|
||||||
|
|
@ -55,7 +59,7 @@ const MultipleSearch = ({ close }) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const GetmultipleSearchData = async () => {
|
const GetmultipleSearchData = async () => {
|
||||||
const data = {
|
const data = {
|
||||||
AppId,
|
AppId,
|
||||||
CompId,
|
CompId,
|
||||||
|
|
@ -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
|
||||||
|
|
@ -115,7 +110,7 @@ const MultipleSearch = ({ close }) => {
|
||||||
<Buttons
|
<Buttons
|
||||||
buttonText={"Submit"}
|
buttonText={"Submit"}
|
||||||
handleSubmit={postMultipleSearch}
|
handleSubmit={postMultipleSearch}
|
||||||
color="901D77"
|
color="901D77"
|
||||||
/>
|
/>
|
||||||
</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 !== ''
|
||||||
AppId: getSession('AppId'),
|
);
|
||||||
CompId: getSession('CompId'),
|
|
||||||
BranchId: getSession('BranchId'),
|
|
||||||
CreatedBy: getSession('UserId'),
|
|
||||||
|
|
||||||
ProdName: data?.ProductName,
|
if (!FilterData || FilterData.length === 0) {
|
||||||
ProdVariantName: data?.ProductVariantName,
|
|
||||||
Size: data?.Quantity,
|
|
||||||
UOM: data?.UOM,
|
|
||||||
MRP: data?.MRP,
|
|
||||||
WhSalePrice: data?.WhSalePrice,
|
|
||||||
SellPrice: data?.SellPrice,
|
|
||||||
ProdCat: data?.Category ? data?.Category : 'General',
|
|
||||||
ProdSubCat: data?.SubCategory,
|
|
||||||
Brand: data?.Brand ? data?.Brand : '',
|
|
||||||
AutoGenerateQr: data?.AutoGenerateQrcode
|
|
||||||
? data?.AutoGenerateQrcode
|
|
||||||
: 'No',
|
|
||||||
QRCode: data?.AddQrCode,
|
|
||||||
StockAvailable: data?.StockAvailable ? data?.StockAvailable : 'No',
|
|
||||||
TaxId: data?.Tax ? data?.Tax : 'NIL - 0%',
|
|
||||||
Cess: data?.Cess,
|
|
||||||
HSNCode: data?.HSN,
|
|
||||||
PartNumber: data?.PartNumber,
|
|
||||||
Rack: data?.Rack,
|
|
||||||
ManufDate: moment(data?.ManufactureDate, ['M/D/YY']).format(
|
|
||||||
'YYYY-MM-DDTHH:mm:ss'
|
|
||||||
),
|
|
||||||
ExpDate: moment(data?.ExpireDate, ['M/D/YY']).format(
|
|
||||||
'YYYY-MM-DDTHH:mm:ss'
|
|
||||||
),
|
|
||||||
AvailableFrom: data?.AvailableFrom
|
|
||||||
? moment(data?.AvailableFrom, ['M/D/YY']).format('HH:mm:ss')
|
|
||||||
: '',
|
|
||||||
AvailableTo: data?.AvailableTo
|
|
||||||
? moment(data?.AvailableTo, ['M/D/YY']).format('HH:mm:ss')
|
|
||||||
: '',
|
|
||||||
OnePcsAvailable: data?.Amountperpiece ? data?.Amountperpiece : 'No',
|
|
||||||
OnePcsPrice: data?.AmountperpiecePrice,
|
|
||||||
// NoOfPcs:data?.NumberOfPieceInside,
|
|
||||||
AutoGenerateSingleQr: data?.AutoGenerateOnePieceQrcode
|
|
||||||
? data?.AutoGenerateOnePieceQrcode
|
|
||||||
: 'No',
|
|
||||||
OnePcQR: data?.AutoGenerateOnePieceQrcodeNumber,
|
|
||||||
// ProductType:data?.ProductType,
|
|
||||||
TokenAvailable: data?.TokenAvailable ? data?.TokenAvailable : 'No',
|
|
||||||
ProdLogo: data?.Productimage,
|
|
||||||
}));
|
|
||||||
|
|
||||||
let postDatas = { prodDetails: formattedData };
|
|
||||||
|
|
||||||
let response = await dispatch(bulkpostdata(postDatas)).unwrap();
|
|
||||||
if (response?.data?.statusCode == 1) {
|
|
||||||
setMessageType('success');
|
|
||||||
setMessageData(response?.data?.response);
|
|
||||||
setBulkpost(false);
|
|
||||||
setpage(1);
|
|
||||||
|
|
||||||
var responseData = await dispatch(
|
|
||||||
getProductDataPageNo({ CompId, BranchId, AppId, PageNumber: 1 })
|
|
||||||
).unwrap();
|
|
||||||
setCurrentPage(1);
|
|
||||||
|
|
||||||
if (responseData?.data?.statusCode === 1) {
|
|
||||||
setCachedData({ [currentPage]: responseData?.data?.data });
|
|
||||||
setproductData(responseData?.data?.data);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
setMessageType('error');
|
|
||||||
setMessageData(responseData?.data?.response);
|
|
||||||
}
|
|
||||||
|
|
||||||
handleResetExcelData();
|
|
||||||
handleCancel();
|
|
||||||
} else {
|
|
||||||
setBulkpost(false);
|
setBulkpost(false);
|
||||||
setMessageType('error');
|
setMessageType('error');
|
||||||
setMessageData('No data to submit. Please upload an Excel file.');
|
setMessageData('No data to submit. Please upload an Excel file.');
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
|
||||||
const Unit = UomPreference?.map((e) => e.ConfigName);
|
const formattedData = FilterData.map(data => ({
|
||||||
const CategoryId = ProdCatData?.map((e) => e.ConfigId);
|
AppId: getSession('AppId'),
|
||||||
const CategoryNames = ProdCatData?.map((e) => e.ConfigName);
|
CompId: getSession('CompId'),
|
||||||
const CatconfigId = ProdCatData?.map((e) => e.ConfigId);
|
BranchId: getSession('BranchId'),
|
||||||
const Subcatnames = subCatData?.map((e) => e.ConfigName);
|
CreatedBy: getSession('UserId'),
|
||||||
const SubcatId = subCatData?.map((e) => e.ConfigId);
|
|
||||||
const SubcatNumFId = subCatData?.map((e) => e.NumFId);
|
ProdName: data.ProductName,
|
||||||
const BrandNumFId = allBrandData?.map((e) => e.NumFId);
|
ProdVariantName: data.ProductVariantName,
|
||||||
const BrandId = allBrandData?.map((e) => e.ConfigId);
|
Size: data.Quantity,
|
||||||
const BrandName = allBrandData?.map((e) => e.ConfigName);
|
UOM: data.UOM,
|
||||||
const SuplierNames = SupplierData?.map((e) => e.SuppName);
|
MRP: data.MRP,
|
||||||
const TaxDatas = TaxData?.map((e) => e.TaxIdName);
|
WhSalePrice: data.WhSalePrice,
|
||||||
const TaxData1 = TaxData?.map((e) => e.TaxPercentage);
|
SellPrice: data.SellPrice,
|
||||||
const combinedTaxData = TaxDatas?.map(
|
ProdCat: data.Category || 'General',
|
||||||
(taxIdName, index) => `${taxIdName} - ${TaxData1[index]}%`
|
ProdSubCat: data.SubCategory,
|
||||||
|
Brand: data.Brand || '',
|
||||||
|
AutoGenerateQr: data.AutoGenerateQrcode || 'No',
|
||||||
|
QRCode: data.AddQrCode,
|
||||||
|
StockAvailable: data.StockAvailable || 'No',
|
||||||
|
TaxId: data.Tax || 'NIL - 0%',
|
||||||
|
Cess: data.Cess,
|
||||||
|
HSNCode: data.HSN,
|
||||||
|
PartNumber: data.PartNumber,
|
||||||
|
Rack: data.Rack,
|
||||||
|
ManufDate: moment(data.ManufactureDate, ['M/D/YY']).format(
|
||||||
|
'YYYY-MM-DDTHH:mm:ss'
|
||||||
|
),
|
||||||
|
ExpDate: moment(data.ExpireDate, ['M/D/YY']).format(
|
||||||
|
'YYYY-MM-DDTHH:mm:ss'
|
||||||
|
),
|
||||||
|
AvailableFrom: data.AvailableFrom
|
||||||
|
? moment(data.AvailableFrom, ['M/D/YY']).format('HH:mm:ss')
|
||||||
|
: '',
|
||||||
|
AvailableTo: data.AvailableTo
|
||||||
|
? moment(data.AvailableTo, ['M/D/YY']).format('HH:mm:ss')
|
||||||
|
: '',
|
||||||
|
OnePcsAvailable: data.Amountperpiece || 'No',
|
||||||
|
OnePcsPrice: data.AmountperpiecePrice,
|
||||||
|
AutoGenerateSingleQr: data.AutoGenerateOnePieceQrcode || 'No',
|
||||||
|
OnePcQR: data.AutoGenerateOnePieceQrcodeNumber,
|
||||||
|
TokenAvailable: data.TokenAvailable || 'No',
|
||||||
|
ProdLogo: data.Productimage,
|
||||||
|
}));
|
||||||
|
|
||||||
|
const postDatas = { prodDetails: formattedData };
|
||||||
|
|
||||||
|
const response = await dispatch(bulkpostdata(postDatas)).unwrap();
|
||||||
|
|
||||||
|
if (response?.data?.statusCode === 1) {
|
||||||
|
setMessageType('success');
|
||||||
|
setMessageData(response.data.response);
|
||||||
|
setpage(1);
|
||||||
|
|
||||||
|
const responseData = await dispatch(
|
||||||
|
getProductDataPageNo({ CompId, BranchId, AppId, PageNumber: 1 })
|
||||||
|
).unwrap();
|
||||||
|
|
||||||
|
if (responseData?.data?.statusCode === 1) {
|
||||||
|
setCachedData({ 1: responseData.data.data });
|
||||||
|
setproductData(responseData.data.data);
|
||||||
|
setCurrentPage(1);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
setMessageType('error');
|
||||||
|
setMessageData(response?.data?.response);
|
||||||
|
}
|
||||||
|
|
||||||
|
setBulkpost(false);
|
||||||
|
handleResetExcelData();
|
||||||
|
handleCancel();
|
||||||
|
}, [
|
||||||
|
Exceldatasubmit,
|
||||||
|
|
||||||
|
CompId,
|
||||||
|
BranchId,
|
||||||
|
AppId,
|
||||||
|
handleResetExcelData,
|
||||||
|
handleCancel
|
||||||
|
]);
|
||||||
|
|
||||||
|
const Unit = useMemo(
|
||||||
|
() => UomPreference?.map((e) => e.ConfigName),
|
||||||
|
[UomPreference]
|
||||||
|
);
|
||||||
|
|
||||||
|
const CategoryId = useMemo(
|
||||||
|
() => ProdCatData?.map((e) => e.ConfigId),
|
||||||
|
[ProdCatData]
|
||||||
|
);
|
||||||
|
|
||||||
|
const CategoryNames = useMemo(
|
||||||
|
() => ProdCatData?.map((e) => e.ConfigName),
|
||||||
|
[ProdCatData]
|
||||||
|
);
|
||||||
|
|
||||||
|
const CatconfigId = useMemo(
|
||||||
|
() => ProdCatData?.map((e) => e.ConfigId),
|
||||||
|
[ProdCatData]
|
||||||
|
);
|
||||||
|
|
||||||
|
const Subcatnames = useMemo(
|
||||||
|
() => subCatData?.map((e) => e.ConfigName),
|
||||||
|
[subCatData]
|
||||||
|
);
|
||||||
|
|
||||||
|
const SubcatId = useMemo(
|
||||||
|
() => subCatData?.map((e) => e.ConfigId),
|
||||||
|
[subCatData]
|
||||||
|
);
|
||||||
|
|
||||||
|
const SubcatNumFId = useMemo(
|
||||||
|
() => subCatData?.map((e) => e.NumFId),
|
||||||
|
[subCatData]
|
||||||
|
);
|
||||||
|
|
||||||
|
const BrandNumFId = useMemo(
|
||||||
|
() => allBrandData?.map((e) => e.NumFId),
|
||||||
|
[allBrandData]
|
||||||
|
);
|
||||||
|
|
||||||
|
const BrandId = useMemo(
|
||||||
|
() => allBrandData?.map((e) => e.ConfigId),
|
||||||
|
[allBrandData]
|
||||||
|
);
|
||||||
|
|
||||||
|
const BrandName = useMemo(
|
||||||
|
() => allBrandData?.map((e) => e.ConfigName),
|
||||||
|
[allBrandData]
|
||||||
|
);
|
||||||
|
|
||||||
|
const SuplierNames = useMemo(
|
||||||
|
() => SupplierData?.map((e) => e.SuppName),
|
||||||
|
[SupplierData]
|
||||||
|
);
|
||||||
|
|
||||||
|
const TaxDatas = useMemo(
|
||||||
|
() => TaxData?.map((e) => e.TaxIdName),
|
||||||
|
[TaxData]
|
||||||
|
);
|
||||||
|
|
||||||
|
const TaxData1 = useMemo(
|
||||||
|
() => TaxData?.map((e) => e.TaxPercentage),
|
||||||
|
[TaxData]
|
||||||
|
);
|
||||||
|
|
||||||
|
const combinedTaxData = useMemo(
|
||||||
|
() =>
|
||||||
|
TaxDatas?.map(
|
||||||
|
(taxIdName, index) => `${taxIdName} - ${TaxData1[index]}%`
|
||||||
|
),
|
||||||
|
[TaxDatas, TaxData1]
|
||||||
);
|
);
|
||||||
const Deletebulk = async () => {
|
const Deletebulk = async () => {
|
||||||
let data = {
|
let data = {
|
||||||
|
|
@ -2641,7 +2706,7 @@ const ProductList = () => {
|
||||||
generateQRCodeCopy={(code) =>
|
generateQRCodeCopy={(code) =>
|
||||||
generateQRCodeCopy(QrandbarcodeDatas, code)
|
generateQRCodeCopy(QrandbarcodeDatas, code)
|
||||||
}
|
}
|
||||||
generateCodeImage={(code, codeType = 'Q') => generateCodeImage(code, codeType, QrandbarcodeDatas) }
|
generateCodeImage={(code, codeType = 'Q') => generateCodeImage(code, codeType, QrandbarcodeDatas)}
|
||||||
imageTagBarcodeAndQR={imageTagBarcodeAndQR}
|
imageTagBarcodeAndQR={imageTagBarcodeAndQR}
|
||||||
dropdownValue={dropdownValue}
|
dropdownValue={dropdownValue}
|
||||||
barcodeTemplateDetails={barcodeTemplateDetails}
|
barcodeTemplateDetails={barcodeTemplateDetails}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,76 @@
|
||||||
|
.viewerExcelupload {
|
||||||
|
.ant-table-tbody {
|
||||||
|
.old-row {
|
||||||
|
background-color: #97441d !important;
|
||||||
|
|
||||||
|
td {
|
||||||
|
background-color: #ffe1fb !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: #ffe1fb !important;
|
||||||
|
|
||||||
|
> td {
|
||||||
|
background-color: #ffe1fb !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.modified-row {
|
||||||
|
background-color: #cdffd5 !important;
|
||||||
|
|
||||||
|
td {
|
||||||
|
background-color: #cdffd5 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: #cdffd5 !important;
|
||||||
|
|
||||||
|
> td {
|
||||||
|
background-color: #cdffd5 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-table-tbody > tr.old-row:hover > td {
|
||||||
|
background-color: #ff9595 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-table-tbody > tr.modified-row:hover > td {
|
||||||
|
background-color: #aeffbb !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.legend-container {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
display: flex;
|
||||||
|
gap: 15px;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.legend-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.legend-box {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.old-box {
|
||||||
|
background: #ffe1fb;
|
||||||
|
border: 1px solid #ff43e6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modified-box {
|
||||||
|
background: #cdffd5;
|
||||||
|
border: 1px solid #72e018;
|
||||||
|
}
|
||||||
|
|
||||||
|
.legend-text {
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
import { useEffect, useRef } from 'react';
|
||||||
|
|
||||||
|
function useWhyDidYouUpdate(componentName, props) {
|
||||||
|
const prevProps = useRef(props);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const allKeys = Object.keys({ ...prevProps.current, ...props });
|
||||||
|
const changes = {};
|
||||||
|
|
||||||
|
allKeys.forEach((key) => {
|
||||||
|
if (prevProps.current[key] !== props[key]) {
|
||||||
|
changes[key] = {
|
||||||
|
from: prevProps.current[key],
|
||||||
|
to: props[key],
|
||||||
|
};
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (Object.keys(changes).length > 0) {
|
||||||
|
console.log(`🔍 ${componentName} re-rendered due to:`, changes);
|
||||||
|
}
|
||||||
|
|
||||||
|
prevProps.current = props;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export default useWhyDidYouUpdate
|
||||||
|
|
@ -21,13 +21,9 @@
|
||||||
color: #fff;
|
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;
|
||||||
|
|
@ -592,12 +583,12 @@
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
>button:nth-child(1) {
|
> button:nth-child(1) {
|
||||||
background-color: #daecfd;
|
background-color: #daecfd;
|
||||||
color: #1292ee;
|
color: #1292ee;
|
||||||
}
|
}
|
||||||
|
|
||||||
>button:nth-child(2) {
|
> button:nth-child(2) {
|
||||||
background-color: #ffdcdc;
|
background-color: #ffdcdc;
|
||||||
color: #ee3333;
|
color: #ee3333;
|
||||||
}
|
}
|
||||||
|
|
@ -616,7 +607,7 @@
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
|
|
||||||
>div:nth-child(2) {
|
> div:nth-child(2) {
|
||||||
width: max-content;
|
width: max-content;
|
||||||
font-size: 12px !important;
|
font-size: 12px !important;
|
||||||
height: max-content;
|
height: max-content;
|
||||||
|
|
@ -669,7 +660,7 @@
|
||||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// deilivery Address
|
// deilivery Address
|
||||||
|
|
||||||
.Address-button {
|
.Address-button {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -698,7 +689,7 @@
|
||||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
.deliveryaddress{
|
.deliveryaddress {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
@ -706,7 +697,7 @@
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
height: max-content;
|
height: max-content;
|
||||||
.deliveryaddress_edit{
|
.deliveryaddress_edit {
|
||||||
color: #0cabf4;
|
color: #0cabf4;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
@ -1085,7 +1077,7 @@ table {
|
||||||
border: 1px solid #dadada;
|
border: 1px solid #dadada;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
|
|
||||||
>img {
|
> img {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
max-height: 100%;
|
max-height: 100%;
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
|
|
@ -1210,7 +1202,7 @@ table {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
>img {
|
> img {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
max-height: 100%;
|
max-height: 100%;
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
|
|
@ -1237,7 +1229,7 @@ table {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
>img {
|
> img {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
max-height: 100%;
|
max-height: 100%;
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
|
|
@ -1273,7 +1265,7 @@ table {
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
>img {
|
> img {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
max-height: 100%;
|
max-height: 100%;
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
|
|
@ -1300,7 +1292,7 @@ table {
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
>img {
|
> img {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
max-height: 100%;
|
max-height: 100%;
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
|
|
@ -1328,7 +1320,7 @@ table {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
>img {
|
> img {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
max-height: 100%;
|
max-height: 100%;
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
|
|
@ -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;
|
||||||
|
|
@ -319,14 +326,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.viewerExcelupload .ant-table-wrapper,
|
.viewerExcelupload .ant-table-wrapper,
|
||||||
.viewerExcelupload .ant-table-tbody>tr.ant-table-row>td {
|
.viewerExcelupload .ant-table-tbody > tr.ant-table-row > td {
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
.viewerExcelupload .ant-table-wrapper,
|
.viewerExcelupload .ant-table-wrapper,
|
||||||
.viewerExcelupload .ant-table-thead>tr>th {
|
.viewerExcelupload .ant-table-thead > tr > th {
|
||||||
padding: 1px 8px !important;
|
padding: 1px 8px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -381,7 +388,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.productinputForm {
|
.productinputForm {
|
||||||
.ant-input-affix-wrapper>input.ant-input {
|
.ant-input-affix-wrapper > input.ant-input {
|
||||||
padding-top: 1.5rem;
|
padding-top: 1.5rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -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;
|
||||||
|
|
@ -435,7 +442,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-Add-HSN {
|
.product-Add-HSN {
|
||||||
.ant-input-affix-wrapper>input.ant-input {
|
.ant-input-affix-wrapper > input.ant-input {
|
||||||
padding: 12px 0 0 0 !important;
|
padding: 12px 0 0 0 !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -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,9 +480,13 @@
|
||||||
.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;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
@ -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;
|
||||||
|
|
||||||
|
|
@ -116,4 +115,38 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.SheetIndiacte {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 1rem;
|
||||||
|
|
||||||
|
div {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mdsheet {
|
||||||
|
width: 25px;
|
||||||
|
height: 25px;
|
||||||
|
border: 1px solid #5bff73;
|
||||||
|
background-color: #b3ffbf;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
.mdsheet2 {
|
||||||
|
width: 25px;
|
||||||
|
border-radius: 4px;
|
||||||
|
height: 25px;
|
||||||
|
background-color: #ffc7f8;
|
||||||
|
border: 1px solid #ff74ec;
|
||||||
|
}
|
||||||
|
|
||||||
|
span {
|
||||||
|
color: #333;
|
||||||
|
font-family: "Poppins";
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue