yanweiyuan3
2023-08-09 588bc7829387dfc761cc25f06f77d4c81818bd10
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
import { PanelBase } from '../../libappbase/panelbase';
import { DialogSOP } from '../../libappsop/dialogsop';
import { DropDownListSOP } from '../../libappsop/dropdownlistsop';
import { EditFieldSOP } from '../../libappsop/editfieldsop';
import { CheckboxSOP } from '../../libappsop/checkboxsop';
import { DateTimeSelectorSOP } from '../../libappsop/datetimeselectorsop';
 
export interface DialogStockingPointFields {
  Name?: string;
  ID?: string;
  Parent?: string;
  IsInfiniteCapacity?: string;
  StartEnabled?: string;
  Start?: string;
  EndEnabled?: string;
  End?: string;
}
 
export class DialogStockingPoint extends DialogSOP<DialogStockingPointFields> {
  public static readonly title = 'Stocking point';
 
  public ddlParent = new DropDownListSOP('selParentUnit');
  public efName = new EditFieldSOP('EditFieldName');
  public efID = new EditFieldSOP('EditFieldID');
  public cbIsInfiniteCapacity = new CheckboxSOP('CheckboxInfiniteCapacity');
  public pnlAdvanced = new PanelBase('PanelAdvanced');
  public cbHasStart = new CheckboxSOP('CheckboxHasStart');
  public cbHasEnd = new CheckboxSOP('CheckboxHasEnd');
  public dtsStart = new DateTimeSelectorSOP('dsStart');
  public dtsEnd = new DateTimeSelectorSOP('dsEnd');
 
  public constructor() {
    super('DialogCreateEditStockingPoint');
 
    // 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('Name', this.efName);
    this._uiMap.set('ID', this.efID);
    this._uiMap.set('Parent', this.ddlParent);
    this._uiMap.set('IsInfiniteCapacity', this.cbIsInfiniteCapacity);
    this._uiMap.set('StartEnabled', this.cbHasStart);
    this._uiMap.set('Start', this.dtsStart);
    this._uiMap.set('EndEnabled', this.cbHasEnd);
    this._uiMap.set('End', this.dtsEnd);
  }
}