fixed bugs

This commit is contained in:
unknown 2026-02-25 16:26:02 +05:30
parent 6c23498eea
commit 7e8ced53c6
7 changed files with 166 additions and 155 deletions

View File

@ -263,7 +263,7 @@ const ComboEditQtyAndRate = (props) => {
};
const quantityValidation = async (val) => {
setQuantity(val)
}
@ -3262,7 +3262,7 @@ const ComboEditQtyAndRate = (props) => {
min="0"
onChange={(e) => quantityValidation(e.target.value)}
onBlur={() => {
if (Quantity && Quantity.trim() !== '') {
if (Quantity && String(Quantity || '').trim() !== '') {
AddProductQuantity();
}
}}

View File

@ -33,11 +33,12 @@ import { DropDowns } from '../../../../Components/Forms/DropDown.jsx';
import { Messages } from '../../../../Components/Notifications/Messages.jsx';
import '../../../../Styles/BookingScreen/Components/UtillComponents/BSNavBarDragItems.scss';
import { getTemplateData } from '../../../../Features/ThemeChange/ThemeChange.js';
import { capitalizeFirstLetter } from '../../../../utils/calculations.js';
const BSNavBarDragItems = ({
type,
drawerOpen = false,
setDrawerOpen = () => {},
setDrawerOpen = () => { },
}) => {
const draggingComponent = useSelector(GlobaldraggingComponent);
const GlobalisFavClickedCheck = useSelector(GlobalisFavClicked);
@ -72,27 +73,27 @@ const BSNavBarDragItems = ({
BranchId: BranchId,
...(draggingComponent == 'sub-category'
? {
ProdCat: MapData?.[0]?.ProdCat,
ProductSubCatDtl: MapData.map((item, index) => ({
ProdSubCat: item?.ProdSubCat,
DisplayProdSubCatNo: index + 1,
})),
}
ProdCat: MapData?.[0]?.ProdCat,
ProductSubCatDtl: MapData.map((item, index) => ({
ProdSubCat: item?.ProdSubCat,
DisplayProdSubCatNo: index + 1,
})),
}
: draggingComponent == 'category'
? {
ProductCatDtl: MapData.map((item, index) => ({
ProdCat: item?.ProdCat,
DisplayProdCatNo: index + 1,
})),
}
ProductCatDtl: MapData.map((item, index) => ({
ProdCat: item?.ProdCat,
DisplayProdCatNo: index + 1,
})),
}
: {
ProdCat: MapData?.[0]?.ProdCat || null,
ProdSubCat: MapData?.[0]?.ProdSubCat || null,
ProductDtl: MapData.map((item, index) => ({
ProdId: item?.ProdId,
DisplayProductNo: index + 1,
})),
}),
ProdCat: MapData?.[0]?.ProdCat || null,
ProdSubCat: MapData?.[0]?.ProdSubCat || null,
ProductDtl: MapData.map((item, index) => ({
ProdId: item?.ProdId,
DisplayProductNo: index + 1,
})),
}),
UpdatedBy: UserId,
};
@ -199,7 +200,7 @@ const BSNavBarDragItems = ({
draggingComponent === item.name ? 'selected' : ''
}
>
{item.name}
{capitalizeFirstLetter(item.name)}
</button>
))}
</div>
@ -279,47 +280,47 @@ const BSNavBarDragItems = ({
(!GlobalisFavClickedCheck &&
draggingComponent !== 'card' &&
draggingComponent !== 'sub-category'))) ||
(!GlobalisFavClickedCheck &&
draggingComponent !== 'card' &&
draggingComponent == 'sub-category') ||
(!GlobalisFavClickedCheck &&
draggingComponent == 'card' &&
draggingComponent !== 'sub-category')
(!GlobalisFavClickedCheck &&
draggingComponent !== 'card' &&
draggingComponent == 'sub-category') ||
(!GlobalisFavClickedCheck &&
draggingComponent == 'card' &&
draggingComponent !== 'sub-category')
? MapData?.map((item, index) => (
<Draggable
key={index}
draggableId={index.toString()}
index={index}
>
{(provided, snapshot) => (
<div
className="AddFavItemList4"
ref={provided.innerRef}
{...provided.draggableProps}
{...provided.dragHandleProps}
style={{
...provided.draggableProps.style,
margin: 0,
padding: '8px 12px',
background: snapshot.isDragging
? '#e0f7fa'
: '#fff',
border: '1px solid #ccc',
borderRadius: 4,
}}
>
<p>
{draggingComponent == 'category'
? item?.ProdCatName
: draggingComponent == 'sub-category'
? item?.ProdSubCatName
: item?.ProdName}
</p>
</div>
)}
</Draggable>
))
: 'NO data Found'}
<Draggable
key={index}
draggableId={index.toString()}
index={index}
>
{(provided, snapshot) => (
<div
className="AddFavItemList4"
ref={provided.innerRef}
{...provided.draggableProps}
{...provided.dragHandleProps}
style={{
...provided.draggableProps.style,
margin: 0,
padding: '8px 12px',
background: snapshot.isDragging
? '#e0f7fa'
: '#fff',
border: '1px solid #ccc',
borderRadius: 4,
}}
>
<p>
{draggingComponent == 'category'
? item?.ProdCatName
: draggingComponent == 'sub-category'
? item?.ProdSubCatName
: item?.ProdName}
</p>
</div>
)}
</Draggable>
))
: 'No Data Found'}
{provided.placeholder}
</div>
)}

