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