From 43ffce5d0d30872446c51afaf786d5cfad4378be Mon Sep 17 00:00:00 2001 From: imamSidero Date: Tue, 24 Jan 2023 16:03:54 +0000 Subject: Provide add/edit constraints capability to inputs in properties page Providing the capability to add or edit constraints to inputs in properies of a service Issue-ID: SDC-4346 Signed-off-by: Imam hussain Change-Id: I56261441022751a191fe057aafa4c681c8db96c5 --- catalog-ui/src/app/utils/modals-handler.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'catalog-ui/src/app/utils/modals-handler.ts') diff --git a/catalog-ui/src/app/utils/modals-handler.ts b/catalog-ui/src/app/utils/modals-handler.ts index cbbab45e9c..43f963737b 100644 --- a/catalog-ui/src/app/utils/modals-handler.ts +++ b/catalog-ui/src/app/utils/modals-handler.ts @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -import { Component, DisplayModule , PropertyModel } from '../models'; +import { Component, DisplayModule , PropertyModel, InputFEModel } from '../models'; import { ComponentMetadata } from '../models/component-metadata'; export interface IModalsHandler { @@ -97,6 +97,9 @@ export class ModalsHandler implements IModalsHandler { }, isViewOnly: (): boolean => { return isViewOnly; + }, + inputProperty: (): InputFEModel => { + return null; } } }; @@ -115,7 +118,7 @@ export class ModalsHandler implements IModalsHandler { * @param isPropertyValueOwner - boolean telling if the component is eligible of editing the property * @returns {IPromise} - Promise telling if the modal has opened or not */ - newOpenEditPropertyModal = (property: PropertyModel, filteredProperties: PropertyModel[], isPropertyValueOwner: boolean, propertyOwnerType: string, propertyOwnerId: string): ng.IPromise => { + newOpenEditPropertyModal = (property: PropertyModel, filteredProperties: PropertyModel[], isPropertyValueOwner: boolean, propertyOwnerType: string, propertyOwnerId: string, component: Component, inputProperty: InputFEModel): ng.IPromise => { const deferred = this.$q.defer(); const modalOptions: ng.ui.bootstrap.IModalSettings = { @@ -142,6 +145,12 @@ export class ModalsHandler implements IModalsHandler { }, isViewOnly: (): boolean => { return false; + }, + component: (): Component => { + return component as Component; + }, + inputProperty: (): InputFEModel => { + return inputProperty; } } }; -- cgit 1.2.3-korg