-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
128 additions
and
114 deletions.
There are no files selected for viewing
This file contains 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 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 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
163 changes: 81 additions & 82 deletions
163
client/src/app/components/pull-request-table/pull-request-table.component.html
This file contains 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 |
---|---|---|
@@ -1,85 +1,84 @@ | ||
@if (isLoading()) { | ||
<p-table [value]="[1, 2, 3, 4, 5]"> | ||
<ng-template pTemplate="header"> | ||
<tr> | ||
<th>Title</th> | ||
<th>Draft</th> | ||
<th>Status</th> | ||
<th>Author</th> | ||
<th>Assignee</th> | ||
<th>Created</th> | ||
</tr> | ||
</ng-template> | ||
<ng-template pTemplate="body"> | ||
<tr> | ||
<td><p-skeleton></p-skeleton></td> | ||
<td></td> | ||
<td><p-skeleton></p-skeleton></td> | ||
<td><p-skeleton></p-skeleton></td> | ||
<td><p-skeleton></p-skeleton></td> | ||
<td><p-skeleton></p-skeleton></td> | ||
</tr> | ||
</ng-template> | ||
</p-table> | ||
<p-table [value]="[1, 2, 3, 4, 5]"> | ||
<ng-template pTemplate="header"> | ||
<tr> | ||
<th>Title</th> | ||
<th>Draft</th> | ||
<th>Status</th> | ||
<th>Author</th> | ||
<th>Assignee</th> | ||
<th>Created</th> | ||
</tr> | ||
</ng-template> | ||
<ng-template pTemplate="body"> | ||
<tr> | ||
<td><p-skeleton></p-skeleton></td> | ||
<td></td> | ||
<td><p-skeleton></p-skeleton></td> | ||
<td><p-skeleton></p-skeleton></td> | ||
<td><p-skeleton></p-skeleton></td> | ||
<td><p-skeleton></p-skeleton></td> | ||
</tr> | ||
</ng-template> | ||
</p-table> | ||
} @else { | ||
@if (isError()) { | ||
<p>Error occurred while fetching pull requests.</p> | ||
} @else { | ||
@if (isEmpty()) { | ||
<p>No pull requests found.</p> | ||
} @else { | ||
<p-table [rowHover]="true" [value]="pullRequestStore.pullRequests()" [paginator]="true" [rows]="20"> | ||
<ng-template pTemplate="header"> | ||
<tr> | ||
<th>Title</th> | ||
<th>Draft</th> | ||
<th>Status</th> | ||
<th>Author</th> | ||
<th>Assignee</th> | ||
<th>Created</th> | ||
</tr> | ||
</ng-template> | ||
<ng-template pTemplate="body" let-pr> | ||
<tr class="cursor-pointer" (click)="openPR(pr)"> | ||
<td> | ||
<div class="flex align-items-center gap-2"> | ||
<i-tabler name="git-pull-request"></i-tabler> | ||
<span class="font-bold"><span [innerHTML]="pr.title | markdown"></span></span> | ||
<button pButton class="p-button-text p-button-sm" (click)="openPRExternal(pr)"><i-tabler | ||
name="external-link"></i-tabler></button> | ||
</div> | ||
</td> | ||
<td> | ||
@if (pr.isDraft) { | ||
<p-tag value="Draft" severity="secondary"></p-tag> | ||
} | ||
</td> | ||
<td> | ||
<p-tag [value]="getStatus(pr)" [severity]="getStatusSeverity(pr)"></p-tag> | ||
</td> | ||
<td> | ||
<div class="flex align-items-center gap-2"> | ||
<p-avatar [image]="pr.author.avatarUrl" shape="circle" size="normal"></p-avatar> | ||
<span>{{ pr.author.name }}</span> | ||
</div> | ||
</td> | ||
<td> | ||
@if (pr.assignees?.length) { | ||
<div class="flex align-items-center gap-2"> | ||
<p-avatarGroup> | ||
@for (assignee of pr.assignees; track assignee) { | ||
<p-avatar [image]="assignee.avatarUrl" [pTooltip]="assignee.name" shape="circle" size="normal"></p-avatar> | ||
} | ||
</p-avatarGroup> | ||
</div> | ||
} | ||
</td> | ||
<td> | ||
{{ formatDate(pr.createdAt) }} | ||
</td> | ||
</tr> | ||
</ng-template> | ||
</p-table> | ||
} | ||
@if (isError()) { | ||
<p>Error occurred while fetching pull requests.</p> | ||
} @else { | ||
@if (isEmpty()) { | ||
<p>No pull requests found.</p> | ||
} @else { | ||
<p-table [rowHover]="true" [value]="pullRequestStore.pullRequests()" [paginator]="true" [rows]="20"> | ||
<ng-template pTemplate="header"> | ||
<tr> | ||
<th>Title</th> | ||
<th>Draft</th> | ||
<th>Status</th> | ||
<th>Author</th> | ||
<th>Assignee</th> | ||
<th>Created</th> | ||
</tr> | ||
</ng-template> | ||
<ng-template pTemplate="body" let-pr> | ||
<tr class="cursor-pointer" (click)="openPR(pr)"> | ||
<td> | ||
<div class="flex items-center gap-2"> | ||
<i-tabler name="git-pull-request"></i-tabler> | ||
<span class="font-bold"><span [innerHTML]="pr.title | markdown"></span></span> | ||
<p-button [link]="true" (click)="openPRExternal(pr)"><i-tabler name="external-link"></i-tabler></p-button> | ||
</div> | ||
</td> | ||
<td> | ||
@if (pr.isDraft) { | ||
<p-tag value="Draft" severity="secondary"></p-tag> | ||
} | ||
</td> | ||
<td> | ||
<p-tag [value]="getStatus(pr)" [severity]="getStatusSeverity(pr)"></p-tag> | ||
</td> | ||
<td> | ||
<div class="flex align-items-center gap-2"> | ||
<p-avatar [image]="pr.author.avatarUrl" shape="circle" size="normal"></p-avatar> | ||
<span>{{ pr.author.name }}</span> | ||
</div> | ||
</td> | ||
<td> | ||
@if (pr.assignees?.length) { | ||
<div class="flex align-items-center gap-2"> | ||
<p-avatarGroup> | ||
@for (assignee of pr.assignees; track assignee) { | ||
<p-avatar [image]="assignee.avatarUrl" [pTooltip]="assignee.name" shape="circle" size="normal"></p-avatar> | ||
} | ||
</p-avatarGroup> | ||
</div> | ||
} | ||
</td> | ||
<td> | ||
{{ formatDate(pr.createdAt) }} | ||
</td> | ||
</tr> | ||
</ng-template> | ||
</p-table> | ||
} | ||
} | ||
} | ||
} |
This file contains 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 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 |
---|---|---|
@@ -1,8 +1,10 @@ | ||
<!-- TODO: IMPROVE THIS TO <p-tabs> WHEN NAVIGATION IS READY--> | ||
|
||
<p-tabMenu [model]="tabs()" [activeItem]="activeTab()" (activeItemChange)="onTabChange($event)"></p-tabMenu> | ||
|
||
@if (isTabActive('pr')) { | ||
<app-pull-request-table /> | ||
<app-pull-request-table /> | ||
} | ||
@if (isTabActive('branches')) { | ||
<app-branches-table /> | ||
} | ||
<app-branches-table /> | ||
} |
This file contains 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 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 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