@adins/ucsearch 1.0.0

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.
Files changed (38) hide show
  1. package/README.md +24 -0
  2. package/bundles/ucsearch.umd.js +656 -0
  3. package/bundles/ucsearch.umd.js.map +1 -0
  4. package/bundles/ucsearch.umd.min.js +2 -0
  5. package/bundles/ucsearch.umd.min.js.map +1 -0
  6. package/esm2015/lib/model/AdInstConstant.js +597 -0
  7. package/esm2015/lib/model/CriteriaObj.Model.js +26 -0
  8. package/esm2015/lib/model/HttpRequestObj.model.js +29 -0
  9. package/esm2015/lib/model/RequestCriteriaObj.model.js +28 -0
  10. package/esm2015/lib/ucsearch.component.js +392 -0
  11. package/esm2015/lib/ucsearch.module.js +19 -0
  12. package/esm2015/lib/ucsearch.service.js +18 -0
  13. package/esm2015/public-api.js +11 -0
  14. package/esm2015/ucsearch.js +9 -0
  15. package/esm5/lib/model/AdInstConstant.js +601 -0
  16. package/esm5/lib/model/CriteriaObj.Model.js +28 -0
  17. package/esm5/lib/model/HttpRequestObj.model.js +33 -0
  18. package/esm5/lib/model/RequestCriteriaObj.model.js +30 -0
  19. package/esm5/lib/ucsearch.component.js +432 -0
  20. package/esm5/lib/ucsearch.module.js +23 -0
  21. package/esm5/lib/ucsearch.service.js +21 -0
  22. package/esm5/public-api.js +11 -0
  23. package/esm5/ucsearch.js +9 -0
  24. package/fesm2015/ucsearch.js +600 -0
  25. package/fesm2015/ucsearch.js.map +1 -0
  26. package/fesm5/ucsearch.js +649 -0
  27. package/fesm5/ucsearch.js.map +1 -0
  28. package/lib/model/AdInstConstant.d.ts +190 -0
  29. package/lib/model/CriteriaObj.Model.d.ts +9 -0
  30. package/lib/model/HttpRequestObj.model.d.ts +12 -0
  31. package/lib/model/RequestCriteriaObj.model.d.ts +11 -0
  32. package/lib/ucsearch.component.d.ts +53 -0
  33. package/lib/ucsearch.module.d.ts +2 -0
  34. package/lib/ucsearch.service.d.ts +3 -0
  35. package/package.json +34 -0
  36. package/public-api.d.ts +3 -0
  37. package/ucsearch.d.ts +4 -0
  38. package/ucsearch.metadata.json +1 -0
@@ -0,0 +1,600 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import 'rxjs/add/operator/map';
3
+ import { DOCUMENT } from '@angular/platform-browser';
4
+ import { Injectable, NgModule, Component, Input, ViewChild, Inject, Renderer2, EventEmitter, Output, defineInjectable } from '@angular/core';
5
+ import { formatDate, DecimalPipe, CommonModule } from '@angular/common';
6
+
7
+ /**
8
+ * @fileoverview added by tsickle
9
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
10
+ */
11
+ class UCSearchService {
12
+ constructor() { }
13
+ }
14
+ UCSearchService.decorators = [
15
+ { type: Injectable, args: [{
16
+ providedIn: 'root'
17
+ },] }
18
+ ];
19
+ /** @nocollapse */
20
+ UCSearchService.ctorParameters = () => [];
21
+ /** @nocollapse */ UCSearchService.ngInjectableDef = defineInjectable({ factory: function UCSearchService_Factory() { return new UCSearchService(); }, token: UCSearchService, providedIn: "root" });
22
+
23
+ /**
24
+ * @fileoverview added by tsickle
25
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
26
+ */
27
+ class CriteriaObj {
28
+ constructor() {
29
+ this.low = 0;
30
+ this.high = 0;
31
+ this.DataType = 'Text';
32
+ }
33
+ }
34
+
35
+ /**
36
+ * @fileoverview added by tsickle
37
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
38
+ */
39
+ class RequestCriteriaObj {
40
+ constructor() {
41
+ this.includeCount = true;
42
+ this.includeData = true;
43
+ this.isLoading = true;
44
+ }
45
+ }
46
+
47
+ /**
48
+ * @fileoverview added by tsickle
49
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
50
+ */
51
+ class AdInsConstant {
52
+ }
53
+ AdInsConstant.RestrictionLike = "Like";
54
+ AdInsConstant.RestrictionEq = "Eq";
55
+ AdInsConstant.showData = "10,50,100";
56
+ AdInsConstant.TimeoutSession = 6000000;
57
+ AdInsConstant.GetListProduct = "http://creator_websvr:7272/NEW_FINANCING/api/Catalog/getPopularViewByCriteria";
58
+ AdInsConstant.Login = "/UserManagement/HTML5Login";
59
+ AdInsConstant.LoginToken = "/UserManagement/HTML6Login";
60
+ AdInsConstant.Logout = "/UserManagement/LogOut";
61
+ AdInsConstant.GetListOffice = "/RefOffice/GetRefOfficePaging";
62
+ AdInsConstant.GetProvince = "/los/v1/get_provinsi";
63
+ AdInsConstant.GetCityByProvince = "/los/v1/get_kota";
64
+ AdInsConstant.getProspectByProspectNo = "/api/MobileProspectTask/GetProspectByProspectNo";
65
+ AdInsConstant.submitNCProspect = "/api/MobileProspectTask/submitNCProspect";
66
+ AdInsConstant.addCustPersonal = "";
67
+ AdInsConstant.FormDefault = "dashboard/dash-board";
68
+ //GENERAL SETTING
69
+ AdInsConstant.GetBusinessDt = "/GeneralSetting/GetBusinessDate";
70
+ AdInsConstant.AddGeneralSetting = "/GeneralSetting/AddGeneralSetting";
71
+ AdInsConstant.EditGeneralSetting = "/GeneralSetting/EditGeneralSetting";
72
+ AdInsConstant.GetGeneralSettingPaging = "/GeneralSetting/GetGeneralSettingPaging";
73
+ AdInsConstant.GetGeneralSettingById = "/GeneralSetting/GetGeneralSettingById";
74
+ AdInsConstant.GetGeneralSettingValue = "/GeneralSetting/GetGeneralSettingValue";
75
+ //REF OFFICE
76
+ AdInsConstant.GetRefOfficeObj = "/RefOffice/GetRefOfficeObj";
77
+ AdInsConstant.GetRefOfficeActiveAndNonVirtualKeyValue = "/RefOffice/GetRefOfficeActiveAndNonVirtualKeyValue";
78
+ AdInsConstant.GetAllRefOffice = "/RefOffice/GetAllRefOffice";
79
+ AdInsConstant.GetListUpperHierarchyRefOfficeByRefOrgId = "/RefOffice/GetListUpperHierarchyRefOfficeByRefOrgId";
80
+ AdInsConstant.AddRefOffice = "/RefOffice/AddRefOffice";
81
+ AdInsConstant.EditRefOffice = "/RefOffice/EditRefOffice";
82
+ AdInsConstant.DeleteRefOffice = "/RefOffice/DeleteRefOffice";
83
+ //REF OFFICE AREA
84
+ AdInsConstant.GetAllListArea = "/RefOfficeArea/GetAllListArea";
85
+ AdInsConstant.GetRefOfficeAreaPaging = "/RefOfficeArea/GetRefOfficeAreaPaging";
86
+ AdInsConstant.GetRefArea = "/RefOfficeArea/GetRefArea";
87
+ AdInsConstant.AddRefOfficeArea = "/RefOfficeArea/AddRefOfficeArea";
88
+ AdInsConstant.EditRefOfficeArea = "/RefOfficeArea/EditRefOfficeArea";
89
+ AdInsConstant.DeleteRefOfficeArea = "/RefOfficeArea/DeleteRefOfficeArea";
90
+ AdInsConstant.CheckDuplAreaCode = "/RefOfficeArea/CheckDuplAreaCode";
91
+ //ORGANIZATION
92
+ AdInsConstant.GetRefOrg = "/OrganizationDefinition/GetRefOrg";
93
+ AdInsConstant.EditRefOrgWithOldParentId = "/OrganizationDefinition/EditRefOrgWithOldParentId";
94
+ AdInsConstant.DeleteRefOrg = "/OrganizationDefinition/DeleteRefOrg";
95
+ AdInsConstant.GetListAllRefOrg = "/OrganizationDefinition/GetListAllRefOrg";
96
+ AdInsConstant.AddRefOrg = "/OrganizationDefinition/AddRefOrg";
97
+ AdInsConstant.GetRefOrgPaging = "/OrganizationDefinition/GetRefOrgPaging";
98
+ AdInsConstant.GetAllRefBizUnit = "/OrganizationDefinition/GetAllRefBizUnit";
99
+ AdInsConstant.GetOrgJobTitleByMdlStruc = "/OrganizationDefinition/GetOrgJobTitleByMdlStruc";
100
+ AdInsConstant.GetRefBizUnitByOffice = "/OrganizationDefinition/GetRefBizUnitByOffice";
101
+ AdInsConstant.GetAllOrgMdl = "/OrganizationDefinition/GetAllOrgMdl";
102
+ AdInsConstant.GetAllActiveOrgMdlByRefOrgId = "/OrganizationDefinition/GetAllActiveOrgMdlByRefOrgId";
103
+ AdInsConstant.GetOrgMdlPaging = "/OrganizationDefinition/GetOrgMdlPaging";
104
+ AdInsConstant.DeleteOrgMdl = "/OrganizationDefinition/DeleteOrgMdl";
105
+ AdInsConstant.EditOrgMdl = "/OrganizationDefinition/EditOrgMdl";
106
+ AdInsConstant.AddOrgMdl = "/OrganizationDefinition/AddOrgMdl";
107
+ AdInsConstant.GetOrgMdl = "/OrganizationDefinition/GetOrgMdl";
108
+ AdInsConstant.GetOrgMdlByOrgMdlId = "/OrganizationDefinition/GetOrgMdlByOrgMdlId";
109
+ AdInsConstant.GetAllRefBizUnitKeyValuePair = "/OrganizationDefinition/GetAllRefBizUnitKeyValuePair";
110
+ AdInsConstant.DeleteOrgMdlStruc = "/OrganizationDefinition/DeleteOrgMdlStruc";
111
+ AdInsConstant.AddOrgMdlStruc = "/OrganizationDefinition/AddOrgMdlStruc";
112
+ AdInsConstant.EditOrgMdlStruc = "/OrganizationDefinition/EditOrgMdlStruc";
113
+ AdInsConstant.GetOrgMdlStruc = "/OrganizationDefinition/GetOrgMdlStruc";
114
+ AdInsConstant.GetOrgMdlStrucPaging = "/OrganizationDefinition/GetOrgMdlStrucPaging";
115
+ AdInsConstant.GetOrgMdlStrucById = "/OrganizationDefinition/GetOrgMdlStrucById";
116
+ //REF-JOB-TITLE
117
+ AdInsConstant.GetRefJobTitle = "/OrganizationDefinition/GetRefJobTitlePaging";
118
+ AdInsConstant.AddRefJobTitle = "/OrganizationDefinition/AddRefJobTitle";
119
+ AdInsConstant.EditRefJobTitle = "/OrganizationDefinition/EditRefJobTitle";
120
+ AdInsConstant.DeleteRefJobTitle = "/OrganizationDefinition/DeleteRefJobTitle";
121
+ AdInsConstant.GetJobPositionLvl = "/OrganizationDefinition/GetJobPositionLvl";
122
+ AdInsConstant.GetRefJobTitleById = "/OrganizationDefinition/GetRefJobTitleByRefJobTitleId";
123
+ //ORG JOB TITLE
124
+ AdInsConstant.GetOrgJobTitlePaging = "/OrganizationDefinition/GetOrgJobTitlePaging";
125
+ AdInsConstant.AddOrgJobTitle = "/OrganizationDefinition/AddOrgJobTitle";
126
+ AdInsConstant.EditOrgJobTitle = "/OrganizationDefinition/EditOrgJobTitle";
127
+ AdInsConstant.DeleteOrgJobTitle = "/OrganizationDefinition/DeleteOrgJobTitle";
128
+ AdInsConstant.GetOrgJobTitleByOrgJobTitleId = "/OrganizationDefinition/GetOrgJobTitleByOrgJobTitleId";
129
+ //REF-BANK
130
+ AdInsConstant.GetBankPaging = "/RefBank/GetRefBankPaging";
131
+ AdInsConstant.GetBank = "/RefBank/GetBank";
132
+ AdInsConstant.EditRefBank = "/RefBank/EditRefBank";
133
+ AdInsConstant.AddRefBank = "/RefBank/AddRefBank";
134
+ AdInsConstant.DeleteRefBank = "/RefBank/DeleteRefBank";
135
+ AdInsConstant.GetBankByBankCode = "/RefBank/GetBankByBankCode";
136
+ //REF-EMP
137
+ AdInsConstant.GetListEmployee = "/RefEmp/GetRefEmpPaging";
138
+ AdInsConstant.GetRefEmployeeById = "/RefEmp/GetEmp";
139
+ AdInsConstant.AddRefEmp = "/RefEmp/AddRefEmp";
140
+ AdInsConstant.EditRefEmp = "/RefEmp/EditRefEmp";
141
+ AdInsConstant.DeleteRefEmployee = "/RefEmp/DeleteRefEmp";
142
+ AdInsConstant.AddEmpBankAcc = "/EmpBankAcc/AddEmpBankAcc";
143
+ AdInsConstant.GetEmpBankAccByRefEmpId = "/EmpBankAcc/GetEmpBankAccByRefEmpId";
144
+ AdInsConstant.AddRefEmpAndEmpBankAcc = "/RefEmp/AddRefEmpAndEmpBankAcc";
145
+ AdInsConstant.EditRefEmpAndEmpBankAcc = "/RefEmp/EditRefEmpAndEmpBankAcc";
146
+ AdInsConstant.DeleteRefEmpAndEmpBankAcc = "/RefEmp/DeleteRefEmpAndEmpBankAcc";
147
+ AdInsConstant.GetListEmployeebyRefEmpId = "/EmpPosition/GetListEmployeebyRefEmpId";
148
+ AdInsConstant.GetEmpListByOfficeIdAndIsActive = "/RefEmp/GetEmpListByOfficeIdAndIsActive";
149
+ //EMP_POSITION
150
+ AdInsConstant.GetEmpPositionPaging = "/EmpPosition/GetEmpPositionPaging";
151
+ AdInsConstant.GetEmpByEmpPositionId = "/EmpPosition/GetEmpByEmpPositionId";
152
+ AdInsConstant.AddEmpPosition = "/EmpPosition/AddEmpPosition";
153
+ AdInsConstant.EditEmpPosition = "/EmpPosition/EditEmpPosition";
154
+ AdInsConstant.DeleteEmpPosition = "/EmpPosition/DeleteEmpPosition";
155
+ AdInsConstant.GetListUserEmployee = "/EmpPosition/GetListUserEmployee";
156
+ //REF-USER
157
+ AdInsConstant.GetRefUserPaging = "/UserManagement/GetRefUserPaging";
158
+ AdInsConstant.AddRefUser = "/UserManagement/AddRefUser";
159
+ AdInsConstant.EditRefUser = "/UserManagement/EditRefUser";
160
+ AdInsConstant.ChangePassword = "/UserManagement/ChangePassword";
161
+ AdInsConstant.GetRefUser = "/UserManagement/GetRefUser";
162
+ AdInsConstant.GetUserByUsername = "/UserManagement/GetUserByUsername";
163
+ AdInsConstant.ValidatePwd = "/UserManagement/ValidatePwd";
164
+ AdInsConstant.GetCountRefUserByRefEmpId = "/UserManagement/GetCountRefUserByRefEmpId";
165
+ AdInsConstant.ResetPassword = "/UserManagement/ResetPassword";
166
+ //REF-ROLE
167
+ AdInsConstant.GetRefRolePaging = "/UserManagement/GetRefRolePaging";
168
+ AdInsConstant.AddRefRole = "/UserManagement/AddRefRole";
169
+ AdInsConstant.EditRefRole = "/UserManagement/EditRefRole";
170
+ AdInsConstant.DeleteRefRole = "/UserManagement/DeleteRefRole";
171
+ AdInsConstant.GetRefRoleByRefRoleId = "/RefRole/GetRefRoleByRefRoleId";
172
+ AdInsConstant.GetRefRole = "/RefRole/GetRefRole";
173
+ AdInsConstant.GetListDataCurrentUser = "/UserManagement/GetListDataCurrentUser";
174
+ AdInsConstant.GetRefRoleByEmpPositionId = "/RefRole/GetRefRoleByEmpPositionId";
175
+ AdInsConstant.EditUserTitleRole = "/UserManagement/EditUserTitleRole";
176
+ AdInsConstant.AddUserTitleRole = "/UserManagement/AddUserTitleRole";
177
+ AdInsConstant.AssignRoleToUsers = "/UserManagement/AssignRoleToUsers";
178
+ AdInsConstant.GetUserTitleRoleByEmpPositionIdAndRefRoleId = "/UserManagement/GetUserTitleRoleByEmpPositionIdAndRefRoleId";
179
+ //ZIPCODE
180
+ AdInsConstant.GetRefZipcodePaging = "/RefZipcode/GetRefZipcodePaging";
181
+ AdInsConstant.GetRefZipCode = "/RefZipcode/GetRefZipcode";
182
+ AdInsConstant.GetRefProvDistrictObj = "/RefProvDistrict/GetRefProvDistrict";
183
+ AdInsConstant.EditRefZipcode = "/RefZipcode/EditRefZipCode";
184
+ AdInsConstant.AddRefZipcode = "/RefZipcode/AddRefZipCode";
185
+ AdInsConstant.DeleteRefZipcode = "/RefZipcode/DeleteRefZipCode";
186
+ //BUSINESS UNIT
187
+ AdInsConstant.GetBusinessUnitPaging = "/OrganizationDefinition/GetRefBizUnitPaging";
188
+ AdInsConstant.GetRefBizUnit = "/OrganizationDefinition/GetRefBizUnit";
189
+ AdInsConstant.AddRefBizUnit = "/OrganizationDefinition/AddRefBizUnit";
190
+ AdInsConstant.EditRefBizUnit = "/OrganizationDefinition/EditRefBizUnit";
191
+ //REF COY
192
+ AdInsConstant.GetRefCoyPaging = "/RefCoy/GetRefCoyPaging";
193
+ AdInsConstant.GetRefCoy = "/RefCoy/GetRefCoy";
194
+ AdInsConstant.EditRefCoy = "/RefCoy/EditRefCoy";
195
+ AdInsConstant.GetCoyBodPaging = "/CoyBod/GetCoyBodPaging";
196
+ AdInsConstant.AddCoyBod = "/CoyBod/AddCoyBOD";
197
+ AdInsConstant.EditCoyBod = "/CoyBod/EditCoyBOD";
198
+ AdInsConstant.DeleteCoyBod = "/CoyBod/DeleteCoyBOD";
199
+ AdInsConstant.GetCoyBod = "/CoyBod/GetCoyBod";
200
+ AdInsConstant.GetCommissionerPaging = "/CoyCommissioner/GetCoyCommissionerPaging";
201
+ AdInsConstant.AddCoyCommissioner = "/CoyCommissioner/AddCoyCommissioner";
202
+ AdInsConstant.EditCoyCommissioner = "/CoyCommissioner/EditCoyCommissioner";
203
+ AdInsConstant.DeleteCoyCommissioner = "/CoyCommissioner/DeleteCoyCommissioner";
204
+ AdInsConstant.GetCoyCommissioner = "/CoyCommissioner/GetCoyCommissioner";
205
+ //REF TAX OFFICE
206
+ AdInsConstant.GetAllActiveRefTaxOffice = "/RefTaxOffice/GetAllActiveRefTaxOffice";
207
+ //REF MASTER
208
+ AdInsConstant.GetRefMasterList = "/RefMaster/GetRefMasterList";
209
+ AdInsConstant.GetRefMastersByCriteria = "/RefMaster/GetRefMastersByCriteria";
210
+ AdInsConstant.GetRefMaster = "/RefMaster/GetRefMaster";
211
+ AdInsConstant.GetRefMasterListByTypeCode = "/RefMaster/GetRefMasterListByTypeCode";
212
+ AdInsConstant.GetRefMasterListKeyValuePair = "/RefMaster/GetRefMasterListKeyValuePair";
213
+ AdInsConstant.AddRefMaster = "/RefMaster/AddRefMaster";
214
+ AdInsConstant.EditRefMaster = "/RefMaster/EditRefMaster";
215
+ AdInsConstant.GetRefMasterType = "/RefMaster/GetRefMasterType";
216
+ AdInsConstant.DeleteRefMaster = "/RefMaster/DeleteRefMaster";
217
+ AdInsConstant.GetRefMasterPaging = "/RefMaster/GetRefMasterPaging";
218
+ //REF PROV DISTRICT
219
+ AdInsConstant.GetRefProvDistrictPaging = "/RefProvDistrict/GetRefProvDistrictPaging";
220
+ //MENU
221
+ AdInsConstant.GetRefFormPaging = "/MenuManagement/GetRefFormPaging";
222
+ AdInsConstant.GetAllActiveRefFormByRefRoleId = "/MenuManagement/GetAllActiveRefFormByRefRoleId";
223
+ AdInsConstant.GetRefFormByRefFormId = "/MenuManagement/GetRefFormByRefFormId";
224
+ AdInsConstant.EditRefForm = "/MenuManagement/EditRefForm";
225
+ AdInsConstant.AddRefForm = "/MenuManagement/AddRefForm";
226
+ AdInsConstant.DeleteRefForm = "/MenuManagement/DeleteRefForm";
227
+ AdInsConstant.AssignRoleToForms = "/MenuManagement/AssignRoleToForms";
228
+ AdInsConstant.GetAllAuthFormsByRefRoleId = "/MenuManagement/GetAllAuthFormsByRefRoleId";
229
+ AdInsConstant.GetAuthByRefFormIdAndRefRoleId = "/MenuManagement/GetAuthByRefFormIdAndRefRoleId";
230
+ AdInsConstant.UpdateFormFeatureAuthForm = "/MenuManagement/UpdateFormFeatureAuthForm";
231
+ //FORM FEATURE
232
+ AdInsConstant.GetListRefFeature = "/RefFeature/GetListRefFeature";
233
+ AdInsConstant.GetRefFeatureByComponent = "/RefFeature/GetRefFeatureByComponent";
234
+ //HOLIDAY
235
+ AdInsConstant.GetAllActiveHolidaySchmH = "/Holiday/GetAllActiveHolidaySchmH";
236
+ AdInsConstant.GetHolidayPaging = "/Holiday/GetHolidayPaging";
237
+ AdInsConstant.AddHolidaySchmH = "/Holiday/AddHolidaySchmH";
238
+ AdInsConstant.AddHolidaySchmD = "/Holiday/AddHolidaySchmD";
239
+ AdInsConstant.AddHolidaySchmDUntilYear = "/Holiday/AddHolidaySchmDUntilYear";
240
+ AdInsConstant.GetHolidaySchmH = "/Holiday/GetHolidaySchmH";
241
+ AdInsConstant.EditHolidaySchmHOnly = "/Holiday/EditHolidaySchmHOnly";
242
+ AdInsConstant.DeleteHolidaySchmH = "/Holiday/DeleteHolidaySchmH";
243
+ AdInsConstant.DeleteHolidaySchmD = "/Holiday/DeleteHolidaySchmD";
244
+ AdInsConstant.GetHolidayDetailPaging = "/Holiday/GetHolidayDetailPaging";
245
+ //USER SESSION LOG
246
+ AdInsConstant.SelectRole = "/UserSessionLog/SelectRole";
247
+ //NOTIFICATION
248
+ AdInsConstant.NotificationPost = "/Message/Post";
249
+ //REF CURR
250
+ AdInsConstant.GetRefCurrPaging = "/RefCurr/GetRefCurrPaging";
251
+ AdInsConstant.AddRefCurr = "/RefCurr/AddRefCurr";
252
+ AdInsConstant.EditRefCurr = "/RefCurr/EditRefCurr";
253
+ AdInsConstant.GetRefCurr = "/RefCurr/GetRefCurr";
254
+ AdInsConstant.AddExchangeRate = "/RefCurr/AddExchangeRate";
255
+ AdInsConstant.EditExchangeRate = "/RefCurr/EditExchangeRate";
256
+ AdInsConstant.GetExchangeRate = "/RefCurr/GetExchangeRate";
257
+ //WORKHOUR
258
+ AdInsConstant.GetListOfWorkingHourSchm = "/WorkHour/GetListOfWorkingHourSchm";
259
+ AdInsConstant.GetWorkHourSchmHPaging = "/WorkHour/GetWorkHourSchmHPaging";
260
+ AdInsConstant.AddWorkingHourSchmH = "/WorkHour/AddWorkingHourSchmH";
261
+ AdInsConstant.EditWorkingHourSchmH = "/WorkHour/EditWorkingHourSchmH";
262
+ AdInsConstant.GetWorkingHourSchmH = "/WorkHour/GetWorkingHourSchmH";
263
+ AdInsConstant.GetWorkingHourSchmD = "/WorkHour/GetWorkingHourSchmD";
264
+ AdInsConstant.DeleteWorkingHourSchmH = "/WorkHour/DeleteWorkingHourSchmH";
265
+
266
+ /**
267
+ * @fileoverview added by tsickle
268
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
269
+ */
270
+
271
+ /**
272
+ * @fileoverview added by tsickle
273
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
274
+ */
275
+ class UCSearchComponent {
276
+ /**
277
+ * @param {?} http
278
+ * @param {?} decimalPipe
279
+ * @param {?} _renderer2
280
+ * @param {?} _document
281
+ */
282
+ constructor(http, decimalPipe, _renderer2, _document) {
283
+ this.http = http;
284
+ this.decimalPipe = decimalPipe;
285
+ this._renderer2 = _renderer2;
286
+ this._document = _document;
287
+ this.pageSize = 10;
288
+ this.pageNow = 1;
289
+ this.addCritInput = null;
290
+ this.result = new EventEmitter();
291
+ this.isDataLoaded = false;
292
+ this.isHidden = false;
293
+ this.payLoad = '';
294
+ this.countForm = 0;
295
+ this.formattedAmount = '';
296
+ this.amount = 0;
297
+ }
298
+ /**
299
+ * @return {?}
300
+ */
301
+ initiateForm() {
302
+ this.getJSON(this._url).subscribe((/**
303
+ * @param {?} data
304
+ * @return {?}
305
+ */
306
+ data => {
307
+ console.log(data);
308
+ this.configuration = data;
309
+ this.urlGet = data.url;
310
+ this.exportData = data.exportExcel;
311
+ this.countForm = data.component.length;
312
+ console.log(this.countForm);
313
+ this.isDataLoaded = true;
314
+ /** @type {?} */
315
+ var i = 0;
316
+ for (var i = 0; i < this.countForm; i++) {
317
+ //ini kalau datanya di load dari URL
318
+ if (data.component[i].isFromURL == true) {
319
+ //lempar objectnya sekalian sama urlnya, nnti di bind di dalem karena masalah di asyncnya
320
+ //biar tiap function ada state2nya sendiri
321
+ this.resolveObject(data.component[i], data.component[i].url);
322
+ }
323
+ if (data.component[i].type === "numeric") {
324
+ data.component[i].value = parseFloat(data.component[i].value).toLocaleString('en');
325
+ }
326
+ //pengecekan tanggal
327
+ if (data.component[i].type === "datepicker") {
328
+ if (data.component[i].value.includes("BD")) {
329
+ /** @type {?} */
330
+ let businessDate = new Date(JSON.parse(localStorage.getItem("UserContext")).BusinessDate);
331
+ /** @type {?} */
332
+ var operator = data.component[i].value.charAt(2);
333
+ /** @type {?} */
334
+ var dateShow = new Date();
335
+ if (operator === "-") {
336
+ /** @type {?} */
337
+ var tempMinus = data.component[i].value.split("-", 2);
338
+ /** @type {?} */
339
+ var numDay = parseInt(tempMinus[1]);
340
+ dateShow.setDate(businessDate.getDate() - numDay);
341
+ }
342
+ else if (operator === "+") {
343
+ /** @type {?} */
344
+ var tempMinus = data.component[i].value.split("+", 2);
345
+ /** @type {?} */
346
+ var numDay = parseInt(tempMinus[1]);
347
+ dateShow.setDate(businessDate.getDate() + numDay);
348
+ }
349
+ /** @type {?} */
350
+ var dateText = formatDate(dateShow, 'yyyy-MM-dd', 'en-US');
351
+ data.component[i].value = dateText;
352
+ }
353
+ }
354
+ }
355
+ }));
356
+ }
357
+ /**
358
+ * @return {?}
359
+ */
360
+ ngOnInit() {
361
+ this.apiUrl = this.enviromentUrl + this.apiQryPaging;
362
+ this.arrCrit = this.arrCritObj;
363
+ /** @type {?} */
364
+ let js = this._renderer2.createElement('script');
365
+ js.text = `
366
+ $(document).ready(function(){
367
+ $("#flip").click(function(){
368
+ $("#panel").slideToggle("slow");
369
+ });
370
+ });
371
+ `;
372
+ this._renderer2.appendChild(this._document.body, js);
373
+ this.initiateForm();
374
+ }
375
+ /**
376
+ * @param {?} url
377
+ * @return {?}
378
+ */
379
+ getJSON(url) {
380
+ return this.http.get(url);
381
+ }
382
+ /**
383
+ * @param {?} url
384
+ * @return {?}
385
+ */
386
+ postJSON(url) {
387
+ return this.http.post(url, null);
388
+ }
389
+ /**
390
+ * @return {?}
391
+ */
392
+ onSubmit() {
393
+ this.payLoad = JSON.stringify(this.form.value);
394
+ console.log("This is Payload:" + this.payLoad);
395
+ }
396
+ /**
397
+ * @return {?}
398
+ */
399
+ searchTry() {
400
+ console.log("This Call Search");
401
+ console.log(this.myForm);
402
+ for (var i = 0; i < this.countForm; i++) {
403
+ console.log(this.myForm.nativeElement[i].name + " - " + this.myForm.nativeElement[i].value);
404
+ }
405
+ }
406
+ /**
407
+ * @return {?}
408
+ */
409
+ searchClick() {
410
+ this.orderByKey = null;
411
+ this.orderByValue = true;
412
+ this.pageNow = 1;
413
+ this.search(this.apiUrl, this.pageNow, this.pageSize, null, this.arrCrit);
414
+ }
415
+ /**
416
+ * @param {?} apiUrl
417
+ * @param {?} pageNo
418
+ * @param {?} rowPerPage
419
+ * @param {?} orderBy
420
+ * @param {?=} addCrit
421
+ * @return {?}
422
+ */
423
+ search(apiUrl, pageNo, rowPerPage, orderBy, addCrit = null) {
424
+ console.log(pageNo);
425
+ /** @type {?} */
426
+ var request = new RequestCriteriaObj();
427
+ /** @type {?} */
428
+ var arrCrit = new Array();
429
+ console.log("Search");
430
+ request.pageNo = pageNo;
431
+ request.rowPerPage = rowPerPage;
432
+ request.orderBy = orderBy;
433
+ for (var i = 0; i < this.countForm; i++) {
434
+ /** @type {?} */
435
+ var critObj = new CriteriaObj();
436
+ /** @type {?} */
437
+ var component = this.myForm.nativeElement[i];
438
+ critObj.DataType = component.getAttribute('data-type');
439
+ console.log('component');
440
+ console.log(component.value);
441
+ //Ini khusus kalau dari Drop Down
442
+ if (component.value != "") {
443
+ if (component.nodeName === 'SELECT') {
444
+ /** @type {?} */
445
+ var ddl = component.options;
446
+ /** @type {?} */
447
+ var text = ddl[ddl.selectedIndex].value;
448
+ if (text !== "All") {
449
+ //Kalau Dari Dropdown udah pasti pake Eq
450
+ critObj.restriction = AdInsConstant.RestrictionEq;
451
+ critObj.propName = component.name;
452
+ critObj.value = text;
453
+ arrCrit.push(critObj);
454
+ }
455
+ }
456
+ else {
457
+ //Kalau ada Percent maka yang dipake nnti adalah Restrictions Like
458
+ critObj.propName = component.name;
459
+ critObj.value = component.value;
460
+ console.log(component.type);
461
+ console.log(component.restriction);
462
+ if (component.value.includes("%")) {
463
+ critObj.restriction = AdInsConstant.RestrictionLike;
464
+ }
465
+ //kalau componentnya Date, restrictionsnya lgsg ambil dari property JSONnya
466
+ else if (component.getAttribute('data-restriction') != "" && component.getAttribute('data-restriction') != null) {
467
+ critObj.restriction = component.getAttribute('data-restriction');
468
+ }
469
+ else {
470
+ critObj.restriction = AdInsConstant.RestrictionEq;
471
+ }
472
+ arrCrit.push(critObj);
473
+ }
474
+ }
475
+ }
476
+ if (addCrit !== null) {
477
+ for (var i = 0; i < addCrit.length; i++) {
478
+ arrCrit.push(addCrit[i]);
479
+ }
480
+ }
481
+ else if (this.addCritInput !== null) {
482
+ for (var i = 0; i < this.addCritInput.length; i++) {
483
+ arrCrit.push(this.addCritInput[i]);
484
+ }
485
+ }
486
+ request.criteria = arrCrit;
487
+ this.http.post(apiUrl, request).subscribe((/**
488
+ * @param {?} response
489
+ * @return {?}
490
+ */
491
+ (response) => {
492
+ /** @type {?} */
493
+ var qryPaging = {
494
+ response: response,
495
+ pageNow: pageNo
496
+ };
497
+ console.log(qryPaging);
498
+ this.result.emit(qryPaging);
499
+ return response;
500
+ }));
501
+ }
502
+ /**
503
+ * @return {?}
504
+ */
505
+ lessThanFour() {
506
+ if (this.countForm > 3) {
507
+ return false;
508
+ }
509
+ else {
510
+ return true;
511
+ }
512
+ }
513
+ /**
514
+ * @param {?} obj
515
+ * @param {?} url
516
+ * @return {?}
517
+ */
518
+ resolveObject(obj, url) {
519
+ /** @type {?} */
520
+ const val = this.postJSON(this.enviromentUrl + url);
521
+ val.subscribe((/**
522
+ * @param {?} tempData
523
+ * @return {?}
524
+ */
525
+ tempData => {
526
+ obj.itemsUrl = tempData.returnObject;
527
+ }));
528
+ }
529
+ /**
530
+ * @param {?} element
531
+ * @return {?}
532
+ */
533
+ transformAmount(element) {
534
+ this.formattedAmount = parseFloat(element.target.value).toLocaleString('en');
535
+ // Remove or comment this line if you dont want
536
+ // to show the formatted amount in the textbox.
537
+ element.target.value = this.formattedAmount;
538
+ }
539
+ /**
540
+ * @param {?} element
541
+ * @return {?}
542
+ */
543
+ transformToDecimal(element) {
544
+ element.target.value = parseFloat(element.target.value.toString().replace(/,/g, ''));
545
+ }
546
+ }
547
+ UCSearchComponent.decorators = [
548
+ { type: Component, args: [{
549
+ selector: 'lib-UCSearch',
550
+ template: "<!-- Basic form layout section start -->\r\n<section id=\"horizontal-form-layouts\">\r\n <div class=\"row text-left\">\r\n <div class=\"col-md-12\">\r\n <div class=\"card\">\r\n <div class=\"card-body\">\r\n <div class=\"px-3\">\r\n <form class=\"form form-horizontal\" id=\"formSearch\" #formIdSearch>\r\n <div class=\"form-body\">\r\n <h4 class=\"form-section\"> {{configuration?.title}} <div id=\"flip\" class=\"btn float-right\"\r\n (click)=\"isHidden = !isHidden\"><i class=\"fa\"\r\n [ngClass]=\"isHidden ? 'fa-chevron-down' : 'fa-chevron-up'\"></i></div>\r\n </h4>\r\n <!-- Ini Digunakan untuk Generate Dynamic Component -->\r\n <!-- [hidden]=\"isHidden\" -->\r\n <div id=\"panel\">\r\n <div class=\"row\">\r\n <div class=\"col-md-6 form-group\"\r\n *ngFor=\"let question of configuration?.component\">\r\n <div class=\"col-md-12\">\r\n <div class=\"row\">\r\n <label class=\"col-md-5 no-padding\" for=\"projectinput1\"\r\n translate>{{question.label}}</label>\r\n <div class=\"col-md-7 no-padding\">\r\n <div *ngIf=\"question.type==='textbox'\">\r\n <input type=\"text\" id=\"{{question.id}}\" class=\"form-control search-form-control\"\r\n name=\"{{question.name}}\" value=\"{{question.value}}\"\r\n attr.data-type=\"{{question.datatype}}\">\r\n </div>\r\n <div *ngIf=\"question.type==='textarea'\">\r\n <textarea type=\"text\" id=\"{{question.id}}\" class=\"form-control search-form-control\"\r\n name=\"{{question.name}}\" attr.data-type=\"{{question.datatype}}\"\r\n value=\"{{question.value}}\"></textarea>\r\n </div>\r\n <div *ngIf=\"question.type==='numeric'\">\r\n <input type=\"text\" id=\"{{question.id}}\" (focus)=\"transformToDecimal($event)\"\r\n (blur)=\"transformAmount($event)\" class=\"form-control search-form-control\"\r\n name=\"{{question.name}}\" value=\"{{question.value}}\"\r\n attr.data-restriction=\"{{question.restriction}}\" attr.data-type=\"{{question.datatype}}\">\r\n </div>\r\n \r\n <!-- Sementara di Hardcode begini dulu-->\r\n <div *ngIf=\"question.type==='lookupProduct'\">\r\n <!-- <app-lookup></app-lookup> -->\r\n </div>\r\n \r\n <!-- End Hardcode Lookup didalem-->\r\n <div *ngIf=\"question.type==='datepicker'\">\r\n <input type=\"date\" id=\"{{question.id}}\" class=\"form-control search-form-control btn-lookup\"\r\n name=\"{{question.name}}\" value=\"{{question.value}}\" attr.data-type=\"{{question.datatype}}\"\r\n attr.data-restriction=\"{{question.restriction}}\">\r\n </div>\r\n <div *ngIf=\"question.type==='dropdown'\">\r\n <!-- Ini kalau datanya tidak di load dari URL -->\r\n <div *ngIf=\"!question.isFromURL\">\r\n <select id=\"projectinput6\" name=\"{{question.name}}\"\r\n class=\"form-control search-form-control\" attr.data-type=\"{{question.datatype}}\">\r\n <option *ngIf=\"!question.isSelectOne\" value=\"All\">\r\n All\r\n </option>\r\n <option *ngFor=\"let item of question?.items\" value=\"{{item.key}}\">\r\n {{item.value}}\r\n </option>\r\n </select>\r\n </div>\r\n <!-- Ini kalau datanya di load dari URL -->\r\n <div *ngIf=\"question.isFromURL\">\r\n <select id=\"projectinput6\" name=\"{{question.name}}\"\r\n class=\"form-control search-form-control\" attr.data-type=\"{{question.datatype}}\">\r\n <option *ngIf=\"!question.isSelectOne\" value=\"All\">\r\n All\r\n </option>\r\n <option *ngFor=\"let item of question?.itemsUrl\" value=\"{{item.key}}\">\r\n {{item.value}}\r\n </option>\r\n </select>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"col-md-12 no-padding\">\r\n <form>\r\n <div class=\"form-actions right\">\r\n <button *ngIf=\"exportData\" type=\"button\"\r\n class=\"btn btn-raised btn-success mr-1\" translate>\r\n <i class=\"fa fa-plus-circle\"></i> Export Excel\r\n </button>\r\n <button type=\"button\" class=\"btn btn-raised btn-warning mr-1\" translate>\r\n <i class=\"ft-x\"></i> Reset\r\n </button>\r\n <button type=\"button\" (click)=\"searchClick()\" class=\"btn btn-raised btn-primary\" translate>\r\n <i class=\"fa fa-search\"></i> Search\r\n </button>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n <br>\r\n <!-- // Basic form layout section end -->"
551
+ }] }
552
+ ];
553
+ /** @nocollapse */
554
+ UCSearchComponent.ctorParameters = () => [
555
+ { type: HttpClient },
556
+ { type: DecimalPipe },
557
+ { type: Renderer2 },
558
+ { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }
559
+ ];
560
+ UCSearchComponent.propDecorators = {
561
+ myForm: [{ type: ViewChild, args: ['formIdSearch',] }],
562
+ _url: [{ type: Input }],
563
+ apiQryPaging: [{ type: Input }],
564
+ enviromentUrl: [{ type: Input }],
565
+ arrCritObj: [{ type: Input }],
566
+ pageSize: [{ type: Input }],
567
+ pageNow: [{ type: Input }],
568
+ addCritInput: [{ type: Input }],
569
+ result: [{ type: Output }]
570
+ };
571
+
572
+ /**
573
+ * @fileoverview added by tsickle
574
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
575
+ */
576
+ class UCSearchModule {
577
+ }
578
+ UCSearchModule.decorators = [
579
+ { type: NgModule, args: [{
580
+ declarations: [UCSearchComponent],
581
+ imports: [
582
+ CommonModule
583
+ ],
584
+ exports: [UCSearchComponent]
585
+ },] }
586
+ ];
587
+
588
+ /**
589
+ * @fileoverview added by tsickle
590
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
591
+ */
592
+
593
+ /**
594
+ * @fileoverview added by tsickle
595
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
596
+ */
597
+
598
+ export { UCSearchService, UCSearchComponent, UCSearchModule };
599
+
600
+ //# sourceMappingURL=ucsearch.js.map