Skip to content

Commit

Permalink
fix: show inbox and explorer for admins
Browse files Browse the repository at this point in the history
  • Loading branch information
satikaj committed May 28, 2024
1 parent 30b8df7 commit c76e7c1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
24 changes: 10 additions & 14 deletions src/app/common/header/task-dropdown/task-dropdown.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,20 +99,16 @@
}
@if (unitRole && currentView === 'UNIT') {
<!-- <p class="task-dropdown-heading">Tasks</p> -->
@if (unitRole.role !== 'Admin' && unitRole.role !== 'Auditor') {
<button uiSref="units/tasks/inbox" [uiParams]="{unitId: unitRole.unit.id}" mat-menu-item>
<mat-icon aria-label="Inbox icon" fontIcon="inbox"></mat-icon> <span>Inbox</span>
</button>
}
@if (unitRole.role !== 'Admin' && unitRole.role !== 'Auditor') {
<button
uiSref="units/tasks/definition"
[uiParams]="{unitId: unitRole.unit.id}"
mat-menu-item
>
<mat-icon aria-label="Task Explorer Icon" fontIcon="pageview"></mat-icon> Explorer
</button>
}
<button uiSref="units/tasks/inbox" [uiParams]="{unitId: unitRole.unit.id}" mat-menu-item>
<mat-icon aria-label="Inbox icon" fontIcon="inbox"></mat-icon> <span>Inbox</span>
</button>
<button
uiSref="units/tasks/definition"
[uiParams]="{unitId: unitRole.unit.id}"
mat-menu-item
>
<mat-icon aria-label="Task Explorer Icon" fontIcon="pageview"></mat-icon> Explorer
</button>
<button uiSref="units/tasks/viewer" [uiParams]="{unitId: unitRole.unit.id}" mat-menu-item>
<mat-icon aria-label="Task list icon" fontIcon="list_alt"></mat-icon> Tasks
</button>
Expand Down
7 changes: 6 additions & 1 deletion src/app/home/states/home/home.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,12 @@ <h2>All Units</h2>
</div>
<div [hidden]="loadingUnits" class="flex flex-row flex-wrap items-center">
<div *ngFor="let unit of units">
<div uiSref="units/tasks/viewer" [uiParams]="{unitId: unit.id}" class="removeStyle">
<div
uiSref="units/tasks/inbox"
[uiParams]="{unitId: unit.id}"
class="removeStyle"
*ngIf="!unit.teachingPeriod || unit.teachingPeriod?.active"
>
<mat-card class="unit-card">
<mat-card-header>
<mat-card-title class="f-card-title">{{ unit.name }}</mat-card-title>
Expand Down

0 comments on commit c76e7c1

Please sign in to comment.