Skip to content

Commit

Permalink
Merge pull request #318 from bcgov/oleks
Browse files Browse the repository at this point in the history
hotfix - unable to navigate to a dashboard
  • Loading branch information
ychung-mot authored May 28, 2024
2 parents 50c48d2 + fc6f24a commit 76e312b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ <h2>Home</h2>
</div>
<br>

<div class="listings-upload-history">
<div class="listings-upload-history" *ngIf="showListingHistory">
<app-listing-upload-history-table [isSmall]="true"></app-listing-upload-history-table>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { User } from '../../../common/models/user';
import { DashboardService } from '../../../common/services/dashboard.service';
import { DashboardCard } from '../../../common/models/dashboard-card';
import { ListingUploadHistoryTableComponent } from '../../../common/listing-upload-history-table/listing-upload-history-table.component';
import { listing_file_upload } from '../../../common/consts/permissions.const';


@Component({
Expand All @@ -26,6 +27,7 @@ import { ListingUploadHistoryTableComponent } from '../../../common/listing-uplo
export class DashboardComponent implements OnInit {
userType = '' || 'BCGov' || 'Platform' || 'LG' || 'Admin';
currentUser!: User;
showListingHistory = false;

cardsToDisplay = new Array<DashboardCard>();

Expand All @@ -40,6 +42,7 @@ export class DashboardComponent implements OnInit {
next: (value: User) => {
this.currentUser = value;
this.cardsToDisplay = this.dashboardService.getCardsPerUserType(this.currentUser);
this.showListingHistory = this.currentUser.permissions.includes(listing_file_upload);
},
})
}
Expand Down

0 comments on commit 76e312b

Please sign in to comment.