Progress
This commit is contained in:
@@ -14,29 +14,29 @@ import UpdateAlert from "../../components/update-alert/update-alert.component";
|
||||
import { selectTechnician } from "../../redux/tech/tech.selectors";
|
||||
import "./tech.page.styles.scss";
|
||||
const TimeTicketModalContainer = lazy(() =>
|
||||
import("../../components/time-ticket-modal/time-ticket-modal.container")
|
||||
import("../../components/time-ticket-modal/time-ticket-modal.container")
|
||||
);
|
||||
const EmailOverlayContainer = lazy(() =>
|
||||
import("../../components/email-overlay/email-overlay.container.jsx")
|
||||
import("../../components/email-overlay/email-overlay.container.jsx")
|
||||
);
|
||||
const PrintCenterModalContainer = lazy(() =>
|
||||
import("../../components/print-center-modal/print-center-modal.container")
|
||||
import("../../components/print-center-modal/print-center-modal.container")
|
||||
);
|
||||
const TechLogin = lazy(() =>
|
||||
import("../../components/tech-login/tech-login.component")
|
||||
import("../../components/tech-login/tech-login.component")
|
||||
);
|
||||
const TechLookup = lazy(() => import("../tech-lookup/tech-lookup.container"));
|
||||
const ProductionListPage = lazy(() =>
|
||||
import("../production-list/production-list.container")
|
||||
import("../production-list/production-list.container")
|
||||
);
|
||||
const ProductionBoardPage = lazy(() =>
|
||||
import("../production-board/production-board.container")
|
||||
import("../production-board/production-board.container")
|
||||
);
|
||||
const TechJobClock = lazy(() =>
|
||||
import("../tech-job-clock/tech-job-clock.component")
|
||||
import("../tech-job-clock/tech-job-clock.component")
|
||||
);
|
||||
const TechShiftClock = lazy(() =>
|
||||
import("../tech-shift-clock/tech-shift-clock.component")
|
||||
import("../tech-shift-clock/tech-shift-clock.component")
|
||||
);
|
||||
|
||||
const { Content } = Layout;
|
||||
@@ -56,66 +56,41 @@ export function TechPage({ technician, match }) {
|
||||
document.title = t("titles.app");
|
||||
}, [t]);
|
||||
|
||||
if (!technician) return navigate(`${match.path}/login`
|
||||
);
|
||||
return (
|
||||
<Layout className="tech-layout-container">
|
||||
<TechSider />
|
||||
<Layout>
|
||||
<UpdateAlert />
|
||||
<TechHeader />
|
||||
<Layout className="tech-layout-container">
|
||||
<TechSider />
|
||||
<Layout>
|
||||
{technician ? null : navigate(`${match.path}/login`)}
|
||||
<UpdateAlert />
|
||||
<TechHeader />
|
||||
|
||||
<Content className="tech-content-container">
|
||||
<ErrorBoundary>
|
||||
<Suspense
|
||||
fallback={
|
||||
<LoadingSpinner message={t("general.labels.loadingapp")} />
|
||||
}
|
||||
>
|
||||
<FeatureWrapper featureName="tech-console">
|
||||
<TimeTicketModalContainer />
|
||||
<EmailOverlayContainer />
|
||||
<PrintCenterModalContainer />
|
||||
<Routes>
|
||||
<Route
|
||||
exact
|
||||
path={`${match.path}/login`}
|
||||
component={TechLogin}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
path={`${match.path}/joblookup`}
|
||||
component={TechLookup}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
path={`${match.path}/list`}
|
||||
component={ProductionListPage}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
path={`${match.path}/jobclock`}
|
||||
component={TechJobClock}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
path={`${match.path}/shiftclock`}
|
||||
component={TechShiftClock}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
path={`${match.path}/board`}
|
||||
component={ProductionBoardPage}
|
||||
/>
|
||||
</Routes>
|
||||
</FeatureWrapper>
|
||||
</Suspense>
|
||||
</ErrorBoundary>
|
||||
<Content className="tech-content-container">
|
||||
<ErrorBoundary>
|
||||
<Suspense
|
||||
fallback={
|
||||
<LoadingSpinner message={t("general.labels.loadingapp")} />
|
||||
}
|
||||
>
|
||||
<FeatureWrapper featureName="tech-console">
|
||||
<TimeTicketModalContainer />
|
||||
<EmailOverlayContainer />
|
||||
<PrintCenterModalContainer />
|
||||
<Routes>
|
||||
<Route path={`${match.path}/login`} element={<TechLogin />} />
|
||||
<Route path={`${match.path}/joblookup`} element={<TechLookup />} />
|
||||
<Route path={`${match.path}/list`} element={<ProductionListPage />} />
|
||||
<Route path={`${match.path}/jobclock`} element={<TechJobClock />} />
|
||||
<Route path={`${match.path}/shiftclock`} element={<TechShiftClock />} />
|
||||
<Route path={`${match.path}/board`} element={<ProductionBoardPage />} />
|
||||
</Routes>
|
||||
</FeatureWrapper>
|
||||
</Suspense>
|
||||
</ErrorBoundary>
|
||||
|
||||
<BackTop />
|
||||
</Content>
|
||||
<BackTop />
|
||||
</Content>
|
||||
</Layout>
|
||||
</Layout>
|
||||
</Layout>
|
||||
);
|
||||
}
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(TechPage);
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(TechPage);
|
||||
Reference in New Issue
Block a user