Repository navigation
Conversation
821cdf9 to
12f7c0b
Compare
131762f to
6dca45d
Compare
6dca45d to
e02eb2d
Compare
9c4c4b6 to
603f892
Compare
There was a problem hiding this comment.
thanks for building this on FilterableDataTable and the shared form elements! Mostly small things inline, the two bigger ones are the plain fetch calls and a few strings that aren't translated yet.
Two broader things: could the new files be .tsx function components, like the configuration page in Part 4? And the module doesn't have a README.md, help/ or test/TestPlan.md yet, which the other modules carry.
| return; | ||
| } | ||
|
|
||
| fetch( |
There was a problem hiding this comment.
could the requests here go through the shared client in jslib/http? There are four plain fetch calls in the module, this one, the one on line 52 and one in each form
| const {t} = this.props; | ||
| swal.fire({ | ||
| title: t('Are you sure?', {ns: 'loris'}), | ||
| text: `Delete identifier "${row.IdentifierValue}"?`, |
There was a problem hiding this comment.
a few strings here aren't going through t() yet, this one and the success and error popups below, and the same goes for the error messages in both forms. The edit form's button can use t('Save', {ns: 'loris'}) like the add form does
| */ | ||
| $database = $loris->getDatabaseConnection(); | ||
|
|
||
| $permissions = $database->pselect( |
There was a problem hiding this comment.
I think $user->getPermissionIDs() gives you this list directly, so the query over every permission and the hasPermission loop can go
There was a problem hiding this comment.
correction on this one, sorry! getPermissionIDs() only reads the user's own permission rows, while hasPermission() also lets superusers through, so swapping it in would hide restricted types from superusers. Feel free to keep the loop as it is
| const [saving, setSaving] = useState(false); | ||
| const [error, setError] = useState(null); | ||
|
|
||
| const editingDisabled = props.identifier.IdentifierType === 'PSCID'; |
There was a problem hiding this comment.
same thing as the PSCID rename on Part 4, this finds PSCID by its name, so whatever we land on there should apply here too
603f892 to
cf00d6b
Compare
|
Hi @HenriRabalais, thanks for the review again I have just pushed the following updates:
It's ready to be reviewed for a second time. Thanks again. |
Brief summary of changes
This PR adds a Candidate Identifiers module for viewing and managing identifiers associated with candidates.
The module provides a filterable table and allows users to add, edit, and delete identifiers while respecting identifier permissions and project restrictions.
This PR depends on #11261.
Changes
Testing Instructions