[angular-16-irish-monitor | DONE | ADDED]: stakeholder-base.component.ts: Added method "setProperties()" to set adminToolsPortalType and init portal.
This commit is contained in:
parent
c202b7671b
commit
bef191edba
|
@ -1,6 +1,7 @@
|
||||||
import {Directive} from "@angular/core";
|
import {Directive} from "@angular/core";
|
||||||
import {BaseComponent} from "../../sharedComponents/base/base.component";
|
import {BaseComponent} from "../../sharedComponents/base/base.component";
|
||||||
import {IndicatorUtils, StakeholderUtils} from "./indicator-utils";
|
import {IndicatorUtils, StakeholderUtils} from "./indicator-utils";
|
||||||
|
import {ConnectHelper} from "../../connect/connectHelper";
|
||||||
|
|
||||||
@Directive()
|
@Directive()
|
||||||
export abstract class StakeholderBaseComponent extends BaseComponent {
|
export abstract class StakeholderBaseComponent extends BaseComponent {
|
||||||
|
@ -34,6 +35,16 @@ export abstract class StakeholderBaseComponent extends BaseComponent {
|
||||||
protected navigateToError() {
|
protected navigateToError() {
|
||||||
this._router.navigate([this.properties.errorLink], {queryParams: {'page': this._router.url}});
|
this._router.navigate([this.properties.errorLink], {queryParams: {'page': this._router.url}});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setProperties(id, type = null, configurationService) {
|
||||||
|
this.properties.adminToolsCommunity = id;
|
||||||
|
if (type) {
|
||||||
|
this.properties.adminToolsPortalType = type;
|
||||||
|
} else {
|
||||||
|
ConnectHelper.setPortalTypeFromPid(id);
|
||||||
|
}
|
||||||
|
configurationService.initPortal(this.properties, this.properties.adminToolsCommunity);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Directive()
|
@Directive()
|
||||||
|
|
Loading…
Reference in New Issue