Add VIN to vehicle info.
This commit is contained in:
8
app.json
8
app.json
@@ -2,21 +2,21 @@
|
||||
"expo": {
|
||||
"name": "ImEX Mobile",
|
||||
"slug": "imexmobile",
|
||||
"version": "1.3.7",
|
||||
"version": "1.3.8",
|
||||
"extra": {
|
||||
"expover": "6"
|
||||
"expover": "1"
|
||||
},
|
||||
"orientation": "default",
|
||||
"icon": "./assets/logo192noa.png",
|
||||
"ios": {
|
||||
"supportsTablet": true,
|
||||
"bundleIdentifier": "com.imex.imexmobile",
|
||||
"buildNumber": "6",
|
||||
"buildNumber": "1",
|
||||
"googleServicesFile": "./GoogleService-Info.plist"
|
||||
},
|
||||
"android": {
|
||||
"package": "com.imex.imexmobile",
|
||||
"versionCode": 1100019,
|
||||
"versionCode": 1100020,
|
||||
"googleServicesFile": "./google-services.json"
|
||||
},
|
||||
"splash": {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { useEffect, useMemo, useState } from "react";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import {
|
||||
FlatList,
|
||||
Image,
|
||||
@@ -7,16 +7,10 @@ import {
|
||||
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";
|
||||
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 normalizeUrl from "normalize-url";
|
||||
|
||||
export default function JobDocumentsLocalComponent({ bodyshop, job }) {
|
||||
const [previewVisible, setPreviewVisible] = useState(false);
|
||||
@@ -24,7 +18,6 @@ export default function JobDocumentsLocalComponent({ bodyshop, job }) {
|
||||
const [imgIndex, setImgIndex] = useState(0);
|
||||
useEffect(() => {
|
||||
if (job.id) {
|
||||
console.log("Getting Photos!");
|
||||
getPhotos({ bodyshop, jobid: job.id, setImages });
|
||||
}
|
||||
}, [job.id, bodyshop]);
|
||||
@@ -32,7 +25,7 @@ export default function JobDocumentsLocalComponent({ bodyshop, job }) {
|
||||
const onRefresh = async () => {
|
||||
return getPhotos({ bodyshop, jobid: job.id, setImages });
|
||||
};
|
||||
console.log(images);
|
||||
|
||||
return (
|
||||
<View style={{ flex: 1 }}>
|
||||
<FlatList
|
||||
@@ -78,7 +71,6 @@ export default function JobDocumentsLocalComponent({ bodyshop, job }) {
|
||||
}
|
||||
|
||||
async function getPhotos({ bodyshop, jobid, setImages }) {
|
||||
console.log("In Get Photos", bodyshop.localmediatoken);
|
||||
const localmediaserverhttp = bodyshop.localmediaserverhttp.trim();
|
||||
try {
|
||||
const imagesFetch = await cleanAxios.post(
|
||||
@@ -88,10 +80,6 @@ async function getPhotos({ bodyshop, jobid, setImages }) {
|
||||
},
|
||||
{ headers: { ims_token: bodyshop.localmediatoken } }
|
||||
);
|
||||
console.log(
|
||||
"🚀 ~ file: job-documents-local.component.jsx ~ line 86 ~ imagesFetch",
|
||||
imagesFetch
|
||||
);
|
||||
|
||||
const normalizedImages = imagesFetch.data
|
||||
.filter((d) => d.type?.mime?.startsWith("image"))
|
||||
@@ -110,6 +98,6 @@ async function getPhotos({ bodyshop, jobid, setImages }) {
|
||||
});
|
||||
setImages(normalizedImages);
|
||||
} catch (error) {
|
||||
console.log("error,", error);
|
||||
Sentry.Native.captureException(error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,9 +58,14 @@ export default function JobTombstone({ job, loading, refetch }) {
|
||||
/>
|
||||
<DataLabelComponent
|
||||
label={t("objects.jobs.fields.vehicle")}
|
||||
content={`${job.v_model_yr || ""} ${job.v_make_desc || ""} ${
|
||||
content={
|
||||
<View>
|
||||
<Text>{`${job.v_model_yr || ""} ${job.v_make_desc || ""} ${
|
||||
job.v_model_desc || ""
|
||||
}`}
|
||||
}`}</Text>
|
||||
<Text>{job.v_vin}</Text>
|
||||
</View>
|
||||
}
|
||||
/>
|
||||
</View>
|
||||
<View style={localStyles.twoColumnCardColumn}>
|
||||
|
||||
Reference in New Issue
Block a user