diff --git a/App.js b/App.js index c69f5ad..5c15815 100644 --- a/App.js +++ b/App.js @@ -26,29 +26,17 @@ const theme = { ...DefaultTheme, colors: { ...DefaultTheme.colors, - primary: "tomato", - accent: "yellow", + primary: "dodgerblue", + accent: "tomato", }, }; export default class App extends React.Component { - // constructor(props) { - // super(props); - // this.state = { - // isReady: false, - // }; - // } - async componentDidMount() { logImEXEvent("imexmobile_app_start"); - //this.setState({ isReady: true }); } render() { - // if (!this.state.isReady) { - // return ; - // } - return ( diff --git a/babel-translations.babel b/babel-translations.babel index 8e8c114..b75d7f6 100644 --- a/babel-translations.babel +++ b/babel-translations.babel @@ -162,6 +162,27 @@ + + dates + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + documents false @@ -225,6 +246,27 @@ + + jobinfo + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + lines false @@ -246,6 +288,132 @@ + + lines_desc + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + lines_lb_hrs + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + lines_lbr_ty + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + lines_part_type + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + lines_price + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + lines_qty + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + nojobnotes false diff --git a/components/camera-select-job/camera-select-job.component.jsx b/components/camera-select-job/camera-select-job.component.jsx index 03cb561..bf93cc6 100644 --- a/components/camera-select-job/camera-select-job.component.jsx +++ b/components/camera-select-job/camera-select-job.component.jsx @@ -1,8 +1,9 @@ import { useQuery } from "@apollo/client"; +import { Ionicons } from "@expo/vector-icons"; import React from "react"; import { useTranslation } from "react-i18next"; -import { FlatList, RefreshControl } from "react-native"; -import { Button, List, Modal, Portal, Provider } from "react-native-paper"; +import { FlatList, RefreshControl, View } from "react-native"; +import { Button, List, Modal, Portal, Searchbar } from "react-native-paper"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { QUERY_ALL_ACTIVE_JOBS } from "../../graphql/jobs.queries"; @@ -47,23 +48,80 @@ export function CameraSelectJob({ const showModal = () => setVisible(true); const hideModal = () => setVisible(false); - const containerStyle = { backgroundColor: "white", padding: 20 }; + const onRefresh = async () => { return refetch(); }; + const [searchQuery, setSearchQuery] = React.useState(""); + + const onChangeSearch = (query) => setSearchQuery(query); + + const jobs = data + ? searchQuery === "" + ? data.jobs + : data.jobs.filter( + (j) => + (j.ro_number || "") + .toString() + .toLowerCase() + .includes(searchQuery.toLowerCase()) || + (j.ownr_co_nm || "") + .toLowerCase() + .includes(searchQuery.toLowerCase()) || + (j.ownr_fn || "") + .toLowerCase() + .includes(searchQuery.toLowerCase()) || + (j.ownr_ln || "") + .toLowerCase() + .includes(searchQuery.toLowerCase()) || + (j.plate_no || "") + .toLowerCase() + .includes(searchQuery.toLowerCase()) || + (j.v_model_desc || "") + .toLowerCase() + .includes(searchQuery.toLowerCase()) || + (j.v_make_desc || "") + .toLowerCase() + .includes(searchQuery.toLowerCase()) + ) + : []; + return ( - + <> + + + + } - data={data.jobs} + data={[{ id: "temp", ro_number: "Temporary Storage" }, ...jobs]} keyExtractor={(item) => item.id} renderItem={(object) => ( { + if (object.item.id !== cameraJobId) return null; + return ( + + ); + }} + titleStyle={{ + ...(object.item.id === cameraJobId + ? { color: "dodgerblue" } + : {}), + }} + title={`${ object.item.ro_number ? `${object.item.ro_number} - ` : `` }${object.item.ownr_fn || ""} ${object.item.ownr_ln || ""} ${ object.item.ownr_co_nm || "" @@ -85,41 +160,19 @@ export function CameraSelectJob({ /> - - + ); - - // return ( - // - // { - // logImEXEvent("imexmobile_setcamerajobid"); - // setCameraJobId(value); - // setCameraJob(data.jobs[idx]); - // }} - // > - // - - // - // - // ); } export default connect(mapStateToProps, mapDispatchToProps)(CameraSelectJob); diff --git a/components/job-documents/job-documents.component.jsx b/components/job-documents/job-documents.component.jsx index 8b84277..842ef18 100644 --- a/components/job-documents/job-documents.component.jsx +++ b/components/job-documents/job-documents.component.jsx @@ -1,55 +1,78 @@ -import React, { useState } from "react"; +import React, { useState, useMemo } from "react"; import { FlatList, Image, RefreshControl, - StyleSheet, Text, TouchableOpacity, View, } from "react-native"; +import env from "../../env"; +import { DetermineFileType } from "../../util/document-upload.utility"; import MediaCacheOverlay from "../media-cache-overlay/media-cache-overlay.component"; -const REACT_APP_CLOUDINARY_IMAGE_ENDPOINT = - "https://res.cloudinary.com/bodyshop/image/upload"; -const REACT_APP_CLOUDINARY_THUMB_TRANSFORMATIONS = "c_fill,f_auto,h_250,w_250"; - export default function JobDocumentsComponent({ job, loading, refetch }) { const [previewVisible, setPreviewVisible] = useState(false); const [imgIndex, setImgIndex] = useState(0); const onRefresh = async () => { return refetch(); }; + + const fullphotos = useMemo( + () => + job.documents.map((doc) => { + return { + source: { + uri: `${env.REACT_APP_CLOUDINARY_ENDPOINT}/${DetermineFileType( + doc.type + )}/upload/${doc.key}`, + }, + }; + }), + [job.documents] + ); + return ( - + } data={job.documents} - contentContainerStyle={styles.listContentContainer} - keyExtractor={(item) => item.id} numColumns={4} + keyExtractor={(item) => item.id} renderItem={(object) => ( - { - setImgIndex(object.index); - setPreviewVisible(true); + - { + setImgIndex(object.index); + setPreviewVisible(true); }} - /> - + > + + + )} /> {job.documents.length} ); } - -const styles = StyleSheet.create({ - container: { - flex: 1, - }, - actions: { - display: "flex", - flexDirection: "row", - justifyContent: "space-evenly", - }, - listContentContainer: { - flex: 1, - }, - thumbnail: { - width: 10, - height: 10, - backgroundColor: "tomato", - }, -}); diff --git a/components/job-lines/job-lines.component.jsx b/components/job-lines/job-lines.component.jsx index 0b77f4d..85cd3a7 100644 --- a/components/job-lines/job-lines.component.jsx +++ b/components/job-lines/job-lines.component.jsx @@ -2,7 +2,7 @@ import Dinero from "dinero.js"; import React from "react"; import { useTranslation } from "react-i18next"; import { FlatList, RefreshControl, StyleSheet, Text, View } from "react-native"; -import { Card } from "react-native-paper"; +import { Card, DataTable } from "react-native-paper"; export default function JobLines({ job, loading, refetch }) { const { t } = useTranslation(); @@ -18,60 +18,64 @@ export default function JobLines({ job, loading, refetch }) { return ( + + + + {t("jobdetail.labels.lines_desc")} + + + {t("jobdetail.labels.lines_lbr_ty")} + + + {t("jobdetail.labels.lines_lb_hrs")} + + + {t("jobdetail.labels.lines_part_type")} + + + {t("jobdetail.labels.lines_qty")} + + + {t("jobdetail.labels.lines_price")} + + + + } - contentContainerStyle={localStyles.listContentContainer} keyExtractor={(item) => item.id} renderItem={(object) => ( - - - {`${ - object.item.line_desc - }${ - object.item.part_qty > 1 ? ` x ${object.item.part_qty}` : "" - }`} - {object.item.part_type && ( - - {t(`jobdetail.part_types.${object.item.part_type}`)} - - )} - - {Dinero({ - amount: Math.round((object.item.act_price || 0) * 100), - }).toFormat()} - - - - {object.item.mod_lbr_ty && ( - - {t(`jobdetail.lbr_types.${object.item.mod_lbr_ty}`)} - - )} - - + + + {object.item.line_desc} + + + {object.item.mod_lbr_ty && + t(`jobdetail.lbr_types.${object.item.mod_lbr_ty}`)} + + + {object.item.mod_lb_hrs} + + + {object.item.part_type && + t(`jobdetail.part_types.${object.item.part_type}`)} + + + {object.item.part_qty} + + + {Dinero({ + amount: Math.round((object.item.act_price || 0) * 100), + }).toFormat()} + + )} /> ); } -const localStyles = StyleSheet.create({ - listContentContainer: { - flex: 1, - }, - flexRow: { - display: "flex", - flexDirection: "row", - justifyContent: "space-between", - }, - sideMargins: { - marginLeft: 5, - marginRight: 5, - }, - growWithEllipsis: { - flex: 1, - }, -}); +const localStyles = StyleSheet.create({}); diff --git a/components/job-list-item/job-list-item.component.jsx b/components/job-list-item/job-list-item.component.jsx index ddea7ce..a9f7a60 100644 --- a/components/job-list-item/job-list-item.component.jsx +++ b/components/job-list-item/job-list-item.component.jsx @@ -4,8 +4,7 @@ import React, { useRef } from "react"; import { useTranslation } from "react-i18next"; import { Animated } from "react-native"; import { TouchableOpacity } from "react-native-gesture-handler"; -import Swipeable from "react-native-gesture-handler/Swipeable"; -import { List } from "react-native-paper"; +import { Button, List, Title } from "react-native-paper"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { logImEXEvent } from "../../firebase/firebase.utils"; @@ -60,21 +59,35 @@ export function JobListItem({ setCameraJob, setCameraJobId, item }) { }; return ( - + {item.ro_number || t("general.labels.na")}} description={`${item.ownr_fn || ""} ${item.ownr_ln || ""} ${ item.ownr_co_nm || "" } - ${item.v_model_yr || ""} ${item.v_make_desc || ""} ${ item.v_model_desc || "" }`} + right={({ style }) => ( + + )} /> - + ); } diff --git a/components/job-notes-item/job-notes-item.component.jsx b/components/job-notes-item/job-notes-item.component.jsx index c277d4a..78b1914 100644 --- a/components/job-notes-item/job-notes-item.component.jsx +++ b/components/job-notes-item/job-notes-item.component.jsx @@ -5,7 +5,7 @@ import { Text, View } from "react-native"; import { Card } from "react-native-paper"; export default function NoteListItem({ item }) { return ( - + {item.text} diff --git a/components/job-notes/job-notes.component.jsx b/components/job-notes/job-notes.component.jsx index d511abb..01b9695 100644 --- a/components/job-notes/job-notes.component.jsx +++ b/components/job-notes/job-notes.component.jsx @@ -1,8 +1,8 @@ import React from "react"; import { useTranslation } from "react-i18next"; import { FlatList, RefreshControl, Text } from "react-native"; -import JobNotesItem from "../job-notes-item/job-notes-item.component"; import { Card } from "react-native-paper"; +import JobNotesItem from "../job-notes-item/job-notes-item.component"; export default function JobNotes({ job, loading, refetch }) { const { t } = useTranslation(); if (!job) { @@ -14,6 +14,7 @@ export default function JobNotes({ job, loading, refetch }) { const onRefresh = async () => { return refetch(); }; + if (job.notes.length === 0) return ( @@ -31,7 +32,6 @@ export default function JobNotes({ job, loading, refetch }) { style={{ flex: 1 }} data={job.notes} renderItem={(object) => } - //ItemSeparatorComponent={FlatListItemSeparator} /> ); } diff --git a/components/job-tombstone/job-tombstone.component.jsx b/components/job-tombstone/job-tombstone.component.jsx index e6650f4..6b1fad2 100644 --- a/components/job-tombstone/job-tombstone.component.jsx +++ b/components/job-tombstone/job-tombstone.component.jsx @@ -1,14 +1,16 @@ -import { Card } from "react-native-paper"; import React from "react"; import { useTranslation } from "react-i18next"; import { RefreshControl, - StyleSheet, ScrollView, + StyleSheet, Text, View, } from "react-native"; +import { Card, Headline, Subheading } from "react-native-paper"; import DataLabelComponent from "../data-label/data-label.component"; +import StyleRepeater from "../style-repeater/style-repeater"; +import styles from "../styles"; export default function JobTombstone({ job, loading, refetch }) { const { t } = useTranslation(); @@ -23,114 +25,121 @@ export default function JobTombstone({ job, loading, refetch }) { return ( } > - - - {job.status} - - {job.inproduction && ( - - {t("objects.jobs.labels.inproduction")} + + + + + {job.status} + {job.inproduction && ( + {t("objects.jobs.labels.inproduction")} + )} + {job.inproduction && + job.production_vars && + !!job.production_vars.note && ( + {job.production_vars.note} + )} - )} - {job.inproduction && job.production_vars && !!job.production_vars.note && ( - - {job.production_vars.note} + + + + + + + + + + + + + - )} - - - - {t("jobdetail.labels.claiminformation")} - - - - - - - - - - - {t("jobdetail.labels.employeeassignments")} - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + ); } @@ -144,7 +153,6 @@ const localStyles = StyleSheet.create({ justifyContent: "center", }, inproduction: { - backgroundColor: "tomato", textAlign: "center", flexDirection: "row", justifyContent: "center", diff --git a/components/media-cache-overlay/media-cache-overlay.component.jsx b/components/media-cache-overlay/media-cache-overlay.component.jsx index b783216..591f208 100644 --- a/components/media-cache-overlay/media-cache-overlay.component.jsx +++ b/components/media-cache-overlay/media-cache-overlay.component.jsx @@ -1,84 +1,23 @@ import React from "react"; -import { Alert, Modal, StyleSheet, Text, Button, View } from "react-native"; -import ImageViewer from "react-native-image-zoom-viewer"; -import { connect } from "react-redux"; -import { createStructuredSelector } from "reselect"; -import { removePhotos } from "../../redux/photos/photos.actions"; -import { selectPhotos } from "../../redux/photos/photos.selectors"; +import { Modal } from "react-native"; +import Gallery from "react-native-image-gallery"; -const mapStateToProps = createStructuredSelector({ - photos: selectPhotos, -}); -const mapDispatchToProps = (dispatch) => ({ - removePhotos: (ids) => dispatch(removePhotos(ids)), -}); - -export function MediaCacheOverlay({ +export default function MediaCacheOverlay({ photos, - removePhotos, previewVisible, setPreviewVisible, imgIndex, setImgIndex, }) { + console.log("photos :>> ", photos); return ( { - Alert.alert("Modal has been closed."); - }} + onDismiss={() => setPreviewVisible(false)} + onRequestClose={() => setPreviewVisible(false)} visible={previewVisible} - transparent={true} + transparent={false} > - setPreviewVisible(false)} - index={imgIndex} - onChange={(index) => setImgIndex(index)} - style={{ display: "flex" }} - renderFooter={(index) => ( - - {index} This is the thing. - - - )} - enableSwipeDown - enablePreload - imageUrls={photos.map((p) => { - return { url: p.uri }; - })} - /> + ); } - -const styles = StyleSheet.create({ - container: { - flex: 1, - }, - actions: { - display: "flex", - flexDirection: "row", - justifyContent: "space-evenly", - }, - listContentContainer: { - flex: 1, - }, - thumbnail: { - width: 10, - height: 10, - backgroundColor: "tomato", - }, -}); - -export default connect(mapStateToProps, mapDispatchToProps)(MediaCacheOverlay); diff --git a/components/screen-job-detail/screen-job-detail.component.jsx b/components/screen-job-detail/screen-job-detail.component.jsx index 8ebfbd6..8a5b945 100644 --- a/components/screen-job-detail/screen-job-detail.component.jsx +++ b/components/screen-job-detail/screen-job-detail.component.jsx @@ -2,7 +2,7 @@ import { useQuery } from "@apollo/client"; import React from "react"; import { useTranslation } from "react-i18next"; import { useWindowDimensions } from "react-native"; -import { SceneMap, TabView } from "react-native-tab-view"; +import { SceneMap, TabView, TabBar } from "react-native-tab-view"; import { GET_JOB_BY_PK } from "../../graphql/jobs.queries"; import ErrorDisplay from "../error-display/error-display.component"; import JobDocuments from "../job-documents/job-documents.component"; @@ -24,6 +24,14 @@ export default function ScreenJobDetail({ route }) { skip: !jobId, }); + const renderTabBar = (props) => ( + + ); + const renderScene = SceneMap({ job: () => JobTombstone({ @@ -68,6 +76,7 @@ export default function ScreenJobDetail({ route }) { renderScene={renderScene} onIndexChange={setIndex} initialLayout={{ width: layout.width }} + renderTabBar={renderTabBar} /> ); } diff --git a/components/screen-media-browser/screen-media-browser.component.jsx b/components/screen-media-browser/screen-media-browser.component.jsx index 4f5c5af..647a450 100644 --- a/components/screen-media-browser/screen-media-browser.component.jsx +++ b/components/screen-media-browser/screen-media-browser.component.jsx @@ -64,7 +64,6 @@ export function ImageBrowserScreen({ } const onDone = async (data) => { - console.log("Assets :>> ", data); logImEXEvent("imexmobile_upload_documents", { count: data.length }); const actions = []; data.forEach(function (p) { diff --git a/components/screen-sign-in/screen-sign-in.component.jsx b/components/screen-sign-in/screen-sign-in.component.jsx index 66bd9a4..1826b0e 100644 --- a/components/screen-sign-in/screen-sign-in.component.jsx +++ b/components/screen-sign-in/screen-sign-in.component.jsx @@ -1,7 +1,8 @@ import { Formik } from "formik"; import React from "react"; import { useTranslation } from "react-i18next"; -import { ActivityIndicator, Image, StyleSheet, View, Text } from "react-native"; +import { Image, StyleSheet, Text, View } from "react-native"; +import { Button, TextInput, Title } from "react-native-paper"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import Logo from "../../assets/logo192.png"; @@ -11,8 +12,6 @@ import { selectSigningIn, } from "../../redux/user/user.selectors"; import SignInErrorAlertComponent from "../sign-in-error-alert/sign-in-error-alert.component"; -import styles from "../styles"; -import { TextInput, Button, Subheading } from "react-native-paper"; const mapStateToProps = createStructuredSelector({ currentUser: selectCurrentUser, @@ -33,41 +32,46 @@ export function SignIn({ emailSignInStart, signingIn }) { }; return ( - - + + - {t("app.title")} + {t("app.title")} {({ handleChange, handleBlur, handleSubmit, values }) => ( - - {t("signin.fields.email")} - - - - {t("signin.fields.password")} - - + + + + - )} @@ -78,9 +82,13 @@ export function SignIn({ emailSignInStart, signingIn }) { const localStyles = StyleSheet.create({ content: { - paddingBottom: 200, + display: "flex", + flex: 1, }, logo: { width: 100, height: 100 }, + input: { + margin: 12, + }, }); export default connect(mapStateToProps, mapDispatchToProps)(SignIn); diff --git a/components/screen-splash/screen-splash.component.jsx b/components/screen-splash/screen-splash.component.jsx index 3ec3303..78fcb7c 100644 --- a/components/screen-splash/screen-splash.component.jsx +++ b/components/screen-splash/screen-splash.component.jsx @@ -1,29 +1,35 @@ import React from "react"; import { useTranslation } from "react-i18next"; -import { Image, StyleSheet, View } from "react-native"; -import { BarIndicator } from "react-native-indicators"; +import { ActivityIndicator, Image, StyleSheet, View } from "react-native"; import { Title } from "react-native-paper"; import Logo from "../../assets/logo192.png"; -import styles from "../styles"; export default function ScreenSplash() { const { t } = useTranslation(); return ( - - - {t("app.title")} - + + + + {t("app.title")} + + + ); } const localStyles = StyleSheet.create({ - middleAlign: { + container: { + display: "flex", + flex: 1, + flexDirection: "column", + alignContent: "center", + justifyContent: "center", + }, + logoContainer: { + display: "flex", + flexDirection: "column", + alignItems: "center", }, - logo: { width: 100, height: 100, margin: 20 }, + logo: { width: 175, height: 175, margin: 20 }, }); diff --git a/components/style-repeater/style-repeater.jsx b/components/style-repeater/style-repeater.jsx new file mode 100644 index 0000000..0f18ee0 --- /dev/null +++ b/components/style-repeater/style-repeater.jsx @@ -0,0 +1,13 @@ +import React from "react"; + +export default function StyleRepeater({ childStyle, children }) { + return ( + <> + {React.Children.map(children, (child) => + React.cloneElement(child, { + style: [child.props.style, childStyle], + }) + )} + + ); +} diff --git a/components/styles.js b/components/styles.js index 0533d2b..3ca0bee 100644 --- a/components/styles.js +++ b/components/styles.js @@ -1,30 +1,12 @@ import { StyleSheet } from "react-native"; +const cardBackgroundColor = "gainsboro"; + export default StyleSheet.create({ - contentContainer__centered: { - justifyContent: "center", + cardBackground: { + padding: 5, + backgroundColor: cardBackgroundColor, + display: "flex", flex: 1, }, - - evenlySpacedRow: { - flexDirection: "row", - justifyContent: "space-evenly", - alignItems: "center", - }, - - swipe_view: { - flex: 1, - alignItems: "center", - justifyContent: "center", - width: 100, - // marginTop: 5, - //marginBottom: 5, - }, - swipe_view_blue: { - backgroundColor: "dodgerblue", - }, - swipe_text: { - textAlign: "center", - color: "white", - }, }); diff --git a/components/upload-progress/upload-progress.component.jsx b/components/upload-progress/upload-progress.component.jsx index c2ee11f..f0396e6 100644 --- a/components/upload-progress/upload-progress.component.jsx +++ b/components/upload-progress/upload-progress.component.jsx @@ -1,5 +1,5 @@ import { Ionicons } from "@expo/vector-icons"; -import React from "react"; +import React, { useMemo } from "react"; import { ScrollView, StyleSheet, @@ -10,10 +10,15 @@ import { import * as Progress from "react-native-progress"; import _ from "lodash"; export default function UploadProgress({ uploads, setUploads }) { + const uploadKeys = useMemo(() => { + if (uploads) return Object.keys(uploads); + return []; + }, [uploads]); + return ( - {Object.keys(uploads).map((key) => ( + {uploadKeys.map((key) => ( {key} diff --git a/env.js b/env.js index 335f011..08a418e 100644 --- a/env.js +++ b/env.js @@ -5,6 +5,7 @@ export const prodUrl = "https://someapp.herokuapp.com"; const ENV = { dev: { API_URL: "https://api.imex.online", + REACT_APP_CLOUDINARY_ENDPOINT_API: "https://api.cloudinary.com/v1_1/bodyshop", REACT_APP_CLOUDINARY_ENDPOINT: "https://res.cloudinary.com/bodyshop", diff --git a/graphql/jobs.queries.js b/graphql/jobs.queries.js index 585f948..d95eb7a 100644 --- a/graphql/jobs.queries.js +++ b/graphql/jobs.queries.js @@ -274,6 +274,7 @@ export const GET_JOB_BY_PK = gql` name key created_at + type } } } diff --git a/package-lock.json b/package-lock.json index 805817d..497b8f1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -42,7 +42,7 @@ "react-native": "https://github.com/expo/react-native/archive/sdk-40.0.0.tar.gz", "react-native-easy-grid": "^0.2.2", "react-native-gesture-handler": "~1.8.0", - "react-native-image-zoom-viewer": "^3.0.1", + "react-native-image-gallery": "^2.1.5", "react-native-indicators": "^0.17.0", "react-native-pager-view": "^5.1.0", "react-native-paper": "^4.7.2", @@ -13001,6 +13001,15 @@ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", "license": "MIT" }, + "node_modules/react-mixin": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/react-mixin/-/react-mixin-3.1.1.tgz", + "integrity": "sha512-z9fZ0aCRDjlgxLdMeWkJ9TwhmVLhQ09r8RFpin/cEPA2T6jsb7YHNWcIe0Oii+hhJNyMymdy91CSya5mRkuCkg==", + "dependencies": { + "object-assign": "^4.0.1", + "smart-mixin": "^2.0.0" + } + }, "node_modules/react-native": { "version": "0.63.2", "license": "MIT", @@ -13063,23 +13072,14 @@ "prop-types": "^15.7.2" } }, - "node_modules/react-native-image-pan-zoom": { - "version": "2.1.12", - "resolved": "https://registry.npmjs.org/react-native-image-pan-zoom/-/react-native-image-pan-zoom-2.1.12.tgz", - "integrity": "sha512-BF66XeP6dzuANsPmmFsJshM2Jyh/Mo1t8FsGc1L9Q9/sVP8MJULDabB1hms+eAoqgtyhMr5BuXV3E1hJ5U5H6Q==", - "license": "ISC", - "peerDependencies": { - "react": "*", - "react-native": "*" - } - }, - "node_modules/react-native-image-zoom-viewer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/react-native-image-zoom-viewer/-/react-native-image-zoom-viewer-3.0.1.tgz", - "integrity": "sha512-la6s5DNSuq4GCRLsi5CZ29FPjgTpdCuGIRdO5T9rUrAtxrlpBPhhSnHrbmPVxsdtOUvxHacTh2Gfa9+RraMZQA==", - "license": "MIT", + "node_modules/react-native-image-gallery": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/react-native-image-gallery/-/react-native-image-gallery-2.1.5.tgz", + "integrity": "sha512-xC7nuPu4GUH0da6byofQ10LjtqlKj+VaLc0NHBJmeMHVvdvmRvFEO6UOq0Q0m/ePx3OQiPTNwGbf5BSPJEKa0w==", "dependencies": { - "react-native-image-pan-zoom": "^2.1.12" + "prop-types": "^15.6.0", + "react-mixin": "^3.0.5", + "react-timer-mixin": "^0.13.3" }, "peerDependencies": { "react": "*", @@ -14223,6 +14223,11 @@ "node": ">=8.0.0" } }, + "node_modules/smart-mixin": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/smart-mixin/-/smart-mixin-2.0.0.tgz", + "integrity": "sha1-o0oQVeMqdbMNK048oyPcmctT9Dc=" + }, "node_modules/snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", @@ -25256,6 +25261,15 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, + "react-mixin": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/react-mixin/-/react-mixin-3.1.1.tgz", + "integrity": "sha512-z9fZ0aCRDjlgxLdMeWkJ9TwhmVLhQ09r8RFpin/cEPA2T6jsb7YHNWcIe0Oii+hhJNyMymdy91CSya5mRkuCkg==", + "requires": { + "object-assign": "^4.0.1", + "smart-mixin": "^2.0.0" + } + }, "react-native": { "version": "0.63.2", "requires": { @@ -25317,18 +25331,14 @@ "prop-types": "^15.7.2" } }, - "react-native-image-pan-zoom": { - "version": "2.1.12", - "resolved": "https://registry.npmjs.org/react-native-image-pan-zoom/-/react-native-image-pan-zoom-2.1.12.tgz", - "integrity": "sha512-BF66XeP6dzuANsPmmFsJshM2Jyh/Mo1t8FsGc1L9Q9/sVP8MJULDabB1hms+eAoqgtyhMr5BuXV3E1hJ5U5H6Q==", - "requires": {} - }, - "react-native-image-zoom-viewer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/react-native-image-zoom-viewer/-/react-native-image-zoom-viewer-3.0.1.tgz", - "integrity": "sha512-la6s5DNSuq4GCRLsi5CZ29FPjgTpdCuGIRdO5T9rUrAtxrlpBPhhSnHrbmPVxsdtOUvxHacTh2Gfa9+RraMZQA==", + "react-native-image-gallery": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/react-native-image-gallery/-/react-native-image-gallery-2.1.5.tgz", + "integrity": "sha512-xC7nuPu4GUH0da6byofQ10LjtqlKj+VaLc0NHBJmeMHVvdvmRvFEO6UOq0Q0m/ePx3OQiPTNwGbf5BSPJEKa0w==", "requires": { - "react-native-image-pan-zoom": "^2.1.12" + "prop-types": "^15.6.0", + "react-mixin": "^3.0.5", + "react-timer-mixin": "^0.13.3" } }, "react-native-indicators": { @@ -26146,6 +26156,11 @@ "resolved": "https://registry.npmjs.org/slugify/-/slugify-1.4.7.tgz", "integrity": "sha512-tf+h5W1IrjNm/9rKKj0JU2MDMruiopx0jjVA5zCdBtcGjfp0+c5rHw/zADLC3IeKlGHtVbHtpfzvYA0OYT+HKg==" }, + "smart-mixin": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/smart-mixin/-/smart-mixin-2.0.0.tgz", + "integrity": "sha1-o0oQVeMqdbMNK048oyPcmctT9Dc=" + }, "snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", diff --git a/package.json b/package.json index 336395f..c01b264 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "react-native": "https://github.com/expo/react-native/archive/sdk-40.0.0.tar.gz", "react-native-easy-grid": "^0.2.2", "react-native-gesture-handler": "~1.8.0", - "react-native-image-zoom-viewer": "^3.0.1", + "react-native-image-gallery": "^2.1.5", "react-native-indicators": "^0.17.0", "react-native-pager-view": "^5.1.0", "react-native-paper": "^4.7.2", diff --git a/translations/en-US/common.json b/translations/en-US/common.json index 5239a08..747bb02 100644 --- a/translations/en-US/common.json +++ b/translations/en-US/common.json @@ -19,10 +19,18 @@ "jobdetail": { "labels": { "claiminformation": "Claim Information", - "documents": "Documents", + "dates": "Dates", + "documents": "Docs", "employeeassignments": "Employee Assignments", "job": "Job", + "jobinfo": "Job Information", "lines": "Lines", + "lines_desc": "Desc.", + "lines_lb_hrs": "Hrs", + "lines_lbr_ty": "Lbr. Ty.", + "lines_part_type": "Part Ty.", + "lines_price": "$", + "lines_qty": "Qty.", "nojobnotes": "There are no notes.", "notes": "Notes" }, diff --git a/translations/es-MX/common.json b/translations/es-MX/common.json index d428ad2..e3cd237 100644 --- a/translations/es-MX/common.json +++ b/translations/es-MX/common.json @@ -19,10 +19,18 @@ "jobdetail": { "labels": { "claiminformation": "", + "dates": "", "documents": "", "employeeassignments": "", "job": "", + "jobinfo": "", "lines": "", + "lines_desc": "", + "lines_lb_hrs": "", + "lines_lbr_ty": "", + "lines_part_type": "", + "lines_price": "", + "lines_qty": "", "nojobnotes": "", "notes": "" }, diff --git a/translations/fr-CA/common.json b/translations/fr-CA/common.json index 82db3fc..3dd73ae 100644 --- a/translations/fr-CA/common.json +++ b/translations/fr-CA/common.json @@ -19,10 +19,18 @@ "jobdetail": { "labels": { "claiminformation": "", + "dates": "", "documents": "", "employeeassignments": "", "job": "", + "jobinfo": "", "lines": "", + "lines_desc": "", + "lines_lb_hrs": "", + "lines_lbr_ty": "", + "lines_part_type": "", + "lines_price": "", + "lines_qty": "", "nojobnotes": "", "notes": "" }, diff --git a/util/document-upload.utility.js b/util/document-upload.utility.js index e19b2ae..9512253 100644 --- a/util/document-upload.utility.js +++ b/util/document-upload.utility.js @@ -181,7 +181,6 @@ export const uploadToCloudinary = async ( }; export function DetermineFileType(filetype) { - console.log("Checking Type", filetype, filetype.startsWith("video")); if (!filetype) return "auto"; else if (filetype.startsWith("image")) return "image"; else if (filetype.startsWith("video")) return "video"; diff --git a/yarn.lock b/yarn.lock index 7075ac9..26f8d30 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7338,6 +7338,14 @@ "resolved" "https://registry.npmjs.org/react-is/-/react-is-17.0.1.tgz" "version" "17.0.1" +"react-mixin@^3.0.5": + "integrity" "sha512-z9fZ0aCRDjlgxLdMeWkJ9TwhmVLhQ09r8RFpin/cEPA2T6jsb7YHNWcIe0Oii+hhJNyMymdy91CSya5mRkuCkg==" + "resolved" "https://registry.npmjs.org/react-mixin/-/react-mixin-3.1.1.tgz" + "version" "3.1.1" + dependencies: + "object-assign" "^4.0.1" + "smart-mixin" "^2.0.0" + "react-native-easy-grid@^0.2.2": "integrity" "sha512-MlYrNIldnEMKn6TVatQN1P64GoVlwGIuz+8ncdfJ0Wq/xtzUkQwlil8Uksyp7MhKfENE09MQnGNcba6Mx3oSAA==" "resolved" "https://registry.npmjs.org/react-native-easy-grid/-/react-native-easy-grid-0.2.2.tgz" @@ -7355,17 +7363,14 @@ "invariant" "^2.2.4" "prop-types" "^15.7.2" -"react-native-image-pan-zoom@^2.1.12": - "integrity" "sha512-BF66XeP6dzuANsPmmFsJshM2Jyh/Mo1t8FsGc1L9Q9/sVP8MJULDabB1hms+eAoqgtyhMr5BuXV3E1hJ5U5H6Q==" - "resolved" "https://registry.npmjs.org/react-native-image-pan-zoom/-/react-native-image-pan-zoom-2.1.12.tgz" - "version" "2.1.12" - -"react-native-image-zoom-viewer@^3.0.1": - "integrity" "sha512-la6s5DNSuq4GCRLsi5CZ29FPjgTpdCuGIRdO5T9rUrAtxrlpBPhhSnHrbmPVxsdtOUvxHacTh2Gfa9+RraMZQA==" - "resolved" "https://registry.npmjs.org/react-native-image-zoom-viewer/-/react-native-image-zoom-viewer-3.0.1.tgz" - "version" "3.0.1" +"react-native-image-gallery@^2.1.5": + "integrity" "sha512-xC7nuPu4GUH0da6byofQ10LjtqlKj+VaLc0NHBJmeMHVvdvmRvFEO6UOq0Q0m/ePx3OQiPTNwGbf5BSPJEKa0w==" + "resolved" "https://registry.npmjs.org/react-native-image-gallery/-/react-native-image-gallery-2.1.5.tgz" + "version" "2.1.5" dependencies: - "react-native-image-pan-zoom" "^2.1.12" + "prop-types" "^15.6.0" + "react-mixin" "^3.0.5" + "react-timer-mixin" "^0.13.3" "react-native-indicators@^0.17.0": "integrity" "sha512-s23em477GHGxWeGczWrixScAZD6tQU4mx1fttlrwhEGKOxhBgp55Kh3RoD9Wj4yna4e5W35xQNoPqoJAT6QW5A==" @@ -7499,7 +7504,7 @@ "resolved" "https://registry.npmjs.org/react-refresh/-/react-refresh-0.4.3.tgz" "version" "0.4.3" -"react-timer-mixin@^0.13.4": +"react-timer-mixin@^0.13.3", "react-timer-mixin@^0.13.4": "integrity" "sha512-4+ow23tp/Tv7hBM5Az5/Be/eKKF7DIvJ09voz5LyHGQaqqz9WV8YMs31eFvcYQs7d451LSg7kDJV70XYN/Ug/Q==" "resolved" "https://registry.npmjs.org/react-timer-mixin/-/react-timer-mixin-0.13.4.tgz" "version" "0.13.4" @@ -8069,6 +8074,11 @@ "resolved" "https://registry.npmjs.org/slugify/-/slugify-1.4.7.tgz" "version" "1.4.7" +"smart-mixin@^2.0.0": + "integrity" "sha1-o0oQVeMqdbMNK048oyPcmctT9Dc=" + "resolved" "https://registry.npmjs.org/smart-mixin/-/smart-mixin-2.0.0.tgz" + "version" "2.0.0" + "snapdragon-node@^2.0.1": "integrity" "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==" "resolved" "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz"