Add VIN to vehicle info.

This commit is contained in:
Patrick Fic
2022-08-30 12:40:37 -07:00
parent e25172f0bf
commit 1530a9ea60
3 changed files with 16 additions and 23 deletions

View File

@@ -2,21 +2,21 @@
"expo": { "expo": {
"name": "ImEX Mobile", "name": "ImEX Mobile",
"slug": "imexmobile", "slug": "imexmobile",
"version": "1.3.7", "version": "1.3.8",
"extra": { "extra": {
"expover": "6" "expover": "1"
}, },
"orientation": "default", "orientation": "default",
"icon": "./assets/logo192noa.png", "icon": "./assets/logo192noa.png",
"ios": { "ios": {
"supportsTablet": true, "supportsTablet": true,
"bundleIdentifier": "com.imex.imexmobile", "bundleIdentifier": "com.imex.imexmobile",
"buildNumber": "6", "buildNumber": "1",
"googleServicesFile": "./GoogleService-Info.plist" "googleServicesFile": "./GoogleService-Info.plist"
}, },
"android": { "android": {
"package": "com.imex.imexmobile", "package": "com.imex.imexmobile",
"versionCode": 1100019, "versionCode": 1100020,
"googleServicesFile": "./google-services.json" "googleServicesFile": "./google-services.json"
}, },
"splash": { "splash": {

View File

@@ -1,4 +1,4 @@
import React, { useEffect, useMemo, useState } from "react"; import React, { useEffect, useState } from "react";
import { import {
FlatList, FlatList,
Image, Image,
@@ -7,16 +7,10 @@ import {
TouchableOpacity, TouchableOpacity,
View, View,
} from "react-native"; } from "react-native";
import env from "../../env";
import { DetermineFileType } from "../../util/document-upload.utility";
import MediaCacheOverlay from "../media-cache-overlay/media-cache-overlay.component"; import MediaCacheOverlay from "../media-cache-overlay/media-cache-overlay.component";
import * as Sentry from "sentry-expo";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { selectBodyshop } from "../../redux/user/user.selectors";
import axios from "axios";
import cleanAxios from "../../util/CleanAxios"; import cleanAxios from "../../util/CleanAxios";
import normalizeUrl from "normalize-url";
export default function JobDocumentsLocalComponent({ bodyshop, job }) { export default function JobDocumentsLocalComponent({ bodyshop, job }) {
const [previewVisible, setPreviewVisible] = useState(false); const [previewVisible, setPreviewVisible] = useState(false);
@@ -24,7 +18,6 @@ export default function JobDocumentsLocalComponent({ bodyshop, job }) {
const [imgIndex, setImgIndex] = useState(0); const [imgIndex, setImgIndex] = useState(0);
useEffect(() => { useEffect(() => {
if (job.id) { if (job.id) {
console.log("Getting Photos!");
getPhotos({ bodyshop, jobid: job.id, setImages }); getPhotos({ bodyshop, jobid: job.id, setImages });
} }
}, [job.id, bodyshop]); }, [job.id, bodyshop]);
@@ -32,7 +25,7 @@ export default function JobDocumentsLocalComponent({ bodyshop, job }) {
const onRefresh = async () => { const onRefresh = async () => {
return getPhotos({ bodyshop, jobid: job.id, setImages }); return getPhotos({ bodyshop, jobid: job.id, setImages });
}; };
console.log(images);
return ( return (
<View style={{ flex: 1 }}> <View style={{ flex: 1 }}>
<FlatList <FlatList
@@ -78,7 +71,6 @@ export default function JobDocumentsLocalComponent({ bodyshop, job }) {
} }
async function getPhotos({ bodyshop, jobid, setImages }) { async function getPhotos({ bodyshop, jobid, setImages }) {
console.log("In Get Photos", bodyshop.localmediatoken);
const localmediaserverhttp = bodyshop.localmediaserverhttp.trim(); const localmediaserverhttp = bodyshop.localmediaserverhttp.trim();
try { try {
const imagesFetch = await cleanAxios.post( const imagesFetch = await cleanAxios.post(
@@ -88,10 +80,6 @@ async function getPhotos({ bodyshop, jobid, setImages }) {
}, },
{ headers: { ims_token: bodyshop.localmediatoken } } { headers: { ims_token: bodyshop.localmediatoken } }
); );
console.log(
"🚀 ~ file: job-documents-local.component.jsx ~ line 86 ~ imagesFetch",
imagesFetch
);
const normalizedImages = imagesFetch.data const normalizedImages = imagesFetch.data
.filter((d) => d.type?.mime?.startsWith("image")) .filter((d) => d.type?.mime?.startsWith("image"))
@@ -110,6 +98,6 @@ async function getPhotos({ bodyshop, jobid, setImages }) {
}); });
setImages(normalizedImages); setImages(normalizedImages);
} catch (error) { } catch (error) {
console.log("error,", error); Sentry.Native.captureException(error);
} }
} }

View File

@@ -58,9 +58,14 @@ export default function JobTombstone({ job, loading, refetch }) {
/> />
<DataLabelComponent <DataLabelComponent
label={t("objects.jobs.fields.vehicle")} label={t("objects.jobs.fields.vehicle")}
content={`${job.v_model_yr || ""} ${job.v_make_desc || ""} ${ content={
job.v_model_desc || "" <View>
}`} <Text>{`${job.v_model_yr || ""} ${job.v_make_desc || ""} ${
job.v_model_desc || ""
}`}</Text>
<Text>{job.v_vin}</Text>
</View>
}
/> />
</View> </View>
<View style={localStyles.twoColumnCardColumn}> <View style={localStyles.twoColumnCardColumn}>