Merge pull request 'Focus Issue' (#204) from PushMainVM into main

Reviewed-on: Pozomind/pozo-retail-app#204
This commit is contained in:
karthikalakshmi 2026-03-02 12:47:11 +05:30
commit 4154a815eb
3 changed files with 832 additions and 400 deletions

View File

@ -59,6 +59,7 @@ import {
changePreviousOrderPayment,
changePreviousOrderOfferDetail,
GlobalSalesBillEdit,
changeCombofocus,
} from '../../../../../Features/BookingScreen/BookingData/BookingData';
import {
ChangeFullFreeProductList,
@ -158,13 +159,13 @@ const ComboSalesBillTable = () => {
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 OldtableDataTakeAway =
OrderType != 'Hold'
? tableData?.filter(
(a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId
)
(a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId
)
: [];
const [EditQuantity, setEditQuantity] = useState(false);
@ -1232,9 +1233,9 @@ const ComboSalesBillTable = () => {
)?.map((item, idx) =>
idx === 0
? {
...item,
FreeQty,
}
...item,
FreeQty,
}
: item
),
};
@ -1349,7 +1350,7 @@ const ComboSalesBillTable = () => {
InwardDtlId: isPaidproduct?.InwardDtlId,
BuyInwardDtlId: null,
Offer: 0,
OrderRate:isPaidproduct?.OrderRate
OrderRate: isPaidproduct?.OrderRate,
});
} else if (isPaidproduct?.OrderQty > item?.OrderQty) {
// Just Decrease Paid Qty
@ -1521,7 +1522,7 @@ const ComboSalesBillTable = () => {
InwardDtlId: item?.InwardDtlId,
BuyInwardDtlId: null,
Offer: item?.Offer,
OrderRate:item?.OrderRate
OrderRate: item?.OrderRate,
});
await ChangeFreeprodlistFn({
OverAllFreeQty: isCheckFreeProduct?.OverAllFreeQty,
@ -1600,7 +1601,7 @@ const ComboSalesBillTable = () => {
InwardDtlId: item?.InwardDtlId,
BuyInwardDtlId: null,
Offer: item?.Offer,
OrderRate:item?.OrderRate
OrderRate: item?.OrderRate,
});
await ChangeFreeprodlistFn({
OverAllFreeQty: isCheckFreeProduct?.OverAllFreeQty,
@ -1634,7 +1635,7 @@ const ComboSalesBillTable = () => {
InwardDtlId: item?.InwardDtlId,
BuyInwardDtlId: null,
Offer: item?.Offer,
OrderRate:item?.OrderRate
OrderRate: item?.OrderRate,
});
await ChangeOfferAppliedProdsFn({
inwardDtlId: item?.InwardDtlId,
@ -1666,7 +1667,7 @@ const ComboSalesBillTable = () => {
InwardDtlId: isPaidProductAvailableInCart?.InwardDtlId,
BuyInwardDtlId: null,
Offer: 0,
OrderRate:isPaidProductAvailableInCart?.OrderRate
OrderRate: isPaidProductAvailableInCart?.OrderRate,
});
} else if (
isPaidProductAvailableInCart?.OrderQty > item?.OrderQty
@ -1750,7 +1751,7 @@ const ComboSalesBillTable = () => {
InwardDtlId: item?.InwardDtlId,
BuyInwardDtlId: null,
Offer: item?.Offer,
OrderRate: item?.OrderRate
OrderRate: item?.OrderRate,
});
await ChangeFreeprodlistFn({
OverAllFreeQty: freeProdList?.OverAllFreeQty,
@ -1777,7 +1778,7 @@ const ComboSalesBillTable = () => {
InwardDtlId: item?.InwardDtlId,
BuyInwardDtlId: null,
Offer: item?.Offer,
OrderRate: item?.OrderRate
OrderRate: item?.OrderRate,
});
await ChangeFreeprodlistFn({
OverAllFreeQty: freeProdList?.OverAllFreeQty,
@ -2114,7 +2115,7 @@ const ComboSalesBillTable = () => {
InwardDtlId: item?.InwardDtlId,
BuyInwardDtlId: item?.InwardDtlId,
Offer: item?.Offer,
OrderRate: item?.OrderRate
OrderRate: item?.OrderRate,
});
await ChangeFreeprodlistFn({
OverAllFreeQty: FreeProd?.OverAllFreeQty - item?.OrderQty,
@ -2133,7 +2134,7 @@ const ComboSalesBillTable = () => {
InwardDtlId: item?.InwardDtlId,
BuyInwardDtlId: item?.InwardDtlId,
Offer: item?.Offer,
OrderRate: item?.OrderRate
OrderRate: item?.OrderRate,
});
await ChangeFreeprodlistFn({
OverAllFreeQty: item?.OrderQty,
@ -2479,11 +2480,11 @@ const ComboSalesBillTable = () => {
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',
@ -2491,9 +2492,9 @@ const ComboSalesBillTable = () => {
row?.SalesId && OrderType !== 'Hold'
? 'rgb(243, 248, 213)'
: GlobEstBooking === 'ParEst' &&
GlobProdwisedata?.includes(
row?.InwardDtlId + ' ' + row?.BookingTypeName
)
GlobProdwisedata?.includes(
row?.InwardDtlId + ' ' + row?.BookingTypeName
)
? '#b2d1f7'
: (OldtableDataTakeAway?.length + index) % 2 === 0
? 'white'
@ -2536,44 +2537,45 @@ const ComboSalesBillTable = () => {
{/* Product Name / Item */}
{(item.OptionName === 'Item' ||
item.OptionName === 'Product Name') && (
<td
key={`prod-${index}`}
className={`productNameTd ${isActiveCell ? 'active-cell' : ''}`}
onClick={() =>
row.FullProductIdentifierDtls?.length > 0 ||
row.ProductIdentifierDtls?.length > 0
? handleImeiDetails(row)
: editField && handleEditQuantity(row)
}
>
{row?.Type !== 'OS' ? row.ProdName : row.ServiceName}
{row?.BrandName ? ` ${row.BrandName}` : ''}
{row?.Type !== 'C' && (
<p
// className="Tbl3-Variant"
className={
isActiveCell
? 'Tbl3VariantActve'
: 'Tbl3-Variant'
}
>
{/* {row?.ProdVariantName} {row?.Size} {row?.UomName} */}
(
{!row?.ProdVariantName?.toLowerCase()?.includes(
'variant'
) && <span>{row?.ProdVariantName} </span>}
{row?.Size}
{row?.SinglePc == 'Y' ? 'PCS' : row?.UomName})
<td
key={`prod-${index}`}
className={`productNameTd ${isActiveCell ? 'active-cell' : ''}`}
onClick={() => {
dispatch(changeCombofocus(true));
row.FullProductIdentifierDtls?.length > 0 ||
row.ProductIdentifierDtls?.length > 0
? handleImeiDetails(row)
: editField && handleEditQuantity(row);
}}
>
{row?.Type !== 'OS' ? row.ProdName : row.ServiceName}
{row?.BrandName ? ` ${row.BrandName}` : ''}
{row?.Type !== 'C' && (
<p
// className="Tbl3-Variant"
className={
isActiveCell
? 'Tbl3VariantActve'
: 'Tbl3-Variant'
}
>
{/* {row?.ProdVariantName} {row?.Size} {row?.UomName} */}
(
{!row?.ProdVariantName?.toLowerCase()?.includes(
'variant'
) && <span>{row?.ProdVariantName} </span>}
{row?.Size}
{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>
)}
{row?.Type === 'C' &&
row.ProdDetail?.map((prod, idx) => (
<p key={idx}>
{prod.ProdName} - {prod.Size} {prod.UomName}
</p>
))}
</td>
)}
))}
</td>
)}
{/* Barcode */}
{item.OptionName === 'Barcode' && (
@ -2600,13 +2602,15 @@ const ComboSalesBillTable = () => {
}}
key={`qty-${index}`}
tabIndex={0}
className={`${EditQtyCombo && row?.localId === Index
className={`${
EditQtyCombo && row?.localId === Index
? 'EditQTYcomboTD'
: 'qtyTd'
} ${isActiveCell ? 'active-cell' : ''}`}
onClick={() =>
editField && handleEditQuantityCombo(row)
}
} ${isActiveCell ? 'active-cell' : ''}`}
onClick={() => {
dispatch(changeCombofocus(true));
editField && handleEditQuantityCombo(row);
}}
>
{(!EditQtyCombo || row?.localId !== Index) && (
<>{row.OrderQty}</>
@ -2666,9 +2670,9 @@ const ComboSalesBillTable = () => {
>
{row?.Offer > 0
? `${(
(row.Offer / (row?.OrderQty * row?.OrderRate)) *
100
).toFixed(2)}%`
(row.Offer / (row?.OrderQty * row?.OrderRate)) *
100
).toFixed(2)}%`
: '-'}
</td>
)}
@ -2700,8 +2704,8 @@ const ComboSalesBillTable = () => {
>
{allowDecimal
? Number(row.TotalAmt - (row?.Offer || 0)).toFixed(
2
)
2
)
: Number(row.TotalAmt - (row?.Offer || 0))}
</td>
)}
@ -2744,7 +2748,7 @@ const ComboSalesBillTable = () => {
<td
key={`delete-${index}`}
className={`deleteTd ${isActiveCell ? 'active-cell' : ''}`}
// className=""
// className=""
>
<AiOutlineClose
onClick={() => removeFromCart(row)}

View File

@ -126,6 +126,7 @@ const VerfiedProducts = lazy(
import ShortcutKeyHelper from '../../Components/UtillComponents/ShortcutKeyHelper.jsx';
import PlanExpireNotification from '../PlanExpireNotification.jsx';
import CardSkeleton from '../../../../Components/Skeleton/CardSkeleton.jsx';
import { TbSettingsSearch } from 'react-icons/tb';
const subDirectory = import.meta.env.BASE_URL;
const commonDirectory = import.meta.env.COMMON_BASE_URL;
@ -387,7 +388,7 @@ export default function BSCombo1() {
{/* Multiple search */}
<Tooltip title={'Multiple Search'}>
<div className="MultiSearchIconDiv">
<CgSearchLoading onClick={() => setMultiple(true)} />
<TbSettingsSearch onClick={() => setMultiple(true)} />
</div>
</Tooltip>
{Comboglobal === false && (
@ -615,7 +616,10 @@ export default function BSCombo1() {
)}
</div>
<div className='BSC1PAYMENTCOMBO' style={{ position: 'fixed', bottom: '0' }}>
<div
className="BSC1PAYMENTCOMBO"
style={{ position: 'fixed', bottom: '0' }}
>
<BSC1Payment optionNames={BSComboData} />
</div>
</div>