@adins/ucviewgeneric 3.1.3 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -0
- package/esm2020/lib/model/grid-view-obj.model.mjs +8 -0
- package/esm2020/lib/model/input-grid-obj.model.mjs +23 -0
- package/esm2020/lib/ucviewgeneric.component.mjs +200 -78
- package/esm2020/lib/ucviewgeneric.module.mjs +15 -11
- package/fesm2015/adins-ucviewgeneric.mjs +232 -74
- package/fesm2015/adins-ucviewgeneric.mjs.map +1 -1
- package/fesm2020/adins-ucviewgeneric.mjs +229 -74
- package/fesm2020/adins-ucviewgeneric.mjs.map +1 -1
- package/lib/model/grid-view-obj.model.d.ts +18 -0
- package/lib/model/input-grid-obj.model.d.ts +25 -0
- package/lib/ucviewgeneric.component.d.ts +16 -8
- package/lib/ucviewgeneric.module.d.ts +3 -2
- package/package.json +2 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable, EventEmitter, Component, Input, Output, NgModule } from '@angular/core';
|
|
3
|
+
import { __awaiter } from 'tslib';
|
|
3
4
|
import * as CryptoJS from 'crypto-js';
|
|
4
5
|
import * as i1 from '@angular/router';
|
|
5
6
|
import { RouterModule } from '@angular/router';
|
|
@@ -9,7 +10,9 @@ import { TranslateModule } from '@ngx-translate/core';
|
|
|
9
10
|
import * as i4 from 'ngx-cookie';
|
|
10
11
|
import * as i5 from '@adins/uc-subsection';
|
|
11
12
|
import { UcSubsectionModule } from '@adins/uc-subsection';
|
|
12
|
-
import * as i6 from '@
|
|
13
|
+
import * as i6 from '@adins/ucgridview';
|
|
14
|
+
import { UcgridviewModule } from '@adins/ucgridview';
|
|
15
|
+
import * as i7 from '@angular/common';
|
|
13
16
|
import { CommonModule } from '@angular/common';
|
|
14
17
|
|
|
15
18
|
class UcviewgenericService {
|
|
@@ -53,6 +56,37 @@ class EnvisObj {
|
|
|
53
56
|
}
|
|
54
57
|
}
|
|
55
58
|
|
|
59
|
+
class GridViewObj {
|
|
60
|
+
constructor() {
|
|
61
|
+
this.gridViews = [];
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
class GridViewInput {
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
class InputGridObj {
|
|
68
|
+
constructor() {
|
|
69
|
+
this.apiUrl = "";
|
|
70
|
+
this.deleteUrl = "";
|
|
71
|
+
this.pageNow = 0;
|
|
72
|
+
this.pageSize = 0;
|
|
73
|
+
this.pagingJson = "";
|
|
74
|
+
this.switchValue = new Array();
|
|
75
|
+
this.addGridList = new Array();
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
class SwitchValueObj {
|
|
79
|
+
constructor() {
|
|
80
|
+
this.property = "";
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
class InputAddGridObj {
|
|
84
|
+
constructor() {
|
|
85
|
+
this.AddGridLabel = "";
|
|
86
|
+
this.AddGridProperty = "";
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
56
90
|
class UcviewgenericComponent {
|
|
57
91
|
constructor(route, http, translateService, cookieService) {
|
|
58
92
|
this.route = route;
|
|
@@ -60,16 +94,18 @@ class UcviewgenericComponent {
|
|
|
60
94
|
this.translateService = translateService;
|
|
61
95
|
this.cookieService = cookieService;
|
|
62
96
|
this.viewGenericObj = new UcViewGenericObj();
|
|
97
|
+
this.gridViewObj = new GridViewObj();
|
|
63
98
|
this.callback = new EventEmitter();
|
|
64
99
|
this.UserAccess = JSON.parse(this.GetCookie(this.cookieService, "UserAccess"));
|
|
100
|
+
this.inputGridViewObjs = new Array();
|
|
65
101
|
this.viewList = "";
|
|
66
102
|
this.isReady = false;
|
|
67
103
|
this.IsCard = true;
|
|
68
|
-
this.route.queryParams.subscribe(params => {
|
|
104
|
+
this.route.queryParams.subscribe((params) => {
|
|
69
105
|
this.getList = params;
|
|
70
106
|
});
|
|
71
|
-
this.translateService.setDefaultLang(
|
|
72
|
-
this.translateService.use(localStorage.getItem(
|
|
107
|
+
this.translateService.setDefaultLang("en");
|
|
108
|
+
this.translateService.use(localStorage.getItem("lang") || "en");
|
|
73
109
|
}
|
|
74
110
|
ngOnInit() {
|
|
75
111
|
console.log("viewgeneric");
|
|
@@ -77,18 +113,57 @@ class UcviewgenericComponent {
|
|
|
77
113
|
this.CheckIsCard();
|
|
78
114
|
}
|
|
79
115
|
CheckIsCard() {
|
|
80
|
-
if (this.viewGenericObj.IsCard == undefined ||
|
|
116
|
+
if (this.viewGenericObj.IsCard == undefined ||
|
|
117
|
+
this.viewGenericObj.IsCard == null)
|
|
81
118
|
return;
|
|
82
119
|
this.IsCard = this.viewGenericObj.IsCard;
|
|
83
120
|
}
|
|
84
121
|
initiateForm() {
|
|
85
|
-
if (this.viewGenericObj.dataInput !== undefined &&
|
|
122
|
+
if (this.viewGenericObj.dataInput !== undefined &&
|
|
123
|
+
Object.keys(this.viewGenericObj.dataInput).length !== 0) {
|
|
86
124
|
this.setConfiguration(Object.assign({}, this.viewGenericObj.dataInput));
|
|
87
125
|
return;
|
|
88
126
|
}
|
|
89
|
-
this.getJSON(this.viewGenericObj.viewInput).subscribe(data => {
|
|
127
|
+
this.getJSON(this.viewGenericObj.viewInput).subscribe((data) => {
|
|
90
128
|
this.setConfiguration(data);
|
|
91
129
|
});
|
|
130
|
+
this.initializeGridViews();
|
|
131
|
+
}
|
|
132
|
+
initializeGridViews() {
|
|
133
|
+
if (this.gridViewObj && this.gridViewObj.gridViews.length > 0) {
|
|
134
|
+
this.gridViewObj.gridViews.map((gridView) => __awaiter(this, void 0, void 0, function* () {
|
|
135
|
+
const inputGridObj = new InputGridObj();
|
|
136
|
+
inputGridObj.dataInput = gridView.tableInput;
|
|
137
|
+
inputGridObj.resultData = { Data: [] };
|
|
138
|
+
yield this.GetGridViewData(gridView.getData, inputGridObj);
|
|
139
|
+
this.inputGridViewObjs.push(inputGridObj);
|
|
140
|
+
}));
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
getEnvironment(envi) {
|
|
144
|
+
const filteredEnvis = this.viewGenericObj.listEnvironments.filter((v) => v.environment == envi);
|
|
145
|
+
return filteredEnvis.length > 0 ? filteredEnvis[0] : null;
|
|
146
|
+
}
|
|
147
|
+
GetGridViewData(meta, inputGridObj) {
|
|
148
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
149
|
+
let templListData = [];
|
|
150
|
+
const enviUrl = meta.environment && this.getEnvironment(meta.environment);
|
|
151
|
+
yield this.http
|
|
152
|
+
.post(enviUrl ? enviUrl.url + meta.apiPath : meta.apiPath, meta.reqObj)
|
|
153
|
+
.toPromise()
|
|
154
|
+
.then((response) => {
|
|
155
|
+
templListData = response[meta.customObjName || "ReturnObject"];
|
|
156
|
+
inputGridObj.apiUrl = meta.apiPath;
|
|
157
|
+
inputGridObj.resultData["Data"] = new Array();
|
|
158
|
+
inputGridObj.resultData.Data = templListData;
|
|
159
|
+
})
|
|
160
|
+
.catch((error) => {
|
|
161
|
+
console.log(error);
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
gridEvent(ev) {
|
|
166
|
+
this.callbackFunction(ev.RowObj, ev.Key);
|
|
92
167
|
}
|
|
93
168
|
setConfiguration(data) {
|
|
94
169
|
var _a;
|
|
@@ -98,36 +173,53 @@ class UcviewgenericComponent {
|
|
|
98
173
|
this.viewInfoObjList.push(j);
|
|
99
174
|
}
|
|
100
175
|
for (let i = 0; i < this.viewList.subsection.length; i++) {
|
|
101
|
-
if (this.viewList.subsection[i].querystring != null &&
|
|
176
|
+
if (this.viewList.subsection[i].querystring != null &&
|
|
177
|
+
this.viewList.subsection[i].querystring.name != "") {
|
|
102
178
|
let queryObj;
|
|
103
179
|
if (this.viewGenericObj.whereValue.length == 0) {
|
|
104
|
-
this.viewList.subsection[i].querystring.whereQuery = Object.values(this.getList);
|
|
180
|
+
this.viewList.subsection[i].querystring.whereQuery = (Object).values(this.getList);
|
|
105
181
|
}
|
|
106
182
|
else {
|
|
107
|
-
this.viewList.subsection[i].querystring.whereQuery =
|
|
183
|
+
this.viewList.subsection[i].querystring.whereQuery =
|
|
184
|
+
this.viewGenericObj.whereValue;
|
|
108
185
|
}
|
|
109
|
-
if (this.viewList.subsection[i].mainInfoPath != undefined &&
|
|
110
|
-
|
|
111
|
-
|
|
186
|
+
if (this.viewList.subsection[i].mainInfoPath != undefined &&
|
|
187
|
+
this.viewList.subsection[i].mainInfoPath != "") {
|
|
188
|
+
if (this.viewGenericObj.viewEnvironment != undefined &&
|
|
189
|
+
this.viewGenericObj.viewEnvironment != "") {
|
|
190
|
+
this.viewList.subsection[i].fullpath =
|
|
191
|
+
this.viewGenericObj.viewEnvironment +
|
|
192
|
+
this.viewList.subsection[i].mainInfoPath;
|
|
112
193
|
}
|
|
113
194
|
else {
|
|
114
|
-
this.viewList.subsection[i].fullpath =
|
|
195
|
+
this.viewList.subsection[i].fullpath =
|
|
196
|
+
this.viewList.subsection[i].mainInfoUrl;
|
|
115
197
|
}
|
|
116
198
|
}
|
|
117
199
|
else {
|
|
118
|
-
this.viewList.subsection[i].fullpath =
|
|
200
|
+
this.viewList.subsection[i].fullpath =
|
|
201
|
+
this.viewList.subsection[i].mainInfoUrl;
|
|
119
202
|
}
|
|
120
203
|
queryObj = {
|
|
121
|
-
querystring: this.viewList.subsection[i].querystring
|
|
204
|
+
querystring: this.viewList.subsection[i].querystring,
|
|
122
205
|
};
|
|
123
|
-
this.http
|
|
206
|
+
this.http
|
|
207
|
+
.post(this.viewList.subsection[i].fullpath, queryObj)
|
|
208
|
+
.subscribe((response) => {
|
|
124
209
|
this.viewInfoObjList[i] = response["Data"][0];
|
|
125
210
|
for (let y = 0; y < this.viewList.subsection[i].mainInfo.length; y++) {
|
|
126
|
-
if (this.viewList.subsection[i].mainInfo[y].propertyList !=
|
|
211
|
+
if (this.viewList.subsection[i].mainInfo[y].propertyList !=
|
|
212
|
+
undefined &&
|
|
213
|
+
this.viewList.subsection[i].mainInfo[y].propertyList.length !=
|
|
214
|
+
0) {
|
|
127
215
|
const propertyList = this.viewList.subsection[i].mainInfo[y].propertyList;
|
|
128
216
|
let concat = "";
|
|
129
217
|
for (let z = 0; z < propertyList.length; z++) {
|
|
130
|
-
concat =
|
|
218
|
+
concat =
|
|
219
|
+
concat +
|
|
220
|
+
propertyList[z].prefix +
|
|
221
|
+
this.viewInfoObjList[i][propertyList[z].property] +
|
|
222
|
+
propertyList[z].suffix;
|
|
131
223
|
}
|
|
132
224
|
this.viewList.subsection[i].mainInfo[y].concat = concat;
|
|
133
225
|
}
|
|
@@ -135,64 +227,103 @@ class UcviewgenericComponent {
|
|
|
135
227
|
if (this.viewList.subsection[i].mainInfo[y].type == "switch") {
|
|
136
228
|
for (let z = 0; z < this.viewList.subsection[i].mainInfo[y].case.length; z++) {
|
|
137
229
|
let Empty = new Array();
|
|
138
|
-
this.viewList.subsection[i].mainInfo[y].case[z].Hidden =
|
|
230
|
+
this.viewList.subsection[i].mainInfo[y].case[z].Hidden =
|
|
231
|
+
false;
|
|
139
232
|
//check hideIfEmpty
|
|
140
|
-
if (this.viewList.subsection[i].mainInfo[y].case[z].result
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
233
|
+
if (this.viewList.subsection[i].mainInfo[y].case[z].result
|
|
234
|
+
.hideIfEmpty != undefined &&
|
|
235
|
+
this.viewList.subsection[i].mainInfo[y].case[z].result
|
|
236
|
+
.hideIfEmpty != null) {
|
|
237
|
+
if (this.viewList.subsection[i].mainInfo[y].case[z].result
|
|
238
|
+
.type != "concat") {
|
|
239
|
+
Empty.push(this.viewInfoObjList[i][this.viewList.subsection[i].mainInfo[y].case[z]
|
|
240
|
+
.result.property] != undefined &&
|
|
241
|
+
this.viewInfoObjList[i][this.viewList.subsection[i].mainInfo[y].case[z]
|
|
242
|
+
.result.property] != null &&
|
|
243
|
+
this.viewInfoObjList[i][this.viewList.subsection[i].mainInfo[y].case[z]
|
|
244
|
+
.result.property] != ""
|
|
245
|
+
? false
|
|
246
|
+
: true);
|
|
145
247
|
}
|
|
146
|
-
else {
|
|
147
|
-
|
|
148
|
-
|
|
248
|
+
else {
|
|
249
|
+
// type concat
|
|
250
|
+
if (this.viewList.subsection[i].mainInfo[y].case[z].result
|
|
251
|
+
.propertyList != undefined &&
|
|
252
|
+
this.viewList.subsection[i].mainInfo[y].case[z].result
|
|
253
|
+
.propertyList.length != 0) {
|
|
254
|
+
const propertyList = this.viewList.subsection[i].mainInfo[y].case[z]
|
|
255
|
+
.result.propertyList;
|
|
149
256
|
let concat = "";
|
|
150
257
|
for (let a = 0; a < propertyList.length; a++) {
|
|
151
|
-
concat =
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
258
|
+
concat =
|
|
259
|
+
concat +
|
|
260
|
+
propertyList[a].prefix +
|
|
261
|
+
this.viewInfoObjList[i][propertyList[a].property] +
|
|
262
|
+
propertyList[a].suffix;
|
|
263
|
+
Empty.push(this.viewInfoObjList[i][propertyList[a].property] != undefined &&
|
|
264
|
+
this.viewInfoObjList[i][propertyList[a].property] != null &&
|
|
265
|
+
this.viewInfoObjList[i][propertyList[a].property] != ""
|
|
266
|
+
? false
|
|
267
|
+
: true);
|
|
155
268
|
}
|
|
156
269
|
this.viewList.subsection[i].mainInfo[y].case[z].result.concat = concat;
|
|
157
270
|
}
|
|
158
271
|
}
|
|
159
|
-
if (Empty.includes(true) &&
|
|
160
|
-
this.viewList.subsection[i].mainInfo[y].case[z].
|
|
272
|
+
if (Empty.includes(true) &&
|
|
273
|
+
this.viewList.subsection[i].mainInfo[y].case[z].result
|
|
274
|
+
.hideIfEmpty) {
|
|
275
|
+
this.viewList.subsection[i].mainInfo[y].case[z].Hidden =
|
|
276
|
+
true;
|
|
161
277
|
this.viewList.subsection[i].mainInfo[y].isHide = true;
|
|
162
278
|
}
|
|
163
279
|
}
|
|
164
280
|
else {
|
|
165
281
|
//concat
|
|
166
|
-
if (this.viewList.subsection[i].mainInfo[y].case[z].result
|
|
167
|
-
|
|
282
|
+
if (this.viewList.subsection[i].mainInfo[y].case[z].result
|
|
283
|
+
.propertyList != undefined &&
|
|
284
|
+
this.viewList.subsection[i].mainInfo[y].case[z].result
|
|
285
|
+
.propertyList.length != 0) {
|
|
286
|
+
const propertyList = this.viewList.subsection[i].mainInfo[y].case[z].result
|
|
287
|
+
.propertyList;
|
|
168
288
|
let concat = "";
|
|
169
289
|
for (let a = 0; a < propertyList.length; a++) {
|
|
170
|
-
concat =
|
|
290
|
+
concat =
|
|
291
|
+
concat +
|
|
292
|
+
propertyList[a].prefix +
|
|
293
|
+
this.viewInfoObjList[i][propertyList[a].property] +
|
|
294
|
+
propertyList[a].suffix;
|
|
171
295
|
}
|
|
172
296
|
this.viewList.subsection[i].mainInfo[y].case[z].result.concat = concat;
|
|
173
297
|
}
|
|
174
298
|
}
|
|
175
299
|
}
|
|
176
300
|
}
|
|
177
|
-
if (this.viewList.subsection[i].mainInfo[y].type == "link" &&
|
|
301
|
+
if (this.viewList.subsection[i].mainInfo[y].type == "link" &&
|
|
302
|
+
(this.viewGenericObj.navigationConst != undefined ||
|
|
303
|
+
this.viewGenericObj.navigationConst != null)) {
|
|
178
304
|
let tempLink = this.viewGenericObj.navigationConst[this.viewList.subsection[i].mainInfo[y].path];
|
|
179
305
|
if (tempLink != undefined && tempLink != null) {
|
|
180
306
|
this.viewList.subsection[i].mainInfo[y].path = tempLink;
|
|
181
307
|
}
|
|
182
308
|
}
|
|
183
|
-
if (this.viewList.subsection[i].mainInfo[y].type == "link"
|
|
184
|
-
|
|
309
|
+
if (this.viewList.subsection[i].mainInfo[y].type == "link" &&
|
|
310
|
+
this.viewGenericObj.listEnvironments != undefined &&
|
|
311
|
+
this.viewGenericObj.listEnvironments.length != 0) {
|
|
185
312
|
for (let z = 0; z < this.viewGenericObj.listEnvironments.length; z++) {
|
|
186
|
-
if (this.viewList.subsection[i].mainInfo[y].environment ==
|
|
313
|
+
if (this.viewList.subsection[i].mainInfo[y].environment ==
|
|
314
|
+
this.viewGenericObj.listEnvironments[z].environment) {
|
|
187
315
|
this.viewList.subsection[i].mainInfo[y].isFullpath = true;
|
|
188
|
-
this.viewList.subsection[i].mainInfo[y].fullpath =
|
|
316
|
+
this.viewList.subsection[i].mainInfo[y].fullpath =
|
|
317
|
+
this.viewGenericObj.listEnvironments[z].url +
|
|
318
|
+
this.viewList.subsection[i].mainInfo[y].path;
|
|
189
319
|
break;
|
|
190
320
|
}
|
|
191
321
|
}
|
|
192
322
|
}
|
|
193
323
|
else if (this.viewList.subsection[i].mainInfo[y].type == "link") {
|
|
194
324
|
this.viewList.subsection[i].mainInfo[y].isFullpath = false;
|
|
195
|
-
this.viewList.subsection[i].mainInfo[y].fullpath =
|
|
325
|
+
this.viewList.subsection[i].mainInfo[y].fullpath =
|
|
326
|
+
this.viewList.subsection[i].mainInfo[y].path;
|
|
196
327
|
}
|
|
197
328
|
}
|
|
198
329
|
this.isReady = true;
|
|
@@ -201,24 +332,34 @@ class UcviewgenericComponent {
|
|
|
201
332
|
});
|
|
202
333
|
}
|
|
203
334
|
else {
|
|
204
|
-
if (this.viewList.subsection[i].mainInfoPath != undefined &&
|
|
205
|
-
|
|
335
|
+
if (this.viewList.subsection[i].mainInfoPath != undefined &&
|
|
336
|
+
this.viewList.subsection[i].mainInfoPath != "") {
|
|
337
|
+
if (this.viewList.subsection[i].environment != undefined &&
|
|
338
|
+
this.viewList.subsection[i].mainInfoPath != "") {
|
|
206
339
|
for (let z = 0; z < this.viewGenericObj.listEnvironments.length; z++) {
|
|
207
|
-
if (this.viewList.subsection[i].environment ==
|
|
208
|
-
this.
|
|
340
|
+
if (this.viewList.subsection[i].environment ==
|
|
341
|
+
this.viewGenericObj.listEnvironments[z].environment) {
|
|
342
|
+
this.viewList.subsection[i].fullpath =
|
|
343
|
+
this.viewGenericObj.listEnvironments[z].url +
|
|
344
|
+
this.viewList.subsection[i].mainInfoPath;
|
|
209
345
|
break;
|
|
210
346
|
}
|
|
211
347
|
}
|
|
212
348
|
}
|
|
213
|
-
else if (this.viewGenericObj.viewEnvironment != undefined &&
|
|
214
|
-
this.
|
|
349
|
+
else if (this.viewGenericObj.viewEnvironment != undefined &&
|
|
350
|
+
this.viewGenericObj.viewEnvironment != "") {
|
|
351
|
+
this.viewList.subsection[i].fullpath =
|
|
352
|
+
this.viewGenericObj.viewEnvironment +
|
|
353
|
+
this.viewList.subsection[i].mainInfoPath;
|
|
215
354
|
}
|
|
216
355
|
else {
|
|
217
|
-
this.viewList.subsection[i].fullpath =
|
|
356
|
+
this.viewList.subsection[i].fullpath =
|
|
357
|
+
this.viewList.subsection[i].mainInfoUrl;
|
|
218
358
|
}
|
|
219
359
|
}
|
|
220
360
|
else {
|
|
221
|
-
this.viewList.subsection[i].fullpath =
|
|
361
|
+
this.viewList.subsection[i].fullpath =
|
|
362
|
+
this.viewList.subsection[i].mainInfoUrl;
|
|
222
363
|
}
|
|
223
364
|
const reqObj = (_a = this.viewList.subsection[i].reqObj) !== null && _a !== void 0 ? _a : this.getList;
|
|
224
365
|
if (this.viewList.subsection[i].reqObj !== undefined) {
|
|
@@ -227,11 +368,13 @@ class UcviewgenericComponent {
|
|
|
227
368
|
}
|
|
228
369
|
}
|
|
229
370
|
this.http.post(this.viewList.subsection[i].fullpath, reqObj).subscribe((response) => {
|
|
230
|
-
if (this.viewList.subsection[i].resObjName === undefined ||
|
|
371
|
+
if (this.viewList.subsection[i].resObjName === undefined ||
|
|
372
|
+
this.viewList.subsection[i].resObjName === "") {
|
|
231
373
|
this.viewInfoObjList[i] = response;
|
|
232
374
|
}
|
|
233
375
|
else {
|
|
234
|
-
this.viewInfoObjList[i] =
|
|
376
|
+
this.viewInfoObjList[i] =
|
|
377
|
+
response[this.viewList.subsection[i].resObjName];
|
|
235
378
|
}
|
|
236
379
|
this.isReady = true;
|
|
237
380
|
}, (error) => {
|
|
@@ -245,24 +388,29 @@ class UcviewgenericComponent {
|
|
|
245
388
|
}
|
|
246
389
|
GetCookie(cookieService, key) {
|
|
247
390
|
let value = cookieService.get(key);
|
|
248
|
-
if (value == undefined || value.trim() ==
|
|
391
|
+
if (value == undefined || value.trim() == "")
|
|
249
392
|
return null;
|
|
250
393
|
return this.DecryptString(value, "AdInsFOU12345678");
|
|
251
394
|
}
|
|
252
395
|
DecryptString(chipperText, chipperKey) {
|
|
253
|
-
if (chipperKey == undefined ||
|
|
254
|
-
|
|
396
|
+
if (chipperKey == undefined ||
|
|
397
|
+
chipperKey.trim() == "" ||
|
|
398
|
+
chipperText == undefined ||
|
|
399
|
+
chipperText.trim() == "")
|
|
255
400
|
return chipperText;
|
|
256
401
|
let chipperKeyArr = CryptoJS.enc.Utf8.parse(chipperKey);
|
|
257
402
|
let iv = CryptoJS.lib.WordArray.create([0x00, 0x00, 0x00, 0x00]);
|
|
258
|
-
let decrypted = CryptoJS.AES.decrypt(chipperText, chipperKeyArr, {
|
|
403
|
+
let decrypted = CryptoJS.AES.decrypt(chipperText, chipperKeyArr, {
|
|
404
|
+
iv: iv,
|
|
405
|
+
});
|
|
259
406
|
let plainText = decrypted.toString(CryptoJS.enc.Utf8);
|
|
260
407
|
return plainText;
|
|
261
408
|
}
|
|
262
409
|
genAction(viewObj, param) {
|
|
263
410
|
let arrList = {};
|
|
264
411
|
for (let i = 0; i < param.length; i++) {
|
|
265
|
-
if (viewObj[param[i].type] != undefined ||
|
|
412
|
+
if (viewObj[param[i].type] != undefined ||
|
|
413
|
+
viewObj[param[i].property] != undefined) {
|
|
266
414
|
arrList[param[i].type] = viewObj[param[i].property];
|
|
267
415
|
}
|
|
268
416
|
else {
|
|
@@ -273,7 +421,8 @@ class UcviewgenericComponent {
|
|
|
273
421
|
}
|
|
274
422
|
genRouterLink(urlLink) {
|
|
275
423
|
let tempLink = urlLink;
|
|
276
|
-
if (this.viewGenericObj.navigationConst != undefined &&
|
|
424
|
+
if (this.viewGenericObj.navigationConst != undefined &&
|
|
425
|
+
this.viewGenericObj.navigationConst[urlLink] != null) {
|
|
277
426
|
tempLink = this.viewGenericObj.navigationConst[urlLink];
|
|
278
427
|
}
|
|
279
428
|
return tempLink;
|
|
@@ -294,7 +443,7 @@ class UcviewgenericComponent {
|
|
|
294
443
|
callbackFunction(item, key = "") {
|
|
295
444
|
let CBObj = {
|
|
296
445
|
ViewObj: item,
|
|
297
|
-
Key: key
|
|
446
|
+
Key: key,
|
|
298
447
|
};
|
|
299
448
|
this.callback.emit(CBObj);
|
|
300
449
|
}
|
|
@@ -305,7 +454,8 @@ class UcviewgenericComponent {
|
|
|
305
454
|
for (let i = 0; i < condList.conditions.length; i++) {
|
|
306
455
|
if (condList.conditions[i].restriction == "EQ") {
|
|
307
456
|
if (condList.conditions[i].isUser != true) {
|
|
308
|
-
if (item[condList.conditions[i].property] ==
|
|
457
|
+
if (item[condList.conditions[i].property] ==
|
|
458
|
+
condList.conditions[i].value) {
|
|
309
459
|
condition = true;
|
|
310
460
|
}
|
|
311
461
|
else {
|
|
@@ -325,7 +475,8 @@ class UcviewgenericComponent {
|
|
|
325
475
|
}
|
|
326
476
|
else if (condList.conditions[i].restriction == "NEQ") {
|
|
327
477
|
if (condList.conditions[i].isUser != true) {
|
|
328
|
-
if (item[condList.conditions[i].property] !=
|
|
478
|
+
if (item[condList.conditions[i].property] !=
|
|
479
|
+
condList.conditions[i].value) {
|
|
329
480
|
condition = true;
|
|
330
481
|
}
|
|
331
482
|
else {
|
|
@@ -365,7 +516,8 @@ class UcviewgenericComponent {
|
|
|
365
516
|
}
|
|
366
517
|
else if (condList.conditions[i].restriction == "GTE") {
|
|
367
518
|
if (condList.conditions[i].isUser != true) {
|
|
368
|
-
if (item[condList.conditions[i].property] >=
|
|
519
|
+
if (item[condList.conditions[i].property] >=
|
|
520
|
+
condList.conditions[i].value) {
|
|
369
521
|
condition = true;
|
|
370
522
|
}
|
|
371
523
|
else {
|
|
@@ -405,7 +557,8 @@ class UcviewgenericComponent {
|
|
|
405
557
|
}
|
|
406
558
|
else if (condList.conditions[i].restriction == "LTE") {
|
|
407
559
|
if (condList.conditions[i].isUser != true) {
|
|
408
|
-
if (item[condList.conditions[i].property] <=
|
|
560
|
+
if (item[condList.conditions[i].property] <=
|
|
561
|
+
condList.conditions[i].value) {
|
|
409
562
|
condition = true;
|
|
410
563
|
}
|
|
411
564
|
else {
|
|
@@ -425,7 +578,7 @@ class UcviewgenericComponent {
|
|
|
425
578
|
}
|
|
426
579
|
else if (condList.conditions[i].restriction == "IN") {
|
|
427
580
|
if (condList.conditions[i].isUser != true) {
|
|
428
|
-
if (condList.conditions[i].value.findIndex(x => x == item[condList.conditions[i].property]) >= 0) {
|
|
581
|
+
if (condList.conditions[i].value.findIndex((x) => x == item[condList.conditions[i].property]) >= 0) {
|
|
429
582
|
condition = true;
|
|
430
583
|
}
|
|
431
584
|
else {
|
|
@@ -434,7 +587,7 @@ class UcviewgenericComponent {
|
|
|
434
587
|
}
|
|
435
588
|
}
|
|
436
589
|
else {
|
|
437
|
-
if (condList.conditions[i].value.findIndex(x => x == this.UserAccess["UserName"]) >= 0) {
|
|
590
|
+
if (condList.conditions[i].value.findIndex((x) => x == this.UserAccess["UserName"]) >= 0) {
|
|
438
591
|
condition = true;
|
|
439
592
|
}
|
|
440
593
|
else {
|
|
@@ -445,7 +598,7 @@ class UcviewgenericComponent {
|
|
|
445
598
|
}
|
|
446
599
|
else if (condList.conditions[i].restriction == "NIN") {
|
|
447
600
|
if (condList.conditions[i].isUser != true) {
|
|
448
|
-
if (condList.conditions[i].value.findIndex(x => x == item[condList.conditions[i].property]) == -1) {
|
|
601
|
+
if (condList.conditions[i].value.findIndex((x) => x == item[condList.conditions[i].property]) == -1) {
|
|
449
602
|
condition = true;
|
|
450
603
|
}
|
|
451
604
|
else {
|
|
@@ -454,7 +607,7 @@ class UcviewgenericComponent {
|
|
|
454
607
|
}
|
|
455
608
|
}
|
|
456
609
|
else {
|
|
457
|
-
if (condList.conditions[i].value.findIndex(x => x == this.UserAccess["UserName"]) == -1) {
|
|
610
|
+
if (condList.conditions[i].value.findIndex((x) => x == this.UserAccess["UserName"]) == -1) {
|
|
458
611
|
condition = true;
|
|
459
612
|
}
|
|
460
613
|
else {
|
|
@@ -468,12 +621,14 @@ class UcviewgenericComponent {
|
|
|
468
621
|
}
|
|
469
622
|
}
|
|
470
623
|
/** @nocollapse */ UcviewgenericComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UcviewgenericComponent, deps: [{ token: i1.ActivatedRoute }, { token: i2.HttpClient }, { token: i3.TranslateService }, { token: i4.CookieService }], target: i0.ɵɵFactoryTarget.Component });
|
|
471
|
-
/** @nocollapse */ UcviewgenericComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: UcviewgenericComponent, selector: "lib-ucviewgeneric", inputs: { viewGenericObj: "viewGenericObj" }, outputs: { callback: "callback" }, ngImport: i0, template: "<section id=\"horizontal-form-layouts\">\r\n <div class=\"row text-left\">\r\n <div class=\"col-md-12\">\r\n <div [ngClass]=\"IsCard ? 'card' : ''\" *ngIf=\"isReady\">\r\n <div class=\"pl-3 mb-2 mt-2\" *ngIf=\"viewList?.title != ''\">\r\n <h4 class=\"card-title ucSearch-title\" id=\"horz-layout-colored-controls\" translate>{{viewList.title}}</h4>\r\n </div>\r\n <div class=\"card-body\" *ngFor=\"let ss of viewList?.subsection;let i = index;\">\r\n <div class=\"px-3\">\r\n <lib-ucSubsection *ngIf=\"ss.subsection != ''\" [id]=\"ss.subSectionId + 'id'\" [title]=\"ss.subSectionTitle\"\r\n [panel]=\"ss.subSectionId\">\r\n </lib-ucSubsection>\r\n <div class=\"form-body\" [id]='ss.subSectionId'>\r\n <div class=\"form-group row\">\r\n <div *ngFor=\"let mi of ss?.mainInfo\"\r\n [ngClass]=\"{ 'col-md-6': mi.isHide == undefined || !mi.isHide || (viewInfoObjList[i][mi.property] != '' && viewInfoObjList[i][mi.property] != null)}\">\r\n <span\r\n *ngIf=\"mi.isHide == undefined || !mi.isHide || (viewInfoObjList[i][mi.property] != '' && viewInfoObjList[i][mi.property] != null)\">\r\n <div class=\"row\">\r\n <div class=\"col-md-6\" *ngIf=\"mi.type != 'switch'\">\r\n <label class=\"label-control\"\r\n [ngClass]=\"mi.customClassLabel != undefined ? mi.customClassLabel : ''\" translate>{{mi.label}}</label>\r\n </div>\r\n <div class=\"col-md-6\" *ngIf=\"mi.type == 'switch'\">\r\n <div *ngFor=\"let case of mi?.case\">\r\n <div *ngIf=\"switchCase(viewInfoObjList[i],case)\">\r\n <label class=\"label-control\"\r\n [ngClass]=\"mi.customClassLabel != undefined ? mi.customClassLabel : ''\" translate>{{case.result.label}}</label>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"viewInfoObjList[i] != undefined\" class=\"col-md-6\" [ngClass]=\"{ 'text-left': mi.position == 'left',\r\n 'text-right': mi.position == 'right', 'text-center': mi.position == 'center' }\">\r\n <span\r\n *ngIf=\"(mi.type == 'boolean' && viewInfoObjList[i][mi.property] != null) || (viewInfoObjList[i][mi.property] != '' && viewInfoObjList[i][mi.property] != null) || mi.type == 'switch' || mi.type =='concat'; then nonEmptyLabel else emptyLabel\"></span>\r\n <ng-template #emptyLabel>\r\n <label class=\"label-control\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\"\r\n translate>-</label>\r\n </ng-template>\r\n <ng-template #nonEmptyLabel>\r\n <span *ngIf=\"mi.type == 'text'\">\r\n <label\r\n *ngIf=\"viewInfoObjList[i][mi.property] != '' && viewInfoObjList[i][mi.property] != null\"\r\n class=\"label-control breakword\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n {{ viewInfoObjList[i][mi.property] }}\r\n </label>\r\n <label\r\n *ngIf=\"viewInfoObjList[i][mi.property] == '' || viewInfoObjList[i][mi.property] == null\"\r\n class=\"label-control\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>-\r\n </label>\r\n </span>\r\n <label *ngIf=\"mi.type == 'currency'\" class=\"label-control\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n {{ viewInfoObjList[i][mi.property] | number: mi?.precision ? mi?.precision : '0.2' :'en-US'}} <span *ngIf=\"mi?.IsPrcnt\"> %</span> </label>\r\n <label *ngIf=\"mi.type == 'date'\" class=\"label-control\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n {{ viewInfoObjList[i][mi.property] | date: (mi?.dateFormat) ? mi?.dateFormat : 'dd-MMM-yyyy'}} </label>\r\n <label *ngIf=\"mi.type == 'link'\" class=\"label-control\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n <a *ngIf=\"!mi?.isFullpath\" [routerLink]=\"genRouterLink(mi.path)\" [target]=\"mi.target\"\r\n [queryParams]=\"genAction(viewInfoObjList[i], mi.param)\">\r\n <span *ngIf=\"(mi.isCurrency != undefined && mi.isCurrency)\">{{\r\n viewInfoObjList[i][mi.property] | number:'.2':'en-US' }}</span>\r\n <span *ngIf=\"(mi.isCurrency == undefined || !mi.isCurrency)\">{{\r\n viewInfoObjList[i][mi.property] }}</span>\r\n </a>\r\n <a *ngIf=\"mi?.isFullpath\" href=\"javascript:void(0);\"\r\n (click)=\"redirectFullPath(mi.fullpath, genAction(viewInfoObjList[i], mi.param), mi.target)\">\r\n <span *ngIf=\"(mi.isCurrency != undefined && mi.isCurrency)\">{{\r\n viewInfoObjList[i][mi.property] | number:'.2':'en-US' }}</span>\r\n <span *ngIf=\"(mi.isCurrency == undefined || !mi.isCurrency)\">{{\r\n viewInfoObjList[i][mi.property] }}</span>\r\n </a>\r\n </label>\r\n <label *ngIf=\"mi.type == 'callback'\" class=\"label-control\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n <a href=\"javascript:void(0);\" (click)=\"callbackFunction(viewInfoObjList[i], mi.key)\">\r\n {{ viewInfoObjList[i][mi.property] }}\r\n </a>\r\n </label>\r\n <textarea *ngIf=\"mi.type == 'textarea'\" class=\"form-control\" readonly\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\"\r\n translate> {{ viewInfoObjList[i][mi.property] }} </textarea>\r\n <span *ngIf=\"mi.type == 'boolean'\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n <label *ngIf=\"viewInfoObjList[i][mi.property] == true\">Yes</label>\r\n <label *ngIf=\"viewInfoObjList[i][mi.property] == false\">No</label>\r\n <!-- <label\r\n *ngIf=\"viewInfoObjList[i][mi.property] == '' || viewInfoObjList[i][mi.property] == null\">-</label> -->\r\n </span>\r\n <span *ngIf=\"mi.type == 'concat'\">\r\n <label class=\"label-control breakword\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n {{ mi.concat }}\r\n </label>\r\n </span>\r\n <span *ngIf=\"mi.type == 'switch'\">\r\n <span *ngFor=\"let cs of mi?.case\">\r\n <span *ngIf=\"switchCase(viewInfoObjList[i],cs) && !cs.Hidden\">\r\n <span class=\"label-control breakword\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\"\r\n translate *ngIf=\"cs.result.type == 'text'\">{{ viewInfoObjList[i][cs.result.property]\r\n }}\r\n </span>\r\n <span [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\"\r\n translate *ngIf=\"cs.result.type == 'decimal'\">{{\r\n viewInfoObjList[i][cs.result.property] | number:'.2':'en-US' }}</span>\r\n <span [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\"\r\n translate *ngIf=\"cs.result.type == 'date'\">{{ viewInfoObjList[i][cs.result.property] |\r\n date: 'dd-MMM-yyyy' }}\r\n </span>\r\n <span *ngIf=\"cs.result.type == 'link'\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\"\r\n translate>\r\n <a [target]=\"cs.result.target\" [routerLink]=\"genRouterLink(cs.result.path)\"\r\n [queryParams]=\"genAction(viewInfoObjList[i],cs.result.param)\">\r\n <span *ngIf=\"(mi.isCurrency != undefined && mi.isCurrency)\">{{\r\n viewInfoObjList[i][cs.result.property] | number:'.2':'en-US' }}</span>\r\n <span *ngIf=\"(mi.isCurrency == undefined || !mi.isCurrency)\">{{\r\n viewInfoObjList[i][cs.result.property] }}</span>\r\n </a>\r\n </span>\r\n <span *ngIf=\"cs.result.type == 'boolean'\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\"\r\n translate>\r\n <span *ngIf=\"viewInfoObjList[i][cs.result.property] == 'true'\">Yes</span>\r\n <span *ngIf=\"viewInfoObjList[i][cs.result.property] == 'false'\">No</span>\r\n </span>\r\n <span *ngIf=\"cs.result.type == 'concat'\">\r\n <label class=\"label-control breakword\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n {{ cs.result.concat }}\r\n </label>\r\n </span>\r\n <span *ngIf=\"cs.result.type == 'callback'\">\r\n <span\r\n *ngIf=\"cs.result.isText != undefined && cs.result.isText; then textCallback else iconCallback\"></span>\r\n <ng-template #textCallback>\r\n <span>\r\n <a href=\"javascript:void(0);\" (click)=\"callbackFunction(viewInfoObjList[i], cs.result.key)\">{{\r\n viewInfoObjList[i][cs.result.property] }}</a>\r\n </span>\r\n </ng-template>\r\n <ng-template #iconCallback>\r\n <span>\r\n <a [ngClass]=\"[cs.result.tooltip != undefined && cs.result.tooltip != '' ? 'tooltips' : '', cs.result.anchor == undefined || cs.result.anchor == '' ? 'success p-0' : cs.result.anchor]\"\r\n (click)=\"callbackFunction(viewInfoObjList[i], cs.result.key)\">\r\n <i class=\"font-medium-3 mr-2\"\r\n [ngClass]=\" cs.result.icon == undefined || cs.result.icon == '' ? 'ft-edit-2' : cs.result.icon \">\r\n </i>\r\n <span *ngIf=\"cs.result.tooltip != undefined && cs.result.tooltip != ''\"\r\n [ngClass]=\"cs.result.tooltip != undefined && cs.result.tooltip != '' ? 'tooltipstext' : ''\">\r\n {{cs.result.tooltip}}\r\n </span>\r\n </a>\r\n </span>\r\n </ng-template>\r\n </span>\r\n </span>\r\n </span>\r\n </span>\r\n </ng-template>\r\n </div>\r\n </div>\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</section>", components: [{ type: i5.UcSubsectionComponent, selector: "lib-ucSubsection", inputs: ["title", "panel", "id"] }], directives: [{ type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }], pipes: { "number": i6.DecimalPipe, "date": i6.DatePipe } });
|
|
624
|
+
/** @nocollapse */ UcviewgenericComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: UcviewgenericComponent, selector: "lib-ucviewgeneric", inputs: { viewGenericObj: "viewGenericObj", gridViewObj: "gridViewObj" }, outputs: { callback: "callback" }, ngImport: i0, template: "<section id=\"horizontal-form-layouts\">\r\n <div class=\"row text-left\">\r\n <div class=\"col-md-12\">\r\n <div [ngClass]=\"IsCard ? 'card' : ''\" *ngIf=\"isReady\">\r\n <div class=\"pl-3 mb-2 mt-2\" *ngIf=\"viewList?.title != ''\">\r\n <h4 class=\"card-title ucSearch-title\" id=\"horz-layout-colored-controls\" translate>{{viewList.title}}</h4>\r\n </div>\r\n <div class=\"card-body\" *ngFor=\"let ss of viewList?.subsection;let i = index;\">\r\n <div class=\"px-3\">\r\n <lib-ucSubsection *ngIf=\"ss.subsection != ''\" [id]=\"ss.subSectionId + 'id'\" [title]=\"ss.subSectionTitle\"\r\n [panel]=\"ss.subSectionId\">\r\n </lib-ucSubsection>\r\n <div class=\"form-body\" [id]='ss.subSectionId'>\r\n <div class=\"form-group row\">\r\n <div *ngFor=\"let mi of ss?.mainInfo\"\r\n [ngClass]=\"{ 'col-md-6': mi.isHide == undefined || !mi.isHide || (viewInfoObjList[i][mi.property] != '' && viewInfoObjList[i][mi.property] != null)}\">\r\n <span\r\n *ngIf=\"mi.isHide == undefined || !mi.isHide || (viewInfoObjList[i][mi.property] != '' && viewInfoObjList[i][mi.property] != null)\">\r\n <div class=\"row\">\r\n <div class=\"col-md-6\" *ngIf=\"mi.type != 'switch'\">\r\n <label class=\"label-control\"\r\n [ngClass]=\"mi.customClassLabel != undefined ? mi.customClassLabel : ''\" translate>{{mi.label}}</label>\r\n </div>\r\n <div class=\"col-md-6\" *ngIf=\"mi.type == 'switch'\">\r\n <div *ngFor=\"let case of mi?.case\">\r\n <div *ngIf=\"switchCase(viewInfoObjList[i],case)\">\r\n <label class=\"label-control\"\r\n [ngClass]=\"mi.customClassLabel != undefined ? mi.customClassLabel : ''\" translate>{{case.result.label}}</label>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"viewInfoObjList[i] != undefined\" class=\"col-md-6\" [ngClass]=\"{ 'text-left': mi.position == 'left',\r\n 'text-right': mi.position == 'right', 'text-center': mi.position == 'center' }\">\r\n <span\r\n *ngIf=\"(mi.type == 'boolean' && viewInfoObjList[i][mi.property] != null) || (viewInfoObjList[i][mi.property] != '' && viewInfoObjList[i][mi.property] != null) || mi.type == 'switch' || mi.type =='concat'; then nonEmptyLabel else emptyLabel\"></span>\r\n <ng-template #emptyLabel>\r\n <label class=\"label-control\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\"\r\n translate>-</label>\r\n </ng-template>\r\n <ng-template #nonEmptyLabel>\r\n <span *ngIf=\"mi.type == 'text'\">\r\n <label\r\n *ngIf=\"viewInfoObjList[i][mi.property] != '' && viewInfoObjList[i][mi.property] != null\"\r\n class=\"label-control breakword\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n {{ viewInfoObjList[i][mi.property] }}\r\n </label>\r\n <label\r\n *ngIf=\"viewInfoObjList[i][mi.property] == '' || viewInfoObjList[i][mi.property] == null\"\r\n class=\"label-control\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>-\r\n </label>\r\n </span>\r\n <label *ngIf=\"mi.type == 'currency'\" class=\"label-control\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n {{ viewInfoObjList[i][mi.property] | number: mi?.precision ? mi?.precision : '0.2' :'en-US'}} <span *ngIf=\"mi?.IsPrcnt\"> %</span> </label>\r\n <label *ngIf=\"mi.type == 'date'\" class=\"label-control\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n {{ viewInfoObjList[i][mi.property] | date: (mi?.dateFormat) ? mi?.dateFormat : 'dd-MMM-yyyy'}} </label>\r\n <label *ngIf=\"mi.type == 'link'\" class=\"label-control\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n <a *ngIf=\"!mi?.isFullpath\" [routerLink]=\"genRouterLink(mi.path)\" [target]=\"mi.target\"\r\n [queryParams]=\"genAction(viewInfoObjList[i], mi.param)\">\r\n <span *ngIf=\"(mi.isCurrency != undefined && mi.isCurrency)\">{{\r\n viewInfoObjList[i][mi.property] | number:'.2':'en-US' }}</span>\r\n <span *ngIf=\"(mi.isCurrency == undefined || !mi.isCurrency)\">{{\r\n viewInfoObjList[i][mi.property] }}</span>\r\n </a>\r\n <a *ngIf=\"mi?.isFullpath\" href=\"javascript:void(0);\"\r\n (click)=\"redirectFullPath(mi.fullpath, genAction(viewInfoObjList[i], mi.param), mi.target)\">\r\n <span *ngIf=\"(mi.isCurrency != undefined && mi.isCurrency)\">{{\r\n viewInfoObjList[i][mi.property] | number:'.2':'en-US' }}</span>\r\n <span *ngIf=\"(mi.isCurrency == undefined || !mi.isCurrency)\">{{\r\n viewInfoObjList[i][mi.property] }}</span>\r\n </a>\r\n </label>\r\n <label *ngIf=\"mi.type == 'callback'\" class=\"label-control\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n <a href=\"javascript:void(0);\" (click)=\"callbackFunction(viewInfoObjList[i], mi.key)\">\r\n {{ viewInfoObjList[i][mi.property] }}\r\n </a>\r\n </label>\r\n <textarea *ngIf=\"mi.type == 'textarea'\" class=\"form-control\" readonly\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\"\r\n translate> {{ viewInfoObjList[i][mi.property] }} </textarea>\r\n <span *ngIf=\"mi.type == 'boolean'\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n <label *ngIf=\"viewInfoObjList[i][mi.property] == true\">Yes</label>\r\n <label *ngIf=\"viewInfoObjList[i][mi.property] == false\">No</label>\r\n <!-- <label\r\n *ngIf=\"viewInfoObjList[i][mi.property] == '' || viewInfoObjList[i][mi.property] == null\">-</label> -->\r\n </span>\r\n <span *ngIf=\"mi.type == 'concat'\">\r\n <label class=\"label-control breakword\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n {{ mi.concat }}\r\n </label>\r\n </span>\r\n <span *ngIf=\"mi.type == 'switch'\">\r\n <span *ngFor=\"let cs of mi?.case\">\r\n <span *ngIf=\"switchCase(viewInfoObjList[i],cs) && !cs.Hidden\">\r\n <span class=\"label-control breakword\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\"\r\n translate *ngIf=\"cs.result.type == 'text'\">{{ viewInfoObjList[i][cs.result.property]\r\n }}\r\n </span>\r\n <span [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\"\r\n translate *ngIf=\"cs.result.type == 'decimal'\">{{\r\n viewInfoObjList[i][cs.result.property] | number:'.2':'en-US' }}</span>\r\n <span [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\"\r\n translate *ngIf=\"cs.result.type == 'date'\">{{ viewInfoObjList[i][cs.result.property] |\r\n date: 'dd-MMM-yyyy' }}\r\n </span>\r\n <span *ngIf=\"cs.result.type == 'link'\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\"\r\n translate>\r\n <a [target]=\"cs.result.target\" [routerLink]=\"genRouterLink(cs.result.path)\"\r\n [queryParams]=\"genAction(viewInfoObjList[i],cs.result.param)\">\r\n <span *ngIf=\"(mi.isCurrency != undefined && mi.isCurrency)\">{{\r\n viewInfoObjList[i][cs.result.property] | number:'.2':'en-US' }}</span>\r\n <span *ngIf=\"(mi.isCurrency == undefined || !mi.isCurrency)\">{{\r\n viewInfoObjList[i][cs.result.property] }}</span>\r\n </a>\r\n </span>\r\n <span *ngIf=\"cs.result.type == 'boolean'\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\"\r\n translate>\r\n <span *ngIf=\"viewInfoObjList[i][cs.result.property] == 'true'\">Yes</span>\r\n <span *ngIf=\"viewInfoObjList[i][cs.result.property] == 'false'\">No</span>\r\n </span>\r\n <span *ngIf=\"cs.result.type == 'concat'\">\r\n <label class=\"label-control breakword\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n {{ cs.result.concat }}\r\n </label>\r\n </span>\r\n <span *ngIf=\"cs.result.type == 'callback'\">\r\n <span\r\n *ngIf=\"cs.result.isText != undefined && cs.result.isText; then textCallback else iconCallback\"></span>\r\n <ng-template #textCallback>\r\n <span>\r\n <a href=\"javascript:void(0);\" (click)=\"callbackFunction(viewInfoObjList[i], cs.result.key)\">{{\r\n viewInfoObjList[i][cs.result.property] }}</a>\r\n </span>\r\n </ng-template>\r\n <ng-template #iconCallback>\r\n <span>\r\n <a [ngClass]=\"[cs.result.tooltip != undefined && cs.result.tooltip != '' ? 'tooltips' : '', cs.result.anchor == undefined || cs.result.anchor == '' ? 'success p-0' : cs.result.anchor]\"\r\n (click)=\"callbackFunction(viewInfoObjList[i], cs.result.key)\">\r\n <i class=\"font-medium-3 mr-2\"\r\n [ngClass]=\" cs.result.icon == undefined || cs.result.icon == '' ? 'ft-edit-2' : cs.result.icon \">\r\n </i>\r\n <span *ngIf=\"cs.result.tooltip != undefined && cs.result.tooltip != ''\"\r\n [ngClass]=\"cs.result.tooltip != undefined && cs.result.tooltip != '' ? 'tooltipstext' : ''\">\r\n {{cs.result.tooltip}}\r\n </span>\r\n </a>\r\n </span>\r\n </ng-template>\r\n </span>\r\n </span>\r\n </span>\r\n </span>\r\n </ng-template>\r\n </div>\r\n </div>\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"px-3 grid-view\" *ngIf=\"gridViewObj.gridViews.length > 0\">\r\n <div *ngFor=\"let gridView of inputGridViewObjs;let i = index\">\r\n <lib-ucSubsection\r\n *ngIf=\"gridViewObj.gridViews[i].subsection && gridViewObj.gridViews[i].subsection !== ''\"\r\n [id]=\"'grid-subsection-id'+i\"\r\n [title]=\"gridViewObj.gridViews[i].subsection\"\r\n [panel]=\"'grid-subsection-panel-'+i\">\r\n </lib-ucSubsection>\r\n <div class=\"form-body\" [id]=\"'grid-subsection-panel-'+i\">\r\n <lib-ucgridview [gridInput]=\"gridView\" (callback)=\"gridEvent($event)\" (isRefresh)=\"GetGridViewData(gridViewObj.gridViews[i], gridView)\"></lib-ucgridview>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</section>\r\n", components: [{ type: i5.UcSubsectionComponent, selector: "lib-ucSubsection", inputs: ["title", "panel", "id"] }, { type: i6.UcgridviewComponent, selector: "lib-ucgridview", inputs: ["gridInput", "additionalObj"], outputs: ["output", "callback", "callbackCheckBox", "isRefresh"] }], directives: [{ type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }], pipes: { "number": i7.DecimalPipe, "date": i7.DatePipe } });
|
|
472
625
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UcviewgenericComponent, decorators: [{
|
|
473
626
|
type: Component,
|
|
474
|
-
args: [{ selector: 'lib-ucviewgeneric', styles: [], template: "<section id=\"horizontal-form-layouts\">\r\n <div class=\"row text-left\">\r\n <div class=\"col-md-12\">\r\n <div [ngClass]=\"IsCard ? 'card' : ''\" *ngIf=\"isReady\">\r\n <div class=\"pl-3 mb-2 mt-2\" *ngIf=\"viewList?.title != ''\">\r\n <h4 class=\"card-title ucSearch-title\" id=\"horz-layout-colored-controls\" translate>{{viewList.title}}</h4>\r\n </div>\r\n <div class=\"card-body\" *ngFor=\"let ss of viewList?.subsection;let i = index;\">\r\n <div class=\"px-3\">\r\n <lib-ucSubsection *ngIf=\"ss.subsection != ''\" [id]=\"ss.subSectionId + 'id'\" [title]=\"ss.subSectionTitle\"\r\n [panel]=\"ss.subSectionId\">\r\n </lib-ucSubsection>\r\n <div class=\"form-body\" [id]='ss.subSectionId'>\r\n <div class=\"form-group row\">\r\n <div *ngFor=\"let mi of ss?.mainInfo\"\r\n [ngClass]=\"{ 'col-md-6': mi.isHide == undefined || !mi.isHide || (viewInfoObjList[i][mi.property] != '' && viewInfoObjList[i][mi.property] != null)}\">\r\n <span\r\n *ngIf=\"mi.isHide == undefined || !mi.isHide || (viewInfoObjList[i][mi.property] != '' && viewInfoObjList[i][mi.property] != null)\">\r\n <div class=\"row\">\r\n <div class=\"col-md-6\" *ngIf=\"mi.type != 'switch'\">\r\n <label class=\"label-control\"\r\n [ngClass]=\"mi.customClassLabel != undefined ? mi.customClassLabel : ''\" translate>{{mi.label}}</label>\r\n </div>\r\n <div class=\"col-md-6\" *ngIf=\"mi.type == 'switch'\">\r\n <div *ngFor=\"let case of mi?.case\">\r\n <div *ngIf=\"switchCase(viewInfoObjList[i],case)\">\r\n <label class=\"label-control\"\r\n [ngClass]=\"mi.customClassLabel != undefined ? mi.customClassLabel : ''\" translate>{{case.result.label}}</label>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"viewInfoObjList[i] != undefined\" class=\"col-md-6\" [ngClass]=\"{ 'text-left': mi.position == 'left',\r\n 'text-right': mi.position == 'right', 'text-center': mi.position == 'center' }\">\r\n <span\r\n *ngIf=\"(mi.type == 'boolean' && viewInfoObjList[i][mi.property] != null) || (viewInfoObjList[i][mi.property] != '' && viewInfoObjList[i][mi.property] != null) || mi.type == 'switch' || mi.type =='concat'; then nonEmptyLabel else emptyLabel\"></span>\r\n <ng-template #emptyLabel>\r\n <label class=\"label-control\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\"\r\n translate>-</label>\r\n </ng-template>\r\n <ng-template #nonEmptyLabel>\r\n <span *ngIf=\"mi.type == 'text'\">\r\n <label\r\n *ngIf=\"viewInfoObjList[i][mi.property] != '' && viewInfoObjList[i][mi.property] != null\"\r\n class=\"label-control breakword\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n {{ viewInfoObjList[i][mi.property] }}\r\n </label>\r\n <label\r\n *ngIf=\"viewInfoObjList[i][mi.property] == '' || viewInfoObjList[i][mi.property] == null\"\r\n class=\"label-control\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>-\r\n </label>\r\n </span>\r\n <label *ngIf=\"mi.type == 'currency'\" class=\"label-control\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n {{ viewInfoObjList[i][mi.property] | number: mi?.precision ? mi?.precision : '0.2' :'en-US'}} <span *ngIf=\"mi?.IsPrcnt\"> %</span> </label>\r\n <label *ngIf=\"mi.type == 'date'\" class=\"label-control\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n {{ viewInfoObjList[i][mi.property] | date: (mi?.dateFormat) ? mi?.dateFormat : 'dd-MMM-yyyy'}} </label>\r\n <label *ngIf=\"mi.type == 'link'\" class=\"label-control\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n <a *ngIf=\"!mi?.isFullpath\" [routerLink]=\"genRouterLink(mi.path)\" [target]=\"mi.target\"\r\n [queryParams]=\"genAction(viewInfoObjList[i], mi.param)\">\r\n <span *ngIf=\"(mi.isCurrency != undefined && mi.isCurrency)\">{{\r\n viewInfoObjList[i][mi.property] | number:'.2':'en-US' }}</span>\r\n <span *ngIf=\"(mi.isCurrency == undefined || !mi.isCurrency)\">{{\r\n viewInfoObjList[i][mi.property] }}</span>\r\n </a>\r\n <a *ngIf=\"mi?.isFullpath\" href=\"javascript:void(0);\"\r\n (click)=\"redirectFullPath(mi.fullpath, genAction(viewInfoObjList[i], mi.param), mi.target)\">\r\n <span *ngIf=\"(mi.isCurrency != undefined && mi.isCurrency)\">{{\r\n viewInfoObjList[i][mi.property] | number:'.2':'en-US' }}</span>\r\n <span *ngIf=\"(mi.isCurrency == undefined || !mi.isCurrency)\">{{\r\n viewInfoObjList[i][mi.property] }}</span>\r\n </a>\r\n </label>\r\n <label *ngIf=\"mi.type == 'callback'\" class=\"label-control\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n <a href=\"javascript:void(0);\" (click)=\"callbackFunction(viewInfoObjList[i], mi.key)\">\r\n {{ viewInfoObjList[i][mi.property] }}\r\n </a>\r\n </label>\r\n <textarea *ngIf=\"mi.type == 'textarea'\" class=\"form-control\" readonly\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\"\r\n translate> {{ viewInfoObjList[i][mi.property] }} </textarea>\r\n <span *ngIf=\"mi.type == 'boolean'\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n <label *ngIf=\"viewInfoObjList[i][mi.property] == true\">Yes</label>\r\n <label *ngIf=\"viewInfoObjList[i][mi.property] == false\">No</label>\r\n <!-- <label\r\n *ngIf=\"viewInfoObjList[i][mi.property] == '' || viewInfoObjList[i][mi.property] == null\">-</label> -->\r\n </span>\r\n <span *ngIf=\"mi.type == 'concat'\">\r\n <label class=\"label-control breakword\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n {{ mi.concat }}\r\n </label>\r\n </span>\r\n <span *ngIf=\"mi.type == 'switch'\">\r\n <span *ngFor=\"let cs of mi?.case\">\r\n <span *ngIf=\"switchCase(viewInfoObjList[i],cs) && !cs.Hidden\">\r\n <span class=\"label-control breakword\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\"\r\n translate *ngIf=\"cs.result.type == 'text'\">{{ viewInfoObjList[i][cs.result.property]\r\n }}\r\n </span>\r\n <span [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\"\r\n translate *ngIf=\"cs.result.type == 'decimal'\">{{\r\n viewInfoObjList[i][cs.result.property] | number:'.2':'en-US' }}</span>\r\n <span [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\"\r\n translate *ngIf=\"cs.result.type == 'date'\">{{ viewInfoObjList[i][cs.result.property] |\r\n date: 'dd-MMM-yyyy' }}\r\n </span>\r\n <span *ngIf=\"cs.result.type == 'link'\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\"\r\n translate>\r\n <a [target]=\"cs.result.target\" [routerLink]=\"genRouterLink(cs.result.path)\"\r\n [queryParams]=\"genAction(viewInfoObjList[i],cs.result.param)\">\r\n <span *ngIf=\"(mi.isCurrency != undefined && mi.isCurrency)\">{{\r\n viewInfoObjList[i][cs.result.property] | number:'.2':'en-US' }}</span>\r\n <span *ngIf=\"(mi.isCurrency == undefined || !mi.isCurrency)\">{{\r\n viewInfoObjList[i][cs.result.property] }}</span>\r\n </a>\r\n </span>\r\n <span *ngIf=\"cs.result.type == 'boolean'\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\"\r\n translate>\r\n <span *ngIf=\"viewInfoObjList[i][cs.result.property] == 'true'\">Yes</span>\r\n <span *ngIf=\"viewInfoObjList[i][cs.result.property] == 'false'\">No</span>\r\n </span>\r\n <span *ngIf=\"cs.result.type == 'concat'\">\r\n <label class=\"label-control breakword\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n {{ cs.result.concat }}\r\n </label>\r\n </span>\r\n <span *ngIf=\"cs.result.type == 'callback'\">\r\n <span\r\n *ngIf=\"cs.result.isText != undefined && cs.result.isText; then textCallback else iconCallback\"></span>\r\n <ng-template #textCallback>\r\n <span>\r\n <a href=\"javascript:void(0);\" (click)=\"callbackFunction(viewInfoObjList[i], cs.result.key)\">{{\r\n viewInfoObjList[i][cs.result.property] }}</a>\r\n </span>\r\n </ng-template>\r\n <ng-template #iconCallback>\r\n <span>\r\n <a [ngClass]=\"[cs.result.tooltip != undefined && cs.result.tooltip != '' ? 'tooltips' : '', cs.result.anchor == undefined || cs.result.anchor == '' ? 'success p-0' : cs.result.anchor]\"\r\n (click)=\"callbackFunction(viewInfoObjList[i], cs.result.key)\">\r\n <i class=\"font-medium-3 mr-2\"\r\n [ngClass]=\" cs.result.icon == undefined || cs.result.icon == '' ? 'ft-edit-2' : cs.result.icon \">\r\n </i>\r\n <span *ngIf=\"cs.result.tooltip != undefined && cs.result.tooltip != ''\"\r\n [ngClass]=\"cs.result.tooltip != undefined && cs.result.tooltip != '' ? 'tooltipstext' : ''\">\r\n {{cs.result.tooltip}}\r\n </span>\r\n </a>\r\n </span>\r\n </ng-template>\r\n </span>\r\n </span>\r\n </span>\r\n </span>\r\n </ng-template>\r\n </div>\r\n </div>\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</section>" }]
|
|
627
|
+
args: [{ selector: "lib-ucviewgeneric", styles: [], template: "<section id=\"horizontal-form-layouts\">\r\n <div class=\"row text-left\">\r\n <div class=\"col-md-12\">\r\n <div [ngClass]=\"IsCard ? 'card' : ''\" *ngIf=\"isReady\">\r\n <div class=\"pl-3 mb-2 mt-2\" *ngIf=\"viewList?.title != ''\">\r\n <h4 class=\"card-title ucSearch-title\" id=\"horz-layout-colored-controls\" translate>{{viewList.title}}</h4>\r\n </div>\r\n <div class=\"card-body\" *ngFor=\"let ss of viewList?.subsection;let i = index;\">\r\n <div class=\"px-3\">\r\n <lib-ucSubsection *ngIf=\"ss.subsection != ''\" [id]=\"ss.subSectionId + 'id'\" [title]=\"ss.subSectionTitle\"\r\n [panel]=\"ss.subSectionId\">\r\n </lib-ucSubsection>\r\n <div class=\"form-body\" [id]='ss.subSectionId'>\r\n <div class=\"form-group row\">\r\n <div *ngFor=\"let mi of ss?.mainInfo\"\r\n [ngClass]=\"{ 'col-md-6': mi.isHide == undefined || !mi.isHide || (viewInfoObjList[i][mi.property] != '' && viewInfoObjList[i][mi.property] != null)}\">\r\n <span\r\n *ngIf=\"mi.isHide == undefined || !mi.isHide || (viewInfoObjList[i][mi.property] != '' && viewInfoObjList[i][mi.property] != null)\">\r\n <div class=\"row\">\r\n <div class=\"col-md-6\" *ngIf=\"mi.type != 'switch'\">\r\n <label class=\"label-control\"\r\n [ngClass]=\"mi.customClassLabel != undefined ? mi.customClassLabel : ''\" translate>{{mi.label}}</label>\r\n </div>\r\n <div class=\"col-md-6\" *ngIf=\"mi.type == 'switch'\">\r\n <div *ngFor=\"let case of mi?.case\">\r\n <div *ngIf=\"switchCase(viewInfoObjList[i],case)\">\r\n <label class=\"label-control\"\r\n [ngClass]=\"mi.customClassLabel != undefined ? mi.customClassLabel : ''\" translate>{{case.result.label}}</label>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"viewInfoObjList[i] != undefined\" class=\"col-md-6\" [ngClass]=\"{ 'text-left': mi.position == 'left',\r\n 'text-right': mi.position == 'right', 'text-center': mi.position == 'center' }\">\r\n <span\r\n *ngIf=\"(mi.type == 'boolean' && viewInfoObjList[i][mi.property] != null) || (viewInfoObjList[i][mi.property] != '' && viewInfoObjList[i][mi.property] != null) || mi.type == 'switch' || mi.type =='concat'; then nonEmptyLabel else emptyLabel\"></span>\r\n <ng-template #emptyLabel>\r\n <label class=\"label-control\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\"\r\n translate>-</label>\r\n </ng-template>\r\n <ng-template #nonEmptyLabel>\r\n <span *ngIf=\"mi.type == 'text'\">\r\n <label\r\n *ngIf=\"viewInfoObjList[i][mi.property] != '' && viewInfoObjList[i][mi.property] != null\"\r\n class=\"label-control breakword\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n {{ viewInfoObjList[i][mi.property] }}\r\n </label>\r\n <label\r\n *ngIf=\"viewInfoObjList[i][mi.property] == '' || viewInfoObjList[i][mi.property] == null\"\r\n class=\"label-control\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>-\r\n </label>\r\n </span>\r\n <label *ngIf=\"mi.type == 'currency'\" class=\"label-control\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n {{ viewInfoObjList[i][mi.property] | number: mi?.precision ? mi?.precision : '0.2' :'en-US'}} <span *ngIf=\"mi?.IsPrcnt\"> %</span> </label>\r\n <label *ngIf=\"mi.type == 'date'\" class=\"label-control\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n {{ viewInfoObjList[i][mi.property] | date: (mi?.dateFormat) ? mi?.dateFormat : 'dd-MMM-yyyy'}} </label>\r\n <label *ngIf=\"mi.type == 'link'\" class=\"label-control\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n <a *ngIf=\"!mi?.isFullpath\" [routerLink]=\"genRouterLink(mi.path)\" [target]=\"mi.target\"\r\n [queryParams]=\"genAction(viewInfoObjList[i], mi.param)\">\r\n <span *ngIf=\"(mi.isCurrency != undefined && mi.isCurrency)\">{{\r\n viewInfoObjList[i][mi.property] | number:'.2':'en-US' }}</span>\r\n <span *ngIf=\"(mi.isCurrency == undefined || !mi.isCurrency)\">{{\r\n viewInfoObjList[i][mi.property] }}</span>\r\n </a>\r\n <a *ngIf=\"mi?.isFullpath\" href=\"javascript:void(0);\"\r\n (click)=\"redirectFullPath(mi.fullpath, genAction(viewInfoObjList[i], mi.param), mi.target)\">\r\n <span *ngIf=\"(mi.isCurrency != undefined && mi.isCurrency)\">{{\r\n viewInfoObjList[i][mi.property] | number:'.2':'en-US' }}</span>\r\n <span *ngIf=\"(mi.isCurrency == undefined || !mi.isCurrency)\">{{\r\n viewInfoObjList[i][mi.property] }}</span>\r\n </a>\r\n </label>\r\n <label *ngIf=\"mi.type == 'callback'\" class=\"label-control\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n <a href=\"javascript:void(0);\" (click)=\"callbackFunction(viewInfoObjList[i], mi.key)\">\r\n {{ viewInfoObjList[i][mi.property] }}\r\n </a>\r\n </label>\r\n <textarea *ngIf=\"mi.type == 'textarea'\" class=\"form-control\" readonly\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\"\r\n translate> {{ viewInfoObjList[i][mi.property] }} </textarea>\r\n <span *ngIf=\"mi.type == 'boolean'\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n <label *ngIf=\"viewInfoObjList[i][mi.property] == true\">Yes</label>\r\n <label *ngIf=\"viewInfoObjList[i][mi.property] == false\">No</label>\r\n <!-- <label\r\n *ngIf=\"viewInfoObjList[i][mi.property] == '' || viewInfoObjList[i][mi.property] == null\">-</label> -->\r\n </span>\r\n <span *ngIf=\"mi.type == 'concat'\">\r\n <label class=\"label-control breakword\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n {{ mi.concat }}\r\n </label>\r\n </span>\r\n <span *ngIf=\"mi.type == 'switch'\">\r\n <span *ngFor=\"let cs of mi?.case\">\r\n <span *ngIf=\"switchCase(viewInfoObjList[i],cs) && !cs.Hidden\">\r\n <span class=\"label-control breakword\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\"\r\n translate *ngIf=\"cs.result.type == 'text'\">{{ viewInfoObjList[i][cs.result.property]\r\n }}\r\n </span>\r\n <span [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\"\r\n translate *ngIf=\"cs.result.type == 'decimal'\">{{\r\n viewInfoObjList[i][cs.result.property] | number:'.2':'en-US' }}</span>\r\n <span [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\"\r\n translate *ngIf=\"cs.result.type == 'date'\">{{ viewInfoObjList[i][cs.result.property] |\r\n date: 'dd-MMM-yyyy' }}\r\n </span>\r\n <span *ngIf=\"cs.result.type == 'link'\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\"\r\n translate>\r\n <a [target]=\"cs.result.target\" [routerLink]=\"genRouterLink(cs.result.path)\"\r\n [queryParams]=\"genAction(viewInfoObjList[i],cs.result.param)\">\r\n <span *ngIf=\"(mi.isCurrency != undefined && mi.isCurrency)\">{{\r\n viewInfoObjList[i][cs.result.property] | number:'.2':'en-US' }}</span>\r\n <span *ngIf=\"(mi.isCurrency == undefined || !mi.isCurrency)\">{{\r\n viewInfoObjList[i][cs.result.property] }}</span>\r\n </a>\r\n </span>\r\n <span *ngIf=\"cs.result.type == 'boolean'\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\"\r\n translate>\r\n <span *ngIf=\"viewInfoObjList[i][cs.result.property] == 'true'\">Yes</span>\r\n <span *ngIf=\"viewInfoObjList[i][cs.result.property] == 'false'\">No</span>\r\n </span>\r\n <span *ngIf=\"cs.result.type == 'concat'\">\r\n <label class=\"label-control breakword\"\r\n [ngClass]=\"mi.customClassProperty != undefined ? mi.customClassProperty : ''\" translate>\r\n {{ cs.result.concat }}\r\n </label>\r\n </span>\r\n <span *ngIf=\"cs.result.type == 'callback'\">\r\n <span\r\n *ngIf=\"cs.result.isText != undefined && cs.result.isText; then textCallback else iconCallback\"></span>\r\n <ng-template #textCallback>\r\n <span>\r\n <a href=\"javascript:void(0);\" (click)=\"callbackFunction(viewInfoObjList[i], cs.result.key)\">{{\r\n viewInfoObjList[i][cs.result.property] }}</a>\r\n </span>\r\n </ng-template>\r\n <ng-template #iconCallback>\r\n <span>\r\n <a [ngClass]=\"[cs.result.tooltip != undefined && cs.result.tooltip != '' ? 'tooltips' : '', cs.result.anchor == undefined || cs.result.anchor == '' ? 'success p-0' : cs.result.anchor]\"\r\n (click)=\"callbackFunction(viewInfoObjList[i], cs.result.key)\">\r\n <i class=\"font-medium-3 mr-2\"\r\n [ngClass]=\" cs.result.icon == undefined || cs.result.icon == '' ? 'ft-edit-2' : cs.result.icon \">\r\n </i>\r\n <span *ngIf=\"cs.result.tooltip != undefined && cs.result.tooltip != ''\"\r\n [ngClass]=\"cs.result.tooltip != undefined && cs.result.tooltip != '' ? 'tooltipstext' : ''\">\r\n {{cs.result.tooltip}}\r\n </span>\r\n </a>\r\n </span>\r\n </ng-template>\r\n </span>\r\n </span>\r\n </span>\r\n </span>\r\n </ng-template>\r\n </div>\r\n </div>\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"px-3 grid-view\" *ngIf=\"gridViewObj.gridViews.length > 0\">\r\n <div *ngFor=\"let gridView of inputGridViewObjs;let i = index\">\r\n <lib-ucSubsection\r\n *ngIf=\"gridViewObj.gridViews[i].subsection && gridViewObj.gridViews[i].subsection !== ''\"\r\n [id]=\"'grid-subsection-id'+i\"\r\n [title]=\"gridViewObj.gridViews[i].subsection\"\r\n [panel]=\"'grid-subsection-panel-'+i\">\r\n </lib-ucSubsection>\r\n <div class=\"form-body\" [id]=\"'grid-subsection-panel-'+i\">\r\n <lib-ucgridview [gridInput]=\"gridView\" (callback)=\"gridEvent($event)\" (isRefresh)=\"GetGridViewData(gridViewObj.gridViews[i], gridView)\"></lib-ucgridview>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</section>\r\n" }]
|
|
475
628
|
}], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: i2.HttpClient }, { type: i3.TranslateService }, { type: i4.CookieService }]; }, propDecorators: { viewGenericObj: [{
|
|
476
629
|
type: Input
|
|
630
|
+
}], gridViewObj: [{
|
|
631
|
+
type: Input
|
|
477
632
|
}], callback: [{
|
|
478
633
|
type: Output
|
|
479
634
|
}] } });
|
|
@@ -483,12 +638,14 @@ class UcviewgenericModule {
|
|
|
483
638
|
/** @nocollapse */ UcviewgenericModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UcviewgenericModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
484
639
|
/** @nocollapse */ UcviewgenericModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UcviewgenericModule, declarations: [UcviewgenericComponent], imports: [CommonModule,
|
|
485
640
|
RouterModule,
|
|
486
|
-
UcSubsectionModule,
|
|
641
|
+
UcSubsectionModule,
|
|
642
|
+
UcgridviewModule, i3.TranslateModule], exports: [UcviewgenericComponent] });
|
|
487
643
|
/** @nocollapse */ UcviewgenericModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UcviewgenericModule, imports: [[
|
|
488
644
|
CommonModule,
|
|
489
645
|
RouterModule,
|
|
490
646
|
UcSubsectionModule,
|
|
491
|
-
|
|
647
|
+
UcgridviewModule,
|
|
648
|
+
TranslateModule.forChild(),
|
|
492
649
|
]] });
|
|
493
650
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: UcviewgenericModule, decorators: [{
|
|
494
651
|
type: NgModule,
|
|
@@ -498,9 +655,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
498
655
|
CommonModule,
|
|
499
656
|
RouterModule,
|
|
500
657
|
UcSubsectionModule,
|
|
501
|
-
|
|
658
|
+
UcgridviewModule,
|
|
659
|
+
TranslateModule.forChild(),
|
|
502
660
|
],
|
|
503
|
-
exports: [UcviewgenericComponent]
|
|
661
|
+
exports: [UcviewgenericComponent],
|
|
504
662
|
}]
|
|
505
663
|
}] });
|
|
506
664
|
|