add Missed Api call fn
This commit is contained in:
parent
b1c5327e0a
commit
14fb7e3088
|
|
@ -120,7 +120,7 @@ import { ApplicationPreferences } from '../../../../Features/BrachLogin/BranchLo
|
||||||
import { useDateStore } from '../../../../Features/BookingScreen/BookingData/DateStore.js';
|
import { useDateStore } from '../../../../Features/BookingScreen/BookingData/DateStore.js';
|
||||||
import AddProduct from '../../../../Components/AddProduct/AddProduct.jsx';
|
import AddProduct from '../../../../Components/AddProduct/AddProduct.jsx';
|
||||||
import { MdOutlineAddShoppingCart } from 'react-icons/md';
|
import { MdOutlineAddShoppingCart } from 'react-icons/md';
|
||||||
import { bulkpostdata } from '../../../../Features/ProductPage/ProductPage.js';
|
import { bulkpostdata, getUomData } from '../../../../Features/ProductPage/ProductPage.js';
|
||||||
import ProductPriceChange from '../UtillComponents/ProductPriceChange.jsx';
|
import ProductPriceChange from '../UtillComponents/ProductPriceChange.jsx';
|
||||||
import ExpireConfirmModal from '../BookingFunctionality/ExpireConfirmModal.jsx';
|
import ExpireConfirmModal from '../BookingFunctionality/ExpireConfirmModal.jsx';
|
||||||
import { calculateOverAllQtyLimit } from '../../../../utils/calculations.js';
|
import { calculateOverAllQtyLimit } from '../../../../utils/calculations.js';
|
||||||
|
|
@ -162,7 +162,7 @@ export function SortableCard({ id, children, item }) {
|
||||||
|
|
||||||
const BSItemCard = (props) => {
|
const BSItemCard = (props) => {
|
||||||
const cardFunction = props?.cardFunctionality;
|
const cardFunction = props?.cardFunctionality;
|
||||||
const { connectingState = null, setConnectingState = () => {} } = props;
|
const { connectingState = null, setConnectingState = () => { } } = props;
|
||||||
console.log(connectingState?.positionChange, 'positionChange');
|
console.log(connectingState?.positionChange, 'positionChange');
|
||||||
// const applyOffer = useApplyOfferto_CardDetail();
|
// const applyOffer = useApplyOfferto_CardDetail();
|
||||||
const preferenceDatas = useSelector(PreferenceData, shallowEqual);
|
const preferenceDatas = useSelector(PreferenceData, shallowEqual);
|
||||||
|
|
@ -978,6 +978,7 @@ const BSItemCard = (props) => {
|
||||||
await dispatch(
|
await dispatch(
|
||||||
getOfferinBooking({ AppId: AppId, CompId: CompId, BranchId: BranchId })
|
getOfferinBooking({ AppId: AppId, CompId: CompId, BranchId: BranchId })
|
||||||
).unwrap();
|
).unwrap();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
@ -1055,11 +1056,17 @@ const BSItemCard = (props) => {
|
||||||
if (AppId && CompId && BranchId) {
|
if (AppId && CompId && BranchId) {
|
||||||
fetchedit();
|
fetchedit();
|
||||||
GetmultipleSearchData();
|
GetmultipleSearchData();
|
||||||
|
getUom()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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 getUom = () => {
|
||||||
|
dispatch(getUomData());
|
||||||
|
}
|
||||||
|
|
||||||
const GetmultipleSearchData = async () => {
|
const GetmultipleSearchData = async () => {
|
||||||
const data = {
|
const data = {
|
||||||
AppId,
|
AppId,
|
||||||
|
|
@ -3728,7 +3735,7 @@ const BSItemCard = (props) => {
|
||||||
parseInt(totalSelectedProductQty || 0) +
|
parseInt(totalSelectedProductQty || 0) +
|
||||||
parseInt(reorderComboConsumed || 0);
|
parseInt(reorderComboConsumed || 0);
|
||||||
}
|
}
|
||||||
} catch (_) {}
|
} catch (_) { }
|
||||||
let getCurrentProdDtl = orderDetails?.filter(
|
let getCurrentProdDtl = orderDetails?.filter(
|
||||||
(a) => a?.ProdName === ProdName
|
(a) => a?.ProdName === ProdName
|
||||||
);
|
);
|
||||||
|
|
@ -3929,7 +3936,7 @@ const BSItemCard = (props) => {
|
||||||
parseInt(totalSelectedProductQty || 0) +
|
parseInt(totalSelectedProductQty || 0) +
|
||||||
parseInt(reorderComboConsumed || 0);
|
parseInt(reorderComboConsumed || 0);
|
||||||
}
|
}
|
||||||
} catch (_) {}
|
} catch (_) { }
|
||||||
let getCurrentProdDtl = orderDetails?.filter((a) => a?.ProdId === ProdId);
|
let getCurrentProdDtl = orderDetails?.filter((a) => a?.ProdId === ProdId);
|
||||||
let totalOrderQty = getCurrentProdDtl?.reduce((accumulator, card) => {
|
let totalOrderQty = getCurrentProdDtl?.reduce((accumulator, card) => {
|
||||||
return (
|
return (
|
||||||
|
|
@ -3965,7 +3972,7 @@ const BSItemCard = (props) => {
|
||||||
}, 0);
|
}, 0);
|
||||||
totalOrderQty =
|
totalOrderQty =
|
||||||
parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0);
|
parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0);
|
||||||
} catch (_) {}
|
} catch (_) { }
|
||||||
let OverallProdQty = totalOrderQty - totalSelectedProductQty;
|
let OverallProdQty = totalOrderQty - totalSelectedProductQty;
|
||||||
if (
|
if (
|
||||||
parseInt(ItemQuantity) >
|
parseInt(ItemQuantity) >
|
||||||
|
|
@ -4051,7 +4058,7 @@ const BSItemCard = (props) => {
|
||||||
parseInt(totalSelectedProductQty || 0) +
|
parseInt(totalSelectedProductQty || 0) +
|
||||||
parseInt(reorderComboConsumed || 0);
|
parseInt(reorderComboConsumed || 0);
|
||||||
}
|
}
|
||||||
} catch (_) {}
|
} catch (_) { }
|
||||||
let getCurrentProdDtl = orderDetails?.filter((a) => a?.ProdId === ProdId);
|
let getCurrentProdDtl = orderDetails?.filter((a) => a?.ProdId === ProdId);
|
||||||
let totalOrderQty = getCurrentProdDtl?.reduce((accumulator, card) => {
|
let totalOrderQty = getCurrentProdDtl?.reduce((accumulator, card) => {
|
||||||
return (
|
return (
|
||||||
|
|
@ -4090,7 +4097,7 @@ const BSItemCard = (props) => {
|
||||||
}, 0);
|
}, 0);
|
||||||
totalOrderQty =
|
totalOrderQty =
|
||||||
parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0);
|
parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0);
|
||||||
} catch (_) {}
|
} catch (_) { }
|
||||||
let OverallProdQty = totalOrderQty - totalSelectedProductQty;
|
let OverallProdQty = totalOrderQty - totalSelectedProductQty;
|
||||||
if (
|
if (
|
||||||
parseInt(ItemQuantity) >
|
parseInt(ItemQuantity) >
|
||||||
|
|
@ -4182,7 +4189,7 @@ const BSItemCard = (props) => {
|
||||||
parseInt(totalSelectedProductQty || 0) +
|
parseInt(totalSelectedProductQty || 0) +
|
||||||
parseInt(reorderComboConsumed || 0);
|
parseInt(reorderComboConsumed || 0);
|
||||||
}
|
}
|
||||||
} catch (_) {}
|
} catch (_) { }
|
||||||
let getCurrentProdDtl = orderDetails?.filter(
|
let getCurrentProdDtl = orderDetails?.filter(
|
||||||
(a) => a?.ProdId === ProdId && a?.InwardDtlId === InwardDtlId
|
(a) => a?.ProdId === ProdId && a?.InwardDtlId === InwardDtlId
|
||||||
);
|
);
|
||||||
|
|
@ -4225,7 +4232,7 @@ const BSItemCard = (props) => {
|
||||||
}, 0);
|
}, 0);
|
||||||
totalOrderQty =
|
totalOrderQty =
|
||||||
parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0);
|
parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0);
|
||||||
} catch (_) {}
|
} catch (_) { }
|
||||||
|
|
||||||
let OverallProdQty = totalOrderQty - totalSelectedProductQty;
|
let OverallProdQty = totalOrderQty - totalSelectedProductQty;
|
||||||
if (
|
if (
|
||||||
|
|
@ -4309,7 +4316,7 @@ const BSItemCard = (props) => {
|
||||||
parseInt(totalSelectedProductQty || 0) +
|
parseInt(totalSelectedProductQty || 0) +
|
||||||
parseInt(reorderComboConsumed || 0);
|
parseInt(reorderComboConsumed || 0);
|
||||||
}
|
}
|
||||||
} catch (_) {}
|
} catch (_) { }
|
||||||
let getCurrentProdDtl = orderDetails?.filter(
|
let getCurrentProdDtl = orderDetails?.filter(
|
||||||
(a) => a?.ProdId === ProdId && a?.InwardDtlId === InwardDtlId
|
(a) => a?.ProdId === ProdId && a?.InwardDtlId === InwardDtlId
|
||||||
);
|
);
|
||||||
|
|
@ -4356,7 +4363,7 @@ const BSItemCard = (props) => {
|
||||||
}, 0);
|
}, 0);
|
||||||
totalOrderQty =
|
totalOrderQty =
|
||||||
parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0);
|
parseInt(totalOrderQty || 0) + parseInt(comboConsumed || 0);
|
||||||
} catch (_) {}
|
} catch (_) { }
|
||||||
|
|
||||||
let OverallProdQty = totalOrderQty - totalSelectedProductQty;
|
let OverallProdQty = totalOrderQty - totalSelectedProductQty;
|
||||||
if (
|
if (
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue