IO-2035 LMS Media.
This commit is contained in:
@@ -13,6 +13,7 @@ import LoadingDisplay from "../loading-display/loading-display.component";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import JobDocumentsLocalComponent from "../job-documents/job-documents-local.component";
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop,
|
||||
});
|
||||
@@ -55,16 +56,21 @@ export function ScreenJobDetail({ bodyshop, route }) {
|
||||
loading: loading,
|
||||
refetch: refetch,
|
||||
}),
|
||||
...(bodyshop.uselocalmediaserver
|
||||
? {}
|
||||
: {
|
||||
documents: () =>
|
||||
JobDocuments({
|
||||
job: data.jobs_by_pk,
|
||||
loading: loading,
|
||||
refetch: refetch,
|
||||
}),
|
||||
}),
|
||||
|
||||
documents: () => {
|
||||
return bodyshop.uselocalmediaserver
|
||||
? JobDocumentsLocalComponent({
|
||||
job: data.jobs_by_pk,
|
||||
|
||||
bodyshop: bodyshop,
|
||||
})
|
||||
: JobDocuments({
|
||||
job: data.jobs_by_pk,
|
||||
loading: loading,
|
||||
refetch: refetch,
|
||||
});
|
||||
},
|
||||
|
||||
notes: () =>
|
||||
JobNotes({
|
||||
job: data.jobs_by_pk,
|
||||
@@ -77,9 +83,7 @@ export function ScreenJobDetail({ bodyshop, route }) {
|
||||
const [routes] = React.useState([
|
||||
{ key: "job", title: t("jobdetail.labels.job") },
|
||||
{ key: "lines", title: t("jobdetail.labels.lines") },
|
||||
...(bodyshop.uselocalmediaserver
|
||||
? []
|
||||
: [{ key: "documents", title: t("jobdetail.labels.documents") }]),
|
||||
{ key: "documents", title: t("jobdetail.labels.documents") },
|
||||
{ key: "notes", title: t("jobdetail.labels.notes") },
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user