diff --git a/src/renderer/App.tsx b/src/renderer/App.tsx index 90a7f4d8..96382f7a 100644 --- a/src/renderer/App.tsx +++ b/src/renderer/App.tsx @@ -1,17 +1,16 @@ -import { useEffect, useState } from 'react'; -import { useDispatch, useSelector } from "react-redux"; -import { IntlProvider } from 'react-intl'; -import { loadLocaleData } from '@/translations'; -import "@/App.css"; -import { AppNavigator } from "@/routes"; -import { setLocale } from '@/store/slices/app'; -import { IndeterminateProgressOverlay } from '@/components'; +import {useEffect, useState} from 'react'; +import {useDispatch, useSelector} from 'react-redux'; +import {IntlProvider} from 'react-intl'; +import {loadLocaleData} from '@/translations'; +import '@/App.css'; +import {AppNavigator} from '@/routes'; +import {setLocale} from '@/store/slices/app'; +import {IndeterminateProgressOverlay} from '@/components'; /** * @returns app react component to be rendered by electron as the UI */ function App() { - const dispatch = useDispatch(); const appStore = useSelector((state: any) => state.app); const [translationTokens, setTranslationTokens] = useState(); @@ -33,16 +32,16 @@ function App() { } return ( -
- - - -
+
+ + + +
); } diff --git a/src/renderer/components/blocks/modals/ProjectModal.tsx b/src/renderer/components/blocks/modals/ProjectModal.tsx index 06b413a9..e6f1acbe 100644 --- a/src/renderer/components/blocks/modals/ProjectModal.tsx +++ b/src/renderer/components/blocks/modals/ProjectModal.tsx @@ -1,18 +1,18 @@ import React from 'react'; import { + CoBenefitForm, + EstimationForm, + IssuanceForm, Modal, - Tabs, ProjectForm, - IssuanceForm, ProjectLocationForm, - EstimationForm, - CoBenefitForm, - RelatedProjectForm, RatingForm, + RelatedProjectForm, Spinner, + Tabs, } from '@/components'; import { FormattedMessage } from 'react-intl'; -import { useGetProjectQuery, useGetPickListsQuery } from '@/api'; +import { useGetPickListsQuery, useGetProjectQuery } from '@/api'; interface ProjectModalProps { warehouseProjectId: string; @@ -33,76 +33,78 @@ const ProjectModal: React.FC = ({ warehouseProjectId, onClose - - {/* There is no per-tab deeplinking so we only need to put a spinned on the first */} - }> - {!isProjectLoading && !isPickListLoading && projectData ? ( - - ) : ( - - )} - - {projectData?.issuances?.length && ( - }> - +
+ + {/* There is no per-tab deeplinking so we only need to put a spinned on the first */} + }> + {!isProjectLoading && !isPickListLoading && projectData ? ( + + ) : ( + + )} - )} - {projectData?.projectLocations?.length && ( - }> - - - )} - {projectData?.estimations?.length && ( - }> - - - )} - {projectData?.coBenefits?.length && ( - }> - - - )} - {projectData?.relatedProjects?.length && ( - }> - - - )} - {(projectData?.projectRatings?.length || projectData?.labels?.length) && ( - }> - - - )} - + {projectData?.issuances?.length && ( + }> + + + )} + {projectData?.projectLocations?.length && ( + }> + + + )} + {projectData?.estimations?.length && ( + }> + + + )} + {projectData?.coBenefits?.length && ( + }> + + + )} + {projectData?.relatedProjects?.length && ( + }> + + + )} + {(projectData?.projectRatings?.length || projectData?.labels?.length) && ( + }> + + + )} + +
); diff --git a/src/renderer/components/blocks/modals/StagingDiffModal.tsx b/src/renderer/components/blocks/modals/StagingDiffModal.tsx index 5adf29ad..0867ed29 100644 --- a/src/renderer/components/blocks/modals/StagingDiffModal.tsx +++ b/src/renderer/components/blocks/modals/StagingDiffModal.tsx @@ -27,7 +27,9 @@ const StagingDiffModal: React.FC = ({ stagingUuid, onClose }: - {isLoading ?

loading...

: }
+ +
{isLoading ?

loading...

: }
+
); }; diff --git a/src/renderer/components/blocks/modals/UnitModal.tsx b/src/renderer/components/blocks/modals/UnitModal.tsx index 5d37c54f..4e96a1ca 100644 --- a/src/renderer/components/blocks/modals/UnitModal.tsx +++ b/src/renderer/components/blocks/modals/UnitModal.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import { Modal, Tabs, UnitForm, IssuanceForm, LabelForm, Spinner } from '@/components'; +import { IssuanceForm, LabelForm, Modal, Spinner, Tabs, UnitForm } from '@/components'; import { FormattedMessage } from 'react-intl'; -import { useGetUnitQuery, useGetPickListsQuery } from '@/api'; +import { useGetPickListsQuery, useGetUnitQuery } from '@/api'; interface UnitModalProps { warehouseUnitId: string; @@ -22,41 +22,43 @@ const UnitModal: React.FC = ({ warehouseUnitId, onClose }: UnitM - - {/* There is no per-tab deeplinking so we only need to put a spinned on the first */} - }> - {!unitLoading && !isPickListLoading && unitData ? ( - - ) : ( - - )} - - {unitData?.issuance && ( - }> - - - )} - {unitData?.labels?.length && ( - }> - +
+ + {/* There is no per-tab deeplinking so we only need to put a spinned on the first */} + }> + {!unitLoading && !isPickListLoading && unitData ? ( + + ) : ( + + )} - )} - + {unitData?.issuance && ( + }> + + + )} + {unitData?.labels?.length && ( + }> + + + )} + +
); diff --git a/src/renderer/components/blocks/modals/UpsertProjectModal.tsx b/src/renderer/components/blocks/modals/UpsertProjectModal.tsx index e91d1b5f..3b0b5e8a 100644 --- a/src/renderer/components/blocks/modals/UpsertProjectModal.tsx +++ b/src/renderer/components/blocks/modals/UpsertProjectModal.tsx @@ -37,7 +37,9 @@ const UpsertProjectModal: React.FC = ({ onClose }: UpsertModal -

the project form goes here {projectData?.warehouseProjectId}

+
+

the project form goes here {projectData?.warehouseProjectId}

+
); diff --git a/src/renderer/components/blocks/modals/UpsertUnitModal.tsx b/src/renderer/components/blocks/modals/UpsertUnitModal.tsx index ebe6bb46..0ed43688 100644 --- a/src/renderer/components/blocks/modals/UpsertUnitModal.tsx +++ b/src/renderer/components/blocks/modals/UpsertUnitModal.tsx @@ -37,7 +37,9 @@ const UpsertUnitModal: React.FC = ({ onClose }: UpsertModalPro -

the unit form goes here {unitData?.warehouseUnitId}

+
+

the unit form goes here {unitData?.warehouseUnitId}

+
); diff --git a/src/renderer/components/blocks/tables/ProjectsListTable.tsx b/src/renderer/components/blocks/tables/ProjectsListTable.tsx index 0371a47e..7ca5241c 100644 --- a/src/renderer/components/blocks/tables/ProjectsListTable.tsx +++ b/src/renderer/components/blocks/tables/ProjectsListTable.tsx @@ -1,7 +1,7 @@ import React, { useMemo } from 'react'; import { FormattedMessage } from 'react-intl'; import { DebouncedFunc } from 'lodash'; -import { DataTable, PageCounter, Pagination, ProjectAndUnitActions } from '@/components'; +import {DataTable, PageCounter, Pagination, ProjectAndUnitActions, Tooltip} from '@/components'; import { Project } from '@/schemas/Project.schema'; import { Badge } from 'flowbite-react'; @@ -50,8 +50,10 @@ const ProjectsListTable: React.FC = ({ title: , key: 'projectId', render: (row: Project) => ( -
-
{row.projectId}
+
+ +
{row.projectId}
+
), },