Merge pull request #110 from Pear-Trading/ben/fix/sidebar-links
Correct which links are shown for different users
This commit is contained in:
commit
792e431fad
3 changed files with 6 additions and 4 deletions
|
@ -101,7 +101,7 @@
|
|||
<div class="card-header">
|
||||
<strong>Log of Outgoing Transactions</strong>
|
||||
<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
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
@ -29,6 +29,7 @@ export class TransactionLogComponent implements OnInit {
|
|||
transactionFormStatusSuccess: string;
|
||||
transactionFormStatusError = 'Error received, please try again.';
|
||||
updatedTime: string;
|
||||
accountType: any;
|
||||
showMeta = false;
|
||||
|
||||
public paginateConfig: PaginationInstance = {
|
||||
|
@ -58,6 +59,7 @@ export class TransactionLogComponent implements OnInit {
|
|||
|
||||
ngOnInit(): void {
|
||||
this.loadTransactions(1);
|
||||
this.accountType = localStorage.getItem('usertype');
|
||||
}
|
||||
|
||||
loadTransactions(logPage: number) {
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<li *ngIf="accountType == 'organisation'" class="nav-item">
|
||||
<a class="nav-link" routerLinkActive="active" [routerLink]="['/more-graphs-and-tables']">
|
||||
<div class="row no-gutters align-items-center">
|
||||
<div class="col-2"><i class="icon-map"></i></div>
|
||||
|
@ -94,7 +94,7 @@
|
|||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<li *ngIf="accountType == 'customer'" class="nav-item">
|
||||
<a class="nav-link" routerLinkActive="active" [routerLink]="['/category-month']">
|
||||
<div class="row no-gutters align-items-center">
|
||||
<div class="col-2"><i class="icon-basket"></i></div>
|
||||
|
@ -102,7 +102,7 @@
|
|||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<li *ngIf="accountType == 'organisation'" class="nav-item">
|
||||
<a class="nav-link" routerLinkActive="active" [routerLink]="['/suppliers']">
|
||||
<div class="row no-gutters align-items-center">
|
||||
<div class="col-2"><i class="icon-speedometer"></i></div>
|
||||
|
|
Reference in a new issue