aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/shared/models/formControlModels/formPopupDetails.model.ts
blob: 40d74d63f7e73a33d5da2239945153c3f4846e0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import {FormControlModel} from "./formControl.model";
import {ModelInformationItem} from "../../components/model-information/model-information.component";
import {FormGroup} from "@angular/forms";

export class FormPopupDetails {
  popupTypeName: PopupType;
  that : any;
  UUIDData : Object = {}; // TODO uuid tree
  title: string;
  leftSubTitle: string;
  rightSubTitle: string;
  formControlList: FormControlModel[];
  dynamicInputsControlList: FormControlModel[];
  modelInformationItems: ModelInformationItem[];
  onSubmit : (that : any, form: FormGroup , ...args) =>  void;
  onCancel : (that : any, form: FormGroup) => void;
  onOtherAction: (that: any, form: FormGroup) => void;


  constructor(that : any,
              popupTypeName : PopupType ,
              UUIDData : Object,
              title : string,
              leftSubTitle : string,
              rightSubTitle : string,
              formControlList : FormControlModel[],
              dynamicInputsControlList : FormControlModel[],
              modelInformationItems : ModelInformationItem[],
              onSubmit : (that : any, form : FormGroup, ...args) =>  void,
              onCancel: (that: any, form: FormGroup) => void,
              onOtherAction?: (that: any, form: FormGroup) => void) {
    this.title = title;
    this.leftSubTitle = leftSubTitle;
    this.rightSubTitle = rightSubTitle;
    this.formControlList = formControlList;
    this.dynamicInputsControlList = dynamicInputsControlList;
    this.modelInformationItems = modelInformationItems;
    this.onSubmit = onSubmit;
    this.onCancel = onCancel;
    this.onOtherAction = onOtherAction;
    this.popupTypeName = popupTypeName;
    this.UUIDData = UUIDData;
    this.that = that;
  }
}



export enum PopupType {
  SERVICE_MACRO = 'service macro',
  SERVICE_A_LA_CART = 'service a-la-cart',
  SERVICE = 'service',
  VNF_MACRO  ='vnf macro',
  VNF_A_LA_CARTE = 'vnf a-la-carte',
  VFMODULE = 'vfModule',
  VFMODULE_UPGRADE = 'vfModule_upgrade',
  NETWORK_MACRO = 'network_macro',
  VNF_GROUP = 'vnfGroup'
}