+
{TemplateList()[item.name].title}
{TemplateList()[item.name].description}
{TemplateList()[item.name].drivingid}
@@ -74,6 +74,6 @@ export default function ShopTemplatesListContainer({ visibleState }) {
)}
/>
-
+ )
);
}
diff --git a/client/src/components/tech-lookup-jobs-drawer/tech-lookup-jobs-drawer.component.jsx b/client/src/components/tech-lookup-jobs-drawer/tech-lookup-jobs-drawer.component.jsx
index 6686bbdf4..dc2a8670a 100644
--- a/client/src/components/tech-lookup-jobs-drawer/tech-lookup-jobs-drawer.component.jsx
+++ b/client/src/components/tech-lookup-jobs-drawer/tech-lookup-jobs-drawer.component.jsx
@@ -1,16 +1,16 @@
-import { PrinterFilled } from "@ant-design/icons";
-import { useQuery } from "@apollo/client";
-import { Button, Divider, Drawer, Grid, Tabs } from "antd";
+import {PrinterFilled} from "@ant-design/icons";
+import {useQuery} from "@apollo/client";
+import {Button, Divider, Drawer, Grid, Tabs} from "antd";
import {PageHeader} from "@ant-design/pro-layout";
import queryString from "query-string";
import React from "react";
-import { useTranslation } from "react-i18next";
-import { connect } from "react-redux";
-import { useNavigate, useLocation } from "react-router-dom";
-import { createStructuredSelector } from "reselect";
-import { GET_JOB_BY_PK } from "../../graphql/jobs.queries";
-import { setModalContext } from "../../redux/modals/modals.actions";
-import { selectBodyshop } from "../../redux/user/user.selectors";
+import {useTranslation} from "react-i18next";
+import {connect} from "react-redux";
+import {useLocation, useNavigate} from "react-router-dom";
+import {createStructuredSelector} from "reselect";
+import {GET_JOB_BY_PK} from "../../graphql/jobs.queries";
+import {setModalContext} from "../../redux/modals/modals.actions";
+import {selectBodyshop} from "../../redux/user/user.selectors";
import AlertComponent from "../alert/alert.component";
import JobLinesContainer from "../job-detail-lines/job-lines.container";
import JobsDetailHeader from "../jobs-detail-header/jobs-detail-header.component";
@@ -19,11 +19,11 @@ import JobsDocumentsLocalGallery from "../jobs-documents-local-gallery/jobs-docu
import JobNotesContainer from "../jobs-notes/jobs-notes.container";
import LoadingSpinner from "../loading-spinner/loading-spinner.component";
-const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop });
+const mapStateToProps = createStructuredSelector({bodyshop: selectBodyshop});
const mapDispatchToProps = (dispatch) => ({
- setPrintCenterContext: (context) =>
- dispatch(setModalContext({ context: context, modal: "printCenter" })),
+ setPrintCenterContext: (context) =>
+ dispatch(setModalContext({context: context, modal: "printCenter"})),
});
// const colBreakPoints = {
@@ -35,105 +35,118 @@ const mapDispatchToProps = (dispatch) => ({
// },
// };
-export function TechLookupJobsDrawer({ bodyshop, setPrintCenterContext }) {
- const selectedBreakpoint = Object.entries(Grid.useBreakpoint())
- .filter((screen) => !!screen[1])
- .slice(-1)[0];
+export function TechLookupJobsDrawer({bodyshop, setPrintCenterContext}) {
+ const selectedBreakpoint = Object.entries(Grid.useBreakpoint())
+ .filter((screen) => !!screen[1])
+ .slice(-1)[0];
- const bpoints = {
- xs: "100%",
- sm: "100%",
- md: "100%",
- lg: "100%",
- xl: "90%",
- xxl: "85%",
- };
- const drawerPercentage = selectedBreakpoint
- ? bpoints[selectedBreakpoint[0]]
- : "100%";
+ const bpoints = {
+ xs: "100%",
+ sm: "100%",
+ md: "100%",
+ lg: "100%",
+ xl: "90%",
+ xxl: "85%",
+ };
+ const drawerPercentage = selectedBreakpoint
+ ? bpoints[selectedBreakpoint[0]]
+ : "100%";
- const searchParams =queryString.parse(useLocation().search);
- const { selected } = searchParams;
- const history = useNavigate();
- const { loading, error, data, refetch } = useQuery(GET_JOB_BY_PK, {
- variables: { id: selected },
- skip: !selected,
- fetchPolicy: "network-only",
- nextFetchPolicy: "network-only",
- });
-
- const { t } = useTranslation();
- const handleDrawerClose = () => {
- delete searchParams.selected;
- history({
- search: queryString.stringify({
- ...searchParams,
- }),
+ const searchParams = queryString.parse(useLocation().search);
+ const {selected} = searchParams;
+ const history = useNavigate();
+ const {loading, error, data, refetch} = useQuery(GET_JOB_BY_PK, {
+ variables: {id: selected},
+ skip: !selected,
+ fetchPolicy: "network-only",
+ nextFetchPolicy: "network-only",
});
- };
- return (
-
- {loading ? : null}
- {error ? : null}
- {data ? (
- window.history.back()}
- title={data.jobs_by_pk.ro_number || t("general.labels.na")}
- extra={
-
- }
+ const {t} = useTranslation();
+ const handleDrawerClose = () => {
+ delete searchParams.selected;
+ history({
+ search: queryString.stringify({
+ ...searchParams,
+ }),
+ });
+ };
+
+ return (
+
-
-
-
-
-
-
-
- {bodyshop.uselocalmediaserver ? (
-
- ) : (
-
- )}
-
-
-
-
-
-
- ) : null}
-
- );
+ {loading ?
: null}
+ {error ?
: null}
+ {data ? (
+
window.history.back()}
+ title={data.jobs_by_pk.ro_number || t("general.labels.na")}
+ extra={
+
+ }
+ >
+
+
+
+ ),
+ },
+ {
+ key: "documents",
+ tab: t("jobs.labels.documents"),
+ children: bodyshop.uselocalmediaserver ? (
+
+ ) : (
+
+ ),
+ },
+ {
+ key: "notes",
+ tab: t("jobs.labels.notes"),
+ children: ,
+ },
+ ]}
+ />
+
+ ) : null}
+
+ );
}
+
export default connect(
- mapStateToProps,
- mapDispatchToProps
+ mapStateToProps,
+ mapDispatchToProps
)(TechLookupJobsDrawer);
diff --git a/client/src/components/tech-sider/tech-sider.component.jsx b/client/src/components/tech-sider/tech-sider.component.jsx
index c6ea4f67f..aa0616d72 100644
--- a/client/src/components/tech-sider/tech-sider.component.jsx
+++ b/client/src/components/tech-sider/tech-sider.component.jsx
@@ -40,50 +40,60 @@ export function TechSider({ technician, techLogout }) {
collapsed={collapsed}
onCollapse={onCollapse}
>
-
+
+ items={navChildren}
+ />
diff --git a/client/src/pages/contract-detail/contract-detail.page.component.jsx b/client/src/pages/contract-detail/contract-detail.page.component.jsx
index 33514f295..8fb392549 100644
--- a/client/src/pages/contract-detail/contract-detail.page.component.jsx
+++ b/client/src/pages/contract-detail/contract-detail.page.component.jsx
@@ -77,58 +77,33 @@ export function ContractDetailPage({