Merge pull request 'bs item card exp issue' (#121) from Mohan into main
Reviewed-on: Pozomind/pozo-retail-app#121
This commit is contained in:
commit
ee5a123e63
|
|
@ -238,7 +238,10 @@ const BSItemCard = (props) => {
|
||||||
SelectedGlobalCardColorDetail,
|
SelectedGlobalCardColorDetail,
|
||||||
shallowEqual
|
shallowEqual
|
||||||
);
|
);
|
||||||
const GetmultipleSearchDatas = useSelector(GlobalGetmultipleSearchDatas, 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);
|
||||||
|
|
@ -246,7 +249,7 @@ const BSItemCard = (props) => {
|
||||||
const WSProductdata = useSelector(GlobalWSProduct, shallowEqual);
|
const WSProductdata = useSelector(GlobalWSProduct, shallowEqual);
|
||||||
const NewQrProductData = useSelector(GlobalNewQrProduct, shallowEqual);
|
const NewQrProductData = useSelector(GlobalNewQrProduct, shallowEqual);
|
||||||
const ReportholdData = useSelector(GlobalReorderHoldDetails, shallowEqual);
|
const ReportholdData = useSelector(GlobalReorderHoldDetails, shallowEqual);
|
||||||
console.log(GetmultipleSearchDatas, "GetmultipleSearchDatas")
|
console.log(GetmultipleSearchDatas, 'GetmultipleSearchDatas');
|
||||||
const ReorderProductData = useSelector(
|
const ReorderProductData = useSelector(
|
||||||
GlobalReorderProductDetails,
|
GlobalReorderProductDetails,
|
||||||
shallowEqual
|
shallowEqual
|
||||||
|
|
@ -315,6 +318,7 @@ const BSItemCard = (props) => {
|
||||||
onOk: null,
|
onOk: null,
|
||||||
onCancel: null,
|
onCancel: null,
|
||||||
});
|
});
|
||||||
|
|
||||||
const salespagefields = appPreferences?.find(
|
const salespagefields = appPreferences?.find(
|
||||||
(pref) => pref?.PreferredCatName === 'Sales Page Fields'
|
(pref) => pref?.PreferredCatName === 'Sales Page Fields'
|
||||||
)?.PreferenceCatDetails;
|
)?.PreferenceCatDetails;
|
||||||
|
|
@ -1030,7 +1034,7 @@ const BSItemCard = (props) => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (AppId && CompId && BranchId) {
|
if (AppId && CompId && BranchId) {
|
||||||
fetchedit();
|
fetchedit();
|
||||||
GetmultipleSearchData()
|
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
|
||||||
|
|
@ -1044,10 +1048,9 @@ const BSItemCard = (props) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await dispatch(getmultipleSearch(data))
|
const response = await dispatch(getmultipleSearch(data));
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Get Search Terms Error:", error);
|
console.error('Get Search Terms Error:', error);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1066,9 +1069,10 @@ const BSItemCard = (props) => {
|
||||||
setNoSubcatCardData();
|
setNoSubcatCardData();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ProductSearch?.length > 5 && GetmultipleSearchDatas.some(
|
if (
|
||||||
e => e.toLowerCase() === "qrcode"
|
ProductSearch?.length > 5 &&
|
||||||
)) {
|
GetmultipleSearchDatas.some((e) => e.toLowerCase() === 'qrcode')
|
||||||
|
) {
|
||||||
setQuickAdd(true);
|
setQuickAdd(true);
|
||||||
}
|
}
|
||||||
}, [ProductSearch, GetmultipleSearchDatas]);
|
}, [ProductSearch, GetmultipleSearchDatas]);
|
||||||
|
|
@ -1741,7 +1745,7 @@ const BSItemCard = (props) => {
|
||||||
onOk: () => expQtyFun(qtyExpData),
|
onOk: () => expQtyFun(qtyExpData),
|
||||||
onCancel: () => {
|
onCancel: () => {
|
||||||
setRepeatedModel(false);
|
setRepeatedModel(false);
|
||||||
(setProdexpir(false),closeExpireModal());
|
(setProdexpir(false), closeExpireModal());
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
setQtyExpData(index);
|
setQtyExpData(index);
|
||||||
|
|
@ -2049,7 +2053,7 @@ const BSItemCard = (props) => {
|
||||||
if (modiffiedData.OverAllExpStatus === 'Y' && ExpiredProduct) {
|
if (modiffiedData.OverAllExpStatus === 'Y' && ExpiredProduct) {
|
||||||
openExpireModal({
|
openExpireModal({
|
||||||
title: 'Product Expires',
|
title: 'Product Expires',
|
||||||
onOk: () => expFun(Item),
|
onOk: () => expFun(modiffiedData),
|
||||||
});
|
});
|
||||||
setItem(modiffiedData);
|
setItem(modiffiedData);
|
||||||
} else if (modiffiedData) {
|
} else if (modiffiedData) {
|
||||||
|
|
@ -5117,6 +5121,7 @@ const BSItemCard = (props) => {
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const expFun = (item) => {
|
const expFun = (item) => {
|
||||||
|
console.log(item, 'itemitemitemitemitemitemitemitem');
|
||||||
let count = item?.ProductDetail?.length;
|
let count = item?.ProductDetail?.length;
|
||||||
if (count > 1) {
|
if (count > 1) {
|
||||||
Quantity();
|
Quantity();
|
||||||
|
|
@ -5231,7 +5236,7 @@ const BSItemCard = (props) => {
|
||||||
|
|
||||||
setQtyIndex(selectedProIndex);
|
setQtyIndex(selectedProIndex);
|
||||||
setRepeatedModel(true);
|
setRepeatedModel(true);
|
||||||
closeExpireModal()
|
closeExpireModal();
|
||||||
};
|
};
|
||||||
|
|
||||||
const expVerFun = (item) => {
|
const expVerFun = (item) => {
|
||||||
|
|
@ -5285,8 +5290,6 @@ const BSItemCard = (props) => {
|
||||||
};
|
};
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Example usage for checking the length of 'ProdVariantDetails'
|
// Example usage for checking the length of 'ProdVariantDetails'
|
||||||
const widthBasedOnProdVariantDetails = getMaxBrandWidth();
|
const widthBasedOnProdVariantDetails = getMaxBrandWidth();
|
||||||
const ExpDate = useSelector(GlobalExpDateforHeight);
|
const ExpDate = useSelector(GlobalExpDateforHeight);
|
||||||
|
|
@ -7245,64 +7248,62 @@ const BSItemCard = (props) => {
|
||||||
</SortableContext>
|
</SortableContext>
|
||||||
</DndContext>
|
</DndContext>
|
||||||
</>
|
</>
|
||||||
)
|
) : ProductSearch?.length > 5 &&
|
||||||
|
GetmultipleSearchDatas.some(
|
||||||
|
(e) => e.toLowerCase() === 'qrcode'
|
||||||
: 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 */}
|
||||||
<FeaturesFunctionalities
|
<FeaturesFunctionalities
|
||||||
handleQuickAddCancel={handleQuickCancel}
|
handleQuickAddCancel={handleQuickCancel}
|
||||||
QuickAdd={QuickAdd}
|
QuickAdd={QuickAdd}
|
||||||
ProductSearch={true}
|
ProductSearch={true}
|
||||||
ProductSearchType={'I'}
|
ProductSearchType={'I'}
|
||||||
cardData={cardDataForNewPrd}
|
cardData={cardDataForNewPrd}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<div
|
<div
|
||||||
className={!temp5 ? 'NodataFound' : 'NodataFound5'}
|
className={!temp5 ? 'NodataFound' : 'NodataFound5'}
|
||||||
style={{
|
style={{
|
||||||
display: globalAccessForOthers && 'none',
|
display: globalAccessForOthers && 'none',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div align="center" class="fond">
|
<div align="center" className="fond">
|
||||||
<div class="contener_general">
|
<div className="contener_general">
|
||||||
<div class="contener_mixte">
|
<div className="contener_mixte">
|
||||||
<div class="ballcolor ball_1"> </div>
|
<div className="ballcolor ball_1"> </div>
|
||||||
</div>
|
</div>
|
||||||
<div class="contener_mixte">
|
<div className="contener_mixte">
|
||||||
<div class="ballcolor ball_2"> </div>
|
<div className="ballcolor ball_2"> </div>
|
||||||
</div>
|
</div>
|
||||||
<div class="contener_mixte">
|
<div className="contener_mixte">
|
||||||
<div class="ballcolor ball_3"> </div>
|
<div className="ballcolor ball_3"> </div>
|
||||||
</div>
|
</div>
|
||||||
<div class="contener_mixte">
|
<div className="contener_mixte">
|
||||||
<div class="ballcolor ball_4"> </div>
|
<div className="ballcolor ball_4"> </div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</div>
|
||||||
)}
|
</>
|
||||||
|
)}
|
||||||
{paymentloader === true && (
|
{paymentloader === true && (
|
||||||
<div class="Payment-loader1">
|
<div className="Payment-loader1">
|
||||||
<div class="Payment-loader">
|
<div className="Payment-loader">
|
||||||
<div class="contener_mixte">
|
<div className="contener_mixte">
|
||||||
<div class="ballcolor ball_1"> </div>
|
<div className="ballcolor ball_1"> </div>
|
||||||
</div>
|
</div>
|
||||||
<div class="contener_mixte">
|
<div className="contener_mixte">
|
||||||
<div class="ballcolor ball_2"> </div>
|
<div className="ballcolor ball_2"> </div>
|
||||||
</div>
|
</div>
|
||||||
<div class="contener_mixte">
|
<div className="contener_mixte">
|
||||||
<div class="ballcolor ball_3"> </div>
|
<div className="ballcolor ball_3"> </div>
|
||||||
</div>
|
</div>
|
||||||
<div class="contener_mixte">
|
<div className="contener_mixte">
|
||||||
<div class="ballcolor ball_4"> </div>
|
<div className="ballcolor ball_4"> </div>
|
||||||
</div>
|
</div>
|
||||||
<p style={{ marginTop: '2rem' }}>
|
<p style={{ marginTop: '2rem' }}>
|
||||||
{' '}
|
{' '}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue