Improved uploads & handling for temp jobs. IO-399 IO-398 IO-69

This commit is contained in:
Patrick Fic
2021-02-11 15:38:59 -08:00
parent 519e7a347a
commit 3231097b29
13 changed files with 441 additions and 173 deletions

View File

@@ -1,7 +1,8 @@
import { useQuery } from "@apollo/client";
import { Picker } from "native-base";
import React from "react";
import { Text, View } from "react-native";
import { useTranslation } from "react-i18next";
import { View } from "react-native";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { QUERY_ALL_ACTIVE_JOBS } from "../../graphql/jobs.queries";
@@ -10,7 +11,6 @@ import { selectCurrentCameraJobId } from "../../redux/app/app.selectors";
import { selectBodyshop } from "../../redux/user/user.selectors";
import ErrorDisplay from "../error-display/error-display.component";
import LoadingDisplay from "../loading-display/loading-display.component";
import { useTranslation } from "react-i18next";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
@@ -42,11 +42,9 @@ export function CameraSelectJob({
return (
<View
style={{
fontSize: 20,
fontWeight: "bold",
marginHorizontal: 10,
}}
>
{!cameraJobId && <Text>{t("mediabrowser.labels.selectjob")}</Text>}
<Picker
selectedValue={cameraJobId}
onValueChange={(value, idx) => {
@@ -54,6 +52,16 @@ export function CameraSelectJob({
setCameraJob(data.jobs[idx]);
}}
>
<Picker.Item
label={t("mediabrowser.labels.selectjob")}
value={null}
key="null"
/>
<Picker.Item
label={t("mediabrowser.labels.temporarystorage")}
value="temp"
key="temp"
/>
{data.jobs.map((j) => {
return (
<Picker.Item