@adins/ucsearch 2.2.31 → 2.2.33
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 +8 -1
- package/adins-ucsearch.metadata.json +1 -1
- package/bundles/adins-ucsearch.umd.js +48 -28
- package/bundles/adins-ucsearch.umd.js.map +1 -1
- package/bundles/adins-ucsearch.umd.min.js +1 -1
- package/bundles/adins-ucsearch.umd.min.js.map +1 -1
- package/esm2015/lib/model/AdInstConstant.js +3 -3
- package/esm2015/lib/model/CriteriaObj.model.js +4 -1
- package/esm2015/lib/ucsearch.component.js +43 -23
- package/esm2015/lib/ucsearch.module.js +3 -1
- package/esm5/lib/model/AdInstConstant.js +3 -3
- package/esm5/lib/model/CriteriaObj.model.js +4 -1
- package/esm5/lib/ucsearch.component.js +43 -23
- package/esm5/lib/ucsearch.module.js +3 -1
- package/fesm2015/adins-ucsearch.js +45 -24
- package/fesm2015/adins-ucsearch.js.map +1 -1
- package/fesm5/adins-ucsearch.js +45 -24
- package/fesm5/adins-ucsearch.js.map +1 -1
- package/lib/model/CriteriaObj.model.d.ts +1 -0
- package/lib/ucsearch.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -9,6 +9,7 @@ import { FormsModule } from '@angular/forms';
|
|
|
9
9
|
import { CurrencyMaskInputMode, NgxCurrencyModule } from 'ngx-currency';
|
|
10
10
|
import { TranslateModule } from '@ngx-translate/core';
|
|
11
11
|
import { UcShowErrorsModule } from '@adins/uc-show-errors';
|
|
12
|
+
import { UcDirectiveUpperCaseModule } from '@adins/uc-directive-upper-case';
|
|
12
13
|
/** @type {?} */
|
|
13
14
|
export var customCurrencyMaskConfig = {
|
|
14
15
|
align: "right",
|
|
@@ -32,6 +33,7 @@ var UCSearchModule = /** @class */ (function () {
|
|
|
32
33
|
CommonModule,
|
|
33
34
|
FormsModule,
|
|
34
35
|
UcShowErrorsModule,
|
|
36
|
+
UcDirectiveUpperCaseModule,
|
|
35
37
|
NgxCurrencyModule.forRoot(customCurrencyMaskConfig),
|
|
36
38
|
TranslateModule.forChild()
|
|
37
39
|
],
|
|
@@ -41,4 +43,4 @@ var UCSearchModule = /** @class */ (function () {
|
|
|
41
43
|
return UCSearchModule;
|
|
42
44
|
}());
|
|
43
45
|
export { UCSearchModule };
|
|
44
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
46
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidWNzZWFyY2gubW9kdWxlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQGFkaW5zL3Vjc2VhcmNoLyIsInNvdXJjZXMiOlsibGliL3Vjc2VhcmNoLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUN6RCxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQzdDLE9BQU8sRUFBRSxxQkFBcUIsRUFBRSxpQkFBaUIsRUFBRSxNQUFNLGNBQWMsQ0FBQztBQUN4RSxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDdEQsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFDM0QsT0FBTyxFQUFFLDBCQUEwQixFQUFFLE1BQU0sZ0NBQWdDLENBQUM7O0FBRTVFLE1BQU0sS0FBTyx3QkFBd0IsR0FBRztJQUN0QyxLQUFLLEVBQUUsT0FBTztJQUNkLGFBQWEsRUFBRSxLQUFLO0lBQ3BCLFNBQVMsRUFBRSxJQUFJO0lBQ2YsT0FBTyxFQUFFLEdBQUc7SUFDWix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@@ -12,6 +12,7 @@ import { FormsModule } from '@angular/forms';
|
|
|
12
12
|
import { CurrencyMaskInputMode, NgxCurrencyModule } from 'ngx-currency';
|
|
13
13
|
import { TranslateModule } from '@ngx-translate/core';
|
|
14
14
|
import { UcShowErrorsModule } from '@adins/uc-show-errors';
|
|
15
|
+
import { UcDirectiveUpperCaseModule } from '@adins/uc-directive-upper-case';
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
18
|
* @fileoverview added by tsickle
|
|
@@ -49,8 +50,8 @@ AdInsConstant.RestrictionOr = "Or"; //pastikan ada 1 criteria sebelumnya
|
|
|
49
50
|
//pastikan ada 1 criteria sebelumnya
|
|
50
51
|
AdInsConstant.RestrictionOrNeq = "OrNeq"; //pastikan ada 1 criteria sebelumnya
|
|
51
52
|
//pastikan ada 1 criteria sebelumnya
|
|
52
|
-
AdInsConstant.RestrictionIsNull = "
|
|
53
|
-
AdInsConstant.RestrictionIsNotNull = "
|
|
53
|
+
AdInsConstant.RestrictionIsNull = "ISNULL";
|
|
54
|
+
AdInsConstant.RestrictionIsNotNull = "ISNOTNULL";
|
|
54
55
|
AdInsConstant.RestrictionGTE = "GTE";
|
|
55
56
|
AdInsConstant.RestrictionLTE = "LTE";
|
|
56
57
|
AdInsConstant.showData = "10,50,100";
|
|
@@ -102,6 +103,7 @@ class CriteriaObj {
|
|
|
102
103
|
this.low = 0;
|
|
103
104
|
this.high = 0;
|
|
104
105
|
this.DataType = 'Text';
|
|
106
|
+
this.isCriteriaDataTable = false;
|
|
105
107
|
}
|
|
106
108
|
}
|
|
107
109
|
|
|
@@ -252,6 +254,16 @@ class UCSearchComponent {
|
|
|
252
254
|
];
|
|
253
255
|
this.ListOfMonth = new ListKeyValueMonth();
|
|
254
256
|
this.ListOfYear = new Array();
|
|
257
|
+
this.ClaimList = [
|
|
258
|
+
{
|
|
259
|
+
Key: AdInsConstant.RestrictionIsNull,
|
|
260
|
+
Value: "CLAIMED"
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
Key: AdInsConstant.RestrictionIsNotNull,
|
|
264
|
+
Value: "UNCLAIMED"
|
|
265
|
+
},
|
|
266
|
+
];
|
|
255
267
|
this.ExportType = 0;
|
|
256
268
|
this.pageNow = 1;
|
|
257
269
|
this.isDataLoaded = false;
|
|
@@ -607,37 +619,45 @@ class UCSearchComponent {
|
|
|
607
619
|
this.toastr.warning("Please select " + label);
|
|
608
620
|
break;
|
|
609
621
|
}
|
|
610
|
-
if (
|
|
611
|
-
|
|
612
|
-
critObj.
|
|
613
|
-
|
|
614
|
-
critObj.propName = component.name;
|
|
615
|
-
}
|
|
616
|
-
else {
|
|
617
|
-
critObj.propName = component.getAttribute('ng-reflect-name');
|
|
618
|
-
}
|
|
619
|
-
critObj.value = text;
|
|
622
|
+
if (this.configuration.component[i].type == "claim") {
|
|
623
|
+
critObj.restriction = text;
|
|
624
|
+
critObj.value = null;
|
|
625
|
+
critObj.propName = component.getAttribute('data-name');
|
|
620
626
|
arrCrit.push(critObj);
|
|
621
627
|
}
|
|
622
|
-
else
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
if (x != 0) {
|
|
627
|
-
ddlList.push(component.options[x].value);
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
if (ddlList.length != 0) {
|
|
631
|
-
critObj.restriction = AdInsConstant.RestrictionIn;
|
|
628
|
+
else {
|
|
629
|
+
if (text != "all" && text != "one") {
|
|
630
|
+
//Kalau Dari Dropdown udah pasti pake Eq
|
|
631
|
+
critObj.restriction = AdInsConstant.RestrictionEq;
|
|
632
632
|
if (component.name != "") {
|
|
633
633
|
critObj.propName = component.name;
|
|
634
634
|
}
|
|
635
635
|
else {
|
|
636
636
|
critObj.propName = component.getAttribute('ng-reflect-name');
|
|
637
637
|
}
|
|
638
|
-
critObj.
|
|
638
|
+
critObj.value = text;
|
|
639
639
|
arrCrit.push(critObj);
|
|
640
640
|
}
|
|
641
|
+
else if (text == "all" && IsQueryIn == true && component.options.length != 0) {
|
|
642
|
+
/** @type {?} */
|
|
643
|
+
let ddlList = new Array();
|
|
644
|
+
for (let x = 0; x < component.options.length; x++) {
|
|
645
|
+
if (x != 0) {
|
|
646
|
+
ddlList.push(component.options[x].value);
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
if (ddlList.length != 0) {
|
|
650
|
+
critObj.restriction = AdInsConstant.RestrictionIn;
|
|
651
|
+
if (component.name != "") {
|
|
652
|
+
critObj.propName = component.name;
|
|
653
|
+
}
|
|
654
|
+
else {
|
|
655
|
+
critObj.propName = component.getAttribute('ng-reflect-name');
|
|
656
|
+
}
|
|
657
|
+
critObj.listValue = ddlList;
|
|
658
|
+
arrCrit.push(critObj);
|
|
659
|
+
}
|
|
660
|
+
}
|
|
641
661
|
}
|
|
642
662
|
}
|
|
643
663
|
else {
|
|
@@ -1117,7 +1137,7 @@ class UCSearchComponent {
|
|
|
1117
1137
|
UCSearchComponent.decorators = [
|
|
1118
1138
|
{ type: Component, args: [{
|
|
1119
1139
|
selector: 'lib-UCSearch',
|
|
1120
|
-
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\" [ngModel]=\"question.value\"\r\n [required]=\"question.isRequired\" name=\"{{question.name}}\"\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}}\" 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\" [ngModel]=\"question.value\"\r\n [required]=\"question.isRequired\" name=\"{{question.name}}\" attr.data-required=\"{{question.isRequired}}\"\r\n attr.data-type=\"{{question.datatype}}\" attr.data-name=\"{{question.name}}\"\r\n value=\"{{question.value}}\" 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\" [ngModel]=\"question.value\"\r\n [required]=\"question.isRequired\" name=\"{{question.name+[i]}}\" attr.data-required=\"{{question.isRequired}}\"\r\n value=\"{{question.value}}\" (keyup.enter)=\"searchClick()\"\r\n attr.data-restriction=\"{{question.restriction}}\" attr.data-type=\"{{question.datatype}}\"\r\n attr.data-name=\"{{question.name}}\" 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}}\" (keyup.enter)=\"searchClick()\"\r\n 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}\" 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}}\" (keyup.enter)=\"searchClick()\"\r\n 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}\" 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=\"date\" id=\"{{question.id}}\"\r\n class=\"form-control search-form-control btn-lookup\" name=\"{{question.name+[i]}}\" [ngModel]=\"question.value\"\r\n [required]=\"question.isRequired\" attr.data-required=\"{{question.isRequired}}\" value=\"{{question.value}}\"\r\n attr.data-type=\"{{question.datatype}}\" attr.data-name=\"{{question.name}}\"\r\n (keyup.enter)=\"searchClick()\" attr.data-restriction=\"{{question.restriction}}\" attr.label=\"{{question.label}}\"\r\n min=\"{{question.minDate | date:'yyyy-MM-dd'}}\" 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=='dropdown'\">\r\n <!-- Ini kalau datanya tidak di load dari URL -->\r\n <div *ngIf=\"!question.isFromURL\">\r\n <select name=\"{{question.name}}\" attr.data-required=\"{{question.isRequired}}\"\r\n [required]=\"question.isRequired\" class=\"form-control search-form-control\" attr.query-in=\"{{question.isQueryIn}}\"\r\n attr.data-type=\"{{question.datatype}}\" attr.data-name=\"{{question.name}}\" attr.label=\"{{question.label}}\"\r\n [hidden]=\"question?.items.length == 1\"\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?.items.length != 1\" value=\"one\">\r\n Select One</option>\r\n <option\r\n *ngIf=\"(question?.ddlType == undefined || question.ddlType == 'all') && question?.items.length != 1\"\r\n value=\"all\">All</option>\r\n <option *ngFor=\"let item of question?.items\" value=\"{{item.key}}\">\r\n {{item.value}}\r\n </option>\r\n </select>\r\n <label *ngIf=\"question?.items.length == 1\">{{question.items[0].value}}</label>\r\n </div>\r\n <!-- Ini kalau datanya di load dari URL -->\r\n <div *ngIf=\"question.isFromURL\">\r\n <div *ngIf=\"question.isEvent\">\r\n <select name=\"{{question.name}}\" attr.data-required=\"{{question.isRequired}}\"\r\n [required]=\"question.isRequired\" class=\"form-control search-form-control\" attr.query-in=\"{{question.isQueryIn}}\"\r\n attr.data-type=\"{{question.datatype}}\" attr.data-name=\"{{question.name}}\" attr.label=\"{{question.label}}\"\r\n (change)=\"onChangeEvent($event.target.value, question)\"\r\n [hidden]=\"question?.itemsUrl.length == 1\"\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.isEvent\">\r\n <select name=\"{{question.name}}\" attr.data-required=\"{{question.isRequired}}\"\r\n [required]=\"question.isRequired\" class=\"form-control search-form-control\" attr.query-in=\"{{question.isQueryIn}}\"\r\n attr.data-type=\"{{question.datatype}}\" attr.label=\"{{question.label}}\"\r\n [hidden]=\"question?.itemsUrl.length == 1\"\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>\r\n </div>\r\n <lib-uc-show-errors *ngIf=\"question.type!='datepicker'\" [control]=\"enjiForm.form.controls[question.name]\"\r\n [submit]=\"enjiForm.submitted\">\r\n </lib-uc-show-errors>\r\n <lib-uc-show-errors *ngIf=\"question.type=='datepicker'\" [control]=\"enjiForm.form.controls[question.name+[i]]\"\r\n [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> Export Excel\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> Reset\r\n </button>\r\n <button *ngIf=\"(isReport == undefined || !isReport)\" type=\"submit\"\r\n class=\"btn btn-raised btn-primary\" #UCSearchClick translate>\r\n <i class=\"fa fa-search\"></i> Search\r\n </button>\r\n <button *ngIf=\"(isReport != undefined && isReport)\" type=\"button\" (click)=\"GenerateReport()\"\r\n class=\"btn btn-raised btn-primary\" translate>\r\n <i class=\"fa ft-download\"></i> Generate Report\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 -->",
|
|
1140
|
+
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\" [ngModel]=\"question.value\"\r\n [required]=\"question.isRequired\" name=\"{{question.name}}\"\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}}\" 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\" [ngModel]=\"question.value\"\r\n [required]=\"question.isRequired\" name=\"{{question.name}}\" attr.data-required=\"{{question.isRequired}}\"\r\n attr.data-type=\"{{question.datatype}}\" attr.data-name=\"{{question.name}}\"\r\n value=\"{{question.value}}\" 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\" [ngModel]=\"question.value\"\r\n [required]=\"question.isRequired\" name=\"{{question.name+[i]}}\" attr.data-required=\"{{question.isRequired}}\"\r\n value=\"{{question.value}}\" (keyup.enter)=\"searchClick()\"\r\n attr.data-restriction=\"{{question.restriction}}\" attr.data-type=\"{{question.datatype}}\"\r\n attr.data-name=\"{{question.name}}\" 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}}\" (keyup.enter)=\"searchClick()\"\r\n 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}\" 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}}\" (keyup.enter)=\"searchClick()\"\r\n 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}\" 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=\"date\" id=\"{{question.id}}\"\r\n class=\"form-control search-form-control btn-lookup\" name=\"{{question.name+[i]}}\" [ngModel]=\"question.value\"\r\n [required]=\"question.isRequired\" attr.data-required=\"{{question.isRequired}}\" value=\"{{question.value}}\"\r\n attr.data-type=\"{{question.datatype}}\" attr.data-name=\"{{question.name}}\"\r\n (keyup.enter)=\"searchClick()\" attr.data-restriction=\"{{question.restriction}}\" attr.label=\"{{question.label}}\"\r\n min=\"{{question.minDate | date:'yyyy-MM-dd'}}\" 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=='dropdown'\">\r\n <!-- Ini kalau datanya tidak di load dari URL -->\r\n <div *ngIf=\"!question.isFromURL\">\r\n <select name=\"{{question.name}}\" attr.data-required=\"{{question.isRequired}}\"\r\n [required]=\"question.isRequired\" class=\"form-control search-form-control\" attr.query-in=\"{{question.isQueryIn}}\"\r\n attr.data-type=\"{{question.datatype}}\" attr.data-name=\"{{question.name}}\" attr.label=\"{{question.label}}\"\r\n [hidden]=\"question?.items.length == 1\"\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?.items.length != 1\" value=\"one\">\r\n Select One</option>\r\n <option\r\n *ngIf=\"(question?.ddlType == undefined || question.ddlType == 'all') && question?.items.length != 1\"\r\n value=\"all\">All</option>\r\n <option *ngFor=\"let item of question?.items\" value=\"{{item.key}}\">\r\n {{item.value}}\r\n </option>\r\n </select>\r\n <label *ngIf=\"question?.items.length == 1\">{{question.items[0].value}}</label>\r\n </div>\r\n <!-- Ini kalau datanya di load dari URL -->\r\n <div *ngIf=\"question.isFromURL\">\r\n <div *ngIf=\"question.isEvent\">\r\n <select name=\"{{question.name}}\" attr.data-required=\"{{question.isRequired}}\"\r\n [required]=\"question.isRequired\" class=\"form-control search-form-control\" attr.query-in=\"{{question.isQueryIn}}\"\r\n attr.data-type=\"{{question.datatype}}\" attr.data-name=\"{{question.name}}\" attr.label=\"{{question.label}}\"\r\n (change)=\"onChangeEvent($event.target.value, question)\"\r\n [hidden]=\"question?.itemsUrl.length == 1\"\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.isEvent\">\r\n <select name=\"{{question.name}}\" attr.data-required=\"{{question.isRequired}}\"\r\n [required]=\"question.isRequired\" class=\"form-control search-form-control\" attr.query-in=\"{{question.isQueryIn}}\"\r\n attr.data-type=\"{{question.datatype}}\" attr.label=\"{{question.label}}\"\r\n [hidden]=\"question?.itemsUrl.length == 1\"\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>\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=\"Assignee\" attr.data-name=\"Assignee\"\r\n [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\"\r\n value=\"one\">Select 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'\" [control]=\"enjiForm.form.controls[question.name]\"\r\n [submit]=\"enjiForm.submitted\">\r\n </lib-uc-show-errors>\r\n <lib-uc-show-errors *ngIf=\"question.type=='datepicker'\" [control]=\"enjiForm.form.controls[question.name+[i]]\"\r\n [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> Export Excel\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> Reset\r\n </button>\r\n <button *ngIf=\"(isReport == undefined || !isReport)\" type=\"submit\"\r\n class=\"btn btn-raised btn-primary\" #UCSearchClick translate>\r\n <i class=\"fa fa-search\"></i> Search\r\n </button>\r\n <button *ngIf=\"(isReport != undefined && isReport)\" type=\"button\" (click)=\"GenerateReport()\"\r\n class=\"btn btn-raised btn-primary\" translate>\r\n <i class=\"fa ft-download\"></i> Generate Report\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 -->",
|
|
1121
1141
|
providers: [ExcelService, DatePipe],
|
|
1122
1142
|
animations: [
|
|
1123
1143
|
trigger('changeDivSize', [
|
|
@@ -1183,6 +1203,7 @@ UCSearchModule.decorators = [
|
|
|
1183
1203
|
CommonModule,
|
|
1184
1204
|
FormsModule,
|
|
1185
1205
|
UcShowErrorsModule,
|
|
1206
|
+
UcDirectiveUpperCaseModule,
|
|
1186
1207
|
NgxCurrencyModule.forRoot(customCurrencyMaskConfig),
|
|
1187
1208
|
TranslateModule.forChild()
|
|
1188
1209
|
],
|