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
There was a problem hiding this comment.
thanks, looks good!
| 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
There was a problem hiding this comment.
thanks, looks good!
| */ | ||
| $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. |
HenriRabalais
left a comment
There was a problem hiding this comment.
thanks for all the changes, the client, the tsx conversion and the docs all look great! One small bug inline in the edit form, plus a smaller note on the error messages.
The PSCID-by-name thread stays open until we land on something for Part 4.
| ); | ||
|
|
||
| props.onSuccess(); | ||
| } catch (err) { |
There was a problem hiding this comment.
saving never goes back to false here, so after a failed save (a duplicate value, say) the button stays on "Saving" and disabled until the modal is closed. A finally like the one in the add form should do it
| ); | ||
|
|
||
| props.onSuccess(); | ||
| } catch (err) { |
There was a problem hiding this comment.
small one: err.message is the API's English text, so the translated fallback only shows when the server sends nothing. formProject in Part 4 maps the status to a t() string, could these two forms do the same?
cf00d6b to
7587171
Compare
|
Thanks again Henri. |
7587171 to
5a709ca
Compare
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