Skip to content

Commit

Permalink
reviews are lists of strings
Browse files Browse the repository at this point in the history
  • Loading branch information
Caleb-T-Owens committed Oct 30, 2024
1 parent d3899c7 commit 1d2786e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
12 changes: 6 additions & 6 deletions packages/shared/src/lib/cloud/patches/CloudPatchDetails.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@
<div class="card">
<p class="card__header text-15 text-bold">Reviews:</p>
<div class="card__content">
<p>Viewings: {patch.review.viewed}</p>
<p>Sign offs: {patch.review.signedOff}</p>
<p>Rejections: {patch.review.rejected}</p>
<p>Viewings: {patch.review.viewed.join(', ')}</p>
<p>Sign offs: {patch.review.signedOff.join(', ')}</p>
<p>Rejections: {patch.review.rejected.join(', ')}</p>
</div>
</div>
<div class="card">
<p class="card__header text-15 text-bold">Reviews (all revisions):</p>
<div class="card__content">
<p>Viewings: {patch.reviewAll.viewed}</p>
<p>Sign offs: {patch.reviewAll.signedOff}</p>
<p>Rejections: {patch.reviewAll.rejected}</p>
<p>Viewings: {patch.reviewAll.viewed.join(', ')}</p>
<p>Sign offs: {patch.reviewAll.signedOff.join(', ')}</p>
<p>Rejections: {patch.reviewAll.rejected.join(', ')}</p>
</div>
</div>
</div>
Expand Down
13 changes: 7 additions & 6 deletions packages/shared/src/lib/cloud/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,16 @@ export class CloudPatchStatsitics {
}

export interface ApiPatchReview {
viewed: boolean;
signed_off: boolean;
rejected: boolean;
viewed: string[];
signed_off: string[];
rejected: string[];
}

/** Lists of emails of people who have viewed or reviewed */
export class CloudPatchReview {
readonly viewed: boolean;
readonly signedOff: boolean;
readonly rejected: boolean;
readonly viewed: string[];
readonly signedOff: string[];
readonly rejected: string[];

constructor(apiPatchReview: ApiPatchReview) {
this.viewed = apiPatchReview.viewed;
Expand Down

0 comments on commit 1d2786e

Please sign in to comment.