haorenhui
2023-10-30 6d6cc10d9e8e242661da7fd655dec155a09d676c
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
import { DataHierarchyProvider } from '../../libappsop/datahierarchy';
 
export enum DataMetalBaseProductName {
  AllProducts = 'All Products',
  Automotive = 'Automotive',
  BCCanBody = 'BC can body',
  BCCanTab = 'BC can tab',
  BCCTClearCoated = 'BC CT clear coated',
  BCCBNarrow = 'BC CB narrow',
  BCCBWide = 'BC CB wide',
  Can = 'Can',
  CPNCoil = 'CPN coil',
  BeverageCan = 'Beverage can',
  MoltenAluminium3XXX = 'Molten aluminum 3XXX',
}
 
const dataProduct = {
  BCCBNarrow: {
    Name: { Name: DataMetalBaseProductName.BCCBNarrow },
    Parents: [{ Name: DataMetalBaseProductName.AllProducts }, { Name: DataMetalBaseProductName.Can }, { Name: DataMetalBaseProductName.BeverageCan }, { Name: DataMetalBaseProductName.BCCanBody }],
  },
  CarPanels: { Name: { Name: 'Car panels' }, Parents: [{ Name: DataMetalBaseProductName.AllProducts }, { Name: DataMetalBaseProductName.Automotive }] },
};
 
/**
 * Define the row name and its immediate parent (no need define all ancestors for easier maintenance and readability).
 * Create a DataHierarchyProvider object to store and query row ancestors to use in spec file.
 */
export const dataFoodProducts = {
  AllProducts: { Name: 'All Products', NameKey: 'AllProducts', ParentKey: '' },
  FinishedGoods: { Name: 'Finished Goods', NameKey: 'FinishedGoods', ParentKey: 'AllProducts' },
  Lowfat: { Name: 'Lowfat', NameKey: 'Lowfat', ParentKey: 'FinishedGoods' },
  LowfatStrawberry12pk: { Name: 'Lowfat Strawberry 12 pk', NameKey: 'LowfatStrawberry12pk', ParentKey: 'Lowfat' },
  Greek: { Name: 'Greek', NameKey: 'Greek', ParentKey: 'FinishedGoods' },
  GreekBlueberry12pk: { Name: 'Greek Blueberry 12 pk', NameKey: 'GreekBlueberry12pk', ParentKey: 'Greek' },
  GreekBlueberry6pk: { Name: 'Greek Blueberry 6 pk', NameKey: 'GreekBlueberry6pk', ParentKey: 'Greek' },
  GreekLemon12pk: { Name: 'Greek Lemon 12 pk', NameKey: 'GreekLemon12pk', ParentKey: 'Greek' },
  RawMaterials: { Name: 'Raw materials', NameKey: 'RawMaterials', ParentKey: 'AllProducts' },
  Dairy: { Name: 'Dairy', NameKey: 'Dairy', ParentKey: 'RawMaterials' },
  Milk: { Name: 'Milk', NameKey: 'Milk', ParentKey: 'Dairy' },
  Flavoring: { Name: 'Flavoring', NameKey: 'Flavoring', ParentKey: 'RawMaterials' },
  Strawberry: { Name: 'Strawberry', NameKey: 'Strawberry', ParentKey: 'Flavoring' },
  Vanilla: { Name: 'Vanilla', NameKey: 'Vanilla', ParentKey: 'Flavoring' },
};
 
export const dataMetalsProducts = {
  AllProducts: { Name: 'All Products', NameKey: 'AllProducts', ParentKey: '' },
  Can: { Name: 'Can', NameKey: 'Can', ParentKey: 'AllProducts' },
  BeverageCan: { Name: 'Beverage can', NameKey: 'BeverageCan', ParentKey: 'Can' },
  BCCanBody: { Name: 'BC can body', NameKey: 'BCCanBody', ParentKey: 'BeverageCan' },
  BCCBWide: { Name: 'BC CB wide', NameKey: 'BCCBWide', ParentKey: 'BCCanBody' },
  RawMaterials : { Name: 'Raw materials', NameKey: 'RawMaterials', ParentKey: 'AllProducts'},
  MoltenAluminum5XXX : { Name: 'Molten aluminum 5XXX', NameKey: 'MoltenAluminum5XXX', ParentKey: 'RawMaterials'},
};
 
export { dataProduct as DataProduct };
export const dataFoodProductsProvider: DataHierarchyProvider = new DataHierarchyProvider(dataFoodProducts);
export const dataMetalsProductsProvider: DataHierarchyProvider = new DataHierarchyProvider(dataMetalsProducts);