*/
import {CommonModule, DatePipe, CurrencyPipe} from '@angular/common';
import {NgModule, ModuleWithProviders} from '@angular/core';
+import {RouterModule} from '@angular/router';
import {FormsModule} from '@angular/forms';
import {NgbModule} from '@ng-bootstrap/ng-bootstrap';
imports: [
CommonModule,
FormsModule,
+ RouterModule,
NgbModule
],
exports: [
CommonModule,
+ RouterModule,
NgbModule,
FormsModule,
EgPrintComponent
<eg-link-table-link i18n-label label="Best-Hold Selection Sort Order"
url="/eg/staff/admin/server/config/best_hold_order"></eg-link-table-link>
<eg-link-table-link i18n-label label="Billing Types"
- url="./staff/admin/server/config/billing_type"></eg-link-table-link>
+ routerLink="/staff/admin/server/config/billing_type"></eg-link-table-link>
<eg-link-table-link i18n-label label="Call Number Prefixes"
url="/eg/staff/admin/server/config/acn_prefix"></eg-link-table-link>
<eg-link-table-link i18n-label label="Call Number Suffixes"
<eg-link-table-link i18n-label label="Global Flags"
url="/eg/staff/admin/server/config/global_flag"></eg-link-table-link>
<eg-link-table-link i18n-label label="Hard Due Date Changes"
- url="./staff/admin/server/config/hard_due_date"></eg-link-table-link>
+ routerLink="/staff/admin/server/config/hard_due_date"></eg-link-table-link>
<eg-link-table-link i18n-label label="Hold Matchpoint Weights"
url="/eg/staff/admin/server/config/hold_matrix_weights"></eg-link-table-link>
<eg-link-table-link i18n-label label="Import Match Sets"
*ngFor="let row of rowBuckets; let rowIdx = index">
<div class="flex-1 p-2" *ngFor="let col of colList">
<ng-container *ngIf="row[col]">
- <a [href]="row[col].url" class="with-material-icon">
+ <a [href]="row[col].url" [routerLink]="row[col].routerLink"
+ class="with-material-icon">
<span class="material-icons">edit</span>
<span>{{row[col].label}}</span>
</a>
interface LinkTableLink {
label: string,
- url: string
+ url?: string,
+ routerLink?: string
}
@Component({
export class EgLinkTableLinkComponent implements OnInit {
@Input() label: string;
@Input() url: string;
+ @Input() routerLink: string;
constructor(@Host() private linkTable: EgLinkTableComponent) {}
ngOnInit() {
this.linkTable.links.push({
label : this.label,
- url: this.url
+ url: this.url,
+ routerLink: this.routerLink
});
}
}