@adins/ucsearch 2.2.53 → 2.2.54
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 +6 -3
- package/adins-ucsearch.metadata.json +1 -1
- package/bundles/adins-ucsearch.umd.js +159 -34
- 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/KeyValueUCSearch.model.js +17 -1
- package/esm2015/lib/ucsearch.component.js +133 -39
- package/esm5/lib/model/KeyValueUCSearch.model.js +17 -1
- package/esm5/lib/ucsearch.component.js +147 -35
- package/fesm2015/adins-ucsearch.js +146 -38
- package/fesm2015/adins-ucsearch.js.map +1 -1
- package/fesm5/adins-ucsearch.js +160 -34
- package/fesm5/adins-ucsearch.js.map +1 -1
- package/lib/model/KeyValueUCSearch.model.d.ts +3 -0
- package/lib/ucsearch.component.d.ts +3 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.2.0.
|
|
4
4
|
|
|
5
5
|
## Version
|
|
6
|
+
Version 2.2.54
|
|
7
|
+
1. setMonthDDL dropdown list + setDefaultValueYear + setDefaultValueMonth
|
|
8
|
+
|
|
6
9
|
Version 2.2.53
|
|
7
10
|
1. isCriteriaDataTable pada type datetime
|
|
8
11
|
|
|
@@ -417,7 +420,7 @@ search.json :
|
|
|
417
420
|
"label" : "Date From",
|
|
418
421
|
"name" : "dateDt",
|
|
419
422
|
"id" : "uniqueId",
|
|
420
|
-
"value" : "",
|
|
423
|
+
"value" : "", // BD : set value base on BusinessDate. format: BD + (+|-) + number.
|
|
421
424
|
"isTime" : "" // boolean: true|false
|
|
422
425
|
"restriction" : "gte",
|
|
423
426
|
"datatype" : "date",
|
|
@@ -429,9 +432,9 @@ search.json :
|
|
|
429
432
|
"label" : "dropdown",
|
|
430
433
|
"name" : "dropdownId",
|
|
431
434
|
"id" : "uniqueId",
|
|
432
|
-
"value" : "", // BD : set value base on BusinessDate.
|
|
435
|
+
"value" : "BD+", // BD : set value base on BusinessDate. format: BD + (+|-) + number(default 1).
|
|
433
436
|
"datatype" : "date",
|
|
434
|
-
"dtmType" : "month" // string: (month | year
|
|
437
|
+
"dtmType" : "month" // string: (month | year) format : "month"/"year" + (+-|-+|+|-) + number. generate list month/year base on number.
|
|
435
438
|
"ddlType" : "all", // string: (one, all, blank) // (select one, select all, 'no select option') | default select all
|
|
436
439
|
"items" : [ // hardcode the option list
|
|
437
440
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"UCSearchService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":2,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}]},"statics":{"ngInjectableDef":{}}},"UCSearchComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":18,"character":1},"arguments":[{"selector":"lib-UCSearch","providers":[{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","module":"@angular/common","name":"DatePipe","line":22,"character":28}],"animations":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"trigger","line":24,"character":4},"arguments":["changeDivSize",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"state","line":25,"character":6},"arguments":["initial",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":25,"character":23},"arguments":[{"height":"*","opacity":"1"}]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"state","line":29,"character":6},"arguments":["final",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":29,"character":21},"arguments":[{"height":"0px","opacity":"0","overflow":"hidden"}]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition","line":34,"character":6},"arguments":["initial=>final",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate","line":34,"character":35},"arguments":["300ms"]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition","line":35,"character":6},"arguments":["final=>initial",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate","line":35,"character":35},"arguments":["300ms"]}]}]]}],"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> <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> <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> <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> <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 -->","styles":[".ucSearch-title{margin:3px}"]}]}],"members":{"content":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":43,"character":3},"arguments":["enjiForm"]}]}],"myForm":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":49,"character":3},"arguments":["formIdSearch"]}]}],"searchInput":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":50,"character":3}}]}],"pageSize":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":51,"character":3}}]}],"isReport":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":52,"character":3}}]}],"result":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":53,"character":3}}]}],"genRpt":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":54,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":113,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/platform-browser","name":"DOCUMENT","line":113,"character":12}]}],null,null,null],"parameters":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":112,"character":28},{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":112,"character":96},null,{"__symbolic":"reference","module":"ngx-toastr","name":"ToastrService","line":113,"character":56},{"__symbolic":"reference","module":"ngx-cookie","name":"CookieService","line":113,"character":94},{"__symbolic":"reference","module":"@angular/common","name":"DatePipe","line":114,"character":22}]}],"changeState":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"initiateForm":[{"__symbolic":"method"}],"SetRoleOfficeCodes":[{"__symbolic":"method"}],"setYearDDL":[{"__symbolic":"method"}],"getJSON":[{"__symbolic":"method"}],"postJSON":[{"__symbolic":"method"}],"searchClick":[{"__symbolic":"method"}],"reset":[{"__symbolic":"method"}],"search":[{"__symbolic":"method"}],"GenerateReport":[{"__symbolic":"method"}],"lessThanFour":[{"__symbolic":"method"}],"resolveObject":[{"__symbolic":"method"}],"transformAmount":[{"__symbolic":"method"}],"transformToDecimal":[{"__symbolic":"method"}],"exportAsXLSX":[{"__symbolic":"method"}],"onChangeEvent":[{"__symbolic":"method"}],"SetProcessKey":[{"__symbolic":"method"}],"switchCase":[{"__symbolic":"method"}],"DecryptString":[{"__symbolic":"method"}],"checkInputDate":[{"__symbolic":"method"}]}},"customCurrencyMaskConfig":{"align":"right","allowNegative":false,"allowZero":true,"decimal":".","precision":2,"prefix":"","suffix":"","thousands":",","nullable":false,"inputMode":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"ngx-currency","name":"CurrencyMaskInputMode","line":19,"character":13},"member":"NATURAL"}},"UCSearchModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":21,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"UCSearchComponent"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":24,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":25,"character":4},{"__symbolic":"reference","module":"@adins/uc-show-errors","name":"UcShowErrorsModule","line":26,"character":4},{"__symbolic":"reference","module":"@adins/uc-directive-upper-case","name":"UcDirectiveUpperCaseModule","line":27,"character":4},{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"ngx-currency","name":"NgxCurrencyModule","line":28,"character":4},"member":"forRoot"},"arguments":[{"__symbolic":"reference","name":"customCurrencyMaskConfig"}]},{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@ngx-translate/core","name":"TranslateModule","line":29,"character":4},"member":"forChild"}}],"exports":[{"__symbolic":"reference","name":"UCSearchComponent"}]}]}],"members":{}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":7,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"exportAsExcelFile":[{"__symbolic":"method"}],"saveAsExcelFile":[{"__symbolic":"method"}]}}},"origins":{"UCSearchService":"./lib/ucsearch.service","UCSearchComponent":"./lib/ucsearch.component","customCurrencyMaskConfig":"./lib/ucsearch.module","UCSearchModule":"./lib/ucsearch.module","ɵa":"./lib/services/excel-service/excel-service"},"importAs":"@adins/ucsearch"}
|
|
1
|
+
{"__symbolic":"module","version":4,"metadata":{"UCSearchService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":2,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}]},"statics":{"ngInjectableDef":{}}},"UCSearchComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":18,"character":1},"arguments":[{"selector":"lib-UCSearch","providers":[{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","module":"@angular/common","name":"DatePipe","line":22,"character":28}],"animations":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"trigger","line":24,"character":4},"arguments":["changeDivSize",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"state","line":25,"character":6},"arguments":["initial",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":25,"character":23},"arguments":[{"height":"*","opacity":"1"}]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"state","line":29,"character":6},"arguments":["final",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":29,"character":21},"arguments":[{"height":"0px","opacity":"0","overflow":"hidden"}]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition","line":34,"character":6},"arguments":["initial=>final",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate","line":34,"character":35},"arguments":["300ms"]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition","line":35,"character":6},"arguments":["final=>initial",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate","line":35,"character":35},"arguments":["300ms"]}]}]]}],"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> <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> <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> <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> <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 -->","styles":[".ucSearch-title{margin:3px}"]}]}],"members":{"content":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":43,"character":3},"arguments":["enjiForm"]}]}],"myForm":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":49,"character":3},"arguments":["formIdSearch"]}]}],"searchInput":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":50,"character":3}}]}],"pageSize":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":51,"character":3}}]}],"isReport":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":52,"character":3}}]}],"result":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":53,"character":3}}]}],"genRpt":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":54,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":113,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/platform-browser","name":"DOCUMENT","line":113,"character":12}]}],null,null,null],"parameters":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":112,"character":28},{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":112,"character":96},null,{"__symbolic":"reference","module":"ngx-toastr","name":"ToastrService","line":113,"character":56},{"__symbolic":"reference","module":"ngx-cookie","name":"CookieService","line":113,"character":94},{"__symbolic":"reference","module":"@angular/common","name":"DatePipe","line":114,"character":22}]}],"changeState":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"initiateForm":[{"__symbolic":"method"}],"SetRoleOfficeCodes":[{"__symbolic":"method"}],"setDefaultValueMonth":[{"__symbolic":"method"}],"setMonthDDL":[{"__symbolic":"method"}],"setDefaultValueYear":[{"__symbolic":"method"}],"setYearDDL":[{"__symbolic":"method"}],"getJSON":[{"__symbolic":"method"}],"postJSON":[{"__symbolic":"method"}],"searchClick":[{"__symbolic":"method"}],"reset":[{"__symbolic":"method"}],"search":[{"__symbolic":"method"}],"GenerateReport":[{"__symbolic":"method"}],"lessThanFour":[{"__symbolic":"method"}],"resolveObject":[{"__symbolic":"method"}],"transformAmount":[{"__symbolic":"method"}],"transformToDecimal":[{"__symbolic":"method"}],"exportAsXLSX":[{"__symbolic":"method"}],"onChangeEvent":[{"__symbolic":"method"}],"SetProcessKey":[{"__symbolic":"method"}],"switchCase":[{"__symbolic":"method"}],"DecryptString":[{"__symbolic":"method"}],"checkInputDate":[{"__symbolic":"method"}]}},"customCurrencyMaskConfig":{"align":"right","allowNegative":false,"allowZero":true,"decimal":".","precision":2,"prefix":"","suffix":"","thousands":",","nullable":false,"inputMode":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"ngx-currency","name":"CurrencyMaskInputMode","line":19,"character":13},"member":"NATURAL"}},"UCSearchModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":21,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"UCSearchComponent"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":24,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":25,"character":4},{"__symbolic":"reference","module":"@adins/uc-show-errors","name":"UcShowErrorsModule","line":26,"character":4},{"__symbolic":"reference","module":"@adins/uc-directive-upper-case","name":"UcDirectiveUpperCaseModule","line":27,"character":4},{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"ngx-currency","name":"NgxCurrencyModule","line":28,"character":4},"member":"forRoot"},"arguments":[{"__symbolic":"reference","name":"customCurrencyMaskConfig"}]},{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@ngx-translate/core","name":"TranslateModule","line":29,"character":4},"member":"forChild"}}],"exports":[{"__symbolic":"reference","name":"UCSearchComponent"}]}]}],"members":{}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":7,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"exportAsExcelFile":[{"__symbolic":"method"}],"saveAsExcelFile":[{"__symbolic":"method"}]}}},"origins":{"UCSearchService":"./lib/ucsearch.service","UCSearchComponent":"./lib/ucsearch.component","customCurrencyMaskConfig":"./lib/ucsearch.module","UCSearchModule":"./lib/ucsearch.module","ɵa":"./lib/services/excel-service/excel-service"},"importAs":"@adins/ucsearch"}
|
|
@@ -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
|
|
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.
|
|
425
|
+
data.component[i].value = _this.setDefaultValueMonth(data.component[i].value);
|
|
412
426
|
}
|
|
413
|
-
data.component[i].items = _this.
|
|
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.
|
|
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
|
|
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[
|
|
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,9 +836,9 @@
|
|
|
717
836
|
this.toastr.warning("Please select " + label);
|
|
718
837
|
break;
|
|
719
838
|
}
|
|
720
|
-
if (this.configuration.component[
|
|
839
|
+
if (this.configuration.component[i].type == "taskDefinitionKey" || this.configuration.component[i].type == "officeRoleCodes")
|
|
721
840
|
continue;
|
|
722
|
-
if (this.configuration.component[
|
|
841
|
+
if (this.configuration.component[i].type == "claim") {
|
|
723
842
|
critObj.propName = component.getAttribute('data-name');
|
|
724
843
|
critObj.restriction = text;
|
|
725
844
|
critObj.value = null;
|
|
@@ -1047,144 +1166,150 @@
|
|
|
1047
1166
|
function (condList) {
|
|
1048
1167
|
/** @type {?} */
|
|
1049
1168
|
var condition = false;
|
|
1050
|
-
|
|
1169
|
+
var _loop_1 = function (i) {
|
|
1051
1170
|
/** @type {?} */
|
|
1052
|
-
var idx =
|
|
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 (
|
|
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 (
|
|
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 (
|
|
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 (
|
|
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 (
|
|
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 (
|
|
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 (
|
|
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 (
|
|
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 (
|
|
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 (
|
|
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 (
|
|
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 (
|
|
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
|
};
|