Merge pull request 'Focus Issue' (#204) from PushMainVM into main
Reviewed-on: Pozomind/pozo-retail-app#204
This commit is contained in:
commit
4154a815eb
|
|
@ -59,6 +59,7 @@ import {
|
||||||
changePreviousOrderPayment,
|
changePreviousOrderPayment,
|
||||||
changePreviousOrderOfferDetail,
|
changePreviousOrderOfferDetail,
|
||||||
GlobalSalesBillEdit,
|
GlobalSalesBillEdit,
|
||||||
|
changeCombofocus,
|
||||||
} from '../../../../../Features/BookingScreen/BookingData/BookingData';
|
} from '../../../../../Features/BookingScreen/BookingData/BookingData';
|
||||||
import {
|
import {
|
||||||
ChangeFullFreeProductList,
|
ChangeFullFreeProductList,
|
||||||
|
|
@ -158,13 +159,13 @@ const ComboSalesBillTable = () => {
|
||||||
OrderType === 'Hold'
|
OrderType === 'Hold'
|
||||||
? tableData?.filter((a, b) => a.BookingTypeName === 'TakeAway')
|
? tableData?.filter((a, b) => a.BookingTypeName === 'TakeAway')
|
||||||
: tableData?.filter(
|
: tableData?.filter(
|
||||||
(a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId
|
(a, b) => a.BookingTypeName === 'TakeAway' && !a?.SalesId
|
||||||
);
|
);
|
||||||
const OldtableDataTakeAway =
|
const OldtableDataTakeAway =
|
||||||
OrderType != 'Hold'
|
OrderType != 'Hold'
|
||||||
? tableData?.filter(
|
? tableData?.filter(
|
||||||
(a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId
|
(a, b) => a.BookingTypeName === 'TakeAway' && a?.SalesId
|
||||||
)
|
)
|
||||||
: [];
|
: [];
|
||||||
|
|
||||||
const [EditQuantity, setEditQuantity] = useState(false);
|
const [EditQuantity, setEditQuantity] = useState(false);
|
||||||
|
|
@ -1232,9 +1233,9 @@ const ComboSalesBillTable = () => {
|
||||||
)?.map((item, idx) =>
|
)?.map((item, idx) =>
|
||||||
idx === 0
|
idx === 0
|
||||||
? {
|
? {
|
||||||
...item,
|
...item,
|
||||||
FreeQty,
|
FreeQty,
|
||||||
}
|
}
|
||||||
: item
|
: item
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
@ -1349,7 +1350,7 @@ const ComboSalesBillTable = () => {
|
||||||
InwardDtlId: isPaidproduct?.InwardDtlId,
|
InwardDtlId: isPaidproduct?.InwardDtlId,
|
||||||
BuyInwardDtlId: null,
|
BuyInwardDtlId: null,
|
||||||
Offer: 0,
|
Offer: 0,
|
||||||
OrderRate:isPaidproduct?.OrderRate
|
OrderRate: isPaidproduct?.OrderRate,
|
||||||
});
|
});
|
||||||
} else if (isPaidproduct?.OrderQty > item?.OrderQty) {
|
} else if (isPaidproduct?.OrderQty > item?.OrderQty) {
|
||||||
// Just Decrease Paid Qty
|
// Just Decrease Paid Qty
|
||||||
|
|
@ -1521,7 +1522,7 @@ const ComboSalesBillTable = () => {
|
||||||
InwardDtlId: item?.InwardDtlId,
|
InwardDtlId: item?.InwardDtlId,
|
||||||
BuyInwardDtlId: null,
|
BuyInwardDtlId: null,
|
||||||
Offer: item?.Offer,
|
Offer: item?.Offer,
|
||||||
OrderRate:item?.OrderRate
|
OrderRate: item?.OrderRate,
|
||||||
});
|
});
|
||||||
await ChangeFreeprodlistFn({
|
await ChangeFreeprodlistFn({
|
||||||
OverAllFreeQty: isCheckFreeProduct?.OverAllFreeQty,
|
OverAllFreeQty: isCheckFreeProduct?.OverAllFreeQty,
|
||||||
|
|
@ -1600,7 +1601,7 @@ const ComboSalesBillTable = () => {
|
||||||
InwardDtlId: item?.InwardDtlId,
|
InwardDtlId: item?.InwardDtlId,
|
||||||
BuyInwardDtlId: null,
|
BuyInwardDtlId: null,
|
||||||
Offer: item?.Offer,
|
Offer: item?.Offer,
|
||||||
OrderRate:item?.OrderRate
|
OrderRate: item?.OrderRate,
|
||||||
});
|
});
|
||||||
await ChangeFreeprodlistFn({
|
await ChangeFreeprodlistFn({
|
||||||
OverAllFreeQty: isCheckFreeProduct?.OverAllFreeQty,
|
OverAllFreeQty: isCheckFreeProduct?.OverAllFreeQty,
|
||||||
|
|
@ -1634,7 +1635,7 @@ const ComboSalesBillTable = () => {
|
||||||
InwardDtlId: item?.InwardDtlId,
|
InwardDtlId: item?.InwardDtlId,
|
||||||
BuyInwardDtlId: null,
|
BuyInwardDtlId: null,
|
||||||
Offer: item?.Offer,
|
Offer: item?.Offer,
|
||||||
OrderRate:item?.OrderRate
|
OrderRate: item?.OrderRate,
|
||||||
});
|
});
|
||||||
await ChangeOfferAppliedProdsFn({
|
await ChangeOfferAppliedProdsFn({
|
||||||
inwardDtlId: item?.InwardDtlId,
|
inwardDtlId: item?.InwardDtlId,
|
||||||
|
|
@ -1666,7 +1667,7 @@ const ComboSalesBillTable = () => {
|
||||||
InwardDtlId: isPaidProductAvailableInCart?.InwardDtlId,
|
InwardDtlId: isPaidProductAvailableInCart?.InwardDtlId,
|
||||||
BuyInwardDtlId: null,
|
BuyInwardDtlId: null,
|
||||||
Offer: 0,
|
Offer: 0,
|
||||||
OrderRate:isPaidProductAvailableInCart?.OrderRate
|
OrderRate: isPaidProductAvailableInCart?.OrderRate,
|
||||||
});
|
});
|
||||||
} else if (
|
} else if (
|
||||||
isPaidProductAvailableInCart?.OrderQty > item?.OrderQty
|
isPaidProductAvailableInCart?.OrderQty > item?.OrderQty
|
||||||
|
|
@ -1750,7 +1751,7 @@ const ComboSalesBillTable = () => {
|
||||||
InwardDtlId: item?.InwardDtlId,
|
InwardDtlId: item?.InwardDtlId,
|
||||||
BuyInwardDtlId: null,
|
BuyInwardDtlId: null,
|
||||||
Offer: item?.Offer,
|
Offer: item?.Offer,
|
||||||
OrderRate: item?.OrderRate
|
OrderRate: item?.OrderRate,
|
||||||
});
|
});
|
||||||
await ChangeFreeprodlistFn({
|
await ChangeFreeprodlistFn({
|
||||||
OverAllFreeQty: freeProdList?.OverAllFreeQty,
|
OverAllFreeQty: freeProdList?.OverAllFreeQty,
|
||||||
|
|
@ -1777,7 +1778,7 @@ const ComboSalesBillTable = () => {
|
||||||
InwardDtlId: item?.InwardDtlId,
|
InwardDtlId: item?.InwardDtlId,
|
||||||
BuyInwardDtlId: null,
|
BuyInwardDtlId: null,
|
||||||
Offer: item?.Offer,
|
Offer: item?.Offer,
|
||||||
OrderRate: item?.OrderRate
|
OrderRate: item?.OrderRate,
|
||||||
});
|
});
|
||||||
await ChangeFreeprodlistFn({
|
await ChangeFreeprodlistFn({
|
||||||
OverAllFreeQty: freeProdList?.OverAllFreeQty,
|
OverAllFreeQty: freeProdList?.OverAllFreeQty,
|
||||||
|
|
@ -2114,7 +2115,7 @@ const ComboSalesBillTable = () => {
|
||||||
InwardDtlId: item?.InwardDtlId,
|
InwardDtlId: item?.InwardDtlId,
|
||||||
BuyInwardDtlId: item?.InwardDtlId,
|
BuyInwardDtlId: item?.InwardDtlId,
|
||||||
Offer: item?.Offer,
|
Offer: item?.Offer,
|
||||||
OrderRate: item?.OrderRate
|
OrderRate: item?.OrderRate,
|
||||||
});
|
});
|
||||||
await ChangeFreeprodlistFn({
|
await ChangeFreeprodlistFn({
|
||||||
OverAllFreeQty: FreeProd?.OverAllFreeQty - item?.OrderQty,
|
OverAllFreeQty: FreeProd?.OverAllFreeQty - item?.OrderQty,
|
||||||
|
|
@ -2133,7 +2134,7 @@ const ComboSalesBillTable = () => {
|
||||||
InwardDtlId: item?.InwardDtlId,
|
InwardDtlId: item?.InwardDtlId,
|
||||||
BuyInwardDtlId: item?.InwardDtlId,
|
BuyInwardDtlId: item?.InwardDtlId,
|
||||||
Offer: item?.Offer,
|
Offer: item?.Offer,
|
||||||
OrderRate: item?.OrderRate
|
OrderRate: item?.OrderRate,
|
||||||
});
|
});
|
||||||
await ChangeFreeprodlistFn({
|
await ChangeFreeprodlistFn({
|
||||||
OverAllFreeQty: item?.OrderQty,
|
OverAllFreeQty: item?.OrderQty,
|
||||||
|
|
@ -2479,11 +2480,11 @@ const ComboSalesBillTable = () => {
|
||||||
tableDataDinein?.length >= PreviousdataLength
|
tableDataDinein?.length >= PreviousdataLength
|
||||||
? 'wheat'
|
? 'wheat'
|
||||||
: BookingType !== 'Dine In' &&
|
: BookingType !== 'Dine In' &&
|
||||||
triggerAnimation &&
|
triggerAnimation &&
|
||||||
OldtableDataTakeAway?.length + index === 0 &&
|
OldtableDataTakeAway?.length + index === 0 &&
|
||||||
tableDataDinein?.length >= PreviousdataLength &&
|
tableDataDinein?.length >= PreviousdataLength &&
|
||||||
!HoldOrderDtl &&
|
!HoldOrderDtl &&
|
||||||
!UnpaidData
|
!UnpaidData
|
||||||
? 'wheat'
|
? 'wheat'
|
||||||
: 'inherit'
|
: 'inherit'
|
||||||
: 'none',
|
: 'none',
|
||||||
|
|
@ -2491,9 +2492,9 @@ const ComboSalesBillTable = () => {
|
||||||
row?.SalesId && OrderType !== 'Hold'
|
row?.SalesId && OrderType !== 'Hold'
|
||||||
? 'rgb(243, 248, 213)'
|
? 'rgb(243, 248, 213)'
|
||||||
: GlobEstBooking === 'ParEst' &&
|
: GlobEstBooking === 'ParEst' &&
|
||||||
GlobProdwisedata?.includes(
|
GlobProdwisedata?.includes(
|
||||||
row?.InwardDtlId + ' ' + row?.BookingTypeName
|
row?.InwardDtlId + ' ' + row?.BookingTypeName
|
||||||
)
|
)
|
||||||
? '#b2d1f7'
|
? '#b2d1f7'
|
||||||
: (OldtableDataTakeAway?.length + index) % 2 === 0
|
: (OldtableDataTakeAway?.length + index) % 2 === 0
|
||||||
? 'white'
|
? 'white'
|
||||||
|
|
@ -2536,44 +2537,45 @@ const ComboSalesBillTable = () => {
|
||||||
{/* Product Name / Item */}
|
{/* Product Name / Item */}
|
||||||
{(item.OptionName === 'Item' ||
|
{(item.OptionName === 'Item' ||
|
||||||
item.OptionName === 'Product Name') && (
|
item.OptionName === 'Product Name') && (
|
||||||
<td
|
<td
|
||||||
key={`prod-${index}`}
|
key={`prod-${index}`}
|
||||||
className={`productNameTd ${isActiveCell ? 'active-cell' : ''}`}
|
className={`productNameTd ${isActiveCell ? 'active-cell' : ''}`}
|
||||||
onClick={() =>
|
onClick={() => {
|
||||||
row.FullProductIdentifierDtls?.length > 0 ||
|
dispatch(changeCombofocus(true));
|
||||||
row.ProductIdentifierDtls?.length > 0
|
row.FullProductIdentifierDtls?.length > 0 ||
|
||||||
? handleImeiDetails(row)
|
row.ProductIdentifierDtls?.length > 0
|
||||||
: editField && handleEditQuantity(row)
|
? handleImeiDetails(row)
|
||||||
}
|
: editField && handleEditQuantity(row);
|
||||||
>
|
}}
|
||||||
{row?.Type !== 'OS' ? row.ProdName : row.ServiceName}
|
>
|
||||||
{row?.BrandName ? ` ${row.BrandName}` : ''}
|
{row?.Type !== 'OS' ? row.ProdName : row.ServiceName}
|
||||||
{row?.Type !== 'C' && (
|
{row?.BrandName ? ` ${row.BrandName}` : ''}
|
||||||
<p
|
{row?.Type !== 'C' && (
|
||||||
// className="Tbl3-Variant"
|
<p
|
||||||
className={
|
// className="Tbl3-Variant"
|
||||||
isActiveCell
|
className={
|
||||||
? 'Tbl3VariantActve'
|
isActiveCell
|
||||||
: 'Tbl3-Variant'
|
? 'Tbl3VariantActve'
|
||||||
}
|
: 'Tbl3-Variant'
|
||||||
>
|
}
|
||||||
{/* {row?.ProdVariantName} {row?.Size} {row?.UomName} */}
|
>
|
||||||
(
|
{/* {row?.ProdVariantName} {row?.Size} {row?.UomName} */}
|
||||||
{!row?.ProdVariantName?.toLowerCase()?.includes(
|
(
|
||||||
'variant'
|
{!row?.ProdVariantName?.toLowerCase()?.includes(
|
||||||
) && <span>{row?.ProdVariantName} </span>}
|
'variant'
|
||||||
{row?.Size}
|
) && <span>{row?.ProdVariantName} </span>}
|
||||||
{row?.SinglePc == 'Y' ? 'PCS' : row?.UomName})
|
{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>
|
</p>
|
||||||
)}
|
))}
|
||||||
{row?.Type === 'C' &&
|
</td>
|
||||||
row.ProdDetail?.map((prod, idx) => (
|
)}
|
||||||
<p key={idx}>
|
|
||||||
{prod.ProdName} - {prod.Size} {prod.UomName}
|
|
||||||
</p>
|
|
||||||
))}
|
|
||||||
</td>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{/* Barcode */}
|
{/* Barcode */}
|
||||||
{item.OptionName === 'Barcode' && (
|
{item.OptionName === 'Barcode' && (
|
||||||
|
|
@ -2600,13 +2602,15 @@ const ComboSalesBillTable = () => {
|
||||||
}}
|
}}
|
||||||
key={`qty-${index}`}
|
key={`qty-${index}`}
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
className={`${EditQtyCombo && row?.localId === Index
|
className={`${
|
||||||
|
EditQtyCombo && row?.localId === Index
|
||||||
? 'EditQTYcomboTD'
|
? 'EditQTYcomboTD'
|
||||||
: 'qtyTd'
|
: 'qtyTd'
|
||||||
} ${isActiveCell ? 'active-cell' : ''}`}
|
} ${isActiveCell ? 'active-cell' : ''}`}
|
||||||
onClick={() =>
|
onClick={() => {
|
||||||
editField && handleEditQuantityCombo(row)
|
dispatch(changeCombofocus(true));
|
||||||
}
|
editField && handleEditQuantityCombo(row);
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{(!EditQtyCombo || row?.localId !== Index) && (
|
{(!EditQtyCombo || row?.localId !== Index) && (
|
||||||
<>{row.OrderQty}</>
|
<>{row.OrderQty}</>
|
||||||
|
|
@ -2666,9 +2670,9 @@ const ComboSalesBillTable = () => {
|
||||||
>
|
>
|
||||||
{row?.Offer > 0
|
{row?.Offer > 0
|
||||||
? `${(
|
? `${(
|
||||||
(row.Offer / (row?.OrderQty * row?.OrderRate)) *
|
(row.Offer / (row?.OrderQty * row?.OrderRate)) *
|
||||||
100
|
100
|
||||||
).toFixed(2)}%`
|
).toFixed(2)}%`
|
||||||
: '-'}
|
: '-'}
|
||||||
</td>
|
</td>
|
||||||
)}
|
)}
|
||||||
|
|
@ -2700,8 +2704,8 @@ const ComboSalesBillTable = () => {
|
||||||
>
|
>
|
||||||
{allowDecimal
|
{allowDecimal
|
||||||
? Number(row.TotalAmt - (row?.Offer || 0)).toFixed(
|
? Number(row.TotalAmt - (row?.Offer || 0)).toFixed(
|
||||||
2
|
2
|
||||||
)
|
)
|
||||||
: Number(row.TotalAmt - (row?.Offer || 0))}
|
: Number(row.TotalAmt - (row?.Offer || 0))}
|
||||||
</td>
|
</td>
|
||||||
)}
|
)}
|
||||||
|
|
@ -2744,7 +2748,7 @@ const ComboSalesBillTable = () => {
|
||||||
<td
|
<td
|
||||||
key={`delete-${index}`}
|
key={`delete-${index}`}
|
||||||
className={`deleteTd ${isActiveCell ? 'active-cell' : ''}`}
|
className={`deleteTd ${isActiveCell ? 'active-cell' : ''}`}
|
||||||
// className=""
|
// className=""
|
||||||
>
|
>
|
||||||
<AiOutlineClose
|
<AiOutlineClose
|
||||||
onClick={() => removeFromCart(row)}
|
onClick={() => removeFromCart(row)}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -126,6 +126,7 @@ const VerfiedProducts = lazy(
|
||||||
import ShortcutKeyHelper from '../../Components/UtillComponents/ShortcutKeyHelper.jsx';
|
import ShortcutKeyHelper from '../../Components/UtillComponents/ShortcutKeyHelper.jsx';
|
||||||
import PlanExpireNotification from '../PlanExpireNotification.jsx';
|
import PlanExpireNotification from '../PlanExpireNotification.jsx';
|
||||||
import CardSkeleton from '../../../../Components/Skeleton/CardSkeleton.jsx';
|
import CardSkeleton from '../../../../Components/Skeleton/CardSkeleton.jsx';
|
||||||
|
import { TbSettingsSearch } from 'react-icons/tb';
|
||||||
|
|
||||||
const subDirectory = import.meta.env.BASE_URL;
|
const subDirectory = import.meta.env.BASE_URL;
|
||||||
const commonDirectory = import.meta.env.COMMON_BASE_URL;
|
const commonDirectory = import.meta.env.COMMON_BASE_URL;
|
||||||
|
|
@ -387,7 +388,7 @@ export default function BSCombo1() {
|
||||||
{/* Multiple search */}
|
{/* Multiple search */}
|
||||||
<Tooltip title={'Multiple Search'}>
|
<Tooltip title={'Multiple Search'}>
|
||||||
<div className="MultiSearchIconDiv">
|
<div className="MultiSearchIconDiv">
|
||||||
<CgSearchLoading onClick={() => setMultiple(true)} />
|
<TbSettingsSearch onClick={() => setMultiple(true)} />
|
||||||
</div>
|
</div>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
{Comboglobal === false && (
|
{Comboglobal === false && (
|
||||||
|
|
@ -615,7 +616,10 @@ export default function BSCombo1() {
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className='BSC1PAYMENTCOMBO' style={{ position: 'fixed', bottom: '0' }}>
|
<div
|
||||||
|
className="BSC1PAYMENTCOMBO"
|
||||||
|
style={{ position: 'fixed', bottom: '0' }}
|
||||||
|
>
|
||||||
<BSC1Payment optionNames={BSComboData} />
|
<BSC1Payment optionNames={BSComboData} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue