@adins/ucsearch 2.2.53 → 2.2.55

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.
@@ -202,19 +202,33 @@
202
202
  */
203
203
  var ListKeyValueMonth = /** @class */ (function () {
204
204
  function ListKeyValueMonth() {
205
+ this.DictOfMonth = {};
205
206
  this.ListOfMonth = new Array();
207
+ this.DictOfMonth = {};
206
208
  this.ListOfMonth.push({ key: 1, value: "January" });
209
+ this.DictOfMonth[1] = "January";
207
210
  this.ListOfMonth.push({ key: 2, value: "February" });
211
+ this.DictOfMonth[2] = "February";
208
212
  this.ListOfMonth.push({ key: 3, value: "March" });
213
+ this.DictOfMonth[3] = "March";
209
214
  this.ListOfMonth.push({ key: 4, value: "April" });
215
+ this.DictOfMonth[4] = "April";
210
216
  this.ListOfMonth.push({ key: 5, value: "May" });
217
+ this.DictOfMonth[5] = "May";
211
218
  this.ListOfMonth.push({ key: 6, value: "June" });
219
+ this.DictOfMonth[6] = "June";
212
220
  this.ListOfMonth.push({ key: 7, value: "July" });
221
+ this.DictOfMonth[7] = "July";
213
222
  this.ListOfMonth.push({ key: 8, value: "August" });
223
+ this.DictOfMonth[8] = "August";
214
224
  this.ListOfMonth.push({ key: 9, value: "September" });
225
+ this.DictOfMonth[9] = "September";
215
226
  this.ListOfMonth.push({ key: 10, value: "October" });
227
+ this.DictOfMonth[10] = "October";
216
228
  this.ListOfMonth.push({ key: 11, value: "November" });
229
+ this.DictOfMonth[11] = "November";
217
230
  this.ListOfMonth.push({ key: 12, value: "December" });
231
+ this.DictOfMonth[12] = "December";
218
232
  }
219
233
  return ListKeyValueMonth;
220
234
  }());
@@ -406,15 +420,15 @@
406
420
  //pengecekan ddl
407
421
  if (data.component[i].type == "dropdown") {
408
422
  if (data.component[i].dtmType != undefined) {
409
- if (data.component[i].dtmType == "month") {
423
+ if (data.component[i].dtmType.includes("month")) {
410
424
  if (data.component[i].value != undefined && data.component[i].value.includes("BD")) {
411
- data.component[i].value = _this.BusinessDt.getMonth() + 1;
425
+ data.component[i].value = _this.setDefaultValueMonth(data.component[i].value);
412
426
  }
413
- data.component[i].items = _this.ListOfMonth.ListOfMonth;
427
+ data.component[i].items = _this.setMonthDDL(data.component[i].dtmType);
414
428
  }
415
429
  if (data.component[i].dtmType.includes("year")) {
416
430
  if (data.component[i].value != undefined && data.component[i].value.includes("BD")) {
417
- data.component[i].value = _this.BusinessDt.getFullYear();
431
+ data.component[i].value = _this.setDefaultValueYear(data.component[i].value);
418
432
  }
419
433
  data.component[i].items = _this.setYearDDL(data.component[i].dtmType);
420
434
  }
@@ -526,6 +540,111 @@
526
540
  }
527
541
  this.searchInput.integrationObj.requestObj["OfficeRoleCodes"] = listOfficeRoleCodes;
528
542
  };
543
+ /**
544
+ * @param {?} value
545
+ * @return {?}
546
+ */
547
+ UCSearchComponent.prototype.setDefaultValueMonth = /**
548
+ * @param {?} value
549
+ * @return {?}
550
+ */
551
+ function (value) {
552
+ /** @type {?} */
553
+ var businessDate = new Date(this.BusinessDt);
554
+ /** @type {?} */
555
+ var operator = value.charAt(2);
556
+ /** @type {?} */
557
+ var tempValue = value.split(operator, 2);
558
+ /** @type {?} */
559
+ var numMonth = parseInt(tempValue[1]);
560
+ if (!numMonth)
561
+ numMonth = 1;
562
+ if (operator == "-") {
563
+ businessDate.setMonth(businessDate.getMonth() - numMonth);
564
+ }
565
+ else if (operator == "+") {
566
+ businessDate.setMonth(businessDate.getMonth() + numMonth);
567
+ }
568
+ return businessDate.getMonth();
569
+ };
570
+ /**
571
+ * @param {?} month
572
+ * @return {?}
573
+ */
574
+ UCSearchComponent.prototype.setMonthDDL = /**
575
+ * @param {?} month
576
+ * @return {?}
577
+ */
578
+ function (month) {
579
+ /** @type {?} */
580
+ var ListOfMonth;
581
+ /** @type {?} */
582
+ var equation = month.match("[\\/+][-]|[-][\\/+]|\\/+|-");
583
+ /** @type {?} */
584
+ var toMin = this.BusinessDt.getMonth();
585
+ /** @type {?} */
586
+ var toMax = this.BusinessDt.getMonth();
587
+ /** @type {?} */
588
+ var tempEquation = equation[0];
589
+ /** @type {?} */
590
+ var minMax = parseInt(month.substring(equation.index + equation[0].length));
591
+ if (minMax >= 12)
592
+ return this.ListOfMonth.ListOfMonth;
593
+ if ((tempEquation == "+-" || tempEquation == "-+") && minMax >= 6)
594
+ return this.ListOfMonth.ListOfMonth;
595
+ /** @type {?} */
596
+ var dictOfMonth = this.ListOfMonth.DictOfMonth;
597
+ ListOfMonth.push({ key: toMin, value: dictOfMonth[toMin] });
598
+ for (var q = 0; q < minMax; q++) {
599
+ if (tempEquation.includes("-")) {
600
+ toMin--;
601
+ if (toMin == 0)
602
+ toMin = 12;
603
+ ListOfMonth.push({ key: toMin, value: dictOfMonth[toMin] });
604
+ }
605
+ if (tempEquation.includes("+")) {
606
+ toMax++;
607
+ if (toMax == 13)
608
+ toMax = 1;
609
+ ListOfMonth.push({ key: toMax, value: dictOfMonth[toMax] });
610
+ }
611
+ }
612
+ ListOfMonth.sort(( /**
613
+ * @param {?} a
614
+ * @param {?} b
615
+ * @return {?}
616
+ */function (a, b) {
617
+ return a.key - b.key;
618
+ }));
619
+ return ListOfMonth;
620
+ };
621
+ /**
622
+ * @param {?} value
623
+ * @return {?}
624
+ */
625
+ UCSearchComponent.prototype.setDefaultValueYear = /**
626
+ * @param {?} value
627
+ * @return {?}
628
+ */
629
+ function (value) {
630
+ /** @type {?} */
631
+ var businessDate = new Date(this.BusinessDt);
632
+ /** @type {?} */
633
+ var operator = value.charAt(2);
634
+ /** @type {?} */
635
+ var tempValue = value.split(operator, 2);
636
+ /** @type {?} */
637
+ var numYear = parseInt(tempValue[1]);
638
+ if (!numYear)
639
+ numYear = 1;
640
+ if (operator == "-") {
641
+ businessDate.setFullYear(businessDate.getFullYear() - numYear);
642
+ }
643
+ else if (operator == "+") {
644
+ businessDate.setFullYear(businessDate.getFullYear() + numYear);
645
+ }
646
+ return businessDate.getFullYear();
647
+ };
529
648
  /**
530
649
  * @param {?} year
531
650
  * @return {?}
@@ -681,11 +800,11 @@
681
800
  request.rowPerPage = rowPerPage;
682
801
  request.orderBy = orderBy;
683
802
  request.queryString = this.configuration.querystring;
684
- for (var i_1 = 0; i_1 < this.countForm; i_1++) {
803
+ for (var i = 0; i < this.countForm; i++) {
685
804
  /** @type {?} */
686
805
  var critObj = new CriteriaObj();
687
806
  /** @type {?} */
688
- var component = this.myForm.nativeElement[i_1];
807
+ var component = this.myForm.nativeElement[i];
689
808
  // // popup message if required
690
809
  // if (component.getAttribute('data-required') != null && component.getAttribute('data-required') == "true") {
691
810
  // let val = component.value.trim();
@@ -717,15 +836,15 @@
717
836
  this.toastr.warning("Please select " + label);
718
837
  break;
719
838
  }
720
- if (this.configuration.component[i_1].type == "taskDefinitionKey" || this.configuration.component[i_1].type == "officeRoleCodes")
839
+ if (component.getAttribute('data-crit-datatable') != "" && component.getAttribute('data-crit-datatable') != null) {
840
+ critObj.isCriteriaDataTable = component.getAttribute('data-crit-datatable');
841
+ }
842
+ if (this.configuration.component[i].type == "taskDefinitionKey" || this.configuration.component[i].type == "officeRoleCodes")
721
843
  continue;
722
- if (this.configuration.component[i_1].type == "claim") {
844
+ if (this.configuration.component[i].type == "claim") {
723
845
  critObj.propName = component.getAttribute('data-name');
724
846
  critObj.restriction = text;
725
847
  critObj.value = null;
726
- if (component.getAttribute('data-crit-datatable') != "" && component.getAttribute('data-crit-datatable') != null) {
727
- critObj.isCriteriaDataTable = component.getAttribute('data-crit-datatable');
728
- }
729
848
  arrCrit.push(critObj);
730
849
  }
731
850
  else {
@@ -1047,144 +1166,150 @@
1047
1166
  function (condList) {
1048
1167
  /** @type {?} */
1049
1168
  var condition = false;
1050
- for (var i = 0; i < condList.conditions.length; i++) {
1169
+ var _loop_1 = function (i) {
1051
1170
  /** @type {?} */
1052
- var idx = this.searchInput.switchValue.findIndex(( /**
1171
+ var idx = this_1.searchInput.switchValue.findIndex(( /**
1053
1172
  * @param {?} x
1054
1173
  * @return {?}
1055
1174
  */function (x) { return x.property == condList.conditions[i].property; }));
1056
1175
  if (condList.conditions[i].restriction == "EQ") {
1057
1176
  if (condList.conditions[i].isUser != true) {
1058
- if (this.searchInput.switchValue[idx].value == condList.conditions[i].value) {
1177
+ if (this_1.searchInput.switchValue[idx].value == condList.conditions[i].value) {
1059
1178
  condition = true;
1060
1179
  }
1061
1180
  else {
1062
1181
  condition = false;
1063
- break;
1182
+ return "break";
1064
1183
  }
1065
1184
  }
1066
1185
  else {
1067
1186
  /** @type {?} */
1068
1187
  var username = localStorage.getItem("Username");
1069
- if (this.searchInput.switchValue[idx].value == username) {
1188
+ if (this_1.searchInput.switchValue[idx].value == username) {
1070
1189
  condition = true;
1071
1190
  }
1072
1191
  else {
1073
1192
  condition = false;
1074
- break;
1193
+ return "break";
1075
1194
  }
1076
1195
  }
1077
1196
  }
1078
1197
  else if (condList.conditions[i].restriction == "NEQ") {
1079
1198
  if (condList.conditions[i].isUser != true) {
1080
- if (this.searchInput.switchValue[idx].value != condList.conditions[i].value) {
1199
+ if (this_1.searchInput.switchValue[idx].value != condList.conditions[i].value) {
1081
1200
  condition = true;
1082
1201
  }
1083
1202
  else {
1084
1203
  condition = false;
1085
- break;
1204
+ return "break";
1086
1205
  }
1087
1206
  }
1088
1207
  else {
1089
1208
  /** @type {?} */
1090
1209
  var username = localStorage.getItem("Username");
1091
- if (this.searchInput.switchValue[idx].value != username) {
1210
+ if (this_1.searchInput.switchValue[idx].value != username) {
1092
1211
  condition = true;
1093
1212
  }
1094
1213
  else {
1095
1214
  condition = false;
1096
- break;
1215
+ return "break";
1097
1216
  }
1098
1217
  }
1099
1218
  }
1100
1219
  else if (condList.conditions[i].restriction == "GT") {
1101
1220
  if (condList.conditions[i].isUser != true) {
1102
- if (this.searchInput.switchValue[idx].value > condList.conditions[i].value) {
1221
+ if (this_1.searchInput.switchValue[idx].value > condList.conditions[i].value) {
1103
1222
  condition = true;
1104
1223
  }
1105
1224
  else {
1106
1225
  condition = false;
1107
- break;
1226
+ return "break";
1108
1227
  }
1109
1228
  }
1110
1229
  else {
1111
1230
  /** @type {?} */
1112
1231
  var username = localStorage.getItem("Username");
1113
- if (this.searchInput.switchValue[idx].value > username) {
1232
+ if (this_1.searchInput.switchValue[idx].value > username) {
1114
1233
  condition = true;
1115
1234
  }
1116
1235
  else {
1117
1236
  condition = false;
1118
- break;
1237
+ return "break";
1119
1238
  }
1120
1239
  }
1121
1240
  }
1122
1241
  else if (condList.conditions[i].restriction == "GTE") {
1123
1242
  if (condList.conditions[i].isUser != true) {
1124
- if (this.searchInput.switchValue[idx].value >= condList.conditions[i].value) {
1243
+ if (this_1.searchInput.switchValue[idx].value >= condList.conditions[i].value) {
1125
1244
  condition = true;
1126
1245
  }
1127
1246
  else {
1128
1247
  condition = false;
1129
- break;
1248
+ return "break";
1130
1249
  }
1131
1250
  }
1132
1251
  else {
1133
1252
  /** @type {?} */
1134
1253
  var username = localStorage.getItem("Username");
1135
- if (this.searchInput.switchValue[idx].value >= username) {
1254
+ if (this_1.searchInput.switchValue[idx].value >= username) {
1136
1255
  condition = true;
1137
1256
  }
1138
1257
  else {
1139
1258
  condition = false;
1140
- break;
1259
+ return "break";
1141
1260
  }
1142
1261
  }
1143
1262
  }
1144
1263
  else if (condList.conditions[i].restriction == "LT") {
1145
1264
  if (condList.conditions[i].isUser != true) {
1146
- if (this.searchInput.switchValue[idx].value < condList.conditions[i].value) {
1265
+ if (this_1.searchInput.switchValue[idx].value < condList.conditions[i].value) {
1147
1266
  condition = true;
1148
1267
  }
1149
1268
  else {
1150
1269
  condition = false;
1151
- break;
1270
+ return "break";
1152
1271
  }
1153
1272
  }
1154
1273
  else {
1155
1274
  /** @type {?} */
1156
1275
  var username = localStorage.getItem("Username");
1157
- if (this.searchInput.switchValue[idx].value < username) {
1276
+ if (this_1.searchInput.switchValue[idx].value < username) {
1158
1277
  condition = true;
1159
1278
  }
1160
1279
  else {
1161
1280
  condition = false;
1162
- break;
1281
+ return "break";
1163
1282
  }
1164
1283
  }
1165
1284
  }
1166
1285
  else if (condList.conditions[i].restriction == "LTE") {
1167
1286
  if (condList.conditions[i].isUser != true) {
1168
- if (this.searchInput.switchValue[idx].value <= condList.conditions[i].value) {
1287
+ if (this_1.searchInput.switchValue[idx].value <= condList.conditions[i].value) {
1169
1288
  condition = true;
1170
1289
  }
1171
1290
  else {
1172
1291
  condition = false;
1173
- break;
1292
+ return "break";
1174
1293
  }
1175
1294
  }
1176
1295
  else {
1177
1296
  /** @type {?} */
1178
1297
  var username = localStorage.getItem("Username");
1179
- if (this.searchInput.switchValue[idx].value <= username) {
1298
+ if (this_1.searchInput.switchValue[idx].value <= username) {
1180
1299
  condition = true;
1181
1300
  }
1182
1301
  else {
1183
1302
  condition = false;
1184
- break;
1303
+ return "break";
1185
1304
  }
1186
1305
  }
1187
1306
  }
1307
+ };
1308
+ var this_1 = this;
1309
+ for (var i = 0; i < condList.conditions.length; i++) {
1310
+ var state_1 = _loop_1(i);
1311
+ if (state_1 === "break")
1312
+ break;
1188
1313
  }
1189
1314
  return condition;
1190
1315
  };
@@ -1303,7 +1428,7 @@
1303
1428
  UCSearchComponent.decorators = [
1304
1429
  { type: i0.Component, args: [{
1305
1430
  selector: 'lib-UCSearch',
1306
- template: "<!-- Basic form layout section start -->\r\n<section id=\"horizontal-form-layouts\">\r\n <div class=\"row text-left\">\r\n <div class=\"col-md-12\">\r\n <div class=\"card\">\r\n <div class=\"pl-3 mb-2 mt-2\" *ngIf=\"configuration?.title != undefined && configuration?.title != ''\">\r\n <h4 class=\"card-title ucSearch-title\" translate>{{configuration.title}}</h4>\r\n </div>\r\n <div class=\"card-body\">\r\n <div class=\"px-3\">\r\n <form class=\"form form-horizontal\" id=\"formSearch\" #formIdSearch #enjiForm=\"ngForm\"\r\n (ngSubmit)=\"enjiForm.valid && searchClick()\">\r\n <div class=\"form-body\">\r\n <h4 class=\"form-section font-weight-bold\">\r\n <div (click)=\"changeState()\" class=\"btn no-padding cursor-pointer flip\">\r\n <i class=\"fa\" style=\"font-size: 15px; margin: 0px 0px 5px -15px;\"\r\n [ngClass]=\"isHidden ? 'fa-chevron-right' : 'fa-chevron-down'\"></i>\r\n </div>\r\n <span\r\n *ngIf=\"configuration?.sectionTitle != undefined && configuration?.sectionTitle != ''; then inputSectionTitle else defaultSectionTitle\"></span>\r\n <ng-template #inputSectionTitle>\r\n {{configuration?.sectionTitle}}\r\n </ng-template>\r\n <ng-template #defaultSectionTitle>\r\n Paging\r\n </ng-template>\r\n </h4>\r\n <!-- Ini Digunakan untuk Generate Dynamic Component -->\r\n <!-- [hidden]=\"isHidden\" -->\r\n <div class=\"panel-active\" [@changeDivSize]=currentState>\r\n <div class=\"row\">\r\n <div class=\"col-md-6 form-group\" *ngFor=\"let question of configuration?.component; let i = index\">\r\n <div class=\"col-md-12\">\r\n <div class=\"row\">\r\n <label class=\"col-md-5 no-padding\" for=\"{{question.id}}\"\r\n [ngClass]=\"{'adins-required-label': (question.isRequired || (question?.ddlType != undefined && question.ddlType == 'one'))}\"\r\n translate>{{question.label}}</label>\r\n <div class=\"col-md-7 no-padding\">\r\n <div *ngIf=\"question.type=='textbox'\">\r\n <input type=\"text\" id=\"{{question.id}}\" class=\"form-control search-form-control\"\r\n [ngModel]=\"question.value\" [required]=\"question.isRequired\" name=\"{{question.name}}\"\r\n attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\r\n attr.data-required=\"{{question.isRequired}}\" value=\"{{question.value}}\"\r\n (keyup.enter)=\"searchClick()\" attr.data-type=\"{{question.datatype}}\"\r\n attr.data-name=\"{{question.name}}\" attr.data-restriction=\"{{question.restriction}}\"\r\n attr.label=\"{{question.label}}\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }\">\r\n </div>\r\n <div *ngIf=\"question.type=='textarea'\">\r\n <textarea type=\"text\" id=\"{{question.id}}\" class=\"form-control search-form-control\"\r\n [ngModel]=\"question.value\" [required]=\"question.isRequired\" name=\"{{question.name}}\"\r\n attr.data-required=\"{{question.isRequired}}\" attr.data-type=\"{{question.datatype}}\"\r\n attr.data-name=\"{{question.name}}\" value=\"{{question.value}}\"\r\n attr.label=\"{{question.label}}\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }\"></textarea>\r\n </div>\r\n <div *ngIf=\"question.type=='numeric'\">\r\n <input type=\"number\" id=\"{{question.id}}\" (focus)=\"transformToDecimal($event)\"\r\n (blur)=\"transformAmount($event)\" class=\"form-control search-form-control\"\r\n [ngModel]=\"question.value\" [required]=\"question.isRequired\" name=\"{{question.name+[i]}}\"\r\n attr.data-required=\"{{question.isRequired}}\" value=\"{{question.value}}\"\r\n (keyup.enter)=\"searchClick()\" attr.data-restriction=\"{{question.restriction}}\"\r\n attr.data-type=\"{{question.datatype}}\" attr.data-name=\"{{question.name}}\"\r\n attr.label=\"{{question.label}}\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name+[i]]?.touched || enjiForm.form.controls[question.name+[i]]?.dirty) && enjiForm.form.controls[question.name+[i]]?.invalid }\">\r\n </div>\r\n <div *ngIf=\"question.type=='currency'\">\r\n <div *ngIf=\"question?.isCustom != undefined && question?.isCustom\">\r\n <input type=\"\" id=\"{{question.id}}\" class=\"form-control search-form-control\"\r\n [required]=\"question.isRequired\" name=\"{{question.name}}\"\r\n (keyup.enter)=\"searchClick()\" attr.data-restriction=\"{{question.restriction}}\"\r\n attr.data-type=\"{{question.datatype}}\" attr.data-name=\"{{question.name}}\"\r\n attr.data-required=\"{{question.isRequired}}\" currencyMask [ngModel]=\"question.value\"\r\n [(ngModel)]=\"question.value\" [ngModelOptions]=\"{standalone: true}\"\r\n attr.label=\"{{question.label}}\"\r\n [options]=\"{ thousands: question.thousands, decimal: question.decimal, align: question.align, allowNegative: question.allowNegative, allowZero: question.allowZero, precision: question.precision, nullable: question.nullable }\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }\">\r\n </div>\r\n <div *ngIf=\"question?.isCustom == undefined || !question?.isCustom\">\r\n <input type=\"text\" id=\"{{question.id}}\" class=\"form-control search-form-control\"\r\n [required]=\"question.isRequired\" name=\"{{question.name}}\"\r\n (keyup.enter)=\"searchClick()\" attr.data-restriction=\"{{question.restriction}}\"\r\n attr.data-type=\"{{question.datatype}}\" attr.data-name=\"{{question.name}}\"\r\n attr.data-required=\"{{question.isRequired}}\" currencyMask [ngModel]=\"question.value\"\r\n [(ngModel)]=\"question.value\" [ngModelOptions]=\"{standalone: true}\"\r\n attr.label=\"{{question.label}}\"\r\n [options]=\"{ thousands: ',', decimal: '.', align: 'right', allowNegative: false, allowZero:true, precision: 2, nullable: false }\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }\">\r\n </div>\r\n </div>\r\n\r\n <!-- End Hardcode Lookup didalem-->\r\n <div *ngIf=\"question.type=='datepicker'\">\r\n <input type=\"{{question.isTime ? 'datetime-local' : 'date'}}\" id=\"{{question.id}}\"\r\n class=\"form-control search-form-control btn-lookup\" name=\"{{question.name+[i]}}\"\r\n [ngModel]=\"question.value\" [required]=\"question.isRequired\"\r\n attr.data-required=\"{{question.isRequired}}\" value=\"{{question.value}}\"\r\n attr.data-type=\"{{question.datatype}}\" attr.data-name=\"{{question.name}}\" attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\r\n (keyup.enter)=\"searchClick()\" attr.data-restriction=\"{{question.restriction}}\"\r\n attr.label=\"{{question.label}}\" min=\"{{question.minDate | date:'yyyy-MM-dd'}}\"\r\n max=\"{{question.maxDate | date:'yyyy-MM-dd'}}\" (focusout)=\"checkInputDate(question)\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name+[i]]?.touched || enjiForm.form.controls[question.name+[i]]?.dirty) && enjiForm.form.controls[question.name+[i]]?.invalid }\">\r\n </div>\r\n <div *ngIf=\"question.type == 'taskDefinitionKey' || question.type == 'officeRoleCodes'\">\r\n <select name=\"{{question.name}}\" attr.data-required=\"{{question.isRequired}}\"\r\n [required]=\"question.isRequired\" class=\"form-control search-form-control\"\r\n attr.query-in=\"{{question.isQueryIn}}\" attr.data-type=\"{{question.datatype}}\"\r\n attr.label=\"{{question.label}}\" [hidden]=\"question?.itemsUrl?.length == 1\"\r\n (change)=\"question.type == 'taskDefinitionKey' ? SetProcessKey(i) : SetRoleOfficeCodes(i)\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }\">\r\n <option *ngIf=\"question.ddlType == 'one' && question?.itemsUrl?.length != 1\"\r\n value=\"one\">Select One</option>\r\n <option\r\n *ngIf=\"(question?.ddlType == undefined || question.ddlType == 'all') && question?.itemsUrl?.length != 1\"\r\n value=\"all\">All</option>\r\n <option *ngFor=\"let item of question?.itemsUrl\" value=\"{{item.Key}}\">\r\n {{item.Value}}\r\n </option>\r\n </select>\r\n <label *ngIf=\"question?.itemsUrl?.length == 1\">{{question.itemsUrl[0].Value}}</label>\r\n </div>\r\n <div *ngIf=\"question.type=='dropdown'\">\r\n <select name=\"{{question.name}}\" attr.data-required=\"{{question.isRequired}}\"\r\n [(ngModel)]=\"question.value\" [required]=\"question.isRequired\"\r\n class=\"form-control search-form-control\" attr.query-in=\"{{question.isQueryIn}}\"\r\n attr.data-type=\"{{question.datatype}}\" attr.data-name=\"{{question.name}}\"\r\n attr.label=\"{{question.label}}\"\r\n [hidden]=\"!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1\"\r\n (change)=\"question.isEvent ? onChangeEvent($event.target.value, question) : ''\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }\">\r\n <option\r\n *ngIf=\"question.ddlType == 'one' && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)\"\r\n value=\"one\">\r\n Select One</option>\r\n <option\r\n *ngIf=\"(question?.ddlType == undefined || question.ddlType == 'all') && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)\"\r\n value=\"all\">All</option>\r\n <option *ngFor=\"let item of !question.isFromURL ? question?.items : question?.itemsUrl\"\r\n value=\"{{!question.isFromURL ? item.key : item.Key}}\">\r\n {{!question.isFromURL ? item.value : item.Value}}\r\n </option>\r\n </select>\r\n <label\r\n *ngIf=\"!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1\">{{!question.isFromURL\r\n ? question.items[0].value : question.itemsUrl[0].Value}}</label>\r\n </div>\r\n <div *ngIf=\"question.type=='claim'\">\r\n <select name=\"{{'claim'+[i]}}\" class=\"form-control search-form-control\"\r\n attr.data-type=\"{{'text'}}\" attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\r\n attr.data-name=\"{{'Assignee'}}\" [hidden]=\"ClaimList?.length == 1\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls['claim'+[i]]?.touched || enjiForm.form.controls['claim'+[i]]?.dirty) && enjiForm.form.controls['claim'+[i]]?.invalid }\">\r\n <option *ngIf=\"question.ddlType == 'one' && ClaimList?.length != 1\" value=\"one\">Select\r\n One</option>\r\n <option\r\n *ngIf=\"(question?.ddlType == undefined || question.ddlType == 'all') && ClaimList?.length != 1\"\r\n value=\"all\">All</option>\r\n <option *ngFor=\"let item of ClaimList\" value=\"{{item.Key}}\">\r\n {{item.Value}}\r\n </option>\r\n </select>\r\n </div>\r\n <lib-uc-show-errors *ngIf=\"question.type!='datepicker'\"\r\n [control]=\"enjiForm.form.controls[question.name]\" [submit]=\"enjiForm.submitted\">\r\n </lib-uc-show-errors>\r\n <lib-uc-show-errors *ngIf=\"question.type=='datepicker'\"\r\n [control]=\"enjiForm.form.controls[question.name+[i]]\" [submit]=\"enjiForm.submitted\">\r\n </lib-uc-show-errors>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-md-6 form-group\" *ngIf=\"(isReport != undefined && isReport)\">\r\n <div class=\"col-md-12\">\r\n <div class=\"row\">\r\n <label class=\"col-md-5 no-padding\" translate>Report Type</label>\r\n <div class=\"col-md-7 no-padding\">\r\n <select name=\"ExportType\" [(ngModel)]=\"ExportType\" class=\"form-control search-form-control\"\r\n attr.data-type=\"text\">\r\n <option *ngFor=\"let item of ExportTypeList\" [value]=\"item.key\">{{item.value}}</option>\r\n </select>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-md-12 no-padding\">\r\n <div class=\"form-actions right\">\r\n <button *ngIf=\"exportData == true\" type=\"button\" (click)=\"exportAsXLSX()\"\r\n class=\"btn btn-raised btn-success mr-1\" translate>\r\n <i class=\"fa ft-download\"></i>&nbsp;<span translate>Export Excel</span>\r\n </button>\r\n <button type=\"button\" (click)=\"reset()\" class=\"btn btn-raised btn-warning mr-1\" translate>\r\n <i class=\"fa fa-times\"></i>&nbsp;<span translate>Reset</span>\r\n </button>\r\n <button *ngIf=\"(isReport == undefined || !isReport)\" type=\"submit\"\r\n class=\"btn btn-raised btn-primary\" #UCSearchClick>\r\n <i class=\"fa fa-search\"></i>&nbsp;<span translate>Search</span>\r\n </button>\r\n <button *ngIf=\"(isReport != undefined && isReport)\" type=\"button\" (click)=\"GenerateReport()\"\r\n class=\"btn btn-raised btn-primary\">\r\n <i class=\"fa ft-download\"></i>&nbsp;<span translate>Generate Report</span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</section>\r\n<br>\r\n<!-- // Basic form layout section end -->",
1431
+ template: "<!-- Basic form layout section start -->\r\n<section id=\"horizontal-form-layouts\">\r\n <div class=\"row text-left\">\r\n <div class=\"col-md-12\">\r\n <div class=\"card\">\r\n <div class=\"pl-3 mb-2 mt-2\" *ngIf=\"configuration?.title != undefined && configuration?.title != ''\">\r\n <h4 class=\"card-title ucSearch-title\" translate>{{configuration.title}}</h4>\r\n </div>\r\n <div class=\"card-body\">\r\n <div class=\"px-3\">\r\n <form class=\"form form-horizontal\" id=\"formSearch\" #formIdSearch #enjiForm=\"ngForm\"\r\n (ngSubmit)=\"enjiForm.valid && searchClick()\">\r\n <div class=\"form-body\">\r\n <h4 class=\"form-section font-weight-bold\">\r\n <div (click)=\"changeState()\" class=\"btn no-padding cursor-pointer flip\">\r\n <i class=\"fa\" style=\"font-size: 15px; margin: 0px 0px 5px -15px;\"\r\n [ngClass]=\"isHidden ? 'fa-chevron-right' : 'fa-chevron-down'\"></i>\r\n </div>\r\n <span\r\n *ngIf=\"configuration?.sectionTitle != undefined && configuration?.sectionTitle != ''; then inputSectionTitle else defaultSectionTitle\"></span>\r\n <ng-template #inputSectionTitle>\r\n {{configuration?.sectionTitle}}\r\n </ng-template>\r\n <ng-template #defaultSectionTitle>\r\n Paging\r\n </ng-template>\r\n </h4>\r\n <!-- Ini Digunakan untuk Generate Dynamic Component -->\r\n <!-- [hidden]=\"isHidden\" -->\r\n <div class=\"panel-active\" [@changeDivSize]=currentState>\r\n <div class=\"row\">\r\n <div class=\"col-md-6 form-group\" *ngFor=\"let question of configuration?.component; let i = index\">\r\n <div class=\"col-md-12\">\r\n <div class=\"row\">\r\n <label class=\"col-md-5 no-padding\" for=\"{{question.id}}\"\r\n [ngClass]=\"{'adins-required-label': (question.isRequired || (question?.ddlType != undefined && question.ddlType == 'one'))}\"\r\n translate>{{question.label}}</label>\r\n <div class=\"col-md-7 no-padding\">\r\n <div *ngIf=\"question.type=='textbox'\">\r\n <input type=\"text\" id=\"{{question.id}}\" class=\"form-control search-form-control\"\r\n [ngModel]=\"question.value\" [required]=\"question.isRequired\" name=\"{{question.name}}\"\r\n attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\r\n attr.data-required=\"{{question.isRequired}}\" value=\"{{question.value}}\"\r\n (keyup.enter)=\"searchClick()\" attr.data-type=\"{{question.datatype}}\"\r\n attr.data-name=\"{{question.name}}\" attr.data-restriction=\"{{question.restriction}}\"\r\n attr.label=\"{{question.label}}\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }\">\r\n </div>\r\n <div *ngIf=\"question.type=='textarea'\">\r\n <textarea type=\"text\" id=\"{{question.id}}\" class=\"form-control search-form-control\"\r\n [ngModel]=\"question.value\" [required]=\"question.isRequired\" name=\"{{question.name}}\"\r\n attr.data-required=\"{{question.isRequired}}\" attr.data-type=\"{{question.datatype}}\"\r\n attr.data-name=\"{{question.name}}\" value=\"{{question.value}}\"\r\n attr.label=\"{{question.label}}\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }\"></textarea>\r\n </div>\r\n <div *ngIf=\"question.type=='numeric'\">\r\n <input type=\"number\" id=\"{{question.id}}\" (focus)=\"transformToDecimal($event)\"\r\n (blur)=\"transformAmount($event)\" class=\"form-control search-form-control\"\r\n [ngModel]=\"question.value\" [required]=\"question.isRequired\" name=\"{{question.name+[i]}}\"\r\n attr.data-required=\"{{question.isRequired}}\" value=\"{{question.value}}\"\r\n (keyup.enter)=\"searchClick()\" attr.data-restriction=\"{{question.restriction}}\"\r\n attr.data-type=\"{{question.datatype}}\" attr.data-name=\"{{question.name}}\"\r\n attr.label=\"{{question.label}}\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name+[i]]?.touched || enjiForm.form.controls[question.name+[i]]?.dirty) && enjiForm.form.controls[question.name+[i]]?.invalid }\">\r\n </div>\r\n <div *ngIf=\"question.type=='currency'\">\r\n <div *ngIf=\"question?.isCustom != undefined && question?.isCustom\">\r\n <input type=\"\" id=\"{{question.id}}\" class=\"form-control search-form-control\"\r\n [required]=\"question.isRequired\" name=\"{{question.name}}\"\r\n (keyup.enter)=\"searchClick()\" attr.data-restriction=\"{{question.restriction}}\"\r\n attr.data-type=\"{{question.datatype}}\" attr.data-name=\"{{question.name}}\"\r\n attr.data-required=\"{{question.isRequired}}\" currencyMask [ngModel]=\"question.value\"\r\n [(ngModel)]=\"question.value\" [ngModelOptions]=\"{standalone: true}\"\r\n attr.label=\"{{question.label}}\"\r\n [options]=\"{ thousands: question.thousands, decimal: question.decimal, align: question.align, allowNegative: question.allowNegative, allowZero: question.allowZero, precision: question.precision, nullable: question.nullable }\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }\">\r\n </div>\r\n <div *ngIf=\"question?.isCustom == undefined || !question?.isCustom\">\r\n <input type=\"text\" id=\"{{question.id}}\" class=\"form-control search-form-control\"\r\n [required]=\"question.isRequired\" name=\"{{question.name}}\"\r\n (keyup.enter)=\"searchClick()\" attr.data-restriction=\"{{question.restriction}}\"\r\n attr.data-type=\"{{question.datatype}}\" attr.data-name=\"{{question.name}}\"\r\n attr.data-required=\"{{question.isRequired}}\" currencyMask [ngModel]=\"question.value\"\r\n [(ngModel)]=\"question.value\" [ngModelOptions]=\"{standalone: true}\"\r\n attr.label=\"{{question.label}}\"\r\n [options]=\"{ thousands: ',', decimal: '.', align: 'right', allowNegative: false, allowZero:true, precision: 2, nullable: false }\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }\">\r\n </div>\r\n </div>\r\n\r\n <!-- End Hardcode Lookup didalem-->\r\n <div *ngIf=\"question.type=='datepicker'\">\r\n <input type=\"{{question.isTime ? 'datetime-local' : 'date'}}\" id=\"{{question.id}}\"\r\n class=\"form-control search-form-control btn-lookup\" name=\"{{question.name+[i]}}\"\r\n [ngModel]=\"question.value\" [required]=\"question.isRequired\"\r\n attr.data-required=\"{{question.isRequired}}\" value=\"{{question.value}}\"\r\n attr.data-type=\"{{question.datatype}}\" attr.data-name=\"{{question.name}}\" attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\r\n (keyup.enter)=\"searchClick()\" attr.data-restriction=\"{{question.restriction}}\"\r\n attr.label=\"{{question.label}}\" min=\"{{question.minDate | date:'yyyy-MM-dd'}}\"\r\n max=\"{{question.maxDate | date:'yyyy-MM-dd'}}\" (focusout)=\"checkInputDate(question)\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name+[i]]?.touched || enjiForm.form.controls[question.name+[i]]?.dirty) && enjiForm.form.controls[question.name+[i]]?.invalid }\">\r\n </div>\r\n <div *ngIf=\"question.type == 'taskDefinitionKey' || question.type == 'officeRoleCodes'\">\r\n <select name=\"{{question.name}}\" attr.data-required=\"{{question.isRequired}}\"\r\n [required]=\"question.isRequired\" class=\"form-control search-form-control\"\r\n attr.query-in=\"{{question.isQueryIn}}\" attr.data-type=\"{{question.datatype}}\"\r\n attr.label=\"{{question.label}}\" [hidden]=\"question?.itemsUrl?.length == 1\"\r\n (change)=\"question.type == 'taskDefinitionKey' ? SetProcessKey(i) : SetRoleOfficeCodes(i)\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }\">\r\n <option *ngIf=\"question.ddlType == 'one' && question?.itemsUrl?.length != 1\"\r\n value=\"one\">Select One</option>\r\n <option\r\n *ngIf=\"(question?.ddlType == undefined || question.ddlType == 'all') && question?.itemsUrl?.length != 1\"\r\n value=\"all\">All</option>\r\n <option *ngFor=\"let item of question?.itemsUrl\" value=\"{{item.Key}}\">\r\n {{item.Value}}\r\n </option>\r\n </select>\r\n <label *ngIf=\"question?.itemsUrl?.length == 1\">{{question.itemsUrl[0].Value}}</label>\r\n </div>\r\n <div *ngIf=\"question.type=='dropdown'\">\r\n <select name=\"{{question.name}}\" attr.data-required=\"{{question.isRequired}}\"\r\n [(ngModel)]=\"question.value\" [required]=\"question.isRequired\"\r\n class=\"form-control search-form-control\" attr.query-in=\"{{question.isQueryIn}}\"\r\n attr.data-type=\"{{question.datatype}}\" attr.data-name=\"{{question.name}}\"\r\n attr.label=\"{{question.label}}\" attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\r\n [hidden]=\"!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1\"\r\n (change)=\"question.isEvent ? onChangeEvent($event.target.value, question) : ''\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }\">\r\n <option\r\n *ngIf=\"question.ddlType == 'one' && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)\"\r\n value=\"one\">\r\n Select One</option>\r\n <option\r\n *ngIf=\"(question?.ddlType == undefined || question.ddlType == 'all') && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)\"\r\n value=\"all\">All</option>\r\n <option *ngFor=\"let item of !question.isFromURL ? question?.items : question?.itemsUrl\"\r\n value=\"{{!question.isFromURL ? item.key : item.Key}}\">\r\n {{!question.isFromURL ? item.value : item.Value}}\r\n </option>\r\n </select>\r\n <label\r\n *ngIf=\"!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1\">{{!question.isFromURL\r\n ? question.items[0].value : question.itemsUrl[0].Value}}</label>\r\n </div>\r\n <div *ngIf=\"question.type=='claim'\">\r\n <select name=\"{{'claim'+[i]}}\" class=\"form-control search-form-control\"\r\n attr.data-type=\"{{'text'}}\" attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\r\n attr.data-name=\"{{'Assignee'}}\" [hidden]=\"ClaimList?.length == 1\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls['claim'+[i]]?.touched || enjiForm.form.controls['claim'+[i]]?.dirty) && enjiForm.form.controls['claim'+[i]]?.invalid }\">\r\n <option *ngIf=\"question.ddlType == 'one' && ClaimList?.length != 1\" value=\"one\">Select\r\n One</option>\r\n <option\r\n *ngIf=\"(question?.ddlType == undefined || question.ddlType == 'all') && ClaimList?.length != 1\"\r\n value=\"all\">All</option>\r\n <option *ngFor=\"let item of ClaimList\" value=\"{{item.Key}}\">\r\n {{item.Value}}\r\n </option>\r\n </select>\r\n </div>\r\n <lib-uc-show-errors *ngIf=\"question.type!='datepicker'\"\r\n [control]=\"enjiForm.form.controls[question.name]\" [submit]=\"enjiForm.submitted\">\r\n </lib-uc-show-errors>\r\n <lib-uc-show-errors *ngIf=\"question.type=='datepicker'\"\r\n [control]=\"enjiForm.form.controls[question.name+[i]]\" [submit]=\"enjiForm.submitted\">\r\n </lib-uc-show-errors>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-md-6 form-group\" *ngIf=\"(isReport != undefined && isReport)\">\r\n <div class=\"col-md-12\">\r\n <div class=\"row\">\r\n <label class=\"col-md-5 no-padding\" translate>Report Type</label>\r\n <div class=\"col-md-7 no-padding\">\r\n <select name=\"ExportType\" [(ngModel)]=\"ExportType\" class=\"form-control search-form-control\"\r\n attr.data-type=\"text\">\r\n <option *ngFor=\"let item of ExportTypeList\" [value]=\"item.key\">{{item.value}}</option>\r\n </select>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-md-12 no-padding\">\r\n <div class=\"form-actions right\">\r\n <button *ngIf=\"exportData == true\" type=\"button\" (click)=\"exportAsXLSX()\"\r\n class=\"btn btn-raised btn-success mr-1\" translate>\r\n <i class=\"fa ft-download\"></i>&nbsp;<span translate>Export Excel</span>\r\n </button>\r\n <button type=\"button\" (click)=\"reset()\" class=\"btn btn-raised btn-warning mr-1\" translate>\r\n <i class=\"fa fa-times\"></i>&nbsp;<span translate>Reset</span>\r\n </button>\r\n <button *ngIf=\"(isReport == undefined || !isReport)\" type=\"submit\"\r\n class=\"btn btn-raised btn-primary\" #UCSearchClick>\r\n <i class=\"fa fa-search\"></i>&nbsp;<span translate>Search</span>\r\n </button>\r\n <button *ngIf=\"(isReport != undefined && isReport)\" type=\"button\" (click)=\"GenerateReport()\"\r\n class=\"btn btn-raised btn-primary\">\r\n <i class=\"fa ft-download\"></i>&nbsp;<span translate>Generate Report</span>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</section>\r\n<br>\r\n<!-- // Basic form layout section end -->",
1307
1432
  providers: [ExcelService, common.DatePipe],
1308
1433
  animations: [
1309
1434
  animations.trigger('changeDivSize', [