Merge pull request 'android' (#172) from android into main
Reviewed-on: Pozomind/pozo-retail-app#172
This commit is contained in:
commit
e9a37b6ca0
|
|
@ -11,6 +11,8 @@
|
||||||
"@ant-design/plots": "^1.2.6",
|
"@ant-design/plots": "^1.2.6",
|
||||||
"@autocomplete/material-ui": "0.0.17",
|
"@autocomplete/material-ui": "0.0.17",
|
||||||
"@capacitor-mlkit/barcode-scanning": "^8.0.1",
|
"@capacitor-mlkit/barcode-scanning": "^8.0.1",
|
||||||
|
"@capacitor/app": "^8.0.1",
|
||||||
|
"@capacitor/core": "^8.1.0",
|
||||||
"@dnd-kit/core": "^6.3.1",
|
"@dnd-kit/core": "^6.3.1",
|
||||||
"@dnd-kit/sortable": "^10.0.0",
|
"@dnd-kit/sortable": "^10.0.0",
|
||||||
"@emotion/react": "^11.11.4",
|
"@emotion/react": "^11.11.4",
|
||||||
|
|
@ -978,12 +980,20 @@
|
||||||
"@capacitor/core": ">=8.0.0"
|
"@capacitor/core": ">=8.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@capacitor/app": {
|
||||||
|
"version": "8.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@capacitor/app/-/app-8.0.1.tgz",
|
||||||
|
"integrity": "sha512-yeG3yyA0ETKqvgqexwHMBlmVOF13A1hRXzv/km0Ptv5TrNIZvZJK4MTI3uiqvnbHrzoJGP5DwWAjEXEfi90v3Q==",
|
||||||
|
"license": "MIT",
|
||||||
|
"peerDependencies": {
|
||||||
|
"@capacitor/core": ">=8.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@capacitor/core": {
|
"node_modules/@capacitor/core": {
|
||||||
"version": "8.1.0",
|
"version": "8.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/@capacitor/core/-/core-8.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@capacitor/core/-/core-8.1.0.tgz",
|
||||||
"integrity": "sha512-UfMBMWc1v7J+14AhH03QmeNwV3HZx3qnOWhpwnHfzALEwAwlV/itQOQqcasMQYhOHWL0tiymc5ByaLTn7KKQxw==",
|
"integrity": "sha512-UfMBMWc1v7J+14AhH03QmeNwV3HZx3qnOWhpwnHfzALEwAwlV/itQOQqcasMQYhOHWL0tiymc5ByaLTn7KKQxw==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tslib": "^2.1.0"
|
"tslib": "^2.1.0"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,8 @@
|
||||||
"@ant-design/plots": "^1.2.6",
|
"@ant-design/plots": "^1.2.6",
|
||||||
"@autocomplete/material-ui": "0.0.17",
|
"@autocomplete/material-ui": "0.0.17",
|
||||||
"@capacitor-mlkit/barcode-scanning": "^8.0.1",
|
"@capacitor-mlkit/barcode-scanning": "^8.0.1",
|
||||||
|
"@capacitor/app": "^8.0.1",
|
||||||
|
"@capacitor/core": "^8.1.0",
|
||||||
"@dnd-kit/core": "^6.3.1",
|
"@dnd-kit/core": "^6.3.1",
|
||||||
"@dnd-kit/sortable": "^10.0.0",
|
"@dnd-kit/sortable": "^10.0.0",
|
||||||
"@emotion/react": "^11.11.4",
|
"@emotion/react": "^11.11.4",
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,8 @@ const IndividualBooking = lazy(() => import('./Pages/SelfBooking/IndividualBooki
|
||||||
|
|
||||||
const commonSubDir = import.meta.env.ENV_COMMON_BASE_URL;
|
const commonSubDir = import.meta.env.ENV_COMMON_BASE_URL;
|
||||||
const subDirectory = import.meta.env.ENV_BASE_URL;
|
const subDirectory = import.meta.env.ENV_BASE_URL;
|
||||||
|
|
||||||
import '../ownLib/my-ui-lib.css';
|
import '../ownLib/my-ui-lib.css';
|
||||||
|
import CardSkeleton from './Components/Skeleton/CardSkeleton.jsx';
|
||||||
import CustomerMenuPage from './Pages/Reports/MenuQRCode/CustomerMenuPage.jsx';
|
import CustomerMenuPage from './Pages/Reports/MenuQRCode/CustomerMenuPage.jsx';
|
||||||
import WeightScaleApp from './Pages/BookingScreen/WeightscaleApp.jsx';
|
import WeightScaleApp from './Pages/BookingScreen/WeightscaleApp.jsx';
|
||||||
import useSubscriptionManager from './useSubscriptionManager.js';
|
import useSubscriptionManager from './useSubscriptionManager.js';
|
||||||
|
|
@ -37,7 +37,7 @@ const LOGIN_PAGES = ['signin', 'login', 'auth'];
|
||||||
const AppRoutes = () => {
|
const AppRoutes = () => {
|
||||||
const ItemCard = useSelector(GlobalItemCard);
|
const ItemCard = useSelector(GlobalItemCard);
|
||||||
const { sessionData, logout } = useSessionManager(ItemCard);
|
const { sessionData, logout } = useSessionManager(ItemCard);
|
||||||
const { remainingDays, handleCancel, freeExtend, extendModel, setExtendModel } = useSubscriptionManager(sessionData, logout);
|
const { remainingDays, handleCancel, freeExtend, extendModel,handlePay, setExtendModel } = useSubscriptionManager(sessionData, logout);
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
|
|
@ -91,10 +91,11 @@ const AppRoutes = () => {
|
||||||
clearSession();
|
clearSession();
|
||||||
window.location.replace(`${commonSubDir}`);
|
window.location.replace(`${commonSubDir}`);
|
||||||
} else {
|
} else {
|
||||||
window.history.go(1); // block back on web
|
window.history.go(1);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Add event listener on mount
|
||||||
window.addEventListener('popstate', handlePopState);
|
window.addEventListener('popstate', handlePopState);
|
||||||
return () => window.removeEventListener('popstate', handlePopState);
|
return () => window.removeEventListener('popstate', handlePopState);
|
||||||
}, [location.pathname]);
|
}, [location.pathname]);
|
||||||
|
|
@ -186,7 +187,6 @@ const AppRoutes = () => {
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Suspense fallback={<CardSkeleton />}>
|
<Suspense fallback={<CardSkeleton />}>
|
||||||
<Routes>
|
<Routes>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue