-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon-coms.js
105 lines (103 loc) · 4.37 KB
/
common-coms.js
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
var app;
(function (app) {
var infrastructure;
(function (infrastructure) {
var entities;
(function (entities) {
var FieldDef = (function () {
function FieldDef(Label, Field, Datatype) {
this.Label = Label;
this.Field = Field;
this.Datatype = Datatype;
}
return FieldDef;
}());
entities.FieldDef = FieldDef;
})(entities = infrastructure.entities || (infrastructure.entities = {}));
})(infrastructure = app.infrastructure || (app.infrastructure = {}));
})(app || (app = {}));
var app;
(function (app) {
var infrastructure;
(function (infrastructure) {
var entities;
(function (entities) {
var InformationDisplay = (function () {
function InformationDisplay(Label, Fields, Data) {
this.Label = Label;
this.Fields = Fields;
this.Data = Data;
}
return InformationDisplay;
}());
entities.InformationDisplay = InformationDisplay;
})(entities = infrastructure.entities || (infrastructure.entities = {}));
})(infrastructure = app.infrastructure || (app.infrastructure = {}));
})(app || (app = {}));
var app;
(function (app) {
var infrastructure;
(function (infrastructure) {
var services;
(function (services) {
angular.module("app.infrastructure.components.comsUtilsMdl", []);
})(services = infrastructure.services || (infrastructure.services = {}));
})(infrastructure = app.infrastructure || (app.infrastructure = {}));
})(app || (app = {}));
var app;
(function (app) {
var infrastructure;
(function (infrastructure) {
var components;
(function (components) {
var comsUtils;
(function (comsUtils) {
'use strict';
var AgGridUtils = (function () {
function AgGridUtils() {
}
AgGridUtils.prototype.getGridColumnDefinitions = function (tableFields) {
var self = this;
var columnDefs = [];
//var data: Array<app.entities.ICall> = data;
var tableFields = tableFields;
var i = 0;
if (tableFields != null && tableFields.length > 0) {
angular.forEach(tableFields, function (field) {
if (field.Datatype == "string") {
var column = {
headerName: field.Label,
field: field.Field
};
columnDefs.push(column);
}
else {
var column = {
headerName: field.Label,
field: field.Field
};
columnDefs.push(column);
}
});
}
return columnDefs;
};
AgGridUtils.prototype.tempGetTableFields = function () {
var res = [];
var temp = new app.infrastructure.entities.FieldDef("Vessel Code", "vessel.vesselCode", "string");
res.push(temp);
return res;
};
AgGridUtils.prototype.$get = function () {
return this;
};
return AgGridUtils;
}());
comsUtils.AgGridUtils = AgGridUtils;
angular
.module('app.infrastructure.components.comsUtilsMdl')
.service('app.infrastructure.components.comsUtils.agGridUtils', AgGridUtils);
})(comsUtils = components.comsUtils || (components.comsUtils = {}));
})(components = infrastructure.components || (infrastructure.components = {}));
})(infrastructure = app.infrastructure || (app.infrastructure = {}));
})(app || (app = {}));