Conversation
| const [isEditMode] = useState(true); | ||
| const canEditMajorMineApplications = useAppSelector(userHasRole(USER_ROLES.role_edit_major_mine_applications)); | ||
| const isUserProponent = useAppSelector(isProponent); | ||
| const [isEditMode] = useState(canEditMajorMineApplications || isUserProponent); |
There was a problem hiding this comment.
turns out there wasn't really any role restrictions on the FE...
|
|
||
| @api.doc(description='Request a document_manager_guid for uploading a document') | ||
| @requires_any_of([MINE_ADMIN, MINESPACE_PROPONENT, EDIT_PROJECT_SUMMARIES]) | ||
| @requires_any_of([MINE_ADMIN, MINESPACE_PROPONENT, EDIT_MAJOR_MINE_APPLICATIONS]) |
There was a problem hiding this comment.
had the wrong permission on the BE. Oops!
| @@ -1,5 +1,6 @@ | |||
| import React, { FC, useEffect, useState } from "react"; | |||
| import { useDispatch, useSelector } from "react-redux"; | |||
| import { useSelector } from "react-redux"; | |||
There was a problem hiding this comment.
Any reason we can't use the useAppSelector here?
| const [isLoaded, setIsLoaded] = useState(true); | ||
| const canManageAmsFiles = canEditMajorMineApplications || isUserProponent; | ||
|
|
||
| const authsWithDocs = |
There was a problem hiding this comment.
Might be a good idea to wrap these in useMemo
There was a problem hiding this comment.
I checked how often they recalculate and it's only when data loads. Not worth it IMO.
matbusby-fw
left a comment
There was a problem hiding this comment.
Left a couple thoughts on small changes that might be good.
|
|
|
|



Objective
MDS-6526


Hierarchy was expanded to 3 levels, this is what "Major Mine Application" looks like now
And the ENV application files specifically