View File

@ -491,10 +491,10 @@ const SalesCountForStandard = React.memo(() => {
return (
DineInAccess?.SettingValue === 'Y' &&
DineInOrderCount +
TakeAwayOrderCount +
SelfTakeAwayOrderCount +
SelfDineInOrderCount >
0 &&
TakeAwayOrderCount +
SelfTakeAwayOrderCount +
SelfDineInOrderCount >
0 &&
(takeAwayPreference || dinePreference)
);
}, [DineInAccess, sales, dinePreference, takeAwayPreference]);
@ -652,7 +652,7 @@ const SalesCountForStandard = React.memo(() => {
{DineInAccess?.SettingValue === 'Y' &&
takeAwayPreference &&
(TakeAwayOrderCount || SelfTakeAwayOrderCount || PreOrderAmount) >
0 && (
0 && (
<Tooltip
className="standardTooltipDineIN"
title={renderBreakdown([
@ -930,8 +930,8 @@ const SalesCountForStandard = React.memo(() => {
(e.currentTarget.style.backgroundColor = '#d6e4ff')
}
onMouseLeave={(e) =>
(e.currentTarget.style.backgroundColor =
index % 2 === 0 ? '#f7faff' : '#e9f1ff')
(e.currentTarget.style.backgroundColor =
index % 2 === 0 ? '#f7faff' : '#e9f1ff')
}
>
<td style={{ border: '1px solid #ddd', padding: '8px' }}>
@ -1162,8 +1162,8 @@ const SalesCountForStandard = React.memo(() => {
(e.currentTarget.style.backgroundColor = '#e6f2ff')
}
onMouseLeave={(e) =>
(e.currentTarget.style.backgroundColor =
index % 2 === 0 ? '#f7faff' : '#ffffff')
(e.currentTarget.style.backgroundColor =
index % 2 === 0 ? '#f7faff' : '#ffffff')
}
>
<td

View File

@ -55,6 +55,7 @@ function PaymentOptions({ setModalOpen }) {
const [paymentMode, setPaymentMode] = useState([]);
const [BusinessUpiModes, setBusinessUpiModes] = useState([]);
const [paymentGatewayMode, setPaymentGatewayMode] = useState([]);
console.log(paymentOptions, "paymentOptions", BusinessUpiModes)
const [paymentDeviceMode, setPaymentDeviceMode] = useState([]);
const [selectedConfigs, setSelectedConfigs] = useState({
salesDetails: [],
@ -421,7 +422,6 @@ function PaymentOptions({ setModalOpen }) {
BranchId: BranchId,
DetailType: 'BU',
};
ALERT('HIH');
const Businessupidetails = await dispatch(
getPaymentUPIDetails(BusiData)
).unwrap();
@ -622,31 +622,31 @@ function PaymentOptions({ setModalOpen }) {
(details) => details.FlowId === sectionId
)
? prevState[key]?.map((details) => {
if (details.FlowId === sectionId) {
return {
...details,
optionDetails: details?.optionDetails?.some(
(opt) => opt.optionId === optionId
if (details.FlowId === sectionId) {
return {
...details,
optionDetails: details?.optionDetails?.some(
(opt) => opt.optionId === optionId
)
? details?.optionDetails?.filter(
(opt) => opt.optionId !== optionId
)
? details?.optionDetails?.filter(
(opt) => opt.optionId !== optionId
)
: [
...details.optionDetails,
{ optionId, optionName: option },
],
};
}
return details;
})
: [
...details.optionDetails,
{ optionId, optionName: option },
],
};
}
return details;
})
: [
...prevState[key],
{
FlowId: sectionId,
FlowName: section,
optionDetails: [{ optionId, optionName: option }],
},
];
...prevState[key],
{
FlowId: sectionId,
FlowName: section,
optionDetails: [{ optionId, optionName: option }],
},
];
return { ...prevState, [key]: updatedDetails };
});
@ -864,8 +864,7 @@ function PaymentOptions({ setModalOpen }) {
{configDetails?.some((detail) =>
detail?.optionDetails?.some((opt) => opt.optionName === configName)
) &&
modeOptions.length > 0 &&
(configName === 'Business Upi' && section === 'kioskSales' ? (
modeOptions.length > 0 ? (configName === 'Business Upi' && section === 'kioskSales' ? (
<Radio.Group
value={getSelectedRadioValue()}
onChange={(e) => {
@ -951,7 +950,7 @@ function PaymentOptions({ setModalOpen }) {
</div>
);
})
))}
)) : <div style={{ color: '#c71b1d' }}>No payment methods available</div>}
</div>
);
};
@ -1043,27 +1042,27 @@ function PaymentOptions({ setModalOpen }) {
// Update newOptionDetails based on whether we are adding or removing
let newOptionDetails = isAdding
? [
...currentDetails.OptionDetails,
{
OptionName: configName,
ModeDetails: [
{
ModeId: optionId,
ModeName:
option.ConfigName ||
option.MethodName ||
option.MerchantNameIdName ||
option.BusinessName,
},
],
},
]
...currentDetails.OptionDetails,
{
OptionName: configName,
ModeDetails: [
{
ModeId: optionId,
ModeName:
option.ConfigName ||
option.MethodName ||
option.MerchantNameIdName ||
option.BusinessName,
},
],
},
]
: currentDetails.OptionDetails.map((details) => ({
...details,
ModeDetails: details.ModeDetails.filter(
(mode) => mode.ModeId !== optionId
),
})).filter((details) => details.ModeDetails.length > 0);
...details,
ModeDetails: details.ModeDetails.filter(
(mode) => mode.ModeId !== optionId
),
})).filter((details) => details.ModeDetails.length > 0);
let updatedOptions = prevCheckedOptions.filter(
(opt) => !(opt.FlowName === section && opt.Option === configName)
@ -1374,8 +1373,8 @@ function PaymentOptions({ setModalOpen }) {
postData['PaymentDetails'] = consolidatedData;
postData['KioskDefaultOption'] =
checkedOptions?.length > 0 &&
(checkForCardDefaultOption(checkedOptions) ||
checkForUpiDefaultOption(checkedOptions))
(checkForCardDefaultOption(checkedOptions) ||
checkForUpiDefaultOption(checkedOptions))
? defaultStatus
: null;
if (consolidatedData?.length > 0) {
@ -1486,7 +1485,7 @@ function PaymentOptions({ setModalOpen }) {
)}
{option.optionName === 'Pay at the counter' &&
getPayAtCounterSalesDropdownOptions().length >
0 && (
0 && (
<div style={{ marginTop: '4px' }}>
<select
value={payAtCounterSalesDefaultMode}

View File

@ -121,7 +121,7 @@ const StockReceived = ({ productDetails, editable = true, onDataChange }) => {
<th className="tableheaderSR">Products</th>
<th className="tableheaderSR">Category</th>
<th className="tableheaderSR">Sub Category</th>
<th className="tableheaderSR">Varient</th>
<th className="tableheaderSR">Variant</th>
<th className="tableheaderSR">Received Qty</th>
<th className="tableheaderSR-accepted">Accepted Qty</th>
</tr>

View File

@ -37,7 +37,7 @@
text-align: center;
}
.BSItemCard-master-container {
display: flex;
flex-direction: row;
@ -83,30 +83,30 @@
background-color: rgba(255, 255, 255, 0.8);
position: absolute;
display: flex;
column-gap: 0.5rem;
column-gap: 0.5rem;
justify-content: center;
cursor: pointer;
bottom: 0px;
left: 0;
bottom: 0px;
left: 0;
right: 0;
}
.BSItemCard-itemName {
text-align: center;
font-size: 12px;
font-size: 12px;
font-weight: 500;
max-width: 130px;
white-space: nowrap;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
.BSItemCard-itemPrice {
color: #52c41a;
color: #52c41a;
font-size: 14px;
font-weight: 600;
font-family: "Gilroy";
white-space: nowrap;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 105px;
@ -120,7 +120,7 @@
.BSItemCard-badge-withoutimage {
position: absolute;
top: 0px;
top: 0px;
right: 0;
}
@ -145,7 +145,7 @@
.BSItemCard-content-smallimage {
width: max-content;
padding: 5px 0;
display: flex;
display: flex;
flex-direction: column;
column-gap: 0.5rem;
justify-content: center;
@ -164,7 +164,7 @@
row-gap: 0.5rem;
cursor: pointer;
// vicky
justify-content: space-around;
justify-content: space-around;
}
.BSItemCard-containers-smallimage-mobile {
@ -174,7 +174,7 @@
flex-direction: row;
column-gap: 0.4rem;
row-gap: 0.5rem;
cursor: pointer;
cursor: pointer;
}
.BSItemCard-content-small-screem {
@ -199,7 +199,7 @@
@media (min-width: 280px) and (max-width: 499px) {
.ItemWiseReport-heading {
display: flex;
align-items: flex-start;
align-items: flex-start;
align-items: center;
}
@ -215,7 +215,7 @@
tr,
td {
font-size: 14px !important;
}
}
.other-submitbtn {
justify-content: flex-start !important;
@ -240,7 +240,7 @@
.configMsrSubDiv {
column-gap: 0.5rem !important;
}
.ant-modal .ant-modal-content {
padding: 1rem !important;
@ -328,11 +328,12 @@
.BSItemCard-containers-mobile {
width: 6rem !important;
}
.BSItemCard-content-small-screem {
width: 8rem !important;
height: 6rem !important;
}
}
.BSItemCard-itemName {
width: 60px !important;
font-size: 10px;
@ -340,10 +341,10 @@
text-align: center !important;
}
.bs-item-card-masterdiv {
.bs-item-card-masterdiv {
height: inherit;
}
}
@media (min-width: 500px) and (max-width: 767px) {
@ -372,7 +373,7 @@
margin-top: 3px;
}
}
.QRStockchange-table thead {
position: sticky;
@ -385,7 +386,7 @@
border-spacing: 0px;
}
.QRStockchange-table .ant-table-wrapper .ant-table-thead > tr > th {
.QRStockchange-table .ant-table-wrapper .ant-table-thead>tr>th {
color: black !important;
font-weight: 600 !important;
font-size: 14px;
@ -407,6 +408,7 @@
.BkPrdCardDeActive {
// pointer-events: none;
border: 1px solid #f10000;
// border-radius: 8px;
.BSItemCard-container-smallimage {
width: 10.9rem;
@ -424,23 +426,23 @@
z-index: 1;
}
.Card-modal-table {
.Card-modal-table {
height: 59vh;
overflow: auto;
justify-content: flex-start;
justify-content: flex-start;
padding: 1.8rem 0.5rem;
column-gap: 0.5rem;
row-gap: 1rem;
}
.Brand-Card-modal-table {
height: 43vh;
height: 43vh;
overflow: auto;
justify-content: flex-start;
padding: 1.8rem 0.5rem;
padding: 1.8rem 0.5rem;
column-gap: 0.5rem;
row-gap: 1rem;
}
}
.Brand-Card-modal-table::-webkit-scrollbar {
width: 10px !important;
@ -555,13 +557,13 @@
background-color: #fafafa;
}
.Card-modal-table .ant-table-wrapper .ant-table-thead > tr > th {
.Card-modal-table .ant-table-wrapper .ant-table-thead>tr>th {
color: black !important;
font-weight: 600 !important;
font-size: 14px;
}
.Card-modal-table .ant-table-row > td {
.Card-modal-table .ant-table-row>td {
color: black !important;
font-weight: 500 !important;
font-size: 16px;
@ -816,6 +818,7 @@
.Payment-loader1 {
.Payment-loader {
// column-gap: 1rem;
.contener_mixte {
top: 5px;
@ -1019,6 +1022,7 @@
gap: 1.7rem !important;
overflow: scroll;
height: 100%;
scrollbar-width: none;
@media (max-width: 500px) {
gap: 0.5rem !important;
@ -1139,7 +1143,7 @@
flex-wrap: wrap;
flex-direction: row;
column-gap: 1rem;
row-gap: 0.5rem;
row-gap: 0.5rem;
font-family: "Poppins";
font-size: 14px;
color: #000;
@ -1351,7 +1355,7 @@
font-family: "Poppins";
font-size: 0.8rem;
> div:nth-child(1) {
>div:nth-child(1) {
font-size: 0.8rem;
font-weight: 600;
}
@ -1660,6 +1664,7 @@
color: #ffffff;
border-color: #f44336;
cursor: not-allowed;
&:hover {
color: #c90b0b;
background-color: #ffff;
@ -1676,6 +1681,7 @@
background-color: #ffe8bf;
color: #5f4204;
border-color: #ff9800;
&:hover {
background-color: #5f4204;
color: #ffe8bf;
@ -2311,4 +2317,4 @@
top: 2px;
left: 8px;
}
}
}

View File

@ -2,4 +2,9 @@ export const calculateOverAllQtyLimit = (orders) => {
return orders?.reduce((acc, cartItem) => {
return acc + (cartItem?.OrderQty || 0);
}, 0)
}
}
export const capitalizeFirstLetter = (text) => {
if (!text) return '';
return text.charAt(0).toUpperCase() + text.slice(1);
};