@adins/ucsearch 2.11.3 → 2.11.4
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/adins-ucsearch.metadata.json +1 -1
- package/bundles/adins-ucsearch.umd.js +1 -1
- package/bundles/adins-ucsearch.umd.min.js +1 -1
- package/esm2015/lib/ucsearch.component.js +1 -1
- package/esm5/lib/ucsearch.component.js +1 -1
- package/fesm2015/adins-ucsearch.js +1 -1
- package/fesm5/adins-ucsearch.js +1 -1
- package/package.json +1 -1
|
@@ -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.data-numericpair=\"{{question.numericPair}}\"\r\n attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\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 [readonly]=\"question.readonly\" attr.data-type=\"{{question.datatype}}\"\r\n attr.data-name=\"{{question.name}}\"\r\n attr.data-datepickerpair=\"{{question.datepickerPair}}\"\r\n 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'}}\"\r\n (focusout)=\"question.restriction != undefined && 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\r\n *ngIf=\"question.type == 'taskDefinitionKey' || question.type == 'processKey' || 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' || question.type == 'processKey') ? SetProcessKey(i,question.wfKeyFilter) : 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 attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\r\n [hidden]=\"!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1\"\r\n (change)=\"question.isEvent ? onChangeEvent($event.target.value, question) : ''\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }\">\r\n <option\r\n *ngIf=\"question.ddlType == 'one' && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)\"\r\n value=\"one\">\r\n Select One</option>\r\n <option\r\n *ngIf=\"(question?.ddlType == undefined || question.ddlType == 'all') && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)\"\r\n value=\"all\">All</option>\r\n <option *ngFor=\"let item of !question.isFromURL ? question?.items : question?.itemsUrl\"\r\n value=\"{{!question.isFromURL ? item.key : item.Key}}\">\r\n {{!question.isFromURL ? item.value : item.Value}}\r\n </option>\r\n </select>\r\n <label\r\n *ngIf=\"!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1\">{{!question.isFromURL\r\n ? question.items[0].value :\r\n question.itemsUrl[0].Value}}</label>\r\n </div>\r\n <div *ngIf=\"question.type=='dropdownSearch'\">\r\n <div class=\"dds-display-item\">\r\n <input type=\"text\" class=\"form-control search-form-control dds-input\"\r\n name=\"{{'ddsValue'+question.name}}\" [(ngModel)]=\"question.value\" readonly\r\n (click)=\"question.isListHide = !question.isListHide; question.searchText=''\">\r\n </div>\r\n <div class=\"dds-list-container\" [hidden]=\"question.isListHide\">\r\n <input type=\"text\" class=\"form-control\" name=\"{{'searchText'+question.name}}\" [(ngModel)]=\"question.searchText\"\r\n placeholder=\"FILTER\">\r\n <div class=\"dds-items-container\">\r\n <!-- blm tentu bisa -->\r\n <div class=\"dds-list-item\" (click)=\"selectedOption({key:'',value:''},question)\">\r\n Select One\r\n </div>\r\n <div class=\"dds-list-item\"\r\n *ngFor=\"let item of question?.items | textSearch : question.searchText; let i=index\"\r\n (click)=\"selectedOption(item,question)\"\r\n [ngClass]=\"{'dds-active': isSelected(item, question.value)}\">\r\n {{item?.value}}\r\n </div>\r\n </div>\r\n </div>\r\n\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\r\n 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}.dds-input{background-color:#fff;text-transform:uppercase}.dds-display-item:after{content:'\\e929';font-family:feather;font-size:1rem;display:inline-block;position:absolute;right:5px;top:5px;-webkit-transform:rotate(90deg);transform:rotate(90deg)}.dds-list-container{position:relative}.dds-items-container{border:1px solid #00b7d4;background-color:#fff;position:absolute;font-size:1rem;overflow:auto;height:500%;width:100%;z-index:9;top:100%}.dds-list-item{padding:2px 5px;cursor:pointer}.dds-list-item:hover{background-color:#1a73e8;color:#fff}.dds-active{background-color:#ddd}"]}]}],"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}}]}],"reqGetAllData":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":55,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":115,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/platform-browser","name":"DOCUMENT","line":115,"character":12}]}],null,null,null],"parameters":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":114,"character":28},{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":114,"character":96},null,{"__symbolic":"reference","module":"ngx-toastr","name":"ToastrService","line":115,"character":56},{"__symbolic":"reference","module":"ngx-cookie","name":"CookieService","line":115,"character":94},{"__symbolic":"reference","module":"@angular/common","name":"DatePipe","line":116,"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"}],"selectedOption":[{"__symbolic":"method"}],"isSelected":[{"__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":20,"character":13},"member":"NATURAL"}},"UCSearchModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":22,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"UCSearchComponent"},{"__symbolic":"reference","name":"ɵb"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":25,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":26,"character":4},{"__symbolic":"reference","module":"@adins/uc-show-errors","name":"UcShowErrorsModule","line":27,"character":4},{"__symbolic":"reference","module":"@adins/uc-directive-upper-case","name":"UcDirectiveUpperCaseModule","line":28,"character":4},{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"ngx-currency","name":"NgxCurrencyModule","line":29,"character":4},"member":"forRoot"},"arguments":[{"__symbolic":"reference","name":"customCurrencyMaskConfig"}]},{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@ngx-translate/core","name":"TranslateModule","line":30,"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"}]}},"ɵb":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":2,"character":1},"arguments":[{"name":"textSearch"}]}],"members":{"transform":[{"__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","ɵb":"./lib/pipe/text-search.pipe"},"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.data-numericpair=\"{{question.numericPair}}\"\r\n attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\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 [readonly]=\"question.readonly\" attr.data-type=\"{{question.datatype}}\"\r\n attr.data-name=\"{{question.name}}\"\r\n attr.data-datepickerpair=\"{{question.datepickerPair}}\"\r\n 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'}}\"\r\n (focusout)=\"question.restriction != undefined && 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\r\n *ngIf=\"question.type == 'taskDefinitionKey' || question.type == 'processKey' || 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' || question.type == 'processKey') ? SetProcessKey(i,question.wfKeyFilter) : 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 attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\r\n [hidden]=\"!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1\"\r\n (change)=\"question.isEvent ? onChangeEvent($event.target.value, question) : ''\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }\">\r\n <option\r\n *ngIf=\"question.ddlType == 'one' && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)\"\r\n value=\"one\">\r\n Select One</option>\r\n <option\r\n *ngIf=\"(question?.ddlType == undefined || question.ddlType == 'all') && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)\"\r\n value=\"all\">All</option>\r\n <option *ngFor=\"let item of !question.isFromURL ? question?.items : question?.itemsUrl\"\r\n value=\"{{!question.isFromURL ? item.key : item.Key}}\">\r\n {{!question.isFromURL ? item.value : item.Value}}\r\n </option>\r\n </select>\r\n <label\r\n *ngIf=\"!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1\">{{!question.isFromURL\r\n ? question.items[0].value :\r\n question.itemsUrl[0].Value}}</label>\r\n </div>\r\n <div *ngIf=\"question.type=='dropdownSearch'\">\r\n <div class=\"dds-display-item\">\r\n <input type=\"text\" class=\"form-control search-form-control dds-input\"\r\n name=\"{{'ddsValue'+question.name}}\" [(ngModel)]=\"question.descr\" readonly\r\n (click)=\"question.isListHide = !question.isListHide; question.searchText=''\">\r\n </div>\r\n <div class=\"dds-list-container\" [hidden]=\"question.isListHide\">\r\n <input type=\"text\" class=\"form-control\" name=\"{{'searchText'+question.name}}\" [(ngModel)]=\"question.searchText\"\r\n placeholder=\"FILTER\">\r\n <div class=\"dds-items-container\">\r\n <!-- blm tentu bisa -->\r\n <div class=\"dds-list-item\" (click)=\"selectedOption({key:'',value:''},question)\">\r\n Select One\r\n </div>\r\n <div class=\"dds-list-item\"\r\n *ngFor=\"let item of question?.items | textSearch : question.searchText; let i=index\"\r\n (click)=\"selectedOption(item,question)\"\r\n [ngClass]=\"{'dds-active': isSelected(item, question.value)}\">\r\n {{item?.value}}\r\n </div>\r\n </div>\r\n </div>\r\n\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\r\n 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}.dds-input{background-color:#fff;text-transform:uppercase}.dds-display-item:after{content:'\\e929';font-family:feather;font-size:1rem;display:inline-block;position:absolute;right:5px;top:5px;-webkit-transform:rotate(90deg);transform:rotate(90deg)}.dds-list-container{position:relative}.dds-items-container{border:1px solid #00b7d4;background-color:#fff;position:absolute;font-size:1rem;overflow:auto;height:500%;width:100%;z-index:9;top:100%}.dds-list-item{padding:2px 5px;cursor:pointer}.dds-list-item:hover{background-color:#1a73e8;color:#fff}.dds-active{background-color:#ddd}"]}]}],"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}}]}],"reqGetAllData":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":55,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":115,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/platform-browser","name":"DOCUMENT","line":115,"character":12}]}],null,null,null],"parameters":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":114,"character":28},{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":114,"character":96},null,{"__symbolic":"reference","module":"ngx-toastr","name":"ToastrService","line":115,"character":56},{"__symbolic":"reference","module":"ngx-cookie","name":"CookieService","line":115,"character":94},{"__symbolic":"reference","module":"@angular/common","name":"DatePipe","line":116,"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"}],"selectedOption":[{"__symbolic":"method"}],"isSelected":[{"__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":20,"character":13},"member":"NATURAL"}},"UCSearchModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":22,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"UCSearchComponent"},{"__symbolic":"reference","name":"ɵb"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":25,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":26,"character":4},{"__symbolic":"reference","module":"@adins/uc-show-errors","name":"UcShowErrorsModule","line":27,"character":4},{"__symbolic":"reference","module":"@adins/uc-directive-upper-case","name":"UcDirectiveUpperCaseModule","line":28,"character":4},{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"ngx-currency","name":"NgxCurrencyModule","line":29,"character":4},"member":"forRoot"},"arguments":[{"__symbolic":"reference","name":"customCurrencyMaskConfig"}]},{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@ngx-translate/core","name":"TranslateModule","line":30,"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"}]}},"ɵb":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":2,"character":1},"arguments":[{"name":"textSearch"}]}],"members":{"transform":[{"__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","ɵb":"./lib/pipe/text-search.pipe"},"importAs":"@adins/ucsearch"}
|
|
@@ -1459,7 +1459,7 @@
|
|
|
1459
1459
|
UCSearchComponent.decorators = [
|
|
1460
1460
|
{ type: i0.Component, args: [{
|
|
1461
1461
|
selector: 'lib-UCSearch',
|
|
1462
|
-
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.data-numericpair=\"{{question.numericPair}}\"\r\n attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\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 [readonly]=\"question.readonly\" attr.data-type=\"{{question.datatype}}\"\r\n attr.data-name=\"{{question.name}}\"\r\n attr.data-datepickerpair=\"{{question.datepickerPair}}\"\r\n 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'}}\"\r\n (focusout)=\"question.restriction != undefined && 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\r\n *ngIf=\"question.type == 'taskDefinitionKey' || question.type == 'processKey' || 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' || question.type == 'processKey') ? SetProcessKey(i,question.wfKeyFilter) : 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 attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\r\n [hidden]=\"!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1\"\r\n (change)=\"question.isEvent ? onChangeEvent($event.target.value, question) : ''\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }\">\r\n <option\r\n *ngIf=\"question.ddlType == 'one' && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)\"\r\n value=\"one\">\r\n Select One</option>\r\n <option\r\n *ngIf=\"(question?.ddlType == undefined || question.ddlType == 'all') && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)\"\r\n value=\"all\">All</option>\r\n <option *ngFor=\"let item of !question.isFromURL ? question?.items : question?.itemsUrl\"\r\n value=\"{{!question.isFromURL ? item.key : item.Key}}\">\r\n {{!question.isFromURL ? item.value : item.Value}}\r\n </option>\r\n </select>\r\n <label\r\n *ngIf=\"!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1\">{{!question.isFromURL\r\n ? question.items[0].value :\r\n question.itemsUrl[0].Value}}</label>\r\n </div>\r\n <div *ngIf=\"question.type=='dropdownSearch'\">\r\n <div class=\"dds-display-item\">\r\n <input type=\"text\" class=\"form-control search-form-control dds-input\"\r\n name=\"{{'ddsValue'+question.name}}\" [(ngModel)]=\"question.value\" readonly\r\n (click)=\"question.isListHide = !question.isListHide; question.searchText=''\">\r\n </div>\r\n <div class=\"dds-list-container\" [hidden]=\"question.isListHide\">\r\n <input type=\"text\" class=\"form-control\" name=\"{{'searchText'+question.name}}\" [(ngModel)]=\"question.searchText\"\r\n placeholder=\"FILTER\">\r\n <div class=\"dds-items-container\">\r\n <!-- blm tentu bisa -->\r\n <div class=\"dds-list-item\" (click)=\"selectedOption({key:'',value:''},question)\">\r\n Select One\r\n </div>\r\n <div class=\"dds-list-item\"\r\n *ngFor=\"let item of question?.items | textSearch : question.searchText; let i=index\"\r\n (click)=\"selectedOption(item,question)\"\r\n [ngClass]=\"{'dds-active': isSelected(item, question.value)}\">\r\n {{item?.value}}\r\n </div>\r\n </div>\r\n </div>\r\n\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\r\n 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 -->",
|
|
1462
|
+
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.data-numericpair=\"{{question.numericPair}}\"\r\n attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\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 [readonly]=\"question.readonly\" attr.data-type=\"{{question.datatype}}\"\r\n attr.data-name=\"{{question.name}}\"\r\n attr.data-datepickerpair=\"{{question.datepickerPair}}\"\r\n 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'}}\"\r\n (focusout)=\"question.restriction != undefined && 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\r\n *ngIf=\"question.type == 'taskDefinitionKey' || question.type == 'processKey' || 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' || question.type == 'processKey') ? SetProcessKey(i,question.wfKeyFilter) : 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 attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\r\n [hidden]=\"!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1\"\r\n (change)=\"question.isEvent ? onChangeEvent($event.target.value, question) : ''\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }\">\r\n <option\r\n *ngIf=\"question.ddlType == 'one' && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)\"\r\n value=\"one\">\r\n Select One</option>\r\n <option\r\n *ngIf=\"(question?.ddlType == undefined || question.ddlType == 'all') && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)\"\r\n value=\"all\">All</option>\r\n <option *ngFor=\"let item of !question.isFromURL ? question?.items : question?.itemsUrl\"\r\n value=\"{{!question.isFromURL ? item.key : item.Key}}\">\r\n {{!question.isFromURL ? item.value : item.Value}}\r\n </option>\r\n </select>\r\n <label\r\n *ngIf=\"!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1\">{{!question.isFromURL\r\n ? question.items[0].value :\r\n question.itemsUrl[0].Value}}</label>\r\n </div>\r\n <div *ngIf=\"question.type=='dropdownSearch'\">\r\n <div class=\"dds-display-item\">\r\n <input type=\"text\" class=\"form-control search-form-control dds-input\"\r\n name=\"{{'ddsValue'+question.name}}\" [(ngModel)]=\"question.descr\" readonly\r\n (click)=\"question.isListHide = !question.isListHide; question.searchText=''\">\r\n </div>\r\n <div class=\"dds-list-container\" [hidden]=\"question.isListHide\">\r\n <input type=\"text\" class=\"form-control\" name=\"{{'searchText'+question.name}}\" [(ngModel)]=\"question.searchText\"\r\n placeholder=\"FILTER\">\r\n <div class=\"dds-items-container\">\r\n <!-- blm tentu bisa -->\r\n <div class=\"dds-list-item\" (click)=\"selectedOption({key:'',value:''},question)\">\r\n Select One\r\n </div>\r\n <div class=\"dds-list-item\"\r\n *ngFor=\"let item of question?.items | textSearch : question.searchText; let i=index\"\r\n (click)=\"selectedOption(item,question)\"\r\n [ngClass]=\"{'dds-active': isSelected(item, question.value)}\">\r\n {{item?.value}}\r\n </div>\r\n </div>\r\n </div>\r\n\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\r\n 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 -->",
|
|
1463
1463
|
providers: [ExcelService, common.DatePipe],
|
|
1464
1464
|
animations: [
|
|
1465
1465
|
animations.trigger('changeDivSize', [
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common/http"),require("@angular/platform-browser"),require("file-saver"),require("xlsx"),require("@angular/animations"),require("ngx-toastr"),require("ngx-cookie"),require("crypto-js"),require("@angular/common"),require("@angular/forms"),require("ngx-currency"),require("@ngx-translate/core"),require("@adins/uc-show-errors"),require("@adins/uc-directive-upper-case"),require("@angular/core")):"function"==typeof define&&define.amd?define("@adins/ucsearch",["exports","@angular/common/http","@angular/platform-browser","file-saver","xlsx","@angular/animations","ngx-toastr","ngx-cookie","crypto-js","@angular/common","@angular/forms","ngx-currency","@ngx-translate/core","@adins/uc-show-errors","@adins/uc-directive-upper-case","@angular/core"],t):t((e.adins=e.adins||{},e.adins.ucsearch={}),e.ng.common.http,e.ng.platformBrowser,e.FileSaver,e.XLSX,e.ng.animations,e.ngxToastr,e.ngxCookie,e.CryptoJS,e.ng.common,e.ng.forms,e.ngxCurrency,e.core,e.ucShowErrors,e.ucDirectiveUpperCase,e.ng.core)}(this,function(e,t,n,i,o,r,a,s,l,f,u,c,d,p,m,h){"use strict";var y=(g.decorators=[{type:h.Injectable,args:[{providedIn:"root"}]}],g.ctorParameters=function(){return[]},g.ngInjectableDef=h.defineInjectable({factory:function(){return new g},token:g,providedIn:"root"}),g);function g(){}var v=(q.RestrictionBetween="Between",q.RestrictionLike="Like",q.RestrictionEq="Eq",q.RestrictionNeq="NEQ",q.RestrictionGt="GT",q.RestrictionGte="GTE",q.RestrictionLt="LT",q.RestrictionLte="LTE",q.RestrictionIn="IN",q.RestrictionNotIn="NotIn",q.RestrictionOr="Or",q.RestrictionOrNeq="OrNeq",q.RestrictionIsNull="ISNULL",q.RestrictionIsNotNull="ISNOTNULL",q.RestrictionGTE="GTE",q.RestrictionLTE="LTE",q.showData="10,50,100",q.JoinTypeInner="INNER",q.JoinTypeLeft="LEFT",q);function q(){}var b=function j(){this.baseUrl="",this.apiPath="",this.requestObj=new Object,this.leftColumnToJoin="",this.rightColumnToJoin="",this.joinType=v.JoinTypeInner},I=function A(){this._url="",this.enviromentUrl="",this.title="",this.apiQryPaging="",this.arrCritObj=null,this.addCritInput=new Array,this.listEnvironments=new Array,this.whereValue=new Array,this.fromValue=new Array,this.switchValue=new Array,this.integrationObj=new b,this.isJoinExAPI=!1},D=function N(){this.low=0,this.high=0,this.DataType="Text",this.isCriteriaDataTable=!1},x=function P(){this.includeCount=!0,this.includeData=!0,this.isLoading=!0,this.queryString="",this.rowVersion="",this.integrationObj=new b,this.joinType=v.JoinTypeInner},w=(T.prototype.exportAsExcelFile=function(e,t){var n=o.utils.json_to_sheet(e);console.log("worksheet",n);var i={Sheets:{data:n},SheetNames:["data"]},r=o.write(i,{bookType:"xlsx",type:"array"});this.saveAsExcelFile(r,t)},T.prototype.saveAsExcelFile=function(e,t){var n=new Blob([e],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8"});i.saveAs(n,t+"_export_"+(new Date).getTime()+".xlsx")},T.decorators=[{type:h.Injectable}],T.ctorParameters=function(){return[]},T);function T(){}var F=(E.EXP_TYPE_PDF=0,E.EXP_TYPE_XLS=1,E.EXP_TYPE_XLSX=2,E.EXP_TYPE_DOC=3,E.EXP_TYPE_DOCX=4,E);function E(){}var k=function V(){this.DictOfMonth={},this.ListOfMonth=new Array,this.DictOfMonth={},this.ListOfMonth.push({key:1,value:"January"}),this.DictOfMonth[1]="January",this.ListOfMonth.push({key:2,value:"February"}),this.DictOfMonth[2]="February",this.ListOfMonth.push({key:3,value:"March"}),this.DictOfMonth[3]="March",this.ListOfMonth.push({key:4,value:"April"}),this.DictOfMonth[4]="April",this.ListOfMonth.push({key:5,value:"May"}),this.DictOfMonth[5]="May",this.ListOfMonth.push({key:6,value:"June"}),this.DictOfMonth[6]="June",this.ListOfMonth.push({key:7,value:"July"}),this.DictOfMonth[7]="July",this.ListOfMonth.push({key:8,value:"August"}),this.DictOfMonth[8]="August",this.ListOfMonth.push({key:9,value:"September"}),this.DictOfMonth[9]="September",this.ListOfMonth.push({key:10,value:"October"}),this.DictOfMonth[10]="October",this.ListOfMonth.push({key:11,value:"November"}),this.DictOfMonth[11]="November",this.ListOfMonth.push({key:12,value:"December"}),this.DictOfMonth[12]="December"},C=(Object.defineProperty(M.prototype,"content",{set:function(e){e&&(this.searchForm=e)},enumerable:!0,configurable:!0}),M.prototype.changeState=function(){this.currentState="initial"===this.currentState?"final":"initial",this.isHidden=!1===this.isHidden},M.prototype.ngOnInit=function(){console.log("ucsearch"),this.apiUrl=this.searchInput.enviromentUrl+this.searchInput.apiQryPaging,this.arrCrit=this.searchInput.arrCritObj;var e=this._renderer2.createElement("script");e.text='\n $(document).ready(function(){\n $("#flip").click(function(){\n $("#panel").slideToggle("slow");\n });\n });\n ',this._renderer2.appendChild(this._document.body,e);var t=this.cookieService.get("BusinessDateRaw");this.BisDt=this.DecryptString(t,"AdInsFOU12345678"),this.BusinessDt=new Date(this.BisDt),this.initiateForm()},M.prototype.initiateForm=function(){var h=this;this.getJSON(this.searchInput._url).subscribe(function(t){h.configuration=t,h.exportData=t.exportExcel,t.exportTypeList!=undefined&&0!=t.exportTypeList.length&&(h.ExportTypeList=t.exportTypeList,h.ExportType=h.ExportTypeList[0].key),h.countForm=t.component.length,h.isDataLoaded=!0,h.searchInput.title!=undefined&&""!=h.searchInput.title&&(h.configuration.title=h.searchInput.title);for(var e=0;e<h.countForm;e++){if(1==t.component[e].isFromURL){var n=new x,i=new Array,r=new D;if(r.DataType="text",r.propName=t.component[e].criteriaPropName,r.value=t.component[e].criteriaPropValue,r.restriction="eq",i.push(r),n.criteria=i,n[t.component[e].criteriaPropName]=t.component[e].criteriaPropValue,t.component[e].path!=undefined&&""!=t.component[e].path)if(h.searchInput.listEnvironments!=undefined&&0!=h.searchInput.listEnvironments.length){for(var o=0;o<h.searchInput.listEnvironments.length;o++)if(t.component[e].environment==h.searchInput.listEnvironments[o].environment){t.component[e].fullpath=h.searchInput.listEnvironments[o].url+t.component[e].path;break}}else t.component[e].fullpath=t.component[e].url;else t.component[e].fullpath=t.component[e].url;h.resolveObject(t.component[e],t.component[e].fullpath,n)}if("numeric"==t.component[e].type&&(t.component[e].value=parseFloat(t.component[e].value).toLocaleString("en")),"dropdown"==t.component[e].type&&t.component[e].dtmType!=undefined&&(t.component[e].dtmType.includes("month")&&(t.component[e].value!=undefined&&t.component[e].value.includes("BD")&&(t.component[e].value=h.setDefaultValueMonth(t.component[e].value)),t.component[e].items=h.setMonthDDL(t.component[e].dtmType)),t.component[e].dtmType.includes("year")&&(t.component[e].value!=undefined&&t.component[e].value.includes("BD")&&(t.component[e].value=h.setDefaultValueYear(t.component[e].value)),t.component[e].items=h.setYearDDL(t.component[e].dtmType))),t.component[e].value||(t.component[e].value="","all"==t.component[e].ddlType&&(t.component[e].value="all"),"one"==t.component[e].ddlType&&(t.component[e].value="one")),"datepicker"==t.component[e].type){if(h.readonly=t.component[e].readonly,t.component[e].value.includes("BD")){var a=new Date;null!=h.BisDt&&(a=new Date(h.BisDt));var s=t.component[e].value.charAt(2),l=new Date;if("-"==s){var u=t.component[e].value.split("-",2),c=parseInt(u[1]);a.setDate(a.getDate()-c)}else"+"==s&&(u=t.component[e].value.split("+",2),c=parseInt(u[1]),a.setDate(a.getDate()+c));l=a;var d=f.formatDate(l,"yyyy-MM-dd","en-US");t.component[e].value=d}if((h.readonly=!1)&&t.component[e].restriction!=undefined&&""!=t.component[e].restriction)if("GT"==t.component[e].restriction.toUpperCase()){var p=new Date(h.datePipe.transform(t.component[e].minDate,"yyyy-MM-dd"));p.setDate(p.getDate()+1),t.component[e].minDate=p}else if("LT"==t.component[e].restriction.toUpperCase()){var m=new Date(h.datePipe.transform(t.component[e].maxDate,"yyyy-MM-dd"));m.setDate(m.getDate()-1),t.component[e].maxDate=m}}}setTimeout(function(){for(var e=0;e<h.countForm;e++)1==t.component[e].isEvent&&1==h.configuration.component[e].itemsUrl.length&&h.onChangeEvent(t.component[e].itemsUrl[0].Key,t.component[e]),"officeRoleCodes"==t.component[e].type&&0<h.configuration.component[e].itemsUrl.length&&h.SetRoleOfficeCodes(e)},1e3)})},M.prototype.SetRoleOfficeCodes=function(e){var t=this.cookieService.get("UserAccess"),n=JSON.parse(this.DecryptString(t,"AdInsFOU12345678")).RoleCode,i=new Array;i.push(n);var r=this.myForm.nativeElement[e].options,o=r[r.selectedIndex].value.trim();if(1==this.configuration.component[e].itemsUrl.length||"all"==this.configuration.component[e].ddlType&&"all"==o)for(var a=0;a<this.configuration.component[e].itemsUrl.length;a++){var s=this.configuration.component[e].itemsUrl[a];i.push(s.Key),i.push(n+"-"+s.Key)}else i.push(o),i.push(n+"-"+o);this.searchInput.integrationObj.requestObj.OfficeRoleCodes=i},M.prototype.setDefaultValueMonth=function(e){var t=new Date(this.BusinessDt),n=e.charAt(2),i=e.split(n,2),r=parseInt(i[1]);return r||(r=1),"-"==n?t.setMonth(t.getMonth()-r):"+"==n&&t.setMonth(t.getMonth()+r),t.getMonth()},M.prototype.setMonthDDL=function(e){var t,n=e.match("[\\/+][-]|[-][\\/+]|\\/+|-"),i=this.BusinessDt.getMonth(),r=this.BusinessDt.getMonth(),o=n[0],a=parseInt(e.substring(n.index+n[0].length));if(12<=a)return this.ListOfMonth.ListOfMonth;if(("+-"==o||"-+"==o)&&6<=a)return this.ListOfMonth.ListOfMonth;var s=this.ListOfMonth.DictOfMonth;t.push({key:i,value:s[i]});for(var l=0;l<a;l++)o.includes("-")&&(0==--i&&(i=12),t.push({key:i,value:s[i]})),o.includes("+")&&(13==++r&&(r=1),t.push({key:r,value:s[r]}));return t.sort(function(e,t){return e.key-t.key}),t},M.prototype.setDefaultValueYear=function(e){var t=new Date(this.BusinessDt),n=e.charAt(2),i=e.split(n,2),r=parseInt(i[1]);return r||(r=1),"-"==n?t.setFullYear(t.getFullYear()-r):"+"==n&&t.setFullYear(t.getFullYear()+r),t.getFullYear()},M.prototype.setYearDDL=function(e){this.ListOfYear=new Array;var t=e.match("[\\/+][-]|[-][\\/+]|\\/+|-"),n=this.BusinessDt.getFullYear(),i=this.BusinessDt.getFullYear(),r=parseInt(e.substring(t.index+t[0].length));this.ListOfYear.push({key:this.BusinessDt.getFullYear(),value:this.BusinessDt.getFullYear().toString()});for(var o=0;o<r;o++)"-+"==t[0]||"+-"==t[0]?(n--,i++,this.ListOfYear.push({key:n,value:n.toString()},{key:i,value:i.toString()})):"-"==t[0]?(n--,this.ListOfYear.push({key:n,value:n.toString()})):"+"==t[0]&&(i++,this.ListOfYear.push({key:i,value:i.toString()}));return this.ListOfYear.sort(function(e,t){return e.key-t.key}),this.ListOfYear},M.prototype.getJSON=function(e){return this.http.get(e)},M.prototype.postJSON=function(e,t){return void 0===t&&(t=null),this.http.post(e,t)},M.prototype.searchClick=function(){var e=null;null!=this.configuration.orderby&&(e={key:this.configuration.orderby.key,value:this.configuration.orderby.value}),this.pageNow=1,this.search(this.apiUrl,this.pageNow,this.pageSize,e,this.arrCrit)},M.prototype.reset=function(){this.searchForm.resetForm({ExportType:this.ExportTypeList[0].key}),this.initiateForm()},M.prototype.search=function(e,n,t,i,r){var o=this;void 0===r&&(r=new Array);var a=new x,s=new Array,l=!1,u=!1;if(this.searchInput.whereValue!=undefined&&0!=this.searchInput.whereValue.length){this.configuration.querystring.whereQuery=new Array;for(var c=0;c<this.searchInput.whereValue.length;c++)this.configuration.querystring.whereQuery.push(this.searchInput.whereValue[c].value)}if(this.searchInput.fromValue!=undefined&&0!=this.searchInput.fromValue.length)for(this.configuration.querystring.fromQuery=new Array,c=0;c<this.searchInput.fromValue.length;c++)this.configuration.querystring.fromQuery.push(this.searchInput.fromValue[c].value);a.pageNo=n,a.rowPerPage=t,a.orderBy=i,a.queryString=this.configuration.querystring;for(var d=0;d<this.countForm;d++){var p=new D,m=this.myForm.nativeElement[d];if(p.DataType=m.getAttribute("data-type"),l=null!=m.getAttribute("query-in")&&"true"==m.getAttribute("query-in"),""!=m.value)if("SELECT"==m.nodeName){var h=m.options,f=h[h.selectedIndex].value.trim();if("one"==f){u=!0;var y=m.getAttribute("label");this.toastr.warning("Please select "+y);break}if(""!=m.getAttribute("data-crit-datatable")&&null!=m.getAttribute("data-crit-datatable")&&(p.isCriteriaDataTable=m.getAttribute("data-crit-datatable")),"taskDefinitionKey"==this.configuration.component[d].type||"processKey"==this.configuration.component[d].type)continue;if("claim"==this.configuration.component[d].type)p.propName=m.getAttribute("data-name"),p.restriction=f,p.value=null,s.push(p);else if("all"!=f&&"one"!=f)p.restriction=v.RestrictionEq,""!=m.name?p.propName=m.name:p.propName=m.getAttribute("data-name"),p.value=f,s.push(p);else if("all"==f&&1==l&&0!=m.options.length){var g=new Array;for(c=0;c<m.options.length;c++)0!=c&&g.push(m.options[c].value);0!=g.length&&(p.restriction=v.RestrictionIn,""!=m.name?p.propName=m.name:p.propName=m.getAttribute("data-name"),p.listValue=g,s.push(p))}}else""!=m.name?p.propName=m.name:p.propName=m.getAttribute("data-name"),p.value=m.value.trim(),m.value.includes("%")?p.restriction=v.RestrictionLike:""!=m.getAttribute("data-restriction")&&null!=m.getAttribute("data-restriction")?(p.restriction=m.getAttribute("data-restriction"),"numeric"==m.getAttribute("data-type")&&(p.value=parseFloat(m.value.replace(/,/g,"")).toString()),"LIKE"==p.restriction.toUpperCase()&&(p.value="%"+m.value.trim()+"%",p.restriction=v.RestrictionLike)):p.restriction=v.RestrictionEq,""!=m.getAttribute("data-crit-datatable")&&null!=m.getAttribute("data-crit-datatable")&&(p.isCriteriaDataTable=m.getAttribute("data-crit-datatable")),s.push(p)}if(!u){if(null!=r&&r!=undefined){if(0!=r.length)for(d=0;d<r.length;d++)s.push(r[d]);else if(null!=this.searchInput.addCritInput||this.searchInput.addCritInput!=undefined)for(d=0;d<this.searchInput.addCritInput.length;d++)s.push(this.searchInput.addCritInput[d])}else if(null!=this.searchInput.addCritInput||this.searchInput.addCritInput!=undefined)for(d=0;d<this.searchInput.addCritInput.length;d++)s.push(this.searchInput.addCritInput[d]);a.criteria=s,this.searchInput.isJoinExAPI?a.integrationObj=this.searchInput.integrationObj:a.integrationObj=null,this.http.post(e,a).subscribe(function(e){var t={response:e,pageNow:n};return console.log(t),o.result.emit(t),o.reqGetAllData.emit(a),e})}},M.prototype.GenerateReport=function(){this.genRpt.emit({ExportType:this.ExportType,ElRef:this.myForm})},M.prototype.lessThanFour=function(){return!(3<this.countForm)},M.prototype.resolveObject=function(t,e,n){var i=this;void 0===n&&(n=null),this.postJSON(e,n).subscribe(function(e){t.itemsUrl=new Array,t.itemsUrl=e.ReturnObject,t.exclude!=undefined&&""!=t.exclude&&(t.itemsUrl=t.itemsUrl.filter(function(e){return!t.exclude.includes(e.Key)})),t.affectedFilter&&1==t.itemsUrl.length&&i.onChangeEvent(t.itemsUrl[0].Key,t)})},M.prototype.transformAmount=function(e){this.formattedAmount=parseFloat(e.target.value).toLocaleString("en"),e.target.value=this.formattedAmount},M.prototype.transformToDecimal=function(e){e.target.value=parseFloat(e.target.value.toString().replace(/,/g,""))},M.prototype.exportAsXLSX=function(){var t=this,e=new x;e.pageNo=1,e.rowPerPage=9999,e.orderBy=null,e.criteria=[],e.queryString=this.configuration.querystring,this.searchInput.isJoinExAPI?e.integrationObj=this.searchInput.integrationObj:e.integrationObj=null,this.http.post(this.apiUrl,e).subscribe(function(e){t.ExcelData=e.Data,t.excelService.exportAsExcelFile(t.ExcelData,"sample")},function(e){console.log(e)})},M.prototype.onChangeEvent=function(e,t){for(var n=this.configuration.component,i=0;i<t.affectedFilter.length;i++)for(var r=0;r<n.length;r++)if(n[r].name==t.affectedFilter[i]){var o=new x,a=new Array;if("all"!=e&&"one"!=e){var s=new D;s.DataType=t.datatype,t.filterPropName!=undefined||""!=t.filterPropName?(o[t.filterPropName]=e,s.propName=t.filterPropName):(s.propName=t.name,o[t.name]=e),s.value=e,s.restriction=v.RestrictionEq,a.push(s)}if(o.criteria=a,n[r].path!=undefined&&""!=n[r].path)if(this.searchInput.listEnvironments!=undefined&&0!=this.searchInput.listEnvironments.length){for(var l=0;l<this.searchInput.listEnvironments.length;l++)if(n[r].environment==this.searchInput.listEnvironments[l].environment){n[r].fullpath=this.searchInput.listEnvironments[l].url+n[r].path;break}}else n[r].fullpath=n[r].url;else n[r].fullpath=n[r].url;this.resolveObject(n[r],n[r].fullpath,o)}},M.prototype.SetProcessKey=function(e,t){var n=this.myForm.nativeElement[e].options,i=n[n.selectedIndex].value.trim();i&&(this.searchInput.integrationObj.requestObj[t]=i)},M.prototype.switchCase=function(i){for(var r=!1,e=function(t){var e=o.searchInput.switchValue.findIndex(function(e){return e.property==i.conditions[t].property});if("EQ"==i.conditions[t].restriction)if(1!=i.conditions[t].isUser){if(o.searchInput.switchValue[e].value!=i.conditions[t].value)return r=!1,"break";r=!0}else{var n=localStorage.getItem("Username");if(o.searchInput.switchValue[e].value!=n)return r=!1,"break";r=!0}else if("NEQ"==i.conditions[t].restriction)if(1!=i.conditions[t].isUser){if(o.searchInput.switchValue[e].value==i.conditions[t].value)return r=!1,"break";r=!0}else{if(n=localStorage.getItem("Username"),o.searchInput.switchValue[e].value==n)return r=!1,"break";r=!0}else if("GT"==i.conditions[t].restriction)if(1!=i.conditions[t].isUser){if(!(o.searchInput.switchValue[e].value>i.conditions[t].value))return r=!1,"break";r=!0}else{if(n=localStorage.getItem("Username"),!(o.searchInput.switchValue[e].value>n))return r=!1,"break";r=!0}else if("GTE"==i.conditions[t].restriction)if(1!=i.conditions[t].isUser){if(!(o.searchInput.switchValue[e].value>=i.conditions[t].value))return r=!1,"break";r=!0}else{if(n=localStorage.getItem("Username"),!(o.searchInput.switchValue[e].value>=n))return r=!1,"break";r=!0}else if("LT"==i.conditions[t].restriction)if(1!=i.conditions[t].isUser){if(!(o.searchInput.switchValue[e].value<i.conditions[t].value))return r=!1,"break";r=!0}else{if(n=localStorage.getItem("Username"),!(o.searchInput.switchValue[e].value<n))return r=!1,"break";r=!0}else if("LTE"==i.conditions[t].restriction)if(1!=i.conditions[t].isUser){if(!(o.searchInput.switchValue[e].value<=i.conditions[t].value))return r=!1,"break";r=!0}else{if(n=localStorage.getItem("Username"),!(o.searchInput.switchValue[e].value<=n))return r=!1,"break";r=!0}},o=this,t=0;t<i.conditions.length&&"break"!==e(t);t++);return r},M.prototype.DecryptString=function(e,t){if(t==undefined||""==t.trim()||e==undefined||""==e.trim())return e;var n=l.enc.Utf8.parse(t),i=l.lib.WordArray.create([0,0,0,0]);return l.AES.decrypt(e,n,{iv:i}).toString(l.enc.Utf8)},M.prototype.checkInputDate=function(t){var e,n,i,r=new Array,o=this.configuration.component.find(function(e){return e.name==t.name&&"GTE"==e.restriction.toUpperCase()})==undefined?this.configuration.component.find(function(e){return e.name==t.name&&"GT"==e.restriction.toUpperCase()}):this.configuration.component.find(function(e){return e.name==t.name&&"GTE"==e.restriction.toUpperCase()});o!=undefined&&(e=""==this.myForm.nativeElement[o.id].min?null:new Date(this.myForm.nativeElement[o.id].min),i=o.label.split(">",2),null!=e&&("GT"==o.restriction.toUpperCase()?(e.setDate(e.getDate()-1),r.push(" must be greater than ")):"GTE"==o.restriction.toUpperCase()&&r.push(" must be greater than or equals to ")));var a=this.configuration.component.find(function(e){return e.name==t.name&&"LTE"==e.restriction.toUpperCase()})==undefined?this.configuration.component.find(function(e){return e.name==t.name&&"LT"==e.restriction.toUpperCase()}):this.configuration.component.find(function(e){return e.name==t.name&&"LTE"==e.restriction.toUpperCase()});a!=undefined&&(n=""==this.myForm.nativeElement[a.id].max?null:new Date(this.myForm.nativeElement[a.id].max),i=a.label.split("<",2),null!=n&&("LT"==a.restriction.toUpperCase()?(n.setDate(n.getDate()+1),r.push(" must be less than ")):"LTE"==a.restriction.toUpperCase()&&r.push(" must be less than or equals to "))),null!=e&&null==n&&new Date(this.myForm.nativeElement[o.id].value)<e?(this.toastr.warning(i[0]+r[0]+f.formatDate(e,"dd MMMM yyyy","en-US")+"."),this.dateWrong=!0):null!=n&&null==e&&new Date(this.myForm.nativeElement[a.id].value)>n?(this.toastr.warning(i[0]+r[0]+f.formatDate(n,"dd MMMM yyyy","en-US")+"."),this.dateWrong=!0):null!=e&&null!=n&&(new Date(this.myForm.nativeElement[a.id].value)>n||new Date(this.myForm.nativeElement[o.id].value)<e)?(this.toastr.warning(i[0]+r[0]+f.formatDate(e,"dd MMMM yyyy","en-US")+" and"+r[1]+f.formatDate(n,"dd MMMM yyyy","en-US")+"."),this.dateWrong=!0):this.dateWrong=!1},M.prototype.selectedOption=function(e,t){t.value=e.key,t.descr=e.value,t.isListHide=!0},M.prototype.isSelected=function(e,t){return e.key==t},M.decorators=[{type:h.Component,args:[{selector:"lib-UCSearch",template:'\x3c!-- Basic form layout section start --\x3e\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 \x3c!-- Ini Digunakan untuk Generate Dynamic Component --\x3e\r\n \x3c!-- [hidden]="isHidden" --\x3e\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.data-numericpair="{{question.numericPair}}"\r\n attr.data-crit-datatable="{{question.isCriteriaDataTable}}"\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 \x3c!-- End Hardcode Lookup didalem--\x3e\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 [readonly]="question.readonly" attr.data-type="{{question.datatype}}"\r\n attr.data-name="{{question.name}}"\r\n attr.data-datepickerpair="{{question.datepickerPair}}"\r\n 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\'}}"\r\n (focusout)="question.restriction != undefined && 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\r\n *ngIf="question.type == \'taskDefinitionKey\' || question.type == \'processKey\' || 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\' || question.type == \'processKey\') ? SetProcessKey(i,question.wfKeyFilter) : 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 attr.data-crit-datatable="{{question.isCriteriaDataTable}}"\r\n [hidden]="!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1"\r\n (change)="question.isEvent ? onChangeEvent($event.target.value, question) : \'\'"\r\n [ngClass]="{ \'is-invalid\':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }">\r\n <option\r\n *ngIf="question.ddlType == \'one\' && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)"\r\n value="one">\r\n Select One</option>\r\n <option\r\n *ngIf="(question?.ddlType == undefined || question.ddlType == \'all\') && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)"\r\n value="all">All</option>\r\n <option *ngFor="let item of !question.isFromURL ? question?.items : question?.itemsUrl"\r\n value="{{!question.isFromURL ? item.key : item.Key}}">\r\n {{!question.isFromURL ? item.value : item.Value}}\r\n </option>\r\n </select>\r\n <label\r\n *ngIf="!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1">{{!question.isFromURL\r\n ? question.items[0].value :\r\n question.itemsUrl[0].Value}}</label>\r\n </div>\r\n <div *ngIf="question.type==\'dropdownSearch\'">\r\n <div class="dds-display-item">\r\n <input type="text" class="form-control search-form-control dds-input"\r\n name="{{\'ddsValue\'+question.name}}" [(ngModel)]="question.value" readonly\r\n (click)="question.isListHide = !question.isListHide; question.searchText=\'\'">\r\n </div>\r\n <div class="dds-list-container" [hidden]="question.isListHide">\r\n <input type="text" class="form-control" name="{{\'searchText\'+question.name}}" [(ngModel)]="question.searchText"\r\n placeholder="FILTER">\r\n <div class="dds-items-container">\r\n \x3c!-- blm tentu bisa --\x3e\r\n <div class="dds-list-item" (click)="selectedOption({key:\'\',value:\'\'},question)">\r\n Select One\r\n </div>\r\n <div class="dds-list-item"\r\n *ngFor="let item of question?.items | textSearch : question.searchText; let i=index"\r\n (click)="selectedOption(item,question)"\r\n [ngClass]="{\'dds-active\': isSelected(item, question.value)}">\r\n {{item?.value}}\r\n </div>\r\n </div>\r\n </div>\r\n\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\r\n 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\x3c!-- // Basic form layout section end --\x3e',providers:[w,f.DatePipe],animations:[r.trigger("changeDivSize",[r.state("initial",r.style({height:"*",opacity:"1"})),r.state("final",r.style({height:"0px",opacity:"0",overflow:"hidden"})),r.transition("initial=>final",r.animate("300ms")),r.transition("final=>initial",r.animate("300ms"))])],styles:[".ucSearch-title{margin:3px}.dds-input{background-color:#fff;text-transform:uppercase}.dds-display-item:after{content:'\\e929';font-family:feather;font-size:1rem;display:inline-block;position:absolute;right:5px;top:5px;-webkit-transform:rotate(90deg);transform:rotate(90deg)}.dds-list-container{position:relative}.dds-items-container{border:1px solid #00b7d4;background-color:#fff;position:absolute;font-size:1rem;overflow:auto;height:500%;width:100%;z-index:9;top:100%}.dds-list-item{padding:2px 5px;cursor:pointer}.dds-list-item:hover{background-color:#1a73e8;color:#fff}.dds-active{background-color:#ddd}"]}]}],M.ctorParameters=function(){return[{type:t.HttpClient},{type:w},{type:h.Renderer2},{type:undefined,decorators:[{type:h.Inject,args:[n.DOCUMENT]}]},{type:a.ToastrService},{type:s.CookieService},{type:f.DatePipe}]},M.propDecorators={content:[{type:h.ViewChild,args:["enjiForm"]}],myForm:[{type:h.ViewChild,args:["formIdSearch"]}],searchInput:[{type:h.Input}],pageSize:[{type:h.Input}],isReport:[{type:h.Input}],result:[{type:h.Output}],genRpt:[{type:h.Output}],reqGetAllData:[{type:h.Output}]},M);function M(e,t,n,i,r,o,a){this.http=e,this.excelService=t,this._renderer2=n,this._document=i,this.toastr=r,this.cookieService=o,this.datePipe=a,this.searchInput=new I,this.pageSize=10,this.isReport=!1,this.result=new h.EventEmitter,this.genRpt=new h.EventEmitter,this.reqGetAllData=new h.EventEmitter,this.ExportTypeList=[{key:F.EXP_TYPE_PDF,value:"PDF"},{key:F.EXP_TYPE_XLS,value:"Excel 2003"},{key:F.EXP_TYPE_XLSX,value:"Excel 2007"},{key:F.EXP_TYPE_DOC,value:"Document"},{key:F.EXP_TYPE_DOCX,value:"Document XML"}],this.ListOfMonth=new k,this.ListOfYear=new Array,this.ClaimList=[{Key:v.RestrictionIsNotNull,Value:"CLAIMED"},{Key:v.RestrictionIsNull,Value:"UNCLAIMED"}],this.ExportType=0,this.pageNow=1,this.isDataLoaded=!1,this.isHidden=!1,this.BusinessDt=new Date,this.dateWrong=!1,this.readonly=!1,this.currentState="initial",this.countForm=0,this.formattedAmount="",this.amount=0}var L=(O.prototype.transform=function(e,t){return t?e.filter(function(e){return!(!e.value||"string"!=typeof e.value)&&-1<e.value.toLowerCase().indexOf(t.toLowerCase())}):e},O.decorators=[{type:h.Pipe,args:[{name:"textSearch"}]}],O);function O(){}var S={align:"right",allowNegative:!1,allowZero:!0,decimal:".",precision:2,prefix:"",suffix:"",thousands:",",nullable:!1,inputMode:c.CurrencyMaskInputMode.NATURAL},U=(R.decorators=[{type:h.NgModule,args:[{declarations:[C,L],imports:[f.CommonModule,u.FormsModule,p.UcShowErrorsModule,m.UcDirectiveUpperCaseModule,c.NgxCurrencyModule.forRoot(S),d.TranslateModule.forChild()],exports:[C]}]}],R);function R(){}e.UCSearchService=y,e.UCSearchComponent=C,e.customCurrencyMaskConfig=S,e.UCSearchModule=U,e.ɵb=L,e.ɵa=w,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common/http"),require("@angular/platform-browser"),require("file-saver"),require("xlsx"),require("@angular/animations"),require("ngx-toastr"),require("ngx-cookie"),require("crypto-js"),require("@angular/common"),require("@angular/forms"),require("ngx-currency"),require("@ngx-translate/core"),require("@adins/uc-show-errors"),require("@adins/uc-directive-upper-case"),require("@angular/core")):"function"==typeof define&&define.amd?define("@adins/ucsearch",["exports","@angular/common/http","@angular/platform-browser","file-saver","xlsx","@angular/animations","ngx-toastr","ngx-cookie","crypto-js","@angular/common","@angular/forms","ngx-currency","@ngx-translate/core","@adins/uc-show-errors","@adins/uc-directive-upper-case","@angular/core"],t):t((e.adins=e.adins||{},e.adins.ucsearch={}),e.ng.common.http,e.ng.platformBrowser,e.FileSaver,e.XLSX,e.ng.animations,e.ngxToastr,e.ngxCookie,e.CryptoJS,e.ng.common,e.ng.forms,e.ngxCurrency,e.core,e.ucShowErrors,e.ucDirectiveUpperCase,e.ng.core)}(this,function(e,t,n,i,o,r,a,s,l,f,u,c,d,p,m,h){"use strict";var y=(g.decorators=[{type:h.Injectable,args:[{providedIn:"root"}]}],g.ctorParameters=function(){return[]},g.ngInjectableDef=h.defineInjectable({factory:function(){return new g},token:g,providedIn:"root"}),g);function g(){}var v=(q.RestrictionBetween="Between",q.RestrictionLike="Like",q.RestrictionEq="Eq",q.RestrictionNeq="NEQ",q.RestrictionGt="GT",q.RestrictionGte="GTE",q.RestrictionLt="LT",q.RestrictionLte="LTE",q.RestrictionIn="IN",q.RestrictionNotIn="NotIn",q.RestrictionOr="Or",q.RestrictionOrNeq="OrNeq",q.RestrictionIsNull="ISNULL",q.RestrictionIsNotNull="ISNOTNULL",q.RestrictionGTE="GTE",q.RestrictionLTE="LTE",q.showData="10,50,100",q.JoinTypeInner="INNER",q.JoinTypeLeft="LEFT",q);function q(){}var b=function j(){this.baseUrl="",this.apiPath="",this.requestObj=new Object,this.leftColumnToJoin="",this.rightColumnToJoin="",this.joinType=v.JoinTypeInner},I=function A(){this._url="",this.enviromentUrl="",this.title="",this.apiQryPaging="",this.arrCritObj=null,this.addCritInput=new Array,this.listEnvironments=new Array,this.whereValue=new Array,this.fromValue=new Array,this.switchValue=new Array,this.integrationObj=new b,this.isJoinExAPI=!1},D=function N(){this.low=0,this.high=0,this.DataType="Text",this.isCriteriaDataTable=!1},x=function P(){this.includeCount=!0,this.includeData=!0,this.isLoading=!0,this.queryString="",this.rowVersion="",this.integrationObj=new b,this.joinType=v.JoinTypeInner},w=(T.prototype.exportAsExcelFile=function(e,t){var n=o.utils.json_to_sheet(e);console.log("worksheet",n);var i={Sheets:{data:n},SheetNames:["data"]},r=o.write(i,{bookType:"xlsx",type:"array"});this.saveAsExcelFile(r,t)},T.prototype.saveAsExcelFile=function(e,t){var n=new Blob([e],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8"});i.saveAs(n,t+"_export_"+(new Date).getTime()+".xlsx")},T.decorators=[{type:h.Injectable}],T.ctorParameters=function(){return[]},T);function T(){}var F=(E.EXP_TYPE_PDF=0,E.EXP_TYPE_XLS=1,E.EXP_TYPE_XLSX=2,E.EXP_TYPE_DOC=3,E.EXP_TYPE_DOCX=4,E);function E(){}var k=function V(){this.DictOfMonth={},this.ListOfMonth=new Array,this.DictOfMonth={},this.ListOfMonth.push({key:1,value:"January"}),this.DictOfMonth[1]="January",this.ListOfMonth.push({key:2,value:"February"}),this.DictOfMonth[2]="February",this.ListOfMonth.push({key:3,value:"March"}),this.DictOfMonth[3]="March",this.ListOfMonth.push({key:4,value:"April"}),this.DictOfMonth[4]="April",this.ListOfMonth.push({key:5,value:"May"}),this.DictOfMonth[5]="May",this.ListOfMonth.push({key:6,value:"June"}),this.DictOfMonth[6]="June",this.ListOfMonth.push({key:7,value:"July"}),this.DictOfMonth[7]="July",this.ListOfMonth.push({key:8,value:"August"}),this.DictOfMonth[8]="August",this.ListOfMonth.push({key:9,value:"September"}),this.DictOfMonth[9]="September",this.ListOfMonth.push({key:10,value:"October"}),this.DictOfMonth[10]="October",this.ListOfMonth.push({key:11,value:"November"}),this.DictOfMonth[11]="November",this.ListOfMonth.push({key:12,value:"December"}),this.DictOfMonth[12]="December"},C=(Object.defineProperty(M.prototype,"content",{set:function(e){e&&(this.searchForm=e)},enumerable:!0,configurable:!0}),M.prototype.changeState=function(){this.currentState="initial"===this.currentState?"final":"initial",this.isHidden=!1===this.isHidden},M.prototype.ngOnInit=function(){console.log("ucsearch"),this.apiUrl=this.searchInput.enviromentUrl+this.searchInput.apiQryPaging,this.arrCrit=this.searchInput.arrCritObj;var e=this._renderer2.createElement("script");e.text='\n $(document).ready(function(){\n $("#flip").click(function(){\n $("#panel").slideToggle("slow");\n });\n });\n ',this._renderer2.appendChild(this._document.body,e);var t=this.cookieService.get("BusinessDateRaw");this.BisDt=this.DecryptString(t,"AdInsFOU12345678"),this.BusinessDt=new Date(this.BisDt),this.initiateForm()},M.prototype.initiateForm=function(){var h=this;this.getJSON(this.searchInput._url).subscribe(function(t){h.configuration=t,h.exportData=t.exportExcel,t.exportTypeList!=undefined&&0!=t.exportTypeList.length&&(h.ExportTypeList=t.exportTypeList,h.ExportType=h.ExportTypeList[0].key),h.countForm=t.component.length,h.isDataLoaded=!0,h.searchInput.title!=undefined&&""!=h.searchInput.title&&(h.configuration.title=h.searchInput.title);for(var e=0;e<h.countForm;e++){if(1==t.component[e].isFromURL){var n=new x,i=new Array,r=new D;if(r.DataType="text",r.propName=t.component[e].criteriaPropName,r.value=t.component[e].criteriaPropValue,r.restriction="eq",i.push(r),n.criteria=i,n[t.component[e].criteriaPropName]=t.component[e].criteriaPropValue,t.component[e].path!=undefined&&""!=t.component[e].path)if(h.searchInput.listEnvironments!=undefined&&0!=h.searchInput.listEnvironments.length){for(var o=0;o<h.searchInput.listEnvironments.length;o++)if(t.component[e].environment==h.searchInput.listEnvironments[o].environment){t.component[e].fullpath=h.searchInput.listEnvironments[o].url+t.component[e].path;break}}else t.component[e].fullpath=t.component[e].url;else t.component[e].fullpath=t.component[e].url;h.resolveObject(t.component[e],t.component[e].fullpath,n)}if("numeric"==t.component[e].type&&(t.component[e].value=parseFloat(t.component[e].value).toLocaleString("en")),"dropdown"==t.component[e].type&&t.component[e].dtmType!=undefined&&(t.component[e].dtmType.includes("month")&&(t.component[e].value!=undefined&&t.component[e].value.includes("BD")&&(t.component[e].value=h.setDefaultValueMonth(t.component[e].value)),t.component[e].items=h.setMonthDDL(t.component[e].dtmType)),t.component[e].dtmType.includes("year")&&(t.component[e].value!=undefined&&t.component[e].value.includes("BD")&&(t.component[e].value=h.setDefaultValueYear(t.component[e].value)),t.component[e].items=h.setYearDDL(t.component[e].dtmType))),t.component[e].value||(t.component[e].value="","all"==t.component[e].ddlType&&(t.component[e].value="all"),"one"==t.component[e].ddlType&&(t.component[e].value="one")),"datepicker"==t.component[e].type){if(h.readonly=t.component[e].readonly,t.component[e].value.includes("BD")){var a=new Date;null!=h.BisDt&&(a=new Date(h.BisDt));var s=t.component[e].value.charAt(2),l=new Date;if("-"==s){var u=t.component[e].value.split("-",2),c=parseInt(u[1]);a.setDate(a.getDate()-c)}else"+"==s&&(u=t.component[e].value.split("+",2),c=parseInt(u[1]),a.setDate(a.getDate()+c));l=a;var d=f.formatDate(l,"yyyy-MM-dd","en-US");t.component[e].value=d}if((h.readonly=!1)&&t.component[e].restriction!=undefined&&""!=t.component[e].restriction)if("GT"==t.component[e].restriction.toUpperCase()){var p=new Date(h.datePipe.transform(t.component[e].minDate,"yyyy-MM-dd"));p.setDate(p.getDate()+1),t.component[e].minDate=p}else if("LT"==t.component[e].restriction.toUpperCase()){var m=new Date(h.datePipe.transform(t.component[e].maxDate,"yyyy-MM-dd"));m.setDate(m.getDate()-1),t.component[e].maxDate=m}}}setTimeout(function(){for(var e=0;e<h.countForm;e++)1==t.component[e].isEvent&&1==h.configuration.component[e].itemsUrl.length&&h.onChangeEvent(t.component[e].itemsUrl[0].Key,t.component[e]),"officeRoleCodes"==t.component[e].type&&0<h.configuration.component[e].itemsUrl.length&&h.SetRoleOfficeCodes(e)},1e3)})},M.prototype.SetRoleOfficeCodes=function(e){var t=this.cookieService.get("UserAccess"),n=JSON.parse(this.DecryptString(t,"AdInsFOU12345678")).RoleCode,i=new Array;i.push(n);var r=this.myForm.nativeElement[e].options,o=r[r.selectedIndex].value.trim();if(1==this.configuration.component[e].itemsUrl.length||"all"==this.configuration.component[e].ddlType&&"all"==o)for(var a=0;a<this.configuration.component[e].itemsUrl.length;a++){var s=this.configuration.component[e].itemsUrl[a];i.push(s.Key),i.push(n+"-"+s.Key)}else i.push(o),i.push(n+"-"+o);this.searchInput.integrationObj.requestObj.OfficeRoleCodes=i},M.prototype.setDefaultValueMonth=function(e){var t=new Date(this.BusinessDt),n=e.charAt(2),i=e.split(n,2),r=parseInt(i[1]);return r||(r=1),"-"==n?t.setMonth(t.getMonth()-r):"+"==n&&t.setMonth(t.getMonth()+r),t.getMonth()},M.prototype.setMonthDDL=function(e){var t,n=e.match("[\\/+][-]|[-][\\/+]|\\/+|-"),i=this.BusinessDt.getMonth(),r=this.BusinessDt.getMonth(),o=n[0],a=parseInt(e.substring(n.index+n[0].length));if(12<=a)return this.ListOfMonth.ListOfMonth;if(("+-"==o||"-+"==o)&&6<=a)return this.ListOfMonth.ListOfMonth;var s=this.ListOfMonth.DictOfMonth;t.push({key:i,value:s[i]});for(var l=0;l<a;l++)o.includes("-")&&(0==--i&&(i=12),t.push({key:i,value:s[i]})),o.includes("+")&&(13==++r&&(r=1),t.push({key:r,value:s[r]}));return t.sort(function(e,t){return e.key-t.key}),t},M.prototype.setDefaultValueYear=function(e){var t=new Date(this.BusinessDt),n=e.charAt(2),i=e.split(n,2),r=parseInt(i[1]);return r||(r=1),"-"==n?t.setFullYear(t.getFullYear()-r):"+"==n&&t.setFullYear(t.getFullYear()+r),t.getFullYear()},M.prototype.setYearDDL=function(e){this.ListOfYear=new Array;var t=e.match("[\\/+][-]|[-][\\/+]|\\/+|-"),n=this.BusinessDt.getFullYear(),i=this.BusinessDt.getFullYear(),r=parseInt(e.substring(t.index+t[0].length));this.ListOfYear.push({key:this.BusinessDt.getFullYear(),value:this.BusinessDt.getFullYear().toString()});for(var o=0;o<r;o++)"-+"==t[0]||"+-"==t[0]?(n--,i++,this.ListOfYear.push({key:n,value:n.toString()},{key:i,value:i.toString()})):"-"==t[0]?(n--,this.ListOfYear.push({key:n,value:n.toString()})):"+"==t[0]&&(i++,this.ListOfYear.push({key:i,value:i.toString()}));return this.ListOfYear.sort(function(e,t){return e.key-t.key}),this.ListOfYear},M.prototype.getJSON=function(e){return this.http.get(e)},M.prototype.postJSON=function(e,t){return void 0===t&&(t=null),this.http.post(e,t)},M.prototype.searchClick=function(){var e=null;null!=this.configuration.orderby&&(e={key:this.configuration.orderby.key,value:this.configuration.orderby.value}),this.pageNow=1,this.search(this.apiUrl,this.pageNow,this.pageSize,e,this.arrCrit)},M.prototype.reset=function(){this.searchForm.resetForm({ExportType:this.ExportTypeList[0].key}),this.initiateForm()},M.prototype.search=function(e,n,t,i,r){var o=this;void 0===r&&(r=new Array);var a=new x,s=new Array,l=!1,u=!1;if(this.searchInput.whereValue!=undefined&&0!=this.searchInput.whereValue.length){this.configuration.querystring.whereQuery=new Array;for(var c=0;c<this.searchInput.whereValue.length;c++)this.configuration.querystring.whereQuery.push(this.searchInput.whereValue[c].value)}if(this.searchInput.fromValue!=undefined&&0!=this.searchInput.fromValue.length)for(this.configuration.querystring.fromQuery=new Array,c=0;c<this.searchInput.fromValue.length;c++)this.configuration.querystring.fromQuery.push(this.searchInput.fromValue[c].value);a.pageNo=n,a.rowPerPage=t,a.orderBy=i,a.queryString=this.configuration.querystring;for(var d=0;d<this.countForm;d++){var p=new D,m=this.myForm.nativeElement[d];if(p.DataType=m.getAttribute("data-type"),l=null!=m.getAttribute("query-in")&&"true"==m.getAttribute("query-in"),""!=m.value)if("SELECT"==m.nodeName){var h=m.options,f=h[h.selectedIndex].value.trim();if("one"==f){u=!0;var y=m.getAttribute("label");this.toastr.warning("Please select "+y);break}if(""!=m.getAttribute("data-crit-datatable")&&null!=m.getAttribute("data-crit-datatable")&&(p.isCriteriaDataTable=m.getAttribute("data-crit-datatable")),"taskDefinitionKey"==this.configuration.component[d].type||"processKey"==this.configuration.component[d].type)continue;if("claim"==this.configuration.component[d].type)p.propName=m.getAttribute("data-name"),p.restriction=f,p.value=null,s.push(p);else if("all"!=f&&"one"!=f)p.restriction=v.RestrictionEq,""!=m.name?p.propName=m.name:p.propName=m.getAttribute("data-name"),p.value=f,s.push(p);else if("all"==f&&1==l&&0!=m.options.length){var g=new Array;for(c=0;c<m.options.length;c++)0!=c&&g.push(m.options[c].value);0!=g.length&&(p.restriction=v.RestrictionIn,""!=m.name?p.propName=m.name:p.propName=m.getAttribute("data-name"),p.listValue=g,s.push(p))}}else""!=m.name?p.propName=m.name:p.propName=m.getAttribute("data-name"),p.value=m.value.trim(),m.value.includes("%")?p.restriction=v.RestrictionLike:""!=m.getAttribute("data-restriction")&&null!=m.getAttribute("data-restriction")?(p.restriction=m.getAttribute("data-restriction"),"numeric"==m.getAttribute("data-type")&&(p.value=parseFloat(m.value.replace(/,/g,"")).toString()),"LIKE"==p.restriction.toUpperCase()&&(p.value="%"+m.value.trim()+"%",p.restriction=v.RestrictionLike)):p.restriction=v.RestrictionEq,""!=m.getAttribute("data-crit-datatable")&&null!=m.getAttribute("data-crit-datatable")&&(p.isCriteriaDataTable=m.getAttribute("data-crit-datatable")),s.push(p)}if(!u){if(null!=r&&r!=undefined){if(0!=r.length)for(d=0;d<r.length;d++)s.push(r[d]);else if(null!=this.searchInput.addCritInput||this.searchInput.addCritInput!=undefined)for(d=0;d<this.searchInput.addCritInput.length;d++)s.push(this.searchInput.addCritInput[d])}else if(null!=this.searchInput.addCritInput||this.searchInput.addCritInput!=undefined)for(d=0;d<this.searchInput.addCritInput.length;d++)s.push(this.searchInput.addCritInput[d]);a.criteria=s,this.searchInput.isJoinExAPI?a.integrationObj=this.searchInput.integrationObj:a.integrationObj=null,this.http.post(e,a).subscribe(function(e){var t={response:e,pageNow:n};return console.log(t),o.result.emit(t),o.reqGetAllData.emit(a),e})}},M.prototype.GenerateReport=function(){this.genRpt.emit({ExportType:this.ExportType,ElRef:this.myForm})},M.prototype.lessThanFour=function(){return!(3<this.countForm)},M.prototype.resolveObject=function(t,e,n){var i=this;void 0===n&&(n=null),this.postJSON(e,n).subscribe(function(e){t.itemsUrl=new Array,t.itemsUrl=e.ReturnObject,t.exclude!=undefined&&""!=t.exclude&&(t.itemsUrl=t.itemsUrl.filter(function(e){return!t.exclude.includes(e.Key)})),t.affectedFilter&&1==t.itemsUrl.length&&i.onChangeEvent(t.itemsUrl[0].Key,t)})},M.prototype.transformAmount=function(e){this.formattedAmount=parseFloat(e.target.value).toLocaleString("en"),e.target.value=this.formattedAmount},M.prototype.transformToDecimal=function(e){e.target.value=parseFloat(e.target.value.toString().replace(/,/g,""))},M.prototype.exportAsXLSX=function(){var t=this,e=new x;e.pageNo=1,e.rowPerPage=9999,e.orderBy=null,e.criteria=[],e.queryString=this.configuration.querystring,this.searchInput.isJoinExAPI?e.integrationObj=this.searchInput.integrationObj:e.integrationObj=null,this.http.post(this.apiUrl,e).subscribe(function(e){t.ExcelData=e.Data,t.excelService.exportAsExcelFile(t.ExcelData,"sample")},function(e){console.log(e)})},M.prototype.onChangeEvent=function(e,t){for(var n=this.configuration.component,i=0;i<t.affectedFilter.length;i++)for(var r=0;r<n.length;r++)if(n[r].name==t.affectedFilter[i]){var o=new x,a=new Array;if("all"!=e&&"one"!=e){var s=new D;s.DataType=t.datatype,t.filterPropName!=undefined||""!=t.filterPropName?(o[t.filterPropName]=e,s.propName=t.filterPropName):(s.propName=t.name,o[t.name]=e),s.value=e,s.restriction=v.RestrictionEq,a.push(s)}if(o.criteria=a,n[r].path!=undefined&&""!=n[r].path)if(this.searchInput.listEnvironments!=undefined&&0!=this.searchInput.listEnvironments.length){for(var l=0;l<this.searchInput.listEnvironments.length;l++)if(n[r].environment==this.searchInput.listEnvironments[l].environment){n[r].fullpath=this.searchInput.listEnvironments[l].url+n[r].path;break}}else n[r].fullpath=n[r].url;else n[r].fullpath=n[r].url;this.resolveObject(n[r],n[r].fullpath,o)}},M.prototype.SetProcessKey=function(e,t){var n=this.myForm.nativeElement[e].options,i=n[n.selectedIndex].value.trim();i&&(this.searchInput.integrationObj.requestObj[t]=i)},M.prototype.switchCase=function(i){for(var r=!1,e=function(t){var e=o.searchInput.switchValue.findIndex(function(e){return e.property==i.conditions[t].property});if("EQ"==i.conditions[t].restriction)if(1!=i.conditions[t].isUser){if(o.searchInput.switchValue[e].value!=i.conditions[t].value)return r=!1,"break";r=!0}else{var n=localStorage.getItem("Username");if(o.searchInput.switchValue[e].value!=n)return r=!1,"break";r=!0}else if("NEQ"==i.conditions[t].restriction)if(1!=i.conditions[t].isUser){if(o.searchInput.switchValue[e].value==i.conditions[t].value)return r=!1,"break";r=!0}else{if(n=localStorage.getItem("Username"),o.searchInput.switchValue[e].value==n)return r=!1,"break";r=!0}else if("GT"==i.conditions[t].restriction)if(1!=i.conditions[t].isUser){if(!(o.searchInput.switchValue[e].value>i.conditions[t].value))return r=!1,"break";r=!0}else{if(n=localStorage.getItem("Username"),!(o.searchInput.switchValue[e].value>n))return r=!1,"break";r=!0}else if("GTE"==i.conditions[t].restriction)if(1!=i.conditions[t].isUser){if(!(o.searchInput.switchValue[e].value>=i.conditions[t].value))return r=!1,"break";r=!0}else{if(n=localStorage.getItem("Username"),!(o.searchInput.switchValue[e].value>=n))return r=!1,"break";r=!0}else if("LT"==i.conditions[t].restriction)if(1!=i.conditions[t].isUser){if(!(o.searchInput.switchValue[e].value<i.conditions[t].value))return r=!1,"break";r=!0}else{if(n=localStorage.getItem("Username"),!(o.searchInput.switchValue[e].value<n))return r=!1,"break";r=!0}else if("LTE"==i.conditions[t].restriction)if(1!=i.conditions[t].isUser){if(!(o.searchInput.switchValue[e].value<=i.conditions[t].value))return r=!1,"break";r=!0}else{if(n=localStorage.getItem("Username"),!(o.searchInput.switchValue[e].value<=n))return r=!1,"break";r=!0}},o=this,t=0;t<i.conditions.length&&"break"!==e(t);t++);return r},M.prototype.DecryptString=function(e,t){if(t==undefined||""==t.trim()||e==undefined||""==e.trim())return e;var n=l.enc.Utf8.parse(t),i=l.lib.WordArray.create([0,0,0,0]);return l.AES.decrypt(e,n,{iv:i}).toString(l.enc.Utf8)},M.prototype.checkInputDate=function(t){var e,n,i,r=new Array,o=this.configuration.component.find(function(e){return e.name==t.name&&"GTE"==e.restriction.toUpperCase()})==undefined?this.configuration.component.find(function(e){return e.name==t.name&&"GT"==e.restriction.toUpperCase()}):this.configuration.component.find(function(e){return e.name==t.name&&"GTE"==e.restriction.toUpperCase()});o!=undefined&&(e=""==this.myForm.nativeElement[o.id].min?null:new Date(this.myForm.nativeElement[o.id].min),i=o.label.split(">",2),null!=e&&("GT"==o.restriction.toUpperCase()?(e.setDate(e.getDate()-1),r.push(" must be greater than ")):"GTE"==o.restriction.toUpperCase()&&r.push(" must be greater than or equals to ")));var a=this.configuration.component.find(function(e){return e.name==t.name&&"LTE"==e.restriction.toUpperCase()})==undefined?this.configuration.component.find(function(e){return e.name==t.name&&"LT"==e.restriction.toUpperCase()}):this.configuration.component.find(function(e){return e.name==t.name&&"LTE"==e.restriction.toUpperCase()});a!=undefined&&(n=""==this.myForm.nativeElement[a.id].max?null:new Date(this.myForm.nativeElement[a.id].max),i=a.label.split("<",2),null!=n&&("LT"==a.restriction.toUpperCase()?(n.setDate(n.getDate()+1),r.push(" must be less than ")):"LTE"==a.restriction.toUpperCase()&&r.push(" must be less than or equals to "))),null!=e&&null==n&&new Date(this.myForm.nativeElement[o.id].value)<e?(this.toastr.warning(i[0]+r[0]+f.formatDate(e,"dd MMMM yyyy","en-US")+"."),this.dateWrong=!0):null!=n&&null==e&&new Date(this.myForm.nativeElement[a.id].value)>n?(this.toastr.warning(i[0]+r[0]+f.formatDate(n,"dd MMMM yyyy","en-US")+"."),this.dateWrong=!0):null!=e&&null!=n&&(new Date(this.myForm.nativeElement[a.id].value)>n||new Date(this.myForm.nativeElement[o.id].value)<e)?(this.toastr.warning(i[0]+r[0]+f.formatDate(e,"dd MMMM yyyy","en-US")+" and"+r[1]+f.formatDate(n,"dd MMMM yyyy","en-US")+"."),this.dateWrong=!0):this.dateWrong=!1},M.prototype.selectedOption=function(e,t){t.value=e.key,t.descr=e.value,t.isListHide=!0},M.prototype.isSelected=function(e,t){return e.key==t},M.decorators=[{type:h.Component,args:[{selector:"lib-UCSearch",template:'\x3c!-- Basic form layout section start --\x3e\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 \x3c!-- Ini Digunakan untuk Generate Dynamic Component --\x3e\r\n \x3c!-- [hidden]="isHidden" --\x3e\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.data-numericpair="{{question.numericPair}}"\r\n attr.data-crit-datatable="{{question.isCriteriaDataTable}}"\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 \x3c!-- End Hardcode Lookup didalem--\x3e\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 [readonly]="question.readonly" attr.data-type="{{question.datatype}}"\r\n attr.data-name="{{question.name}}"\r\n attr.data-datepickerpair="{{question.datepickerPair}}"\r\n 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\'}}"\r\n (focusout)="question.restriction != undefined && 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\r\n *ngIf="question.type == \'taskDefinitionKey\' || question.type == \'processKey\' || 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\' || question.type == \'processKey\') ? SetProcessKey(i,question.wfKeyFilter) : 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 attr.data-crit-datatable="{{question.isCriteriaDataTable}}"\r\n [hidden]="!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1"\r\n (change)="question.isEvent ? onChangeEvent($event.target.value, question) : \'\'"\r\n [ngClass]="{ \'is-invalid\':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }">\r\n <option\r\n *ngIf="question.ddlType == \'one\' && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)"\r\n value="one">\r\n Select One</option>\r\n <option\r\n *ngIf="(question?.ddlType == undefined || question.ddlType == \'all\') && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)"\r\n value="all">All</option>\r\n <option *ngFor="let item of !question.isFromURL ? question?.items : question?.itemsUrl"\r\n value="{{!question.isFromURL ? item.key : item.Key}}">\r\n {{!question.isFromURL ? item.value : item.Value}}\r\n </option>\r\n </select>\r\n <label\r\n *ngIf="!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1">{{!question.isFromURL\r\n ? question.items[0].value :\r\n question.itemsUrl[0].Value}}</label>\r\n </div>\r\n <div *ngIf="question.type==\'dropdownSearch\'">\r\n <div class="dds-display-item">\r\n <input type="text" class="form-control search-form-control dds-input"\r\n name="{{\'ddsValue\'+question.name}}" [(ngModel)]="question.descr" readonly\r\n (click)="question.isListHide = !question.isListHide; question.searchText=\'\'">\r\n </div>\r\n <div class="dds-list-container" [hidden]="question.isListHide">\r\n <input type="text" class="form-control" name="{{\'searchText\'+question.name}}" [(ngModel)]="question.searchText"\r\n placeholder="FILTER">\r\n <div class="dds-items-container">\r\n \x3c!-- blm tentu bisa --\x3e\r\n <div class="dds-list-item" (click)="selectedOption({key:\'\',value:\'\'},question)">\r\n Select One\r\n </div>\r\n <div class="dds-list-item"\r\n *ngFor="let item of question?.items | textSearch : question.searchText; let i=index"\r\n (click)="selectedOption(item,question)"\r\n [ngClass]="{\'dds-active\': isSelected(item, question.value)}">\r\n {{item?.value}}\r\n </div>\r\n </div>\r\n </div>\r\n\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\r\n 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\x3c!-- // Basic form layout section end --\x3e',providers:[w,f.DatePipe],animations:[r.trigger("changeDivSize",[r.state("initial",r.style({height:"*",opacity:"1"})),r.state("final",r.style({height:"0px",opacity:"0",overflow:"hidden"})),r.transition("initial=>final",r.animate("300ms")),r.transition("final=>initial",r.animate("300ms"))])],styles:[".ucSearch-title{margin:3px}.dds-input{background-color:#fff;text-transform:uppercase}.dds-display-item:after{content:'\\e929';font-family:feather;font-size:1rem;display:inline-block;position:absolute;right:5px;top:5px;-webkit-transform:rotate(90deg);transform:rotate(90deg)}.dds-list-container{position:relative}.dds-items-container{border:1px solid #00b7d4;background-color:#fff;position:absolute;font-size:1rem;overflow:auto;height:500%;width:100%;z-index:9;top:100%}.dds-list-item{padding:2px 5px;cursor:pointer}.dds-list-item:hover{background-color:#1a73e8;color:#fff}.dds-active{background-color:#ddd}"]}]}],M.ctorParameters=function(){return[{type:t.HttpClient},{type:w},{type:h.Renderer2},{type:undefined,decorators:[{type:h.Inject,args:[n.DOCUMENT]}]},{type:a.ToastrService},{type:s.CookieService},{type:f.DatePipe}]},M.propDecorators={content:[{type:h.ViewChild,args:["enjiForm"]}],myForm:[{type:h.ViewChild,args:["formIdSearch"]}],searchInput:[{type:h.Input}],pageSize:[{type:h.Input}],isReport:[{type:h.Input}],result:[{type:h.Output}],genRpt:[{type:h.Output}],reqGetAllData:[{type:h.Output}]},M);function M(e,t,n,i,r,o,a){this.http=e,this.excelService=t,this._renderer2=n,this._document=i,this.toastr=r,this.cookieService=o,this.datePipe=a,this.searchInput=new I,this.pageSize=10,this.isReport=!1,this.result=new h.EventEmitter,this.genRpt=new h.EventEmitter,this.reqGetAllData=new h.EventEmitter,this.ExportTypeList=[{key:F.EXP_TYPE_PDF,value:"PDF"},{key:F.EXP_TYPE_XLS,value:"Excel 2003"},{key:F.EXP_TYPE_XLSX,value:"Excel 2007"},{key:F.EXP_TYPE_DOC,value:"Document"},{key:F.EXP_TYPE_DOCX,value:"Document XML"}],this.ListOfMonth=new k,this.ListOfYear=new Array,this.ClaimList=[{Key:v.RestrictionIsNotNull,Value:"CLAIMED"},{Key:v.RestrictionIsNull,Value:"UNCLAIMED"}],this.ExportType=0,this.pageNow=1,this.isDataLoaded=!1,this.isHidden=!1,this.BusinessDt=new Date,this.dateWrong=!1,this.readonly=!1,this.currentState="initial",this.countForm=0,this.formattedAmount="",this.amount=0}var L=(O.prototype.transform=function(e,t){return t?e.filter(function(e){return!(!e.value||"string"!=typeof e.value)&&-1<e.value.toLowerCase().indexOf(t.toLowerCase())}):e},O.decorators=[{type:h.Pipe,args:[{name:"textSearch"}]}],O);function O(){}var S={align:"right",allowNegative:!1,allowZero:!0,decimal:".",precision:2,prefix:"",suffix:"",thousands:",",nullable:!1,inputMode:c.CurrencyMaskInputMode.NATURAL},U=(R.decorators=[{type:h.NgModule,args:[{declarations:[C,L],imports:[f.CommonModule,u.FormsModule,p.UcShowErrorsModule,m.UcDirectiveUpperCaseModule,c.NgxCurrencyModule.forRoot(S),d.TranslateModule.forChild()],exports:[C]}]}],R);function R(){}e.UCSearchService=y,e.UCSearchComponent=C,e.customCurrencyMaskConfig=S,e.UCSearchModule=U,e.ɵb=L,e.ɵa=w,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
2
2
|
//# sourceMappingURL=adins-ucsearch.umd.min.js.map
|
|
@@ -1136,7 +1136,7 @@ export class UCSearchComponent {
|
|
|
1136
1136
|
UCSearchComponent.decorators = [
|
|
1137
1137
|
{ type: Component, args: [{
|
|
1138
1138
|
selector: 'lib-UCSearch',
|
|
1139
|
-
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.data-numericpair=\"{{question.numericPair}}\"\r\n attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\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 [readonly]=\"question.readonly\" attr.data-type=\"{{question.datatype}}\"\r\n attr.data-name=\"{{question.name}}\"\r\n attr.data-datepickerpair=\"{{question.datepickerPair}}\"\r\n 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'}}\"\r\n (focusout)=\"question.restriction != undefined && 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\r\n *ngIf=\"question.type == 'taskDefinitionKey' || question.type == 'processKey' || 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' || question.type == 'processKey') ? SetProcessKey(i,question.wfKeyFilter) : 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 attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\r\n [hidden]=\"!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1\"\r\n (change)=\"question.isEvent ? onChangeEvent($event.target.value, question) : ''\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }\">\r\n <option\r\n *ngIf=\"question.ddlType == 'one' && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)\"\r\n value=\"one\">\r\n Select One</option>\r\n <option\r\n *ngIf=\"(question?.ddlType == undefined || question.ddlType == 'all') && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)\"\r\n value=\"all\">All</option>\r\n <option *ngFor=\"let item of !question.isFromURL ? question?.items : question?.itemsUrl\"\r\n value=\"{{!question.isFromURL ? item.key : item.Key}}\">\r\n {{!question.isFromURL ? item.value : item.Value}}\r\n </option>\r\n </select>\r\n <label\r\n *ngIf=\"!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1\">{{!question.isFromURL\r\n ? question.items[0].value :\r\n question.itemsUrl[0].Value}}</label>\r\n </div>\r\n <div *ngIf=\"question.type=='dropdownSearch'\">\r\n <div class=\"dds-display-item\">\r\n <input type=\"text\" class=\"form-control search-form-control dds-input\"\r\n name=\"{{'ddsValue'+question.name}}\" [(ngModel)]=\"question.value\" readonly\r\n (click)=\"question.isListHide = !question.isListHide; question.searchText=''\">\r\n </div>\r\n <div class=\"dds-list-container\" [hidden]=\"question.isListHide\">\r\n <input type=\"text\" class=\"form-control\" name=\"{{'searchText'+question.name}}\" [(ngModel)]=\"question.searchText\"\r\n placeholder=\"FILTER\">\r\n <div class=\"dds-items-container\">\r\n <!-- blm tentu bisa -->\r\n <div class=\"dds-list-item\" (click)=\"selectedOption({key:'',value:''},question)\">\r\n Select One\r\n </div>\r\n <div class=\"dds-list-item\"\r\n *ngFor=\"let item of question?.items | textSearch : question.searchText; let i=index\"\r\n (click)=\"selectedOption(item,question)\"\r\n [ngClass]=\"{'dds-active': isSelected(item, question.value)}\">\r\n {{item?.value}}\r\n </div>\r\n </div>\r\n </div>\r\n\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\r\n 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 -->",
|
|
1139
|
+
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.data-numericpair=\"{{question.numericPair}}\"\r\n attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\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 [readonly]=\"question.readonly\" attr.data-type=\"{{question.datatype}}\"\r\n attr.data-name=\"{{question.name}}\"\r\n attr.data-datepickerpair=\"{{question.datepickerPair}}\"\r\n 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'}}\"\r\n (focusout)=\"question.restriction != undefined && 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\r\n *ngIf=\"question.type == 'taskDefinitionKey' || question.type == 'processKey' || 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' || question.type == 'processKey') ? SetProcessKey(i,question.wfKeyFilter) : 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 attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\r\n [hidden]=\"!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1\"\r\n (change)=\"question.isEvent ? onChangeEvent($event.target.value, question) : ''\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }\">\r\n <option\r\n *ngIf=\"question.ddlType == 'one' && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)\"\r\n value=\"one\">\r\n Select One</option>\r\n <option\r\n *ngIf=\"(question?.ddlType == undefined || question.ddlType == 'all') && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)\"\r\n value=\"all\">All</option>\r\n <option *ngFor=\"let item of !question.isFromURL ? question?.items : question?.itemsUrl\"\r\n value=\"{{!question.isFromURL ? item.key : item.Key}}\">\r\n {{!question.isFromURL ? item.value : item.Value}}\r\n </option>\r\n </select>\r\n <label\r\n *ngIf=\"!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1\">{{!question.isFromURL\r\n ? question.items[0].value :\r\n question.itemsUrl[0].Value}}</label>\r\n </div>\r\n <div *ngIf=\"question.type=='dropdownSearch'\">\r\n <div class=\"dds-display-item\">\r\n <input type=\"text\" class=\"form-control search-form-control dds-input\"\r\n name=\"{{'ddsValue'+question.name}}\" [(ngModel)]=\"question.descr\" readonly\r\n (click)=\"question.isListHide = !question.isListHide; question.searchText=''\">\r\n </div>\r\n <div class=\"dds-list-container\" [hidden]=\"question.isListHide\">\r\n <input type=\"text\" class=\"form-control\" name=\"{{'searchText'+question.name}}\" [(ngModel)]=\"question.searchText\"\r\n placeholder=\"FILTER\">\r\n <div class=\"dds-items-container\">\r\n <!-- blm tentu bisa -->\r\n <div class=\"dds-list-item\" (click)=\"selectedOption({key:'',value:''},question)\">\r\n Select One\r\n </div>\r\n <div class=\"dds-list-item\"\r\n *ngFor=\"let item of question?.items | textSearch : question.searchText; let i=index\"\r\n (click)=\"selectedOption(item,question)\"\r\n [ngClass]=\"{'dds-active': isSelected(item, question.value)}\">\r\n {{item?.value}}\r\n </div>\r\n </div>\r\n </div>\r\n\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\r\n 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 -->",
|
|
1140
1140
|
providers: [ExcelService, DatePipe],
|
|
1141
1141
|
animations: [
|
|
1142
1142
|
trigger('changeDivSize', [
|
|
@@ -1250,7 +1250,7 @@ var UCSearchComponent = /** @class */ (function () {
|
|
|
1250
1250
|
UCSearchComponent.decorators = [
|
|
1251
1251
|
{ type: Component, args: [{
|
|
1252
1252
|
selector: 'lib-UCSearch',
|
|
1253
|
-
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.data-numericpair=\"{{question.numericPair}}\"\r\n attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\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 [readonly]=\"question.readonly\" attr.data-type=\"{{question.datatype}}\"\r\n attr.data-name=\"{{question.name}}\"\r\n attr.data-datepickerpair=\"{{question.datepickerPair}}\"\r\n 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'}}\"\r\n (focusout)=\"question.restriction != undefined && 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\r\n *ngIf=\"question.type == 'taskDefinitionKey' || question.type == 'processKey' || 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' || question.type == 'processKey') ? SetProcessKey(i,question.wfKeyFilter) : 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 attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\r\n [hidden]=\"!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1\"\r\n (change)=\"question.isEvent ? onChangeEvent($event.target.value, question) : ''\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }\">\r\n <option\r\n *ngIf=\"question.ddlType == 'one' && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)\"\r\n value=\"one\">\r\n Select One</option>\r\n <option\r\n *ngIf=\"(question?.ddlType == undefined || question.ddlType == 'all') && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)\"\r\n value=\"all\">All</option>\r\n <option *ngFor=\"let item of !question.isFromURL ? question?.items : question?.itemsUrl\"\r\n value=\"{{!question.isFromURL ? item.key : item.Key}}\">\r\n {{!question.isFromURL ? item.value : item.Value}}\r\n </option>\r\n </select>\r\n <label\r\n *ngIf=\"!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1\">{{!question.isFromURL\r\n ? question.items[0].value :\r\n question.itemsUrl[0].Value}}</label>\r\n </div>\r\n <div *ngIf=\"question.type=='dropdownSearch'\">\r\n <div class=\"dds-display-item\">\r\n <input type=\"text\" class=\"form-control search-form-control dds-input\"\r\n name=\"{{'ddsValue'+question.name}}\" [(ngModel)]=\"question.value\" readonly\r\n (click)=\"question.isListHide = !question.isListHide; question.searchText=''\">\r\n </div>\r\n <div class=\"dds-list-container\" [hidden]=\"question.isListHide\">\r\n <input type=\"text\" class=\"form-control\" name=\"{{'searchText'+question.name}}\" [(ngModel)]=\"question.searchText\"\r\n placeholder=\"FILTER\">\r\n <div class=\"dds-items-container\">\r\n <!-- blm tentu bisa -->\r\n <div class=\"dds-list-item\" (click)=\"selectedOption({key:'',value:''},question)\">\r\n Select One\r\n </div>\r\n <div class=\"dds-list-item\"\r\n *ngFor=\"let item of question?.items | textSearch : question.searchText; let i=index\"\r\n (click)=\"selectedOption(item,question)\"\r\n [ngClass]=\"{'dds-active': isSelected(item, question.value)}\">\r\n {{item?.value}}\r\n </div>\r\n </div>\r\n </div>\r\n\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\r\n 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 -->",
|
|
1253
|
+
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.data-numericpair=\"{{question.numericPair}}\"\r\n attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\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 [readonly]=\"question.readonly\" attr.data-type=\"{{question.datatype}}\"\r\n attr.data-name=\"{{question.name}}\"\r\n attr.data-datepickerpair=\"{{question.datepickerPair}}\"\r\n 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'}}\"\r\n (focusout)=\"question.restriction != undefined && 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\r\n *ngIf=\"question.type == 'taskDefinitionKey' || question.type == 'processKey' || 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' || question.type == 'processKey') ? SetProcessKey(i,question.wfKeyFilter) : 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 attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\r\n [hidden]=\"!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1\"\r\n (change)=\"question.isEvent ? onChangeEvent($event.target.value, question) : ''\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }\">\r\n <option\r\n *ngIf=\"question.ddlType == 'one' && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)\"\r\n value=\"one\">\r\n Select One</option>\r\n <option\r\n *ngIf=\"(question?.ddlType == undefined || question.ddlType == 'all') && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)\"\r\n value=\"all\">All</option>\r\n <option *ngFor=\"let item of !question.isFromURL ? question?.items : question?.itemsUrl\"\r\n value=\"{{!question.isFromURL ? item.key : item.Key}}\">\r\n {{!question.isFromURL ? item.value : item.Value}}\r\n </option>\r\n </select>\r\n <label\r\n *ngIf=\"!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1\">{{!question.isFromURL\r\n ? question.items[0].value :\r\n question.itemsUrl[0].Value}}</label>\r\n </div>\r\n <div *ngIf=\"question.type=='dropdownSearch'\">\r\n <div class=\"dds-display-item\">\r\n <input type=\"text\" class=\"form-control search-form-control dds-input\"\r\n name=\"{{'ddsValue'+question.name}}\" [(ngModel)]=\"question.descr\" readonly\r\n (click)=\"question.isListHide = !question.isListHide; question.searchText=''\">\r\n </div>\r\n <div class=\"dds-list-container\" [hidden]=\"question.isListHide\">\r\n <input type=\"text\" class=\"form-control\" name=\"{{'searchText'+question.name}}\" [(ngModel)]=\"question.searchText\"\r\n placeholder=\"FILTER\">\r\n <div class=\"dds-items-container\">\r\n <!-- blm tentu bisa -->\r\n <div class=\"dds-list-item\" (click)=\"selectedOption({key:'',value:''},question)\">\r\n Select One\r\n </div>\r\n <div class=\"dds-list-item\"\r\n *ngFor=\"let item of question?.items | textSearch : question.searchText; let i=index\"\r\n (click)=\"selectedOption(item,question)\"\r\n [ngClass]=\"{'dds-active': isSelected(item, question.value)}\">\r\n {{item?.value}}\r\n </div>\r\n </div>\r\n </div>\r\n\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\r\n 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 -->",
|
|
1254
1254
|
providers: [ExcelService, DatePipe],
|
|
1255
1255
|
animations: [
|
|
1256
1256
|
trigger('changeDivSize', [
|
|
@@ -1339,7 +1339,7 @@ class UCSearchComponent {
|
|
|
1339
1339
|
UCSearchComponent.decorators = [
|
|
1340
1340
|
{ type: Component, args: [{
|
|
1341
1341
|
selector: 'lib-UCSearch',
|
|
1342
|
-
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.data-numericpair=\"{{question.numericPair}}\"\r\n attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\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 [readonly]=\"question.readonly\" attr.data-type=\"{{question.datatype}}\"\r\n attr.data-name=\"{{question.name}}\"\r\n attr.data-datepickerpair=\"{{question.datepickerPair}}\"\r\n 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'}}\"\r\n (focusout)=\"question.restriction != undefined && 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\r\n *ngIf=\"question.type == 'taskDefinitionKey' || question.type == 'processKey' || 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' || question.type == 'processKey') ? SetProcessKey(i,question.wfKeyFilter) : 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 attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\r\n [hidden]=\"!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1\"\r\n (change)=\"question.isEvent ? onChangeEvent($event.target.value, question) : ''\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }\">\r\n <option\r\n *ngIf=\"question.ddlType == 'one' && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)\"\r\n value=\"one\">\r\n Select One</option>\r\n <option\r\n *ngIf=\"(question?.ddlType == undefined || question.ddlType == 'all') && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)\"\r\n value=\"all\">All</option>\r\n <option *ngFor=\"let item of !question.isFromURL ? question?.items : question?.itemsUrl\"\r\n value=\"{{!question.isFromURL ? item.key : item.Key}}\">\r\n {{!question.isFromURL ? item.value : item.Value}}\r\n </option>\r\n </select>\r\n <label\r\n *ngIf=\"!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1\">{{!question.isFromURL\r\n ? question.items[0].value :\r\n question.itemsUrl[0].Value}}</label>\r\n </div>\r\n <div *ngIf=\"question.type=='dropdownSearch'\">\r\n <div class=\"dds-display-item\">\r\n <input type=\"text\" class=\"form-control search-form-control dds-input\"\r\n name=\"{{'ddsValue'+question.name}}\" [(ngModel)]=\"question.value\" readonly\r\n (click)=\"question.isListHide = !question.isListHide; question.searchText=''\">\r\n </div>\r\n <div class=\"dds-list-container\" [hidden]=\"question.isListHide\">\r\n <input type=\"text\" class=\"form-control\" name=\"{{'searchText'+question.name}}\" [(ngModel)]=\"question.searchText\"\r\n placeholder=\"FILTER\">\r\n <div class=\"dds-items-container\">\r\n <!-- blm tentu bisa -->\r\n <div class=\"dds-list-item\" (click)=\"selectedOption({key:'',value:''},question)\">\r\n Select One\r\n </div>\r\n <div class=\"dds-list-item\"\r\n *ngFor=\"let item of question?.items | textSearch : question.searchText; let i=index\"\r\n (click)=\"selectedOption(item,question)\"\r\n [ngClass]=\"{'dds-active': isSelected(item, question.value)}\">\r\n {{item?.value}}\r\n </div>\r\n </div>\r\n </div>\r\n\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\r\n 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 -->",
|
|
1342
|
+
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.data-numericpair=\"{{question.numericPair}}\"\r\n attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\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 [readonly]=\"question.readonly\" attr.data-type=\"{{question.datatype}}\"\r\n attr.data-name=\"{{question.name}}\"\r\n attr.data-datepickerpair=\"{{question.datepickerPair}}\"\r\n 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'}}\"\r\n (focusout)=\"question.restriction != undefined && 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\r\n *ngIf=\"question.type == 'taskDefinitionKey' || question.type == 'processKey' || 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' || question.type == 'processKey') ? SetProcessKey(i,question.wfKeyFilter) : 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 attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\r\n [hidden]=\"!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1\"\r\n (change)=\"question.isEvent ? onChangeEvent($event.target.value, question) : ''\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }\">\r\n <option\r\n *ngIf=\"question.ddlType == 'one' && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)\"\r\n value=\"one\">\r\n Select One</option>\r\n <option\r\n *ngIf=\"(question?.ddlType == undefined || question.ddlType == 'all') && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)\"\r\n value=\"all\">All</option>\r\n <option *ngFor=\"let item of !question.isFromURL ? question?.items : question?.itemsUrl\"\r\n value=\"{{!question.isFromURL ? item.key : item.Key}}\">\r\n {{!question.isFromURL ? item.value : item.Value}}\r\n </option>\r\n </select>\r\n <label\r\n *ngIf=\"!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1\">{{!question.isFromURL\r\n ? question.items[0].value :\r\n question.itemsUrl[0].Value}}</label>\r\n </div>\r\n <div *ngIf=\"question.type=='dropdownSearch'\">\r\n <div class=\"dds-display-item\">\r\n <input type=\"text\" class=\"form-control search-form-control dds-input\"\r\n name=\"{{'ddsValue'+question.name}}\" [(ngModel)]=\"question.descr\" readonly\r\n (click)=\"question.isListHide = !question.isListHide; question.searchText=''\">\r\n </div>\r\n <div class=\"dds-list-container\" [hidden]=\"question.isListHide\">\r\n <input type=\"text\" class=\"form-control\" name=\"{{'searchText'+question.name}}\" [(ngModel)]=\"question.searchText\"\r\n placeholder=\"FILTER\">\r\n <div class=\"dds-items-container\">\r\n <!-- blm tentu bisa -->\r\n <div class=\"dds-list-item\" (click)=\"selectedOption({key:'',value:''},question)\">\r\n Select One\r\n </div>\r\n <div class=\"dds-list-item\"\r\n *ngFor=\"let item of question?.items | textSearch : question.searchText; let i=index\"\r\n (click)=\"selectedOption(item,question)\"\r\n [ngClass]=\"{'dds-active': isSelected(item, question.value)}\">\r\n {{item?.value}}\r\n </div>\r\n </div>\r\n </div>\r\n\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\r\n 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 -->",
|
|
1343
1343
|
providers: [ExcelService, DatePipe],
|
|
1344
1344
|
animations: [
|
|
1345
1345
|
trigger('changeDivSize', [
|
package/fesm5/adins-ucsearch.js
CHANGED
|
@@ -1479,7 +1479,7 @@ var UCSearchComponent = /** @class */ (function () {
|
|
|
1479
1479
|
UCSearchComponent.decorators = [
|
|
1480
1480
|
{ type: Component, args: [{
|
|
1481
1481
|
selector: 'lib-UCSearch',
|
|
1482
|
-
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.data-numericpair=\"{{question.numericPair}}\"\r\n attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\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 [readonly]=\"question.readonly\" attr.data-type=\"{{question.datatype}}\"\r\n attr.data-name=\"{{question.name}}\"\r\n attr.data-datepickerpair=\"{{question.datepickerPair}}\"\r\n 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'}}\"\r\n (focusout)=\"question.restriction != undefined && 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\r\n *ngIf=\"question.type == 'taskDefinitionKey' || question.type == 'processKey' || 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' || question.type == 'processKey') ? SetProcessKey(i,question.wfKeyFilter) : 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 attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\r\n [hidden]=\"!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1\"\r\n (change)=\"question.isEvent ? onChangeEvent($event.target.value, question) : ''\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }\">\r\n <option\r\n *ngIf=\"question.ddlType == 'one' && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)\"\r\n value=\"one\">\r\n Select One</option>\r\n <option\r\n *ngIf=\"(question?.ddlType == undefined || question.ddlType == 'all') && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)\"\r\n value=\"all\">All</option>\r\n <option *ngFor=\"let item of !question.isFromURL ? question?.items : question?.itemsUrl\"\r\n value=\"{{!question.isFromURL ? item.key : item.Key}}\">\r\n {{!question.isFromURL ? item.value : item.Value}}\r\n </option>\r\n </select>\r\n <label\r\n *ngIf=\"!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1\">{{!question.isFromURL\r\n ? question.items[0].value :\r\n question.itemsUrl[0].Value}}</label>\r\n </div>\r\n <div *ngIf=\"question.type=='dropdownSearch'\">\r\n <div class=\"dds-display-item\">\r\n <input type=\"text\" class=\"form-control search-form-control dds-input\"\r\n name=\"{{'ddsValue'+question.name}}\" [(ngModel)]=\"question.value\" readonly\r\n (click)=\"question.isListHide = !question.isListHide; question.searchText=''\">\r\n </div>\r\n <div class=\"dds-list-container\" [hidden]=\"question.isListHide\">\r\n <input type=\"text\" class=\"form-control\" name=\"{{'searchText'+question.name}}\" [(ngModel)]=\"question.searchText\"\r\n placeholder=\"FILTER\">\r\n <div class=\"dds-items-container\">\r\n <!-- blm tentu bisa -->\r\n <div class=\"dds-list-item\" (click)=\"selectedOption({key:'',value:''},question)\">\r\n Select One\r\n </div>\r\n <div class=\"dds-list-item\"\r\n *ngFor=\"let item of question?.items | textSearch : question.searchText; let i=index\"\r\n (click)=\"selectedOption(item,question)\"\r\n [ngClass]=\"{'dds-active': isSelected(item, question.value)}\">\r\n {{item?.value}}\r\n </div>\r\n </div>\r\n </div>\r\n\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\r\n 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 -->",
|
|
1482
|
+
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.data-numericpair=\"{{question.numericPair}}\"\r\n attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\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 [readonly]=\"question.readonly\" attr.data-type=\"{{question.datatype}}\"\r\n attr.data-name=\"{{question.name}}\"\r\n attr.data-datepickerpair=\"{{question.datepickerPair}}\"\r\n 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'}}\"\r\n (focusout)=\"question.restriction != undefined && 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\r\n *ngIf=\"question.type == 'taskDefinitionKey' || question.type == 'processKey' || 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' || question.type == 'processKey') ? SetProcessKey(i,question.wfKeyFilter) : 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 attr.data-crit-datatable=\"{{question.isCriteriaDataTable}}\"\r\n [hidden]=\"!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1\"\r\n (change)=\"question.isEvent ? onChangeEvent($event.target.value, question) : ''\"\r\n [ngClass]=\"{ 'is-invalid':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }\">\r\n <option\r\n *ngIf=\"question.ddlType == 'one' && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)\"\r\n value=\"one\">\r\n Select One</option>\r\n <option\r\n *ngIf=\"(question?.ddlType == undefined || question.ddlType == 'all') && (!question.isFromURL ? question?.items?.length != 1 : question?.itemsUrl?.length != 1)\"\r\n value=\"all\">All</option>\r\n <option *ngFor=\"let item of !question.isFromURL ? question?.items : question?.itemsUrl\"\r\n value=\"{{!question.isFromURL ? item.key : item.Key}}\">\r\n {{!question.isFromURL ? item.value : item.Value}}\r\n </option>\r\n </select>\r\n <label\r\n *ngIf=\"!question.isFromURL ? question?.items?.length == 1 : question?.itemsUrl?.length == 1\">{{!question.isFromURL\r\n ? question.items[0].value :\r\n question.itemsUrl[0].Value}}</label>\r\n </div>\r\n <div *ngIf=\"question.type=='dropdownSearch'\">\r\n <div class=\"dds-display-item\">\r\n <input type=\"text\" class=\"form-control search-form-control dds-input\"\r\n name=\"{{'ddsValue'+question.name}}\" [(ngModel)]=\"question.descr\" readonly\r\n (click)=\"question.isListHide = !question.isListHide; question.searchText=''\">\r\n </div>\r\n <div class=\"dds-list-container\" [hidden]=\"question.isListHide\">\r\n <input type=\"text\" class=\"form-control\" name=\"{{'searchText'+question.name}}\" [(ngModel)]=\"question.searchText\"\r\n placeholder=\"FILTER\">\r\n <div class=\"dds-items-container\">\r\n <!-- blm tentu bisa -->\r\n <div class=\"dds-list-item\" (click)=\"selectedOption({key:'',value:''},question)\">\r\n Select One\r\n </div>\r\n <div class=\"dds-list-item\"\r\n *ngFor=\"let item of question?.items | textSearch : question.searchText; let i=index\"\r\n (click)=\"selectedOption(item,question)\"\r\n [ngClass]=\"{'dds-active': isSelected(item, question.value)}\">\r\n {{item?.value}}\r\n </div>\r\n </div>\r\n </div>\r\n\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\r\n 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 -->",
|
|
1483
1483
|
providers: [ExcelService, DatePipe],
|
|
1484
1484
|
animations: [
|
|
1485
1485
|
trigger('changeDivSize', [
|