renhao
2023-09-21 1aa9f2bb83dd9e4b7517f1cbf06b0db53979bb31
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
/**
 * @file          Campaign Form
 * @author        Jayden Chew (jayden.chew@3ds.com)
 */
import { DialogCampaign } from '../dialogs/dialog.campaign';
import { FormSOP } from '../../libappsop/formsop';
import { ListSOP } from '../../libappsop/listsop';
 
export class FormCampaign extends FormSOP {
  public listCampaign = new ListCampaign();
 
  public constructor() {
    super('FormCampaign');
  }
}
 
export class ListCampaign extends ListSOP<DialogCampaign, ListCampaignColumn> {
  public static readonly title = 'Campaigns';
  public readonly name = 'Campaigns';
 
  public constructor() {
    super('ListCampaign', new DialogCampaign());
 
    // Set primary key column name(s), to display in error message when assert fails
    this.rowPrimaryColumnNames = { 'Campaign type': '' };
    this.rowAllConstraintsColumnName = { 'All constraints': '' };
  }
}
 
export interface ListCampaignColumn {
  'All constraints'?: string;
  Unit?: string;
  'Campaign type'?: string;
  Start?: string;
  End?: string;
  Minimum?: string;
  Maximum?: string;
  Fulfillment?: string;
  Comment?: string;
  Utilization?: string;
  'To Transition'?: string;
}
 
const listCampaignContextMenuItem = {
  Create: { ContextMenu: 'listContextMenuCampaign', Name: 'MenuCreate', Label: 'Create' },
  Edit: { ContextMenu: 'listContextMenuCampaign', Name: 'MenuEdit', Label: 'Edit' },
  Delete: { ContextMenu: 'listContextMenuCampaign', Name: 'MenuDelete', Label: 'Delete' },
  Copy: { ContextMenu: 'listContextMenuCampaign', Name: 'MenuCopy', Label: 'Copy' },
};
export { listCampaignContextMenuItem as ListCampaignContextMenuItem };