Combo ShortCut add

This commit is contained in:
Your Name 2026-02-17 12:18:40 +05:30
parent 0d164b8686
commit 2497b722f4
17 changed files with 683 additions and 392 deletions

View File

@ -3209,6 +3209,7 @@ const ComboEditQtyAndRate = (props) => {
AddProductQuantity();
}
}}
min={0}
className="EditQTYcomboInput"
placeholder="Enter Qty"
/>

View File

@ -148,13 +148,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);
@ -188,6 +188,26 @@ const ComboSalesBillTable = () => {
}
};
const [isAltPressed, setIsAltPressed] = useState(false);
useEffect(() => {
const handleKeyDown = (e) => {
if (e.key === 'F2') setIsAltPressed(true);
};
const handleKeyUp = (e) => {
if (e.key === 'F2') setIsAltPressed(false);
};
window.addEventListener('keydown', handleKeyDown);
window.addEventListener('keyup', handleKeyUp);
return () => {
window.removeEventListener('keydown', handleKeyDown);
window.removeEventListener('keyup', handleKeyUp);
};
}, []);
// Outside click handler for quantity edit
useEffect(() => {
@ -302,7 +322,6 @@ const ComboSalesBillTable = () => {
event.preventDefault();
handleShortcut('weightAmount');
}
};
window.addEventListener('keydown', handleKeyDown);
@ -1158,9 +1177,9 @@ const ComboSalesBillTable = () => {
)?.map((item, idx) =>
idx === 0
? {
...item,
FreeQty,
}
...item,
FreeQty,
}
: item
),
};
@ -2098,7 +2117,9 @@ const ComboSalesBillTable = () => {
const visibleCols =
tableOptions?.filter((opt) =>
['Item', 'Quantity', 'Rate', 'Total'].includes(opt.OptionName)
['Item', 'Quantity', 'Rate', 'Total', 'Delete'].includes(
opt.OptionName
)
) || [];
// Arrow Up/Down - Row navigation
@ -2153,9 +2174,12 @@ const ComboSalesBillTable = () => {
e.preventDefault();
const row = combinedTableData[activeRowIndex];
const col = visibleCols[activeColIndex];
if (row && col && editField) {
if (col.OptionName === 'Quantity') handleEditQuantityCombo(row);
else if (col.OptionName === 'Rate') handleEditRateCombo(row);
if (row && col) {
if (col.OptionName === 'Quantity' && editField)
handleEditQuantityCombo(row);
else if (col.OptionName === 'Rate' && editField)
handleEditRateCombo(row);
else if (col.OptionName === 'Delete') removeFromCart(row);
}
}
};
@ -2216,19 +2240,26 @@ const ComboSalesBillTable = () => {
{/* Quantity */}
{item.OptionName === 'Quantity' && (
<th
className="qtyTh"
key={item.OptionId}
onClick={() =>
tableData?.length > 0 && OpenEditTotalAmount()
}
<Tooltip
placement="top"
trigger={[]}
title="AlT + P"
open={isAltPressed}
>
{!isMobile ? (
<Tooltip title="Quantity">Qty</Tooltip>
) : (
<div>Qty</div>
)}
</th>
<th
className="qtyTh"
key={item.OptionId}
onClick={() =>
tableData?.length > 0 && OpenEditTotalAmount()
}
>
{!isMobile ? (
<Tooltip title="Quantity">Qty</Tooltip>
) : (
<div>Qty</div>
)}
</th>
</Tooltip>
)}
{/* Rate */}
@ -2371,20 +2402,20 @@ 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',
background: row?.SalesId
? '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'
@ -2407,7 +2438,7 @@ const ComboSalesBillTable = () => {
const isActiveCell =
activeRowIndex === index &&
activeColIndex !== null &&
['Item', 'Quantity', 'Rate', 'Total'].indexOf(
['Item', 'Quantity', 'Rate', 'Total', 'Delete'].indexOf(
item.OptionName
) === activeColIndex;
@ -2427,37 +2458,44 @@ 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">
{/* {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={() =>
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' && (
@ -2484,28 +2522,29 @@ const ComboSalesBillTable = () => {
}}
key={`qty-${index}`}
tabIndex={0}
className={`${EditQtyCombo && row?.localId === Index
? 'EditQTYcomboTD'
: 'qtyTd'
} ${isActiveCell ? 'active-cell' : ''}`}
onClick={() =>
editField && handleEditQuantityCombo(row)
}
className={`${
EditQtyCombo && row?.localId === Index
? 'EditQTYcomboTD'
: 'qtyTd'
} ${isActiveCell ? 'active-cell' : ''}`}
onClick={() =>
editField && handleEditQuantityCombo(row)
}
>
{(!EditQtyCombo || row?.localId !== Index) && (
<>{row.OrderQty}</>
)}
{EditQtyCombo && row?.localId === Index && (
<ComboEditQtyAndRate
key={`edit-qty-${Index}`}
handleEditQuantityCancel={
handleEditQuantityComboCancel
}
BSBillingEditQuantity={EditQtyCombo}
Productdata={Modaldata}
Index={Index}
setIndex={setIndex}
setEditQtyCombo={setEditQtyCombo}
<ComboEditQtyAndRate
key={`edit-qty-${Index}`}
handleEditQuantityCancel={
handleEditQuantityComboCancel
}
BSBillingEditQuantity={EditQtyCombo}
Productdata={Modaldata}
Index={Index}
setIndex={setIndex}
setEditQtyCombo={setEditQtyCombo}
/>
)}
</td>
@ -2518,24 +2557,24 @@ const ComboSalesBillTable = () => {
className={`${EditRateCombo ? 'rateTdEditRate' : 'rateTd'} ${isActiveCell ? 'active-cell' : ''}`}
onClick={() => editField && handleEditRateCombo(row)}
>
{!EditRateCombo || row?.localId !== Index ? (
{!EditRateCombo || row?.localId !== Index ? (
<>
{allowDecimal
? Number(row?.OrderRate).toFixed(2)
: Number(row?.OrderRate)}
</>
) : null}
) : null}
{EditRateCombo && row?.localId === Index && (
<ComboEditQtyAndRate
key={`edit-rate-${Index}`}
handleEditRateComboCancel={
handleEditRateComboCancel
}
BSBillingEditRate={EditRateCombo}
Productdata={Modaldata}
Index={Index}
setIndex={setIndex}
setEditRateCombo={setEditRateCombo}
<ComboEditQtyAndRate
key={`edit-rate-${Index}`}
handleEditRateComboCancel={
handleEditRateComboCancel
}
BSBillingEditRate={EditRateCombo}
Productdata={Modaldata}
Index={Index}
setIndex={setIndex}
setEditRateCombo={setEditRateCombo}
/>
)}
</td>
@ -2550,9 +2589,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>
)}
@ -2584,8 +2623,8 @@ const ComboSalesBillTable = () => {
>
{allowDecimal
? Number(row.TotalAmt - (row?.Offer || 0)).toFixed(
2
)
2
)
: Number(row.TotalAmt - (row?.Offer || 0))}
</td>
)}
@ -2625,11 +2664,15 @@ const ComboSalesBillTable = () => {
{/* Delete */}
{item.OptionName === 'Delete' && (
<td key={`delete-${index}`} className="deleteTd">
<td
key={`delete-${index}`}
className={`deleteTd ${isActiveCell ? 'active-cell' : ''}`}
// className=""
>
<AiOutlineClose
onClick={() => removeFromCart(row)}
style={{
color: '#FF4D4F',
color: isActiveCell ? '#fff' : '#FF4D4F',
cursor: 'pointer',
textAlign: 'center',
width: '100%',

View File

@ -28,9 +28,9 @@
}
tbody {
>tr:last-child {
> tr:last-child {
// background-color: #e5d434 !important;
background-color: #ffffff !important;
background-color: #dde9ff !important;
position: sticky;
bottom: 0;
}
@ -207,7 +207,7 @@
box-shadow: 0 0 5px rgba(255, 193, 7, 0.5);
}
:where(.css-dev-only-do-not-override-mncuj7).ant-select-dropdown .ant-select-item-option-active:not(.ant-select-item-option-disabled) {
:where(.css-dev-only-do-not-override-mncuj7).ant-select-dropdown
.ant-select-item-option-active:not(.ant-select-item-option-disabled) {
background-color: rgba(116, 107, 107, 0.356);
}
}

View File

@ -41,7 +41,7 @@ import UserRelieveManager from '../../Template/RealivingUser.jsx';
import BSNavBarUserInfo from '../BSNavbar/BSNavBarUserInfo.jsx';
import BSScanTemplate from '../UtillComponents/BSScanTemplate.jsx';
import { RiFullscreenExitFill, RiFullscreenFill } from 'react-icons/ri';
import { Tooltip } from 'antd';
import { Popconfirm, Tooltip } from 'antd';
import { FaCaretDown } from 'react-icons/fa';
const subDirectory = import.meta.env.ENV_BASE_URL;
@ -253,11 +253,17 @@ const BSC1NavBar = (props) => {
>
<div className="BSC1NavBar-div1">
<div className="BSC1NavBar-manu">
<PozoHomeIcon
style={{ color: '#1292EE', fontSize: '30px' }}
className="BSC1NavBar-manu-icon"
onClick={handleHome}
/>
<Popconfirm
title="Are you sure you want to go to home?"
onConfirm={handleHome}
okText="Yes"
cancelText="No"
>
<PozoHomeIcon
style={{ color: '#1292EE', fontSize: '30px' }}
className="BSC1NavBar-manu-icon"
/>
</Popconfirm>{' '}
<div
className={`BSC1NavBar-manu-content ${menu ? 'BSC1NavBar-manu-menu' : ''}`}
>

View File

@ -3,7 +3,7 @@ import { FaWhatsapp, FaPrint, FaParking } from 'react-icons/fa';
import { useDispatch, useSelector } from 'react-redux';
import { useNavigate } from 'react-router-dom';
import moment from 'moment';
import { Badge, Popover, Modal } from 'antd';
import { Badge, Popover, Modal, Tooltip } from 'antd';
import { AiOutlineClose, AiOutlineArrowRight } from 'react-icons/ai';
import { GiBasket } from 'react-icons/gi';
import {
@ -573,6 +573,27 @@ const BSC1Payment = (props) => {
),
'11111111111111'
);
const [isAltPressed, setIsAltPressed] = useState(false);
useEffect(() => {
const handleKeyDown = (e) => {
if (e.key === 'F2') setIsAltPressed(true);
};
const handleKeyUp = (e) => {
if (e.key === 'F2') setIsAltPressed(false);
};
window.addEventListener('keydown', handleKeyDown);
window.addEventListener('keyup', handleKeyUp);
return () => {
window.removeEventListener('keydown', handleKeyDown);
window.removeEventListener('keyup', handleKeyUp);
};
}, []);
// Usage
useEffect(() => {
const setDefaultPaymentOption = async () => {
@ -3551,32 +3572,45 @@ const BSC1Payment = (props) => {
{BSComboNavbar?.[1]?.map((item) => (
<>
{item?.OptionName == 'QuickAdd' && (
<TooltipWrapper title={'QuickAdd'} isMobile={isMobile}>
<div
className="BSC1Payment-div1-btns"
onClick={setQuickOpen}
style={{
pointerEvents: OrderType === 'Failed' ? 'none' : 'auto',
}}
>
<PozoQuickAddIcon className="BSC1Payment-icon " />
<Tooltip
placement="top"
trigger={[]}
title="ALT + N"
open={isAltPressed}
>
<TooltipWrapper title={'QuickAdd'} isMobile={isMobile}>
<div
className="BSC1Payment-div1-btns"
onClick={setQuickOpen}
style={{
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
pointerEvents:
OrderType === 'Failed' ? 'none' : 'auto',
}}
>
Quick Add
<span
style={{ fontSize: '9px', letterSpacing: '0.5px' }}
<PozoQuickAddIcon className="BSC1Payment-icon " />
<div
style={{
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
}}
>
(Alt + N)
</span>
Quick Add
{!isAltPressed && (
<span
style={{
fontSize: '9px',
letterSpacing: '0.5px',
}}
>
(Alt + N)
</span>
)}
</div>
</div>
</div>
</TooltipWrapper>
</TooltipWrapper>
</Tooltip>
)}
{item?.OptionName == 'DineIn' &&
DineInPreference?.SettingValue === 'Y' &&
@ -3662,61 +3696,86 @@ const BSC1Payment = (props) => {
</div>
)}
{item?.OptionName == 'ExtraCharge' && (
<TooltipWrapper title={'Extra Charge'} isMobile={isMobile}>
<div
className="BSC1Payment-div1-btns"
onClick={handleextraCharges}
style={{
pointerEvents: OrderType === 'Failed' ? 'none' : 'auto',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
}}
>
<div style={{ display: 'flex' }}>
<PozoExtraChargesIcon className="BSC1Payment-icon" />
{/* EXTRA CHARGE */}
Extra Charge
</div>
<div style={{ fontSize: '9px', letterSpacing: '0.5px' }}>
(Alt + A)
</div>
</div>
</TooltipWrapper>
)}
{item?.OptionName == 'RePrint' && (
<TooltipWrapper title={'RePrint'} isMobile={isMobile}>
<div
className="BSC1Payment-div1-btns"
onClick={handleReprint}
style={{
pointerEvents: OrderType === 'Failed' ? 'none' : 'auto',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
}}
>
<Tooltip
placement="top"
trigger={[]}
title="Alt + A"
open={isAltPressed}
>
<TooltipWrapper title={'Extra Charge'} isMobile={isMobile}>
<div
className="BSC1Payment-div1-btns"
onClick={handleextraCharges}
style={{
pointerEvents:
OrderType === 'Failed' ? 'none' : 'auto',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
gap: '4px',
whiteSpace: 'nowrap',
justifyContent: 'center',
}}
>
<PozoReprintIcon className="BSC1Payment-icon" />
Re-Print
<span
style={{ fontSize: '9px', letterSpacing: '0.5px' }}
>
(Alt + R)
</span>
<div style={{ display: 'flex' }}>
<PozoExtraChargesIcon className="BSC1Payment-icon" />
{/* EXTRA CHARGE */}
Extra Charge
</div>
{!isAltPressed && (
<div
style={{ fontSize: '9px', letterSpacing: '0.5px' }}
>
(Alt + A)
</div>
)}
</div>
</div>
</TooltipWrapper>
</TooltipWrapper>
</Tooltip>
)}
{item?.OptionName == 'RePrint' && (
<Tooltip
placement="top"
trigger={[]}
title="Alt + R"
open={isAltPressed}
>
<TooltipWrapper title={'RePrint'} isMobile={isMobile}>
<div
className="BSC1Payment-div1-btns"
onClick={handleReprint}
style={{
pointerEvents:
OrderType === 'Failed' ? 'none' : 'auto',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
}}
>
<div
style={{
display: 'flex',
alignItems: 'center',
gap: '4px',
whiteSpace: 'nowrap',
}}
>
<PozoReprintIcon className="BSC1Payment-icon" />
Re-Print
{!isAltPressed && (
<span
style={{
fontSize: '9px',
letterSpacing: '0.5px',
}}
>
(Alt + R)
</span>
)}
</div>
</div>
</TooltipWrapper>
</Tooltip>
)}
</>
))}
@ -4209,32 +4268,39 @@ const BSC1Payment = (props) => {
OrderType != 'Failed' &&
CheckBookingStatus != 'Close' &&
!addnewAccess && (
<TooltipWrapper title={'Hold'} isMobile={isMobile}>
{' '}
<div
style={{
backgroundColor: '' ? '#52c41a' : '#1292EE',
color: '' ? '#52c41a' : '#ffffffff',
height: '40px',
width: '45px',
borderRadius: '6px',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
padding: '8px 8px 12px 8px',
}}
>
<PozoHoldIcon
className="BSBillingNav-icon-table-icon"
onClick={() => AddBookingDetails('Hold')}
<Tooltip
placement="bottom"
trigger={[]}
title="ALT + W"
open={isAltPressed}
>
<TooltipWrapper title={'Hold'} isMobile={isMobile}>
{' '}
<div
style={{
cursor: 'pointer',
// color: '' ? '#52c41a' : '#1292EE',
backgroundColor: '' ? '#52c41a' : '#1292EE',
color: '' ? '#52c41a' : '#ffffffff',
height: '40px',
width: '45px',
borderRadius: '6px',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
padding: '8px 8px 12px 8px',
}}
/>{' '}
{/* <p className="payOptionDecition"> Hold</p> */}
</div>
</TooltipWrapper>
>
<PozoHoldIcon
className="BSBillingNav-icon-table-icon"
onClick={() => AddBookingDetails('Hold')}
style={{
cursor: 'pointer',
// color: '' ? '#52c41a' : '#1292EE',
}}
/>{' '}
{/* <p className="payOptionDecition"> Hold</p> */}
</div>
</TooltipWrapper>
</Tooltip>
)
: ''}
@ -4542,101 +4608,119 @@ const BSC1Payment = (props) => {
{BSComboData?.BookingBilling?.[1]?.map((item) => (
<>
{item?.OptionName == 'AddCustomer' && !preOrderOpen && (
<div
style={{ display: 'flex', gap: '0', alignItems: 'center' }}
<Tooltip
placement="top"
trigger={[]}
title="ALT + Z"
open={isAltPressed}
>
<BSCustomerSelect />
<TooltipWrapper title={'Add Customer'} isMobile={isMobile}>
<div>
<PozoAddCustomerIcon
className="BSBillingNav-icon-table-icon bspaymentcomboAddCus"
onClick={handleAddCustomer}
style={{
display: 'flex',
fontSize: '20px',
width: '35px',
height: '40px',
padding: '4px',
borderRadius: '0 6px 6px 0',
cursor: Custdisable ? 'not-allowed' : 'pointer',
color:
selOption || GetCustId ? '#ffffffff' : '#ffffffff',
backgroundColor:
selOption || GetCustId ? '#52c41a' : '#1292EE',
}}
/>
</div>
</TooltipWrapper>
</div>
<div
style={{ display: 'flex', gap: '0', alignItems: 'center' }}
>
<BSCustomerSelect />
<TooltipWrapper title={'Add Customer'} isMobile={isMobile}>
<div>
<PozoAddCustomerIcon
className="BSBillingNav-icon-table-icon bspaymentcomboAddCus"
onClick={handleAddCustomer}
style={{
display: 'flex',
fontSize: '20px',
width: '35px',
height: '40px',
padding: '4px',
borderRadius: '0 6px 6px 0',
cursor: Custdisable ? 'not-allowed' : 'pointer',
color:
selOption || GetCustId
? '#ffffffff'
: '#ffffffff',
backgroundColor:
selOption || GetCustId ? '#52c41a' : '#1292EE',
}}
/>
</div>
</TooltipWrapper>
</div>
</Tooltip>
)}
</>
))}
<div className="comboTotalBillBTN">
<TooltipWrapper title="Create Bill (F4)" isMobile={isMobile}>
<button
className={
// (empData?.AddAccess === "N" || SAAccessCommonMaster?.AddAccess === "N")
addnewAccess
? 'BSC1Payment-div4-button-disable'
: FirstPaymentclick === false &&
OrderCardDetail?.length > 0 &&
paybtnselected &&
CheckBookingStatus != 'Close'
? !OrderStatus
? salesBillEdit &&
currentOrderNetAmount < previousNetAmount
? 'BSC1Payment-div4-button'
: 'BSC1Payment-div4-button'
: 'BSC1Payment-div4-button Order'
: 'BSC1Payment-div4-button-disable'
}
// onClick={() => {
// (qrCode && SelectedUPIPayOption === "Default") ? UpiPayment() : OrderStatus ? AddBookingDetails("Dine-In") : AddBookingDetails(BookingType, true);
// }}
onClick={handleButtonClick}
style={{ borderRadius: '6px 0 0 6px' }}
>
{!OrderStatus ? (
salesBillEdit && currentOrderNetAmount < previousNetAmount ? (
<div className="Table4-Order">
Refund:
{(previousNetAmount || 0) - (currentOrderNetAmount || 0)}
</div>
<Tooltip
placement="left"
trigger={[]}
title="F4"
open={isAltPressed}
>
<TooltipWrapper title="Create Bill (F4)" isMobile={isMobile}>
<button
className={
// (empData?.AddAccess === "N" || SAAccessCommonMaster?.AddAccess === "N")
addnewAccess
? 'BSC1Payment-div4-button-disable'
: FirstPaymentclick === false &&
OrderCardDetail?.length > 0 &&
paybtnselected &&
CheckBookingStatus != 'Close'
? !OrderStatus
? salesBillEdit &&
currentOrderNetAmount < previousNetAmount
? 'BSC1Payment-div4-button'
: 'BSC1Payment-div4-button'
: 'BSC1Payment-div4-button Order'
: 'BSC1Payment-div4-button-disable'
}
// onClick={() => {
// (qrCode && SelectedUPIPayOption === "Default") ? UpiPayment() : OrderStatus ? AddBookingDetails("Dine-In") : AddBookingDetails(BookingType, true);
// }}
onClick={handleButtonClick}
style={{ borderRadius: '6px 0 0 6px' }}
>
{!OrderStatus ? (
salesBillEdit &&
currentOrderNetAmount < previousNetAmount ? (
<div className="Table4-Order">
Refund:
{(previousNetAmount || 0) -
(currentOrderNetAmount || 0)}
</div>
) : (
<>
{isMobile ? (
`${safeRound(
OrderType === 'Failed'
? FailedTotalAmt
: credit && overAllBal >= 0
? Math.max(0, TotalAmount - overAllBal)
: TotalAmount
)}`
) : (
<div>
<CountUp
duration={0.4}
className="counter"
end={safeRound(
OrderType === 'Failed'
? FailedTotalAmt
: credit && overAllBal >= 0
? Math.max(0, TotalAmount - overAllBal)
: TotalAmount
)}
/>
</div>
)}
<AiOutlineArrowRight width="25px" height="25px" />
</>
)
) : (
<>
{isMobile ? (
`${safeRound(
OrderType === 'Failed'
? FailedTotalAmt
: credit && overAllBal >= 0
? Math.max(0, TotalAmount - overAllBal)
: TotalAmount
)}`
) : (
<div>
<CountUp
duration={0.4}
className="counter"
end={safeRound(
OrderType === 'Failed'
? FailedTotalAmt
: credit && overAllBal >= 0
? Math.max(0, TotalAmount - overAllBal)
: TotalAmount
)}
/>
</div>
)}
<AiOutlineArrowRight width="25px" height="25px" />
</>
)
) : (
<div className="Table4-Order">ORDER</div>
)}
</button>
</TooltipWrapper>
<div className="Table4-Order">ORDER</div>
)}
</button>
</TooltipWrapper>
</Tooltip>
<Popover
content={
<>

View File

@ -83,7 +83,7 @@ import { useSaleswiseOfferWatcher } from '../BSItemCards/SalesWiseOffer.jsx';
import ExpireConfirmModal from '../BookingFunctionality/ExpireConfirmModal.jsx';
export default function BSC1Search(props) {
const dispatch = useDispatch();
const dispatch = useDispatch();
const searchPromiseRef = useRef(null);
const debounceTimerRef = useRef(null);
const SessionData = useSelector(StoredSessionData);
@ -4761,7 +4761,7 @@ export default function BSC1Search(props) {
</div>
</div>
</div>
<div className="Re-Print-table">
<div className="StockVariantModal">
<Tables columns={stockcolumns} data={stockdataSource} />
</div>
</div>

View File

@ -10,6 +10,7 @@ import { GlobalCompBranchData } from '../../../../Features/BrachLogin/BranchLogi
import { userDataByUserId } from '../../../../Features/UserAccount/userData';
import { useSelector } from 'react-redux';
import { useNavigate } from 'react-router-dom';
import "../../../../Styles/BookingScreen/Components/BSNavbar/BSNavbar1.scss"
const subDirectory = import.meta.env.ENV_BASE_URL;
const BSNavBarUserInfo = ({

View File

@ -66,7 +66,7 @@ import BSExpireProductsList from '../../Components/UtillComponents/BSExpireProdu
import ComboSalesBillTable from '../../Components/BSBillingTables/ComboSalesBillTable/ComboSalesBillTable.jsx';
import { GiBasket } from 'react-icons/gi';
import { FaRegKeyboard } from 'react-icons/fa';
import { CgSearchLoading } from "react-icons/cg";
import { CgSearchLoading } from 'react-icons/cg';
import { DefaultModal } from '../../../../Components/Modal/DefaultModal.jsx';
import MultipleSearch from '../../Components/UtillComponents/MultipleSearch.jsx';
import VerfiedProducts from '../../Components/BSNavbar/verfiedProduct/VerfiedProducts.jsx';
@ -134,10 +134,30 @@ export default function BSCombo1() {
?.ScreenStatus ?? 'Open';
const [BookingModalOpen, setBookingModalOpen] = useState(false);
const currentDateValue = moment().format('YYYY-MM-DD HH:mm:ss');
const [ListOfInvoices, setListOfInvoices] = useState(false);
const [ComboDropDown, setComboDropDown] = useState();
const [isAltPressed, setIsAltPressed] = useState(false);
useEffect(() => {
const handleKeyDown = (e) => {
if (e.key === 'F2') setIsAltPressed(true);
};
const handleKeyUp = (e) => {
if (e.key === 'F2') setIsAltPressed(false);
};
window.addEventListener('keydown', handleKeyDown);
window.addEventListener('keyup', handleKeyUp);
return () => {
window.removeEventListener('keydown', handleKeyDown);
window.removeEventListener('keyup', handleKeyUp);
};
}, []);
useEffect(() => {
fetchAmount();
if (
@ -149,7 +169,6 @@ export default function BSCombo1() {
}
}, [SessionData]);
useEffect(() => {
Combodata();
if (AppId && CompId && BranchId && UserId) {
@ -185,7 +204,6 @@ export default function BSCombo1() {
await dispatch(getSalesDetailData(data)).unwrap();
};
const openModalKiosk = () => {
setKioskopen(true);
};
@ -284,8 +302,10 @@ export default function BSCombo1() {
/>
{UserType != 'Super Admin' &&
UserType != 'Super Admin User' &&
(AppExpDate?.RemainingDays <= 7 || AppExpDate === 'undefined' || AppExpDate?.PlanType?.toLowerCase() === 'extend') && (
<PlanExpireNotification />
(AppExpDate?.RemainingDays <= 7 ||
AppExpDate === 'undefined' ||
AppExpDate?.PlanType?.toLowerCase() === 'extend') && (
<PlanExpireNotification />
)}
{/* Combo Container */}
@ -295,25 +315,38 @@ export default function BSCombo1() {
<div className="comboNavbarSubMain">
{/* Multiple search */}
<Tooltip title={'Multiple Search'}>
<div className='MultiSearchIconDiv'>
<div className="MultiSearchIconDiv">
<CgSearchLoading onClick={() => setMultiple(true)} />
</div>
</Tooltip>
{Comboglobal === false && (
<BSC1Search
data={BSComboData?.BookingLayout[0]}
OrderType={OrderType}
/>
<Tooltip
placement="bottom"
trigger={[]}
title="SHIFT + S"
open={isAltPressed}
>
<BSC1Search
data={BSComboData?.BookingLayout[0]}
OrderType={OrderType}
/>
</Tooltip>
)}
{Comboglobal === true && (
<div style={{ padding: '4px' }} className="CombomainSearch">
<div className="M">
<div className="BSC1Search-div1">
<BSNavBarComboSearch SessionData={SessionData} />
<Tooltip
placement="bottom"
trigger={[]}
title="SHIFT + S"
open={isAltPressed}
>
<div style={{ padding: '4px' }} className="CombomainSearch">
<div className="M">
<div className="BSC1Search-div1">
<BSNavBarComboSearch SessionData={SessionData} />
</div>
</div>
</div>
</div>
</Tooltip>
)}
{/* <div className="Layout-bill-container" style={{ margin: '0' }}> */}
@ -434,7 +467,10 @@ export default function BSCombo1() {
)}
{/* Verify Products */}
{VerifyTheProducts && (
<TooltipWrapper title={'Verfied Products'} isMobile={isMobile}>
<TooltipWrapper
title={'Verfied Products'}
isMobile={isMobile}
>
<div>
<VerfiedProducts />
</div>
@ -562,9 +598,7 @@ export default function BSCombo1() {
destroyOnClose={true}
children={
<>
<MultipleSearch
close={setMultiple}
/>
<MultipleSearch close={setMultiple} />
</>
}
/>

View File

@ -11,7 +11,7 @@
border-radius: 6px;
cursor: pointer;
font-weight: 700;
font-family: 'Poppins' !important;
font-family: "Poppins" !important;
align-items: center;
gap: 5px;
height: 30px;
@ -31,7 +31,7 @@
color: #000000;
font-size: 14px;
font-weight: 500;
font-family: 'Poppins';
font-family: "Poppins";
}
.Retail-PaymentCloseButtondiv {
display: flex;
@ -40,5 +40,38 @@
.Retail-PaymentClose-Title {
font-size: 16px;
font-weight: 600;
font-family: 'Gilroy' !important;
font-family: "Gilroy" !important;
}
.PaymentCloseButtondiv {
display: flex;
justify-content: flex-end;
}
.PaymentCloseButton {
font-size: 12px;
border: none;
padding: 2px 5px;
border-radius: 6px;
cursor: pointer;
font-weight: 400;
font-family: "Poppins" !important;
align-items: center;
gap: 5px;
height: 30px;
background-color: #f62121;
color: #fff;
width: 150px;
}
.PaymentClosingOverAll-sub {
color: #000000;
font-size: 14px;
font-weight: 500;
font-family: "Poppins";
width: 250px;
div {
display: flex;
align-items: center;
justify-content: space-between;
}
}

View File

@ -86,13 +86,12 @@ const SalesCountComponent = React.memo(
type?.PreferredStatus === 'Y'
);
const preferenceshortcutkey = preferencedata?.[0]?.[
'SettingDtlDetails'
]?.some(
(item) =>
item.SettingIdName.toLowerCase() === 'shortcutkeys' &&
item.SettingValue === 'Y'
);
'SettingDtlDetails'
]?.some(
(item) =>
item.SettingIdName.toLowerCase() === 'shortcutkeys' &&
item.SettingValue === 'Y'
);
const [messageType, setMessageType] = useState(null);
const [messageData, setMessageData] = useState(null);
@ -122,6 +121,26 @@ const SalesCountComponent = React.memo(
const startIndex = (currentPage - 1) * rowsPerPage;
const currentData = bookings?.slice(startIndex, startIndex + rowsPerPage);
const [isAltPressed, setIsAltPressed] = useState(false);
useEffect(() => {
const handleKeyDown = (e) => {
if (e.key === 'F2') setIsAltPressed(true);
};
const handleKeyUp = (e) => {
if (e.key === 'F2') setIsAltPressed(false);
};
window.addEventListener('keydown', handleKeyDown);
window.addEventListener('keyup', handleKeyUp);
return () => {
window.removeEventListener('keydown', handleKeyDown);
window.removeEventListener('keyup', handleKeyUp);
};
}, []);
console.log(dailySalesData, 'dailySalesDatadailySalesData', bookings);
function safeRound(amountStr) {
@ -238,7 +257,7 @@ const SalesCountComponent = React.memo(
})
);
} else {
setTableData([]);
setTableData([]);
console.warn('API returned unsuccessful status', response);
}
} catch (error) {
@ -270,9 +289,7 @@ const SalesCountComponent = React.memo(
key: 'RequestId',
align: 'center',
width: '70px',
render: (text, record, index) => (
record?.RequestId?.split('-')?.pop()
),
render: (text, record, index) => record?.RequestId?.split('-')?.pop(),
},
{
title: 'Date & Time',
@ -362,13 +379,14 @@ const SalesCountComponent = React.memo(
className="sr-stock-recieve-button"
title="Receive Stock"
onClick={() => handleModalOpen(index)}
> <span>Receive</span>
>
{' '}
<span>Receive</span>
<GoPackageDependencies size={18} />
</div>
</div>
),
}
},
];
const handlePageChange = (current) => {
setpage(current);
@ -1079,26 +1097,34 @@ const SalesCountComponent = React.memo(
</table>
</div>
</DefaultModal>
<Tooltip title="Receive Stock">
{TableData?.length > 0 && AutoReceiveStock && (
<button
className="blink blinkStock"
onClick={() => setIsReceivedModelOpen(true)}
title="Received Stock"
>
<MdOutlineCallReceived />
Stock
</button>
)}
</Tooltip>
<Tooltip title="Receive Stock">
{TableData?.length > 0 && AutoReceiveStock && (
<button
className="blink blinkStock"
onClick={() => setIsReceivedModelOpen(true)}
title="Received Stock"
>
<MdOutlineCallReceived />
Stock
</button>
)}
</Tooltip>
</div>
{/* {preferenceshortcutkey && <ShortcutKeyHelper />} */}
{preferenceshortcutkey && (
<div className="keyboardShortcut">
<ShortcutKeyHelper />
</div>)}
<div className="keyboardShortcut">
<ShortcutKeyHelper />
</div>
)}
<AllSalesPageSettings />
<ProductPriceChange />
<Tooltip
placement="bottom"
trigger={[]}
title="CTRL + E"
open={isAltPressed}
>
<ProductPriceChange />
</Tooltip>
<ReceivedStocksModal
open={isReceivedModelOpen}
onClose={() => {
@ -1107,7 +1133,7 @@ const SalesCountComponent = React.memo(
columns={columns}
tableData={TableData}
handlePageChange={handlePageChange}
customTable={false}
customTable={false}
/>
<ProductDetailsModal

View File

@ -42,3 +42,5 @@
font-weight: 600;
font-family: 'Gilroy' !important;
}

View File

@ -1,15 +1,15 @@
.stock-adjustment-container {
padding: 20px;
// padding: 20px;
// background-color: #fafafa;;
border-radius: 10px;
font-family: 'Poppins', sans-serif;
font-family: "Poppins", sans-serif;
color: #1f2d3d;
width: 100%;
height: 90%;
position: relative;
}
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");
.stock-adjustment-top-bar {
display: flex;
@ -216,9 +216,9 @@
display: flex;
align-items: center;
justify-content: flex-end;
position: absolute;
right: 0;
bottom: 0;
position: fixed;
right: 1rem;
bottom: 1rem;
@media (max-width: 720px) {
position: unset;
@ -232,7 +232,7 @@
.stock-adjustment-table-row {
grid-template-columns: 1fr 1fr 1fr 1fr;
grid-auto-rows: minmax(44px, auto);
grid-template-areas: 'sno product' 'current actual';
grid-template-areas: "sno product" "current actual";
}
.stock-adjustment-table-cell.stock-adjustment-sno {
@ -252,13 +252,11 @@
}
}
.custom-table {
width: 100%;
border-collapse: collapse;
border: 1px solid #909090;
font-family: 'Poppins', sans-serif;
font-family: "Poppins", sans-serif;
> thead {
position: sticky;
@ -298,7 +296,6 @@
font-size: 12px !important;
}
.custom-table tbody tr td {
text-align: left;
@ -307,7 +304,7 @@
}
}
.custom-table tbody tr td[colspan='7'] {
.custom-table tbody tr td[colspan="7"] {
padding: 20px;
}
@ -351,8 +348,6 @@
}
}
.custom-table {
Button:disabled,
Button[disabled] {
@ -362,20 +357,18 @@
}
}
.openingStock-ignoreProductBTN {
width: max-content;
white-space: nowrap;
height: max-content;
padding: 10px 16px;
color: #fff;
border-radius: 8px;
cursor: pointer;
border: none;
background-color: #e42006;
font-size: 14px;
font-weight: 400;
font-family: "Poppins";
margin-left: 6px;
width: max-content;
white-space: nowrap;
height: max-content;
padding: 10px 16px;
color: #fff;
border-radius: 8px;
cursor: pointer;
border: none;
background-color: #e42006;
font-size: 14px;
font-weight: 400;
font-family: "Poppins";
margin-left: 6px;
}

View File

@ -999,6 +999,10 @@
.Tbl3-Variant {
font-size: 10px;
}
.Tbl3VariantActve{
color: #000;
font-size: 11px;
}
.css-w9q2zk-Input2 {
color: black !important;

View File

@ -505,3 +505,39 @@
display: flex;
}
}
.salesUserProfile {
display: flex;
align-items: center;
gap: 6px;
flex-direction: column;
padding: 10px 1rem;
font-family: "Poppins";
> div {
width: 100%;
font-size: 14px;
display: flex;
align-items: center;
gap: 10px;
}
.BSNavBar1-Acc-menu-list {
padding: 6px 10px;
background-color: #ee0000;
color: #fff;
border-radius: 6px;
cursor: pointer;
display: flex;
align-items: center;
gap: 1rem;
}
img {
width: 70px;
height: 70px;
border-radius: 1000px;
border: 1px solid #a1a1a1;
background-position: center;
}
}

View File

@ -6,9 +6,7 @@
width: 100%;
display: flex;
flex-direction: row;
/* padding: 0.5rem 22px 0 1.5rem; */
gap: 0.5rem;
/* padding-bottom: 8px; */
align-items: center;
justify-content: center;
padding: 4px 8px;
@ -49,9 +47,7 @@
align-items: center;
justify-content: center;
}
.BSC1Search-div1
.ant-select:not(.ant-select-customize-input)
.ant-select-selector {
.BSC1Search-div1 .ant-select:not(.ant-select-customize-input) .ant-select-selector {
border: none;
height: 35px;
}
@ -75,17 +71,11 @@
background-color: var(--ERROR_COLOR);
border: none;
font-size: 15px;
font-family: 'Poppins', sans-serif;
font-family: "Poppins", sans-serif;
font-weight: 600;
color: #fff;
cursor: pointer;
}
// .BSC1Search-button1:hover{
// opacity: 0.5;
// }
// .BSC1Search-button1:focus{
// background-color: var(--DEFAULT_SELECTED_COLOR);
// }
.BSC1Search-button2 {
width: 100px;
height: 57px;
@ -93,7 +83,7 @@
background-color: #dddddd;
border: none;
font-size: 15px;
font-family: 'Poppins', sans-serif;
font-family: "Poppins", sans-serif;
font-weight: 600;
cursor: pointer;
opacity: 1;
@ -146,3 +136,9 @@
padding: 0.3rem;
}
}
.StockVariantModal {
height: 40vh;
overflow: auto;
scrollbar-width: thin;
}

View File

@ -485,9 +485,15 @@
width: 32px;
height: 32px;
margin-right: unset !important;
outline: none !important;
border: none;
border-radius: 4px;
padding: 2px;
cursor: pointer;
img {
filter: invert(1);
width: 25px !important;
height: 25px !important;
}
}
@ -638,6 +644,10 @@
svg {
color: #fff !important;
}
img {
width: 20px !important;
height: 20px !important;
}
}
.RiVerifiedBadgeFill {
@ -690,3 +700,24 @@
font-size: 10px !important;
}
}
.MultiSearchIconDiv3 {
background-color: #ffffff;
color: #1292ee !important;
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
width: 32px !important;
height: 32px;
padding: 4px;
svg {
font-size: 22px;
width: 32px !important;
height: 32px;
display: flex;
}
}

View File

@ -105,7 +105,8 @@
width: 100%;
text-align: end;
font-size: 16px;
font-weight: 700;
font-weight: 500;
font-family: "Poppins";
padding: 0.5rem 0;
}
.Denomination-ul {