@adins/ucsearch 2.2.38 → 2.2.39
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 +26 -0
- package/adins-ucsearch.metadata.json +1 -1
- package/bundles/adins-ucsearch.umd.js +75 -1
- 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/ucsearch.component.js +66 -2
- package/esm5/lib/ucsearch.component.js +76 -2
- package/fesm2015/adins-ucsearch.js +64 -1
- package/fesm2015/adins-ucsearch.js.map +1 -1
- package/fesm5/adins-ucsearch.js +74 -1
- package/fesm5/adins-ucsearch.js.map +1 -1
- package/lib/ucsearch.component.d.ts +2 -0
- package/package.json +2 -2
|
@@ -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/core"),require("@angular/common"),require("@angular/forms"),require("ngx-currency"),require("@ngx-translate/core"),require("@adins/uc-show-errors"),require("@adins/uc-directive-upper-case")):"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/core","@angular/common","@angular/forms","ngx-currency","@ngx-translate/core","@adins/uc-show-errors","@adins/uc-directive-upper-case"],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.core,e.ng.common,e.ng.forms,e.ngxCurrency,e.core,e.ucShowErrors,e.ucDirectiveUpperCase)}(this,function(e,t,n,i,o,r,a,s,l,u,f,c,d,p,m,h){"use strict";var g=(v.decorators=[{type:u.Injectable,args:[{providedIn:"root"}]}],v.ctorParameters=function(){return[]},v.ngInjectableDef=u.defineInjectable({factory:function(){return new v},token:v,providedIn:"root"}),v);function v(){}var q=(y.RestrictionBetween="Between",y.RestrictionLike="Like",y.RestrictionEq="Eq",y.RestrictionNeq="NEQ",y.RestrictionGt="GT",y.RestrictionGte="GTE",y.RestrictionLt="LT",y.RestrictionLte="LTE",y.RestrictionIn="IN",y.RestrictionNotIn="NotIn",y.RestrictionOr="Or",y.RestrictionOrNeq="OrNeq",y.RestrictionIsNull="ISNULL",y.RestrictionIsNotNull="ISNOTNULL",y.RestrictionGTE="GTE",y.RestrictionLTE="LTE",y.showData="10,50,100",y.JoinTypeInner="INNER",y.JoinTypeLeft="LEFT",y);function y(){}var b=function M(){this.baseUrl="",this.apiPath="",this.requestObj=new Object,this.leftColumnToJoin="",this.rightColumnToJoin="",this.joinType=q.JoinTypeInner},I=function R(){this._url="",this.enviromentUrl="",this.title="",this.apiQryPaging="",this.arrCritObj=null,this.addCritInput=new Array,this.ddlEnvironments=new Array,this.listEnvironments=new Array,this.whereValue=new Array,this.switchValue=new Array,this.integrationObj=new b,this.isJoinExAPI=!1},E=function O(){this.low=0,this.high=0,this.DataType="Text",this.isCriteriaDataTable=!1},w=function A(){this.includeCount=!0,this.includeData=!0,this.isLoading=!0,this.queryString="",this.rowVersion="",this.integrationObj=new b,this.joinType=q.JoinTypeInner},x=(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:u.Injectable}],T.ctorParameters=function(){return[]},T);function T(){}var F=(D.EXP_TYPE_PDF=0,D.EXP_TYPE_XLS=1,D.EXP_TYPE_XLSX=2,D.EXP_TYPE_DOC=3,D.EXP_TYPE_DOCX=4,D);function D(){}var C=function N(){this.ListOfMonth=new Array,this.ListOfMonth.push({key:1,value:"January"}),this.ListOfMonth.push({key:2,value:"February"}),this.ListOfMonth.push({key:3,value:"March"}),this.ListOfMonth.push({key:4,value:"April"}),this.ListOfMonth.push({key:5,value:"May"}),this.ListOfMonth.push({key:6,value:"June"}),this.ListOfMonth.push({key:7,value:"July"}),this.ListOfMonth.push({key:8,value:"August"}),this.ListOfMonth.push({key:9,value:"September"}),this.ListOfMonth.push({key:10,value:"October"}),this.ListOfMonth.push({key:11,value:"November"}),this.ListOfMonth.push({key:12,value:"December"})},k=(Object.defineProperty(L.prototype,"content",{set:function(e){e&&(this.searchForm=e)},enumerable:!0,configurable:!0}),L.prototype.changeState=function(){this.currentState="initial"===this.currentState?"final":"initial",this.isHidden=!1===this.isHidden},L.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()},L.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 w,i=new Array,r=new E;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.ddlEnvironments!=undefined&&0!=h.searchInput.ddlEnvironments.length){for(var o=0;o<h.searchInput.ddlEnvironments.length;o++)if(t.component[e].name==h.searchInput.ddlEnvironments[o].name){t.component[e].fullpath=h.searchInput.ddlEnvironments[o].environment+t.component[e].path;break}}else if(h.searchInput.listEnvironments!=undefined&&0!=h.searchInput.listEnvironments.length){for(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&&("month"==t.component[e].dtmType&&(t.component[e].value!=undefined&&t.component[e].value.includes("BD")&&(t.component[e].value=h.BusinessDt.getMonth()+1),t.component[e].items=h.ListOfMonth.ListOfMonth),t.component[e].dtmType.includes("year")&&(t.component[e].value!=undefined&&t.component[e].value.includes("BD")&&(t.component[e].value=h.BusinessDt.getFullYear()),t.component[e].items=h.setYearDDL(t.component[e].dtmType))),"datepicker"==t.component[e].type){if(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(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])},1e3)})},L.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},L.prototype.getJSON=function(e){return this.http.get(e)},L.prototype.postJSON=function(e,t){return void 0===t&&(t=null),this.http.post(e,t)},L.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)},L.prototype.reset=function(){this.searchForm.resetForm(),this.ExportType=this.ExportTypeList[0].key,this.initiateForm()},L.prototype.search=function(e,n,t,i,r){var o=this;void 0===r&&(r=new Array);var a=new w,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)}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 E,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 g=m.getAttribute("label");this.toastr.warning("Please select "+g);break}if("claim"==this.configuration.component[d].type)p.propName=m.getAttribute("data-name"),p.restriction=f,p.value=null,""!=m.getAttribute("data-crit-datatable")&&null!=m.getAttribute("data-crit-datatable")&&(p.isCriteriaDataTable=m.getAttribute("data-crit-datatable")),s.push(p);else if("all"!=f&&"one"!=f)p.restriction=q.RestrictionEq,""!=m.name?p.propName=m.name:p.propName=m.getAttribute("ng-reflect-name"),p.value=f,s.push(p);else if("all"==f&&1==l&&0!=m.options.length){var v=new Array;for(c=0;c<m.options.length;c++)0!=c&&v.push(m.options[c].value);0!=v.length&&(p.restriction=q.RestrictionIn,""!=m.name?p.propName=m.name:p.propName=m.getAttribute("ng-reflect-name"),p.listValue=v,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=q.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=q.RestrictionLike)):p.restriction=q.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(var y=0;y<r.length;y++)s.push(r[y]);else if(null!=this.searchInput.addCritInput||this.searchInput.addCritInput!=undefined)for(y=0;y<this.searchInput.addCritInput.length;y++)s.push(this.searchInput.addCritInput[y])}else if(null!=this.searchInput.addCritInput||this.searchInput.addCritInput!=undefined)for(y=0;y<this.searchInput.addCritInput.length;y++)s.push(this.searchInput.addCritInput[y]);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),e})}},L.prototype.GenerateReport=function(){this.genRpt.emit({ExportType:this.ExportType,ElRef:this.myForm})},L.prototype.lessThanFour=function(){return!(3<this.countForm)},L.prototype.resolveObject=function(t,e,n){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)}))})},L.prototype.transformAmount=function(e){this.formattedAmount=parseFloat(e.target.value).toLocaleString("en"),e.target.value=this.formattedAmount},L.prototype.transformToDecimal=function(e){e.target.value=parseFloat(e.target.value.toString().replace(/,/g,""))},L.prototype.exportAsXLSX=function(){var t=this,e=new w;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)})},L.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 w,a=new Array;if("all"!=e&&"one"!=e){var s=new E;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=q.RestrictionEq,a.push(s)}if(o.criteria=a,n[r].path!=undefined&&""!=n[r].path)if(this.searchInput.ddlEnvironments!=undefined&&0!=this.searchInput.ddlEnvironments.length){for(var l=0;l<this.searchInput.ddlEnvironments.length;l++)if(n[r].name==this.searchInput.ddlEnvironments[l].name){n[r].fullpath=this.searchInput.ddlEnvironments[l].environment+n[r].path;break}}else if(this.searchInput.listEnvironments!=undefined&&0!=this.searchInput.listEnvironments.length){for(l=0;l<this.searchInput.listEnvironments.length;l++)if(n.component[r].environment==this.searchInput.listEnvironments[l].environment){n.component[r].fullpath=this.searchInput.listEnvironments[l].url+n.component[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)}},L.prototype.switchCase=function(t){for(var e=!1,n=0;n<t.conditions.length;n++){var i=this.searchInput.switchValue.findIndex(function(e){return e.property==t.conditions[n].property});if("EQ"==t.conditions[n].restriction)if(1!=t.conditions[n].isUser){if(this.searchInput.switchValue[i].value!=t.conditions[n].value){e=!1;break}e=!0}else{var r=localStorage.getItem("Username");if(this.searchInput.switchValue[i].value!=r){e=!1;break}e=!0}else if("NEQ"==t.conditions[n].restriction)if(1!=t.conditions[n].isUser){if(this.searchInput.switchValue[i].value==t.conditions[n].value){e=!1;break}e=!0}else{if(r=localStorage.getItem("Username"),this.searchInput.switchValue[i].value==r){e=!1;break}e=!0}else if("GT"==t.conditions[n].restriction)if(1!=t.conditions[n].isUser){if(!(this.searchInput.switchValue[i].value>t.conditions[n].value)){e=!1;break}e=!0}else{if(r=localStorage.getItem("Username"),!(this.searchInput.switchValue[i].value>r)){e=!1;break}e=!0}else if("GTE"==t.conditions[n].restriction)if(1!=t.conditions[n].isUser){if(!(this.searchInput.switchValue[i].value>=t.conditions[n].value)){e=!1;break}e=!0}else{if(r=localStorage.getItem("Username"),!(this.searchInput.switchValue[i].value>=r)){e=!1;break}e=!0}else if("LT"==t.conditions[n].restriction)if(1!=t.conditions[n].isUser){if(!(this.searchInput.switchValue[i].value<t.conditions[n].value)){e=!1;break}e=!0}else{if(r=localStorage.getItem("Username"),!(this.searchInput.switchValue[i].value<r)){e=!1;break}e=!0}else if("LTE"==t.conditions[n].restriction)if(1!=t.conditions[n].isUser){if(!(this.searchInput.switchValue[i].value<=t.conditions[n].value)){e=!1;break}e=!0}else{if(r=localStorage.getItem("Username"),!(this.searchInput.switchValue[i].value<=r)){e=!1;break}e=!0}}return e},L.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)},L.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},L.decorators=[{type:u.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" [ngModel]="question.value"\r\n [required]="question.isRequired" name="{{question.name}}" 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}}" attr.label="{{question.label}}"\r\n [ngClass]="{ \'is-invalid\':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }">\r\n </div>\r\n <div *ngIf="question.type==\'textarea\'">\r\n <textarea type="text" id="{{question.id}}" class="form-control search-form-control" [ngModel]="question.value"\r\n [required]="question.isRequired" name="{{question.name}}" attr.data-required="{{question.isRequired}}"\r\n attr.data-type="{{question.datatype}}" attr.data-name="{{question.name}}"\r\n value="{{question.value}}" attr.label="{{question.label}}"\r\n [ngClass]="{ \'is-invalid\':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }"></textarea>\r\n </div>\r\n <div *ngIf="question.type==\'numeric\'">\r\n <input type="number" id="{{question.id}}" (focus)="transformToDecimal($event)"\r\n (blur)="transformAmount($event)" class="form-control search-form-control" [ngModel]="question.value"\r\n [required]="question.isRequired" name="{{question.name+[i]}}" attr.data-required="{{question.isRequired}}"\r\n value="{{question.value}}" (keyup.enter)="searchClick()"\r\n attr.data-restriction="{{question.restriction}}" attr.data-type="{{question.datatype}}"\r\n attr.data-name="{{question.name}}" attr.label="{{question.label}}"\r\n [ngClass]="{ \'is-invalid\':(enjiForm.submitted || enjiForm.form.controls[question.name+[i]]?.touched || enjiForm.form.controls[question.name+[i]]?.dirty) && enjiForm.form.controls[question.name+[i]]?.invalid }">\r\n </div>\r\n <div *ngIf="question.type==\'currency\'">\r\n <div *ngIf="question?.isCustom != undefined && question?.isCustom">\r\n <input type="" id="{{question.id}}" class="form-control search-form-control"\r\n [required]="question.isRequired" name="{{question.name}}" (keyup.enter)="searchClick()"\r\n attr.data-restriction="{{question.restriction}}"\r\n attr.data-type="{{question.datatype}}" attr.data-name="{{question.name}}"\r\n attr.data-required="{{question.isRequired}}" currencyMask [ngModel]="question.value"\r\n [(ngModel)]="question.value" [ngModelOptions]="{standalone: true}" attr.label="{{question.label}}"\r\n [options]="{ thousands: question.thousands, decimal: question.decimal, align: question.align, allowNegative: question.allowNegative, allowZero: question.allowZero, precision: question.precision, nullable: question.nullable }"\r\n [ngClass]="{ \'is-invalid\':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }">\r\n </div>\r\n <div *ngIf="question?.isCustom == undefined || !question?.isCustom">\r\n <input type="text" id="{{question.id}}" class="form-control search-form-control"\r\n [required]="question.isRequired" name="{{question.name}}" (keyup.enter)="searchClick()"\r\n attr.data-restriction="{{question.restriction}}"\r\n attr.data-type="{{question.datatype}}" attr.data-name="{{question.name}}"\r\n attr.data-required="{{question.isRequired}}" currencyMask [ngModel]="question.value"\r\n [(ngModel)]="question.value" [ngModelOptions]="{standalone: true}" attr.label="{{question.label}}"\r\n [options]="{ thousands: \',\', decimal: \'.\', align: \'right\', allowNegative: false, allowZero:true, precision: 2, nullable: false }"\r\n [ngClass]="{ \'is-invalid\':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }">\r\n </div>\r\n </div>\r\n\r\n \x3c!-- End Hardcode Lookup didalem--\x3e\r\n <div *ngIf="question.type==\'datepicker\'">\r\n <input type="date" id="{{question.id}}"\r\n class="form-control search-form-control btn-lookup" name="{{question.name+[i]}}" [ngModel]="question.value"\r\n [required]="question.isRequired" attr.data-required="{{question.isRequired}}" value="{{question.value}}"\r\n attr.data-type="{{question.datatype}}" attr.data-name="{{question.name}}"\r\n (keyup.enter)="searchClick()" attr.data-restriction="{{question.restriction}}" attr.label="{{question.label}}"\r\n min="{{question.minDate | date:\'yyyy-MM-dd\'}}" max="{{question.maxDate | date:\'yyyy-MM-dd\'}}" (focusout)="checkInputDate(question)"\r\n [ngClass]="{ \'is-invalid\':(enjiForm.submitted || enjiForm.form.controls[question.name+[i]]?.touched || enjiForm.form.controls[question.name+[i]]?.dirty) && enjiForm.form.controls[question.name+[i]]?.invalid }">\r\n </div>\r\n <div *ngIf="question.type==\'dropdown\'">\r\n \x3c!-- Ini kalau datanya tidak di load dari URL --\x3e\r\n <div *ngIf="!question.isFromURL">\r\n <select name="{{question.name}}" attr.data-required="{{question.isRequired}}"\r\n [required]="question.isRequired" class="form-control search-form-control" attr.query-in="{{question.isQueryIn}}"\r\n attr.data-type="{{question.datatype}}" attr.data-name="{{question.name}}" attr.label="{{question.label}}"\r\n [hidden]="question?.items.length == 1"\r\n [ngClass]="{ \'is-invalid\':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }">\r\n <option *ngIf="question.ddlType == \'one\' && question?.items.length != 1" value="one">\r\n Select One</option>\r\n <option\r\n *ngIf="(question?.ddlType == undefined || question.ddlType == \'all\') && question?.items.length != 1"\r\n value="all">All</option>\r\n <option *ngFor="let item of question?.items" value="{{item.key}}">\r\n {{item.value}}\r\n </option>\r\n </select>\r\n <label *ngIf="question?.items.length == 1">{{question.items[0].value}}</label>\r\n </div>\r\n \x3c!-- Ini kalau datanya di load dari URL --\x3e\r\n <div *ngIf="question.isFromURL">\r\n <div *ngIf="question.isEvent">\r\n <select name="{{question.name}}" attr.data-required="{{question.isRequired}}"\r\n [required]="question.isRequired" class="form-control search-form-control" attr.query-in="{{question.isQueryIn}}"\r\n attr.data-type="{{question.datatype}}" attr.data-name="{{question.name}}" attr.label="{{question.label}}"\r\n (change)="onChangeEvent($event.target.value, question)"\r\n [hidden]="question?.itemsUrl.length == 1"\r\n [ngClass]="{ \'is-invalid\':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }">\r\n <option *ngIf="question.ddlType == \'one\' && question?.itemsUrl.length != 1"\r\n value="one">Select One</option>\r\n <option\r\n *ngIf="(question?.ddlType == undefined || question.ddlType == \'all\') && question?.itemsUrl.length != 1"\r\n value="all">All</option>\r\n <option *ngFor="let item of question?.itemsUrl" value="{{item.Key}}">\r\n {{item.Value}}\r\n </option>\r\n </select>\r\n <label *ngIf="question?.itemsUrl.length == 1">{{question.itemsUrl[0].Value}}</label>\r\n </div>\r\n <div *ngIf="!question.isEvent">\r\n <select name="{{question.name}}" attr.data-required="{{question.isRequired}}"\r\n [required]="question.isRequired" class="form-control search-form-control" attr.query-in="{{question.isQueryIn}}"\r\n attr.data-type="{{question.datatype}}" attr.label="{{question.label}}"\r\n [hidden]="question?.itemsUrl.length == 1"\r\n [ngClass]="{ \'is-invalid\':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }">\r\n <option *ngIf="question.ddlType == \'one\' && question?.itemsUrl.length != 1"\r\n value="one">Select One</option>\r\n <option\r\n *ngIf="(question?.ddlType == undefined || question.ddlType == \'all\') && question?.itemsUrl.length != 1"\r\n value="all">All</option>\r\n <option *ngFor="let item of question?.itemsUrl" value="{{item.Key}}">\r\n {{item.Value}}\r\n </option>\r\n </select>\r\n <label *ngIf="question?.itemsUrl.length == 1">{{question.itemsUrl[0].Value}}</label>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf="question.type==\'claim\'">\r\n <select name="{{\'claim\'+[i]}}" class="form-control search-form-control"\r\n attr.data-type="{{\'text\'}}" attr.data-crit-datatable="{{question.isCriteriaDataTable}}" attr.data-name="{{\'Assignee\'}}"\r\n [hidden]="ClaimList.length == 1"\r\n [ngClass]="{ \'is-invalid\':(enjiForm.submitted || enjiForm.form.controls[\'claim\'+[i]]?.touched || enjiForm.form.controls[\'claim\'+[i]]?.dirty) && enjiForm.form.controls[\'claim\'+[i]]?.invalid }">\r\n <option *ngIf="question.ddlType == \'one\' && ClaimList.length != 1"\r\n value="one">Select One</option>\r\n <option\r\n *ngIf="(question?.ddlType == undefined || question.ddlType == \'all\') && ClaimList.length != 1"\r\n value="all">All</option>\r\n <option *ngFor="let item of ClaimList" value="{{item.Key}}">\r\n {{item.Value}}\r\n </option>\r\n </select>\r\n </div>\r\n <lib-uc-show-errors *ngIf="question.type!=\'datepicker\'" [control]="enjiForm.form.controls[question.name]"\r\n [submit]="enjiForm.submitted">\r\n </lib-uc-show-errors>\r\n <lib-uc-show-errors *ngIf="question.type==\'datepicker\'" [control]="enjiForm.form.controls[question.name+[i]]"\r\n [submit]="enjiForm.submitted">\r\n </lib-uc-show-errors>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class="col-md-6 form-group" *ngIf="(isReport != undefined && isReport)">\r\n <div class="col-md-12">\r\n <div class="row">\r\n <label class="col-md-5 no-padding" translate>Report Type</label>\r\n <div class="col-md-7 no-padding">\r\n <select name="ExportType" [(ngModel)]="ExportType" class="form-control search-form-control"\r\n attr.data-type="text">\r\n <option *ngFor="let item of ExportTypeList" [value]="item.key">{{item.value}}</option>\r\n </select>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class="col-md-12 no-padding">\r\n <div class="form-actions right">\r\n <button *ngIf="exportData == true" type="button" (click)="exportAsXLSX()"\r\n class="btn btn-raised btn-success mr-1" translate>\r\n <i class="fa ft-download"></i> Export Excel\r\n </button>\r\n <button type="button" (click)="reset()" class="btn btn-raised btn-warning mr-1" translate>\r\n <i class="fa fa-times"></i> Reset\r\n </button>\r\n <button *ngIf="(isReport == undefined || !isReport)" type="submit"\r\n class="btn btn-raised btn-primary" #UCSearchClick translate>\r\n <i class="fa fa-search"></i> Search\r\n </button>\r\n <button *ngIf="(isReport != undefined && isReport)" type="button" (click)="GenerateReport()"\r\n class="btn btn-raised btn-primary" translate>\r\n <i class="fa ft-download"></i> Generate Report\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</section>\r\n<br>\r\n\x3c!-- // Basic form layout section end --\x3e',providers:[x,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}"]}]}],L.ctorParameters=function(){return[{type:t.HttpClient},{type:x},{type:u.Renderer2},{type:undefined,decorators:[{type:u.Inject,args:[n.DOCUMENT]}]},{type:a.ToastrService},{type:s.CookieService},{type:f.DatePipe}]},L.propDecorators={content:[{type:u.ViewChild,args:["enjiForm"]}],myForm:[{type:u.ViewChild,args:["formIdSearch"]}],searchInput:[{type:u.Input}],pageSize:[{type:u.Input}],isReport:[{type:u.Input}],result:[{type:u.Output}],genRpt:[{type:u.Output}]},L);function L(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 u.EventEmitter,this.genRpt=new u.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 C,this.ListOfYear=new Array,this.ClaimList=[{Key:q.RestrictionIsNotNull,Value:"CLAIMED"},{Key:q.RestrictionIsNull,Value:"UNCLAIMED"}],this.ExportType=0,this.pageNow=1,this.isDataLoaded=!1,this.isHidden=!1,this.BusinessDt=new Date,this.dateWrong=!1,this.currentState="initial",this.countForm=0,this.formattedAmount="",this.amount=0}var S={align:"right",allowNegative:!1,allowZero:!0,decimal:".",precision:2,prefix:"",suffix:"",thousands:",",nullable:!1,inputMode:d.CurrencyMaskInputMode.NATURAL},U=(j.decorators=[{type:u.NgModule,args:[{declarations:[k],imports:[f.CommonModule,c.FormsModule,m.UcShowErrorsModule,h.UcDirectiveUpperCaseModule,d.NgxCurrencyModule.forRoot(S),p.TranslateModule.forChild()],exports:[k]}]}],j);function j(){}e.UCSearchService=g,e.UCSearchComponent=k,e.customCurrencyMaskConfig=S,e.UCSearchModule=U,e.ɵa=x,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/core"),require("@angular/common"),require("@angular/forms"),require("ngx-currency"),require("@ngx-translate/core"),require("@adins/uc-show-errors"),require("@adins/uc-directive-upper-case")):"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/core","@angular/common","@angular/forms","ngx-currency","@ngx-translate/core","@adins/uc-show-errors","@adins/uc-directive-upper-case"],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.core,e.ng.common,e.ng.forms,e.ngxCurrency,e.core,e.ucShowErrors,e.ucDirectiveUpperCase)}(this,function(e,t,n,i,o,r,a,s,l,u,f,c,d,p,m,h){"use strict";var g=(v.decorators=[{type:u.Injectable,args:[{providedIn:"root"}]}],v.ctorParameters=function(){return[]},v.ngInjectableDef=u.defineInjectable({factory:function(){return new v},token:v,providedIn:"root"}),v);function v(){}var q=(y.RestrictionBetween="Between",y.RestrictionLike="Like",y.RestrictionEq="Eq",y.RestrictionNeq="NEQ",y.RestrictionGt="GT",y.RestrictionGte="GTE",y.RestrictionLt="LT",y.RestrictionLte="LTE",y.RestrictionIn="IN",y.RestrictionNotIn="NotIn",y.RestrictionOr="Or",y.RestrictionOrNeq="OrNeq",y.RestrictionIsNull="ISNULL",y.RestrictionIsNotNull="ISNOTNULL",y.RestrictionGTE="GTE",y.RestrictionLTE="LTE",y.showData="10,50,100",y.JoinTypeInner="INNER",y.JoinTypeLeft="LEFT",y);function y(){}var b=function R(){this.baseUrl="",this.apiPath="",this.requestObj=new Object,this.leftColumnToJoin="",this.rightColumnToJoin="",this.joinType=q.JoinTypeInner},I=function O(){this._url="",this.enviromentUrl="",this.title="",this.apiQryPaging="",this.arrCritObj=null,this.addCritInput=new Array,this.ddlEnvironments=new Array,this.listEnvironments=new Array,this.whereValue=new Array,this.switchValue=new Array,this.integrationObj=new b,this.isJoinExAPI=!1},E=function M(){this.low=0,this.high=0,this.DataType="Text",this.isCriteriaDataTable=!1},w=function A(){this.includeCount=!0,this.includeData=!0,this.isLoading=!0,this.queryString="",this.rowVersion="",this.integrationObj=new b,this.joinType=q.JoinTypeInner},x=(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:u.Injectable}],T.ctorParameters=function(){return[]},T);function T(){}var F=(D.EXP_TYPE_PDF=0,D.EXP_TYPE_XLS=1,D.EXP_TYPE_XLSX=2,D.EXP_TYPE_DOC=3,D.EXP_TYPE_DOCX=4,D);function D(){}var C=function N(){this.ListOfMonth=new Array,this.ListOfMonth.push({key:1,value:"January"}),this.ListOfMonth.push({key:2,value:"February"}),this.ListOfMonth.push({key:3,value:"March"}),this.ListOfMonth.push({key:4,value:"April"}),this.ListOfMonth.push({key:5,value:"May"}),this.ListOfMonth.push({key:6,value:"June"}),this.ListOfMonth.push({key:7,value:"July"}),this.ListOfMonth.push({key:8,value:"August"}),this.ListOfMonth.push({key:9,value:"September"}),this.ListOfMonth.push({key:10,value:"October"}),this.ListOfMonth.push({key:11,value:"November"}),this.ListOfMonth.push({key:12,value:"December"})},k=(Object.defineProperty(S.prototype,"content",{set:function(e){e&&(this.searchForm=e)},enumerable:!0,configurable:!0}),S.prototype.changeState=function(){this.currentState="initial"===this.currentState?"final":"initial",this.isHidden=!1===this.isHidden},S.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()},S.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 w,i=new Array,r=new E;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.ddlEnvironments!=undefined&&0!=h.searchInput.ddlEnvironments.length){for(var o=0;o<h.searchInput.ddlEnvironments.length;o++)if(t.component[e].name==h.searchInput.ddlEnvironments[o].name){t.component[e].fullpath=h.searchInput.ddlEnvironments[o].environment+t.component[e].path;break}}else if(h.searchInput.listEnvironments!=undefined&&0!=h.searchInput.listEnvironments.length){for(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&&("month"==t.component[e].dtmType&&(t.component[e].value!=undefined&&t.component[e].value.includes("BD")&&(t.component[e].value=h.BusinessDt.getMonth()+1),t.component[e].items=h.ListOfMonth.ListOfMonth),t.component[e].dtmType.includes("year")&&(t.component[e].value!=undefined&&t.component[e].value.includes("BD")&&(t.component[e].value=h.BusinessDt.getFullYear()),t.component[e].items=h.setYearDDL(t.component[e].dtmType))),"taskDefinitionKey"==t.component[e].type&&(t.component[e].ddlType||h.SetProcessKey(e)),"officeRoleCodes"==t.component[e].type&&h.SetRoleOfficeCodes(e),"datepicker"==t.component[e].type){if(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(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])},1e3)})},S.prototype.SetRoleOfficeCodes=function(e,t){void 0===t&&(t=0);var n=this.cookieService.get("RoleCode"),i=new Array;if(i.push(n),1==this.configuration.component[e].itemsUrl.length&&"all"==this.configuration.component[e].ddlType)for(var r=0;r<this.configuration.component[e].itemsUrl.length;r++){var o=this.configuration.component[e].itemsUrl[r];i.push(o.Key),i.push(n+"-"+o.Key)}else{var a=this.myForm.nativeElement[t].options,s=a[a.selectedIndex].value.trim();i.push(s),i.push(n+"-"+s)}this.searchInput.integrationObj.requestObj.OfficeRoleCodes=i},S.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},S.prototype.getJSON=function(e){return this.http.get(e)},S.prototype.postJSON=function(e,t){return void 0===t&&(t=null),this.http.post(e,t)},S.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)},S.prototype.reset=function(){this.searchForm.resetForm(),this.ExportType=this.ExportTypeList[0].key,this.initiateForm()},S.prototype.search=function(e,n,t,i,r){var o=this;void 0===r&&(r=new Array);var a=new w,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)}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 E,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 g=m.getAttribute("label");this.toastr.warning("Please select "+g);break}if("claim"==this.configuration.component[d].type)p.propName=m.getAttribute("data-name"),p.restriction=f,p.value=null,""!=m.getAttribute("data-crit-datatable")&&null!=m.getAttribute("data-crit-datatable")&&(p.isCriteriaDataTable=m.getAttribute("data-crit-datatable")),s.push(p);else if("all"!=f&&"one"!=f)p.restriction=q.RestrictionEq,""!=m.name?p.propName=m.name:p.propName=m.getAttribute("ng-reflect-name"),p.value=f,s.push(p);else if("all"==f&&1==l&&0!=m.options.length){var v=new Array;for(c=0;c<m.options.length;c++)0!=c&&v.push(m.options[c].value);0!=v.length&&(p.restriction=q.RestrictionIn,""!=m.name?p.propName=m.name:p.propName=m.getAttribute("ng-reflect-name"),p.listValue=v,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=q.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=q.RestrictionLike)):p.restriction=q.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(var y=0;y<r.length;y++)s.push(r[y]);else if(null!=this.searchInput.addCritInput||this.searchInput.addCritInput!=undefined)for(y=0;y<this.searchInput.addCritInput.length;y++)s.push(this.searchInput.addCritInput[y])}else if(null!=this.searchInput.addCritInput||this.searchInput.addCritInput!=undefined)for(y=0;y<this.searchInput.addCritInput.length;y++)s.push(this.searchInput.addCritInput[y]);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),e})}},S.prototype.GenerateReport=function(){this.genRpt.emit({ExportType:this.ExportType,ElRef:this.myForm})},S.prototype.lessThanFour=function(){return!(3<this.countForm)},S.prototype.resolveObject=function(t,e,n){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)}))})},S.prototype.transformAmount=function(e){this.formattedAmount=parseFloat(e.target.value).toLocaleString("en"),e.target.value=this.formattedAmount},S.prototype.transformToDecimal=function(e){e.target.value=parseFloat(e.target.value.toString().replace(/,/g,""))},S.prototype.exportAsXLSX=function(){var t=this,e=new w;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)})},S.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 w,a=new Array;if("all"!=e&&"one"!=e){var s=new E;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=q.RestrictionEq,a.push(s)}if(o.criteria=a,n[r].path!=undefined&&""!=n[r].path)if(this.searchInput.ddlEnvironments!=undefined&&0!=this.searchInput.ddlEnvironments.length){for(var l=0;l<this.searchInput.ddlEnvironments.length;l++)if(n[r].name==this.searchInput.ddlEnvironments[l].name){n[r].fullpath=this.searchInput.ddlEnvironments[l].environment+n[r].path;break}}else if(this.searchInput.listEnvironments!=undefined&&0!=this.searchInput.listEnvironments.length){for(l=0;l<this.searchInput.listEnvironments.length;l++)if(n.component[r].environment==this.searchInput.listEnvironments[l].environment){n.component[r].fullpath=this.searchInput.listEnvironments[l].url+n.component[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)}},S.prototype.SetProcessKey=function(e){if(console.log(e),console.log(this.configuration.component[e].name),this.configuration.component[e].name){var t=this.myForm.nativeElement[e].options,n=t[t.selectedIndex].value.trim(),i=this.configuration.component[e].itemsUrl.find(function(e){return e.Key==n});this.searchInput.integrationObj.requestObj.TaskDefinitionKey=n,this.searchInput.integrationObj.requestObj.ProcessKey=i}},S.prototype.switchCase=function(t){for(var e=!1,n=0;n<t.conditions.length;n++){var i=this.searchInput.switchValue.findIndex(function(e){return e.property==t.conditions[n].property});if("EQ"==t.conditions[n].restriction)if(1!=t.conditions[n].isUser){if(this.searchInput.switchValue[i].value!=t.conditions[n].value){e=!1;break}e=!0}else{var r=localStorage.getItem("Username");if(this.searchInput.switchValue[i].value!=r){e=!1;break}e=!0}else if("NEQ"==t.conditions[n].restriction)if(1!=t.conditions[n].isUser){if(this.searchInput.switchValue[i].value==t.conditions[n].value){e=!1;break}e=!0}else{if(r=localStorage.getItem("Username"),this.searchInput.switchValue[i].value==r){e=!1;break}e=!0}else if("GT"==t.conditions[n].restriction)if(1!=t.conditions[n].isUser){if(!(this.searchInput.switchValue[i].value>t.conditions[n].value)){e=!1;break}e=!0}else{if(r=localStorage.getItem("Username"),!(this.searchInput.switchValue[i].value>r)){e=!1;break}e=!0}else if("GTE"==t.conditions[n].restriction)if(1!=t.conditions[n].isUser){if(!(this.searchInput.switchValue[i].value>=t.conditions[n].value)){e=!1;break}e=!0}else{if(r=localStorage.getItem("Username"),!(this.searchInput.switchValue[i].value>=r)){e=!1;break}e=!0}else if("LT"==t.conditions[n].restriction)if(1!=t.conditions[n].isUser){if(!(this.searchInput.switchValue[i].value<t.conditions[n].value)){e=!1;break}e=!0}else{if(r=localStorage.getItem("Username"),!(this.searchInput.switchValue[i].value<r)){e=!1;break}e=!0}else if("LTE"==t.conditions[n].restriction)if(1!=t.conditions[n].isUser){if(!(this.searchInput.switchValue[i].value<=t.conditions[n].value)){e=!1;break}e=!0}else{if(r=localStorage.getItem("Username"),!(this.searchInput.switchValue[i].value<=r)){e=!1;break}e=!0}}return e},S.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)},S.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},S.decorators=[{type:u.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" [ngModel]="question.value"\r\n [required]="question.isRequired" name="{{question.name}}" 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}}" attr.label="{{question.label}}"\r\n [ngClass]="{ \'is-invalid\':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }">\r\n </div>\r\n <div *ngIf="question.type==\'textarea\'">\r\n <textarea type="text" id="{{question.id}}" class="form-control search-form-control" [ngModel]="question.value"\r\n [required]="question.isRequired" name="{{question.name}}" attr.data-required="{{question.isRequired}}"\r\n attr.data-type="{{question.datatype}}" attr.data-name="{{question.name}}"\r\n value="{{question.value}}" attr.label="{{question.label}}"\r\n [ngClass]="{ \'is-invalid\':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }"></textarea>\r\n </div>\r\n <div *ngIf="question.type==\'numeric\'">\r\n <input type="number" id="{{question.id}}" (focus)="transformToDecimal($event)"\r\n (blur)="transformAmount($event)" class="form-control search-form-control" [ngModel]="question.value"\r\n [required]="question.isRequired" name="{{question.name+[i]}}" attr.data-required="{{question.isRequired}}"\r\n value="{{question.value}}" (keyup.enter)="searchClick()"\r\n attr.data-restriction="{{question.restriction}}" attr.data-type="{{question.datatype}}"\r\n attr.data-name="{{question.name}}" attr.label="{{question.label}}"\r\n [ngClass]="{ \'is-invalid\':(enjiForm.submitted || enjiForm.form.controls[question.name+[i]]?.touched || enjiForm.form.controls[question.name+[i]]?.dirty) && enjiForm.form.controls[question.name+[i]]?.invalid }">\r\n </div>\r\n <div *ngIf="question.type==\'currency\'">\r\n <div *ngIf="question?.isCustom != undefined && question?.isCustom">\r\n <input type="" id="{{question.id}}" class="form-control search-form-control"\r\n [required]="question.isRequired" name="{{question.name}}" (keyup.enter)="searchClick()"\r\n attr.data-restriction="{{question.restriction}}"\r\n attr.data-type="{{question.datatype}}" attr.data-name="{{question.name}}"\r\n attr.data-required="{{question.isRequired}}" currencyMask [ngModel]="question.value"\r\n [(ngModel)]="question.value" [ngModelOptions]="{standalone: true}" attr.label="{{question.label}}"\r\n [options]="{ thousands: question.thousands, decimal: question.decimal, align: question.align, allowNegative: question.allowNegative, allowZero: question.allowZero, precision: question.precision, nullable: question.nullable }"\r\n [ngClass]="{ \'is-invalid\':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }">\r\n </div>\r\n <div *ngIf="question?.isCustom == undefined || !question?.isCustom">\r\n <input type="text" id="{{question.id}}" class="form-control search-form-control"\r\n [required]="question.isRequired" name="{{question.name}}" (keyup.enter)="searchClick()"\r\n attr.data-restriction="{{question.restriction}}"\r\n attr.data-type="{{question.datatype}}" attr.data-name="{{question.name}}"\r\n attr.data-required="{{question.isRequired}}" currencyMask [ngModel]="question.value"\r\n [(ngModel)]="question.value" [ngModelOptions]="{standalone: true}" attr.label="{{question.label}}"\r\n [options]="{ thousands: \',\', decimal: \'.\', align: \'right\', allowNegative: false, allowZero:true, precision: 2, nullable: false }"\r\n [ngClass]="{ \'is-invalid\':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }">\r\n </div>\r\n </div>\r\n\r\n \x3c!-- End Hardcode Lookup didalem--\x3e\r\n <div *ngIf="question.type==\'datepicker\'">\r\n <input type="date" id="{{question.id}}"\r\n class="form-control search-form-control btn-lookup" name="{{question.name+[i]}}" [ngModel]="question.value"\r\n [required]="question.isRequired" attr.data-required="{{question.isRequired}}" value="{{question.value}}"\r\n attr.data-type="{{question.datatype}}" attr.data-name="{{question.name}}"\r\n (keyup.enter)="searchClick()" attr.data-restriction="{{question.restriction}}" attr.label="{{question.label}}"\r\n min="{{question.minDate | date:\'yyyy-MM-dd\'}}" max="{{question.maxDate | date:\'yyyy-MM-dd\'}}" (focusout)="checkInputDate(question)"\r\n [ngClass]="{ \'is-invalid\':(enjiForm.submitted || enjiForm.form.controls[question.name+[i]]?.touched || enjiForm.form.controls[question.name+[i]]?.dirty) && enjiForm.form.controls[question.name+[i]]?.invalid }">\r\n </div>\r\n <div *ngIf="question.type == \'taskDefinitionKey\' || question.type == \'officeRoleCodes\'">\r\n <select name="{{question.name}}" attr.data-required="{{question.isRequired}}"\r\n [required]="question.isRequired" class="form-control search-form-control" attr.query-in="{{question.isQueryIn}}"\r\n attr.data-type="{{question.datatype}}" attr.label="{{question.label}}"\r\n [hidden]="question?.itemsUrl.length == 1" (change)="question.type == \'taskDefinitionKey\' ? SetProcessKey(i) : SetRoleOfficeCodes(i)"\r\n [ngClass]="{ \'is-invalid\':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }">\r\n <option *ngIf="question.ddlType == \'one\' && question?.itemsUrl.length != 1"\r\n value="one">Select One</option>\r\n <option\r\n *ngIf="(question?.ddlType == undefined || question.ddlType == \'all\') && question?.itemsUrl.length != 1"\r\n value="all">All</option>\r\n <option *ngFor="let item of question?.itemsUrl" value="{{item.Key}}">\r\n {{item.Value}}\r\n </option>\r\n </select>\r\n <label *ngIf="question?.itemsUrl.length == 1">{{question.itemsUrl[0].Value}}</label>\r\n </div>\r\n <div *ngIf="question.type==\'dropdown\'">\r\n \x3c!-- Ini kalau datanya tidak di load dari URL --\x3e\r\n <div *ngIf="!question.isFromURL">\r\n <select name="{{question.name}}" attr.data-required="{{question.isRequired}}"\r\n [required]="question.isRequired" class="form-control search-form-control" attr.query-in="{{question.isQueryIn}}"\r\n attr.data-type="{{question.datatype}}" attr.data-name="{{question.name}}" attr.label="{{question.label}}"\r\n [hidden]="question?.items.length == 1"\r\n [ngClass]="{ \'is-invalid\':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }">\r\n <option *ngIf="question.ddlType == \'one\' && question?.items.length != 1" value="one">\r\n Select One</option>\r\n <option\r\n *ngIf="(question?.ddlType == undefined || question.ddlType == \'all\') && question?.items.length != 1"\r\n value="all">All</option>\r\n <option *ngFor="let item of question?.items" value="{{item.key}}">\r\n {{item.value}}\r\n </option>\r\n </select>\r\n <label *ngIf="question?.items.length == 1">{{question.items[0].value}}</label>\r\n </div>\r\n \x3c!-- Ini kalau datanya di load dari URL --\x3e\r\n <div *ngIf="question.isFromURL">\r\n <div *ngIf="question.isEvent">\r\n <select name="{{question.name}}" attr.data-required="{{question.isRequired}}"\r\n [required]="question.isRequired" class="form-control search-form-control" attr.query-in="{{question.isQueryIn}}"\r\n attr.data-type="{{question.datatype}}" attr.data-name="{{question.name}}" attr.label="{{question.label}}"\r\n (change)="onChangeEvent($event.target.value, question)"\r\n [hidden]="question?.itemsUrl.length == 1"\r\n [ngClass]="{ \'is-invalid\':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }">\r\n <option *ngIf="question.ddlType == \'one\' && question?.itemsUrl.length != 1"\r\n value="one">Select One</option>\r\n <option\r\n *ngIf="(question?.ddlType == undefined || question.ddlType == \'all\') && question?.itemsUrl.length != 1"\r\n value="all">All</option>\r\n <option *ngFor="let item of question?.itemsUrl" value="{{item.Key}}">\r\n {{item.Value}}\r\n </option>\r\n </select>\r\n <label *ngIf="question?.itemsUrl.length == 1">{{question.itemsUrl[0].Value}}</label>\r\n </div>\r\n <div *ngIf="!question.isEvent">\r\n <select name="{{question.name}}" attr.data-required="{{question.isRequired}}"\r\n [required]="question.isRequired" class="form-control search-form-control" attr.query-in="{{question.isQueryIn}}"\r\n attr.data-type="{{question.datatype}}" attr.label="{{question.label}}"\r\n [hidden]="question?.itemsUrl.length == 1"\r\n [ngClass]="{ \'is-invalid\':(enjiForm.submitted || enjiForm.form.controls[question.name]?.touched || enjiForm.form.controls[question.name]?.dirty) && enjiForm.form.controls[question.name]?.invalid }">\r\n <option *ngIf="question.ddlType == \'one\' && question?.itemsUrl.length != 1"\r\n value="one">Select One</option>\r\n <option\r\n *ngIf="(question?.ddlType == undefined || question.ddlType == \'all\') && question?.itemsUrl.length != 1"\r\n value="all">All</option>\r\n <option *ngFor="let item of question?.itemsUrl" value="{{item.Key}}">\r\n {{item.Value}}\r\n </option>\r\n </select>\r\n <label *ngIf="question?.itemsUrl.length == 1">{{question.itemsUrl[0].Value}}</label>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf="question.type==\'claim\'">\r\n <select name="{{\'claim\'+[i]}}" class="form-control search-form-control"\r\n attr.data-type="{{\'text\'}}" attr.data-crit-datatable="{{question.isCriteriaDataTable}}" attr.data-name="{{\'Assignee\'}}"\r\n [hidden]="ClaimList.length == 1"\r\n [ngClass]="{ \'is-invalid\':(enjiForm.submitted || enjiForm.form.controls[\'claim\'+[i]]?.touched || enjiForm.form.controls[\'claim\'+[i]]?.dirty) && enjiForm.form.controls[\'claim\'+[i]]?.invalid }">\r\n <option *ngIf="question.ddlType == \'one\' && ClaimList.length != 1"\r\n value="one">Select One</option>\r\n <option\r\n *ngIf="(question?.ddlType == undefined || question.ddlType == \'all\') && ClaimList.length != 1"\r\n value="all">All</option>\r\n <option *ngFor="let item of ClaimList" value="{{item.Key}}">\r\n {{item.Value}}\r\n </option>\r\n </select>\r\n </div>\r\n <lib-uc-show-errors *ngIf="question.type!=\'datepicker\'" [control]="enjiForm.form.controls[question.name]"\r\n [submit]="enjiForm.submitted">\r\n </lib-uc-show-errors>\r\n <lib-uc-show-errors *ngIf="question.type==\'datepicker\'" [control]="enjiForm.form.controls[question.name+[i]]"\r\n [submit]="enjiForm.submitted">\r\n </lib-uc-show-errors>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class="col-md-6 form-group" *ngIf="(isReport != undefined && isReport)">\r\n <div class="col-md-12">\r\n <div class="row">\r\n <label class="col-md-5 no-padding" translate>Report Type</label>\r\n <div class="col-md-7 no-padding">\r\n <select name="ExportType" [(ngModel)]="ExportType" class="form-control search-form-control"\r\n attr.data-type="text">\r\n <option *ngFor="let item of ExportTypeList" [value]="item.key">{{item.value}}</option>\r\n </select>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class="col-md-12 no-padding">\r\n <div class="form-actions right">\r\n <button *ngIf="exportData == true" type="button" (click)="exportAsXLSX()"\r\n class="btn btn-raised btn-success mr-1" translate>\r\n <i class="fa ft-download"></i> Export Excel\r\n </button>\r\n <button type="button" (click)="reset()" class="btn btn-raised btn-warning mr-1" translate>\r\n <i class="fa fa-times"></i> Reset\r\n </button>\r\n <button *ngIf="(isReport == undefined || !isReport)" type="submit"\r\n class="btn btn-raised btn-primary" #UCSearchClick translate>\r\n <i class="fa fa-search"></i> Search\r\n </button>\r\n <button *ngIf="(isReport != undefined && isReport)" type="button" (click)="GenerateReport()"\r\n class="btn btn-raised btn-primary" translate>\r\n <i class="fa ft-download"></i> Generate Report\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</section>\r\n<br>\r\n\x3c!-- // Basic form layout section end --\x3e',providers:[x,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}"]}]}],S.ctorParameters=function(){return[{type:t.HttpClient},{type:x},{type:u.Renderer2},{type:undefined,decorators:[{type:u.Inject,args:[n.DOCUMENT]}]},{type:a.ToastrService},{type:s.CookieService},{type:f.DatePipe}]},S.propDecorators={content:[{type:u.ViewChild,args:["enjiForm"]}],myForm:[{type:u.ViewChild,args:["formIdSearch"]}],searchInput:[{type:u.Input}],pageSize:[{type:u.Input}],isReport:[{type:u.Input}],result:[{type:u.Output}],genRpt:[{type:u.Output}]},S);function S(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 u.EventEmitter,this.genRpt=new u.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 C,this.ListOfYear=new Array,this.ClaimList=[{Key:q.RestrictionIsNotNull,Value:"CLAIMED"},{Key:q.RestrictionIsNull,Value:"UNCLAIMED"}],this.ExportType=0,this.pageNow=1,this.isDataLoaded=!1,this.isHidden=!1,this.BusinessDt=new Date,this.dateWrong=!1,this.currentState="initial",this.countForm=0,this.formattedAmount="",this.amount=0}var L={align:"right",allowNegative:!1,allowZero:!0,decimal:".",precision:2,prefix:"",suffix:"",thousands:",",nullable:!1,inputMode:d.CurrencyMaskInputMode.NATURAL},U=(j.decorators=[{type:u.NgModule,args:[{declarations:[k],imports:[f.CommonModule,c.FormsModule,m.UcShowErrorsModule,h.UcDirectiveUpperCaseModule,d.NgxCurrencyModule.forRoot(L),p.TranslateModule.forChild()],exports:[k]}]}],j);function j(){}e.UCSearchService=g,e.UCSearchComponent=k,e.customCurrencyMaskConfig=L,e.UCSearchModule=U,e.ɵa=x,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
2
2
|
//# sourceMappingURL=adins-ucsearch.umd.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ng://@adins/ucsearch/lib/ucsearch.service.ts","ng://@adins/ucsearch/lib/model/AdInstConstant.ts","ng://@adins/ucsearch/lib/model/IntegrationObj.model.ts","ng://@adins/ucsearch/lib/model/InputSearchObj.Model.ts","ng://@adins/ucsearch/lib/model/CriteriaObj.model.ts","ng://@adins/ucsearch/lib/model/RequestCriteriaObj.model.ts","ng://@adins/ucsearch/lib/services/excel-service/excel-service.ts","ng://@adins/ucsearch/lib/model/KeyValueReport.model.ts","ng://@adins/ucsearch/lib/model/KeyValueUCSearch.model.ts","ng://@adins/ucsearch/lib/ucsearch.component.ts","ng://@adins/ucsearch/lib/ucsearch.module.ts"],"names":["UCSearchService","Injectable","args","providedIn","AdInsConstant","RestrictionBetween","RestrictionLike","RestrictionEq","RestrictionNeq","RestrictionGt","RestrictionGte","RestrictionLt","RestrictionLte","RestrictionIn","RestrictionNotIn","RestrictionOr","RestrictionOrNeq","RestrictionIsNull","RestrictionIsNotNull","RestrictionGTE","RestrictionLTE","showData","JoinTypeInner","JoinTypeLeft","IntegrationObj","this","baseUrl","apiPath","requestObj","Object","leftColumnToJoin","rightColumnToJoin","joinType","InputSearchObj","_url","enviromentUrl","title","apiQryPaging","arrCritObj","addCritInput","Array","ddlEnvironments","listEnvironments","whereValue","switchValue","integrationObj","isJoinExAPI","CriteriaObj","low","high","DataType","isCriteriaDataTable","RequestCriteriaObj","includeCount","includeData","isLoading","queryString","rowVersion","ExcelService","prototype","exportAsExcelFile","json","excelFileName","worksheet","XLSX.utils","json_to_sheet","console","log","workbook","Sheets","data","SheetNames","excelBuffer","XLSX.write","bookType","type","saveAsExcelFile","buffer","fileName","Blob","FileSaver.saveAs","Date","getTime","ExportTypeConstant","EXP_TYPE_PDF","EXP_TYPE_XLS","EXP_TYPE_XLSX","EXP_TYPE_DOC","EXP_TYPE_DOCX","ListKeyValueMonth","ListOfMonth","push","key","value","UCSearchComponent","defineProperty","content","searchForm","changeState","currentState","isHidden","ngOnInit","apiUrl","searchInput","arrCrit","js","_renderer2","createElement","text","appendChild","_document","body","cookieService","get","BisDt","DecryptString","BusinessDt","initiateForm","_this","getJSON","subscribe","configuration","exportData","exportExcel","exportTypeList","undefined","length","ExportTypeList","ExportType","countForm","component","isDataLoaded","i","isFromURL","request","arrayCrit","criteriaObject","propName","criteriaPropName","criteriaPropValue","restriction","criteria","path","y","name","fullpath","environment","url","resolveObject","parseFloat","toLocaleString","dtmType","includes","getMonth","items","getFullYear","setYearDDL","businessDate","operator","charAt","dateShow","tempMinus","split","numDay","parseInt","setDate","getDate","dateText","formatDate","toUpperCase","minDate","datePipe","transform","maxDate","setTimeout","j","isEvent","itemsUrl","onChangeEvent","Key","year","ListOfYear","equation","match","toMin","toMax","minMax","substring","index","toString","q","sort","a","b","http","postJSON","post","searchClick","order","orderby","pageNow","search","pageSize","reset","resetForm","pageNo","rowPerPage","orderBy","addCrit","IsQueryIn","IsBreak","querystring","whereQuery","x","i_1","critObj","myForm","nativeElement","getAttribute","nodeName","ddl","options","selectedIndex","trim","label","toastr","warning","ddlList","listValue","replace","response","qryPaging","result","emit","GenerateReport","genRpt","ElRef","lessThanFour","obj","crit","tempData","ReturnObject","exclude","filter","transformAmount","element","formattedAmount","target","transformToDecimal","exportAsXLSX","ExcelData","excelService","error","optValue","afFilter","jsonComp","affectedFilter","datatype","filterPropName","switchCase","condList","condition","conditions","idx","findIndex","property","isUser","username","localStorage","getItem","chipperText","chipperKey","chipperKeyArr","CryptoJS.enc","Utf8","parse","iv","CryptoJS.lib","WordArray","create","CryptoJS.AES","decrypt","checkInputDate","minDateVal","maxDateVal","errorMessage","MinComponent","find","id","min","MaxComponent","max","dateWrong","Component","selector","template","providers","DatePipe","animations","trigger","state","style","height","opacity","overflow","transition","animate","HttpClient","Renderer2","Inject","DOCUMENT","ToastrService","CookieService","ViewChild","Input","Output","isReport","EventEmitter","ClaimList","Value","amount","customCurrencyMaskConfig","align","allowNegative","allowZero","decimal","precision","prefix","suffix","thousands","nullable","inputMode","CurrencyMaskInputMode","NATURAL","UCSearchModule","NgModule","declarations","imports","CommonModule","FormsModule","UcShowErrorsModule","UcDirectiveUpperCaseModule","NgxCurrencyModule","forRoot","TranslateModule","forChild","exports"],"mappings":"8nCAAA,IAAAA,uBAECC,EA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B7N,KAAAuS,OAAS,EClGX,IAAaC,EAA2B,CACtCC,MAAO,QACPC,eAAe,EACfC,WAAW,EACXC,QAAS,IACTC,UAAW,EACXC,OAAQ,GACRC,OAAQ,GACRC,UAAW,IACXC,UAAU,EACVC,UAAWC,EAAAA,sBAAsBC,SAEnCC,uBAACC,EAAAA,SAAQ7U,KAAA,CAAC,CACR8U,aAAc,CAAClP,GACfmP,QAAS,CACPC,EAAAA,aACAC,EAAAA,YACAC,EAAAA,mBACAC,EAAAA,2BACAC,EAAAA,kBAAkBC,QAAQtB,GAC1BuB,EAAAA,gBAAgBC,YAElBC,QAAS,CAAC5P,OAEkBgP,GAZ9B,SAAAA","sourcesContent":["import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class UCSearchService {\r\n\r\n constructor() { }\r\n}\r\n","import { formatDate } from \"@angular/common\";\r\n\r\nexport class AdInsConstant {\r\n public static RestrictionBetween = \"Between\"\r\n public static RestrictionLike = \"Like\";\r\n public static RestrictionEq = \"Eq\";\r\n public static RestrictionNeq = \"NEQ\";\r\n public static RestrictionGt = \"GT\";\r\n public static RestrictionGte = \"GTE\";\r\n public static RestrictionLt = \"LT\";\r\n public static RestrictionLte = \"LTE\";\r\n public static RestrictionIn = \"IN\";\r\n public static RestrictionNotIn = \"NotIn\";\r\n public static RestrictionOr = \"Or\"; //pastikan ada 1 criteria sebelumnya\r\n public static RestrictionOrNeq = \"OrNeq\"; //pastikan ada 1 criteria sebelumnya\r\n public static RestrictionIsNull = \"ISNULL\";\r\n public static RestrictionIsNotNull = \"ISNOTNULL\";\r\n public static RestrictionGTE = \"GTE\";\r\n public static RestrictionLTE = \"LTE\";\r\n public static showData = \"10,50,100\";\r\n public static JoinTypeInner = \"INNER\";\r\n public static JoinTypeLeft = \"LEFT\";\r\n}\r\n","import { AdInsConstant } from \"./AdInstConstant\";\r\nexport class IntegrationObj {\r\n baseUrl: string;\r\n apiPath: string;\r\n requestObj: Object;\r\n leftColumnToJoin: string;\r\n rightColumnToJoin: string;\r\n joinType: string;\r\n \r\n constructor() {\r\n this.baseUrl = \"\";\r\n this.apiPath = \"\";\r\n this.requestObj = new Object();\r\n this.leftColumnToJoin = \"\";\r\n this.rightColumnToJoin = \"\";\r\n this.joinType = AdInsConstant.JoinTypeInner;\r\n }\r\n}","import { CriteriaObj } from \"./CriteriaObj.model\";\r\nimport { IntegrationObj } from \"./IntegrationObj.model\";\r\n \r\nexport class InputSearchObj {\r\n _url: string;\r\n enviromentUrl: string;\r\n title: string;\r\n apiQryPaging: string;\r\n arrCritObj: any;\r\n addCritInput: Array<CriteriaObj>;\r\n ddlEnvironments: Array<EnviObj>;\r\n listEnvironments: Array<EnvisObj>;\r\n whereValue: Array<WhereValueObj>;\r\n switchValue: Array<SwitchValueObj>;\r\n integrationObj: IntegrationObj;\r\n isJoinExAPI: boolean;\r\n \r\n constructor() {\r\n this._url = \"\";\r\n this.enviromentUrl = \"\";\r\n this.title = \"\";\r\n this.apiQryPaging = \"\";\r\n this.arrCritObj = null;\r\n this.addCritInput = new Array<CriteriaObj>();\r\n this.ddlEnvironments = new Array<EnviObj>();\r\n this.listEnvironments = new Array<EnvisObj>();\r\n this.whereValue = new Array<WhereValueObj>();\r\n this.switchValue = new Array<SwitchValueObj>();\r\n this.integrationObj = new IntegrationObj();\r\n this.isJoinExAPI = false;\r\n }\r\n}\r\n\r\nexport class EnviObj {\r\n name: string;\r\n environment: string;\r\n\r\n constructor() {\r\n this.name = \"\";\r\n this.environment = \"\";\r\n }\r\n}\r\n\r\nexport class WhereValueObj {\r\n property: string;\r\n value: any;\r\n\r\n constructor() {\r\n this.property = \"\";\r\n }\r\n}\r\n\r\nexport class SwitchValueObj {\r\n property: string;\r\n value: any;\r\n\r\n constructor() {\r\n this.property = \"\";\r\n }\r\n}\r\n\r\nexport class EnvisObj {\r\n environment: string;\r\n url: string;\r\n\r\n constructor() {\r\n this.environment = \"\";\r\n this.url = \"\";\r\n }\r\n}","export class CriteriaObj { \r\n propName: string;\r\n restriction: string;\r\n value: string;\r\n low: number;\r\n high: number;\r\n DataType: string;\r\n listValue: Array<any>;\r\n isCriteriaDataTable: boolean;\r\n\r\n constructor() {\r\n this.low = 0;\r\n this.high = 0;\r\n this.DataType = 'Text';\r\n this.isCriteriaDataTable = false;\r\n }\r\n\r\n}","import { AdInsConstant } from \"./AdInstConstant\";\r\nimport { CriteriaObj } from \"./CriteriaObj.model\";\r\nimport { IntegrationObj } from \"./IntegrationObj.model\";\r\n \r\nexport class RequestCriteriaObj{\r\n includeCount:boolean;\r\n includeData:boolean;\r\n pageNo:number;\r\n rowPerPage:number;\r\n orderBy:any;\r\n criteria:CriteriaObj[];\r\n isLoading : boolean;\r\n queryString: any;\r\n rowVersion: any;\r\n integrationObj: IntegrationObj;\r\n joinType: string;\r\n\r\n constructor()\r\n {\r\n this.includeCount=true;\r\n this.includeData=true;\r\n this.isLoading = true;\r\n this.queryString = '';\r\n this.rowVersion = '';\r\n this.integrationObj = new IntegrationObj();\r\n this.joinType = AdInsConstant.JoinTypeInner;\r\n }\r\n}","import { Injectable } from '@angular/core';\r\nimport * as FileSaver from 'file-saver';\r\nimport * as XLSX from 'xlsx';\r\n\r\nconst EXCEL_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8';\r\nconst EXCEL_EXTENSION = '.xlsx';\r\n\r\n@Injectable()\r\nexport class ExcelService {\r\n\r\n constructor() { }\r\n\r\n public exportAsExcelFile(json: any[], excelFileName: string): void {\r\n \r\n const worksheet: XLSX.WorkSheet = XLSX.utils.json_to_sheet(json);\r\n console.log('worksheet',worksheet);\r\n const workbook: XLSX.WorkBook = { Sheets: { 'data': worksheet }, SheetNames: ['data'] };\r\n const excelBuffer: any = XLSX.write(workbook, { bookType: 'xlsx', type: 'array' });\r\n //const excelBuffer: any = XLSX.write(workbook, { bookType: 'xlsx', type: 'buffer' });\r\n this.saveAsExcelFile(excelBuffer, excelFileName);\r\n }\r\n\r\n private saveAsExcelFile(buffer: any, fileName: string): void {\r\n const data: Blob = new Blob([buffer], {\r\n type: EXCEL_TYPE\r\n });\r\n FileSaver.saveAs(data, fileName + '_export_' + new Date().getTime() + EXCEL_EXTENSION);\r\n }\r\n\r\n}","export class KeyValueReportObj {\r\n key: number;\r\n value: string;\r\n\r\n constructor() {\r\n this.key = 0;\r\n this.value = \"\";\r\n }\r\n}\r\n\r\nexport class ExportTypeConstant {\r\n public static EXP_TYPE_PDF = 0;\r\n public static EXP_TYPE_XLS = 1;\r\n public static EXP_TYPE_XLSX = 2;\r\n public static EXP_TYPE_DOC = 3;\r\n public static EXP_TYPE_DOCX = 4;\r\n}","export class KeyValueUCSearchObj {\r\n key: number;\r\n value: string;\r\n\r\n constructor() {\r\n this.key = 0;\r\n this.value = \"\";\r\n }\r\n}\r\n\r\nexport class ListKeyValueMonth {\r\n ListOfMonth: Array<KeyValueUCSearchObj>;\r\n constructor() {\r\n this.ListOfMonth = new Array<KeyValueUCSearchObj>();\r\n this.ListOfMonth.push({ key: 1, value: \"January\" });\r\n this.ListOfMonth.push({ key: 2, value: \"February\" });\r\n this.ListOfMonth.push({ key: 3, value: \"March\" });\r\n this.ListOfMonth.push({ key: 4, value: \"April\" });\r\n this.ListOfMonth.push({ key: 5, value: \"May\" });\r\n this.ListOfMonth.push({ key: 6, value: \"June\" });\r\n this.ListOfMonth.push({ key: 7, value: \"July\" });\r\n this.ListOfMonth.push({ key: 8, value: \"August\" });\r\n this.ListOfMonth.push({ key: 9, value: \"September\" });\r\n this.ListOfMonth.push({ key: 10, value: \"October\" });\r\n this.ListOfMonth.push({ key: 11, value: \"November\" });\r\n this.ListOfMonth.push({ key: 12, value: \"December\" });\r\n }\r\n}","import { Component, OnInit, Input, ViewChild, ElementRef, Inject, Renderer2, EventEmitter, Output } from '@angular/core';\r\nimport { Observable } from 'rxjs';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { FormGroup, NgForm } from '@angular/forms';\r\nimport { DatePipe, formatDate } from '@angular/common';\r\nimport { InputSearchObj } from './model/InputSearchObj.Model';\r\nimport { CriteriaObj } from './model/CriteriaObj.model';\r\nimport { RequestCriteriaObj } from './model/RequestCriteriaObj.model';\r\nimport { AdInsConstant } from './model/AdInstConstant';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\nimport { ExcelService } from './services/excel-service/excel-service';\r\nimport { trigger, transition, style, animate, state } from '@angular/animations';\r\nimport { ToastrService } from 'ngx-toastr';\r\nimport { ExportTypeConstant, KeyValueReportObj } from './model/KeyValueReport.model';\r\nimport { CookieService } from 'ngx-cookie';\r\nimport * as CryptoJS from 'crypto-js';\r\nimport { KeyValueUCSearchObj, ListKeyValueMonth } from './model/KeyValueUCSearch.model';\r\n\r\n@Component({\r\n selector: 'lib-UCSearch',\r\n templateUrl: './ucsearch.component.html',\r\n styleUrls: ['./ucsearch.component.css'],\r\n providers: [ExcelService, DatePipe],\r\n animations: [\r\n trigger('changeDivSize', [\r\n state('initial', style({\r\n height: '*',\r\n opacity: '1',\r\n })),\r\n state('final', style({\r\n height: '0px',\r\n opacity: '0',\r\n overflow: 'hidden',\r\n })),\r\n transition('initial=>final', animate('300ms')),\r\n transition('final=>initial', animate('300ms'))\r\n ]),\r\n ]\r\n})\r\nexport class UCSearchComponent implements OnInit {\r\n // trus nad, bisa ga kalo misalkan gw mau bikin\r\n // kalo login di cabang IsSelectOne: true\r\n // kalo login di HO, IsSelectOne: false\r\n @ViewChild('enjiForm') set content(content: NgForm) {\r\n if (content) { // initially setter gets called with undefined\r\n this.searchForm = content;\r\n }\r\n }\r\n\r\n @ViewChild('formIdSearch') myForm: ElementRef;\r\n @Input() searchInput: InputSearchObj = new InputSearchObj();\r\n @Input() pageSize: number = 10;\r\n @Input() isReport: boolean = false;\r\n @Output() result: EventEmitter<any> = new EventEmitter();\r\n @Output() genRpt: EventEmitter<{ ExportType: number, ElRef: ElementRef }> = new EventEmitter<{ ExportType: number, ElRef: ElementRef }>();\r\n ExportTypeList: Array<KeyValueReportObj> = [\r\n {\r\n key: ExportTypeConstant.EXP_TYPE_PDF,\r\n value: \"PDF\"\r\n },\r\n {\r\n key: ExportTypeConstant.EXP_TYPE_XLS,\r\n value: \"Excel 2003\"\r\n },\r\n {\r\n key: ExportTypeConstant.EXP_TYPE_XLSX,\r\n value: \"Excel 2007\"\r\n },\r\n {\r\n key: ExportTypeConstant.EXP_TYPE_DOC,\r\n value: \"Document\"\r\n },\r\n {\r\n key: ExportTypeConstant.EXP_TYPE_DOCX,\r\n value: \"Document XML\"\r\n },\r\n ];\r\n ListOfMonth: ListKeyValueMonth = new ListKeyValueMonth();\r\n ListOfYear: Array<KeyValueUCSearchObj> = new Array<KeyValueUCSearchObj>();\r\n ClaimList: Array<any> = [\r\n {\r\n Key: AdInsConstant.RestrictionIsNotNull,\r\n Value: \"CLAIMED\"\r\n },\r\n {\r\n Key: AdInsConstant.RestrictionIsNull,\r\n Value: \"UNCLAIMED\"\r\n },\r\n ];\r\n\r\n ExportType: number = 0;\r\n\r\n pageNow: any = 1;\r\n configuration: any;\r\n exportData: any;\r\n ExcelData: any;\r\n isDataLoaded: boolean = false;\r\n isHidden: boolean = false;\r\n BisDt: string;\r\n BusinessDt: Date = new Date();\r\n dateWrong: boolean = false;\r\n\r\n currentState = 'initial';\r\n\r\n form: FormGroup;\r\n countForm = 0;\r\n formattedAmount = '';\r\n amount = 0;\r\n apiUrl: string;\r\n arrCrit: any;\r\n searchForm: NgForm;\r\n\r\n constructor(private http: HttpClient, private excelService: ExcelService, private _renderer2: Renderer2,\r\n @Inject(DOCUMENT) private _document, public toastr: ToastrService, private cookieService: CookieService,\r\n private datePipe: DatePipe) {\r\n }\r\n\r\n changeState() {\r\n this.currentState = this.currentState === 'initial' ? 'final' : 'initial';\r\n this.isHidden = this.isHidden === false ? true : false;\r\n }\r\n\r\n ngOnInit() {\r\n console.log(\"ucsearch\");\r\n this.apiUrl = this.searchInput.enviromentUrl + this.searchInput.apiQryPaging;\r\n this.arrCrit = this.searchInput.arrCritObj;\r\n let js = this._renderer2.createElement('script');\r\n js.text = `\r\n $(document).ready(function(){\r\n $(\"#flip\").click(function(){\r\n $(\"#panel\").slideToggle(\"slow\");\r\n });\r\n });\r\n `;\r\n this._renderer2.appendChild(this._document.body, js);\r\n\r\n let value = this.cookieService.get('BusinessDateRaw');\r\n this.BisDt = this.DecryptString(value, \"AdInsFOU12345678\");\r\n this.BusinessDt = new Date(this.BisDt);\r\n this.initiateForm();\r\n }\r\n\r\n initiateForm() {\r\n this.getJSON(this.searchInput._url).subscribe(data => {\r\n this.configuration = data;\r\n this.exportData = data.exportExcel;\r\n if (data.exportTypeList != undefined && data.exportTypeList.length != 0) {\r\n this.ExportTypeList = data.exportTypeList;\r\n this.ExportType = this.ExportTypeList[0].key;\r\n }\r\n\r\n this.countForm = data.component.length;\r\n this.isDataLoaded = true;\r\n\r\n if (this.searchInput.title != undefined && this.searchInput.title != \"\") {\r\n this.configuration.title = this.searchInput.title;\r\n }\r\n\r\n for (var i = 0; i < this.countForm; i++) {\r\n //ini kalau datanya di load dari URL\r\n if (data.component[i].isFromURL == true) {\r\n var request = new RequestCriteriaObj();\r\n var arrayCrit = new Array();\r\n var criteriaObject = new CriteriaObj();\r\n criteriaObject.DataType = \"text\";\r\n criteriaObject.propName = data.component[i].criteriaPropName;\r\n criteriaObject.value = data.component[i].criteriaPropValue;\r\n criteriaObject.restriction = \"eq\";\r\n arrayCrit.push(criteriaObject);\r\n request.criteria = arrayCrit;\r\n request[data.component[i].criteriaPropName] = data.component[i].criteriaPropValue;\r\n\r\n // Pengecekan penggunaan url atau path\r\n if (data.component[i].path != undefined && data.component[i].path != \"\") {\r\n if (this.searchInput.ddlEnvironments != undefined && this.searchInput.ddlEnvironments.length != 0) {\r\n for (let y = 0; y < this.searchInput.ddlEnvironments.length; y++) {\r\n if (data.component[i].name == this.searchInput.ddlEnvironments[y].name) {\r\n data.component[i].fullpath = this.searchInput.ddlEnvironments[y].environment + data.component[i].path;\r\n break;\r\n }\r\n }\r\n } else if (this.searchInput.listEnvironments != undefined && this.searchInput.listEnvironments.length != 0) {\r\n for (let y = 0; y < this.searchInput.listEnvironments.length; y++) {\r\n if (data.component[i].environment == this.searchInput.listEnvironments[y].environment) {\r\n data.component[i].fullpath = this.searchInput.listEnvironments[y].url + data.component[i].path;\r\n break;\r\n }\r\n }\r\n } else {\r\n data.component[i].fullpath = data.component[i].url;\r\n }\r\n\r\n } else {\r\n data.component[i].fullpath = data.component[i].url;\r\n }\r\n //lempar objectnya sekalian sama urlnya, nnti di bind di dalem karena masalah di asyncnya\r\n //biar tiap function ada state2nya sendiri\r\n this.resolveObject(data.component[i], data.component[i].fullpath, request);\r\n }\r\n\r\n if (data.component[i].type == \"numeric\") {\r\n data.component[i].value = parseFloat(data.component[i].value).toLocaleString('en');\r\n }\r\n\r\n //pengecekan ddl\r\n if (data.component[i].type == \"dropdown\") {\r\n if (data.component[i].dtmType != undefined) {\r\n if (data.component[i].dtmType == \"month\") {\r\n if (data.component[i].value != undefined && data.component[i].value.includes(\"BD\")) {\r\n data.component[i].value = this.BusinessDt.getMonth() + 1;\r\n }\r\n data.component[i].items = this.ListOfMonth.ListOfMonth;\r\n }\r\n if (data.component[i].dtmType.includes(\"year\")) {\r\n if (data.component[i].value != undefined && data.component[i].value.includes(\"BD\")) {\r\n data.component[i].value = this.BusinessDt.getFullYear();\r\n }\r\n data.component[i].items = this.setYearDDL(data.component[i].dtmType);\r\n }\r\n }\r\n }\r\n\r\n //pengecekan tanggal\r\n if (data.component[i].type == \"datepicker\") {\r\n if (data.component[i].value.includes(\"BD\")) {\r\n let businessDate = new Date();\r\n if (this.BisDt != null) {\r\n businessDate = new Date(this.BisDt);\r\n }\r\n var operator = data.component[i].value.charAt(2);\r\n var dateShow = new Date();\r\n if (operator == \"-\") {\r\n var tempMinus = data.component[i].value.split(\"-\", 2);\r\n var numDay = parseInt(tempMinus[1]);\r\n businessDate.setDate(businessDate.getDate() - numDay);\r\n }\r\n else if (operator == \"+\") {\r\n var tempMinus = data.component[i].value.split(\"+\", 2);\r\n var numDay = parseInt(tempMinus[1]);\r\n businessDate.setDate(businessDate.getDate() + numDay);\r\n }\r\n dateShow = businessDate;\r\n var dateText = formatDate(dateShow, 'yyyy-MM-dd', 'en-US')\r\n data.component[i].value = dateText;\r\n }\r\n\r\n if (data.component[i].restriction != undefined && data.component[i].restriction != \"\") {\r\n if (data.component[i].restriction.toUpperCase() == \"GT\") {\r\n let minDate = new Date(this.datePipe.transform(data.component[i].minDate, 'yyyy-MM-dd'));\r\n minDate.setDate(minDate.getDate() + 1);\r\n data.component[i].minDate = minDate;\r\n } else if (data.component[i].restriction.toUpperCase() == \"LT\") {\r\n let maxDate = new Date(this.datePipe.transform(data.component[i].maxDate, 'yyyy-MM-dd'));\r\n maxDate.setDate(maxDate.getDate() - 1);\r\n data.component[i].maxDate = maxDate;\r\n }\r\n }\r\n }\r\n }\r\n\r\n setTimeout(() => {\r\n for (let j = 0; j < this.countForm; j++) {\r\n if (data.component[j].isEvent == true && this.configuration.component[j].itemsUrl.length == 1) {\r\n this.onChangeEvent(data.component[j].itemsUrl[0].Key, data.component[j]);\r\n }\r\n }\r\n }, 1000);\r\n });\r\n }\r\n\r\n setYearDDL(year) {\r\n this.ListOfYear = new Array<KeyValueUCSearchObj>();\r\n let equation = year.match(\"[\\\\/+][-]|[-][\\\\/+]|\\\\/+|-\");\r\n let toMin: number = this.BusinessDt.getFullYear();\r\n let toMax: number = this.BusinessDt.getFullYear();\r\n let minMax: number = parseInt(year.substring(equation.index + equation[0].length));\r\n this.ListOfYear.push({ key: this.BusinessDt.getFullYear(), value: this.BusinessDt.getFullYear().toString() });\r\n\r\n for (let q = 0; q < minMax; q++) {\r\n if (equation[0] == \"-+\" || equation[0] == \"+-\") {\r\n toMin--;\r\n toMax++;\r\n this.ListOfYear.push({ key: toMin, value: toMin.toString() }, { key: toMax, value: toMax.toString() });\r\n } else if (equation[0] == \"-\") {\r\n toMin--;\r\n this.ListOfYear.push({ key: toMin, value: toMin.toString() });\r\n } else if (equation[0] == \"+\") {\r\n toMax++;\r\n this.ListOfYear.push({ key: toMax, value: toMax.toString() });\r\n }\r\n }\r\n this.ListOfYear.sort((a, b) => {\r\n return a.key - b.key;\r\n });\r\n return this.ListOfYear;\r\n }\r\n\r\n public getJSON(url: string): Observable<any> {\r\n return this.http.get(url);\r\n }\r\n\r\n public postJSON(url: string, criteria: any = null): Observable<any> {\r\n return this.http.post(url, criteria);\r\n }\r\n\r\n searchClick() {\r\n // for(let i=0;i<this.countForm;i++){\r\n // if(this.configuration.component[i].type == \"datepicker\"){\r\n // if ((i != (this.countForm-1)) && (this.configuration.component[i].name != this.configuration.component[i+1].name)){\r\n // this.checkInputDate(this.configuration.component[i]);\r\n // }\r\n // }\r\n // }\r\n // if(this.dateWrong) return;\r\n\r\n let order = null;\r\n if (this.configuration.orderby != null) {\r\n order = {\r\n key: this.configuration.orderby.key,\r\n value: this.configuration.orderby.value\r\n }\r\n }\r\n this.pageNow = 1;\r\n this.search(this.apiUrl, this.pageNow, this.pageSize, order, this.arrCrit);\r\n }\r\n\r\n reset() {\r\n this.searchForm.resetForm();\r\n this.ExportType = this.ExportTypeList[0].key;\r\n this.initiateForm();\r\n }\r\n\r\n search(apiUrl: string, pageNo: number, rowPerPage: number, orderBy: any, addCrit: CriteriaObj[] = new Array()) {\r\n let request = new RequestCriteriaObj();\r\n let arrCrit = new Array();\r\n let IsQueryIn = false;\r\n let IsBreak = false;\r\n\r\n // Inject whereQuery for where criteria\r\n if (this.searchInput.whereValue != undefined && this.searchInput.whereValue.length != 0) {\r\n this.configuration.querystring.whereQuery = new Array<any>();\r\n for (let x = 0; x < this.searchInput.whereValue.length; x++) {\r\n this.configuration.querystring.whereQuery.push(this.searchInput.whereValue[x].value);\r\n }\r\n }\r\n request.pageNo = pageNo;\r\n request.rowPerPage = rowPerPage;\r\n request.orderBy = orderBy;\r\n request.queryString = this.configuration.querystring;\r\n\r\n for (let i = 0; i < this.countForm; i++) {\r\n let critObj = new CriteriaObj();\r\n let component = this.myForm.nativeElement[i];\r\n\r\n // // popup message if required\r\n // if (component.getAttribute('data-required') != null && component.getAttribute('data-required') == \"true\") {\r\n // let val = component.value.trim();\r\n // if (val == \"\") {\r\n // IsBreak = true;\r\n // let label = component.getAttribute('label');\r\n // this.toastr.warning(\"Please input \" + label);\r\n // break;\r\n // }\r\n // }\r\n\r\n critObj.DataType = component.getAttribute('data-type');\r\n //Ini khusus kalau dari Drop Down\r\n if (component.getAttribute('query-in') != null && component.getAttribute('query-in') == \"true\") {\r\n IsQueryIn = true;\r\n }\r\n else {\r\n IsQueryIn = false;\r\n }\r\n if (component.value != \"\") {\r\n if (component.nodeName == 'SELECT') {\r\n let ddl = component.options;\r\n let text = ddl[ddl.selectedIndex].value.trim();\r\n if (text == \"one\") {\r\n IsBreak = true;\r\n let label = component.getAttribute('label');\r\n this.toastr.warning(\"Please select \" + label);\r\n break;\r\n }\r\n\r\n if (this.configuration.component[i].type == \"claim\") {\r\n critObj.propName = component.getAttribute('data-name');\r\n critObj.restriction = text;\r\n critObj.value = null;\r\n if (component.getAttribute('data-crit-datatable') != \"\" && component.getAttribute('data-crit-datatable') != null) {\r\n critObj.isCriteriaDataTable = component.getAttribute('data-crit-datatable');\r\n }\r\n arrCrit.push(critObj);\r\n } else {\r\n if (text != \"all\" && text != \"one\") {\r\n //Kalau Dari Dropdown udah pasti pake Eq\r\n critObj.restriction = AdInsConstant.RestrictionEq;\r\n if (component.name != \"\") {\r\n critObj.propName = component.name;\r\n } else {\r\n critObj.propName = component.getAttribute('ng-reflect-name');\r\n }\r\n critObj.value = text;\r\n arrCrit.push(critObj);\r\n } else if (text == \"all\" && IsQueryIn == true && component.options.length != 0) {\r\n let ddlList = new Array();\r\n for (let x = 0; x < component.options.length; x++) {\r\n if (x != 0) {\r\n ddlList.push(component.options[x].value);\r\n }\r\n }\r\n if (ddlList.length != 0) {\r\n critObj.restriction = AdInsConstant.RestrictionIn;\r\n if (component.name != \"\") {\r\n critObj.propName = component.name;\r\n } else {\r\n critObj.propName = component.getAttribute('ng-reflect-name');\r\n }\r\n critObj.listValue = ddlList;\r\n arrCrit.push(critObj);\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n //Kalau ada Percent maka yang dipake nnti adalah Restrictions Like\r\n if (component.name != \"\") {\r\n critObj.propName = component.name;\r\n } else {\r\n critObj.propName = component.getAttribute('data-name');\r\n }\r\n critObj.value = component.value.trim();\r\n if (component.value.includes(\"%\")) {\r\n critObj.restriction = AdInsConstant.RestrictionLike;\r\n }\r\n //kalau componentnya Date, restrictionsnya lgsg ambil dari property JSONnya\r\n else if (component.getAttribute('data-restriction') != \"\" && component.getAttribute('data-restriction') != null) {\r\n critObj.restriction = component.getAttribute('data-restriction');\r\n if (component.getAttribute('data-type') == 'numeric') {\r\n critObj.value = parseFloat(component.value.replace(/,/g, '')).toString();\r\n }\r\n if (critObj.restriction.toUpperCase() == \"LIKE\") {\r\n critObj.value = \"%\" + component.value.trim() + \"%\";\r\n critObj.restriction = AdInsConstant.RestrictionLike\r\n }\r\n }\r\n else {\r\n critObj.restriction = AdInsConstant.RestrictionEq\r\n }\r\n if (component.getAttribute('data-crit-datatable') != \"\" && component.getAttribute('data-crit-datatable') != null) {\r\n critObj.isCriteriaDataTable = component.getAttribute('data-crit-datatable');\r\n }\r\n arrCrit.push(critObj);\r\n }\r\n }\r\n }\r\n\r\n if (IsBreak) {\r\n return;\r\n }\r\n\r\n if (addCrit != null && addCrit != undefined) {\r\n if (addCrit.length != 0) {\r\n for (var i = 0; i < addCrit.length; i++) {\r\n arrCrit.push(addCrit[i]);\r\n }\r\n } else if (this.searchInput.addCritInput != null || this.searchInput.addCritInput != undefined) {\r\n for (var i = 0; i < this.searchInput.addCritInput.length; i++) {\r\n arrCrit.push(this.searchInput.addCritInput[i]);\r\n }\r\n }\r\n }\r\n else if (this.searchInput.addCritInput != null || this.searchInput.addCritInput != undefined) {\r\n for (var i = 0; i < this.searchInput.addCritInput.length; i++) {\r\n arrCrit.push(this.searchInput.addCritInput[i]);\r\n }\r\n }\r\n\r\n request.criteria = arrCrit;\r\n\r\n if (!this.searchInput.isJoinExAPI) {\r\n request.integrationObj = null;\r\n } else {\r\n request.integrationObj = this.searchInput.integrationObj;\r\n }\r\n\r\n this.http.post(apiUrl, request).subscribe((response) => {\r\n let qryPaging = {\r\n response: response,\r\n pageNow: pageNo\r\n }\r\n console.log(qryPaging);\r\n this.result.emit(qryPaging);\r\n return response;\r\n });\r\n }\r\n\r\n GenerateReport() {\r\n this.genRpt.emit({ ExportType: this.ExportType, ElRef: this.myForm });\r\n }\r\n\r\n lessThanFour(): boolean {\r\n if (this.countForm > 3) {\r\n return false;\r\n }\r\n else {\r\n return true;\r\n }\r\n }\r\n\r\n resolveObject(obj: any, url: string, crit: RequestCriteriaObj = null) {\r\n const val = this.postJSON(url, crit);\r\n val.subscribe(tempData => {\r\n obj.itemsUrl = new Array();\r\n obj.itemsUrl = tempData.ReturnObject;\r\n\r\n if(obj.exclude != undefined && obj.exclude != \"\"){\r\n obj.itemsUrl = obj.itemsUrl.filter((value) => !obj.exclude.includes(value.Key));\r\n }\r\n });\r\n }\r\n\r\n transformAmount(element: any) {\r\n this.formattedAmount = parseFloat(element.target.value).toLocaleString('en');\r\n // to show the formatted amount in the textbox.\r\n element.target.value = this.formattedAmount;\r\n }\r\n\r\n transformToDecimal(element: any) {\r\n element.target.value = parseFloat(element.target.value.toString().replace(/,/g, ''));\r\n }\r\n\r\n exportAsXLSX(): void {\r\n var request = new RequestCriteriaObj();\r\n request.pageNo = 1;\r\n request.rowPerPage = 9999;\r\n request.orderBy = null;\r\n request.criteria = [];\r\n request.queryString = this.configuration.querystring;\r\n if (!this.searchInput.isJoinExAPI) {\r\n request.integrationObj = null;\r\n } else {\r\n request.integrationObj = this.searchInput.integrationObj;\r\n }\r\n\r\n this.http.post(this.apiUrl, request).subscribe(\r\n response => {\r\n this.ExcelData = response[\"Data\"];\r\n this.excelService.exportAsExcelFile(this.ExcelData, 'sample');\r\n },\r\n (error) => {\r\n console.log(error);\r\n });\r\n }\r\n\r\n onChangeEvent(optValue, afFilter) {\r\n var jsonComp = this.configuration.component;\r\n\r\n for (var i = 0; i < afFilter.affectedFilter.length; i++) {\r\n for (var j = 0; j < jsonComp.length; j++) {\r\n if (jsonComp[j].name == afFilter.affectedFilter[i]) {\r\n var request = new RequestCriteriaObj();\r\n var arrayCrit = new Array();\r\n\r\n if (optValue != \"all\" && optValue != \"one\") {\r\n var critObj = new CriteriaObj();\r\n critObj.DataType = afFilter.datatype;\r\n if (afFilter.filterPropName != undefined || afFilter.filterPropName != \"\") {\r\n request[afFilter.filterPropName] = optValue;\r\n critObj.propName = afFilter.filterPropName;\r\n } else {\r\n critObj.propName = afFilter.name;\r\n request[afFilter.name] = optValue;\r\n }\r\n critObj.value = optValue;\r\n critObj.restriction = AdInsConstant.RestrictionEq;\r\n arrayCrit.push(critObj);\r\n }\r\n request.criteria = arrayCrit;\r\n if (jsonComp[j].path != undefined && jsonComp[j].path != \"\") {\r\n if (this.searchInput.ddlEnvironments != undefined && this.searchInput.ddlEnvironments.length != 0) {\r\n for (let y = 0; y < this.searchInput.ddlEnvironments.length; y++) {\r\n if (jsonComp[j].name == this.searchInput.ddlEnvironments[y].name) {\r\n jsonComp[j].fullpath = this.searchInput.ddlEnvironments[y].environment + jsonComp[j].path;\r\n break;\r\n }\r\n }\r\n } else if (this.searchInput.listEnvironments != undefined && this.searchInput.listEnvironments.length != 0) {\r\n for (let y = 0; y < this.searchInput.listEnvironments.length; y++) {\r\n if (jsonComp.component[j].environment == this.searchInput.listEnvironments[y].environment) {\r\n jsonComp.component[j].fullpath = this.searchInput.listEnvironments[y].url + jsonComp.component[j].path;\r\n break;\r\n }\r\n }\r\n } else {\r\n jsonComp[j].fullpath = jsonComp[j].url;\r\n }\r\n\r\n } else {\r\n jsonComp[j].fullpath = jsonComp[j].url;\r\n }\r\n this.resolveObject(jsonComp[j], jsonComp[j].fullpath, request);\r\n }\r\n }\r\n }\r\n }\r\n\r\n switchCase(condList) {\r\n var condition = false;\r\n\r\n for (var i = 0; i < condList.conditions.length; i++) {\r\n var idx = this.searchInput.switchValue.findIndex(x => x.property == condList.conditions[i].property);\r\n if (condList.conditions[i].restriction == \"EQ\") {\r\n if (condList.conditions[i].isUser != true) {\r\n if (this.searchInput.switchValue[idx].value == condList.conditions[i].value) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n } else {\r\n var username = localStorage.getItem(\"Username\");\r\n if (this.searchInput.switchValue[idx].value == username) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n }\r\n } else if (condList.conditions[i].restriction == \"NEQ\") {\r\n if (condList.conditions[i].isUser != true) {\r\n if (this.searchInput.switchValue[idx].value != condList.conditions[i].value) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n } else {\r\n var username = localStorage.getItem(\"Username\");\r\n if (this.searchInput.switchValue[idx].value != username) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n }\r\n } else if (condList.conditions[i].restriction == \"GT\") {\r\n if (condList.conditions[i].isUser != true) {\r\n if (this.searchInput.switchValue[idx].value > condList.conditions[i].value) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n } else {\r\n var username = localStorage.getItem(\"Username\");\r\n if (this.searchInput.switchValue[idx].value > username) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n }\r\n } else if (condList.conditions[i].restriction == \"GTE\") {\r\n if (condList.conditions[i].isUser != true) {\r\n if (this.searchInput.switchValue[idx].value >= condList.conditions[i].value) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n } else {\r\n var username = localStorage.getItem(\"Username\");\r\n if (this.searchInput.switchValue[idx].value >= username) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n }\r\n } else if (condList.conditions[i].restriction == \"LT\") {\r\n if (condList.conditions[i].isUser != true) {\r\n if (this.searchInput.switchValue[idx].value < condList.conditions[i].value) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n } else {\r\n var username = localStorage.getItem(\"Username\");\r\n if (this.searchInput.switchValue[idx].value < username) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n }\r\n } else if (condList.conditions[i].restriction == \"LTE\") {\r\n if (condList.conditions[i].isUser != true) {\r\n if (this.searchInput.switchValue[idx].value <= condList.conditions[i].value) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n } else {\r\n var username = localStorage.getItem(\"Username\");\r\n if (this.searchInput.switchValue[idx].value <= username) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n return condition;\r\n\r\n }\r\n\r\n private DecryptString(chipperText: string, chipperKey: string) {\r\n if (\r\n chipperKey == undefined || chipperKey.trim() == '' ||\r\n chipperText == undefined || chipperText.trim() == ''\r\n ) return chipperText;\r\n var chipperKeyArr = CryptoJS.enc.Utf8.parse(chipperKey);\r\n var iv = CryptoJS.lib.WordArray.create([0x00, 0x00, 0x00, 0x00]);\r\n var decrypted = CryptoJS.AES.decrypt(chipperText, chipperKeyArr, { iv: iv });\r\n var plainText = decrypted.toString(CryptoJS.enc.Utf8);\r\n return plainText;\r\n }\r\n\r\n checkInputDate(component: any) {\r\n let minDateVal;\r\n let maxDateVal;\r\n let label;\r\n let errorMessage = new Array<string>();\r\n\r\n let MinComponent = this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == \"GTE\")) == undefined ? this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == \"GT\")) : this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == \"GTE\"));\r\n if (MinComponent != undefined) {\r\n minDateVal = this.myForm.nativeElement[MinComponent.id].min == \"\" ? null : new Date(this.myForm.nativeElement[MinComponent.id].min);\r\n label = MinComponent.label.split(\">\", 2);\r\n if (minDateVal != null) {\r\n if (MinComponent.restriction.toUpperCase() == \"GT\") {\r\n minDateVal.setDate(minDateVal.getDate() - 1);\r\n errorMessage.push(\" must be greater than \");\r\n } else if (MinComponent.restriction.toUpperCase() == \"GTE\") {\r\n errorMessage.push(\" must be greater than or equals to \");\r\n }\r\n }\r\n }\r\n\r\n let MaxComponent = this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == \"LTE\")) == undefined ? this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == \"LT\")) : this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == \"LTE\"));\r\n if (MaxComponent != undefined) {\r\n maxDateVal = this.myForm.nativeElement[MaxComponent.id].max == \"\" ? null : new Date(this.myForm.nativeElement[MaxComponent.id].max);\r\n label = MaxComponent.label.split(\"<\", 2);\r\n if (maxDateVal != null) {\r\n if (MaxComponent.restriction.toUpperCase() == \"LT\") {\r\n maxDateVal.setDate(maxDateVal.getDate() + 1);\r\n errorMessage.push(\" must be less than \");\r\n } else if (MaxComponent.restriction.toUpperCase() == \"LTE\") {\r\n errorMessage.push(\" must be less than or equals to \");\r\n }\r\n }\r\n }\r\n\r\n if (minDateVal != null && maxDateVal == null && new Date(this.myForm.nativeElement[MinComponent.id].value) < minDateVal) {\r\n this.toastr.warning(label[0] + errorMessage[0] + formatDate(minDateVal, 'dd MMMM yyyy', 'en-US') + \".\")\r\n this.dateWrong = true;\r\n } else if (maxDateVal != null && minDateVal == null && new Date(this.myForm.nativeElement[MaxComponent.id].value) > maxDateVal) {\r\n this.toastr.warning(label[0] + errorMessage[0] + formatDate(maxDateVal, 'dd MMMM yyyy', 'en-US') + \".\")\r\n this.dateWrong = true;\r\n } else if (minDateVal != null && maxDateVal != null) {\r\n if (new Date(this.myForm.nativeElement[MaxComponent.id].value) > maxDateVal || new Date(this.myForm.nativeElement[MinComponent.id].value) < minDateVal) {\r\n this.toastr.warning(label[0] + errorMessage[0] + formatDate(minDateVal, 'dd MMMM yyyy', 'en-US') + \" and\" + errorMessage[1] + formatDate(maxDateVal, 'dd MMMM yyyy', 'en-US') + \".\")\r\n this.dateWrong = true;\r\n } else {\r\n this.dateWrong = false;\r\n }\r\n } else {\r\n this.dateWrong = false;\r\n }\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { UCSearchComponent } from './ucsearch.component';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { CurrencyMaskInputMode, NgxCurrencyModule } from 'ngx-currency';\r\nimport { TranslateModule } from '@ngx-translate/core';\r\nimport { UcShowErrorsModule } from '@adins/uc-show-errors';\r\nimport { UcDirectiveUpperCaseModule } from '@adins/uc-directive-upper-case';\r\n\r\nexport const customCurrencyMaskConfig = { \r\n align: \"right\",\r\n allowNegative: false,\r\n allowZero: true,\r\n decimal: \".\",\r\n precision: 2,\r\n prefix: \"\",\r\n suffix: \"\",\r\n thousands: \",\",\r\n nullable: false,\r\n inputMode: CurrencyMaskInputMode.NATURAL };\r\n\r\n@NgModule({\r\n declarations: [UCSearchComponent],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n UcShowErrorsModule,\r\n UcDirectiveUpperCaseModule,\r\n NgxCurrencyModule.forRoot(customCurrencyMaskConfig),\r\n TranslateModule.forChild()\r\n ],\r\n exports: [UCSearchComponent]\r\n})\r\nexport class UCSearchModule { }\r\n"]}
|
|
1
|
+
{"version":3,"sources":["ng://@adins/ucsearch/lib/ucsearch.service.ts","ng://@adins/ucsearch/lib/model/AdInstConstant.ts","ng://@adins/ucsearch/lib/model/IntegrationObj.model.ts","ng://@adins/ucsearch/lib/model/InputSearchObj.Model.ts","ng://@adins/ucsearch/lib/model/CriteriaObj.model.ts","ng://@adins/ucsearch/lib/model/RequestCriteriaObj.model.ts","ng://@adins/ucsearch/lib/services/excel-service/excel-service.ts","ng://@adins/ucsearch/lib/model/KeyValueReport.model.ts","ng://@adins/ucsearch/lib/model/KeyValueUCSearch.model.ts","ng://@adins/ucsearch/lib/ucsearch.component.ts","ng://@adins/ucsearch/lib/ucsearch.module.ts"],"names":["UCSearchService","Injectable","args","providedIn","AdInsConstant","RestrictionBetween","RestrictionLike","RestrictionEq","RestrictionNeq","RestrictionGt","RestrictionGte","RestrictionLt","RestrictionLte","RestrictionIn","RestrictionNotIn","RestrictionOr","RestrictionOrNeq","RestrictionIsNull","RestrictionIsNotNull","RestrictionGTE","RestrictionLTE","showData","JoinTypeInner","JoinTypeLeft","IntegrationObj","this","baseUrl","apiPath","requestObj","Object","leftColumnToJoin","rightColumnToJoin","joinType","InputSearchObj","_url","enviromentUrl","title","apiQryPaging","arrCritObj","addCritInput","Array","ddlEnvironments","listEnvironments","whereValue","switchValue","integrationObj","isJoinExAPI","CriteriaObj","low","high","DataType","isCriteriaDataTable","RequestCriteriaObj","includeCount","includeData","isLoading","queryString","rowVersion","ExcelService","prototype","exportAsExcelFile","json","excelFileName","worksheet","XLSX.utils","json_to_sheet","console","log","workbook","Sheets","data","SheetNames","excelBuffer","XLSX.write","bookType","type","saveAsExcelFile","buffer","fileName","Blob","FileSaver.saveAs","Date","getTime","ExportTypeConstant","EXP_TYPE_PDF","EXP_TYPE_XLS","EXP_TYPE_XLSX","EXP_TYPE_DOC","EXP_TYPE_DOCX","ListKeyValueMonth","ListOfMonth","push","key","value","UCSearchComponent","defineProperty","content","searchForm","changeState","currentState","isHidden","ngOnInit","apiUrl","searchInput","arrCrit","js","_renderer2","createElement","text","appendChild","_document","body","cookieService","get","BisDt","DecryptString","BusinessDt","initiateForm","_this","getJSON","subscribe","configuration","exportData","exportExcel","exportTypeList","undefined","length","ExportTypeList","ExportType","countForm","component","isDataLoaded","i","isFromURL","request","arrayCrit","criteriaObject","propName","criteriaPropName","criteriaPropValue","restriction","criteria","path","y","name","fullpath","environment","url","resolveObject","parseFloat","toLocaleString","dtmType","includes","getMonth","items","getFullYear","setYearDDL","ddlType","SetProcessKey","SetRoleOfficeCodes","businessDate","operator","charAt","dateShow","tempMinus","split","numDay","parseInt","setDate","getDate","dateText","formatDate","toUpperCase","minDate","datePipe","transform","maxDate","setTimeout","j","isEvent","itemsUrl","onChangeEvent","Key","roleCode","listOfficeRoleCodes","index","element","ddl","myForm","nativeElement","options","selectedIndex","trim","year","ListOfYear","equation","match","toMin","toMax","minMax","substring","toString","q","sort","a","b","http","postJSON","post","searchClick","order","orderby","pageNow","search","pageSize","reset","resetForm","pageNo","rowPerPage","orderBy","addCrit","IsQueryIn","IsBreak","querystring","whereQuery","x","i_1","critObj","getAttribute","nodeName","label","toastr","warning","ddlList","listValue","replace","response","qryPaging","result","emit","GenerateReport","genRpt","ElRef","lessThanFour","obj","crit","tempData","ReturnObject","exclude","filter","transformAmount","formattedAmount","target","transformToDecimal","exportAsXLSX","ExcelData","excelService","error","optValue","afFilter","jsonComp","affectedFilter","datatype","filterPropName","idx","text_1","selectedMappingCode","find","switchCase","condList","condition","conditions","findIndex","property","isUser","username","localStorage","getItem","chipperText","chipperKey","chipperKeyArr","CryptoJS.enc","Utf8","parse","iv","CryptoJS.lib","WordArray","create","CryptoJS.AES","decrypt","checkInputDate","minDateVal","maxDateVal","errorMessage","MinComponent","id","min","MaxComponent","max","dateWrong","Component","selector","template","providers","DatePipe","animations","trigger","state","style","height","opacity","overflow","transition","animate","HttpClient","Renderer2","Inject","DOCUMENT","ToastrService","CookieService","ViewChild","Input","Output","isReport","EventEmitter","ClaimList","Value","amount","customCurrencyMaskConfig","align","allowNegative","allowZero","decimal","precision","prefix","suffix","thousands","nullable","inputMode","CurrencyMaskInputMode","NATURAL","UCSearchModule","NgModule","declarations","imports","CommonModule","FormsModule","UcShowErrorsModule","UcDirectiveUpperCaseModule","NgxCurrencyModule","forRoot","TranslateModule","forChild","exports"],"mappings":"8nCAAA,IAAAA,uBAECC,EAAAA,WAAUC,KAAA,CAAC,CACVC,WAAY,uJAIZ,SAAAH,KCLF,IAAAI,GACkBA,EAAAC,mBAAqB,UACrBD,EAAAE,gBAAkB,OAClBF,EAAA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8S,OAAS,EClGX,IAAaC,EAA2B,CACtCC,MAAO,QACPC,eAAe,EACfC,WAAW,EACXC,QAAS,IACTC,UAAW,EACXC,OAAQ,GACRC,OAAQ,GACRC,UAAW,IACXC,UAAU,EACVC,UAAWC,EAAAA,sBAAsBC,SAEnCC,uBAACC,EAAAA,SAAQpV,KAAA,CAAC,CACRqV,aAAc,CAACzP,GACf0P,QAAS,CACPC,EAAAA,aACAC,EAAAA,YACAC,EAAAA,mBACAC,EAAAA,2BACAC,EAAAA,kBAAkBC,QAAQtB,GAC1BuB,EAAAA,gBAAgBC,YAElBC,QAAS,CAACnQ,OAEkBuP,GAZ9B,SAAAA","sourcesContent":["import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class UCSearchService {\r\n\r\n constructor() { }\r\n}\r\n","import { formatDate } from \"@angular/common\";\r\n\r\nexport class AdInsConstant {\r\n public static RestrictionBetween = \"Between\"\r\n public static RestrictionLike = \"Like\";\r\n public static RestrictionEq = \"Eq\";\r\n public static RestrictionNeq = \"NEQ\";\r\n public static RestrictionGt = \"GT\";\r\n public static RestrictionGte = \"GTE\";\r\n public static RestrictionLt = \"LT\";\r\n public static RestrictionLte = \"LTE\";\r\n public static RestrictionIn = \"IN\";\r\n public static RestrictionNotIn = \"NotIn\";\r\n public static RestrictionOr = \"Or\"; //pastikan ada 1 criteria sebelumnya\r\n public static RestrictionOrNeq = \"OrNeq\"; //pastikan ada 1 criteria sebelumnya\r\n public static RestrictionIsNull = \"ISNULL\";\r\n public static RestrictionIsNotNull = \"ISNOTNULL\";\r\n public static RestrictionGTE = \"GTE\";\r\n public static RestrictionLTE = \"LTE\";\r\n public static showData = \"10,50,100\";\r\n public static JoinTypeInner = \"INNER\";\r\n public static JoinTypeLeft = \"LEFT\";\r\n}\r\n","import { AdInsConstant } from \"./AdInstConstant\";\r\nexport class IntegrationObj {\r\n baseUrl: string;\r\n apiPath: string;\r\n requestObj: Object;\r\n leftColumnToJoin: string;\r\n rightColumnToJoin: string;\r\n joinType: string;\r\n \r\n constructor() {\r\n this.baseUrl = \"\";\r\n this.apiPath = \"\";\r\n this.requestObj = new Object();\r\n this.leftColumnToJoin = \"\";\r\n this.rightColumnToJoin = \"\";\r\n this.joinType = AdInsConstant.JoinTypeInner;\r\n }\r\n}","import { CriteriaObj } from \"./CriteriaObj.model\";\r\nimport { IntegrationObj } from \"./IntegrationObj.model\";\r\n \r\nexport class InputSearchObj {\r\n _url: string;\r\n enviromentUrl: string;\r\n title: string;\r\n apiQryPaging: string;\r\n arrCritObj: any;\r\n addCritInput: Array<CriteriaObj>;\r\n ddlEnvironments: Array<EnviObj>;\r\n listEnvironments: Array<EnvisObj>;\r\n whereValue: Array<WhereValueObj>;\r\n switchValue: Array<SwitchValueObj>;\r\n integrationObj: IntegrationObj;\r\n isJoinExAPI: boolean;\r\n \r\n constructor() {\r\n this._url = \"\";\r\n this.enviromentUrl = \"\";\r\n this.title = \"\";\r\n this.apiQryPaging = \"\";\r\n this.arrCritObj = null;\r\n this.addCritInput = new Array<CriteriaObj>();\r\n this.ddlEnvironments = new Array<EnviObj>();\r\n this.listEnvironments = new Array<EnvisObj>();\r\n this.whereValue = new Array<WhereValueObj>();\r\n this.switchValue = new Array<SwitchValueObj>();\r\n this.integrationObj = new IntegrationObj();\r\n this.isJoinExAPI = false;\r\n }\r\n}\r\n\r\nexport class EnviObj {\r\n name: string;\r\n environment: string;\r\n\r\n constructor() {\r\n this.name = \"\";\r\n this.environment = \"\";\r\n }\r\n}\r\n\r\nexport class WhereValueObj {\r\n property: string;\r\n value: any;\r\n\r\n constructor() {\r\n this.property = \"\";\r\n }\r\n}\r\n\r\nexport class SwitchValueObj {\r\n property: string;\r\n value: any;\r\n\r\n constructor() {\r\n this.property = \"\";\r\n }\r\n}\r\n\r\nexport class EnvisObj {\r\n environment: string;\r\n url: string;\r\n\r\n constructor() {\r\n this.environment = \"\";\r\n this.url = \"\";\r\n }\r\n}","export class CriteriaObj { \r\n propName: string;\r\n restriction: string;\r\n value: string;\r\n low: number;\r\n high: number;\r\n DataType: string;\r\n listValue: Array<any>;\r\n isCriteriaDataTable: boolean;\r\n\r\n constructor() {\r\n this.low = 0;\r\n this.high = 0;\r\n this.DataType = 'Text';\r\n this.isCriteriaDataTable = false;\r\n }\r\n\r\n}","import { AdInsConstant } from \"./AdInstConstant\";\r\nimport { CriteriaObj } from \"./CriteriaObj.model\";\r\nimport { IntegrationObj } from \"./IntegrationObj.model\";\r\n \r\nexport class RequestCriteriaObj{\r\n includeCount:boolean;\r\n includeData:boolean;\r\n pageNo:number;\r\n rowPerPage:number;\r\n orderBy:any;\r\n criteria:CriteriaObj[];\r\n isLoading : boolean;\r\n queryString: any;\r\n rowVersion: any;\r\n integrationObj: IntegrationObj;\r\n joinType: string;\r\n\r\n constructor()\r\n {\r\n this.includeCount=true;\r\n this.includeData=true;\r\n this.isLoading = true;\r\n this.queryString = '';\r\n this.rowVersion = '';\r\n this.integrationObj = new IntegrationObj();\r\n this.joinType = AdInsConstant.JoinTypeInner;\r\n }\r\n}","import { Injectable } from '@angular/core';\r\nimport * as FileSaver from 'file-saver';\r\nimport * as XLSX from 'xlsx';\r\n\r\nconst EXCEL_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8';\r\nconst EXCEL_EXTENSION = '.xlsx';\r\n\r\n@Injectable()\r\nexport class ExcelService {\r\n\r\n constructor() { }\r\n\r\n public exportAsExcelFile(json: any[], excelFileName: string): void {\r\n \r\n const worksheet: XLSX.WorkSheet = XLSX.utils.json_to_sheet(json);\r\n console.log('worksheet',worksheet);\r\n const workbook: XLSX.WorkBook = { Sheets: { 'data': worksheet }, SheetNames: ['data'] };\r\n const excelBuffer: any = XLSX.write(workbook, { bookType: 'xlsx', type: 'array' });\r\n //const excelBuffer: any = XLSX.write(workbook, { bookType: 'xlsx', type: 'buffer' });\r\n this.saveAsExcelFile(excelBuffer, excelFileName);\r\n }\r\n\r\n private saveAsExcelFile(buffer: any, fileName: string): void {\r\n const data: Blob = new Blob([buffer], {\r\n type: EXCEL_TYPE\r\n });\r\n FileSaver.saveAs(data, fileName + '_export_' + new Date().getTime() + EXCEL_EXTENSION);\r\n }\r\n\r\n}","export class KeyValueReportObj {\r\n key: number;\r\n value: string;\r\n\r\n constructor() {\r\n this.key = 0;\r\n this.value = \"\";\r\n }\r\n}\r\n\r\nexport class ExportTypeConstant {\r\n public static EXP_TYPE_PDF = 0;\r\n public static EXP_TYPE_XLS = 1;\r\n public static EXP_TYPE_XLSX = 2;\r\n public static EXP_TYPE_DOC = 3;\r\n public static EXP_TYPE_DOCX = 4;\r\n}","export class KeyValueUCSearchObj {\r\n key: number;\r\n value: string;\r\n\r\n constructor() {\r\n this.key = 0;\r\n this.value = \"\";\r\n }\r\n}\r\n\r\nexport class ListKeyValueMonth {\r\n ListOfMonth: Array<KeyValueUCSearchObj>;\r\n constructor() {\r\n this.ListOfMonth = new Array<KeyValueUCSearchObj>();\r\n this.ListOfMonth.push({ key: 1, value: \"January\" });\r\n this.ListOfMonth.push({ key: 2, value: \"February\" });\r\n this.ListOfMonth.push({ key: 3, value: \"March\" });\r\n this.ListOfMonth.push({ key: 4, value: \"April\" });\r\n this.ListOfMonth.push({ key: 5, value: \"May\" });\r\n this.ListOfMonth.push({ key: 6, value: \"June\" });\r\n this.ListOfMonth.push({ key: 7, value: \"July\" });\r\n this.ListOfMonth.push({ key: 8, value: \"August\" });\r\n this.ListOfMonth.push({ key: 9, value: \"September\" });\r\n this.ListOfMonth.push({ key: 10, value: \"October\" });\r\n this.ListOfMonth.push({ key: 11, value: \"November\" });\r\n this.ListOfMonth.push({ key: 12, value: \"December\" });\r\n }\r\n}","import { Component, OnInit, Input, ViewChild, ElementRef, Inject, Renderer2, EventEmitter, Output } from '@angular/core';\r\nimport { Observable } from 'rxjs';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { FormGroup, NgForm } from '@angular/forms';\r\nimport { DatePipe, formatDate } from '@angular/common';\r\nimport { InputSearchObj } from './model/InputSearchObj.Model';\r\nimport { CriteriaObj } from './model/CriteriaObj.model';\r\nimport { RequestCriteriaObj } from './model/RequestCriteriaObj.model';\r\nimport { AdInsConstant } from './model/AdInstConstant';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\nimport { ExcelService } from './services/excel-service/excel-service';\r\nimport { trigger, transition, style, animate, state } from '@angular/animations';\r\nimport { ToastrService } from 'ngx-toastr';\r\nimport { ExportTypeConstant, KeyValueReportObj } from './model/KeyValueReport.model';\r\nimport { CookieService } from 'ngx-cookie';\r\nimport * as CryptoJS from 'crypto-js';\r\nimport { KeyValueUCSearchObj, ListKeyValueMonth } from './model/KeyValueUCSearch.model';\r\n\r\n@Component({\r\n selector: 'lib-UCSearch',\r\n templateUrl: './ucsearch.component.html',\r\n styleUrls: ['./ucsearch.component.css'],\r\n providers: [ExcelService, DatePipe],\r\n animations: [\r\n trigger('changeDivSize', [\r\n state('initial', style({\r\n height: '*',\r\n opacity: '1',\r\n })),\r\n state('final', style({\r\n height: '0px',\r\n opacity: '0',\r\n overflow: 'hidden',\r\n })),\r\n transition('initial=>final', animate('300ms')),\r\n transition('final=>initial', animate('300ms'))\r\n ]),\r\n ]\r\n})\r\nexport class UCSearchComponent implements OnInit {\r\n // trus nad, bisa ga kalo misalkan gw mau bikin\r\n // kalo login di cabang IsSelectOne: true\r\n // kalo login di HO, IsSelectOne: false\r\n @ViewChild('enjiForm') set content(content: NgForm) {\r\n if (content) { // initially setter gets called with undefined\r\n this.searchForm = content;\r\n }\r\n }\r\n\r\n @ViewChild('formIdSearch') myForm: ElementRef;\r\n @Input() searchInput: InputSearchObj = new InputSearchObj();\r\n @Input() pageSize: number = 10;\r\n @Input() isReport: boolean = false;\r\n @Output() result: EventEmitter<any> = new EventEmitter();\r\n @Output() genRpt: EventEmitter<{ ExportType: number, ElRef: ElementRef }> = new EventEmitter<{ ExportType: number, ElRef: ElementRef }>();\r\n ExportTypeList: Array<KeyValueReportObj> = [\r\n {\r\n key: ExportTypeConstant.EXP_TYPE_PDF,\r\n value: \"PDF\"\r\n },\r\n {\r\n key: ExportTypeConstant.EXP_TYPE_XLS,\r\n value: \"Excel 2003\"\r\n },\r\n {\r\n key: ExportTypeConstant.EXP_TYPE_XLSX,\r\n value: \"Excel 2007\"\r\n },\r\n {\r\n key: ExportTypeConstant.EXP_TYPE_DOC,\r\n value: \"Document\"\r\n },\r\n {\r\n key: ExportTypeConstant.EXP_TYPE_DOCX,\r\n value: \"Document XML\"\r\n },\r\n ];\r\n ListOfMonth: ListKeyValueMonth = new ListKeyValueMonth();\r\n ListOfYear: Array<KeyValueUCSearchObj> = new Array<KeyValueUCSearchObj>();\r\n ClaimList: Array<any> = [\r\n {\r\n Key: AdInsConstant.RestrictionIsNotNull,\r\n Value: \"CLAIMED\"\r\n },\r\n {\r\n Key: AdInsConstant.RestrictionIsNull,\r\n Value: \"UNCLAIMED\"\r\n },\r\n ];\r\n\r\n ExportType: number = 0;\r\n\r\n pageNow: any = 1;\r\n configuration: any;\r\n exportData: any;\r\n ExcelData: any;\r\n isDataLoaded: boolean = false;\r\n isHidden: boolean = false;\r\n BisDt: string;\r\n BusinessDt: Date = new Date();\r\n dateWrong: boolean = false;\r\n\r\n currentState = 'initial';\r\n\r\n form: FormGroup;\r\n countForm = 0;\r\n formattedAmount = '';\r\n amount = 0;\r\n apiUrl: string;\r\n arrCrit: any;\r\n searchForm: NgForm;\r\n\r\n constructor(private http: HttpClient, private excelService: ExcelService, private _renderer2: Renderer2,\r\n @Inject(DOCUMENT) private _document, public toastr: ToastrService, private cookieService: CookieService,\r\n private datePipe: DatePipe) {\r\n }\r\n\r\n changeState() {\r\n this.currentState = this.currentState === 'initial' ? 'final' : 'initial';\r\n this.isHidden = this.isHidden === false ? true : false;\r\n }\r\n\r\n ngOnInit() {\r\n console.log(\"ucsearch\");\r\n this.apiUrl = this.searchInput.enviromentUrl + this.searchInput.apiQryPaging;\r\n this.arrCrit = this.searchInput.arrCritObj;\r\n let js = this._renderer2.createElement('script');\r\n js.text = `\r\n $(document).ready(function(){\r\n $(\"#flip\").click(function(){\r\n $(\"#panel\").slideToggle(\"slow\");\r\n });\r\n });\r\n `;\r\n this._renderer2.appendChild(this._document.body, js);\r\n\r\n let value = this.cookieService.get('BusinessDateRaw');\r\n this.BisDt = this.DecryptString(value, \"AdInsFOU12345678\");\r\n this.BusinessDt = new Date(this.BisDt);\r\n this.initiateForm();\r\n }\r\n\r\n initiateForm() {\r\n this.getJSON(this.searchInput._url).subscribe(data => {\r\n this.configuration = data;\r\n this.exportData = data.exportExcel;\r\n if (data.exportTypeList != undefined && data.exportTypeList.length != 0) {\r\n this.ExportTypeList = data.exportTypeList;\r\n this.ExportType = this.ExportTypeList[0].key;\r\n }\r\n\r\n this.countForm = data.component.length;\r\n this.isDataLoaded = true;\r\n\r\n if (this.searchInput.title != undefined && this.searchInput.title != \"\") {\r\n this.configuration.title = this.searchInput.title;\r\n }\r\n\r\n for (var i = 0; i < this.countForm; i++) {\r\n //ini kalau datanya di load dari URL\r\n if (data.component[i].isFromURL == true) {\r\n var request = new RequestCriteriaObj();\r\n var arrayCrit = new Array();\r\n var criteriaObject = new CriteriaObj();\r\n criteriaObject.DataType = \"text\";\r\n criteriaObject.propName = data.component[i].criteriaPropName;\r\n criteriaObject.value = data.component[i].criteriaPropValue;\r\n criteriaObject.restriction = \"eq\";\r\n arrayCrit.push(criteriaObject);\r\n request.criteria = arrayCrit;\r\n request[data.component[i].criteriaPropName] = data.component[i].criteriaPropValue;\r\n\r\n // Pengecekan penggunaan url atau path\r\n if (data.component[i].path != undefined && data.component[i].path != \"\") {\r\n if (this.searchInput.ddlEnvironments != undefined && this.searchInput.ddlEnvironments.length != 0) {\r\n for (let y = 0; y < this.searchInput.ddlEnvironments.length; y++) {\r\n if (data.component[i].name == this.searchInput.ddlEnvironments[y].name) {\r\n data.component[i].fullpath = this.searchInput.ddlEnvironments[y].environment + data.component[i].path;\r\n break;\r\n }\r\n }\r\n } else if (this.searchInput.listEnvironments != undefined && this.searchInput.listEnvironments.length != 0) {\r\n for (let y = 0; y < this.searchInput.listEnvironments.length; y++) {\r\n if (data.component[i].environment == this.searchInput.listEnvironments[y].environment) {\r\n data.component[i].fullpath = this.searchInput.listEnvironments[y].url + data.component[i].path;\r\n break;\r\n }\r\n }\r\n } else {\r\n data.component[i].fullpath = data.component[i].url;\r\n }\r\n\r\n } else {\r\n data.component[i].fullpath = data.component[i].url;\r\n }\r\n //lempar objectnya sekalian sama urlnya, nnti di bind di dalem karena masalah di asyncnya\r\n //biar tiap function ada state2nya sendiri\r\n this.resolveObject(data.component[i], data.component[i].fullpath, request);\r\n }\r\n\r\n if (data.component[i].type == \"numeric\") {\r\n data.component[i].value = parseFloat(data.component[i].value).toLocaleString('en');\r\n }\r\n\r\n //pengecekan ddl\r\n if (data.component[i].type == \"dropdown\") {\r\n if (data.component[i].dtmType != undefined) {\r\n if (data.component[i].dtmType == \"month\") {\r\n if (data.component[i].value != undefined && data.component[i].value.includes(\"BD\")) {\r\n data.component[i].value = this.BusinessDt.getMonth() + 1;\r\n }\r\n data.component[i].items = this.ListOfMonth.ListOfMonth;\r\n }\r\n if (data.component[i].dtmType.includes(\"year\")) {\r\n if (data.component[i].value != undefined && data.component[i].value.includes(\"BD\")) {\r\n data.component[i].value = this.BusinessDt.getFullYear();\r\n }\r\n data.component[i].items = this.setYearDDL(data.component[i].dtmType);\r\n }\r\n }\r\n }\r\n\r\n if (data.component[i].type == \"taskDefinitionKey\") {;\r\n if (!data.component[i].ddlType) {\r\n this.SetProcessKey(i);\r\n }\r\n }\r\n\r\n if (data.component[i].type == \"officeRoleCodes\") {\r\n this.SetRoleOfficeCodes(i);\r\n }\r\n //pengecekan tanggal\r\n if (data.component[i].type == \"datepicker\") {\r\n if (data.component[i].value.includes(\"BD\")) {\r\n let businessDate = new Date();\r\n if (this.BisDt != null) {\r\n businessDate = new Date(this.BisDt);\r\n }\r\n var operator = data.component[i].value.charAt(2);\r\n var dateShow = new Date();\r\n if (operator == \"-\") {\r\n var tempMinus = data.component[i].value.split(\"-\", 2);\r\n var numDay = parseInt(tempMinus[1]);\r\n businessDate.setDate(businessDate.getDate() - numDay);\r\n }\r\n else if (operator == \"+\") {\r\n var tempMinus = data.component[i].value.split(\"+\", 2);\r\n var numDay = parseInt(tempMinus[1]);\r\n businessDate.setDate(businessDate.getDate() + numDay);\r\n }\r\n dateShow = businessDate;\r\n var dateText = formatDate(dateShow, 'yyyy-MM-dd', 'en-US')\r\n data.component[i].value = dateText;\r\n }\r\n\r\n if (data.component[i].restriction != undefined && data.component[i].restriction != \"\") {\r\n if (data.component[i].restriction.toUpperCase() == \"GT\") {\r\n let minDate = new Date(this.datePipe.transform(data.component[i].minDate, 'yyyy-MM-dd'));\r\n minDate.setDate(minDate.getDate() + 1);\r\n data.component[i].minDate = minDate;\r\n } else if (data.component[i].restriction.toUpperCase() == \"LT\") {\r\n let maxDate = new Date(this.datePipe.transform(data.component[i].maxDate, 'yyyy-MM-dd'));\r\n maxDate.setDate(maxDate.getDate() - 1);\r\n data.component[i].maxDate = maxDate;\r\n }\r\n }\r\n }\r\n }\r\n\r\n setTimeout(() => {\r\n for (let j = 0; j < this.countForm; j++) {\r\n if (data.component[j].isEvent == true && this.configuration.component[j].itemsUrl.length == 1) {\r\n this.onChangeEvent(data.component[j].itemsUrl[0].Key, data.component[j]);\r\n }\r\n }\r\n }, 1000);\r\n });\r\n }\r\n\r\n SetRoleOfficeCodes(i: number, j: number = 0) {\r\n let roleCode: string = this.cookieService.get('RoleCode');\r\n let listOfficeRoleCodes: Array<string> = new Array();\r\n listOfficeRoleCodes.push(roleCode);\r\n if (this.configuration.component[i].itemsUrl.length == 1 && this.configuration.component[i].ddlType == 'all') {\r\n for (let index = 0; index < this.configuration.component[i].itemsUrl.length; index++) {\r\n const element = this.configuration.component[i].itemsUrl[index];\r\n listOfficeRoleCodes.push(element.Key);\r\n listOfficeRoleCodes.push(roleCode + \"-\" + element.Key);\r\n }\r\n } else {\r\n let component = this.myForm.nativeElement[j];\r\n let ddl = component.options;\r\n let text = ddl[ddl.selectedIndex].value.trim();\r\n listOfficeRoleCodes.push(text);\r\n listOfficeRoleCodes.push(roleCode + \"-\" + text);\r\n }\r\n\r\n this.searchInput.integrationObj.requestObj[\"OfficeRoleCodes\"] = listOfficeRoleCodes;\r\n }\r\n\r\n setYearDDL(year) {\r\n this.ListOfYear = new Array<KeyValueUCSearchObj>();\r\n let equation = year.match(\"[\\\\/+][-]|[-][\\\\/+]|\\\\/+|-\");\r\n let toMin: number = this.BusinessDt.getFullYear();\r\n let toMax: number = this.BusinessDt.getFullYear();\r\n let minMax: number = parseInt(year.substring(equation.index + equation[0].length));\r\n this.ListOfYear.push({ key: this.BusinessDt.getFullYear(), value: this.BusinessDt.getFullYear().toString() });\r\n\r\n for (let q = 0; q < minMax; q++) {\r\n if (equation[0] == \"-+\" || equation[0] == \"+-\") {\r\n toMin--;\r\n toMax++;\r\n this.ListOfYear.push({ key: toMin, value: toMin.toString() }, { key: toMax, value: toMax.toString() });\r\n } else if (equation[0] == \"-\") {\r\n toMin--;\r\n this.ListOfYear.push({ key: toMin, value: toMin.toString() });\r\n } else if (equation[0] == \"+\") {\r\n toMax++;\r\n this.ListOfYear.push({ key: toMax, value: toMax.toString() });\r\n }\r\n }\r\n this.ListOfYear.sort((a, b) => {\r\n return a.key - b.key;\r\n });\r\n return this.ListOfYear;\r\n }\r\n\r\n public getJSON(url: string): Observable<any> {\r\n return this.http.get(url);\r\n }\r\n\r\n public postJSON(url: string, criteria: any = null): Observable<any> {\r\n return this.http.post(url, criteria);\r\n }\r\n\r\n searchClick() {\r\n // for(let i=0;i<this.countForm;i++){\r\n // if(this.configuration.component[i].type == \"datepicker\"){\r\n // if ((i != (this.countForm-1)) && (this.configuration.component[i].name != this.configuration.component[i+1].name)){\r\n // this.checkInputDate(this.configuration.component[i]);\r\n // }\r\n // }\r\n // }\r\n // if(this.dateWrong) return;\r\n\r\n let order = null;\r\n if (this.configuration.orderby != null) {\r\n order = {\r\n key: this.configuration.orderby.key,\r\n value: this.configuration.orderby.value\r\n }\r\n }\r\n this.pageNow = 1;\r\n this.search(this.apiUrl, this.pageNow, this.pageSize, order, this.arrCrit);\r\n }\r\n\r\n reset() {\r\n this.searchForm.resetForm();\r\n this.ExportType = this.ExportTypeList[0].key;\r\n this.initiateForm();\r\n }\r\n\r\n search(apiUrl: string, pageNo: number, rowPerPage: number, orderBy: any, addCrit: CriteriaObj[] = new Array()) {\r\n let request = new RequestCriteriaObj();\r\n let arrCrit = new Array();\r\n let IsQueryIn = false;\r\n let IsBreak = false;\r\n\r\n // Inject whereQuery for where criteria\r\n if (this.searchInput.whereValue != undefined && this.searchInput.whereValue.length != 0) {\r\n this.configuration.querystring.whereQuery = new Array<any>();\r\n for (let x = 0; x < this.searchInput.whereValue.length; x++) {\r\n this.configuration.querystring.whereQuery.push(this.searchInput.whereValue[x].value);\r\n }\r\n }\r\n request.pageNo = pageNo;\r\n request.rowPerPage = rowPerPage;\r\n request.orderBy = orderBy;\r\n request.queryString = this.configuration.querystring;\r\n\r\n for (let i = 0; i < this.countForm; i++) {\r\n let critObj = new CriteriaObj();\r\n let component = this.myForm.nativeElement[i];\r\n\r\n // // popup message if required\r\n // if (component.getAttribute('data-required') != null && component.getAttribute('data-required') == \"true\") {\r\n // let val = component.value.trim();\r\n // if (val == \"\") {\r\n // IsBreak = true;\r\n // let label = component.getAttribute('label');\r\n // this.toastr.warning(\"Please input \" + label);\r\n // break;\r\n // }\r\n // }\r\n\r\n critObj.DataType = component.getAttribute('data-type');\r\n //Ini khusus kalau dari Drop Down\r\n if (component.getAttribute('query-in') != null && component.getAttribute('query-in') == \"true\") {\r\n IsQueryIn = true;\r\n }\r\n else {\r\n IsQueryIn = false;\r\n }\r\n if (component.value != \"\") {\r\n if (component.nodeName == 'SELECT') {\r\n let ddl = component.options;\r\n let text = ddl[ddl.selectedIndex].value.trim();\r\n if (text == \"one\") {\r\n IsBreak = true;\r\n let label = component.getAttribute('label');\r\n this.toastr.warning(\"Please select \" + label);\r\n break;\r\n }\r\n\r\n if (this.configuration.component[i].type == \"claim\") {\r\n critObj.propName = component.getAttribute('data-name');\r\n critObj.restriction = text;\r\n critObj.value = null;\r\n if (component.getAttribute('data-crit-datatable') != \"\" && component.getAttribute('data-crit-datatable') != null) {\r\n critObj.isCriteriaDataTable = component.getAttribute('data-crit-datatable');\r\n }\r\n arrCrit.push(critObj);\r\n } else {\r\n if (text != \"all\" && text != \"one\") {\r\n //Kalau Dari Dropdown udah pasti pake Eq\r\n critObj.restriction = AdInsConstant.RestrictionEq;\r\n if (component.name != \"\") {\r\n critObj.propName = component.name;\r\n } else {\r\n critObj.propName = component.getAttribute('ng-reflect-name');\r\n }\r\n critObj.value = text;\r\n arrCrit.push(critObj);\r\n } else if (text == \"all\" && IsQueryIn == true && component.options.length != 0) {\r\n let ddlList = new Array();\r\n for (let x = 0; x < component.options.length; x++) {\r\n if (x != 0) {\r\n ddlList.push(component.options[x].value);\r\n }\r\n }\r\n if (ddlList.length != 0) {\r\n critObj.restriction = AdInsConstant.RestrictionIn;\r\n if (component.name != \"\") {\r\n critObj.propName = component.name;\r\n } else {\r\n critObj.propName = component.getAttribute('ng-reflect-name');\r\n }\r\n critObj.listValue = ddlList;\r\n arrCrit.push(critObj);\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n //Kalau ada Percent maka yang dipake nnti adalah Restrictions Like\r\n if (component.name != \"\") {\r\n critObj.propName = component.name;\r\n } else {\r\n critObj.propName = component.getAttribute('data-name');\r\n }\r\n critObj.value = component.value.trim();\r\n if (component.value.includes(\"%\")) {\r\n critObj.restriction = AdInsConstant.RestrictionLike;\r\n }\r\n //kalau componentnya Date, restrictionsnya lgsg ambil dari property JSONnya\r\n else if (component.getAttribute('data-restriction') != \"\" && component.getAttribute('data-restriction') != null) {\r\n critObj.restriction = component.getAttribute('data-restriction');\r\n if (component.getAttribute('data-type') == 'numeric') {\r\n critObj.value = parseFloat(component.value.replace(/,/g, '')).toString();\r\n }\r\n if (critObj.restriction.toUpperCase() == \"LIKE\") {\r\n critObj.value = \"%\" + component.value.trim() + \"%\";\r\n critObj.restriction = AdInsConstant.RestrictionLike\r\n }\r\n }\r\n else {\r\n critObj.restriction = AdInsConstant.RestrictionEq\r\n }\r\n if (component.getAttribute('data-crit-datatable') != \"\" && component.getAttribute('data-crit-datatable') != null) {\r\n critObj.isCriteriaDataTable = component.getAttribute('data-crit-datatable');\r\n }\r\n arrCrit.push(critObj);\r\n }\r\n }\r\n }\r\n\r\n if (IsBreak) {\r\n return;\r\n }\r\n\r\n if (addCrit != null && addCrit != undefined) {\r\n if (addCrit.length != 0) {\r\n for (var i = 0; i < addCrit.length; i++) {\r\n arrCrit.push(addCrit[i]);\r\n }\r\n } else if (this.searchInput.addCritInput != null || this.searchInput.addCritInput != undefined) {\r\n for (var i = 0; i < this.searchInput.addCritInput.length; i++) {\r\n arrCrit.push(this.searchInput.addCritInput[i]);\r\n }\r\n }\r\n }\r\n else if (this.searchInput.addCritInput != null || this.searchInput.addCritInput != undefined) {\r\n for (var i = 0; i < this.searchInput.addCritInput.length; i++) {\r\n arrCrit.push(this.searchInput.addCritInput[i]);\r\n }\r\n }\r\n\r\n request.criteria = arrCrit;\r\n\r\n if (!this.searchInput.isJoinExAPI) {\r\n request.integrationObj = null;\r\n } else {\r\n request.integrationObj = this.searchInput.integrationObj;\r\n }\r\n\r\n this.http.post(apiUrl, request).subscribe((response) => {\r\n let qryPaging = {\r\n response: response,\r\n pageNow: pageNo\r\n }\r\n console.log(qryPaging);\r\n this.result.emit(qryPaging);\r\n return response;\r\n });\r\n }\r\n\r\n GenerateReport() {\r\n this.genRpt.emit({ ExportType: this.ExportType, ElRef: this.myForm });\r\n }\r\n\r\n lessThanFour(): boolean {\r\n if (this.countForm > 3) {\r\n return false;\r\n }\r\n else {\r\n return true;\r\n }\r\n }\r\n\r\n resolveObject(obj: any, url: string, crit: RequestCriteriaObj = null) {\r\n const val = this.postJSON(url, crit);\r\n val.subscribe(tempData => {\r\n obj.itemsUrl = new Array();\r\n obj.itemsUrl = tempData.ReturnObject;\r\n\r\n if(obj.exclude != undefined && obj.exclude != \"\"){\r\n obj.itemsUrl = obj.itemsUrl.filter((value) => !obj.exclude.includes(value.Key));\r\n }\r\n });\r\n }\r\n\r\n transformAmount(element: any) {\r\n this.formattedAmount = parseFloat(element.target.value).toLocaleString('en');\r\n // to show the formatted amount in the textbox.\r\n element.target.value = this.formattedAmount;\r\n }\r\n\r\n transformToDecimal(element: any) {\r\n element.target.value = parseFloat(element.target.value.toString().replace(/,/g, ''));\r\n }\r\n\r\n exportAsXLSX(): void {\r\n var request = new RequestCriteriaObj();\r\n request.pageNo = 1;\r\n request.rowPerPage = 9999;\r\n request.orderBy = null;\r\n request.criteria = [];\r\n request.queryString = this.configuration.querystring;\r\n if (!this.searchInput.isJoinExAPI) {\r\n request.integrationObj = null;\r\n } else {\r\n request.integrationObj = this.searchInput.integrationObj;\r\n }\r\n\r\n this.http.post(this.apiUrl, request).subscribe(\r\n response => {\r\n this.ExcelData = response[\"Data\"];\r\n this.excelService.exportAsExcelFile(this.ExcelData, 'sample');\r\n },\r\n (error) => {\r\n console.log(error);\r\n });\r\n }\r\n\r\n onChangeEvent(optValue, afFilter) {\r\n var jsonComp = this.configuration.component;\r\n\r\n for (var i = 0; i < afFilter.affectedFilter.length; i++) {\r\n for (var j = 0; j < jsonComp.length; j++) {\r\n if (jsonComp[j].name == afFilter.affectedFilter[i]) {\r\n var request = new RequestCriteriaObj();\r\n var arrayCrit = new Array();\r\n\r\n if (optValue != \"all\" && optValue != \"one\") {\r\n var critObj = new CriteriaObj();\r\n critObj.DataType = afFilter.datatype;\r\n if (afFilter.filterPropName != undefined || afFilter.filterPropName != \"\") {\r\n request[afFilter.filterPropName] = optValue;\r\n critObj.propName = afFilter.filterPropName;\r\n } else {\r\n critObj.propName = afFilter.name;\r\n request[afFilter.name] = optValue;\r\n }\r\n critObj.value = optValue;\r\n critObj.restriction = AdInsConstant.RestrictionEq;\r\n arrayCrit.push(critObj);\r\n }\r\n request.criteria = arrayCrit;\r\n if (jsonComp[j].path != undefined && jsonComp[j].path != \"\") {\r\n if (this.searchInput.ddlEnvironments != undefined && this.searchInput.ddlEnvironments.length != 0) {\r\n for (let y = 0; y < this.searchInput.ddlEnvironments.length; y++) {\r\n if (jsonComp[j].name == this.searchInput.ddlEnvironments[y].name) {\r\n jsonComp[j].fullpath = this.searchInput.ddlEnvironments[y].environment + jsonComp[j].path;\r\n break;\r\n }\r\n }\r\n } else if (this.searchInput.listEnvironments != undefined && this.searchInput.listEnvironments.length != 0) {\r\n for (let y = 0; y < this.searchInput.listEnvironments.length; y++) {\r\n if (jsonComp.component[j].environment == this.searchInput.listEnvironments[y].environment) {\r\n jsonComp.component[j].fullpath = this.searchInput.listEnvironments[y].url + jsonComp.component[j].path;\r\n break;\r\n }\r\n }\r\n } else {\r\n jsonComp[j].fullpath = jsonComp[j].url;\r\n }\r\n\r\n } else {\r\n jsonComp[j].fullpath = jsonComp[j].url;\r\n }\r\n this.resolveObject(jsonComp[j], jsonComp[j].fullpath, request);\r\n }\r\n }\r\n }\r\n }\r\n\r\n SetProcessKey(idx: number) {\r\n console.log(idx);\r\n console.log(this.configuration.component[idx].name);\r\n if (this.configuration.component[idx].name) {\r\n let component = this.myForm.nativeElement[idx];\r\n let ddl = component.options;\r\n let text = ddl[ddl.selectedIndex].value.trim();\r\n\r\n let selectedMappingCode: string = this.configuration.component[idx].itemsUrl.find(x => x.Key == text);\r\n this.searchInput.integrationObj.requestObj[\"TaskDefinitionKey\"] = text;\r\n this.searchInput.integrationObj.requestObj[\"ProcessKey\"] = selectedMappingCode;\r\n }\r\n }\r\n\r\n switchCase(condList) {\r\n var condition = false;\r\n\r\n for (var i = 0; i < condList.conditions.length; i++) {\r\n var idx = this.searchInput.switchValue.findIndex(x => x.property == condList.conditions[i].property);\r\n if (condList.conditions[i].restriction == \"EQ\") {\r\n if (condList.conditions[i].isUser != true) {\r\n if (this.searchInput.switchValue[idx].value == condList.conditions[i].value) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n } else {\r\n var username = localStorage.getItem(\"Username\");\r\n if (this.searchInput.switchValue[idx].value == username) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n }\r\n } else if (condList.conditions[i].restriction == \"NEQ\") {\r\n if (condList.conditions[i].isUser != true) {\r\n if (this.searchInput.switchValue[idx].value != condList.conditions[i].value) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n } else {\r\n var username = localStorage.getItem(\"Username\");\r\n if (this.searchInput.switchValue[idx].value != username) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n }\r\n } else if (condList.conditions[i].restriction == \"GT\") {\r\n if (condList.conditions[i].isUser != true) {\r\n if (this.searchInput.switchValue[idx].value > condList.conditions[i].value) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n } else {\r\n var username = localStorage.getItem(\"Username\");\r\n if (this.searchInput.switchValue[idx].value > username) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n }\r\n } else if (condList.conditions[i].restriction == \"GTE\") {\r\n if (condList.conditions[i].isUser != true) {\r\n if (this.searchInput.switchValue[idx].value >= condList.conditions[i].value) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n } else {\r\n var username = localStorage.getItem(\"Username\");\r\n if (this.searchInput.switchValue[idx].value >= username) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n }\r\n } else if (condList.conditions[i].restriction == \"LT\") {\r\n if (condList.conditions[i].isUser != true) {\r\n if (this.searchInput.switchValue[idx].value < condList.conditions[i].value) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n } else {\r\n var username = localStorage.getItem(\"Username\");\r\n if (this.searchInput.switchValue[idx].value < username) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n }\r\n } else if (condList.conditions[i].restriction == \"LTE\") {\r\n if (condList.conditions[i].isUser != true) {\r\n if (this.searchInput.switchValue[idx].value <= condList.conditions[i].value) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n } else {\r\n var username = localStorage.getItem(\"Username\");\r\n if (this.searchInput.switchValue[idx].value <= username) {\r\n condition = true;\r\n } else {\r\n condition = false;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n return condition;\r\n\r\n }\r\n\r\n private DecryptString(chipperText: string, chipperKey: string) {\r\n if (\r\n chipperKey == undefined || chipperKey.trim() == '' ||\r\n chipperText == undefined || chipperText.trim() == ''\r\n ) return chipperText;\r\n var chipperKeyArr = CryptoJS.enc.Utf8.parse(chipperKey);\r\n var iv = CryptoJS.lib.WordArray.create([0x00, 0x00, 0x00, 0x00]);\r\n var decrypted = CryptoJS.AES.decrypt(chipperText, chipperKeyArr, { iv: iv });\r\n var plainText = decrypted.toString(CryptoJS.enc.Utf8);\r\n return plainText;\r\n }\r\n\r\n checkInputDate(component: any) {\r\n let minDateVal;\r\n let maxDateVal;\r\n let label;\r\n let errorMessage = new Array<string>();\r\n\r\n let MinComponent = this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == \"GTE\")) == undefined ? this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == \"GT\")) : this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == \"GTE\"));\r\n if (MinComponent != undefined) {\r\n minDateVal = this.myForm.nativeElement[MinComponent.id].min == \"\" ? null : new Date(this.myForm.nativeElement[MinComponent.id].min);\r\n label = MinComponent.label.split(\">\", 2);\r\n if (minDateVal != null) {\r\n if (MinComponent.restriction.toUpperCase() == \"GT\") {\r\n minDateVal.setDate(minDateVal.getDate() - 1);\r\n errorMessage.push(\" must be greater than \");\r\n } else if (MinComponent.restriction.toUpperCase() == \"GTE\") {\r\n errorMessage.push(\" must be greater than or equals to \");\r\n }\r\n }\r\n }\r\n\r\n let MaxComponent = this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == \"LTE\")) == undefined ? this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == \"LT\")) : this.configuration.component.find(x => x.name == component.name && (x.restriction.toUpperCase() == \"LTE\"));\r\n if (MaxComponent != undefined) {\r\n maxDateVal = this.myForm.nativeElement[MaxComponent.id].max == \"\" ? null : new Date(this.myForm.nativeElement[MaxComponent.id].max);\r\n label = MaxComponent.label.split(\"<\", 2);\r\n if (maxDateVal != null) {\r\n if (MaxComponent.restriction.toUpperCase() == \"LT\") {\r\n maxDateVal.setDate(maxDateVal.getDate() + 1);\r\n errorMessage.push(\" must be less than \");\r\n } else if (MaxComponent.restriction.toUpperCase() == \"LTE\") {\r\n errorMessage.push(\" must be less than or equals to \");\r\n }\r\n }\r\n }\r\n\r\n if (minDateVal != null && maxDateVal == null && new Date(this.myForm.nativeElement[MinComponent.id].value) < minDateVal) {\r\n this.toastr.warning(label[0] + errorMessage[0] + formatDate(minDateVal, 'dd MMMM yyyy', 'en-US') + \".\")\r\n this.dateWrong = true;\r\n } else if (maxDateVal != null && minDateVal == null && new Date(this.myForm.nativeElement[MaxComponent.id].value) > maxDateVal) {\r\n this.toastr.warning(label[0] + errorMessage[0] + formatDate(maxDateVal, 'dd MMMM yyyy', 'en-US') + \".\")\r\n this.dateWrong = true;\r\n } else if (minDateVal != null && maxDateVal != null) {\r\n if (new Date(this.myForm.nativeElement[MaxComponent.id].value) > maxDateVal || new Date(this.myForm.nativeElement[MinComponent.id].value) < minDateVal) {\r\n this.toastr.warning(label[0] + errorMessage[0] + formatDate(minDateVal, 'dd MMMM yyyy', 'en-US') + \" and\" + errorMessage[1] + formatDate(maxDateVal, 'dd MMMM yyyy', 'en-US') + \".\")\r\n this.dateWrong = true;\r\n } else {\r\n this.dateWrong = false;\r\n }\r\n } else {\r\n this.dateWrong = false;\r\n }\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { UCSearchComponent } from './ucsearch.component';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { CurrencyMaskInputMode, NgxCurrencyModule } from 'ngx-currency';\r\nimport { TranslateModule } from '@ngx-translate/core';\r\nimport { UcShowErrorsModule } from '@adins/uc-show-errors';\r\nimport { UcDirectiveUpperCaseModule } from '@adins/uc-directive-upper-case';\r\n\r\nexport const customCurrencyMaskConfig = { \r\n align: \"right\",\r\n allowNegative: false,\r\n allowZero: true,\r\n decimal: \".\",\r\n precision: 2,\r\n prefix: \"\",\r\n suffix: \"\",\r\n thousands: \",\",\r\n nullable: false,\r\n inputMode: CurrencyMaskInputMode.NATURAL };\r\n\r\n@NgModule({\r\n declarations: [UCSearchComponent],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n UcShowErrorsModule,\r\n UcDirectiveUpperCaseModule,\r\n NgxCurrencyModule.forRoot(customCurrencyMaskConfig),\r\n TranslateModule.forChild()\r\n ],\r\n exports: [UCSearchComponent]\r\n})\r\nexport class UCSearchModule { }\r\n"]}
|