aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/utils/modals-handler.ts
diff options
context:
space:
mode:
authorimamSidero <imam.hussain@est.tech>2023-01-24 16:03:54 +0000
committerMichael Morris <michael.morris@est.tech>2023-01-27 18:22:19 +0000
commit43ffce5d0d30872446c51afaf786d5cfad4378be (patch)
treec5ccdb92091586525b0b567f591c402ee642aecf /catalog-ui/src/app/utils/modals-handler.ts
parente3a17890903ee443d0b5d0ee872e316e4369318d (diff)
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 <imam.hussain@est.tech> Change-Id: I56261441022751a191fe057aafa4c681c8db96c5
Diffstat (limited to 'catalog-ui/src/app/utils/modals-handler.ts')
-rw-r--r--catalog-ui/src/app/utils/modals-handler.ts13
1 files changed, 11 insertions, 2 deletions
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<T>} - Promise telling if the modal has opened or not
*/
- newOpenEditPropertyModal = (property: PropertyModel, filteredProperties: PropertyModel[], isPropertyValueOwner: boolean, propertyOwnerType: string, propertyOwnerId: string): ng.IPromise<any> => {
+ newOpenEditPropertyModal = (property: PropertyModel, filteredProperties: PropertyModel[], isPropertyValueOwner: boolean, propertyOwnerType: string, propertyOwnerId: string, component: Component, inputProperty: InputFEModel): ng.IPromise<any> => {
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;
}
}
};