issue fixing

This commit is contained in:
Srinath 2026-03-30 15:49:03 +05:30
parent 03010314c5
commit 12fe504bb0
3 changed files with 15 additions and 21 deletions

View File

@ -274,10 +274,13 @@ function BSReprint({ setOpenModel = () => { } }) {
// dispatch(getPrintSelectionComponentData(Data1)).unwrap(); // dispatch(getPrintSelectionComponentData(Data1)).unwrap();
}, []); }, []);
const handleDateChange = (dates, dateStrings) => { const handleDateChange = (dates) => {
// setDateRange(dateStrings); if (dates && dates[0] && dates[1]) {
if (dateStrings[0] && dateStrings[1]) { const formattedDates = [
setDateStrings(dateStrings); dates[0].format("YYYY-MM-DD"),
dates[1].format("YYYY-MM-DD"),
];
setDateStrings(formattedDates);
setpage(1); setpage(1);
} }
}; };

View File

@ -66,6 +66,10 @@ const BSExpireProductsList = () => {
fetchData(); fetchData();
}, []); }, []);
useEffect(() => {
if (expireModelOpen) fetchData();
}, [expireModelOpen]);
// useEffect(() => { // useEffect(() => {
// fetchData(); // fetchData();
// }, [cartDetails]); // }, [cartDetails]);

View File

@ -8,41 +8,28 @@ import {
changeReprintDataFound, changeReprintDataFound,
} from "../../../../Features/ThemeChange/ThemeChange"; } from "../../../../Features/ThemeChange/ThemeChange";
import "../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle1.scss"; import "../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle1.scss";
import QRCode from "react-qr-code"; import { QRCode } from "react-qr-code";
import { ApplicationPreferences } from "../../../../Features/BrachLogin/BranchLogin"; import { ApplicationPreferences } from "../../../../Features/BrachLogin/BranchLogin";
const OtherServicePrintStyle1 = ({ const OtherServicePrintStyle1 = ({
table2Data, table2Data,
PaymentStatus, PaymentStatus,
printDatas, printDatas,
}) => { }) => {
const dispatch = useDispatch(); const dispatch = useDispatch();
const GlobaldummyData = useSelector(GlobalPritdummyData); const GlobaldummyData = useSelector(GlobalPritdummyData);
const appPreferences = useSelector(ApplicationPreferences); const appPreferences = useSelector(ApplicationPreferences);
const bookingTypePreference = appPreferences?.find((preference) => preference?.PreferredCatName === 'Booking Type')?.PreferenceCatDetails const bookingTypePreference = appPreferences?.find((preference) => preference?.PreferredCatName === 'Booking Type')?.PreferenceCatDetails
const takeAwayPreference = bookingTypePreference?.find((type) => type?.PreferredSubCatName?.toLowerCase() === "take away" && type?.PreferredStatus === 'Y') const takeAwayPreference = bookingTypePreference?.find((type) => type?.PreferredSubCatName?.toLowerCase() === "take away" && type?.PreferredStatus === 'Y')
const keysLength = Object.keys(table2Data ?? {}).length; const keysLength = Object.keys(table2Data ?? {}).length;
let FormatTheme = printDatas?.PrintType == "S" ? true : false let FormatTheme = printDatas?.PrintType == "S" ? true : false
let PageSize = printDatas?.PageSize let PageSize = printDatas?.PageSize
console.log("table2Datatable2Datatable2Datatable2Data", table2Data,table2Data?.[0]?.BranchName ); console.log("table2Datatable2Datatable2Datatable2Data", table2Data,table2Data?.[0]?.BranchName );
if (keysLength > 0) { if (keysLength > 0) {
dispatch(changeReprintDataFound(true)); dispatch(changeReprintDataFound(true));
} }
const formattedDate =dateFormatChange1(table2Data?.[0]?.CreatedDate); const formattedDate =dateFormatChange1(table2Data?.[0]?.CreatedDate);
// `${day}-${monthNames[monthIndex]}-${year}`; // `${day}-${monthNames[monthIndex]}-${year}`;