Remove time tickets from bottom tab navigation, and update version for production deployment.
This commit is contained in:
21
app.json
21
app.json
@@ -4,7 +4,7 @@
|
|||||||
"slug": "rome-mobile",
|
"slug": "rome-mobile",
|
||||||
"version": "1.5.0",
|
"version": "1.5.0",
|
||||||
"extra": {
|
"extra": {
|
||||||
"expover": "2",
|
"expover": "3",
|
||||||
"eas": {
|
"eas": {
|
||||||
"projectId": "df105e21-a07f-4425-af10-2200a7704a48"
|
"projectId": "df105e21-a07f-4425-af10-2200a7704a48"
|
||||||
}
|
}
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
"ios": {
|
"ios": {
|
||||||
"supportsTablet": true,
|
"supportsTablet": true,
|
||||||
"bundleIdentifier": "com.rome.mobile",
|
"bundleIdentifier": "com.rome.mobile",
|
||||||
"buildNumber": "2",
|
"buildNumber": "3",
|
||||||
"googleServicesFile": "./GoogleService-Info.plist",
|
"googleServicesFile": "./GoogleService-Info.plist",
|
||||||
"infoPlist": {
|
"infoPlist": {
|
||||||
"NSPhotoLibraryUsageDescription": "Allow $(PRODUCT_NAME) to access your photos.",
|
"NSPhotoLibraryUsageDescription": "Allow $(PRODUCT_NAME) to access your photos.",
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
},
|
},
|
||||||
"android": {
|
"android": {
|
||||||
"package": "com.rome.mobile",
|
"package": "com.rome.mobile",
|
||||||
"versionCode": 2,
|
"versionCode": 3,
|
||||||
"googleServicesFile": "./google-services.json",
|
"googleServicesFile": "./google-services.json",
|
||||||
"permissions": [
|
"permissions": [
|
||||||
"android.permission.READ_EXTERNAL_STORAGE",
|
"android.permission.READ_EXTERNAL_STORAGE",
|
||||||
@@ -47,14 +47,13 @@
|
|||||||
"favicon": "./assets/RomeIcon.png",
|
"favicon": "./assets/RomeIcon.png",
|
||||||
"config": {
|
"config": {
|
||||||
"firebase": {
|
"firebase": {
|
||||||
"apiKey": "AIzaSyDSezy-jGJreo7ulgpLdlpOwAOrgcaEkhU",
|
"apiKey": "AIzaSyAuLQR9SV5LsVxjU8wh9hvFLdhcAHU6cxE",
|
||||||
"authDomain": "imex-prod.firebaseapp.com",
|
"authDomain": "rome-prod-1.firebaseapp.com",
|
||||||
"databaseURL": "https://imex-prod.firebaseio.com",
|
"projectId": "rome-prod-1",
|
||||||
"projectId": "imex-prod",
|
"storageBucket": "rome-prod-1.appspot.com",
|
||||||
"storageBucket": "imex-prod.appspot.com",
|
"messagingSenderId": "147786367145",
|
||||||
"messagingSenderId": "253497221485",
|
"appId": "1:147786367145:web:9d4cba68071c3f29a8a9b8",
|
||||||
"appId": "1:253497221485:web:9b65736a635a45ce227a64",
|
"measurementId": "G-G8Z9DRHTZS"
|
||||||
"measurementId": "G-96694D66L2"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,14 @@ import { useLazyQuery, useQuery } from "@apollo/client";
|
|||||||
import { Ionicons } from "@expo/vector-icons";
|
import { Ionicons } from "@expo/vector-icons";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { FlatList, RefreshControl, Text, View } from "react-native";
|
import {
|
||||||
|
FlatList,
|
||||||
|
Keyboard,
|
||||||
|
KeyboardAvoidingView,
|
||||||
|
RefreshControl,
|
||||||
|
Text,
|
||||||
|
View,
|
||||||
|
} from "react-native";
|
||||||
import { Button, List, Modal, Portal, Searchbar } from "react-native-paper";
|
import { Button, List, Modal, Portal, Searchbar } from "react-native-paper";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { SEARCH_JOBS_FOR_AUTOCOMPLETE } from "../../graphql/jobs.queries";
|
import { SEARCH_JOBS_FOR_AUTOCOMPLETE } from "../../graphql/jobs.queries";
|
||||||
@@ -23,7 +30,6 @@ const useIsMounted = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export function JobSearchAndSelectModal(props) {
|
export function JobSearchAndSelectModal(props) {
|
||||||
|
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const jobSrchNotExported =
|
const jobSrchNotExported =
|
||||||
props?.notExported !== undefined ? props.notExported : true;
|
props?.notExported !== undefined ? props.notExported : true;
|
||||||
@@ -50,7 +56,8 @@ export function JobSearchAndSelectModal(props) {
|
|||||||
const hideModal = () => setVisible(false);
|
const hideModal = () => setVisible(false);
|
||||||
|
|
||||||
const [searchQuery, { loading, error, data, refetch }] = useLazyQuery(
|
const [searchQuery, { loading, error, data, refetch }] = useLazyQuery(
|
||||||
SEARCH_JOBS_FOR_AUTOCOMPLETE,{fetchPolicy: "cache-and-network",}
|
SEARCH_JOBS_FOR_AUTOCOMPLETE,
|
||||||
|
{ fetchPolicy: "cache-and-network" }
|
||||||
);
|
);
|
||||||
if (error) return <ErrorDisplay errorMessage={error.message} />;
|
if (error) return <ErrorDisplay errorMessage={error.message} />;
|
||||||
const onRefresh = async () => {
|
const onRefresh = async () => {
|
||||||
@@ -61,7 +68,9 @@ export function JobSearchAndSelectModal(props) {
|
|||||||
search: searchText,
|
search: searchText,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const search = (v) => {if (v && v !== "") searchQuery(v);};
|
const search = (v) => {
|
||||||
|
if (v && v !== "") searchQuery(v);
|
||||||
|
};
|
||||||
const searchDebouncer = useCallback(_.debounce(search, 1000), []);
|
const searchDebouncer = useCallback(_.debounce(search, 1000), []);
|
||||||
const onChangeSearch = (query) => {
|
const onChangeSearch = (query) => {
|
||||||
setSearchText(query);
|
setSearchText(query);
|
||||||
@@ -96,6 +105,7 @@ export function JobSearchAndSelectModal(props) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
<KeyboardAvoidingView>
|
||||||
<Portal>
|
<Portal>
|
||||||
<Modal
|
<Modal
|
||||||
visible={visible}
|
visible={visible}
|
||||||
@@ -161,7 +171,9 @@ export function JobSearchAndSelectModal(props) {
|
|||||||
}${object.item.ownr_fn || ""} ${object.item.ownr_ln || ""}${
|
}${object.item.ownr_fn || ""} ${object.item.ownr_ln || ""}${
|
||||||
object.item.v_model_yr ? `- ${object.item.v_model_yr}` : ""
|
object.item.v_model_yr ? `- ${object.item.v_model_yr}` : ""
|
||||||
}${
|
}${
|
||||||
object.item.v_make_desc ? `- ${object.item.v_make_desc}` : ""
|
object.item.v_make_desc
|
||||||
|
? `- ${object.item.v_make_desc}`
|
||||||
|
: ""
|
||||||
}${
|
}${
|
||||||
object.item.v_model_desc
|
object.item.v_model_desc
|
||||||
? `- ${object.item.v_model_desc}`
|
? `- ${object.item.v_model_desc}`
|
||||||
@@ -185,6 +197,8 @@ export function JobSearchAndSelectModal(props) {
|
|||||||
/>
|
/>
|
||||||
</Modal>
|
</Modal>
|
||||||
</Portal>
|
</Portal>
|
||||||
|
</KeyboardAvoidingView>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
mode="outlined"
|
mode="outlined"
|
||||||
style={{
|
style={{
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { useQuery } from "@apollo/client";
|
|||||||
import { Ionicons } from "@expo/vector-icons";
|
import { Ionicons } from "@expo/vector-icons";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { FlatList, RefreshControl, View } from "react-native";
|
import { FlatList, RefreshControl, KeyboardAvoidingView } from "react-native";
|
||||||
import { Button, List, Modal, Portal, Searchbar } from "react-native-paper";
|
import { Button, List, Modal, Portal, Searchbar } from "react-native-paper";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
@@ -100,7 +100,7 @@ export function CameraSelectJob({
|
|||||||
backgroundColor: "white",
|
backgroundColor: "white",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<View
|
<KeyboardAvoidingView
|
||||||
style={{
|
style={{
|
||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: "row",
|
flexDirection: "row",
|
||||||
@@ -116,7 +116,7 @@ export function CameraSelectJob({
|
|||||||
onChangeText={onChangeSearch}
|
onChangeText={onChangeSearch}
|
||||||
value={searchQuery}
|
value={searchQuery}
|
||||||
/>
|
/>
|
||||||
</View>
|
</KeyboardAvoidingView>
|
||||||
<FlatList
|
<FlatList
|
||||||
refreshControl={
|
refreshControl={
|
||||||
<RefreshControl refreshing={loading} onRefresh={onRefresh} />
|
<RefreshControl refreshing={loading} onRefresh={onRefresh} />
|
||||||
|
|||||||
@@ -147,13 +147,13 @@ const TimeTicketBrowserStackNavigator = connect(
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<TimeTicketBrowserStack.Navigator>
|
<TimeTicketBrowserStack.Navigator>
|
||||||
{currentEmployee === null ? (
|
{currentEmployee === null || !currentEmployee.authorized ? (
|
||||||
<TimeTicketBrowserStack.Screen
|
<TimeTicketBrowserStack.Screen
|
||||||
name="EmployeeSignIn"
|
name="EmployeeSignIn"
|
||||||
options={() => ({ title: i18n.t("employeesignin.titles.signin") })}
|
options={() => ({ title: i18n.t("employeesignin.titles.signin") })}
|
||||||
component={EmployeeSignIn}
|
component={EmployeeSignIn}
|
||||||
/>
|
/>
|
||||||
) : currentEmployee.authorized ? (
|
) : (
|
||||||
<>
|
<>
|
||||||
<TimeTicketBrowserStack.Screen
|
<TimeTicketBrowserStack.Screen
|
||||||
name="TimeTicketBrowser"
|
name="TimeTicketBrowser"
|
||||||
@@ -179,14 +179,6 @@ const TimeTicketBrowserStackNavigator = connect(
|
|||||||
component={ScreenTimeTicketClockoffComponent}
|
component={ScreenTimeTicketClockoffComponent}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
) : (
|
|
||||||
<TimeTicketBrowserStack.Screen
|
|
||||||
name="EmployeeSignIn"
|
|
||||||
options={() => ({
|
|
||||||
title: i18n.t("employeesignin.titles.signin"),
|
|
||||||
})}
|
|
||||||
component={EmployeeSignIn}
|
|
||||||
/>
|
|
||||||
)}
|
)}
|
||||||
</TimeTicketBrowserStack.Navigator>
|
</TimeTicketBrowserStack.Navigator>
|
||||||
);
|
);
|
||||||
@@ -230,14 +222,16 @@ const BottomTabsNavigator = () => (
|
|||||||
}}
|
}}
|
||||||
component={MediaBrowserStackNavigator}
|
component={MediaBrowserStackNavigator}
|
||||||
/>
|
/>
|
||||||
<BottomTabs.Screen
|
{
|
||||||
name="TimeTicketBrowserTab"
|
// <BottomTabs.Screen
|
||||||
options={{
|
// name="TimeTicketBrowserTab"
|
||||||
title: i18n.t("timeticketbrowser.titles.timeticketbrowsertab"),
|
// options={{
|
||||||
headerShown: false,
|
// title: i18n.t("timeticketbrowser.titles.timeticketbrowsertab"),
|
||||||
}}
|
// headerShown: false,
|
||||||
component={TimeTicketBrowserStackNavigator}
|
// }}
|
||||||
/>
|
// component={TimeTicketBrowserStackNavigator}
|
||||||
|
// />
|
||||||
|
}
|
||||||
<BottomTabs.Screen
|
<BottomTabs.Screen
|
||||||
name="MoreTab"
|
name="MoreTab"
|
||||||
options={{ title: i18n.t("more.titles.moretab"), headerShown: false }}
|
options={{ title: i18n.t("more.titles.moretab"), headerShown: false }}
|
||||||
|
|||||||
52
package.json
52
package.json
@@ -16,20 +16,20 @@
|
|||||||
"build:production:local:android": "eas build --profile production --platform android --local"
|
"build:production:local:android": "eas build --profile production --platform android --local"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@apollo/client": "^3.7.0-alpha.3",
|
"@apollo/client": "^3.7.17",
|
||||||
"@babel/preset-env": "7.1.6",
|
"@babel/preset-env": "7.22.9",
|
||||||
"@expo/vector-icons": "^13.0.0",
|
"@expo/vector-icons": "^13.0.0",
|
||||||
"@react-native-async-storage/async-storage": "1.18.2",
|
"@react-native-async-storage/async-storage": "1.19.1",
|
||||||
"@react-native-community/art": "^1.2.0",
|
"@react-native-community/art": "^1.2.0",
|
||||||
"@react-native-community/cli-debugger-ui": "^9.0.0",
|
"@react-native-community/cli-debugger-ui": "^11.3.6",
|
||||||
"@react-native-community/datetimepicker": "7.2.0",
|
"@react-native-community/datetimepicker": "7.4.1",
|
||||||
"@react-native-community/masked-view": "^0.1.11",
|
"@react-native-community/masked-view": "^0.1.11",
|
||||||
"@react-navigation/bottom-tabs": "^6.3.3",
|
"@react-navigation/bottom-tabs": "^6.5.8",
|
||||||
"@react-navigation/drawer": "^6.4.4",
|
"@react-navigation/drawer": "^6.6.3",
|
||||||
"@react-navigation/native": "^6.0.12",
|
"@react-navigation/native": "^6.1.7",
|
||||||
"@react-navigation/native-stack": "^6.8.0",
|
"@react-navigation/native-stack": "^6.9.13",
|
||||||
"@react-navigation/stack": "^6.2.3",
|
"@react-navigation/stack": "^6.3.17",
|
||||||
"axios": "^0.27.2",
|
"axios": "^1.4.0",
|
||||||
"cloudinary-core": "^2.13.0",
|
"cloudinary-core": "^2.13.0",
|
||||||
"dinero.js": "^1.9.1",
|
"dinero.js": "^1.9.1",
|
||||||
"expo": "^49.0.0",
|
"expo": "^49.0.0",
|
||||||
@@ -50,9 +50,9 @@
|
|||||||
"expo-updates": "~0.18.11",
|
"expo-updates": "~0.18.11",
|
||||||
"expo-video-thumbnails": "~7.4.0",
|
"expo-video-thumbnails": "~7.4.0",
|
||||||
"firebase": "^9.8.3",
|
"firebase": "^9.8.3",
|
||||||
"formik": "^2.2.9",
|
"formik": "^2.4.3",
|
||||||
"graphql": "^16.6.0",
|
"graphql": "^16.7.1",
|
||||||
"i18next": "^21.9.1",
|
"i18next": "^23.4.1",
|
||||||
"intl": "^1.2.5",
|
"intl": "^1.2.5",
|
||||||
"lodash": "^4.17.20",
|
"lodash": "^4.17.20",
|
||||||
"luxon": "^3.0.3",
|
"luxon": "^3.0.3",
|
||||||
@@ -61,35 +61,35 @@
|
|||||||
"normalize-url": "^7.0.3",
|
"normalize-url": "^7.0.3",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"react-i18next": "^11.17.2",
|
"react-i18next": "^13.0.3",
|
||||||
"react-is": ">= 16.8.0",
|
"react-is": ">= 16.8.0",
|
||||||
"react-native": "0.72.3",
|
"react-native": "0.72.3",
|
||||||
"react-native-draggable-flatlist": "^3.1.2",
|
"react-native-draggable-flatlist": "^4.0.1",
|
||||||
"react-native-element-dropdown": "^2.9.0",
|
"react-native-element-dropdown": "^2.9.0",
|
||||||
"react-native-gesture-handler": "~2.12.0",
|
"react-native-gesture-handler": "~2.12.0",
|
||||||
"react-native-image-gallery": "^2.1.5",
|
"react-native-image-gallery": "^2.1.5",
|
||||||
"react-native-image-viewing": "^0.2.2",
|
"react-native-image-viewing": "^0.2.2",
|
||||||
"react-native-indicators": "^0.17.0",
|
"react-native-indicators": "^0.17.0",
|
||||||
"react-native-modal-datetime-picker": "^15.0.0",
|
"react-native-modal-datetime-picker": "^17.0.0",
|
||||||
"react-native-pager-view": "6.2.0",
|
"react-native-pager-view": "6.2.0",
|
||||||
"react-native-paper": "^4.12.4",
|
"react-native-paper": "^4.12.5",
|
||||||
"react-native-progress": "^5.0.0",
|
"react-native-progress": "^5.0.0",
|
||||||
"react-native-reanimated": "~3.3.0",
|
"react-native-reanimated": "~3.4.2",
|
||||||
"react-native-safe-area-context": "4.6.3",
|
"react-native-safe-area-context": "4.6.3",
|
||||||
"react-native-screens": "~3.22.0",
|
"react-native-screens": "~3.24.0",
|
||||||
"react-native-svg": "13.9.0",
|
"react-native-svg": "13.10.0",
|
||||||
"react-native-tab-view": "3.1.1",
|
"react-native-tab-view": "3.5.2",
|
||||||
"react-native-toast-message": "^2.1.5",
|
"react-native-toast-message": "^2.1.5",
|
||||||
"react-native-vector-icons": "*",
|
"react-native-vector-icons": "10.0.0",
|
||||||
"react-native-web": "~0.19.6",
|
"react-native-web": "~0.19.6",
|
||||||
"react-redux": "^7.2.6",
|
"react-redux": "^8.1.2",
|
||||||
"redux": "^4.1.2",
|
"redux": "^4.1.2",
|
||||||
"redux-logger": "^3.0.6",
|
"redux-logger": "^3.0.6",
|
||||||
"redux-persist": "^6.0.0",
|
"redux-persist": "^6.0.0",
|
||||||
"redux-saga": "^1.1.3",
|
"redux-saga": "^1.1.3",
|
||||||
"reselect": "^4.1.6",
|
"reselect": "^4.1.8",
|
||||||
"sentry-expo": "~7.0.0",
|
"sentry-expo": "~7.0.0",
|
||||||
"subscriptions-transport-ws": "^0.9.18"
|
"subscriptions-transport-ws": "^0.11.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.19.3",
|
"@babel/core": "^7.19.3",
|
||||||
|
|||||||
Reference in New Issue
Block a user