Merge pull request 'add Missed Api call fn' (#307) from quickproductadd into main

Reviewed-on: Pozomind/pozo-retail-app#307
This commit is contained in:
karthikalakshmi 2026-03-24 19:03:56 +05:30
commit b3a9ecdc80
1 changed files with 513 additions and 506 deletions

View File

@ -120,7 +120,7 @@ import { ApplicationPreferences } from '../../../../Features/BrachLogin/BranchLo
import { useDateStore } from '../../../../Features/BookingScreen/BookingData/DateStore.js';
import AddProduct from '../../../../Components/AddProduct/AddProduct.jsx';
import { MdOutlineAddShoppingCart } from 'react-icons/md';
import { bulkpostdata } from '../../../../Features/ProductPage/ProductPage.js';
import { bulkpostdata, getUomData } from '../../../../Features/ProductPage/ProductPage.js';
import ProductPriceChange from '../UtillComponents/ProductPriceChange.jsx';
import ExpireConfirmModal from '../BookingFunctionality/ExpireConfirmModal.jsx';
import { calculateOverAllQtyLimit } from '../../../../utils/calculations.js';
@ -162,7 +162,7 @@ export function SortableCard({ id, children, item }) {
const BSItemCard = (props) => {
const cardFunction = props?.cardFunctionality;
const { connectingState = null, setConnectingState = () => {} } = props;
const { connectingState = null, setConnectingState = () => { } } = props;
console.log(connectingState?.positionChange, 'positionChange');
// const applyOffer = useApplyOfferto_CardDetail();
const preferenceDatas = useSelector(PreferenceData, shallowEqual);
@ -978,6 +978,7 @@ const BSItemCard = (props) => {
await dispatch(
getOfferinBooking({ AppId: AppId, CompId: CompId, BranchId: BranchId })
).unwrap();
}
useEffect(() => {
@ -1055,11 +1056,17 @@ const BSItemCard = (props) => {
if (AppId && CompId && BranchId) {
fetchedit();
GetmultipleSearchData();
getUom()
}
// dispatch(changepreOrder(false)); Commented to Add Normal Produts After Adding the Combo Pack !!!!!! Dont Touch Without Shifayath Permission
}, [AppId, CompId, BranchId]);
const getUom = () => {
dispatch(getUomData());
}
const GetmultipleSearchData = async () => {
const data = {
AppId,
@ -3728,7 +3735,7 @@ const BSItemCard = (props) => {
parseInt(totalSelectedProductQty || 0) +
parseInt(reorderComboConsumed || 0);
}
} catch (_) {}
} catch (_) { }
let getCurrentProdDtl = orderDetails?.filter(
(a) => a?.ProdName === ProdName
);
@ -3929,7 +3936,7 @@ const BSItemCard = (props) => {
parseInt(totalSelectedProductQty || 0) +
parseInt(reorderComboConsumed || 0);
}
} catch (_) {}
} catch (_) { }
let getCurrentProdDtl = orderDetails?.filter((a) => a?.ProdId === ProdId);
let totalOrderQty = getCurrentProdDtl?.reduce((accumulator, card) => {
return (
@ -3965,7 +3972,7 @@ const BSItemCard = (props) => {
}, 0);
totalOrderQty =
parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0);
} catch (_) {}
} catch (_) { }
let OverallProdQty = totalOrderQty - totalSelectedProductQty;
if (
parseInt(ItemQuantity) >
@ -4051,7 +4058,7 @@ const BSItemCard = (props) => {
parseInt(totalSelectedProductQty || 0) +
parseInt(reorderComboConsumed || 0);
}
} catch (_) {}
} catch (_) { }
let getCurrentProdDtl = orderDetails?.filter((a) => a?.ProdId === ProdId);
let totalOrderQty = getCurrentProdDtl?.reduce((accumulator, card) => {
return (
@ -4090,7 +4097,7 @@ const BSItemCard = (props) => {
}, 0);
totalOrderQty =
parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0);
} catch (_) {}
} catch (_) { }
let OverallProdQty = totalOrderQty - totalSelectedProductQty;
if (
parseInt(ItemQuantity) >
@ -4182,7 +4189,7 @@ const BSItemCard = (props) => {
parseInt(totalSelectedProductQty || 0) +
parseInt(reorderComboConsumed || 0);
}
} catch (_) {}
} catch (_) { }
let getCurrentProdDtl = orderDetails?.filter(
(a) => a?.ProdId === ProdId && a?.InwardDtlId === InwardDtlId
);
@ -4225,7 +4232,7 @@ const BSItemCard = (props) => {
}, 0);
totalOrderQty =
parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0);
} catch (_) {}
} catch (_) { }
let OverallProdQty = totalOrderQty - totalSelectedProductQty;
if (
@ -4309,7 +4316,7 @@ const BSItemCard = (props) => {
parseInt(totalSelectedProductQty || 0) +
parseInt(reorderComboConsumed || 0);
}
} catch (_) {}
} catch (_) { }
let getCurrentProdDtl = orderDetails?.filter(
(a) => a?.ProdId === ProdId && a?.InwardDtlId === InwardDtlId
);
@ -4356,7 +4363,7 @@ const BSItemCard = (props) => {
}, 0);
totalOrderQty =
parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0);
} catch (_) {}
} catch (_) { }
let OverallProdQty = totalOrderQty - totalSelectedProductQty;
if (