Add curation button to claimed task actions#74
Merged
Conversation
Introduces a 'Curate' button to the claimed task actions component, allowing users to validate items using the curation framework. Updates the curation form to accept item_id from query parameters and adds relevant i18n translations for the new button and tooltip in English and Czech. Includes corresponding unit test for the new button.
There was a problem hiding this comment.
Pull Request Overview
This PR adds a "Curate" button to the claimed task actions component, enabling workflow item curation directly from the task view. The button navigates to the admin curation tasks page with the item's identifier pre-populated.
Key changes:
- Added new translation keys for the curate button and its help text in English and Czech
- Added a
getWorkflowItemCurationRoute()method to return the curation tasks route - Implemented a curate button in the claimed task actions HTML template
- Modified the curation form component to accept an
item_idquery parameter and pre-populate the handle field - Added test coverage for the new curate button
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/assets/i18n/en.json5 | Added English translations for curate button and tooltip |
| src/assets/i18n/cs.json5 | Added Czech translations for curate button and tooltip |
| src/app/shared/mydspace-actions/claimed-task/claimed-task-actions.component.ts | Added method to get curation route |
| src/app/shared/mydspace-actions/claimed-task/claimed-task-actions.component.html | Added curate button with routing and query parameters |
| src/app/shared/mydspace-actions/claimed-task/claimed-task-actions.component.spec.ts | Added test for curate button display |
| src/app/curation-form/curation-form.component.ts | Added logic to read item_id from query params and pre-populate handle field |
src/app/shared/mydspace-actions/claimed-task/claimed-task-actions.component.html
Outdated
Show resolved
Hide resolved
Refactored itemId access in CurationFormComponent to use dot notation for consistency. Changed the curate button icon from info-circle to filter in claimed-task-actions.component.html for improved visual representation.
fixing the spec issue
change queryParam to be handle and not uuid
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds a "Curate" button to the claimed task actions in the workflow, allowing users to validate items using the curation framework. It also updates the curation form to support pre-filling the handle field based on the item's ID passed via query parameters, and introduces necessary i18n translations for the new button and tooltip.
Workflow UI enhancements
claimed-task-actions.component.html), which routes to/admin/curation-taskswith the item's UUID as a query parameter.getWorkflowItemCurationRoutemethod inclaimed-task-actions.component.tsto provide the correct route for curation tasks.Curation form improvements
item_idfrom query parameters and pre-fill the handle field accordingly (curation-form.component.ts). [1] [2] [3]Internationalization
en.json5,cs.json5). [1] [2]Testing
claimed-task-actions.component.spec.ts).