| import { PanelBase } from '../../libappbase/panelbase'; | 
| import { DialogSOP } from '../../libappsop/dialogsop'; | 
| import { EditFieldSOP } from '../../libappsop/editfieldsop'; | 
| import { CheckboxSOP } from '../../libappsop/checkboxsop'; | 
| import { DropDownListSOP } from '../../libappsop/dropdownlistsop'; | 
|   | 
| export interface DialogProductFields { | 
|   ParentProduct?: string; | 
|   Name?: string; | 
|   ID?: string; | 
|   UoM?: string; | 
|   ShelfLife?: string; | 
|   ShelfLifeEnabled?: string; | 
|   Maturation?: string; | 
|   MaturationEnabled?: string; | 
| } | 
|   | 
| export class DialogProduct extends DialogSOP<DialogProductFields> { | 
|   public static title = 'Product'; | 
|   public static tabAdvancedTitle = 'Advanced'; | 
|   | 
|   public pnlAdvanced = new PanelBase('PanelAdvanced'); | 
|   public ddlParent = new DropDownListSOP('selParentProduct'); | 
|   public efName = new EditFieldSOP('EditFieldName'); | 
|   public efID = new EditFieldSOP('EditFieldID'); | 
|   public ddlUoM = new DropDownListSOP('DropDownListUOM'); | 
|   public efShelfLife = new EditFieldSOP('EditFieldShelfLife'); | 
|   public cbHasShelfLife = new CheckboxSOP('CheckBoxHasShelfLife'); | 
|   public efMaturation = new EditFieldSOP('EditFieldMaturation'); | 
|   public cbHasMaturation = new CheckboxSOP('CheckBoxHasMaturation'); | 
|   | 
|   public constructor() { | 
|     super('DialogCreateEditProduct'); | 
|   | 
|     // Set UI element mapping to pair the UI name to the UI element for use in DialogSOP to find the UI object to set value or verify value | 
|     // This prevents each new Dialog to duplicate code just to set/verify UI element value | 
|     this._uiMap.set('ParentProduct', this.ddlParent); | 
|     this._uiMap.set('Name', this.efName); | 
|     this._uiMap.set('ID', this.efID); | 
|     this._uiMap.set('UoM', this.ddlUoM); | 
|     this._uiMap.set('ShelfLife', this.efShelfLife); | 
|     this._uiMap.set('ShelfLifeEnabled', this.cbHasShelfLife); | 
|     this._uiMap.set('Maturation', this.efMaturation); | 
|     this._uiMap.set('MaturationEnabled', this.cbHasMaturation); | 
|   } | 
| } |