Merge pull request 'others add bugfixing' (#171) from bugfixing into main

Reviewed-on: Pozomind/pozo-retail-app#171
This commit is contained in:
karthikalakshmi 2026-02-24 18:21:19 +05:30
commit 5b2720a7cd
7 changed files with 617 additions and 597 deletions

View File

@ -155,16 +155,16 @@ const BSBillingTable3 = () => {
OrderType === 'Hold'
? tableData?.filter((a, b) => a.BookingTypeName === 'TakeAway')
: tableData?.filter(
(a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId
);
(a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId
);
const OldtableDataDinein = tableData?.filter(
(a, b) => a.BookingTypeName === 'Dine In' && a?.SalesId
);
const OldtableDataTakeAway =
OrderType != 'Hold'
? tableData?.filter(
(a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId
)
(a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId
)
: [];
const [EditQuantity, setEditQuantity] = useState(false);
const [Modaldata, setModaldata] = useState([]);
@ -1057,9 +1057,9 @@ const BSBillingTable3 = () => {
)?.map((item, idx) =>
idx === 0
? {
...item,
FreeQty,
}
...item,
FreeQty,
}
: item
),
};
@ -1176,6 +1176,7 @@ const BSBillingTable3 = () => {
CompleteRemove: true,
InwardDtlId: isPaidproduct?.InwardDtlId,
BuyInwardDtlId: null,
OrderRate: isPaidproduct?.OrderRate,
Offer: 0,
});
} else if (isPaidproduct?.OrderQty > item?.OrderQty) {
@ -1350,6 +1351,7 @@ const BSBillingTable3 = () => {
InwardDtlId: item?.InwardDtlId,
BuyInwardDtlId: null,
Offer: item?.Offer,
OrderRate: item?.OrderRate,
});
await ChangeFreeprodlistFn({
OverAllFreeQty: isCheckFreeProduct?.OverAllFreeQty,
@ -1429,6 +1431,7 @@ const BSBillingTable3 = () => {
InwardDtlId: item?.InwardDtlId,
BuyInwardDtlId: null,
Offer: item?.Offer,
OrderRate: item?.OrderRate,
});
await ChangeFreeprodlistFn({
OverAllFreeQty: isCheckFreeProduct?.OverAllFreeQty,
@ -1462,6 +1465,8 @@ const BSBillingTable3 = () => {
InwardDtlId: item?.InwardDtlId,
BuyInwardDtlId: null,
Offer: item?.Offer,
OrderRate: item?.OrderRate,
});
await ChangeOfferAppliedProdsFn({
inwardDtlId: item?.InwardDtlId,
@ -1493,6 +1498,7 @@ const BSBillingTable3 = () => {
InwardDtlId: isPaidProductAvailableInCart?.InwardDtlId,
BuyInwardDtlId: null,
Offer: 0,
OrderRate: isPaidProductAvailableInCart?.OrderRate,
});
} else if (
isPaidProductAvailableInCart?.OrderQty > item?.OrderQty
@ -1576,6 +1582,7 @@ const BSBillingTable3 = () => {
InwardDtlId: item?.InwardDtlId,
BuyInwardDtlId: null,
Offer: item?.Offer,
OrderRate: item?.OrderRate,
});
await ChangeFreeprodlistFn({
OverAllFreeQty: freeProdList?.OverAllFreeQty,
@ -1602,6 +1609,7 @@ const BSBillingTable3 = () => {
InwardDtlId: item?.InwardDtlId,
BuyInwardDtlId: null,
Offer: item?.Offer,
OrderRate: item?.OrderRate,
});
await ChangeFreeprodlistFn({
OverAllFreeQty: freeProdList?.OverAllFreeQty,
@ -1649,7 +1657,7 @@ const BSBillingTable3 = () => {
InwardDtlId: item?.InwardDtlId,
BuyInwardDtlId: null,
Offer: item?.Offer,
OrderRate: item?.OrderRate,
OrderRate: item?.OrderRate
});
} else {
const isCheck = GlobalOfferAppliedProductsData?.find(
@ -1951,6 +1959,7 @@ const BSBillingTable3 = () => {
InwardDtlId: item?.InwardDtlId,
BuyInwardDtlId: item?.InwardDtlId,
Offer: item?.Offer,
OrderRate: item?.OrderRate
});
await ChangeFreeprodlistFn({
OverAllFreeQty: FreeProd?.OverAllFreeQty - item?.OrderQty,
@ -1969,6 +1978,8 @@ const BSBillingTable3 = () => {
InwardDtlId: item?.InwardDtlId,
BuyInwardDtlId: item?.InwardDtlId,
Offer: item?.Offer,
OrderRate: item?.OrderRate,
});
await ChangeFreeprodlistFn({
OverAllFreeQty: item?.OrderQty,
@ -2394,11 +2405,10 @@ const BSBillingTable3 = () => {
{OldtableDataTakeAway?.map((item, index) => (
<tr
key={index}
className={`${
item?.SalesId && OrderType !== 'Hold'
? 'BSBill-Table3-content-Disabled'
: 'BSBill-Table3-content'
}
className={`${item?.SalesId && OrderType !== 'Hold'
? 'BSBill-Table3-content-Disabled'
: 'BSBill-Table3-content'
}
`}
style={{
@ -2409,15 +2419,15 @@ const BSBillingTable3 = () => {
? item?.SalesId && OrderType !== 'Hold'
? 'rgb(243, 248, 213)'
: triggerAnimation &&
index === 0 &&
!item?.SalesId &&
tableDataTakeAway?.length >= PreviousdataLength
index === 0 &&
!item?.SalesId &&
tableDataTakeAway?.length >= PreviousdataLength
? 'wheat'
: triggerAnimation &&
index === 0 &&
tableDataTakeAway?.length >= PreviousdataLength &&
!HoldOrderDtl &&
!UnpaidData
index === 0 &&
tableDataTakeAway?.length >= PreviousdataLength &&
!HoldOrderDtl &&
!UnpaidData
? 'wheat'
: 'inherit'
: 'none',
@ -2425,9 +2435,9 @@ const BSBillingTable3 = () => {
item?.SalesId && OrderType !== 'Hold'
? 'rgb(243, 248, 213)'
: GlobEstBooking === 'ParEst' &&
GlobProdwisedata?.includes(
item?.InwardDtlId + ' ' + item?.BookingTypeName
)
GlobProdwisedata?.includes(
item?.InwardDtlId + ' ' + item?.BookingTypeName
)
? '#b2d1f7'
: index % 2 === 0
? 'white'
@ -2483,7 +2493,7 @@ const BSBillingTable3 = () => {
style={{ fontFamily: 'Poppins' }}
onClick={() =>
item.FullProductIdentifierDtls?.length > 0 ||
item.ProductIdentifierDtls?.length > 0
item.ProductIdentifierDtls?.length > 0
? handleImeiDetails(item)
: editField && handleEditQuantity(item)
}
@ -2530,21 +2540,21 @@ const BSBillingTable3 = () => {
{productBasedExtraCharges?.find(
(find) => find.ProdId === item.ProdId
) !== undefined && (
<div
style={{
fontSize: '10px',
fontWeight: '500',
whiteSpace: 'nowrap',
}}
>
Extra Charges :{' '}
{
productBasedExtraCharges?.find(
(find) => find.ProdId === item.ProdId
)?.TotalAmt
}
</div>
)}
<div
style={{
fontSize: '10px',
fontWeight: '500',
whiteSpace: 'nowrap',
}}
>
Extra Charges :{' '}
{
productBasedExtraCharges?.find(
(find) => find.ProdId === item.ProdId
)?.TotalAmt
}
</div>
)}
</td>
</>
)}
@ -2637,8 +2647,8 @@ const BSBillingTable3 = () => {
>
{allowDecimal
? Number(
item?.TotalAmt - (item?.Offer || 0) || 0
).toFixed(2)
item?.TotalAmt - (item?.Offer || 0) || 0
).toFixed(2)
: Number(item?.TotalAmt - (item?.Offer || 0) || 0)}
</td>
)}
@ -2673,11 +2683,10 @@ const BSBillingTable3 = () => {
{OldtableDataDinein?.map((item, index) => (
<tr
key={OldtableDataTakeAway?.length + index}
className={`${
item?.SalesId
? 'BSBill-Table3-content-Disabled'
: 'BSBill-Table3-content'
}
className={`${item?.SalesId
? 'BSBill-Table3-content-Disabled'
: 'BSBill-Table3-content'
}
`}
style={{
@ -2688,26 +2697,26 @@ const BSBillingTable3 = () => {
? item?.SalesId
? 'rgb(243, 248, 213)'
: BookingType === 'Dine In' &&
triggerAnimation &&
OldtableDataTakeAway?.length + index === 0 &&
!item?.SalesId &&
tableDataDinein?.length >= PreviousdataLength
triggerAnimation &&
OldtableDataTakeAway?.length + index === 0 &&
!item?.SalesId &&
tableDataDinein?.length >= PreviousdataLength
? 'wheat'
: BookingType !== 'Dine In' &&
triggerAnimation &&
OldtableDataTakeAway?.length + index === 0 &&
tableDataDinein?.length >= PreviousdataLength &&
!HoldOrderDtl &&
!UnpaidData
triggerAnimation &&
OldtableDataTakeAway?.length + index === 0 &&
tableDataDinein?.length >= PreviousdataLength &&
!HoldOrderDtl &&
!UnpaidData
? 'wheat'
: 'inherit'
: 'none',
background: item?.SalesId
? 'rgb(243, 248, 213)'
: GlobEstBooking === 'ParEst' &&
GlobProdwisedata?.includes(
item?.InwardDtlId + ' ' + item?.BookingTypeName
)
GlobProdwisedata?.includes(
item?.InwardDtlId + ' ' + item?.BookingTypeName
)
? '#b2d1f7'
: (OldtableDataTakeAway?.length + index) % 2 === 0
? 'white'
@ -2808,21 +2817,21 @@ const BSBillingTable3 = () => {
{productBasedExtraCharges?.find(
(find) => find.ProdId === item.ProdId
) !== undefined && (
<div
style={{
fontSize: '10px',
fontWeight: '500',
whiteSpace: 'nowrap',
}}
>
Extra Charges :{' '}
{
productBasedExtraCharges?.find(
(find) => find.ProdId === item.ProdId
)?.TotalAmt
}
</div>
)}
<div
style={{
fontSize: '10px',
fontWeight: '500',
whiteSpace: 'nowrap',
}}
>
Extra Charges :{' '}
{
productBasedExtraCharges?.find(
(find) => find.ProdId === item.ProdId
)?.TotalAmt
}
</div>
)}
</td>
</>
)}
@ -2915,8 +2924,8 @@ const BSBillingTable3 = () => {
>
{allowDecimal
? Number(
item?.TotalAmt - (item?.Offer || 0) || 0
).toFixed(2)
item?.TotalAmt - (item?.Offer || 0) || 0
).toFixed(2)
: Number(item?.TotalAmt - (item?.Offer || 0) || 0)}
</td>
)}
@ -2956,11 +2965,10 @@ const BSBillingTable3 = () => {
OldtableDataTakeAway?.length +
index
}
className={`${
BookingType === 'Dine In' && item?.SalesId
? 'BSBill-Table3-content-Disabled'
: 'BSBill-Table3-content'
}
className={`${BookingType === 'Dine In' && item?.SalesId
? 'BSBill-Table3-content-Disabled'
: 'BSBill-Table3-content'
}
`}
style={{
@ -2971,38 +2979,38 @@ const BSBillingTable3 = () => {
? BookingType === 'Dine In' && item?.SalesId
? 'rgb(243, 248, 213)'
: BookingType === 'Dine In' &&
triggerAnimation &&
OldtableDataDinein?.length +
OldtableDataTakeAway?.length +
index ===
0 &&
!item?.SalesId &&
tableDataTakeAway?.length >= PreviousdataLength
triggerAnimation &&
OldtableDataDinein?.length +
OldtableDataTakeAway?.length +
index ===
0 &&
!item?.SalesId &&
tableDataTakeAway?.length >= PreviousdataLength
? 'wheat'
: BookingType !== 'Dine In' &&
triggerAnimation &&
OldtableDataDinein?.length +
OldtableDataTakeAway?.length +
index ===
0 &&
tableDataTakeAway?.length >= PreviousdataLength &&
!HoldOrderDtl &&
!UnpaidData
triggerAnimation &&
OldtableDataDinein?.length +
OldtableDataTakeAway?.length +
index ===
0 &&
tableDataTakeAway?.length >= PreviousdataLength &&
!HoldOrderDtl &&
!UnpaidData
? 'wheat'
: (OldtableDataDinein?.length +
OldtableDataTakeAway?.length +
index) %
2 ===
0
OldtableDataTakeAway?.length +
index) %
2 ===
0
? 'white'
: SelectedBillColor?.['OverallBackgroundColor']
? SelectedBillColor?.['OverallBackgroundColor']
: '#d6d6d6'
: (OldtableDataDinein?.length +
OldtableDataTakeAway?.length +
index) %
2 ===
0
OldtableDataTakeAway?.length +
index) %
2 ===
0
? 'white'
: SelectedBillColor?.['OverallBackgroundColor']
? SelectedBillColor?.['OverallBackgroundColor']
@ -3011,15 +3019,15 @@ const BSBillingTable3 = () => {
BookingType === 'Dine In' && item?.SalesId
? 'rgb(243, 248, 213)'
: GlobEstBooking === 'ParEst' &&
GlobProdwisedata?.includes(
item?.InwardDtlId + ' ' + item?.BookingTypeName
)
GlobProdwisedata?.includes(
item?.InwardDtlId + ' ' + item?.BookingTypeName
)
? '#b2d1f7'
: (OldtableDataDinein?.length +
OldtableDataTakeAway?.length +
index) %
2 ===
0
OldtableDataTakeAway?.length +
index) %
2 ===
0
? 'white'
: SelectedBillColor?.['OverallBackgroundColor']
? SelectedBillColor?.['OverallBackgroundColor']
@ -3028,9 +3036,9 @@ const BSBillingTable3 = () => {
BillOrderPre === 'Y' && !BookingTypeBoth
? triggerAnimation &&
OldtableDataDinein?.length +
OldtableDataTakeAway?.length +
index ===
0 &&
OldtableDataTakeAway?.length +
index ===
0 &&
!item?.SalesId &&
tableDataTakeAway?.length >= PreviousdataLength &&
!HoldOrderDtl &&
@ -3079,7 +3087,7 @@ const BSBillingTable3 = () => {
style={{ fontFamily: 'Poppins' }}
onClick={() =>
item.FullProductIdentifierDtls?.length > 0 ||
item.ProductIdentifierDtls?.length > 0
item.ProductIdentifierDtls?.length > 0
? handleImeiDetails(item)
: editField && handleEditQuantity(item, index)
}
@ -3133,21 +3141,21 @@ const BSBillingTable3 = () => {
{productBasedExtraCharges?.find(
(find) => find.ProdId === item.ProdId
) !== undefined && (
<div
style={{
fontSize: '10px',
fontWeight: '500',
whiteSpace: 'nowrap',
}}
>
Extra Charges :{' '}
{
productBasedExtraCharges?.find(
(find) => find.ProdId === item.ProdId
)?.TotalAmt
}
</div>
)}
<div
style={{
fontSize: '10px',
fontWeight: '500',
whiteSpace: 'nowrap',
}}
>
Extra Charges :{' '}
{
productBasedExtraCharges?.find(
(find) => find.ProdId === item.ProdId
)?.TotalAmt
}
</div>
)}
</td>
</>
)}
@ -3241,8 +3249,8 @@ const BSBillingTable3 = () => {
>
{allowDecimal
? Number(
item?.TotalAmt - (item?.Offer || 0) || 0
).toFixed(2)
item?.TotalAmt - (item?.Offer || 0) || 0
).toFixed(2)
: Number(item?.TotalAmt - (item?.Offer || 0) || 0)}
</td>
)}
@ -3282,11 +3290,10 @@ const BSBillingTable3 = () => {
tableDataTakeAway?.length +
index
}
className={`${
BookingType === 'Dine In' && item?.SalesId
? 'BSBill-Table3-content-Disabled'
: 'BSBill-Table3-content'
}
className={`${BookingType === 'Dine In' && item?.SalesId
? 'BSBill-Table3-content-Disabled'
: 'BSBill-Table3-content'
}
`}
style={{
@ -3299,44 +3306,44 @@ const BSBillingTable3 = () => {
!BookingTypeBoth
? 'rgb(243, 248, 213)'
: BookingType === 'Dine In' &&
triggerAnimation &&
OldtableDataTakeAway?.length +
OldtableDataDinein?.length +
tableDataTakeAway?.length +
index ===
0 &&
!item?.SalesId &&
tableDataDinein?.length >= PreviousdataLength
triggerAnimation &&
OldtableDataTakeAway?.length +
OldtableDataDinein?.length +
tableDataTakeAway?.length +
index ===
0 &&
!item?.SalesId &&
tableDataDinein?.length >= PreviousdataLength
? 'wheat'
: BookingType !== 'Dine In' &&
triggerAnimation &&
OldtableDataTakeAway?.length +
OldtableDataDinein?.length +
tableDataTakeAway?.length +
index ===
0 &&
tableDataDinein?.length >= PreviousdataLength &&
!HoldOrderDtl &&
!UnpaidData
triggerAnimation &&
OldtableDataTakeAway?.length +
OldtableDataDinein?.length +
tableDataTakeAway?.length +
index ===
0 &&
tableDataDinein?.length >= PreviousdataLength &&
!HoldOrderDtl &&
!UnpaidData
? 'wheat'
: 'inherit'
: 'none',
background:
BookingType === 'Dine In' &&
item?.SalesId &&
!BookingTypeBoth
item?.SalesId &&
!BookingTypeBoth
? 'rgb(243, 248, 213)'
: GlobEstBooking === 'ParEst' &&
GlobProdwisedata?.includes(
item?.InwardDtlId + ' ' + item?.BookingTypeName
)
GlobProdwisedata?.includes(
item?.InwardDtlId + ' ' + item?.BookingTypeName
)
? '#b2d1f7'
: (OldtableDataTakeAway?.length +
OldtableDataDinein?.length +
tableDataTakeAway?.length +
index) %
2 ===
0
OldtableDataDinein?.length +
tableDataTakeAway?.length +
index) %
2 ===
0
? 'white'
: SelectedBillColor?.['OverallBackgroundColor']
? SelectedBillColor?.['OverallBackgroundColor']
@ -3345,10 +3352,10 @@ const BSBillingTable3 = () => {
BillOrderPre === 'Y' && !BookingTypeBoth
? triggerAnimation &&
OldtableDataTakeAway?.length +
OldtableDataDinein?.length +
tableDataTakeAway?.length +
index ===
0 &&
OldtableDataDinein?.length +
tableDataTakeAway?.length +
index ===
0 &&
!item?.SalesId &&
tableDataDinein?.length >= PreviousdataLength &&
!HoldOrderDtl &&
@ -3444,21 +3451,21 @@ const BSBillingTable3 = () => {
{productBasedExtraCharges?.find(
(find) => find.ProdId === item.ProdId
) !== undefined && (
<div
style={{
fontSize: '10px',
fontWeight: '500',
whiteSpace: 'nowrap',
}}
>
Extra Charges :{' '}
{
productBasedExtraCharges?.find(
(find) => find.ProdId === item.ProdId
)?.TotalAmt
}
</div>
)}
<div
style={{
fontSize: '10px',
fontWeight: '500',
whiteSpace: 'nowrap',
}}
>
Extra Charges :{' '}
{
productBasedExtraCharges?.find(
(find) => find.ProdId === item.ProdId
)?.TotalAmt
}
</div>
)}
</td>
</>
)}
@ -3551,8 +3558,8 @@ const BSBillingTable3 = () => {
>
{allowDecimal
? Number(
item?.TotalAmt - (item?.Offer || 0) || 0
).toFixed(2)
item?.TotalAmt - (item?.Offer || 0) || 0
).toFixed(2)
: Number(item?.TotalAmt - (item?.Offer || 0) || 0)}
</td>
)}

View File

@ -549,9 +549,9 @@ function BSCategoryHorizontal(props) {
AppId: AppId,
...(AvailableDate && selectedDate
? {
fromDate: selectedDate?.[0],
toDate: selectedDate?.[1],
}
fromDate: selectedDate?.[0],
toDate: selectedDate?.[1],
}
: {}),
};
@ -587,9 +587,9 @@ function BSCategoryHorizontal(props) {
AppId: AppId,
...(AvailableDate && selectedDate
? {
fromDate: selectedDate?.[0],
toDate: selectedDate?.[1],
}
fromDate: selectedDate?.[0],
toDate: selectedDate?.[1],
}
: {}),
};
let res = await dispatch(getSelectedFavItems(data)).unwrap();
@ -679,7 +679,7 @@ function BSCategoryHorizontal(props) {
UomTypePreference?.some?.(
(e) =>
e?.PreferredSubCatName?.toLowerCase() ==
item?.ConfigName?.toLowerCase() && e?.PreferredStatus == 'Y'
item?.ConfigName?.toLowerCase() && e?.PreferredStatus == 'Y'
)
);
@ -794,7 +794,7 @@ function BSCategoryHorizontal(props) {
var today = new Date();
var formattedDate = today.toISOString()?.split('T')[0];
const onFinish = async (values) => {
const onFinish = async (values) => {
const pattern = /(.+?) \(\d*[^\d]+\)/;
const matches = selectedprod.match(pattern);
@ -819,12 +819,15 @@ function BSCategoryHorizontal(props) {
postData['Size'] = values.Size;
postData['MRP'] = values.MRP;
postData['TaxId'] = values.TaxId;
postData['SinglePc'] = 'N';
if (EditState) {
const updatedData = {
...EditState,
Quantity: parseInt(values.Quantity),
SellPrice: values.MRP,
OtherProduct: 'Others',
SinglePc: 'N',
};
dispatch(changeothersdata(updatedData));
@ -838,6 +841,7 @@ function BSCategoryHorizontal(props) {
...othersdata,
Quantity: parseInt(values.Quantity),
OtherProduct: 'Others',
SinglePc: 'N',
};
dispatch(changeothersdata(updatedData));
@ -1073,9 +1077,9 @@ function BSCategoryHorizontal(props) {
backgroundColor:
!accessOther && accessToCard
? lightenColor(
SelectedCatgColor?.['BackgroundColor'],
0.4
)
SelectedCatgColor?.['BackgroundColor'],
0.4
)
: SelectedCatgColor?.['BackgroundColor'],
padding: padding,
border: accessToCard ? '1px solid' : undefined,
@ -1086,9 +1090,9 @@ function BSCategoryHorizontal(props) {
: SelectedCatgColor?.['BackgroundColor'] === '#000000'
? '#ffffff'
: darkenColor(
SelectedCatgColor?.['BackgroundColor'],
70
)
SelectedCatgColor?.['BackgroundColor'],
70
)
: undefined,
}}
className="sampleCard"
@ -1122,9 +1126,9 @@ function BSCategoryHorizontal(props) {
backgroundColor:
!accessOther && !accessToCard && -2 == indexval
? lightenColor(
SelectedCatgColor?.['BackgroundColor'],
0.4
)
SelectedCatgColor?.['BackgroundColor'],
0.4
)
: SelectedCatgColor?.['BackgroundColor'],
padding: padding,
border:
@ -1170,9 +1174,9 @@ function BSCategoryHorizontal(props) {
? index != indexval
? SelectedCatgColor?.['BackgroundColor']
: lightenColor(
SelectedCatgColor?.['BackgroundColor'],
0.4
)
SelectedCatgColor?.['BackgroundColor'],
0.4
)
: SelectedCatgColor?.['BackgroundColor'],
padding: padding,
border: '1px solid',
@ -1264,11 +1268,11 @@ function BSCategoryHorizontal(props) {
? index !== indexval
? SelectedCatgColor?.['BackgroundColor']
: lightenColor(
SelectedCatgColor?.[
'BackgroundColor'
],
0.4
)
SelectedCatgColor?.[
'BackgroundColor'
],
0.4
)
: SelectedCatgColor?.['BackgroundColor'],
padding: padding,
border: '1px solid',
@ -1276,18 +1280,18 @@ function BSCategoryHorizontal(props) {
index !== indexval
? SelectedCatgColor?.['BackgroundColor']
: SelectedCatgColor?.['BackgroundColor'] ===
'#ffffff'
'#ffffff'
? '#000000'
: SelectedCatgColor?.[
'BackgroundColor'
] === '#000000'
'BackgroundColor'
] === '#000000'
? '#ffffff'
: darkenColor(
SelectedCatgColor?.[
'BackgroundColor'
],
70
),
SelectedCatgColor?.[
'BackgroundColor'
],
70
),
userSelect: 'none',
minWidth: 'max-content', // set a width if needed
}}
@ -1342,16 +1346,16 @@ function BSCategoryHorizontal(props) {
backgroundColor:
!accessOther && accessToCard
? lightenColor(
SelectedCatgColor?.['BackgroundColor'],
0.4
)
SelectedCatgColor?.['BackgroundColor'],
0.4
)
: SelectedCatgColor?.['BackgroundColor'],
padding: padding,
border: accessToCard && '1px solid',
borderColor:
accessToCard &&
!accessOther &&
SelectedCatgColor?.['BackgroundColor'] == '#ffffff'
!accessOther &&
SelectedCatgColor?.['BackgroundColor'] == '#ffffff'
? '#000000'
: SelectedCatgColor?.['BackgroundColor'] === '#000000'
? '#ffffff'
@ -1391,7 +1395,7 @@ function BSCategoryHorizontal(props) {
border: accessOther && '1px solid',
borderColor:
accessOther &&
SelectedCatgColor?.['BackgroundColor'] == '#ffffff'
SelectedCatgColor?.['BackgroundColor'] == '#ffffff'
? '#000000'
: SelectedCatgColor?.['BackgroundColor'] === '#000000'
? '#ffffff'
@ -1942,7 +1946,7 @@ function BSCategoryHorizontal(props) {
? `${parts[0]}.${parts.slice(1).join('')}`
: cleanedValue;
}}
// disabled={!!EditState}
// disabled={!!EditState}
/>
</Form.Item>
</div>

View File

@ -414,9 +414,9 @@ function BSCategoryVertical(props) {
AppId: AppId,
...(AvailableDate && selectedDate
? {
fromDate: selectedDate?.[0],
toDate: selectedDate?.[1],
}
fromDate: selectedDate?.[0],
toDate: selectedDate?.[1],
}
: {}),
};
await dispatch(getSelectedFavItems(data1));
@ -445,9 +445,9 @@ function BSCategoryVertical(props) {
AppId: AppId,
...(AvailableDate && selectedDate
? {
fromDate: selectedDate?.[0],
toDate: selectedDate?.[1],
}
fromDate: selectedDate?.[0],
toDate: selectedDate?.[1],
}
: {}),
};
let res = await dispatch(getSelectedFavItems(data)).unwrap();
@ -534,7 +534,7 @@ function BSCategoryVertical(props) {
UomTypePreference?.some?.(
(e) =>
e?.PreferredSubCatName?.toLowerCase() ==
item?.ConfigName?.toLowerCase() && e?.PreferredStatus == 'Y'
item?.ConfigName?.toLowerCase() && e?.PreferredStatus == 'Y'
)
);
@ -674,12 +674,14 @@ function BSCategoryVertical(props) {
postData['Size'] = values.Size;
postData['MRP'] = values.MRP;
postData['TaxId'] = values.TaxId;
postData['SinglePc'] = 'N';
if (EditState) {
const updatedData = {
...EditState,
Quantity: parseInt(values.Quantity),
SellPrice: values.MRP,
OtherProduct: 'Others',
SinglePc: 'N',
};
dispatch(changeothersdata(updatedData));
setEditState();
@ -692,6 +694,7 @@ function BSCategoryVertical(props) {
...othersdata,
Quantity: parseInt(values.Quantity),
OtherProduct: 'Others',
SinglePc: 'N',
};
dispatch(changeothersdata(updatedData));
@ -1198,7 +1201,7 @@ function BSCategoryVertical(props) {
})
}
isOnChange={EditState ? true : false}
// disabled={!!EditState}
// disabled={!!EditState}
/>
</Form.Item>
</div>
@ -1300,8 +1303,8 @@ function BSCategoryVertical(props) {
border: accessToCard && '1px solid',
borderColor:
accessToCard &&
!accessOther &&
SelectedCatgColor?.['BackgroundColor'] == '#ffffff'
!accessOther &&
SelectedCatgColor?.['BackgroundColor'] == '#ffffff'
? '#000000'
: SelectedCatgColor?.['BackgroundColor'] === '#000000'
? '#ffffff'
@ -1383,9 +1386,9 @@ function BSCategoryVertical(props) {
? index != indexval
? SelectedCatgColor?.['BackgroundColor']
: lightenColor(
SelectedCatgColor?.['BackgroundColor'],
0.4
)
SelectedCatgColor?.['BackgroundColor'],
0.4
)
: SelectedCatgColor?.['BackgroundColor'],
padding: padding,
border: '1px solid',
@ -1471,9 +1474,9 @@ function BSCategoryVertical(props) {
? index != indexval
? SelectedCatgColor?.['BackgroundColor']
: lightenColor(
SelectedCatgColor?.['BackgroundColor'],
0.4
)
SelectedCatgColor?.['BackgroundColor'],
0.4
)
: SelectedCatgColor?.['BackgroundColor'],
padding: padding,
border: '1px solid',
@ -1481,15 +1484,15 @@ function BSCategoryVertical(props) {
index != indexval
? SelectedCatgColor?.['BackgroundColor']
: SelectedCatgColor?.['BackgroundColor'] ===
'#ffffff'
'#ffffff'
? '#000000'
: SelectedCatgColor?.['BackgroundColor'] ===
'#000000'
'#000000'
? '#ffffff'
: darkenColor(
SelectedCatgColor?.['BackgroundColor'],
70
),
SelectedCatgColor?.['BackgroundColor'],
70
),
}}
className="sampleCard"
onClick={(e) => handleClick(e, item.ProdCat, index)}
@ -1547,8 +1550,8 @@ function BSCategoryVertical(props) {
border: accessToCard && '1px solid',
borderColor:
accessToCard &&
!accessOther &&
SelectedCatgColor?.['BackgroundColor'] == '#ffffff'
!accessOther &&
SelectedCatgColor?.['BackgroundColor'] == '#ffffff'
? '#000000'
: SelectedCatgColor?.['BackgroundColor'] === '#000000'
? '#ffffff'
@ -1591,7 +1594,7 @@ function BSCategoryVertical(props) {
border: accessOther && '1px solid',
borderColor:
accessOther &&
SelectedCatgColor?.['BackgroundColor'] == '#ffffff'
SelectedCatgColor?.['BackgroundColor'] == '#ffffff'
? '#000000'
: SelectedCatgColor?.['BackgroundColor'] === '#000000'
? '#ffffff'

View File

@ -534,7 +534,7 @@ function BSOtherServicesHorizontalcat(props) {
const response = await dispatch(getUomData()).unwrap();
const UomTypePreference = ApplicationPreferenceData?.find(
(preference) => preference?.PreferredCatName === 'Product Uom'
)?.PreferenceCatDetails;
@ -542,7 +542,7 @@ function BSOtherServicesHorizontalcat(props) {
UomTypePreference?.some?.(
(e) =>
e?.PreferredSubCatName?.toLowerCase() ==
item?.ConfigName?.toLowerCase() && e?.PreferredStatus == 'Y'
item?.ConfigName?.toLowerCase() && e?.PreferredStatus == 'Y'
)
);
@ -684,12 +684,14 @@ function BSOtherServicesHorizontalcat(props) {
postData['Size'] = values.Size;
postData['MRP'] = values.MRP;
postData['TaxId'] = values.TaxId;
postData['SinglePc'] = 'N';
if (EditState) {
const updatedData = {
...EditState,
Quantity: parseInt(values.Quantity),
SellPrice: values.MRP,
OtherProduct: 'Others',
SinglePc: 'N',
};
dispatch(changeothersdata(updatedData));
@ -703,6 +705,7 @@ function BSOtherServicesHorizontalcat(props) {
...othersdata,
Quantity: parseInt(values.Quantity),
OtherProduct: 'Others',
SinglePc: 'N',
};
dispatch(changeothersdata(updatedData));
@ -720,7 +723,7 @@ function BSOtherServicesHorizontalcat(props) {
handleCancel();
formRef?.current?.resetFields();
resetForm();
resetForm();
};
const handleValuesChange = (values) => {
@ -1135,7 +1138,7 @@ function BSOtherServicesHorizontalcat(props) {
/>
</Form.Item>
</div>
</div>
</div>
<div
className="quantity-amt"
style={{
@ -1277,7 +1280,7 @@ function BSOtherServicesHorizontalcat(props) {
? `${parts[0]}.${parts.slice(1).join('')}`
: cleanedValue;
}}
// disabled={!!EditState}
// disabled={!!EditState}
/>
</Form.Item>
</div>
@ -1415,9 +1418,9 @@ function BSOtherServicesHorizontalcat(props) {
? index != indexval
? SelectedCatgColor?.['BackgroundColor']
: lightenColor(
SelectedCatgColor?.['BackgroundColor'],
0.4
)
SelectedCatgColor?.['BackgroundColor'],
0.4
)
: SelectedCatgColor?.['BackgroundColor'],
padding: padding,
border: '1px solid',
@ -1507,9 +1510,9 @@ function BSOtherServicesHorizontalcat(props) {
? index !== indexval
? SelectedCatgColor?.['BackgroundColor']
: lightenColor(
SelectedCatgColor?.['BackgroundColor'],
0.4
)
SelectedCatgColor?.['BackgroundColor'],
0.4
)
: SelectedCatgColor?.['BackgroundColor'],
padding: padding,
border: '1px solid',
@ -1517,17 +1520,17 @@ function BSOtherServicesHorizontalcat(props) {
index !== indexval
? SelectedCatgColor?.['BackgroundColor']
: SelectedCatgColor?.['BackgroundColor'] ===
'#ffffff'
'#ffffff'
? '#000000'
: SelectedCatgColor?.['BackgroundColor'] ===
'#000000'
'#000000'
? '#ffffff'
: darkenColor(
SelectedCatgColor?.[
'BackgroundColor'
],
70
),
SelectedCatgColor?.[
'BackgroundColor'
],
70
),
userSelect: 'none',
minWidth: 'max-content', // set a width if needed
}}
@ -1586,8 +1589,8 @@ function BSOtherServicesHorizontalcat(props) {
border: accessToCard && '1px solid',
borderColor:
accessToCard &&
!accessOther &&
SelectedCatgColor?.['BackgroundColor'] == '#ffffff'
!accessOther &&
SelectedCatgColor?.['BackgroundColor'] == '#ffffff'
? '#000000'
: SelectedCatgColor?.['BackgroundColor'] === '#000000'
? '#ffffff'

View File

@ -445,7 +445,7 @@ function BSOtherServicesVerticalcat(props) {
UomTypePreference?.some?.(
(e) =>
e?.PreferredSubCatName?.toLowerCase() ==
item?.ConfigName?.toLowerCase() && e?.PreferredStatus == 'Y'
item?.ConfigName?.toLowerCase() && e?.PreferredStatus == 'Y'
)
);
@ -585,12 +585,14 @@ function BSOtherServicesVerticalcat(props) {
postData['Size'] = values.Size;
postData['MRP'] = values.MRP;
postData['TaxId'] = values.TaxId;
postData['SinglePc'] = 'N';
if (EditState) {
const updatedData = {
...EditState,
Quantity: parseInt(values.Quantity),
SellPrice: values.MRP,
OtherProduct: 'Others',
SinglePc: 'N',
};
dispatch(changeothersdata(updatedData));
setEditState();
@ -603,6 +605,7 @@ function BSOtherServicesVerticalcat(props) {
...othersdata,
Quantity: parseInt(values.Quantity),
OtherProduct: 'Others',
SinglePc: 'N',
};
dispatch(changeothersdata(updatedData));
@ -1123,7 +1126,7 @@ function BSOtherServicesVerticalcat(props) {
})
}
isOnChange={EditState ? true : false}
// disabled={!!EditState}
// disabled={!!EditState}
/>
</Form.Item>
</div>
@ -1219,7 +1222,7 @@ function BSOtherServicesVerticalcat(props) {
pointerEvents: OrderType === 'Failed' ? 'none' : 'auto',
}}
>
{(!Isdragging || draggingComponent !== 'category') &&
otherServiceCategoryData?.map((item, index) => (
<div
@ -1231,9 +1234,9 @@ function BSOtherServicesVerticalcat(props) {
? index != indexval
? SelectedCatgColor?.['BackgroundColor']
: lightenColor(
SelectedCatgColor?.['BackgroundColor'],
0.4
)
SelectedCatgColor?.['BackgroundColor'],
0.4
)
: SelectedCatgColor?.['BackgroundColor'],
padding: padding,
border: '1px solid',
@ -1319,9 +1322,9 @@ function BSOtherServicesVerticalcat(props) {
? index != indexval
? SelectedCatgColor?.['BackgroundColor']
: lightenColor(
SelectedCatgColor?.['BackgroundColor'],
0.4
)
SelectedCatgColor?.['BackgroundColor'],
0.4
)
: SelectedCatgColor?.['BackgroundColor'],
padding: padding,
border: '1px solid',
@ -1329,15 +1332,15 @@ function BSOtherServicesVerticalcat(props) {
index != indexval
? SelectedCatgColor?.['BackgroundColor']
: SelectedCatgColor?.['BackgroundColor'] ===
'#ffffff'
'#ffffff'
? '#000000'
: SelectedCatgColor?.['BackgroundColor'] ===
'#000000'
'#000000'
? '#ffffff'
: darkenColor(
SelectedCatgColor?.['BackgroundColor'],
70
),
SelectedCatgColor?.['BackgroundColor'],
70
),
}}
className="sampleCard"
onClick={(e) => handleClick(e, item.ProdCat, index)}
@ -1383,7 +1386,7 @@ function BSOtherServicesVerticalcat(props) {
</DragDropContext>
)}
</div>
</div>
</div>
);
}

View File

@ -1296,9 +1296,10 @@ const BSItemCard = (props) => {
OtherProduct: otherscarddata?.OtherProduct,
// 'ProdVariantName': otherscarddata?.ProdVariantName,
BookingTypeName: BookingType,
SinglePc: otherscarddata?.SinglePc,
CounterName: '', //sri
};
AddOrderDetails(data);
AddOrderDetails(data,otherscarddata?.Quantity);
}
// data["OrderRate"] = otherscarddata?.SellPrice
}, [otherscarddata]);
@ -2079,12 +2080,11 @@ const BSItemCard = (props) => {
return dateVal;
};
const AddOrderDetails = async (item) => {
const AddOrderDetails = async (item,Qty=1) => {
if ((overAllLimitPreferenece || itemWiseLimitPreferenece) && maxQtyLimit) {
if (overAllLimitPreferenece) {
const calculatedOverAllQty = calculateOverAllQtyLimit(CartOrderDetails);
if ((calculatedOverAllQty + 1) > maxQtyLimit) {
if ((calculatedOverAllQty + Qty) > maxQtyLimit) {
setMessageData(`Overall Quantity Limit Exceeds than ${maxQtyLimit}`);
setMessageType('warning');
return;