Merge pull request 'kiosk dine-in bug fix' (#308) from temp/bug-fix-kiosk into main
Reviewed-on: Pozomind/pozo-retail-app#308
This commit is contained in:
commit
3f02e5c471
|
|
@ -195,7 +195,7 @@ export const getCommonAppPreference = createAsyncThunk(
|
|||
if (
|
||||
AppId != null &&
|
||||
AppId != undefined
|
||||
){
|
||||
) {
|
||||
return await axiosCommonInstanceData.get(
|
||||
`/ApplicationPreferenceMapping?AppId=${AppId}`
|
||||
);
|
||||
|
|
@ -209,7 +209,7 @@ const initialState = {
|
|||
SadminUserPin: [],
|
||||
SadminUserData: [],
|
||||
AppPreferences: [],
|
||||
isWarehouse:false,
|
||||
isWarehouse: false,
|
||||
};
|
||||
|
||||
const BranchLogin = createSlice({
|
||||
|
|
@ -219,8 +219,8 @@ const BranchLogin = createSlice({
|
|||
changeSelectedBranchId: (state, action) => {
|
||||
state.SelectedBrachId = action?.payload;
|
||||
},
|
||||
changeWarehouse:(state,action)=>{
|
||||
state.isWarehouse=action?.payload
|
||||
changeWarehouse: (state, action) => {
|
||||
state.isWarehouse = action?.payload
|
||||
|
||||
}
|
||||
},
|
||||
|
|
@ -257,7 +257,7 @@ const BranchLogin = createSlice({
|
|||
});
|
||||
},
|
||||
});
|
||||
export const { changeSelectedBranchId ,changeWarehouse} = BranchLogin.actions;
|
||||
export const { changeSelectedBranchId, changeWarehouse } = BranchLogin.actions;
|
||||
export const GlobalSelectedBranchId = (state) =>
|
||||
state?.BranchLogin?.SelectedBrachId;
|
||||
export const GlobalCompBranchData = (state) =>
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ import { changeBookingType } from '../../../Features/BookingScreen/BookingData/K
|
|||
import initialBg from '../../../Images/InitialPage1bgImg.png';
|
||||
import { useEffect, useRef } from 'react';
|
||||
import { isMobile } from 'react-device-detect';
|
||||
import { PreferenceData } from '../../../Features/BookingScreen/BookingData/BookingData';
|
||||
import { ApplicationPreferences } from '../../../Features/BrachLogin/BranchLogin';
|
||||
|
||||
const InitialPage1 = (props) => {
|
||||
const actionContainerRef = useRef(null);
|
||||
|
|
@ -20,7 +22,11 @@ const InitialPage1 = (props) => {
|
|||
const getKioskCompLogodata = useSelector(getKioskCompLogo);
|
||||
const getKioskBackgroundimgdata = useSelector(getKioskBackgroundimg);
|
||||
const SalesType = useSelector(globalSalesType);
|
||||
console.log(getKioskCompLogodata, 'getKioskCompLogodata');
|
||||
const preferences = useSelector(PreferenceData);
|
||||
const appPreferences = useSelector(ApplicationPreferences);
|
||||
const bookingTypePref = appPreferences?.find(pref => pref?.PreferredCatName?.toLowerCase() === 'booking type');
|
||||
const dineInPreference = preferences?.[0]?.SettingDtlDetails?.find((item) => (item.SettingIdName)?.toLowerCase() === 'dinein')?.SettingValue === 'Y';
|
||||
const dineInAppPreference = bookingTypePref?.PreferenceCatDetails?.find((item) => item.PreferredSubCatName?.toLowerCase() === 'dine in')?.PreferredStatus === 'Y';
|
||||
const FlowChange = async (event, eventName) => {
|
||||
await dispatch(changeKioskPageName(event));
|
||||
await dispatch(changeBookingType(eventName));
|
||||
|
|
@ -96,7 +102,7 @@ const InitialPage1 = (props) => {
|
|||
</p>
|
||||
</div>
|
||||
<div ref={actionContainerRef}>
|
||||
{(SalesType === 'D' || SalesType === 'B') && (
|
||||
{((SalesType === 'D' || SalesType === 'B') && dineInPreference && dineInAppPreference) && (
|
||||
<div
|
||||
onClick={() => {
|
||||
FlowChange('categoryPage', 'Dine In');
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@ import {
|
|||
import '../../../Styles/Kiosk/InitialPage/InitialPage2.scss';
|
||||
import { changeBookingType } from '../../../Features/BookingScreen/BookingData/KioskBookingData';
|
||||
import initialBg from '../../../Images/theme3bgimg.png';
|
||||
import { PreferenceData } from '../../../Features/BookingScreen/BookingData/BookingData';
|
||||
import { ApplicationPreferences } from '../../../Features/BrachLogin/BranchLogin';
|
||||
|
||||
const InitialPage2 = (props) => {
|
||||
const dispatch = useDispatch();
|
||||
|
|
@ -17,6 +19,12 @@ const InitialPage2 = (props) => {
|
|||
const getKioskBranchNamedata = useSelector(getKioskBranchName);
|
||||
const getKioskBackgroundimgdata = useSelector(getKioskBackgroundimg);
|
||||
const SalesType = useSelector(globalSalesType);
|
||||
const preferences = useSelector(PreferenceData);
|
||||
const appPreferences = useSelector(ApplicationPreferences);
|
||||
const bookingTypePref = appPreferences?.find(pref => pref?.PreferredCatName?.toLowerCase() === 'booking type');
|
||||
const dineInPreference = preferences?.[0]?.SettingDtlDetails?.find((item) => (item.SettingIdName)?.toLowerCase() === 'dinein')?.SettingValue === 'Y';
|
||||
const dineInAppPreference = bookingTypePref?.PreferenceCatDetails?.find((item) => item.PreferredSubCatName?.toLowerCase() === 'dine in')?.PreferredStatus === 'Y';
|
||||
|
||||
const FlowChange = async (event, eventName) => {
|
||||
await dispatch(changeKioskPageName(event));
|
||||
await dispatch(changeBookingType(eventName));
|
||||
|
|
@ -78,7 +86,7 @@ const InitialPage2 = (props) => {
|
|||
</p>
|
||||
</div>
|
||||
<div className="InitialPage2-dinein-takeaway-div">
|
||||
{(SalesType === 'D' || SalesType === 'B') && (
|
||||
{((SalesType === 'D' || SalesType === 'B') && dineInPreference && dineInAppPreference) && (
|
||||
<div
|
||||
onClick={() => {
|
||||
FlowChange('categoryPage', 'Dine In');
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ import {
|
|||
getKioskOfferType,
|
||||
} from '../../../Features/Kiosk/kiosk';
|
||||
import { changeBookingType } from '../../../Features/BookingScreen/BookingData/KioskBookingData';
|
||||
import { PreferenceData } from '../../../Features/BookingScreen/BookingData/BookingData';
|
||||
import { ApplicationPreferences } from '../../../Features/BrachLogin/BranchLogin';
|
||||
|
||||
const InitialPage3 = (props) => {
|
||||
const dispatch = useDispatch();
|
||||
|
|
@ -40,6 +42,12 @@ const InitialPage3 = (props) => {
|
|||
const getKioskOfferContent3Data = useSelector(getKioskOfferContent3);
|
||||
const getKioskOfferValueData = useSelector(getKioskOfferValue);
|
||||
const getKioskOfferTypeData = useSelector(getKioskOfferType);
|
||||
const preferences = useSelector(PreferenceData);
|
||||
const appPreferences = useSelector(ApplicationPreferences);
|
||||
const bookingTypePref = appPreferences?.find(pref => pref?.PreferredCatName?.toLowerCase() === 'booking type');
|
||||
const dineInPreference = preferences?.[0]?.SettingDtlDetails?.find((item) => (item.SettingIdName)?.toLowerCase() === 'dinein')?.SettingValue === 'Y';
|
||||
const dineInAppPreference = bookingTypePref?.PreferenceCatDetails?.find((item) => item.PreferredSubCatName?.toLowerCase() === 'dine in')?.PreferredStatus === 'Y';
|
||||
|
||||
|
||||
const FlowChange = async (event, eventName) => {
|
||||
await dispatch(changeKioskPageName(event));
|
||||
|
|
@ -424,7 +432,7 @@ const InitialPage3 = (props) => {
|
|||
{/* <h1>ORDER HERE</h1> */}
|
||||
<h5>Skip the Queue line & order now for instant service!</h5>
|
||||
<div className="InitialPage3-button-container">
|
||||
{(SalesType === 'D' || SalesType === 'B') && (
|
||||
{((SalesType === 'D' || SalesType === 'B') && dineInPreference && dineInAppPreference) && (
|
||||
<button
|
||||
style={{ backgroundColor: getKioskDarkColourdata }}
|
||||
onClick={() => {
|
||||
|
|
|
|||
|
|
@ -13,12 +13,20 @@ import dinein from '../../../Images/dinein.png';
|
|||
import TakeAway from '../../../Images/TakeAway.png';
|
||||
|
||||
import DefaultBgimg from '../../../Images/theme3bgimg.png';
|
||||
import { PreferenceData } from '../../../Features/BookingScreen/BookingData/BookingData';
|
||||
import { ApplicationPreferences } from '../../../Features/BrachLogin/BranchLogin';
|
||||
const SelfInitialPage1 = (props) => {
|
||||
const dispatch = useDispatch();
|
||||
const getKioskBranchNamedata = useSelector(getKioskBranchName);
|
||||
const getKioskCompLogodata = useSelector(getKioskCompLogo);
|
||||
const getKioskBackgroundimgdata = useSelector(getKioskBackgroundimg);
|
||||
const SalesType = useSelector(globalSalesType);
|
||||
const preferences = useSelector(PreferenceData);
|
||||
const appPreferences = useSelector(ApplicationPreferences);
|
||||
const bookingTypePref = appPreferences?.find(pref => pref?.PreferredCatName?.toLowerCase() === 'booking type');
|
||||
const dineInPreference = preferences?.[0]?.SettingDtlDetails?.find((item) => (item.SettingIdName)?.toLowerCase() === 'dinein')?.SettingValue === 'Y';
|
||||
const dineInAppPreference = bookingTypePref?.PreferenceCatDetails?.find((item) => item.PreferredSubCatName?.toLowerCase() === 'dine in')?.PreferredStatus === 'Y';
|
||||
|
||||
console.log(SalesType, 'SalesType');
|
||||
const FlowChange = async (event, eventName) => {
|
||||
await dispatch(changeKioskPageName(event));
|
||||
|
|
@ -56,7 +64,7 @@ const SelfInitialPage1 = (props) => {
|
|||
</p>
|
||||
</div>
|
||||
<div>
|
||||
{(SalesType === 'D' || SalesType === 'B') && (
|
||||
{((SalesType === 'D' || SalesType === 'B') && dineInPreference && dineInAppPreference) && (
|
||||
<div
|
||||
onClick={() => {
|
||||
FlowChange('categoryPage', 'Dine In');
|
||||
|
|
|
|||
Loading…
Reference in New Issue