Merge pull request 'issue fixing' (#323) from srinath into main
Reviewed-on: Pozomind/pozo-retail-app#323
This commit is contained in:
commit
157f85ab0f
|
|
@ -274,13 +274,16 @@ 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"),
|
||||||
setpage(1);
|
dates[1].format("YYYY-MM-DD"),
|
||||||
}
|
];
|
||||||
};
|
setDateStrings(formattedDates);
|
||||||
|
setpage(1);
|
||||||
|
}
|
||||||
|
};
|
||||||
const DefaultReprintReason = async () => {
|
const DefaultReprintReason = async () => {
|
||||||
let data = {
|
let data = {
|
||||||
AppId: AppId,
|
AppId: AppId,
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,10 @@ const BSExpireProductsList = () => {
|
||||||
fetchData();
|
fetchData();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (expireModelOpen) fetchData();
|
||||||
|
}, [expireModelOpen]);
|
||||||
|
|
||||||
// useEffect(() => {
|
// useEffect(() => {
|
||||||
// fetchData();
|
// fetchData();
|
||||||
// }, [cartDetails]);
|
// }, [cartDetails]);
|
||||||
|
|
|
||||||
|
|
@ -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}`;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue