Merge pull request #110 from Pear-Trading/ben/fix/sidebar-links

Correct which links are shown for different users
This commit is contained in:
Rumperuu 2020-10-18 14:40:40 +01:00 committed by GitHub
commit 792e431fad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 4 deletions

View file

@ -101,7 +101,7 @@
<div class="card-header"> <div class="card-header">
<strong>Log of Outgoing Transactions</strong> <strong>Log of Outgoing Transactions</strong>
<small>This lists all purchases that have been submitted.</small> <small>This lists all purchases that have been submitted.</small>
<button class="btn pull-right btn-sm" (click)="toggleShowMeta()"> <button *ngIf="accountType == 'organisation'" class="btn pull-right btn-sm" (click)="toggleShowMeta()">
<span *ngIf="!showMeta">Show</span><span *ngIf="showMeta">Hide</span> Details <span *ngIf="!showMeta">Show</span><span *ngIf="showMeta">Hide</span> Details
</button> </button>
</div> </div>

View file

@ -29,6 +29,7 @@ export class TransactionLogComponent implements OnInit {
transactionFormStatusSuccess: string; transactionFormStatusSuccess: string;
transactionFormStatusError = 'Error received, please try again.'; transactionFormStatusError = 'Error received, please try again.';
updatedTime: string; updatedTime: string;
accountType: any;
showMeta = false; showMeta = false;
public paginateConfig: PaginationInstance = { public paginateConfig: PaginationInstance = {
@ -58,6 +59,7 @@ export class TransactionLogComponent implements OnInit {
ngOnInit(): void { ngOnInit(): void {
this.loadTransactions(1); this.loadTransactions(1);
this.accountType = localStorage.getItem('usertype');
} }
loadTransactions(logPage: number) { loadTransactions(logPage: number) {

View file

@ -38,7 +38,7 @@
</div> </div>
</a> </a>
</li> </li>
<li class="nav-item"> <li *ngIf="accountType == 'organisation'" class="nav-item">
<a class="nav-link" routerLinkActive="active" [routerLink]="['/more-graphs-and-tables']"> <a class="nav-link" routerLinkActive="active" [routerLink]="['/more-graphs-and-tables']">
<div class="row no-gutters align-items-center"> <div class="row no-gutters align-items-center">
<div class="col-2"><i class="icon-map"></i></div> <div class="col-2"><i class="icon-map"></i></div>
@ -94,7 +94,7 @@
</div> </div>
</a> </a>
</li> </li>
<li class="nav-item"> <li *ngIf="accountType == 'customer'" class="nav-item">
<a class="nav-link" routerLinkActive="active" [routerLink]="['/category-month']"> <a class="nav-link" routerLinkActive="active" [routerLink]="['/category-month']">
<div class="row no-gutters align-items-center"> <div class="row no-gutters align-items-center">
<div class="col-2"><i class="icon-basket"></i></div> <div class="col-2"><i class="icon-basket"></i></div>
@ -102,7 +102,7 @@
</div> </div>
</a> </a>
</li> </li>
<li class="nav-item"> <li *ngIf="accountType == 'organisation'" class="nav-item">
<a class="nav-link" routerLinkActive="active" [routerLink]="['/suppliers']"> <a class="nav-link" routerLinkActive="active" [routerLink]="['/suppliers']">
<div class="row no-gutters align-items-center"> <div class="row no-gutters align-items-center">
<div class="col-2"><i class="icon-speedometer"></i></div> <div class="col-2"><i class="icon-speedometer"></i></div>