diff --git a/babel-translations.babel b/babel-translations.babel
index 17eb5e3..7de7664 100644
--- a/babel-translations.babel
+++ b/babel-translations.babel
@@ -1462,6 +1462,27 @@
+
+ tempdocs
+ false
+
+
+
+
+
+ en-US
+ false
+
+
+ es-MX
+ false
+
+
+ fr-CA
+ false
+
+
+
diff --git a/components/jobs-list/jobs-list.jsx b/components/jobs-list/jobs-list.jsx
index 857602e..82b1e0a 100644
--- a/components/jobs-list/jobs-list.jsx
+++ b/components/jobs-list/jobs-list.jsx
@@ -9,13 +9,17 @@ import { createStructuredSelector } from "reselect";
import { QUERY_ALL_ACTIVE_JOBS } from "../../graphql/jobs.queries";
import { selectBodyshop } from "../../redux/user/user.selectors";
//import ErrorDisplay from "../error-display/error-display.component";
+import { openImagePicker } from "@/redux/photos/photos.actions";
import JobListItem from "./job-list-item";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
});
+const mapDispatchToProps = (dispatch) => ({
+ openImagePicker: (id) => dispatch(openImagePicker(id)),
+});
-export function JobListComponent({ bodyshop }) {
+export function JobListComponent({ bodyshop, openImagePicker }) {
const { t } = useTranslation();
const { loading, error, data, refetch } = useQuery(QUERY_ALL_ACTIVE_JOBS, {
@@ -30,6 +34,10 @@ export function JobListComponent({ bodyshop }) {
return refetch();
};
+ const handleTempUpload = () => {
+ openImagePicker(); //Kept null for temp docs.
+ };
+
if (loading) return ;
if (error) return {error.message};
if (data && data.jobs && data.jobs.length === 0)
@@ -51,12 +59,24 @@ export function JobListComponent({ bodyshop }) {
style={{ flex: 1, marginHorizontal: 12, paddingBottom: 48 }}
edges={["top"]}
>
-
- Jobs
-
+
+ {t("joblist.titles.jobtab")}
+
+
+
@@ -70,4 +90,4 @@ export function JobListComponent({ bodyshop }) {
);
}
-export default connect(mapStateToProps, null)(JobListComponent);
+export default connect(mapStateToProps, mapDispatchToProps)(JobListComponent);
diff --git a/redux/photos/photos.sagas.js b/redux/photos/photos.sagas.js
index 6ab466d..a598db3 100644
--- a/redux/photos/photos.sagas.js
+++ b/redux/photos/photos.sagas.js
@@ -205,7 +205,7 @@ function* uploadToLocalMediaServer(photos, bodyshop, jobid) {
try {
const formData = new FormData();
- formData.append("jobid", jobid);
+ formData.append("jobid", jobid || "temporary");
for (const file of photos) {
formData.append("file", {
diff --git a/translations/en-US/common.json b/translations/en-US/common.json
index 4e316eb..18e4d83 100644
--- a/translations/en-US/common.json
+++ b/translations/en-US/common.json
@@ -94,7 +94,8 @@
"activejobs": "Jobs",
"detail": "Job Detail",
"nojobs": "There are no active jobs.",
- "search": "Search..."
+ "search": "Search...",
+ "tempdocs": "Temp. Docs"
},
"titles": {
"jobtab": "Jobs"
diff --git a/translations/es-MX/common.json b/translations/es-MX/common.json
index cf25e29..734dc46 100644
--- a/translations/es-MX/common.json
+++ b/translations/es-MX/common.json
@@ -94,7 +94,8 @@
"activejobs": "",
"detail": "",
"nojobs": "",
- "search": ""
+ "search": "",
+ "tempdocs": ""
},
"titles": {
"jobtab": ""
diff --git a/translations/fr-CA/common.json b/translations/fr-CA/common.json
index 62e5cf5..4ed91c9 100644
--- a/translations/fr-CA/common.json
+++ b/translations/fr-CA/common.json
@@ -94,7 +94,8 @@
"activejobs": "",
"detail": "",
"nojobs": "",
- "search": ""
+ "search": "",
+ "tempdocs": ""
},
"titles": {
"jobtab": ""