@adins/ucsearch 2.0.39 → 2.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -0
- package/adins-ucsearch.metadata.json +1 -1
- package/bundles/adins-ucsearch.umd.js +157 -4
- package/bundles/adins-ucsearch.umd.js.map +1 -1
- package/bundles/adins-ucsearch.umd.min.js +1 -1
- package/bundles/adins-ucsearch.umd.min.js.map +1 -1
- package/esm2015/lib/model/InputSearchObj.Model.js +15 -1
- package/esm2015/lib/ucsearch.component.js +154 -5
- package/esm5/lib/model/InputSearchObj.Model.js +17 -1
- package/esm5/lib/ucsearch.component.js +158 -5
- package/fesm2015/adins-ucsearch.js +154 -4
- package/fesm2015/adins-ucsearch.js.map +1 -1
- package/fesm5/adins-ucsearch.js +158 -4
- package/fesm5/adins-ucsearch.js.map +1 -1
- package/lib/model/InputSearchObj.Model.d.ts +6 -0
- package/lib/ucsearch.component.d.ts +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.2.0.
|
|
4
4
|
|
|
5
5
|
## Version
|
|
6
|
+
Version 2.0.41
|
|
7
|
+
1. Add type switch
|
|
8
|
+
|
|
6
9
|
Version 2.0.37
|
|
7
10
|
1. search able to do like restriction
|
|
8
11
|
|
|
@@ -183,6 +186,13 @@ InputSearchObj :
|
|
|
183
186
|
value: "CF4W"
|
|
184
187
|
}
|
|
185
188
|
] *optional // list for value in whereQuery
|
|
189
|
+
- switchValue :
|
|
190
|
+
[
|
|
191
|
+
{
|
|
192
|
+
property: "BizTmpltCode",
|
|
193
|
+
value: "CF4W"
|
|
194
|
+
}
|
|
195
|
+
] *optional // list value for headerList type switch
|
|
186
196
|
|
|
187
197
|
search.json :
|
|
188
198
|
``` javascript
|
|
@@ -270,6 +280,30 @@ search.json :
|
|
|
270
280
|
"criteriaPropName": "", // criteria property name
|
|
271
281
|
"criteriaPropValue": "", // criteria value
|
|
272
282
|
"itemsUrl" : [],
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"type" : "switch",
|
|
286
|
+
"case" : [ // list of case
|
|
287
|
+
{
|
|
288
|
+
"conditions" : [ // list of conditions
|
|
289
|
+
{
|
|
290
|
+
"property" : "type", // property for condition checking
|
|
291
|
+
"value" : "EXE", // value to check
|
|
292
|
+
"restriction" : "EQ" // condition restrictions (EQ, NEQ, GT, GTE, LT, LTE | default EQ) *optional
|
|
293
|
+
}
|
|
294
|
+
],
|
|
295
|
+
"result" : { // result of this case
|
|
296
|
+
"type": "textbox", // type like bodyList : text,decimal,date,link,boolean
|
|
297
|
+
"label" : "Action",
|
|
298
|
+
"datatype" : "text",
|
|
299
|
+
"name" : "dateDt",
|
|
300
|
+
"id" : "uniqueId",
|
|
301
|
+
"value" : "",
|
|
302
|
+
"restriction" : "gte"
|
|
303
|
+
},
|
|
304
|
+
"isHide" : true
|
|
305
|
+
}
|
|
306
|
+
]
|
|
273
307
|
}
|
|
274
308
|
],
|
|
275
309
|
"querystring": { // query data by sql
|
|
@@ -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":13,"character":1},"arguments":[{"selector":"lib-UCSearch","providers":[{"__symbolic":"reference","name":"ɵa"}],"animations":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"trigger","line":19,"character":4},"arguments":["changeDivSize",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"state","line":20,"character":6},"arguments":["initial",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":20,"character":23},"arguments":[{"height":"*","opacity":"1"}]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"state","line":24,"character":6},"arguments":["final",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":24,"character":21},"arguments":[{"height":"0px","opacity":"0","overflow":"hidden"}]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition","line":29,"character":6},"arguments":["initial=>final",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate","line":29,"character":35},"arguments":["300ms"]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition","line":30,"character":6},"arguments":["final=>initial",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate","line":30,"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>\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\">\r\n <div class=\"col-md-12\">\r\n <div class=\"row\">\r\n <label class=\"col-md-5 no-padding\" for=\"{{question.id}}\" 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 name=\"{{question.name}}\" value=\"{{question.value}}\"\r\n attr.data-type=\"{{question.datatype}}\" attr.data-restriction=\"{{question.restriction}}\">\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 name=\"{{question.name}}\" attr.data-type=\"{{question.datatype}}\"\r\n value=\"{{question.value}}\"></textarea>\r\n </div>\r\n <div *ngIf=\"question.type=='numeric'\">\r\n <input type=\"text\" id=\"{{question.id}}\" (focus)=\"transformToDecimal($event)\"\r\n (blur)=\"transformAmount($event)\" class=\"form-control search-form-control\"\r\n name=\"{{question.name}}\" value=\"{{question.value}}\"\r\n attr.data-restriction=\"{{question.restriction}}\" attr.data-type=\"{{question.datatype}}\">\r\n </div>\r\n\r\n <!-- End Hardcode Lookup didalem-->\r\n <div *ngIf=\"question.type=='datepicker'\">\r\n <input type=\"date\" id=\"{{question.id}}\"\r\n class=\"form-control search-form-control btn-lookup\" name=\"{{question.name}}\"\r\n value=\"{{question.value}}\" attr.data-type=\"{{question.datatype}}\"\r\n attr.data-restriction=\"{{question.restriction}}\">\r\n </div>\r\n <div *ngIf=\"question.type=='dropdown'\">\r\n <!-- Ini kalau datanya tidak di load dari URL -->\r\n <div *ngIf=\"!question.isFromURL\">\r\n <select name=\"{{question.name}}\" class=\"form-control search-form-control\"\r\n attr.query-in=\"{{question.isQueryIn}}\" attr.data-type=\"{{question.datatype}}\">\r\n <option *ngIf=\"!question.isSelectOne\" value=\"All\">\r\n All\r\n </option>\r\n <option *ngFor=\"let item of question?.items\" value=\"{{item.key}}\">\r\n {{item.value}}\r\n </option>\r\n </select>\r\n </div>\r\n <!-- Ini kalau datanya di load dari URL -->\r\n <div *ngIf=\"question.isFromURL\">\r\n <div *ngIf=\"question.isEvent\">\r\n <select name=\"{{question.name}}\"\r\n (change)=\"onChangeEvent($event.target.value, question)\"\r\n class=\"form-control search-form-control\" attr.query-in=\"{{question.isQueryIn}}\"\r\n attr.data-type=\"{{question.datatype}}\">\r\n <option *ngIf=\"!question.isSelectOne\" value=\"All\">\r\n All\r\n </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 </div>\r\n <div *ngIf=\"!question.isEvent\">\r\n <select name=\"{{question.name}}\" class=\"form-control search-form-control\"\r\n attr.query-in=\"{{question.isQueryIn}}\" attr.data-type=\"{{question.datatype}}\">\r\n <option *ngIf=\"!question.isSelectOne\" value=\"All\">\r\n All\r\n </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 </div>\r\n </div>\r\n </div>\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 <form>\r\n <div class=\"form-actions right\">\r\n <button *ngIf=\"exportData == true\" type=\"button\" (click)=\"exportAsXLSX()\"\r\n class=\"btn btn-raised btn-success mr-1\" translate>\r\n <i class=\"fa ft-download\"></i> Export Excel\r\n </button>\r\n <button type=\"button\" (click)=\"reset()\" class=\"btn btn-raised btn-warning mr-1\" translate>\r\n <i class=\"fa fa-times\"></i> Reset\r\n </button>\r\n <button type=\"button\" (click)=\"searchClick()\" class=\"btn btn-raised btn-primary\" #UCSearchClick\r\n translate>\r\n <i class=\"fa fa-search\"></i> Search\r\n </button>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</section>\r\n<br>\r\n<!-- // Basic form layout section end -->","styles":[".ucSearch-title{margin:3px}"]}]}],"members":{"myForm":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":36,"character":3},"arguments":["formIdSearch"]}]}],"searchInput":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":37,"character":3}}]}],"pageSize":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":38,"character":3}}]}],"result":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":39,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":55,"character":108},"arguments":[{"__symbolic":"reference","module":"@angular/platform-browser","name":"DOCUMENT","line":55,"character":115}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":55,"character":28},{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":55,"character":96},null]}],"changeState":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"initiateForm":[{"__symbolic":"method"}],"getJSON":[{"__symbolic":"method"}],"postJSON":[{"__symbolic":"method"}],"searchClick":[{"__symbolic":"method"}],"reset":[{"__symbolic":"method"}],"search":[{"__symbolic":"method"}],"lessThanFour":[{"__symbolic":"method"}],"resolveObject":[{"__symbolic":"method"}],"transformAmount":[{"__symbolic":"method"}],"transformToDecimal":[{"__symbolic":"method"}],"exportAsXLSX":[{"__symbolic":"method"}],"onChangeEvent":[{"__symbolic":"method"}]}},"UCSearchModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":4,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"UCSearchComponent"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":7,"character":4}],"exports":[{"__symbolic":"reference","name":"UCSearchComponent"}]}]}],"members":{}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":7,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"exportAsExcelFile":[{"__symbolic":"method"}],"saveAsExcelFile":[{"__symbolic":"method"}]}}},"origins":{"UCSearchService":"./lib/ucsearch.service","UCSearchComponent":"./lib/ucsearch.component","UCSearchModule":"./lib/ucsearch.module","ɵa":"./lib/services/excel-service/excel-service"},"importAs":"@adins/ucsearch"}
|
|
1
|
+
{"__symbolic":"module","version":4,"metadata":{"UCSearchService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":2,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor"}]},"statics":{"ngInjectableDef":{}}},"UCSearchComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":13,"character":1},"arguments":[{"selector":"lib-UCSearch","providers":[{"__symbolic":"reference","name":"ɵa"}],"animations":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"trigger","line":19,"character":4},"arguments":["changeDivSize",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"state","line":20,"character":6},"arguments":["initial",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":20,"character":23},"arguments":[{"height":"*","opacity":"1"}]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"state","line":24,"character":6},"arguments":["final",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":24,"character":21},"arguments":[{"height":"0px","opacity":"0","overflow":"hidden"}]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition","line":29,"character":6},"arguments":["initial=>final",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate","line":29,"character":35},"arguments":["300ms"]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition","line":30,"character":6},"arguments":["final=>initial",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate","line":30,"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>\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\">\r\n <div class=\"col-md-12\">\r\n <div class=\"row\">\r\n <div *ngIf=\"question.type=='textbox'\">\r\n <label class=\"col-md-5 no-padding\" for=\"{{question.id}}\"\r\n translate>{{question.label}}</label>\r\n <input class=\"col-md-7 no-padding\" type=\"text\" id=\"{{question.id}}\"\r\n class=\"form-control search-form-control\" name=\"{{question.name}}\"\r\n value=\"{{question.value}}\" (keydown.enter)=\"searchClick()\"\r\n attr.data-type=\"{{question.datatype}}\" attr.data-restriction=\"{{question.restriction}}\">\r\n </div>\r\n <div *ngIf=\"question.type=='textarea'\">\r\n <label class=\"col-md-5 no-padding\" for=\"{{question.id}}\"\r\n translate>{{question.label}}</label>\r\n <textarea class=\"col-md-7 no-padding\" type=\"text\" id=\"{{question.id}}\"\r\n class=\"form-control search-form-control\" name=\"{{question.name}}\"\r\n attr.data-type=\"{{question.datatype}}\" value=\"{{question.value}}\"></textarea>\r\n </div>\r\n <div *ngIf=\"question.type=='numeric'\">\r\n <label class=\"col-md-5 no-padding\" for=\"{{question.id}}\"\r\n translate>{{question.label}}</label>\r\n <input class=\"col-md-7 no-padding\" type=\"text\" id=\"{{question.id}}\"\r\n (focus)=\"transformToDecimal($event)\" (blur)=\"transformAmount($event)\"\r\n class=\"form-control search-form-control\" name=\"{{question.name}}\"\r\n value=\"{{question.value}}\" (keydown.enter)=\"searchClick()\"\r\n attr.data-restriction=\"{{question.restriction}}\" attr.data-type=\"{{question.datatype}}\">\r\n </div>\r\n\r\n <!-- End Hardcode Lookup didalem-->\r\n <div *ngIf=\"question.type=='datepicker'\">\r\n <label class=\"col-md-5 no-padding\" for=\"{{question.id}}\"\r\n translate>{{question.label}}</label>\r\n <input class=\"col-md-7 no-padding\" type=\"date\" id=\"{{question.id}}\"\r\n class=\"form-control search-form-control btn-lookup\" name=\"{{question.name}}\"\r\n value=\"{{question.value}}\" attr.data-type=\"{{question.datatype}}\"\r\n (keydown.enter)=\"searchClick()\" attr.data-restriction=\"{{question.restriction}}\">\r\n </div>\r\n <div *ngIf=\"question.type=='dropdown'\">\r\n <!-- Ini kalau datanya tidak di load dari URL -->\r\n <div *ngIf=\"!question.isFromURL\">\r\n <label class=\"col-md-5 no-padding\" for=\"{{question.id}}\"\r\n translate>{{question.label}}</label>\r\n <select class=\"col-md-7 no-padding\" name=\"{{question.name}}\"\r\n class=\"form-control search-form-control\" attr.query-in=\"{{question.isQueryIn}}\"\r\n attr.data-type=\"{{question.datatype}}\">\r\n <option *ngIf=\"!question.isSelectOne\" value=\"All\">\r\n All\r\n </option>\r\n <option *ngFor=\"let item of question?.items\" value=\"{{item.key}}\">\r\n {{item.value}}\r\n </option>\r\n </select>\r\n </div>\r\n <!-- Ini kalau datanya di load dari URL -->\r\n <div *ngIf=\"question.isFromURL\">\r\n <div *ngIf=\"question.isEvent\">\r\n <label class=\"col-md-5 no-padding\" for=\"{{question.id}}\"\r\n translate>{{question.label}}</label>\r\n <select class=\"col-md-7 no-padding\" name=\"{{question.name}}\"\r\n (change)=\"onChangeEvent($event.target.value, question)\"\r\n class=\"form-control search-form-control\" attr.query-in=\"{{question.isQueryIn}}\"\r\n attr.data-type=\"{{question.datatype}}\">\r\n <option *ngIf=\"!question.isSelectOne\" value=\"All\">\r\n All\r\n </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 </div>\r\n <div *ngIf=\"!question.isEvent\">\r\n <label class=\"col-md-5 no-padding\" for=\"{{question.id}}\"\r\n translate>{{question.label}}</label>\r\n <select class=\"col-md-7 no-padding\" name=\"{{question.name}}\"\r\n class=\"form-control search-form-control\" attr.query-in=\"{{question.isQueryIn}}\"\r\n attr.data-type=\"{{question.datatype}}\">\r\n <option *ngIf=\"!question.isSelectOne\" value=\"All\">\r\n All\r\n </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 </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"question.type=='switch'\">\r\n <div *ngFor=\"let case of question.case\">\r\n <div *ngIf=\"switchCase(case) && case.isHide != true\">\r\n <label class=\"col-md-5 no-padding\" for=\"{{case.result.id}}\" translate> {{\r\n case.result.label }} </label>\r\n </div>\r\n <div class=\"col-md-7 no-padding\">\r\n <div *ngIf=\"case.result.type=='textbox'\">\r\n <input type=\"text\" id=\"{{case.result.id}}\" class=\"form-control search-form-control\"\r\n name=\"{{case.result.name}}\" value=\"{{case.result.value}}\" (keydown.enter)=\"searchClick()\"\r\n attr.data-type=\"{{case.result.datatype}}\"\r\n attr.data-restriction=\"{{case.result.restriction}}\">\r\n </div>\r\n <div *ngIf=\"case.result.type=='textarea'\">\r\n <textarea type=\"text\" id=\"{{case.result.id}}\"\r\n class=\"form-control search-form-control\" name=\"{{case.result.name}}\"\r\n attr.data-type=\"{{case.result.datatype}}\" value=\"{{case.result.value}}\"></textarea>\r\n </div>\r\n <div *ngIf=\"case.result.type=='numeric'\">\r\n <input type=\"text\" id=\"{{case.result.id}}\"\r\n (focus)=\"transformToDecimal($event)\" (blur)=\"transformAmount($event)\"\r\n class=\"form-control search-form-control\" name=\"{{case.result.name}}\"\r\n value=\"{{case.result.value}}\" (keydown.enter)=\"searchClick()\"\r\n attr.data-restriction=\"{{case.result.restriction}}\" attr.data-type=\"{{case.result.datatype}}\">\r\n </div>\r\n <div *ngIf=\"case.result.type=='datepicker'\">\r\n <input type=\"date\" id=\"{{case.result.id}}\"\r\n class=\"form-control search-form-control btn-lookup\" name=\"{{case.result.name}}\"\r\n value=\"{{case.result.value}}\" attr.data-type=\"{{case.result.datatype}}\"\r\n (keydown.enter)=\"searchClick()\" attr.data-restriction=\"{{case.result.restriction}}\">\r\n </div>\r\n <div *ngIf=\"case.result.type=='dropdown'\">\r\n <div *ngIf=\"!case.result.isFromURL\">\r\n <label class=\"col-md-5 no-padding\" for=\"{{case.result.id}}\"\r\n translate>{{case.result.label}}</label>\r\n <select name=\"{{case.result.name}}\"\r\n class=\"form-control search-form-control\" attr.query-in=\"{{case.result.isQueryIn}}\"\r\n attr.data-type=\"{{case.result.datatype}}\">\r\n <option *ngIf=\"!case.result.isSelectOne\" value=\"All\">\r\n All\r\n </option>\r\n <option *ngFor=\"let item of case.result?.items\" value=\"{{item.key}}\">\r\n {{item.value}}\r\n </option>\r\n </select>\r\n </div>\r\n <!-- Ini kalau datanya di load dari URL -->\r\n <div *ngIf=\"case.result.isFromURL\">\r\n <div *ngIf=\"case.result.isEvent\">\r\n <label class=\"col-md-5 no-padding\" for=\"{{case.result.id}}\"\r\n translate>{{case.result.label}}</label>\r\n <select name=\"{{case.result.name}}\"\r\n (change)=\"onChangeEvent($event.target.value, case.result)\"\r\n class=\"form-control search-form-control\" attr.query-in=\"{{case.result.isQueryIn}}\"\r\n attr.data-type=\"{{case.result.datatype}}\">\r\n <option *ngIf=\"!case.result.isSelectOne\" value=\"All\">\r\n All\r\n </option>\r\n <option *ngFor=\"let item of case.result?.itemsUrl\" value=\"{{item.Key}}\">\r\n {{item.Value}}\r\n </option>\r\n </select>\r\n </div>\r\n <div *ngIf=\"!case.result.isEvent\">\r\n <label class=\"col-md-5 no-padding\" for=\"{{case.result.id}}\"\r\n translate>{{case.result.label}}</label>\r\n <select name=\"{{case.result.name}}\"\r\n class=\"form-control search-form-control\" attr.query-in=\"{{case.result.isQueryIn}}\"\r\n attr.data-type=\"{{case.result.datatype}}\">\r\n <option *ngIf=\"!case.result.isSelectOne\" value=\"All\">\r\n All\r\n </option>\r\n <option *ngFor=\"let item of case.result?.itemsUrl\" value=\"{{item.Key}}\">\r\n {{item.Value}}\r\n </option>\r\n </select>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-md-12 no-padding\">\r\n <form>\r\n <div class=\"form-actions right\">\r\n <button *ngIf=\"exportData == true\" type=\"button\" (click)=\"exportAsXLSX()\"\r\n class=\"btn btn-raised btn-success mr-1\" translate>\r\n <i class=\"fa ft-download\"></i> Export Excel\r\n </button>\r\n <button type=\"button\" (click)=\"reset()\" class=\"btn btn-raised btn-warning mr-1\" translate>\r\n <i class=\"fa fa-times\"></i> Reset\r\n </button>\r\n <button type=\"button\" (click)=\"searchClick()\" class=\"btn btn-raised btn-primary\" #UCSearchClick\r\n translate>\r\n <i class=\"fa fa-search\"></i> Search\r\n </button>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</section>\r\n<br>\r\n<!-- // Basic form layout section end -->","styles":[".ucSearch-title{margin:3px}"]}]}],"members":{"myForm":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":36,"character":3},"arguments":["formIdSearch"]}]}],"searchInput":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":37,"character":3}}]}],"pageSize":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":38,"character":3}}]}],"result":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":39,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":55,"character":108},"arguments":[{"__symbolic":"reference","module":"@angular/platform-browser","name":"DOCUMENT","line":55,"character":115}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":55,"character":28},{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2","line":55,"character":96},null]}],"changeState":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}],"initiateForm":[{"__symbolic":"method"}],"getJSON":[{"__symbolic":"method"}],"postJSON":[{"__symbolic":"method"}],"searchClick":[{"__symbolic":"method"}],"reset":[{"__symbolic":"method"}],"search":[{"__symbolic":"method"}],"lessThanFour":[{"__symbolic":"method"}],"resolveObject":[{"__symbolic":"method"}],"transformAmount":[{"__symbolic":"method"}],"transformToDecimal":[{"__symbolic":"method"}],"exportAsXLSX":[{"__symbolic":"method"}],"onChangeEvent":[{"__symbolic":"method"}],"switchCase":[{"__symbolic":"method"}]}},"UCSearchModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":4,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"UCSearchComponent"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":7,"character":4}],"exports":[{"__symbolic":"reference","name":"UCSearchComponent"}]}]}],"members":{}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":7,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"exportAsExcelFile":[{"__symbolic":"method"}],"saveAsExcelFile":[{"__symbolic":"method"}]}}},"origins":{"UCSearchService":"./lib/ucsearch.service","UCSearchComponent":"./lib/ucsearch.component","UCSearchModule":"./lib/ucsearch.module","ɵa":"./lib/services/excel-service/excel-service"},"importAs":"@adins/ucsearch"}
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
this.addCritInput = new Array();
|
|
37
37
|
this.ddlEnvironments = new Array();
|
|
38
38
|
this.whereValue = new Array();
|
|
39
|
+
this.switchValue = new Array();
|
|
39
40
|
}
|
|
40
41
|
return InputSearchObj;
|
|
41
42
|
}());
|
|
@@ -411,7 +412,7 @@
|
|
|
411
412
|
/** @type {?} */
|
|
412
413
|
var ddl = component.options;
|
|
413
414
|
/** @type {?} */
|
|
414
|
-
var text = ddl[ddl.selectedIndex].value;
|
|
415
|
+
var text = ddl[ddl.selectedIndex].value.trim();
|
|
415
416
|
if (text != "All") {
|
|
416
417
|
//Kalau Dari Dropdown udah pasti pake Eq
|
|
417
418
|
critObj.restriction = AdInsConstant.RestrictionEq;
|
|
@@ -438,7 +439,7 @@
|
|
|
438
439
|
else {
|
|
439
440
|
//Kalau ada Percent maka yang dipake nnti adalah Restrictions Like
|
|
440
441
|
critObj.propName = component.name;
|
|
441
|
-
critObj.value = component.value;
|
|
442
|
+
critObj.value = component.value.trim();
|
|
442
443
|
if (component.value.includes("%")) {
|
|
443
444
|
critObj.restriction = AdInsConstant.RestrictionLike;
|
|
444
445
|
}
|
|
@@ -449,7 +450,7 @@
|
|
|
449
450
|
component.value = parseFloat(component.value.replace(/,/g, ''));
|
|
450
451
|
}
|
|
451
452
|
if (critObj.restriction.toUpperCase() == "LIKE") {
|
|
452
|
-
critObj.value = "%" + component.value + "%";
|
|
453
|
+
critObj.value = "%" + component.value.trim() + "%";
|
|
453
454
|
critObj.restriction = AdInsConstant.RestrictionLike;
|
|
454
455
|
}
|
|
455
456
|
}
|
|
@@ -635,10 +636,162 @@
|
|
|
635
636
|
}
|
|
636
637
|
}
|
|
637
638
|
};
|
|
639
|
+
/**
|
|
640
|
+
* @param {?} condList
|
|
641
|
+
* @return {?}
|
|
642
|
+
*/
|
|
643
|
+
UCSearchComponent.prototype.switchCase = /**
|
|
644
|
+
* @param {?} condList
|
|
645
|
+
* @return {?}
|
|
646
|
+
*/
|
|
647
|
+
function (condList) {
|
|
648
|
+
/** @type {?} */
|
|
649
|
+
var condition = false;
|
|
650
|
+
for (var i = 0; i < condList.conditions.length; i++) {
|
|
651
|
+
/** @type {?} */
|
|
652
|
+
var idx = this.searchInput.switchValue.findIndex(( /**
|
|
653
|
+
* @param {?} x
|
|
654
|
+
* @return {?}
|
|
655
|
+
*/function (x) { return x.property == condList.conditions[i].property; }));
|
|
656
|
+
if (condList.conditions[i].restriction == "EQ") {
|
|
657
|
+
if (condList.conditions[i].isUser != true) {
|
|
658
|
+
if (this.searchInput.switchValue[idx].value == condList.conditions[i].value) {
|
|
659
|
+
condition = true;
|
|
660
|
+
}
|
|
661
|
+
else {
|
|
662
|
+
condition = false;
|
|
663
|
+
break;
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
else {
|
|
667
|
+
/** @type {?} */
|
|
668
|
+
var username = localStorage.getItem("Username");
|
|
669
|
+
if (this.searchInput.switchValue[idx].value == username) {
|
|
670
|
+
condition = true;
|
|
671
|
+
}
|
|
672
|
+
else {
|
|
673
|
+
condition = false;
|
|
674
|
+
break;
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
else if (condList.conditions[i].restriction == "NEQ") {
|
|
679
|
+
if (condList.conditions[i].isUser != true) {
|
|
680
|
+
if (this.searchInput.switchValue[idx].value != condList.conditions[i].value) {
|
|
681
|
+
condition = true;
|
|
682
|
+
}
|
|
683
|
+
else {
|
|
684
|
+
condition = false;
|
|
685
|
+
break;
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
else {
|
|
689
|
+
/** @type {?} */
|
|
690
|
+
var username = localStorage.getItem("Username");
|
|
691
|
+
if (this.searchInput.switchValue[idx].value != username) {
|
|
692
|
+
condition = true;
|
|
693
|
+
}
|
|
694
|
+
else {
|
|
695
|
+
condition = false;
|
|
696
|
+
break;
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
else if (condList.conditions[i].restriction == "GT") {
|
|
701
|
+
if (condList.conditions[i].isUser != true) {
|
|
702
|
+
if (this.searchInput.switchValue[idx].value > condList.conditions[i].value) {
|
|
703
|
+
condition = true;
|
|
704
|
+
}
|
|
705
|
+
else {
|
|
706
|
+
condition = false;
|
|
707
|
+
break;
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
else {
|
|
711
|
+
/** @type {?} */
|
|
712
|
+
var username = localStorage.getItem("Username");
|
|
713
|
+
if (this.searchInput.switchValue[idx].value > username) {
|
|
714
|
+
condition = true;
|
|
715
|
+
}
|
|
716
|
+
else {
|
|
717
|
+
condition = false;
|
|
718
|
+
break;
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
else if (condList.conditions[i].restriction == "GTE") {
|
|
723
|
+
if (condList.conditions[i].isUser != true) {
|
|
724
|
+
if (this.searchInput.switchValue[idx].value >= condList.conditions[i].value) {
|
|
725
|
+
condition = true;
|
|
726
|
+
}
|
|
727
|
+
else {
|
|
728
|
+
condition = false;
|
|
729
|
+
break;
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
else {
|
|
733
|
+
/** @type {?} */
|
|
734
|
+
var username = localStorage.getItem("Username");
|
|
735
|
+
if (this.searchInput.switchValue[idx].value >= username) {
|
|
736
|
+
condition = true;
|
|
737
|
+
}
|
|
738
|
+
else {
|
|
739
|
+
condition = false;
|
|
740
|
+
break;
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
else if (condList.conditions[i].restriction == "LT") {
|
|
745
|
+
if (condList.conditions[i].isUser != true) {
|
|
746
|
+
if (this.searchInput.switchValue[idx].value < condList.conditions[i].value) {
|
|
747
|
+
condition = true;
|
|
748
|
+
}
|
|
749
|
+
else {
|
|
750
|
+
condition = false;
|
|
751
|
+
break;
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
else {
|
|
755
|
+
/** @type {?} */
|
|
756
|
+
var username = localStorage.getItem("Username");
|
|
757
|
+
if (this.searchInput.switchValue[idx].value < username) {
|
|
758
|
+
condition = true;
|
|
759
|
+
}
|
|
760
|
+
else {
|
|
761
|
+
condition = false;
|
|
762
|
+
break;
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
else if (condList.conditions[i].restriction == "LTE") {
|
|
767
|
+
if (condList.conditions[i].isUser != true) {
|
|
768
|
+
if (this.searchInput.switchValue[idx].value <= condList.conditions[i].value) {
|
|
769
|
+
condition = true;
|
|
770
|
+
}
|
|
771
|
+
else {
|
|
772
|
+
condition = false;
|
|
773
|
+
break;
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
else {
|
|
777
|
+
/** @type {?} */
|
|
778
|
+
var username = localStorage.getItem("Username");
|
|
779
|
+
if (this.searchInput.switchValue[idx].value <= username) {
|
|
780
|
+
condition = true;
|
|
781
|
+
}
|
|
782
|
+
else {
|
|
783
|
+
condition = false;
|
|
784
|
+
break;
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
return condition;
|
|
790
|
+
};
|
|
638
791
|
UCSearchComponent.decorators = [
|
|
639
792
|
{ type: i0.Component, args: [{
|
|
640
793
|
selector: 'lib-UCSearch',
|
|
641
|
-
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>\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\">\r\n <div class=\"col-md-12\">\r\n <div class=\"row\">\r\n <label class=\"col-md-5 no-padding\" for=\"{{question.id}}\" 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 name=\"{{question.name}}\" value=\"{{question.value}}\"\r\n attr.data-type=\"{{question.datatype}}\" attr.data-restriction=\"{{question.restriction}}\">\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 name=\"{{question.name}}\" attr.data-type=\"{{question.datatype}}\"\r\n value=\"{{question.value}}\"></textarea>\r\n </div>\r\n <div *ngIf=\"question.type=='numeric'\">\r\n <input type=\"text\" id=\"{{question.id}}\" (focus)=\"transformToDecimal($event)\"\r\n (blur)=\"transformAmount($event)\" class=\"form-control search-form-control\"\r\n name=\"{{question.name}}\" value=\"{{question.value}}\"\r\n attr.data-restriction=\"{{question.restriction}}\" attr.data-type=\"{{question.datatype}}\">\r\n </div>\r\n\r\n <!-- End Hardcode Lookup didalem-->\r\n <div *ngIf=\"question.type=='datepicker'\">\r\n <input type=\"date\" id=\"{{question.id}}\"\r\n class=\"form-control search-form-control btn-lookup\" name=\"{{question.name}}\"\r\n value=\"{{question.value}}\" attr.data-type=\"{{question.datatype}}\"\r\n attr.data-restriction=\"{{question.restriction}}\">\r\n </div>\r\n <div *ngIf=\"question.type=='dropdown'\">\r\n <!-- Ini kalau datanya tidak di load dari URL -->\r\n <div *ngIf=\"!question.isFromURL\">\r\n <select name=\"{{question.name}}\" class=\"form-control search-form-control\"\r\n attr.query-in=\"{{question.isQueryIn}}\" attr.data-type=\"{{question.datatype}}\">\r\n <option *ngIf=\"!question.isSelectOne\" value=\"All\">\r\n All\r\n </option>\r\n <option *ngFor=\"let item of question?.items\" value=\"{{item.key}}\">\r\n {{item.value}}\r\n </option>\r\n </select>\r\n </div>\r\n <!-- Ini kalau datanya di load dari URL -->\r\n <div *ngIf=\"question.isFromURL\">\r\n <div *ngIf=\"question.isEvent\">\r\n <select name=\"{{question.name}}\"\r\n (change)=\"onChangeEvent($event.target.value, question)\"\r\n class=\"form-control search-form-control\" attr.query-in=\"{{question.isQueryIn}}\"\r\n attr.data-type=\"{{question.datatype}}\">\r\n <option *ngIf=\"!question.isSelectOne\" value=\"All\">\r\n All\r\n </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 </div>\r\n <div *ngIf=\"!question.isEvent\">\r\n <select name=\"{{question.name}}\" class=\"form-control search-form-control\"\r\n attr.query-in=\"{{question.isQueryIn}}\" attr.data-type=\"{{question.datatype}}\">\r\n <option *ngIf=\"!question.isSelectOne\" value=\"All\">\r\n All\r\n </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 </div>\r\n </div>\r\n </div>\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 <form>\r\n <div class=\"form-actions right\">\r\n <button *ngIf=\"exportData == true\" type=\"button\" (click)=\"exportAsXLSX()\"\r\n class=\"btn btn-raised btn-success mr-1\" translate>\r\n <i class=\"fa ft-download\"></i> Export Excel\r\n </button>\r\n <button type=\"button\" (click)=\"reset()\" class=\"btn btn-raised btn-warning mr-1\" translate>\r\n <i class=\"fa fa-times\"></i> Reset\r\n </button>\r\n <button type=\"button\" (click)=\"searchClick()\" class=\"btn btn-raised btn-primary\" #UCSearchClick\r\n translate>\r\n <i class=\"fa fa-search\"></i> Search\r\n </button>\r\n </div>\r\n </form>\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 -->",
|
|
794
|
+
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>\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\">\r\n <div class=\"col-md-12\">\r\n <div class=\"row\">\r\n <div *ngIf=\"question.type=='textbox'\">\r\n <label class=\"col-md-5 no-padding\" for=\"{{question.id}}\"\r\n translate>{{question.label}}</label>\r\n <input class=\"col-md-7 no-padding\" type=\"text\" id=\"{{question.id}}\"\r\n class=\"form-control search-form-control\" name=\"{{question.name}}\"\r\n value=\"{{question.value}}\" (keydown.enter)=\"searchClick()\"\r\n attr.data-type=\"{{question.datatype}}\" attr.data-restriction=\"{{question.restriction}}\">\r\n </div>\r\n <div *ngIf=\"question.type=='textarea'\">\r\n <label class=\"col-md-5 no-padding\" for=\"{{question.id}}\"\r\n translate>{{question.label}}</label>\r\n <textarea class=\"col-md-7 no-padding\" type=\"text\" id=\"{{question.id}}\"\r\n class=\"form-control search-form-control\" name=\"{{question.name}}\"\r\n attr.data-type=\"{{question.datatype}}\" value=\"{{question.value}}\"></textarea>\r\n </div>\r\n <div *ngIf=\"question.type=='numeric'\">\r\n <label class=\"col-md-5 no-padding\" for=\"{{question.id}}\"\r\n translate>{{question.label}}</label>\r\n <input class=\"col-md-7 no-padding\" type=\"text\" id=\"{{question.id}}\"\r\n (focus)=\"transformToDecimal($event)\" (blur)=\"transformAmount($event)\"\r\n class=\"form-control search-form-control\" name=\"{{question.name}}\"\r\n value=\"{{question.value}}\" (keydown.enter)=\"searchClick()\"\r\n attr.data-restriction=\"{{question.restriction}}\" attr.data-type=\"{{question.datatype}}\">\r\n </div>\r\n\r\n <!-- End Hardcode Lookup didalem-->\r\n <div *ngIf=\"question.type=='datepicker'\">\r\n <label class=\"col-md-5 no-padding\" for=\"{{question.id}}\"\r\n translate>{{question.label}}</label>\r\n <input class=\"col-md-7 no-padding\" type=\"date\" id=\"{{question.id}}\"\r\n class=\"form-control search-form-control btn-lookup\" name=\"{{question.name}}\"\r\n value=\"{{question.value}}\" attr.data-type=\"{{question.datatype}}\"\r\n (keydown.enter)=\"searchClick()\" attr.data-restriction=\"{{question.restriction}}\">\r\n </div>\r\n <div *ngIf=\"question.type=='dropdown'\">\r\n <!-- Ini kalau datanya tidak di load dari URL -->\r\n <div *ngIf=\"!question.isFromURL\">\r\n <label class=\"col-md-5 no-padding\" for=\"{{question.id}}\"\r\n translate>{{question.label}}</label>\r\n <select class=\"col-md-7 no-padding\" name=\"{{question.name}}\"\r\n class=\"form-control search-form-control\" attr.query-in=\"{{question.isQueryIn}}\"\r\n attr.data-type=\"{{question.datatype}}\">\r\n <option *ngIf=\"!question.isSelectOne\" value=\"All\">\r\n All\r\n </option>\r\n <option *ngFor=\"let item of question?.items\" value=\"{{item.key}}\">\r\n {{item.value}}\r\n </option>\r\n </select>\r\n </div>\r\n <!-- Ini kalau datanya di load dari URL -->\r\n <div *ngIf=\"question.isFromURL\">\r\n <div *ngIf=\"question.isEvent\">\r\n <label class=\"col-md-5 no-padding\" for=\"{{question.id}}\"\r\n translate>{{question.label}}</label>\r\n <select class=\"col-md-7 no-padding\" name=\"{{question.name}}\"\r\n (change)=\"onChangeEvent($event.target.value, question)\"\r\n class=\"form-control search-form-control\" attr.query-in=\"{{question.isQueryIn}}\"\r\n attr.data-type=\"{{question.datatype}}\">\r\n <option *ngIf=\"!question.isSelectOne\" value=\"All\">\r\n All\r\n </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 </div>\r\n <div *ngIf=\"!question.isEvent\">\r\n <label class=\"col-md-5 no-padding\" for=\"{{question.id}}\"\r\n translate>{{question.label}}</label>\r\n <select class=\"col-md-7 no-padding\" name=\"{{question.name}}\"\r\n class=\"form-control search-form-control\" attr.query-in=\"{{question.isQueryIn}}\"\r\n attr.data-type=\"{{question.datatype}}\">\r\n <option *ngIf=\"!question.isSelectOne\" value=\"All\">\r\n All\r\n </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 </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"question.type=='switch'\">\r\n <div *ngFor=\"let case of question.case\">\r\n <div *ngIf=\"switchCase(case) && case.isHide != true\">\r\n <label class=\"col-md-5 no-padding\" for=\"{{case.result.id}}\" translate> {{\r\n case.result.label }} </label>\r\n </div>\r\n <div class=\"col-md-7 no-padding\">\r\n <div *ngIf=\"case.result.type=='textbox'\">\r\n <input type=\"text\" id=\"{{case.result.id}}\" class=\"form-control search-form-control\"\r\n name=\"{{case.result.name}}\" value=\"{{case.result.value}}\" (keydown.enter)=\"searchClick()\"\r\n attr.data-type=\"{{case.result.datatype}}\"\r\n attr.data-restriction=\"{{case.result.restriction}}\">\r\n </div>\r\n <div *ngIf=\"case.result.type=='textarea'\">\r\n <textarea type=\"text\" id=\"{{case.result.id}}\"\r\n class=\"form-control search-form-control\" name=\"{{case.result.name}}\"\r\n attr.data-type=\"{{case.result.datatype}}\" value=\"{{case.result.value}}\"></textarea>\r\n </div>\r\n <div *ngIf=\"case.result.type=='numeric'\">\r\n <input type=\"text\" id=\"{{case.result.id}}\"\r\n (focus)=\"transformToDecimal($event)\" (blur)=\"transformAmount($event)\"\r\n class=\"form-control search-form-control\" name=\"{{case.result.name}}\"\r\n value=\"{{case.result.value}}\" (keydown.enter)=\"searchClick()\"\r\n attr.data-restriction=\"{{case.result.restriction}}\" attr.data-type=\"{{case.result.datatype}}\">\r\n </div>\r\n <div *ngIf=\"case.result.type=='datepicker'\">\r\n <input type=\"date\" id=\"{{case.result.id}}\"\r\n class=\"form-control search-form-control btn-lookup\" name=\"{{case.result.name}}\"\r\n value=\"{{case.result.value}}\" attr.data-type=\"{{case.result.datatype}}\"\r\n (keydown.enter)=\"searchClick()\" attr.data-restriction=\"{{case.result.restriction}}\">\r\n </div>\r\n <div *ngIf=\"case.result.type=='dropdown'\">\r\n <div *ngIf=\"!case.result.isFromURL\">\r\n <label class=\"col-md-5 no-padding\" for=\"{{case.result.id}}\"\r\n translate>{{case.result.label}}</label>\r\n <select name=\"{{case.result.name}}\"\r\n class=\"form-control search-form-control\" attr.query-in=\"{{case.result.isQueryIn}}\"\r\n attr.data-type=\"{{case.result.datatype}}\">\r\n <option *ngIf=\"!case.result.isSelectOne\" value=\"All\">\r\n All\r\n </option>\r\n <option *ngFor=\"let item of case.result?.items\" value=\"{{item.key}}\">\r\n {{item.value}}\r\n </option>\r\n </select>\r\n </div>\r\n <!-- Ini kalau datanya di load dari URL -->\r\n <div *ngIf=\"case.result.isFromURL\">\r\n <div *ngIf=\"case.result.isEvent\">\r\n <label class=\"col-md-5 no-padding\" for=\"{{case.result.id}}\"\r\n translate>{{case.result.label}}</label>\r\n <select name=\"{{case.result.name}}\"\r\n (change)=\"onChangeEvent($event.target.value, case.result)\"\r\n class=\"form-control search-form-control\" attr.query-in=\"{{case.result.isQueryIn}}\"\r\n attr.data-type=\"{{case.result.datatype}}\">\r\n <option *ngIf=\"!case.result.isSelectOne\" value=\"All\">\r\n All\r\n </option>\r\n <option *ngFor=\"let item of case.result?.itemsUrl\" value=\"{{item.Key}}\">\r\n {{item.Value}}\r\n </option>\r\n </select>\r\n </div>\r\n <div *ngIf=\"!case.result.isEvent\">\r\n <label class=\"col-md-5 no-padding\" for=\"{{case.result.id}}\"\r\n translate>{{case.result.label}}</label>\r\n <select name=\"{{case.result.name}}\"\r\n class=\"form-control search-form-control\" attr.query-in=\"{{case.result.isQueryIn}}\"\r\n attr.data-type=\"{{case.result.datatype}}\">\r\n <option *ngIf=\"!case.result.isSelectOne\" value=\"All\">\r\n All\r\n </option>\r\n <option *ngFor=\"let item of case.result?.itemsUrl\" value=\"{{item.Key}}\">\r\n {{item.Value}}\r\n </option>\r\n </select>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-md-12 no-padding\">\r\n <form>\r\n <div class=\"form-actions right\">\r\n <button *ngIf=\"exportData == true\" type=\"button\" (click)=\"exportAsXLSX()\"\r\n class=\"btn btn-raised btn-success mr-1\" translate>\r\n <i class=\"fa ft-download\"></i> Export Excel\r\n </button>\r\n <button type=\"button\" (click)=\"reset()\" class=\"btn btn-raised btn-warning mr-1\" translate>\r\n <i class=\"fa fa-times\"></i> Reset\r\n </button>\r\n <button type=\"button\" (click)=\"searchClick()\" class=\"btn btn-raised btn-primary\" #UCSearchClick\r\n translate>\r\n <i class=\"fa fa-search\"></i> Search\r\n </button>\r\n </div>\r\n </form>\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 -->",
|
|
642
795
|
providers: [ExcelService],
|
|
643
796
|
animations: [
|
|
644
797
|
animations.trigger('changeDivSize', [
|