diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 2eeeb95e6..fc6b37796 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -114,7 +114,7 @@ function RedirectToSection() { return } if (isOnlyProjectsUser) { - return + return } return } @@ -281,156 +281,156 @@ export default function App() { */} - {/* + {/* - + */} - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/frontend/src/app/annual-project-report/[year]/mlfs/workspace/page.tsx b/frontend/src/app/annual-project-report/[year]/mlfs/workspace/page.tsx index 71b4578d4..e712439fe 100644 --- a/frontend/src/app/annual-project-report/[year]/mlfs/workspace/page.tsx +++ b/frontend/src/app/annual-project-report/[year]/mlfs/workspace/page.tsx @@ -360,7 +360,7 @@ export default function APRMLFSWorkspace() { return ( {/* "~" means absolute, outside the nested context */} - + {`Secretariat - Annual Project Report Workspace`} diff --git a/frontend/src/app/annual-project-report/[year]/workspace/page.tsx b/frontend/src/app/annual-project-report/[year]/workspace/page.tsx index 5400dc727..40ac87d0f 100644 --- a/frontend/src/app/annual-project-report/[year]/workspace/page.tsx +++ b/frontend/src/app/annual-project-report/[year]/workspace/page.tsx @@ -95,7 +95,7 @@ export default function APRWorkspace() { return ( {/* "~" means absolute, outside the nested context */} - + {`Annual Progress Report workspace`} diff --git a/frontend/src/app/projects_listing/[project_id]/approval/page.tsx b/frontend/src/app/projects_listing/[project_id]/approval/page.tsx index 48ad7776e..44d742b76 100644 --- a/frontend/src/app/projects_listing/[project_id]/approval/page.tsx +++ b/frontend/src/app/projects_listing/[project_id]/approval/page.tsx @@ -14,7 +14,7 @@ export default function ProjectsApprovalUpdatePage() { const { canApproveProjects } = useContext(PermissionsContext) if (!canApproveProjects) { - return + return } return ( diff --git a/frontend/src/app/projects_listing/[project_id]/archive/page.tsx b/frontend/src/app/projects_listing/[project_id]/archive/page.tsx index 1eb454c03..f067c78e4 100644 --- a/frontend/src/app/projects_listing/[project_id]/archive/page.tsx +++ b/frontend/src/app/projects_listing/[project_id]/archive/page.tsx @@ -14,7 +14,7 @@ export default function Project() { const { canViewProjects } = useContext(PermissionsContext) if (!canViewProjects) { - return + return } return ( diff --git a/frontend/src/app/projects_listing/[project_id]/compare-versions/page.tsx b/frontend/src/app/projects_listing/[project_id]/compare-versions/page.tsx index b5f218074..d8e42f18f 100644 --- a/frontend/src/app/projects_listing/[project_id]/compare-versions/page.tsx +++ b/frontend/src/app/projects_listing/[project_id]/compare-versions/page.tsx @@ -14,7 +14,7 @@ export default function SubmitProject() { const { canViewProjects } = useContext(PermissionsContext) if (!canViewProjects) { - return + return } return ( diff --git a/frontend/src/app/projects_listing/[project_id]/edit/page.tsx b/frontend/src/app/projects_listing/[project_id]/edit/page.tsx index bd4044d32..37684f8f6 100644 --- a/frontend/src/app/projects_listing/[project_id]/edit/page.tsx +++ b/frontend/src/app/projects_listing/[project_id]/edit/page.tsx @@ -26,7 +26,7 @@ export default function EditProject({ mode }: { mode: string }) { (mode === 'edit' && !canEditProjects) || (mode !== 'edit' && !canUpdateProjects) ) { - return + return } return ( diff --git a/frontend/src/app/projects_listing/[project_id]/page.tsx b/frontend/src/app/projects_listing/[project_id]/page.tsx index 66c5a6027..50a041006 100644 --- a/frontend/src/app/projects_listing/[project_id]/page.tsx +++ b/frontend/src/app/projects_listing/[project_id]/page.tsx @@ -15,7 +15,7 @@ export default function Project() { const { canViewProjects } = useContext(PermissionsContext) if (!canViewProjects) { - return + return } return ( diff --git a/frontend/src/app/projects_listing/[project_id]/post-excom-update/page.tsx b/frontend/src/app/projects_listing/[project_id]/post-excom-update/page.tsx index d26112ea0..885efb9fc 100644 --- a/frontend/src/app/projects_listing/[project_id]/post-excom-update/page.tsx +++ b/frontend/src/app/projects_listing/[project_id]/post-excom-update/page.tsx @@ -14,7 +14,7 @@ export default function PostExComUpdateProject() { const { canUpdatePostExcom } = useContext(PermissionsContext) if (!canUpdatePostExcom) { - return + return } return ( diff --git a/frontend/src/app/projects_listing/[project_id]/recommend/page.tsx b/frontend/src/app/projects_listing/[project_id]/recommend/page.tsx index ab0f89d33..21943d186 100644 --- a/frontend/src/app/projects_listing/[project_id]/recommend/page.tsx +++ b/frontend/src/app/projects_listing/[project_id]/recommend/page.tsx @@ -15,7 +15,7 @@ export default function RecommendProject() { useContext(PermissionsContext) if (!canViewProjects || !canRecommendProjects) { - return + return } return ( diff --git a/frontend/src/app/projects_listing/[project_id]/submit/page.tsx b/frontend/src/app/projects_listing/[project_id]/submit/page.tsx index 3cdb40b4e..5dc3d3840 100644 --- a/frontend/src/app/projects_listing/[project_id]/submit/page.tsx +++ b/frontend/src/app/projects_listing/[project_id]/submit/page.tsx @@ -14,7 +14,7 @@ export default function SubmitProject() { const { canViewProjects, canSubmitProjects } = useContext(PermissionsContext) if (!canViewProjects || !canSubmitProjects) { - return + return } return ( diff --git a/frontend/src/app/projects_listing/approval-summary/page.tsx b/frontend/src/app/projects_listing/approval-summary/page.tsx index 8bc2b5115..8766e3ce5 100644 --- a/frontend/src/app/projects_listing/approval-summary/page.tsx +++ b/frontend/src/app/projects_listing/approval-summary/page.tsx @@ -18,7 +18,7 @@ export default function Projects() { const { canApproveProjects } = useContext(PermissionsContext) if (!canApproveProjects) { - return + return } return ( diff --git a/frontend/src/app/projects_listing/associate/page.tsx b/frontend/src/app/projects_listing/associate/page.tsx index 4fd735fbb..bcf0d0506 100644 --- a/frontend/src/app/projects_listing/associate/page.tsx +++ b/frontend/src/app/projects_listing/associate/page.tsx @@ -15,7 +15,7 @@ export default function ProjectsAssociationPage() { useContext(PermissionsContext) if (!canViewProjects || !canAssociateProjects) { - return + return } return ( diff --git a/frontend/src/app/projects_listing/blanket-approval-details/page.tsx b/frontend/src/app/projects_listing/blanket-approval-details/page.tsx index 8334ca7ae..2e7ee0b9a 100644 --- a/frontend/src/app/projects_listing/blanket-approval-details/page.tsx +++ b/frontend/src/app/projects_listing/blanket-approval-details/page.tsx @@ -18,7 +18,7 @@ export default function Projects() { const { canViewProjects } = useContext(PermissionsContext) if (!canViewProjects) { - return + return } return ( diff --git a/frontend/src/app/projects_listing/create/page.tsx b/frontend/src/app/projects_listing/create/page.tsx index 7ded988a4..7b0253986 100644 --- a/frontend/src/app/projects_listing/create/page.tsx +++ b/frontend/src/app/projects_listing/create/page.tsx @@ -12,7 +12,7 @@ export default function CreateProject() { const { canUpdateProjects } = useContext(PermissionsContext) if (!canUpdateProjects) { - return + return } return ( diff --git a/frontend/src/app/projects_listing/export/[export_type]/page.tsx b/frontend/src/app/projects_listing/export/[export_type]/page.tsx index 03c7f8198..c53e2ee5f 100644 --- a/frontend/src/app/projects_listing/export/[export_type]/page.tsx +++ b/frontend/src/app/projects_listing/export/[export_type]/page.tsx @@ -26,7 +26,7 @@ export default function Projects() { const { canViewProjects } = useContext(PermissionsContext) if (!canViewProjects || !['mya', 'all'].includes(export_type)) { - return + return } return ( diff --git a/frontend/src/app/projects_listing/settings/page.tsx b/frontend/src/app/projects_listing/settings/page.tsx index 325a3b4ac..3baa8479c 100644 --- a/frontend/src/app/projects_listing/settings/page.tsx +++ b/frontend/src/app/projects_listing/settings/page.tsx @@ -16,7 +16,7 @@ export default function ProjectsSettingsWrapper() { const { canSetProjectSettings } = useContext(PermissionsContext) if (!canSetProjectSettings) { - return + return } const { data, setParams } = useGetProjectSettings() diff --git a/frontend/src/app/projects_listing/summary-of-projects/page.tsx b/frontend/src/app/projects_listing/summary-of-projects/page.tsx index fe53446f2..bdb9a8cfa 100644 --- a/frontend/src/app/projects_listing/summary-of-projects/page.tsx +++ b/frontend/src/app/projects_listing/summary-of-projects/page.tsx @@ -18,7 +18,7 @@ export default function Projects() { const { canApproveProjects } = useContext(PermissionsContext) if (!canApproveProjects) { - return + return } return ( diff --git a/frontend/src/app/projects_listing/update-mya-data/page.tsx b/frontend/src/app/projects_listing/update-mya-data/page.tsx index 44d94e709..3bf2226c7 100644 --- a/frontend/src/app/projects_listing/update-mya-data/page.tsx +++ b/frontend/src/app/projects_listing/update-mya-data/page.tsx @@ -25,7 +25,7 @@ export default function ProjectsUpdateMyaDataPage() { {!!metaproject_id && ( )} diff --git a/frontend/src/components/manage/Blocks/ProjectSubmissions/schema.tsx b/frontend/src/components/manage/Blocks/ProjectSubmissions/schema.tsx index aa3c3acbc..3f18da991 100644 --- a/frontend/src/components/manage/Blocks/ProjectSubmissions/schema.tsx +++ b/frontend/src/components/manage/Blocks/ProjectSubmissions/schema.tsx @@ -41,7 +41,7 @@ export function usePSListingGridOptions() { return ( {props.value} @@ -224,7 +224,9 @@ export function usePSListingGridOptions() { }, }, cellRenderer: (props: any) => { - const subsectorNames = props.data.subsectors?.map((s: ProjectSubSectorType) => s.name).join(",") + const subsectorNames = props.data.subsectors + ?.map((s: ProjectSubSectorType) => s.name) + .join(',') return }, field: 'subsectors', diff --git a/frontend/src/components/manage/Blocks/Projects/schema.tsx b/frontend/src/components/manage/Blocks/Projects/schema.tsx index 3c2d5ffa2..449141557 100644 --- a/frontend/src/components/manage/Blocks/Projects/schema.tsx +++ b/frontend/src/components/manage/Blocks/Projects/schema.tsx @@ -47,7 +47,7 @@ export function usePListingGridOptions() { return ( {props.value} @@ -230,7 +230,9 @@ export function usePListingGridOptions() { }, }, cellRenderer: (props: any) => { - const subsectorNames = props.data.subsectors?.map((s: ProjectSubSectorType) => s.name).join(",") + const subsectorNames = props.data.subsectors + ?.map((s: ProjectSubSectorType) => s.name) + .join(',') return }, field: 'subsectors', @@ -346,11 +348,11 @@ export function usePListingGridOptions() { style={ status ? { - backgroundColor: status.color, - color: getContrastText({ - background: status.color, - }), - } + backgroundColor: status.color, + color: getContrastText({ + background: status.color, + }), + } : {} } > diff --git a/frontend/src/components/manage/Blocks/ProjectsListing/ApprovalSummary/ApprovalSummary.tsx b/frontend/src/components/manage/Blocks/ProjectsListing/ApprovalSummary/ApprovalSummary.tsx index 25d73b4e4..6a8d11c3e 100644 --- a/frontend/src/components/manage/Blocks/ProjectsListing/ApprovalSummary/ApprovalSummary.tsx +++ b/frontend/src/components/manage/Blocks/ProjectsListing/ApprovalSummary/ApprovalSummary.tsx @@ -45,7 +45,7 @@ const ApprovalSummaryPreviewTable = (props: { return ( {params.data?.code} diff --git a/frontend/src/components/manage/Blocks/ProjectsListing/Enterprises/create/EnterpriseCreateActionButtons.tsx b/frontend/src/components/manage/Blocks/ProjectsListing/Enterprises/create/EnterpriseCreateActionButtons.tsx index bfeef8412..be6306018 100644 --- a/frontend/src/components/manage/Blocks/ProjectsListing/Enterprises/create/EnterpriseCreateActionButtons.tsx +++ b/frontend/src/components/manage/Blocks/ProjectsListing/Enterprises/create/EnterpriseCreateActionButtons.tsx @@ -32,7 +32,7 @@ const EnterpriseCreateActionButtons = ({ }) setEnterpriseId(result.id) - setLocation(`/projects-listing/enterprises/${result.id}/edit`) + setLocation(`/projects/enterprises/${result.id}/edit`) } catch (error) { await handleErrors(error, setEnterpriseId, setErrors, setOtherErrors) } finally { @@ -43,7 +43,7 @@ const EnterpriseCreateActionButtons = ({ return ( - + {canEditEnterprise && ( { const nonFieldsErrors = errors?.['non_field_errors'] || [] if (!canEditEnterprise) { - return + return } return ( @@ -50,7 +50,7 @@ const EnterpriseCreateWrapper = () => { /> { /> Could not change enterprise status. Please try again.>, @@ -111,7 +111,7 @@ const EnterpriseEditActionButtons = ({ return ( <> - + {canEditEnterprise && !isObsolete && ( { const { data, loading, error } = enterprise if (!canViewEnterprises) { - return + return } if ( @@ -26,7 +26,7 @@ const EnterpriseEditWrapper = () => { data?.status === 'Obsolete' || error ) { - return + return } return ( diff --git a/frontend/src/components/manage/Blocks/ProjectsListing/Enterprises/listing/EnterprisesWrapper.tsx b/frontend/src/components/manage/Blocks/ProjectsListing/Enterprises/listing/EnterprisesWrapper.tsx index dba048e89..8983f3296 100644 --- a/frontend/src/components/manage/Blocks/ProjectsListing/Enterprises/listing/EnterprisesWrapper.tsx +++ b/frontend/src/components/manage/Blocks/ProjectsListing/Enterprises/listing/EnterprisesWrapper.tsx @@ -30,7 +30,7 @@ export default function EnterprisesWrapper() { const { loading, setParams } = enterprises if (!canViewEnterprises) { - return + return } return ( @@ -53,7 +53,7 @@ export default function EnterprisesWrapper() { diff --git a/frontend/src/components/manage/Blocks/ProjectsListing/Enterprises/listing/schema.tsx b/frontend/src/components/manage/Blocks/ProjectsListing/Enterprises/listing/schema.tsx index d55c5e635..f2ff18ecb 100644 --- a/frontend/src/components/manage/Blocks/ProjectsListing/Enterprises/listing/schema.tsx +++ b/frontend/src/components/manage/Blocks/ProjectsListing/Enterprises/listing/schema.tsx @@ -43,13 +43,13 @@ const getColumnDefs = (setIdToDelete?: (idToDelete: number | null) => void) => { const getViewUrl = (enterpriseId: number) => isEnterprise - ? `/projects-listing/enterprises/${enterpriseId}` - : `/projects-listing/projects-enterprises/${project_id}/view/${enterpriseId}` + ? `/projects/enterprises/${enterpriseId}` + : `/projects/projects-enterprises/${project_id}/view/${enterpriseId}` const getEditUrl = (enterpriseId: number) => isEnterprise - ? `/projects-listing/enterprises/${enterpriseId}/edit` - : `/projects-listing/projects-enterprises/${project_id}/edit/${enterpriseId}` + ? `/projects/enterprises/${enterpriseId}/edit` + : `/projects/projects-enterprises/${project_id}/edit/${enterpriseId}` const getFieldValue = ( params: ValueGetterParams | ITooltipParams, diff --git a/frontend/src/components/manage/Blocks/ProjectsListing/Enterprises/view/EnterpriseWrapper.tsx b/frontend/src/components/manage/Blocks/ProjectsListing/Enterprises/view/EnterpriseWrapper.tsx index e89400784..647cc2c2e 100644 --- a/frontend/src/components/manage/Blocks/ProjectsListing/Enterprises/view/EnterpriseWrapper.tsx +++ b/frontend/src/components/manage/Blocks/ProjectsListing/Enterprises/view/EnterpriseWrapper.tsx @@ -24,11 +24,11 @@ const EnterpriseWrapper = () => { const { data, loading, error } = enterprise if (!canViewEnterprises) { - return + return } if (error) { - return + return } return ( @@ -51,14 +51,11 @@ const EnterpriseWrapper = () => { - + {(canEditEnterprise || canApproveEnterprise) && data.status !== 'Obsolete' && ( ( - + IA/BA Portal @@ -325,7 +325,7 @@ export const RelatedProjects = ({ '!text-[#801F00]': hasErrors, }, )} - href={`/projects-listing/${entry.id}${['edit', 'tranches'].includes(mode) ? '/edit' : ''}`} + href={`/projects/${entry.id}${['edit', 'tranches'].includes(mode) ? '/edit' : ''}`} target="_blank" rel="noopener noreferrer nofollow" onClick={(e: React.SyntheticEvent) => e.stopPropagation()} diff --git a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectSubmission/AddComponentModal.tsx b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectSubmission/AddComponentModal.tsx index 993e0eff4..5ff66cfbb 100644 --- a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectSubmission/AddComponentModal.tsx +++ b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectSubmission/AddComponentModal.tsx @@ -26,7 +26,7 @@ const AddComponentModal = ({ className="no-underline" target="_blank" rel="noopener noreferrer nofollow" - href={`/projects-listing/create/${id}/full-copy/additional-component`} + href={`/projects/create/${id}/full-copy/additional-component`} > setIsModalOpen(false)}> Copy of project @@ -38,7 +38,7 @@ const AddComponentModal = ({ className="no-underline" target="_blank" rel="noopener noreferrer nofollow" - href={`/projects-listing/create/${id}/partial-copy/additional-component`} + href={`/projects/create/${id}/partial-copy/additional-component`} > setIsModalOpen(false)}> Blank submission diff --git a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectSubmission/CancelWarningModal.tsx b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectSubmission/CancelWarningModal.tsx index 8822c9dab..8ef026e99 100644 --- a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectSubmission/CancelWarningModal.tsx +++ b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectSubmission/CancelWarningModal.tsx @@ -20,7 +20,7 @@ const CancelWarningModal = ({ const onContinue = () => { clearUpdatedFields() - setLocation(url ?? '/projects-listing/listing') + setLocation(url ?? '/projects/listing') setIsModalOpen(false) } diff --git a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectSubmission/ChangeVersionModal.tsx b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectSubmission/ChangeVersionModal.tsx index 76d143ec8..420ff2845 100644 --- a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectSubmission/ChangeVersionModal.tsx +++ b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectSubmission/ChangeVersionModal.tsx @@ -50,7 +50,7 @@ const ChangeVersionModal = ({ if (editProject) { editProject(mode) } else { - setLocation(`/projects-listing/${id}/${mode}`) + setLocation(`/projects/${id}/${mode}`) } setIsModalOpen(false) } diff --git a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectSubmission/CreateActionButtons.tsx b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectSubmission/CreateActionButtons.tsx index 88aaa0192..8cb2264d6 100644 --- a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectSubmission/CreateActionButtons.tsx +++ b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectSubmission/CreateActionButtons.tsx @@ -45,7 +45,7 @@ const CreateActionButtons = ({ if (updatedFields.size > 0) { setIsCancelModalOpen(true) } else { - setLocation('/projects-listing/listing') + setLocation('/projects/listing') } } @@ -97,7 +97,7 @@ const CreateActionButtons = ({ ) } clearUpdatedFields() - setLocation(`/projects-listing/${result.id}/edit`) + setLocation(`/projects/${result.id}/edit`) } catch (error) { const errors = await error.json() diff --git a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectSubmission/EditActionButtons.tsx b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectSubmission/EditActionButtons.tsx index 14e9837e6..1a799b82f 100644 --- a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectSubmission/EditActionButtons.tsx +++ b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectSubmission/EditActionButtons.tsx @@ -450,7 +450,7 @@ const EditActionButtons = ({ setProjectTitle(result.title) if (navigationPage) { - setLocation(`/projects-listing/${id}/${navigationPage}`) + setLocation(`/projects/${id}/${navigationPage}`) } if (isRecommended || isAfterApproval) { @@ -461,7 +461,7 @@ const EditActionButtons = ({ enqueueSnackbar(<>Post ExCom update was successful.>, { variant: 'success', }) - setLocation('/projects-listing/listing') + setLocation('/projects/listing') } clearUpdatedFields() @@ -487,7 +487,7 @@ const EditActionButtons = ({ if (updatedFields.size > 0) { setIsCancelModalOpen(true) } else { - setLocation('/projects-listing/listing') + setLocation('/projects/listing') } } @@ -515,7 +515,7 @@ const EditActionButtons = ({ await api(`api/projects/v2/${id}/send_back_to_draft/`, { method: 'POST', }) - setLocation(`/projects-listing/${id}`) + setLocation(`/projects/${id}`) enqueueSnackbar(<>Project(s) sent back to draft successfully.>, { variant: 'success', }) @@ -539,7 +539,7 @@ const EditActionButtons = ({ await api(`api/projects/v2/${id}/withdraw/`, { method: 'POST', }) - setLocation(`/projects-listing/${id}`) + setLocation(`/projects/${id}`) } catch (error) { enqueueSnackbar(<>Could not withdraw project. Please try again.>, { variant: 'error', @@ -587,7 +587,7 @@ const EditActionButtons = ({ await api(`api/projects/v2/${id}/${action}/`, { method: 'POST', }) - setLocation(`/projects-listing/${id}`) + setLocation(`/projects/${id}`) } catch (error) { enqueueSnackbar(<>An error occurred. Please try again.>, { variant: 'error', diff --git a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectSubmission/ProjectsHeader.tsx b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectSubmission/ProjectsHeader.tsx index 88e5b7c58..054dac9bc 100644 --- a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectSubmission/ProjectsHeader.tsx +++ b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectSubmission/ProjectsHeader.tsx @@ -105,7 +105,7 @@ const ProjectsHeader = ({ if (updatedFields.size > 0) { setIsCancelModalOpen(true) } else { - setLocation('/projects-listing/listing') + setLocation('/projects/listing') } } diff --git a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectVersions/ProjectVersionsComponents.tsx b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectVersions/ProjectVersionsComponents.tsx index 447fc675a..ba53ad7ed 100644 --- a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectVersions/ProjectVersionsComponents.tsx +++ b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectVersions/ProjectVersionsComponents.tsx @@ -44,10 +44,7 @@ export const VersionsDropdown = ({ return { id: id, label: label, - url: - idx == 0 - ? `/projects-listing/${id}` - : `/projects-listing/${id}/archive/${version}`, + url: idx == 0 ? `/projects/${id}` : `/projects/${id}/archive/${version}`, } }) diff --git a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectView/ProjectViewWrapper.tsx b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectView/ProjectViewWrapper.tsx index 721712ee0..ff640825c 100644 --- a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectView/ProjectViewWrapper.tsx +++ b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectView/ProjectViewWrapper.tsx @@ -60,7 +60,7 @@ const ProjectViewWrapper = () => { }, [cluster_id, project_type_id, sector_id]) if (project?.error) { - return + return } if ( @@ -68,13 +68,11 @@ const ProjectViewWrapper = () => { latest_project && (!location.includes('archive') || paramsVersion != version) ) { - return ( - - ) + return } if (data && !latest_project && location.includes('archive')) { - return + return } return ( diff --git a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsAssociate/ProjectsAssociateConfirmation.tsx b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsAssociate/ProjectsAssociateConfirmation.tsx index 44d6a1dfd..467f45427 100644 --- a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsAssociate/ProjectsAssociateConfirmation.tsx +++ b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsAssociate/ProjectsAssociateConfirmation.tsx @@ -298,7 +298,7 @@ const ProjectsAssociateConfirmation = ({ variant: 'success', }, ) - setLocation('/projects-listing/listing') + setLocation('/projects/listing') } catch (error) { const errors = await error.json() diff --git a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsAssociate/ProjectsAssociateWrapper.tsx b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsAssociate/ProjectsAssociateWrapper.tsx index 2a84355ad..88c3a5544 100644 --- a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsAssociate/ProjectsAssociateWrapper.tsx +++ b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsAssociate/ProjectsAssociateWrapper.tsx @@ -17,7 +17,7 @@ const ProjectsAssociateWrapper = () => { (data && (!isNull(data.latest_project) || data.submission_status !== 'Approved')) ) { - return + return } return ( diff --git a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsCreate/ProjectsCreateWrapper.tsx b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsCreate/ProjectsCreateWrapper.tsx index bce43e6cc..548410923 100644 --- a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsCreate/ProjectsCreateWrapper.tsx +++ b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsCreate/ProjectsCreateWrapper.tsx @@ -191,7 +191,7 @@ const ProjectsCreateWrapper = () => { /> { !data.editable || data.submission_status !== 'Recommended')) ) { - return + return } return ( diff --git a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsEdit/ProjectsEdit.tsx b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsEdit/ProjectsEdit.tsx index bc3887293..fce9c3b8a 100644 --- a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsEdit/ProjectsEdit.tsx +++ b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsEdit/ProjectsEdit.tsx @@ -616,7 +616,7 @@ const ProjectsEdit = ({ /> { const { data, loading } = project if (project?.error) { - return + return } const isEditable = @@ -39,7 +39,7 @@ const ProjectsEditWrapper = ({ mode }: { mode: string }) => { (mode !== 'copy' && !isEditable) || (mode !== 'edit' && !canUpdateProjects)) ) { - return + return } return ( diff --git a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsEdit/ProjectsPostExComUpdateWrapper.tsx b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsEdit/ProjectsPostExComUpdateWrapper.tsx index ad98e08d4..9382fa0e6 100644 --- a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsEdit/ProjectsPostExComUpdateWrapper.tsx +++ b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsEdit/ProjectsPostExComUpdateWrapper.tsx @@ -18,7 +18,7 @@ const ProjectsPostExComUpdateWrapper = () => { (!isNull(data.latest_project) || !getIsUpdatablePostExcom(data.submission_status, data.status))) ) { - return + return } return ( diff --git a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsEnterprises/create/PEnterpriseCreateActionButtons.tsx b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsEnterprises/create/PEnterpriseCreateActionButtons.tsx index 545392991..e8ee16151 100644 --- a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsEnterprises/create/PEnterpriseCreateActionButtons.tsx +++ b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsEnterprises/create/PEnterpriseCreateActionButtons.tsx @@ -55,7 +55,7 @@ const PEnterpriseCreateActionButtons = ({ setEnterpriseId(result.id) setLocation( - `/projects-listing/projects-enterprises/${project_id}/edit/${result.id}`, + `/projects/projects-enterprises/${project_id}/edit/${result.id}`, ) } catch (error) { await handleErrors(error, setEnterpriseId, setErrors, setOtherErrors) @@ -69,7 +69,7 @@ const PEnterpriseCreateActionButtons = ({ {canEditProjectEnterprise && ( { !canEditProjectEnterprise || (project && (error || (data && data.submission_status !== 'Approved'))) ) { - return + return } return ( @@ -97,7 +97,7 @@ const PEnterpriseCreateWrapper = () => { /> {canEditProjectEnterprise && ( { (projectError || (projectData && projectData.submission_status !== 'Approved'))) ) { - return + return } if ( @@ -50,7 +50,7 @@ const PEnterpriseEditWrapper = () => { ) { return ( ) } diff --git a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsEnterprises/listing/PEnterprisesWrapper.tsx b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsEnterprises/listing/PEnterprisesWrapper.tsx index 03e888a82..a20e84274 100644 --- a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsEnterprises/listing/PEnterprisesWrapper.tsx +++ b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsEnterprises/listing/PEnterprisesWrapper.tsx @@ -45,7 +45,7 @@ export default function PEnterprisesWrapper() { !canEditProjectEnterprise || (project && (error || (data && data.submission_status !== 'Approved'))) ) { - return + return } return ( @@ -82,7 +82,7 @@ export default function PEnterprisesWrapper() { diff --git a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsEnterprises/view/PEnterpriseViewWrapper.tsx b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsEnterprises/view/PEnterpriseViewWrapper.tsx index 6af4185dd..939096483 100644 --- a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsEnterprises/view/PEnterpriseViewWrapper.tsx +++ b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsEnterprises/view/PEnterpriseViewWrapper.tsx @@ -40,13 +40,11 @@ const PEnterpriseViewWrapper = () => { (projectError || (projectData && projectData.submission_status !== 'Approved'))) ) { - return + return } if (error) { - return ( - - ) + return } return ( @@ -71,7 +69,7 @@ const PEnterpriseViewWrapper = () => { {(canEditProjectEnterprise || (canApproveProjectEnterprise && @@ -79,7 +77,7 @@ const PEnterpriseViewWrapper = () => { canEditProjectEnterprise))) && ( [ { title: 'MYA warehouse', - url: '/projects-listing/export/mya', + url: '/projects/export/mya', permissions: [canViewProjects], }, { title: 'Projects warehouse', - url: '/projects-listing/export/all', + url: '/projects/export/all', permissions: [canViewProjects], }, { title: 'Approval summary', - url: '/projects-listing/approval-summary', + url: '/projects/approval-summary', permissions: [isMlfsUser && canApproveProjects], }, { title: 'Summary of projects', - url: '/projects-listing/summary-of-projects', + url: '/projects/summary-of-projects', permissions: [isMlfsUser && canApproveProjects], }, { title: 'Blanket approval details', - url: '/projects-listing/blanket-approval-details', + url: '/projects/blanket-approval-details', permissions: [isMlfsUser && canViewProjects], }, { @@ -69,7 +69,7 @@ const GenerateDBMenu = ({ { title: 'Compare versions', url: projectData.projectId - ? `/projects-listing/${projectData.projectId}/compare-versions` + ? `/projects/${projectData.projectId}/compare-versions` : null, permissions: [canViewProjects], }, diff --git a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsListing/PListingWrapper.tsx b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsListing/PListingWrapper.tsx index 7ea4bcb28..a85c8db82 100644 --- a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsListing/PListingWrapper.tsx +++ b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsListing/PListingWrapper.tsx @@ -66,7 +66,7 @@ export default function PListingWrapper() { )} diff --git a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsListing/ProjectCard.tsx b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsListing/ProjectCard.tsx index a19e4b45a..d6a6cfc71 100644 --- a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsListing/ProjectCard.tsx +++ b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsListing/ProjectCard.tsx @@ -178,7 +178,7 @@ export default function ProjectCard({ @@ -186,7 +186,7 @@ export default function ProjectCard({ canEditProjects && ( diff --git a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsListing/ProjectViewButtons.tsx b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsListing/ProjectViewButtons.tsx index db254c460..76e23be4a 100644 --- a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsListing/ProjectViewButtons.tsx +++ b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsListing/ProjectViewButtons.tsx @@ -162,7 +162,7 @@ const ProjectViewButtons = ({ if (isProjectValid) { setIsSubmitModalOpen(true) } else { - setLocation(`/projects-listing/${id}/edit`) + setLocation(`/projects/${id}/edit`) } } } @@ -174,7 +174,7 @@ const ProjectViewButtons = ({ if (isProjectValid) { setIsRecommendModalOpen(true) } else { - setLocation(`/projects-listing/${id}/edit`) + setLocation(`/projects/${id}/edit`) } } @@ -242,7 +242,7 @@ const ProjectViewButtons = ({ {(editable || editable_for_actual_fields) && ( <> {canEditProjects && ( - Edit + Edit )} {canSubmitProjects && isDraft && ( Approval @@ -292,7 +292,7 @@ const ProjectViewButtons = ({ )} {canUpdatePostExcom && getIsUpdatablePostExcom(submission_status, project_status) ? ( - + Update post ExCom ) : null} diff --git a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsListing/schema.tsx b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsListing/schema.tsx index 7d567aef6..af1290701 100644 --- a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsListing/schema.tsx +++ b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsListing/schema.tsx @@ -101,7 +101,7 @@ const getColumnDefs = ( props.data.editable_for_actual_fields) ? ( @@ -183,7 +183,7 @@ const getColumnDefs = ( )} href={ canViewProjects && props.data.id - ? `/projects-listing/${props.data.id}` + ? `/projects/${props.data.id}` : null } > diff --git a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsVersionChange/ProjectsVersionChange.tsx b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsVersionChange/ProjectsVersionChange.tsx index 64242ad39..d7f957784 100644 --- a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsVersionChange/ProjectsVersionChange.tsx +++ b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsVersionChange/ProjectsVersionChange.tsx @@ -57,7 +57,7 @@ const ProjectsVersionChange = ({ const isValidStatus = mode === 'submit' ? isDraft : isSubmitted if (currentProject && !(isValidStatus && editable)) { - return + return } const hasErrors = find(associatedProjects, ({ errors }) => errors.length > 0) @@ -107,7 +107,7 @@ const ProjectsVersionChange = ({ @@ -166,12 +166,12 @@ const ProjectsVersionChange = ({ {isSaveSuccessful && ( - Projects listing + Projects )} diff --git a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsVersionChange/ProjectsVersionChangeWrapper.tsx b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsVersionChange/ProjectsVersionChangeWrapper.tsx index bd63b6591..65fb42637 100644 --- a/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsVersionChange/ProjectsVersionChangeWrapper.tsx +++ b/frontend/src/components/manage/Blocks/ProjectsListing/ProjectsVersionChange/ProjectsVersionChangeWrapper.tsx @@ -39,7 +39,7 @@ const ProjectsVersionChangeWrapper = ({ mode }: { mode: string }) => { }, []) if (loaded && isNull(associatedProjects)) { - return + return } return ( diff --git a/frontend/src/components/manage/Blocks/ProjectsListing/UpdateMyaData/UpdateMyaData.tsx b/frontend/src/components/manage/Blocks/ProjectsListing/UpdateMyaData/UpdateMyaData.tsx index d71c8d198..03d08adcb 100644 --- a/frontend/src/components/manage/Blocks/ProjectsListing/UpdateMyaData/UpdateMyaData.tsx +++ b/frontend/src/components/manage/Blocks/ProjectsListing/UpdateMyaData/UpdateMyaData.tsx @@ -98,7 +98,7 @@ export default function UpdateMyaData() { }, []) if (!(canViewProjects && canViewMetaProjects)) { - return + return } const columnDefs: GridOptions['columnDefs'] = [ diff --git a/frontend/src/components/manage/Blocks/ProjectsListing/utils.ts b/frontend/src/components/manage/Blocks/ProjectsListing/utils.ts index 0405a63f8..0b65ba948 100644 --- a/frontend/src/components/manage/Blocks/ProjectsListing/utils.ts +++ b/frontend/src/components/manage/Blocks/ProjectsListing/utils.ts @@ -844,13 +844,13 @@ export const getMenus = ( menuItems: [ { title: 'Update MYA data', - url: `/projects-listing/update-mya-data${projectId ? `/${projectMetaprojectId}` : ''}`, + url: `/projects/update-mya-data${projectId ? `/${projectMetaprojectId}` : ''}`, disabled: !canViewMetaProjects || (!!projectId && !projectMetaprojectId), }, { title: 'Update post ExCom fields', - url: `/projects-listing/${projectId}/post-excom-update`, + url: `/projects/${projectId}/post-excom-update`, disabled: !canUpdatePostExcom || !projectId || @@ -858,7 +858,7 @@ export const getMenus = ( }, { title: 'Update project enterprises', - url: `/projects-listing/projects-enterprises/${projectId}`, + url: `/projects/projects-enterprises/${projectId}`, disabled: !canEditProjectEnterprise || !projectId || @@ -866,7 +866,7 @@ export const getMenus = ( }, { title: 'Manage enterprises', - url: `/projects-listing/enterprises`, + url: `/projects/enterprises`, disabled: !canViewEnterprises, }, { diff --git a/frontend/src/components/manage/Blocks/Table/ProjectsTable/schema.tsx b/frontend/src/components/manage/Blocks/Table/ProjectsTable/schema.tsx index 27441d697..05e5497b6 100644 --- a/frontend/src/components/manage/Blocks/Table/ProjectsTable/schema.tsx +++ b/frontend/src/components/manage/Blocks/Table/ProjectsTable/schema.tsx @@ -56,7 +56,10 @@ export const columnSchema = [ {props.data.isSkeleton ? ( ) : ( - + View )} diff --git a/frontend/src/components/theme/Header/HeaderNavigation.tsx b/frontend/src/components/theme/Header/HeaderNavigation.tsx index da3bdb429..3d1faa81b 100644 --- a/frontend/src/components/theme/Header/HeaderNavigation.tsx +++ b/frontend/src/components/theme/Header/HeaderNavigation.tsx @@ -144,8 +144,8 @@ const useInternalNavSectionsIaBaPortal = () => { ...(canViewProjects ? [ { - label: 'Projects Listing', - url: '/projects-listing/listing', + label: 'Projects', + url: '/projects/listing', }, ] : []), @@ -153,12 +153,12 @@ const useInternalNavSectionsIaBaPortal = () => { ? [ { label: 'IA/BA portal settings', - url: '/projects-listing/settings', + url: '/projects/settings', }, ] : []), ], - url: '/projects-listing/listing', + url: '/projects/listing', }, ] // @ts-ignore