-
Notifications
You must be signed in to change notification settings - Fork 0
338 multiple appraisals per study per user #352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
InfinityBowman
merged 7 commits into
main
from
338-multiple-appraisals-per-study-per-user
Feb 2, 2026
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
9ff0d13
multiple appraisals per study based on outcome
InfinityBowman 6841a19
Apply Prettier formatting
actions-user 6901e56
clean up styling
InfinityBowman dc75982
Merge branch '338-multiple-appraisals-per-study-per-user' of https://…
InfinityBowman 1705142
update deps
InfinityBowman a00364e
fix bug could not mark complete in rob or robins
InfinityBowman 3f9bf44
reconcile and completed tab updated for multiple reviews
InfinityBowman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
102 changes: 102 additions & 0 deletions
102
packages/web/src/components/project/completed-tab/CompletedOutcomeRow.jsx
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| /** | ||
| * CompletedOutcomeRow - Single outcome row within completed study | ||
| * | ||
| * Displays a completed checklist for a specific outcome with actions to open | ||
| * the checklist and view previous reviewer checklists (for dual-reviewer studies). | ||
| */ | ||
|
|
||
| import { createSignal, Show } from 'solid-js'; | ||
| import { getChecklistMetadata } from '@/checklist-registry'; | ||
| import { getStatusLabel, getStatusStyle } from '@/constants/checklist-status.js'; | ||
| import PreviousReviewersView from './PreviousReviewersView.jsx'; | ||
|
|
||
| export default function CompletedOutcomeRow(props) { | ||
| // props.study: Study object | ||
| // props.outcomeGroup: { outcomeId: string|null, type: string, checklists: Array } | ||
| // props.onOpenChecklist: (checklistId) => void | ||
| // props.getAssigneeName: (userId) => string | ||
| // props.getOutcomeName: (outcomeId) => string | null | ||
| // props.getReconciliationProgress: (outcomeId, type) => Object | null | ||
|
|
||
| const [showPreviousReviewers, setShowPreviousReviewers] = createSignal(false); | ||
|
|
||
| const outcomeGroup = () => props.outcomeGroup; | ||
|
|
||
| // Get the first finalized checklist (the reconciled one) | ||
| const finalizedChecklist = () => outcomeGroup().checklists[0]; | ||
|
|
||
| // Get outcome name for display | ||
| const outcomeName = () => { | ||
| const outcomeId = outcomeGroup().outcomeId; | ||
| if (!outcomeId) return null; | ||
| return props.getOutcomeName?.(outcomeId) || 'Unknown Outcome'; | ||
| }; | ||
|
|
||
| // Get reconciliation progress for this outcome | ||
| const reconciliationProgress = () => { | ||
| return props.getReconciliationProgress?.(outcomeGroup().outcomeId, outcomeGroup().type); | ||
| }; | ||
|
|
||
| // Check if we have previous reviewers to show | ||
| const hasPreviousReviewers = () => { | ||
| const progress = reconciliationProgress(); | ||
| return !!(progress?.checklist1Id && progress?.checklist2Id); | ||
| }; | ||
|
|
||
| return ( | ||
| <> | ||
| <div class='bg-muted/50 flex items-center justify-between rounded-lg p-3'> | ||
| <div class='flex items-center gap-3'> | ||
| {/* Outcome badge */} | ||
| <Show when={outcomeName()}> | ||
| <span class='bg-secondary text-secondary-foreground rounded-full px-2 py-0.5 text-xs font-medium'> | ||
| {outcomeName()} | ||
| </span> | ||
| </Show> | ||
|
|
||
| {/* Checklist type */} | ||
| <span class='text-foreground text-sm font-medium'> | ||
| {getChecklistMetadata(outcomeGroup().type)?.name || outcomeGroup().type} | ||
| </span> | ||
|
|
||
| {/* Status badge */} | ||
| <span | ||
| class={`rounded-full px-2 py-0.5 text-xs font-medium ${getStatusStyle(finalizedChecklist()?.status)}`} | ||
| > | ||
| {getStatusLabel(finalizedChecklist()?.status)} | ||
| </span> | ||
| </div> | ||
|
|
||
| <div class='flex items-center gap-2'> | ||
| {/* View Previous button (for dual-reviewer studies) */} | ||
| <Show when={hasPreviousReviewers()}> | ||
| <button | ||
| onClick={() => setShowPreviousReviewers(true)} | ||
| class='bg-secondary text-secondary-foreground hover:bg-secondary/80 rounded-lg px-3 py-1.5 text-sm font-medium transition-colors' | ||
| > | ||
| View Previous | ||
| </button> | ||
| </Show> | ||
|
|
||
| {/* Open button */} | ||
| <button | ||
| onClick={() => props.onOpenChecklist?.(finalizedChecklist()?.id)} | ||
| class='bg-primary hover:bg-primary/90 focus:ring-primary rounded-lg px-3 py-1.5 text-sm font-medium text-white transition-colors focus:ring-2 focus:outline-none' | ||
| > | ||
| Open | ||
| </button> | ||
| </div> | ||
| </div> | ||
|
|
||
| {/* Previous Reviewers View Dialog */} | ||
| <Show when={showPreviousReviewers()}> | ||
| <PreviousReviewersView | ||
| study={props.study} | ||
| reconciliationProgress={reconciliationProgress()} | ||
| getAssigneeName={props.getAssigneeName} | ||
| onClose={() => setShowPreviousReviewers(false)} | ||
| /> | ||
| </Show> | ||
| </> | ||
| ); | ||
| } | ||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guard the Open action when no finalized checklist is available.
If outcomeGroup.checklists is empty during sync or data inconsistencies, onOpenChecklist will receive undefined. Consider disabling or hiding the button when there is no checklist id.
Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents