generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: adjust seedlot details page (#1527)
Co-authored-by: Craig Yu <[email protected]> Co-authored-by: Ricardo Campos <[email protected]>
- Loading branch information
1 parent
8c04a32
commit 8da7e07
Showing
12 changed files
with
138 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import ROUTES from '../routes/constants'; | ||
import { addParamToPath } from './PathUtils'; | ||
import { MINISTRY_OF_FOREST_ID } from '../shared-constants/shared-constants'; | ||
|
||
export const getSeedlotBreadcrumbs = ( | ||
seedlotNumber: string, | ||
seedlotApplicant: string, | ||
isTscAdmin: boolean | ||
) => { | ||
const crumbsList = []; | ||
crumbsList.push({ name: 'Seedlots', path: ROUTES.SEEDLOTS }); | ||
if (isTscAdmin && seedlotApplicant !== MINISTRY_OF_FOREST_ID) { | ||
crumbsList.push({ name: 'Review Seedlots', path: ROUTES.TSC_SEEDLOTS_TABLE }); | ||
} else { | ||
crumbsList.push({ name: 'My seedlots', path: ROUTES.MY_SEEDLOTS }); | ||
} | ||
crumbsList.push({ | ||
name: `Seedlot ${seedlotNumber}`, | ||
path: `${addParamToPath(ROUTES.SEEDLOT_DETAILS, seedlotNumber)}` | ||
}); | ||
return crumbsList; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.