X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=webapp-frontend%2Fsrc%2Fapp%2Fpolicy%2Fpolicy-type%2Fpolicy-type.component.ts;h=f6c8d2a19b6b594c97402d80e76d6b6d89d15aaa;hb=refs%2Fchanges%2F71%2F6071%2F2;hp=cfc0eb5784428b90c713bd8266a753cc8ca1a742;hpb=da0dd4633b71e93fdb7948741c1e1e85ae201d92;p=portal%2Fnonrtric-controlpanel.git diff --git a/webapp-frontend/src/app/policy/policy-type/policy-type.component.ts b/webapp-frontend/src/app/policy/policy-type/policy-type.component.ts index cfc0eb5..f6c8d2a 100644 --- a/webapp-frontend/src/app/policy/policy-type/policy-type.component.ts +++ b/webapp-frontend/src/app/policy/policy-type/policy-type.component.ts @@ -18,10 +18,11 @@ * ========================LICENSE_END=================================== */ -import { Component, Input, OnInit } from "@angular/core"; +import { Component, Input, OnInit, OnChanges, SimpleChanges} from "@angular/core"; import { BehaviorSubject } from "rxjs"; import { PolicyType, PolicyTypeSchema } from "@interfaces/policy.types"; -import { PolicyService } from "@app/services/policy/policy.service"; +import { PolicyService } from "@services/policy/policy.service"; +import "@policy/policy-control.component"; class PolicyTypeInfo { constructor(public type: PolicyTypeSchema) {} @@ -34,8 +35,9 @@ class PolicyTypeInfo { templateUrl: "./policy-type.component.html", styleUrls: ["./policy-type.component.scss"], }) -export class PolicyTypeComponent implements OnInit { +export class PolicyTypeComponent implements OnInit, OnChanges { @Input() policyTypeId: string; + @Input() minimiseTrigger: boolean; isVisible: BehaviorSubject = new BehaviorSubject(false); @@ -50,6 +52,12 @@ export class PolicyTypeComponent implements OnInit { this.isVisible.next(false); } + ngOnChanges(changes: SimpleChanges): void { + if(changes['minimiseTrigger']){ + this.isVisible.next(false); + } + } + public loadTypeInfo() { if (this.policyTypeId && this.policyTypeId !== "") { this.policyService