Fix found bugs during demo
This commit is contained in:
@@ -68,7 +68,6 @@ export function TechPage({ technician }) {
|
||||
<Layout>
|
||||
<UpdateAlert />
|
||||
<TechHeader />
|
||||
|
||||
<Content className="tech-content-container">
|
||||
<ErrorBoundary>
|
||||
<Suspense
|
||||
@@ -82,7 +81,7 @@ export function TechPage({ technician }) {
|
||||
<PrintCenterModalContainer />
|
||||
<Routes>
|
||||
<Route path='/login' element={<TechLogin />} />
|
||||
<Route path='/joblokup' element={<TechLookup />} />
|
||||
<Route path='/joblookup' element={<TechLookup />} />
|
||||
<Route path='/list' element={<ProductionListPage />} />
|
||||
<Route path='/jobclock' element={<TechJobClock />} />
|
||||
<Route path='/shiftclock' element={<TechShiftClock />} />
|
||||
@@ -91,7 +90,6 @@ export function TechPage({ technician }) {
|
||||
</FeatureWrapper>
|
||||
</Suspense>
|
||||
</ErrorBoundary>
|
||||
|
||||
<BackTop />
|
||||
</Content>
|
||||
</Layout>
|
||||
|
||||
@@ -25,10 +25,12 @@ export function TechPageContainer({ bodyshop, setBodyshop }) {
|
||||
nextFetchPolicy: "network-only",
|
||||
});
|
||||
const { t } = useTranslation();
|
||||
|
||||
useEffect(() => {
|
||||
if (data) setBodyshop(data.bodyshops[0]);
|
||||
}, [data, setBodyshop]);
|
||||
|
||||
|
||||
if (loading || !bodyshop)
|
||||
return <LoadingSpinner message={t("general.labels.loadingshop")} />;
|
||||
if (error) return <AlertComponent message={error.message} type="error" />;
|
||||
|
||||
Reference in New Issue
Block a user