@senior-gestao-pessoas/hcm-entity-lookups 5.0.0 → 5.0.1-develop-dbc82ec7

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 (168) hide show
  1. package/bundles/senior-gestao-pessoas-hcm-entity-lookups.umd.js +2413 -500
  2. package/bundles/senior-gestao-pessoas-hcm-entity-lookups.umd.js.map +1 -1
  3. package/bundles/senior-gestao-pessoas-hcm-entity-lookups.umd.min.js +2 -2
  4. package/bundles/senior-gestao-pessoas-hcm-entity-lookups.umd.min.js.map +1 -1
  5. package/core/entities/characteristics/characteristics-dto.d.ts +2 -0
  6. package/core/entities/characteristics/characteristics.d.ts +2 -0
  7. package/core/entities/characteristics/characteristics.service.d.ts +2 -2
  8. package/core/entities/fgts-taxation/fgts-taxation-dto.d.ts +9 -0
  9. package/core/entities/fgts-taxation/fgts-taxation.d.ts +13 -0
  10. package/core/entities/fgts-taxation/fgts-taxation.service.d.ts +13 -0
  11. package/core/entities/fgts-taxation-group/fgts-taxation-group-dto.d.ts +6 -0
  12. package/core/entities/fgts-taxation-group/fgts-taxation-group.d.ts +9 -0
  13. package/core/entities/fpas-registration/fpas-registration.service.d.ts +1 -1
  14. package/core/entities/inss-taxation/inss-taxation-dto.d.ts +9 -0
  15. package/core/entities/inss-taxation/inss-taxation.d.ts +14 -0
  16. package/core/entities/inss-taxation/inss-taxation.module.d.ts +2 -0
  17. package/core/entities/inss-taxation/inss-taxation.service.d.ts +14 -0
  18. package/core/entities/inss-taxation-group/index.d.ts +3 -0
  19. package/core/entities/inss-taxation-group/inss-taxation-group-dto.d.ts +6 -0
  20. package/core/entities/inss-taxation-group/inss-taxation-group.d.ts +9 -0
  21. package/core/entities/inss-taxation-group/inss-taxation-group.module.d.ts +2 -0
  22. package/core/entities/inss-taxation-group/inss-taxation-group.service.d.ts +13 -0
  23. package/core/entities/irrf-taxation/irrf-taxation-dto.d.ts +9 -0
  24. package/core/entities/irrf-taxation/irrf-taxation.d.ts +14 -0
  25. package/core/entities/irrf-taxation/irrf-taxation.service.d.ts +14 -0
  26. package/core/entities/irrf-taxation-group/irrf-taxation-group-dto.d.ts +6 -0
  27. package/core/entities/irrf-taxation-group/irrf-taxation-group.d.ts +9 -0
  28. package/core/entities/nature-payroll-rubrica/index.d.ts +3 -0
  29. package/core/entities/nature-payroll-rubrica/nature-payroll-rubrica-dto.d.ts +7 -0
  30. package/core/entities/nature-payroll-rubrica/nature-payroll-rubrica.d.ts +10 -0
  31. package/core/entities/nature-payroll-rubrica/nature-payroll-rubrica.module.d.ts +2 -0
  32. package/core/entities/nature-payroll-rubrica/nature-payroll-rubrica.service.d.ts +13 -0
  33. package/core/entities/rules/rules.service.d.ts +3 -4
  34. package/core/index.d.ts +2 -0
  35. package/esm2015/core/core-lookup.module.js +14 -8
  36. package/esm2015/core/entities/characteristics/characteristics-dto.js +1 -1
  37. package/esm2015/core/entities/characteristics/characteristics.js +6 -5
  38. package/esm2015/core/entities/characteristics/characteristics.service.js +4 -4
  39. package/esm2015/core/entities/fgts-taxation/fgts-taxation-dto.js +1 -0
  40. package/esm2015/core/entities/fgts-taxation/fgts-taxation.js +25 -0
  41. package/esm2015/core/entities/fgts-taxation/fgts-taxation.service.js +27 -0
  42. package/esm2015/core/entities/fgts-taxation-group/fgts-taxation-group-dto.js +1 -0
  43. package/esm2015/core/entities/fgts-taxation-group/fgts-taxation-group.js +18 -0
  44. package/esm2015/core/entities/fpas-registration/fpas-registration.service.js +2 -2
  45. package/esm2015/core/entities/inss-taxation/inss-taxation-dto.js +1 -0
  46. package/esm2015/core/entities/inss-taxation/inss-taxation.js +28 -0
  47. package/esm2015/core/entities/inss-taxation/inss-taxation.module.js +26 -0
  48. package/esm2015/core/entities/inss-taxation/inss-taxation.service.js +34 -0
  49. package/esm2015/core/entities/inss-taxation-group/index.js +3 -0
  50. package/esm2015/core/entities/inss-taxation-group/inss-taxation-group-dto.js +1 -0
  51. package/esm2015/core/entities/inss-taxation-group/inss-taxation-group.js +18 -0
  52. package/esm2015/core/entities/inss-taxation-group/inss-taxation-group.module.js +26 -0
  53. package/esm2015/core/entities/inss-taxation-group/inss-taxation-group.service.js +27 -0
  54. package/esm2015/core/entities/irrf-taxation/irrf-taxation-dto.js +1 -0
  55. package/esm2015/core/entities/irrf-taxation/irrf-taxation.js +25 -0
  56. package/esm2015/core/entities/irrf-taxation/irrf-taxation.service.js +34 -0
  57. package/esm2015/core/entities/irrf-taxation-group/irrf-taxation-group-dto.js +1 -0
  58. package/esm2015/core/entities/irrf-taxation-group/irrf-taxation-group.js +18 -0
  59. package/esm2015/core/entities/nature-payroll-rubrica/index.js +3 -0
  60. package/esm2015/core/entities/nature-payroll-rubrica/nature-payroll-rubrica-dto.js +1 -0
  61. package/esm2015/core/entities/nature-payroll-rubrica/nature-payroll-rubrica.js +20 -0
  62. package/esm2015/core/entities/nature-payroll-rubrica/nature-payroll-rubrica.module.js +26 -0
  63. package/esm2015/core/entities/nature-payroll-rubrica/nature-payroll-rubrica.service.js +27 -0
  64. package/esm2015/core/entities/rules/rules.service.js +4 -11
  65. package/esm2015/core/index.js +3 -1
  66. package/esm2015/lookups/calculation-definition-lookup/calculation-definition-lookup.service.js +4 -23
  67. package/esm2015/lookups/characteristics-lookup/characteristics-lookup.component.js +61 -0
  68. package/esm2015/lookups/characteristics-lookup/characteristics-lookup.module.js +29 -0
  69. package/esm2015/lookups/characteristics-lookup/characteristics-lookup.service.js +205 -0
  70. package/esm2015/lookups/fgts-taxation-lookup/fgts-taxation-lookup.component.js +61 -0
  71. package/esm2015/lookups/fgts-taxation-lookup/fgts-taxation-lookup.module.js +29 -0
  72. package/esm2015/lookups/fgts-taxation-lookup/fgts-taxation-lookup.service.js +192 -0
  73. package/esm2015/lookups/inss-taxation-lookup/inss-taxation-lookup.component.js +61 -0
  74. package/esm2015/lookups/inss-taxation-lookup/inss-taxation-lookup.module.js +29 -0
  75. package/esm2015/lookups/inss-taxation-lookup/inss-taxation-lookup.service.js +202 -0
  76. package/esm2015/lookups/irrf-taxation-lookup/irrf-taxation-lookup.component.js +61 -0
  77. package/esm2015/lookups/irrf-taxation-lookup/irrf-taxation-lookup.module.js +29 -0
  78. package/esm2015/lookups/irrf-taxation-lookup/irrf-taxation-lookup.service.js +202 -0
  79. package/esm2015/lookups/nature-payroll-rubrica-lookup/nature-payroll-rubrica-lookup.component.js +56 -0
  80. package/esm2015/lookups/nature-payroll-rubrica-lookup/nature-payroll-rubrica-lookup.module.js +29 -0
  81. package/esm2015/lookups/nature-payroll-rubrica-lookup/nature-payroll-rubrica-lookup.service.js +188 -0
  82. package/esm2015/lookups/rules-lookup/rules-lookup.component.js +56 -0
  83. package/esm2015/lookups/rules-lookup/rules-lookup.module.js +29 -0
  84. package/esm2015/lookups/rules-lookup/rules-lookup.service.js +183 -0
  85. package/esm2015/public-api.js +19 -1
  86. package/esm2015/senior-gestao-pessoas-hcm-entity-lookups.js +33 -27
  87. package/esm2015/shared/utils/utils.js +17 -1
  88. package/esm5/core/core-lookup.module.js +14 -8
  89. package/esm5/core/entities/characteristics/characteristics-dto.js +1 -1
  90. package/esm5/core/entities/characteristics/characteristics.js +6 -5
  91. package/esm5/core/entities/characteristics/characteristics.service.js +4 -4
  92. package/esm5/core/entities/fgts-taxation/fgts-taxation-dto.js +1 -0
  93. package/esm5/core/entities/fgts-taxation/fgts-taxation.js +30 -0
  94. package/esm5/core/entities/fgts-taxation/fgts-taxation.service.js +30 -0
  95. package/esm5/core/entities/fgts-taxation-group/fgts-taxation-group-dto.js +1 -0
  96. package/esm5/core/entities/fgts-taxation-group/fgts-taxation-group.js +21 -0
  97. package/esm5/core/entities/fpas-registration/fpas-registration.service.js +2 -2
  98. package/esm5/core/entities/inss-taxation/inss-taxation-dto.js +1 -0
  99. package/esm5/core/entities/inss-taxation/inss-taxation.js +33 -0
  100. package/esm5/core/entities/inss-taxation/inss-taxation.module.js +29 -0
  101. package/esm5/core/entities/inss-taxation/inss-taxation.service.js +37 -0
  102. package/esm5/core/entities/inss-taxation-group/index.js +3 -0
  103. package/esm5/core/entities/inss-taxation-group/inss-taxation-group-dto.js +1 -0
  104. package/esm5/core/entities/inss-taxation-group/inss-taxation-group.js +21 -0
  105. package/esm5/core/entities/inss-taxation-group/inss-taxation-group.module.js +29 -0
  106. package/esm5/core/entities/inss-taxation-group/inss-taxation-group.service.js +30 -0
  107. package/esm5/core/entities/irrf-taxation/irrf-taxation-dto.js +1 -0
  108. package/esm5/core/entities/irrf-taxation/irrf-taxation.js +30 -0
  109. package/esm5/core/entities/irrf-taxation/irrf-taxation.service.js +37 -0
  110. package/esm5/core/entities/irrf-taxation-group/irrf-taxation-group-dto.js +1 -0
  111. package/esm5/core/entities/irrf-taxation-group/irrf-taxation-group.js +21 -0
  112. package/esm5/core/entities/nature-payroll-rubrica/index.js +3 -0
  113. package/esm5/core/entities/nature-payroll-rubrica/nature-payroll-rubrica-dto.js +1 -0
  114. package/esm5/core/entities/nature-payroll-rubrica/nature-payroll-rubrica.js +25 -0
  115. package/esm5/core/entities/nature-payroll-rubrica/nature-payroll-rubrica.module.js +29 -0
  116. package/esm5/core/entities/nature-payroll-rubrica/nature-payroll-rubrica.service.js +30 -0
  117. package/esm5/core/entities/rules/rules.service.js +4 -11
  118. package/esm5/core/index.js +3 -1
  119. package/esm5/lookups/calculation-definition-lookup/calculation-definition-lookup.service.js +4 -23
  120. package/esm5/lookups/characteristics-lookup/characteristics-lookup.component.js +66 -0
  121. package/esm5/lookups/characteristics-lookup/characteristics-lookup.module.js +32 -0
  122. package/esm5/lookups/characteristics-lookup/characteristics-lookup.service.js +215 -0
  123. package/esm5/lookups/fgts-taxation-lookup/fgts-taxation-lookup.component.js +66 -0
  124. package/esm5/lookups/fgts-taxation-lookup/fgts-taxation-lookup.module.js +32 -0
  125. package/esm5/lookups/fgts-taxation-lookup/fgts-taxation-lookup.service.js +202 -0
  126. package/esm5/lookups/inss-taxation-lookup/inss-taxation-lookup.component.js +66 -0
  127. package/esm5/lookups/inss-taxation-lookup/inss-taxation-lookup.module.js +32 -0
  128. package/esm5/lookups/inss-taxation-lookup/inss-taxation-lookup.service.js +212 -0
  129. package/esm5/lookups/irrf-taxation-lookup/irrf-taxation-lookup.component.js +66 -0
  130. package/esm5/lookups/irrf-taxation-lookup/irrf-taxation-lookup.module.js +32 -0
  131. package/esm5/lookups/irrf-taxation-lookup/irrf-taxation-lookup.service.js +212 -0
  132. package/esm5/lookups/nature-payroll-rubrica-lookup/nature-payroll-rubrica-lookup.component.js +61 -0
  133. package/esm5/lookups/nature-payroll-rubrica-lookup/nature-payroll-rubrica-lookup.module.js +32 -0
  134. package/esm5/lookups/nature-payroll-rubrica-lookup/nature-payroll-rubrica-lookup.service.js +198 -0
  135. package/esm5/lookups/rules-lookup/rules-lookup.component.js +61 -0
  136. package/esm5/lookups/rules-lookup/rules-lookup.module.js +32 -0
  137. package/esm5/lookups/rules-lookup/rules-lookup.service.js +193 -0
  138. package/esm5/public-api.js +19 -1
  139. package/esm5/senior-gestao-pessoas-hcm-entity-lookups.js +33 -27
  140. package/esm5/shared/utils/utils.js +17 -1
  141. package/fesm2015/senior-gestao-pessoas-hcm-entity-lookups.js +2151 -402
  142. package/fesm2015/senior-gestao-pessoas-hcm-entity-lookups.js.map +1 -1
  143. package/fesm5/senior-gestao-pessoas-hcm-entity-lookups.js +2360 -475
  144. package/fesm5/senior-gestao-pessoas-hcm-entity-lookups.js.map +1 -1
  145. package/lookups/calculation-definition-lookup/calculation-definition-lookup.service.d.ts +0 -1
  146. package/lookups/characteristics-lookup/characteristics-lookup.component.d.ts +25 -0
  147. package/lookups/characteristics-lookup/characteristics-lookup.module.d.ts +2 -0
  148. package/lookups/characteristics-lookup/characteristics-lookup.service.d.ts +29 -0
  149. package/lookups/fgts-taxation-lookup/fgts-taxation-lookup.component.d.ts +25 -0
  150. package/lookups/fgts-taxation-lookup/fgts-taxation-lookup.module.d.ts +2 -0
  151. package/lookups/fgts-taxation-lookup/fgts-taxation-lookup.service.d.ts +28 -0
  152. package/lookups/inss-taxation-lookup/inss-taxation-lookup.component.d.ts +25 -0
  153. package/lookups/inss-taxation-lookup/inss-taxation-lookup.module.d.ts +2 -0
  154. package/lookups/inss-taxation-lookup/inss-taxation-lookup.service.d.ts +28 -0
  155. package/lookups/irrf-taxation-lookup/irrf-taxation-lookup.component.d.ts +25 -0
  156. package/lookups/irrf-taxation-lookup/irrf-taxation-lookup.module.d.ts +2 -0
  157. package/lookups/irrf-taxation-lookup/irrf-taxation-lookup.service.d.ts +28 -0
  158. package/lookups/nature-payroll-rubrica-lookup/nature-payroll-rubrica-lookup.component.d.ts +24 -0
  159. package/lookups/nature-payroll-rubrica-lookup/nature-payroll-rubrica-lookup.module.d.ts +2 -0
  160. package/lookups/nature-payroll-rubrica-lookup/nature-payroll-rubrica-lookup.service.d.ts +25 -0
  161. package/lookups/rules-lookup/rules-lookup.component.d.ts +24 -0
  162. package/lookups/rules-lookup/rules-lookup.module.d.ts +2 -0
  163. package/lookups/rules-lookup/rules-lookup.service.d.ts +25 -0
  164. package/package.json +1 -1
  165. package/public-api.d.ts +18 -0
  166. package/senior-gestao-pessoas-hcm-entity-lookups.d.ts +32 -26
  167. package/senior-gestao-pessoas-hcm-entity-lookups.metadata.json +1 -1
  168. package/shared/utils/utils.d.ts +2 -0
@@ -650,6 +650,22 @@
650
650
  }
651
651
  return { id: name, label: label + ": " + labelValue };
652
652
  };
653
+ var getFiltersForCustomDisplayFields = function (filterData, filter) {
654
+ var filterQuery = '';
655
+ if (filter && filter.length > 0) {
656
+ filter.forEach(function (filter) {
657
+ if (filter.value.startsWith('in:')) {
658
+ var values = filter.value.substring(3).split(',');
659
+ var inCondition = values.map(function (v) { return filter.key + " eq '" + v + "'"; }).join(' or ');
660
+ filterQuery += "(" + inCondition + ") and ";
661
+ }
662
+ else {
663
+ filterQuery += filter.key + " eq '" + filter.value + "' and ";
664
+ }
665
+ });
666
+ }
667
+ return filterQuery ? filterQuery.slice(0, -5) : '';
668
+ };
653
669
 
654
670
  var StructureFilterService = /** @class */ (function () {
655
671
  function StructureFilterService(translateService, http, messageService, configService) {
@@ -5761,7 +5777,7 @@
5761
5777
  order: 1
5762
5778
  }); });
5763
5779
  var filterQuery = createLookupRequestFilter(value, this.getCalculationDefinitionSearchFields());
5764
- filterQuery = this.getFilters(filterQuery, filter);
5780
+ filterQuery = getFiltersForCustomDisplayFields(filterQuery, filter);
5765
5781
  var displayFields = this.calculationDefinitionLookupDisplayFields;
5766
5782
  return this.calculationDefinitionService
5767
5783
  .list({ sort: sort, filterQuery: filterQuery, displayFields: displayFields })
@@ -5778,7 +5794,7 @@
5778
5794
  var page = first / rows;
5779
5795
  var sort = multiSortMeta;
5780
5796
  var filterQuery = createSearchRequestFilter(filterData, this.getCalculationDefinitionSearchFields());
5781
- filterQuery = this.getFilters(filterQuery, filter);
5797
+ filterQuery = getFiltersForCustomDisplayFields(filterQuery, filter);
5782
5798
  var displayFields = this.calculationDefinitionLookupDisplayFields;
5783
5799
  return this.calculationDefinitionService
5784
5800
  .list({ page: page, sort: sort, filterQuery: filterQuery, displayFields: displayFields })
@@ -5801,25 +5817,6 @@
5801
5817
  var _this = this;
5802
5818
  return __assign(__assign({}, list), { contents: list.contents.map(function (item) { return (__assign(__assign({}, item), { label: _this.getLabelForMapping(item) })); }) });
5803
5819
  };
5804
- CalculationDefinitionLookupService.prototype.getFilters = function (filterData, filter) {
5805
- var filterQuery = '';
5806
- if (filterData) {
5807
- filterQuery += "(" + filterData + ") and ";
5808
- }
5809
- if (filter && filter.length > 0) {
5810
- filter.forEach(function (filter) {
5811
- if (filter.value.startsWith('in:')) {
5812
- var values = filter.value.substring(3).split(',');
5813
- var inCondition = values.map(function (v) { return filter.key + " eq '" + v + "'"; }).join(' or ');
5814
- filterQuery += "(" + inCondition + ") and ";
5815
- }
5816
- else {
5817
- filterQuery += filter.key + " eq '" + filter.value + "' and ";
5818
- }
5819
- });
5820
- }
5821
- return filterQuery ? filterQuery.slice(0, -5) : '';
5822
- };
5823
5820
  CalculationDefinitionLookupService.prototype.setDateForCalculationDefinition = function (date) {
5824
5821
  return moment$k(date).format('MM/YYYY');
5825
5822
  };
@@ -7362,224 +7359,2096 @@
7362
7359
  return FpasRegistrationLookupModule;
7363
7360
  }());
7364
7361
 
7365
- var EntityLookupModule = /** @class */ (function () {
7366
- function EntityLookupModule() {
7367
- }
7368
- EntityLookupModule_1 = EntityLookupModule;
7369
- EntityLookupModule.forRoot = function (config) {
7370
- return {
7371
- ngModule: EntityLookupModule_1,
7372
- providers: [
7373
- {
7374
- provide: ProjectConfigsInjectionToken,
7375
- useValue: config
7376
- }
7377
- ]
7378
- };
7379
- };
7380
- var EntityLookupModule_1;
7381
- EntityLookupModule = EntityLookupModule_1 = __decorate([
7382
- core.NgModule({
7383
- providers: []
7384
- })
7385
- ], EntityLookupModule);
7386
- return EntityLookupModule;
7387
- }());
7388
-
7389
- var fallback = {
7390
- "hcm_contract.employment_additional_info.e_001_pes_cod": "Código",
7391
- "hcm_contract.employment_additional_info.e_001_pes_nom": "Nome",
7392
- "hcm_contract.employment_additional_info.e_001_pes_dat": "Data de nascimento",
7393
- "hcm_contract.employment_additional_info.e_044_ccu_cod_ccu": "Código",
7394
- "hcm_contract.employment_additional_info.e_044_ccu_des_ccu": "Descrição",
7395
- "hcm_contract.employment_additional_info.e_070_fil_cod_fil": "Código",
7396
- "hcm_contract.employment_additional_info.e_070_fil_nom_fil": "Nome",
7397
- "hcm_contract.employment_additional_info.data_person_id_lookup_title": "Localizar a pessoa",
7398
- "hcm_contract.employment_additional_info.cost_center_history_cost_center_search_title": "Localizar o centro de custo",
7399
- "hcm_contract.employment_additional_info.employee_employer_cod_emp": "Código da empresa",
7400
- "hcm_contract.employment_additional_info.employee_employment_relationship_contract_type": "Tipo de contrato",
7401
- "hcm_contract.employment_additional_info.employee_person_nom_pes": "Nome do colaborador",
7402
- "hcm_contract.employment_additional_info.company_branch_history_company_branch_search_title": "Localizar a filial",
7403
- "hcm_contract.employment_additional_info.company_branch_history_employee_search_title": "Localizar o colaborador",
7404
- "hcm_contract.employment_additional_info.employee": "Empregado",
7405
- "hcm_contract.employment_additional_info.employee_code": "Código",
7406
- "hcm_contract.employment_additional_info.employer_name": "Nome da empresa",
7407
- "hcm_contract.employment_additional_info.position_acting_type_code": "Código",
7408
- "hcm_contract.employment_additional_info.position_acting_type_name": "Descrição",
7409
- "hcm_contract.employment_additional_info.position_history_position_code": "Código",
7410
- "hcm_contract.employment_additional_info.position_history_position_name": "Descrição",
7411
- "hcm_contract.employment_additional_info.location_code": "Código",
7412
- "hcm_contract.employment_additional_info.location_name": "Descrição",
7413
- "hcm_contract.employment_additional_info.filter": "Filtrar",
7414
- "hcm_contract.employment_additional_info.filters": "Filtros",
7415
- "hcm_contract.employment_additional_info.cancel": "Cancelar",
7416
- "hcm_contract.employment_additional_info.clear": "Limpar",
7417
- "hcm_contract.employment_additional_info.select": "Selecionar",
7418
- "hcm_contract.employment_additional_info.nothing_found": "Nenhum registro encontrado",
7419
- "hcm_contract.employment_additional_info.total_records": "{{value}} registro(s) encontrado(s)",
7420
- "hcm_contract.employment_additional_info.error_unauthorized_title": "Não autorizado.",
7421
- "hcm_contract.employment_additional_info.structure_empty_title": "Empresa sem estrutura de {{entity}}",
7422
- "hcm_contract.employment_additional_info.structure_empty_message": "Você precisa cadastrar uma estrutura de {{entity}} na empresa selecionada, posterior ou igual a data {{startDate}}",
7423
- "hcm_contract.employment_additional_info.employee_situation": "Situação",
7424
- "hcm_contract.employment_additional_info.resignation_situation_type_working": "Trabalhando",
7425
- "hcm_contract.employment_additional_info.resignation_situation_type_dismissed": "Desligado",
7426
- "hcm_contract.employment_additional_info.resignation_situation_type_all": "Todos"
7427
- };
7428
-
7429
- var E001PesModule = /** @class */ (function () {
7430
- function E001PesModule() {
7431
- }
7432
- E001PesModule = __decorate([
7433
- core.NgModule({
7434
- imports: [
7435
- platformComponents.PermissionsModule.forChild([
7436
- {
7437
- name: "e001pes",
7438
- actions: ["Visualizar", "Incluir", "Editar", "Excluir"],
7439
- uri: "res://senior.com.br/erpx_fnd/pessoa/entities/e001pes",
7440
- },
7441
- ]),
7442
- ],
7443
- providers: [
7444
- E001PesService,
7445
- ],
7446
- declarations: [],
7447
- exports: [],
7448
- })
7449
- ], E001PesModule);
7450
- return E001PesModule;
7451
- }());
7452
-
7453
- var projectInfo = {
7454
- app: "gestao-pessoas",
7455
- domain: "hcm_entity",
7456
- service: "lookups",
7457
- };
7458
- var environment = {
7459
- name: "@senior-gestao-pessoas/hcm-entity-lookups",
7460
- project: projectInfo,
7461
- production: false,
7462
- ignorePermissions: false,
7463
- };
7464
-
7465
- /*{CA:PACKAGE_IMPORTS:START}*/
7466
- /*{CA:PACKAGE_IMPORTS:END}*/
7467
- /*{CA:PROJECT_IMPORTS:START}*/
7468
- /*{CA:PROJECT_IMPORTS:END}*/
7469
- var E030AgeService = /** @class */ (function (_super) {
7470
- __extends(E030AgeService, _super);
7471
- /*{CA:CLASS_ATTRIBUTES:START}*/
7472
- /*{CA:CLASS_ATTRIBUTES:END}*/
7473
- function E030AgeService(http, messageService, translate, configService) {
7474
- var _this = _super.call(this, http, messageService, environment.project.domain + "/" + environment.project.service + "/entities/e030age", environment.project.domain + "/" + environment.project.service + "/actions", translate, configService) || this;
7362
+ var NaturePayrollRubricaService = /** @class */ (function (_super) {
7363
+ __extends(NaturePayrollRubricaService, _super);
7364
+ function NaturePayrollRubricaService(http, messageService, translate, configService) {
7365
+ var _this = _super.call(this, http, messageService, "tax_obligation/shared/entities/naturePayrollRubrica", "tax_obligation/shared/actions", translate, configService) || this;
7475
7366
  _this.http = http;
7476
7367
  _this.messageService = messageService;
7477
7368
  _this.translate = translate;
7478
7369
  _this.configService = configService;
7479
7370
  return _this;
7480
- /*{CA:CONSTRUCTOR_END:START}*/
7481
- /*{CA:CONSTRUCTOR_END:END}*/
7482
7371
  }
7483
- E030AgeService.prototype.listExternalE030Age = function (listParams) {
7484
- return this.http
7485
- .get("erpx_fnd/financeiro/entities/e030age", {
7486
- params: this.getListQueryParams(listParams),
7487
- })
7488
- .pipe(this.defaultCatch());
7489
- };
7490
- E030AgeService.ctorParameters = function () { return [
7372
+ NaturePayrollRubricaService.ctorParameters = function () { return [
7491
7373
  { type: http.HttpClient },
7492
7374
  { type: api.MessageService },
7493
7375
  { type: core$1.TranslateService },
7494
7376
  { type: EntityLookupConfigService }
7495
7377
  ]; };
7496
- E030AgeService = __decorate([
7378
+ NaturePayrollRubricaService = __decorate([
7497
7379
  core.Injectable()
7498
- ], E030AgeService);
7499
- return E030AgeService;
7380
+ ], NaturePayrollRubricaService);
7381
+ return NaturePayrollRubricaService;
7500
7382
  }(EntityService));
7501
- /*{CA:FILE_CONTENTS:START}*/
7502
- /*{CA:FILE_CONTENTS:END}*/
7503
-
7504
- /*{CA:PACKAGE_IMPORTS:START}*/
7505
- /*{CA:PACKAGE_IMPORTS:END}*/
7506
- /*{CA:PROJECT_IMPORTS:START}*/
7507
- /*{CA:PROJECT_IMPORTS:END}*/
7508
- var E030AgeModule = /** @class */ (function () {
7509
- function E030AgeModule() {
7510
- }
7511
- E030AgeModule = __decorate([
7512
- core.NgModule({
7513
- imports: [
7514
- platformComponents.PermissionsModule.forChild([
7515
- {
7516
- name: "e030age",
7517
- actions: ["Visualizar", "Incluir", "Editar", "Excluir"],
7518
- uri: "res://senior.com.br/erpx_fnd/financeiro/entities/e030age",
7519
- },
7520
- ]),
7521
- ],
7522
- providers: [
7523
- E030AgeService,
7524
- ],
7525
- declarations: [
7526
- /*{CA:MODULE_DECLARATIONS:START}*/
7527
- /*{CA:MODULE_DECLARATIONS:END}*/
7528
- ],
7529
- exports: [
7530
- /*{CA:MODULE_EXPORTS:START}*/
7531
- /*{CA:MODULE_EXPORTS:END}*/
7532
- ],
7533
- })
7534
- ], E030AgeModule);
7535
- return E030AgeModule;
7536
- }());
7537
- /*{CA:FILE_CONTENTS:START}*/
7538
- /*{CA:FILE_CONTENTS:END}*/
7539
7383
 
7540
- /*{CA:PACKAGE_IMPORTS:START}*/
7541
- /*{CA:PACKAGE_IMPORTS:END}*/
7542
- /*{CA:PROJECT_IMPORTS:START}*/
7543
- /*{CA:PROJECT_IMPORTS:END}*/
7544
- var E030BanService = /** @class */ (function (_super) {
7545
- __extends(E030BanService, _super);
7546
- /*{CA:CLASS_ATTRIBUTES:START}*/
7547
- /*{CA:CLASS_ATTRIBUTES:END}*/
7548
- function E030BanService(http, messageService, translate, configService) {
7549
- var _this = _super.call(this, http, messageService, environment.project.domain + "/" + environment.project.service + "/entities/e030ban", environment.project.domain + "/" + environment.project.service + "/actions", translate, configService) || this;
7550
- _this.http = http;
7551
- _this.messageService = messageService;
7552
- _this.translate = translate;
7553
- _this.configService = configService;
7554
- return _this;
7555
- /*{CA:CONSTRUCTOR_END:START}*/
7556
- /*{CA:CONSTRUCTOR_END:END}*/
7384
+ var NaturePayrollRubricaLookupService = /** @class */ (function () {
7385
+ function NaturePayrollRubricaLookupService(translate, configService, naturePayrollRubricaService) {
7386
+ this.translate = translate;
7387
+ this.configService = configService;
7388
+ this.naturePayrollRubricaService = naturePayrollRubricaService;
7389
+ this.lookupServiceConfig = {
7390
+ lookupDisplayFields: ["code", "name"],
7391
+ lookupSeparator: " - ",
7392
+ searchSubject: new rxjs.Subject(),
7393
+ lookupSubject: new rxjs.Subject(),
7394
+ entityName: "naturePayrollRubrica",
7395
+ dynamicFormOptions: {
7396
+ cancelLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".cancel"),
7397
+ clearLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".clear"),
7398
+ dataKey: "id",
7399
+ emptyFieldLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".list_grid_empty_field"),
7400
+ emptyMessage: this.translate.instant(this.configService.getTranslationPrefix() + ".empty_message_field"),
7401
+ filterLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".filter"),
7402
+ filterTitle: this.translate.instant(this.configService.getTranslationPrefix() + ".filters"),
7403
+ lookupDisplayField: "label",
7404
+ multiple: false,
7405
+ name: "naturePayrollRubrica",
7406
+ recordLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".records_found"),
7407
+ recordsLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".records_found"),
7408
+ required: true,
7409
+ searchEmptyTitle: this.translate.instant(this.configService.getTranslationPrefix() + ".nothing_found"),
7410
+ searchFields: this.getNaturePayrollRubricaSearchFields(),
7411
+ searchGridFields: this.getNaturePayrollRubricaSearchFields(),
7412
+ selectLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".select"),
7413
+ visible: true,
7414
+ isCollective: false,
7415
+ },
7416
+ filters: {
7417
+ additionalFilter: undefined,
7418
+ initialFilter: undefined,
7419
+ },
7420
+ };
7421
+ this.ngUnsubscribe = new rxjs.Subject();
7557
7422
  }
7558
- E030BanService.prototype.listExternalE030Ban = function (listParams) {
7559
- return this.http
7560
- .get("erpx_fnd/financeiro/entities/e030ban", {
7561
- params: this.getListQueryParams(listParams),
7562
- })
7563
- .pipe(this.defaultCatch());
7423
+ NaturePayrollRubricaLookupService.prototype.updateSuggestions = function (value) {
7424
+ if (value === null || value === void 0 ? void 0 : value[this.lookupServiceConfig.entityName]) {
7425
+ value[this.lookupServiceConfig.entityName].label = this.getSuggestionValue(this.lookupServiceConfig.lookupDisplayFields, this.lookupServiceConfig.entityName, value, this.lookupServiceConfig.lookupSeparator);
7426
+ if ((value === null || value === void 0 ? void 0 : value[this.lookupServiceConfig.entityName].label.trim()) === this.lookupServiceConfig.lookupSeparator.trim()) {
7427
+ delete value[this.lookupServiceConfig.entityName].label;
7428
+ }
7429
+ }
7564
7430
  };
7565
- E030BanService.ctorParameters = function () { return [
7566
- { type: http.HttpClient },
7567
- { type: api.MessageService },
7568
- { type: core$1.TranslateService },
7569
- { type: EntityLookupConfigService }
7570
- ]; };
7571
- E030BanService = __decorate([
7572
- core.Injectable()
7573
- ], E030BanService);
7574
- return E030BanService;
7575
- }(EntityService));
7576
- /*{CA:FILE_CONTENTS:START}*/
7577
- /*{CA:FILE_CONTENTS:END}*/
7578
-
7579
- /*{CA:PACKAGE_IMPORTS:START}*/
7580
- /*{CA:PACKAGE_IMPORTS:END}*/
7581
- /*{CA:PROJECT_IMPORTS:START}*/
7582
- /*{CA:PROJECT_IMPORTS:END}*/
7431
+ NaturePayrollRubricaLookupService.prototype.getSuggestionValue = function (displayFields, ownerEntity, value, separator) {
7432
+ return displayFields
7433
+ .map(function (field) { return getProp(value, ownerEntity + "." + field); })
7434
+ .reduce(function (acc, val) { return "" + acc + separator + val; });
7435
+ };
7436
+ NaturePayrollRubricaLookupService.prototype.getFormField = function () {
7437
+ var _this = this;
7438
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
7439
+ return new angularComponents.FormField({
7440
+ cancelLabel: (_a = this.lookupServiceConfig.dynamicFormOptions) === null || _a === void 0 ? void 0 : _a.cancelLabel,
7441
+ clearLabel: (_b = this.lookupServiceConfig.dynamicFormOptions) === null || _b === void 0 ? void 0 : _b.clearLabel,
7442
+ recordLabel: (_c = this.lookupServiceConfig.dynamicFormOptions) === null || _c === void 0 ? void 0 : _c.recordLabel,
7443
+ recordsLabel: (_d = this.lookupServiceConfig.dynamicFormOptions) === null || _d === void 0 ? void 0 : _d.recordsLabel,
7444
+ searchEmptyTitle: (_e = this.lookupServiceConfig.dynamicFormOptions) === null || _e === void 0 ? void 0 : _e.searchEmptyTitle,
7445
+ searchFields: (_f = this.lookupServiceConfig.dynamicFormOptions) === null || _f === void 0 ? void 0 : _f.searchFields,
7446
+ searchTitle: (_g = this.lookupServiceConfig.dynamicFormOptions) === null || _g === void 0 ? void 0 : _g.searchTitle,
7447
+ selectLabel: (_h = this.lookupServiceConfig.dynamicFormOptions) === null || _h === void 0 ? void 0 : _h.selectLabel,
7448
+ dataKey: (_j = this.lookupServiceConfig.dynamicFormOptions) === null || _j === void 0 ? void 0 : _j.dataKey,
7449
+ emptyFieldLabel: (_k = this.lookupServiceConfig.dynamicFormOptions) === null || _k === void 0 ? void 0 : _k.emptyFieldLabel,
7450
+ emptyMessage: (_l = this.lookupServiceConfig.dynamicFormOptions) === null || _l === void 0 ? void 0 : _l.emptyMessage,
7451
+ filterLabel: (_m = this.lookupServiceConfig.dynamicFormOptions) === null || _m === void 0 ? void 0 : _m.filterLabel,
7452
+ filterTitle: (_o = this.lookupServiceConfig.dynamicFormOptions) === null || _o === void 0 ? void 0 : _o.filterTitle,
7453
+ label: (_p = this.lookupServiceConfig.dynamicFormOptions) === null || _p === void 0 ? void 0 : _p.label,
7454
+ lookupDisplayField: (_q = this.lookupServiceConfig.dynamicFormOptions) === null || _q === void 0 ? void 0 : _q.lookupDisplayField,
7455
+ multiple: (_r = this.lookupServiceConfig.dynamicFormOptions) === null || _r === void 0 ? void 0 : _r.multiple,
7456
+ name: (_s = this.lookupServiceConfig.dynamicFormOptions) === null || _s === void 0 ? void 0 : _s.name,
7457
+ onLookupRequest: function (value) { return _this.onNaturePayrollRubricaLookupRequest(value); },
7458
+ onSearchRequest: function (event) { return _this.onNaturePayrollRubricaSearchRequest(event); },
7459
+ required: function () { var _a; return (_a = _this.lookupServiceConfig.dynamicFormOptions) === null || _a === void 0 ? void 0 : _a.required; },
7460
+ searchObservable: this.lookupServiceConfig.searchSubject,
7461
+ suggestionsObservable: this.lookupServiceConfig.lookupSubject,
7462
+ type: angularComponents.FieldType.Lookup,
7463
+ visible: function () { var _a; return !((_a = _this.lookupServiceConfig.dynamicFormOptions) === null || _a === void 0 ? void 0 : _a.isCollective); },
7464
+ });
7465
+ };
7466
+ NaturePayrollRubricaLookupService.prototype.onNaturePayrollRubricaSearchRequest = function (event) {
7467
+ var _this = this;
7468
+ var _a, _b;
7469
+ this.onNaturePayrollRubricaSearchRequestObservable(event, (_b = (_a = this.lookupServiceConfig) === null || _a === void 0 ? void 0 : _a.filters) === null || _b === void 0 ? void 0 : _b.additionalFilter, true).subscribe(function (data) { return _this.lookupServiceConfig.searchSubject.next(data); });
7470
+ };
7471
+ NaturePayrollRubricaLookupService.prototype.onNaturePayrollRubricaSearchRequestObservable = function (event, additionalFilter, isDynamicForm) {
7472
+ var _this = this;
7473
+ if (isDynamicForm === void 0) { isDynamicForm = false; }
7474
+ var first = event.first, rows = event.rows, multiSortMeta = event.multiSortMeta, filterData = event.filterData;
7475
+ var page = first / rows;
7476
+ var sort = multiSortMeta;
7477
+ var naturePayrollRubricaFilterQuery = createSearchRequestFilter(filterData, this.getNaturePayrollRubricaSearchFields());
7478
+ naturePayrollRubricaFilterQuery = this.getFiltersDefaultNaturePayrollRubrica(naturePayrollRubricaFilterQuery, additionalFilter);
7479
+ var displayFields = mergeUnique(this.lookupServiceConfig.lookupDisplayFields, __spread(this.lookupServiceConfig.lookupDisplayFields));
7480
+ return this.naturePayrollRubricaService
7481
+ .list({ page: page, sort: sort, filterQuery: naturePayrollRubricaFilterQuery, displayFields: displayFields })
7482
+ .pipe(operators.takeUntil(this.ngUnsubscribe))
7483
+ .pipe(operators.map(function (list) { return _this.mapToComponent(list, isDynamicForm); }));
7484
+ };
7485
+ NaturePayrollRubricaLookupService.prototype.getFiltersDefaultNaturePayrollRubrica = function (filterData, additionalFilter) {
7486
+ var filters = [];
7487
+ additionalFilter && filters.push("(" + additionalFilter + ")");
7488
+ filterData && filters.push("(" + filterData + ")");
7489
+ return filters.join(' and ');
7490
+ };
7491
+ NaturePayrollRubricaLookupService.prototype.mapToComponent = function (list, isDynamicForm) {
7492
+ var _this = this;
7493
+ if (isDynamicForm === void 0) { isDynamicForm = false; }
7494
+ if (isDynamicForm) {
7495
+ return ({
7496
+ gridData: list.contents
7497
+ .map(function (item) { return (__assign(__assign({}, item), { label: _this.getLabelForMaping(item) })); }),
7498
+ totalRecords: list === null || list === void 0 ? void 0 : list.totalElements,
7499
+ });
7500
+ }
7501
+ else {
7502
+ return (__assign(__assign({}, list), { contents: list.contents.map(function (item) { return (__assign(__assign({}, item), { label: _this.getLabelForMaping(item) })); }) }));
7503
+ }
7504
+ };
7505
+ NaturePayrollRubricaLookupService.prototype.getLabelForMaping = function (item) {
7506
+ var _this = this;
7507
+ return this.lookupServiceConfig.lookupDisplayFields
7508
+ .map(function (field) {
7509
+ if (field === "name" && !(item === null || item === void 0 ? void 0 : item.name)) {
7510
+ item.name = _this.translate
7511
+ .instant(_this.configService.getTranslationPrefix() + ".list_grid_empty_field");
7512
+ }
7513
+ if (field.indexOf(".") > 0) {
7514
+ return getProp(item, field);
7515
+ }
7516
+ return item[field];
7517
+ })
7518
+ .join(this.lookupServiceConfig.lookupSeparator);
7519
+ };
7520
+ NaturePayrollRubricaLookupService.prototype.onNaturePayrollRubricaLookupRequest = function (value) {
7521
+ var _this = this;
7522
+ var _a, _b;
7523
+ this.onNaturePayrollRubricaLookupRequestObservable(value, (_b = (_a = this.lookupServiceConfig) === null || _a === void 0 ? void 0 : _a.filters) === null || _b === void 0 ? void 0 : _b.additionalFilter).subscribe(function (data) { return _this.lookupServiceConfig.lookupSubject.next(data.contents); });
7524
+ };
7525
+ NaturePayrollRubricaLookupService.prototype.onNaturePayrollRubricaLookupRequestObservable = function (value, additionalFilter) {
7526
+ var _this = this;
7527
+ var sort = this.lookupServiceConfig.lookupDisplayFields
7528
+ .map(function (field) { return ({ field: field, order: 1 }); });
7529
+ var naturePayrollRubricaFilterQuery = createLookupRequestFilter(value, this.getNaturePayrollRubricaSearchFields());
7530
+ naturePayrollRubricaFilterQuery = this.getFiltersDefaultNaturePayrollRubrica(naturePayrollRubricaFilterQuery, additionalFilter);
7531
+ var displayFields = mergeUnique(this.lookupServiceConfig.lookupDisplayFields, __spread(this.lookupServiceConfig.lookupDisplayFields));
7532
+ return this.naturePayrollRubricaService
7533
+ .list({ sort: sort, filterQuery: naturePayrollRubricaFilterQuery, displayFields: displayFields })
7534
+ .pipe(operators.takeUntil(this.ngUnsubscribe))
7535
+ .pipe(operators.map(function (list) { return (__assign(__assign({}, list), { contents: list.contents.map(function (item) { return (__assign(__assign({}, item), { label: _this.lookupServiceConfig.lookupDisplayFields
7536
+ .map(function (field) {
7537
+ if (field === "name" && !item.name) {
7538
+ item.name = _this.translate
7539
+ .instant(_this.configService.getTranslationPrefix() + ".list_grid_empty_field");
7540
+ }
7541
+ if (field.indexOf(".") > 0) {
7542
+ return getProp(item, field);
7543
+ }
7544
+ return item[field];
7545
+ }).join(_this.lookupServiceConfig.lookupSeparator) })); }) })); }));
7546
+ };
7547
+ NaturePayrollRubricaLookupService.prototype.getNaturePayrollRubricaSearchFields = function () {
7548
+ return [
7549
+ new angularComponents.FormField({
7550
+ name: "code",
7551
+ label: this.translate.instant(this.configService.getTranslationPrefix() + ".nature_payroll_rubrica_code"),
7552
+ type: angularComponents.FieldType.Integer,
7553
+ }),
7554
+ new angularComponents.FormField({
7555
+ name: "name",
7556
+ label: this.translate.instant(this.configService.getTranslationPrefix() + ".nature_payroll_rubrica_name"),
7557
+ type: angularComponents.FieldType.String,
7558
+ })
7559
+ ];
7560
+ };
7561
+ NaturePayrollRubricaLookupService.ctorParameters = function () { return [
7562
+ { type: core$1.TranslateService },
7563
+ { type: EntityLookupConfigService },
7564
+ { type: NaturePayrollRubricaService }
7565
+ ]; };
7566
+ NaturePayrollRubricaLookupService = __decorate([
7567
+ core.Injectable()
7568
+ ], NaturePayrollRubricaLookupService);
7569
+ return NaturePayrollRubricaLookupService;
7570
+ }());
7571
+
7572
+ var NaturePayrollRubricaLookupComponent = /** @class */ (function (_super) {
7573
+ __extends(NaturePayrollRubricaLookupComponent, _super);
7574
+ function NaturePayrollRubricaLookupComponent(translate, cdRef, configService, structerService, naturePayrollRubricaLookupService) {
7575
+ var _this = _super.call(this, translate, cdRef, configService, structerService) || this;
7576
+ _this.translate = translate;
7577
+ _this.cdRef = cdRef;
7578
+ _this.configService = configService;
7579
+ _this.structerService = structerService;
7580
+ _this.naturePayrollRubricaLookupService = naturePayrollRubricaLookupService;
7581
+ _this.controlName = "naturePayrollRubrica";
7582
+ _this.entity = "naturePayrollRubrica";
7583
+ _this.domain = "tax_obligation";
7584
+ _this.service = "shared";
7585
+ _this.useDateValidation = false;
7586
+ return _this;
7587
+ }
7588
+ NaturePayrollRubricaLookupComponent.prototype.ngOnInit = function () {
7589
+ this.naturePayrollRubricaSearchFields = this.naturePayrollRubricaLookupService.getNaturePayrollRubricaSearchFields();
7590
+ this.naturePayrollRubricaSearchGridFields = this.naturePayrollRubricaLookupService.getNaturePayrollRubricaSearchFields();
7591
+ };
7592
+ NaturePayrollRubricaLookupComponent.prototype.onNaturePayrollRubricaLookupRequest = function (value) {
7593
+ var _this = this;
7594
+ this.naturePayrollRubricaLookupService
7595
+ .onNaturePayrollRubricaLookupRequestObservable(value, this.naturePayrollRubricaLookupService.lookupServiceConfig.filters.additionalFilter)
7596
+ .subscribe(function (list) {
7597
+ _this.naturePayrollRubricaSuggestions = list === null || list === void 0 ? void 0 : list.contents;
7598
+ });
7599
+ };
7600
+ NaturePayrollRubricaLookupComponent.prototype.onNaturePayrollRubricaSearchRequest = function (event) {
7601
+ var _this = this;
7602
+ this.naturePayrollRubricaLookupService
7603
+ .onNaturePayrollRubricaSearchRequestObservable(event, this.naturePayrollRubricaLookupService.lookupServiceConfig.filters.additionalFilter)
7604
+ .subscribe(function (list) {
7605
+ _this.naturePayrollRubricaSearchGridData = list === null || list === void 0 ? void 0 : list.contents;
7606
+ _this.naturePayrollRubricaSearchTotalRecords = list === null || list === void 0 ? void 0 : list.totalElements;
7607
+ });
7608
+ };
7609
+ NaturePayrollRubricaLookupComponent.ctorParameters = function () { return [
7610
+ { type: core$1.TranslateService },
7611
+ { type: core.ChangeDetectorRef },
7612
+ { type: EntityLookupConfigService },
7613
+ { type: StructureFilterService },
7614
+ { type: NaturePayrollRubricaLookupService }
7615
+ ]; };
7616
+ NaturePayrollRubricaLookupComponent = __decorate([
7617
+ core.Component({
7618
+ selector: "flx-nature-payroll-rubrica-lookup",
7619
+ template: "<s-loading-state [loading]=\"loading\" [blockWindow]=\"true\"></s-loading-state>\n<form [formGroup]=\"formGroup\">\n <s-lookup dataKey=\"id\" id=\"naturePayrollRubrica\" name=\"naturePayrollRubrica\" [formControlName]=\"controlName\"\n [searchFields]=\"naturePayrollRubricaSearchFields\"\n [searchGridFields]=\"naturePayrollRubricaSearchGridFields\"\n [searchGridData]=\"naturePayrollRubricaSearchGridData\"\n (onSelect)=\"selectOption($event)\"\n (onClear)=\"onClearItem($event)\"\n [multiple]=\"multiple\"\n [disabled]=\"isDisabled\"\n [lookupSuggestions]=\"naturePayrollRubricaSuggestions\"\n (onLookupRequest)=\"onNaturePayrollRubricaLookupRequest($event)\"\n (onSearchRequest)=\"onNaturePayrollRubricaSearchRequest($event)\"\n lookupDisplayField=\"label\"\n [searchTotalRecords]=\"naturePayrollRubricaSearchTotalRecords\"\n [searchTitle]=\"configService.getTranslationPrefix() \n + '.nature_payroll_rubrica_search_title' | translate\"\n [searchEmptyTitle]=\"configService.getTranslationPrefix()\n + '.nothing_found' | translate\" [filterLabel]=\"configService.getTranslationPrefix()\n + '.filter' | translate\" [filterTitle]=\"configService.getTranslationPrefix()\n + '.filters' | translate\" [clearLabel]=\"configService.getTranslationPrefix()\n + '.clear' | translate\" [cancelLabel]=\"configService.getTranslationPrefix()\n + '.cancel' | translate\" [selectLabel]=\"configService.getTranslationPrefix()\n + '.select' | translate\" [searchTotalRecordsLabel]=\"configService.getTranslationPrefix()\n + '.total_records' | translate: {value: naturePayrollRubricaSearchTotalRecords}\"></s-lookup>\n</form>\n"
7620
+ })
7621
+ ], NaturePayrollRubricaLookupComponent);
7622
+ return NaturePayrollRubricaLookupComponent;
7623
+ }(BaseLookupComponent));
7624
+
7625
+ var NaturePayrollRubricaLookupModule = /** @class */ (function () {
7626
+ function NaturePayrollRubricaLookupModule() {
7627
+ }
7628
+ NaturePayrollRubricaLookupModule = __decorate([
7629
+ core.NgModule({
7630
+ declarations: [
7631
+ NaturePayrollRubricaLookupComponent,
7632
+ ],
7633
+ exports: [
7634
+ NaturePayrollRubricaLookupComponent,
7635
+ ],
7636
+ imports: [
7637
+ SharedModule,
7638
+ angularComponents.LoadingStateModule,
7639
+ ],
7640
+ providers: [
7641
+ NaturePayrollRubricaLookupService,
7642
+ NaturePayrollRubricaService
7643
+ ],
7644
+ })
7645
+ ], NaturePayrollRubricaLookupModule);
7646
+ return NaturePayrollRubricaLookupModule;
7647
+ }());
7648
+
7649
+ var CharacteristicsService = /** @class */ (function (_super) {
7650
+ __extends(CharacteristicsService, _super);
7651
+ function CharacteristicsService(http, messageService, translate, configService) {
7652
+ var _this = _super.call(this, http, messageService, "hcm_payroll/shared/entities/characteristics", "hcm_payroll/shared/actions", translate, configService) || this;
7653
+ _this.http = http;
7654
+ _this.messageService = messageService;
7655
+ _this.translate = translate;
7656
+ _this.configService = configService;
7657
+ return _this;
7658
+ }
7659
+ CharacteristicsService.ctorParameters = function () { return [
7660
+ { type: http.HttpClient },
7661
+ { type: api.MessageService },
7662
+ { type: core$1.TranslateService },
7663
+ { type: EntityLookupConfigService }
7664
+ ]; };
7665
+ CharacteristicsService = __decorate([
7666
+ core.Injectable()
7667
+ ], CharacteristicsService);
7668
+ return CharacteristicsService;
7669
+ }(EntityService));
7670
+
7671
+ var CharacteristicsLookupService = /** @class */ (function () {
7672
+ function CharacteristicsLookupService(translate, configService, characteristicsService) {
7673
+ this.translate = translate;
7674
+ this.configService = configService;
7675
+ this.characteristicsService = characteristicsService;
7676
+ this.characteristicsLookupDisplayFields = ["characteristicType", "description", "XTCharacteristicCode"];
7677
+ this.lookupServiceConfig = {
7678
+ lookupDisplayFields: this.characteristicsLookupDisplayFields,
7679
+ lookupSeparator: " - ",
7680
+ searchSubject: new rxjs.Subject(),
7681
+ lookupSubject: new rxjs.Subject(),
7682
+ entityName: "characteristics",
7683
+ dynamicFormOptions: {
7684
+ cancelLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".cancel"),
7685
+ clearLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".clear"),
7686
+ dataKey: "id",
7687
+ emptyFieldLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".list_grid_empty_field"),
7688
+ emptyMessage: this.translate.instant(this.configService.getTranslationPrefix() + ".empty_message_field"),
7689
+ filterLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".filter"),
7690
+ filterTitle: this.translate.instant(this.configService.getTranslationPrefix() + ".filters"),
7691
+ lookupDisplayField: "label",
7692
+ multiple: false,
7693
+ name: "characteristics",
7694
+ recordLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".records_found"),
7695
+ recordsLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".records_found"),
7696
+ required: true,
7697
+ searchEmptyTitle: this.translate.instant(this.configService.getTranslationPrefix() + ".nothing_found"),
7698
+ searchFields: this.getCharacteristicsSearchFields(),
7699
+ searchGridFields: this.getCharacteristicsSearchFields(),
7700
+ selectLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".select"),
7701
+ visible: true,
7702
+ isCollective: false,
7703
+ },
7704
+ filters: {
7705
+ additionalFilter: undefined,
7706
+ initialFilter: undefined,
7707
+ },
7708
+ };
7709
+ this.ngUnsubscribe = new rxjs.Subject();
7710
+ }
7711
+ CharacteristicsLookupService.prototype.setDisplayFields = function (fields) {
7712
+ this.characteristicsLookupDisplayFields = fields;
7713
+ };
7714
+ CharacteristicsLookupService.prototype.updateSuggestions = function (value) {
7715
+ if (value === null || value === void 0 ? void 0 : value[this.lookupServiceConfig.entityName]) {
7716
+ value[this.lookupServiceConfig.entityName].label = this.getSuggestionValue(this.lookupServiceConfig.lookupDisplayFields, this.lookupServiceConfig.entityName, value, this.lookupServiceConfig.lookupSeparator);
7717
+ if ((value === null || value === void 0 ? void 0 : value[this.lookupServiceConfig.entityName].label.trim()) === this.lookupServiceConfig.lookupSeparator.trim()) {
7718
+ delete value[this.lookupServiceConfig.entityName].label;
7719
+ }
7720
+ }
7721
+ };
7722
+ CharacteristicsLookupService.prototype.getSuggestionValue = function (displayFields, ownerEntity, value, separator) {
7723
+ return displayFields
7724
+ .map(function (field) { return getProp(value, ownerEntity + "." + field); })
7725
+ .reduce(function (acc, val) { return "" + acc + separator + val; });
7726
+ };
7727
+ CharacteristicsLookupService.prototype.getFormField = function () {
7728
+ var _this = this;
7729
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
7730
+ return new angularComponents.FormField({
7731
+ cancelLabel: (_a = this.lookupServiceConfig.dynamicFormOptions) === null || _a === void 0 ? void 0 : _a.cancelLabel,
7732
+ clearLabel: (_b = this.lookupServiceConfig.dynamicFormOptions) === null || _b === void 0 ? void 0 : _b.clearLabel,
7733
+ recordLabel: (_c = this.lookupServiceConfig.dynamicFormOptions) === null || _c === void 0 ? void 0 : _c.recordLabel,
7734
+ recordsLabel: (_d = this.lookupServiceConfig.dynamicFormOptions) === null || _d === void 0 ? void 0 : _d.recordsLabel,
7735
+ searchEmptyTitle: (_e = this.lookupServiceConfig.dynamicFormOptions) === null || _e === void 0 ? void 0 : _e.searchEmptyTitle,
7736
+ searchFields: (_f = this.lookupServiceConfig.dynamicFormOptions) === null || _f === void 0 ? void 0 : _f.searchFields,
7737
+ searchTitle: (_g = this.lookupServiceConfig.dynamicFormOptions) === null || _g === void 0 ? void 0 : _g.searchTitle,
7738
+ selectLabel: (_h = this.lookupServiceConfig.dynamicFormOptions) === null || _h === void 0 ? void 0 : _h.selectLabel,
7739
+ dataKey: (_j = this.lookupServiceConfig.dynamicFormOptions) === null || _j === void 0 ? void 0 : _j.dataKey,
7740
+ emptyFieldLabel: (_k = this.lookupServiceConfig.dynamicFormOptions) === null || _k === void 0 ? void 0 : _k.emptyFieldLabel,
7741
+ emptyMessage: (_l = this.lookupServiceConfig.dynamicFormOptions) === null || _l === void 0 ? void 0 : _l.emptyMessage,
7742
+ filterLabel: (_m = this.lookupServiceConfig.dynamicFormOptions) === null || _m === void 0 ? void 0 : _m.filterLabel,
7743
+ filterTitle: (_o = this.lookupServiceConfig.dynamicFormOptions) === null || _o === void 0 ? void 0 : _o.filterTitle,
7744
+ label: (_p = this.lookupServiceConfig.dynamicFormOptions) === null || _p === void 0 ? void 0 : _p.label,
7745
+ lookupDisplayField: (_q = this.lookupServiceConfig.dynamicFormOptions) === null || _q === void 0 ? void 0 : _q.lookupDisplayField,
7746
+ multiple: (_r = this.lookupServiceConfig.dynamicFormOptions) === null || _r === void 0 ? void 0 : _r.multiple,
7747
+ name: (_s = this.lookupServiceConfig.dynamicFormOptions) === null || _s === void 0 ? void 0 : _s.name,
7748
+ onLookupRequest: function (value) { return _this.onCharacteristicsLookupRequest(value); },
7749
+ onSearchRequest: function (event) { return _this.onCharacteristicsSearchRequest(event); },
7750
+ required: function () { var _a; return (_a = _this.lookupServiceConfig.dynamicFormOptions) === null || _a === void 0 ? void 0 : _a.required; },
7751
+ searchObservable: this.lookupServiceConfig.searchSubject,
7752
+ suggestionsObservable: this.lookupServiceConfig.lookupSubject,
7753
+ type: angularComponents.FieldType.Lookup,
7754
+ visible: function () { var _a; return !((_a = _this.lookupServiceConfig.dynamicFormOptions) === null || _a === void 0 ? void 0 : _a.isCollective); },
7755
+ });
7756
+ };
7757
+ CharacteristicsLookupService.prototype.onCharacteristicsSearchRequest = function (event) {
7758
+ var _this = this;
7759
+ var _a, _b;
7760
+ this.onCharacteristicsRequestObservable(event, (_b = (_a = this.lookupServiceConfig) === null || _a === void 0 ? void 0 : _a.filters) === null || _b === void 0 ? void 0 : _b.additionalFilter, true).subscribe(function (data) { return _this.lookupServiceConfig.searchSubject.next(data); });
7761
+ };
7762
+ CharacteristicsLookupService.prototype.onCharacteristicsRequestObservable = function (event, additionalFilter, isDynamicForm) {
7763
+ var _this = this;
7764
+ if (isDynamicForm === void 0) { isDynamicForm = false; }
7765
+ var first = event.first, rows = event.rows, multiSortMeta = event.multiSortMeta, filterData = event.filterData;
7766
+ var page = first / rows;
7767
+ var sort = multiSortMeta;
7768
+ var characteristicsFilterQuery = createSearchRequestFilter(filterData, this.getCharacteristicsFields());
7769
+ characteristicsFilterQuery = this.getFiltersDefaultRules(characteristicsFilterQuery, additionalFilter);
7770
+ var displayFields = mergeUnique(this.lookupServiceConfig.lookupDisplayFields, __spread(this.lookupServiceConfig.lookupDisplayFields));
7771
+ return this.characteristicsService
7772
+ .list({ page: page, sort: sort, filterQuery: characteristicsFilterQuery, displayFields: displayFields })
7773
+ .pipe(operators.takeUntil(this.ngUnsubscribe))
7774
+ .pipe(operators.map(function (list) { return _this.mapToComponent(list, isDynamicForm); }));
7775
+ };
7776
+ CharacteristicsLookupService.prototype.getFiltersDefaultRules = function (filterData, additionalFilter) {
7777
+ var filters = [];
7778
+ additionalFilter && filters.push("(" + additionalFilter + ")");
7779
+ filterData && filters.push("(" + filterData + ")");
7780
+ return filters.join(' and ');
7781
+ };
7782
+ CharacteristicsLookupService.prototype.mapToComponent = function (list, isDynamicForm) {
7783
+ var _this = this;
7784
+ if (isDynamicForm === void 0) { isDynamicForm = false; }
7785
+ if (isDynamicForm) {
7786
+ return ({
7787
+ gridData: list.contents
7788
+ .map(function (item) { return (__assign(__assign({}, item), { label: _this.getLabelForMaping(item) })); }),
7789
+ totalRecords: list === null || list === void 0 ? void 0 : list.totalElements,
7790
+ });
7791
+ }
7792
+ else {
7793
+ return (__assign(__assign({}, list), { contents: list.contents.map(function (item) { return (__assign(__assign({}, item), { label: _this.getLabelForMaping(item) })); }) }));
7794
+ }
7795
+ };
7796
+ CharacteristicsLookupService.prototype.getLabelForMaping = function (item) {
7797
+ var _this = this;
7798
+ return this.lookupServiceConfig.lookupDisplayFields
7799
+ .map(function (field) {
7800
+ if (field === "name" && !(item === null || item === void 0 ? void 0 : item.name)) {
7801
+ item.name = _this.translate
7802
+ .instant(_this.configService.getTranslationPrefix() + ".list_grid_empty_field");
7803
+ }
7804
+ if (field.indexOf(".") > 0) {
7805
+ return getProp(item, field);
7806
+ }
7807
+ return item[field];
7808
+ })
7809
+ .join(this.lookupServiceConfig.lookupSeparator);
7810
+ };
7811
+ CharacteristicsLookupService.prototype.onCharacteristicsLookupRequest = function (value) {
7812
+ var _this = this;
7813
+ var _a, _b;
7814
+ this.onCharacteristicsLookupRequestObservable(value, (_b = (_a = this.lookupServiceConfig) === null || _a === void 0 ? void 0 : _a.filters) === null || _b === void 0 ? void 0 : _b.additionalFilter).subscribe(function (data) { return _this.lookupServiceConfig.lookupSubject.next(data.contents); });
7815
+ };
7816
+ CharacteristicsLookupService.prototype.onCharacteristicsLookupRequestObservable = function (value, additionalFilter, filter) {
7817
+ var _this = this;
7818
+ var sort = this.characteristicsLookupDisplayFields.map(function (field) { return ({
7819
+ field: field,
7820
+ order: 1
7821
+ }); });
7822
+ var filterQuery = createLookupRequestFilter(value, this.getCharacteristicsFields());
7823
+ filterQuery = getFiltersForCustomDisplayFields(filterQuery, filter);
7824
+ var displayFields = this.characteristicsLookupDisplayFields;
7825
+ debugger;
7826
+ return this.characteristicsService
7827
+ .list({ sort: sort, filterQuery: filterQuery, displayFields: displayFields })
7828
+ .pipe(operators.takeUntil(this.ngUnsubscribe))
7829
+ .pipe(operators.map(function (list) { return _this.mapToComponent(list); }));
7830
+ };
7831
+ CharacteristicsLookupService.prototype.getCharacteristicsFields = function (displayFields) {
7832
+ var fields = [
7833
+ new angularComponents.FormField({
7834
+ name: "characteristicType",
7835
+ label: this.translate.instant(this.configService.getTranslationPrefix() + ".characteristic_type"),
7836
+ type: angularComponents.FieldType.String,
7837
+ }),
7838
+ new angularComponents.FormField({
7839
+ name: "description",
7840
+ label: this.translate.instant(this.configService.getTranslationPrefix() + ".description"),
7841
+ type: angularComponents.FieldType.String,
7842
+ }),
7843
+ new angularComponents.FormField({
7844
+ name: "XTCharacteristicCode",
7845
+ label: this.translate.instant(this.configService.getTranslationPrefix() + ".xt_characteristic_code"),
7846
+ type: angularComponents.FieldType.String,
7847
+ }),
7848
+ ];
7849
+ if (displayFields && displayFields.length > 0) {
7850
+ return displayFields
7851
+ .map(function (fieldName) { return fields.find(function (field) { return field.name === fieldName; }); })
7852
+ .filter(function (field) { return field !== undefined; });
7853
+ }
7854
+ return fields;
7855
+ };
7856
+ CharacteristicsLookupService.prototype.getCharacteristicsSearchFields = function (displayFields) {
7857
+ var fields = this.getCharacteristicsFields();
7858
+ if (displayFields && displayFields.length > 0) {
7859
+ return displayFields
7860
+ .map(function (fieldName) { return fields.find(function (field) { return field.name === fieldName; }); })
7861
+ .filter(function (field) { return field !== undefined; });
7862
+ }
7863
+ return fields;
7864
+ };
7865
+ CharacteristicsLookupService.ctorParameters = function () { return [
7866
+ { type: core$1.TranslateService },
7867
+ { type: EntityLookupConfigService },
7868
+ { type: CharacteristicsService }
7869
+ ]; };
7870
+ CharacteristicsLookupService = __decorate([
7871
+ core.Injectable()
7872
+ ], CharacteristicsLookupService);
7873
+ return CharacteristicsLookupService;
7874
+ }());
7875
+
7876
+ var CharacteristicsLookupComponent = /** @class */ (function (_super) {
7877
+ __extends(CharacteristicsLookupComponent, _super);
7878
+ function CharacteristicsLookupComponent(translate, cdRef, configService, structerService, characteristicsLookupService) {
7879
+ var _this = _super.call(this, translate, cdRef, configService, structerService) || this;
7880
+ _this.translate = translate;
7881
+ _this.cdRef = cdRef;
7882
+ _this.configService = configService;
7883
+ _this.structerService = structerService;
7884
+ _this.characteristicsLookupService = characteristicsLookupService;
7885
+ _this.displayFields = ['code', 'calculationType', 'competence', 'company.codEmp', 'company.nomEmp'];
7886
+ _this.controlName = "characteristics";
7887
+ _this.entity = "characteristics";
7888
+ _this.domain = "hcm_payroll";
7889
+ _this.service = "shared";
7890
+ _this.useDateValidation = false;
7891
+ return _this;
7892
+ }
7893
+ CharacteristicsLookupComponent.prototype.ngOnInit = function () {
7894
+ this.characteristicsLookupService.setDisplayFields(this.displayFields);
7895
+ this.characteristicsSearchFields = this.characteristicsLookupService.getCharacteristicsFields(this.displayFields);
7896
+ this.characteristicsSearchGridFields = this.characteristicsLookupService.getCharacteristicsFields(this.displayFields);
7897
+ };
7898
+ CharacteristicsLookupComponent.prototype.onCharacteristicsLookupRequest = function (value) {
7899
+ var _this = this;
7900
+ this.characteristicsLookupService
7901
+ .onCharacteristicsLookupRequestObservable(value, this.characteristicsLookupService.lookupServiceConfig.filters.additionalFilter)
7902
+ .subscribe(function (list) {
7903
+ _this.characteristicsSuggestions = list === null || list === void 0 ? void 0 : list.contents;
7904
+ });
7905
+ };
7906
+ CharacteristicsLookupComponent.prototype.onCharacteristicsSearchRequest = function (event) {
7907
+ var _this = this;
7908
+ this.characteristicsLookupService
7909
+ .onCharacteristicsRequestObservable(event, this.characteristicsLookupService.lookupServiceConfig.filters.additionalFilter)
7910
+ .subscribe(function (list) {
7911
+ _this.characteristicsSearchGridData = list === null || list === void 0 ? void 0 : list.contents;
7912
+ _this.characteristicsSearchTotalRecords = list === null || list === void 0 ? void 0 : list.totalElements;
7913
+ });
7914
+ };
7915
+ CharacteristicsLookupComponent.ctorParameters = function () { return [
7916
+ { type: core$1.TranslateService },
7917
+ { type: core.ChangeDetectorRef },
7918
+ { type: EntityLookupConfigService },
7919
+ { type: StructureFilterService },
7920
+ { type: CharacteristicsLookupService }
7921
+ ]; };
7922
+ __decorate([
7923
+ core.Input()
7924
+ ], CharacteristicsLookupComponent.prototype, "displayFields", void 0);
7925
+ CharacteristicsLookupComponent = __decorate([
7926
+ core.Component({
7927
+ selector: "flx-characteristics-lookup",
7928
+ template: "<s-loading-state [loading]=\"loading\" [blockWindow]=\"true\"></s-loading-state>\n<form [formGroup]=\"formGroup\">\n <s-lookup dataKey=\"id\" id=\"characteristics\" name=\"characteristics\" [formControlName]=\"controlName\"\n [searchFields]=\"characteristicsSearchFields\"\n [searchGridFields]=\"characteristicsSearchGridFields\"\n [searchGridData]=\"characteristicsSearchGridData\"\n (onSelect)=\"selectOption($event)\"\n (onClear)=\"onClearItem($event)\"\n [multiple]=\"multiple\"\n [disabled]=\"isDisabled\"\n [lookupSuggestions]=\"characteristicsSuggestions\"\n (onLookupRequest)=\"onCharacteristicsLookupRequest($event)\"\n (onSearchRequest)=\"onCharacteristicsSearchRequest($event)\"\n lookupDisplayField=\"label\"\n [searchTotalRecords]=\"characteristicsSearchTotalRecords\"\n [searchTitle]=\"configService.getTranslationPrefix() \n + '.characteristics_search_title' | translate\"\n [searchEmptyTitle]=\"configService.getTranslationPrefix()\n + '.nothing_found' | translate\" [filterLabel]=\"configService.getTranslationPrefix()\n + '.filter' | translate\" [filterTitle]=\"configService.getTranslationPrefix()\n + '.filters' | translate\" [clearLabel]=\"configService.getTranslationPrefix()\n + '.clear' | translate\" [cancelLabel]=\"configService.getTranslationPrefix()\n + '.cancel' | translate\" [selectLabel]=\"configService.getTranslationPrefix()\n + '.select' | translate\" [searchTotalRecordsLabel]=\"configService.getTranslationPrefix()\n + '.total_records' | translate: {value: characteristicsSearchTotalRecords}\"></s-lookup>\n</form>\n"
7929
+ })
7930
+ ], CharacteristicsLookupComponent);
7931
+ return CharacteristicsLookupComponent;
7932
+ }(BaseLookupComponent));
7933
+
7934
+ var CharacteristicsLookupModule = /** @class */ (function () {
7935
+ function CharacteristicsLookupModule() {
7936
+ }
7937
+ CharacteristicsLookupModule = __decorate([
7938
+ core.NgModule({
7939
+ declarations: [
7940
+ CharacteristicsLookupComponent,
7941
+ ],
7942
+ exports: [
7943
+ CharacteristicsLookupComponent,
7944
+ ],
7945
+ imports: [
7946
+ SharedModule,
7947
+ angularComponents.LoadingStateModule,
7948
+ ],
7949
+ providers: [
7950
+ CharacteristicsLookupService,
7951
+ CharacteristicsService
7952
+ ],
7953
+ })
7954
+ ], CharacteristicsLookupModule);
7955
+ return CharacteristicsLookupModule;
7956
+ }());
7957
+
7958
+ var RulesService = /** @class */ (function (_super) {
7959
+ __extends(RulesService, _super);
7960
+ function RulesService(http, messageService, translate, configService) {
7961
+ var _this = _super.call(this, http, messageService, "hcm_payroll/shared/entities/rules", "hcm_payroll/shared/actions", translate, configService) || this;
7962
+ _this.http = http;
7963
+ _this.messageService = messageService;
7964
+ _this.translate = translate;
7965
+ _this.configService = configService;
7966
+ return _this;
7967
+ }
7968
+ RulesService.ctorParameters = function () { return [
7969
+ { type: http.HttpClient },
7970
+ { type: api.MessageService },
7971
+ { type: core$1.TranslateService },
7972
+ { type: EntityLookupConfigService }
7973
+ ]; };
7974
+ RulesService = __decorate([
7975
+ core.Injectable()
7976
+ ], RulesService);
7977
+ return RulesService;
7978
+ }(EntityService));
7979
+
7980
+ var RulesLookupService = /** @class */ (function () {
7981
+ function RulesLookupService(translate, configService, rulesService) {
7982
+ this.translate = translate;
7983
+ this.configService = configService;
7984
+ this.rulesService = rulesService;
7985
+ this.lookupServiceConfig = {
7986
+ lookupDisplayFields: ["description"],
7987
+ lookupSeparator: " - ",
7988
+ searchSubject: new rxjs.Subject(),
7989
+ lookupSubject: new rxjs.Subject(),
7990
+ entityName: "rules",
7991
+ dynamicFormOptions: {
7992
+ cancelLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".cancel"),
7993
+ clearLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".clear"),
7994
+ dataKey: "id",
7995
+ emptyFieldLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".list_grid_empty_field"),
7996
+ emptyMessage: this.translate.instant(this.configService.getTranslationPrefix() + ".empty_message_field"),
7997
+ filterLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".filter"),
7998
+ filterTitle: this.translate.instant(this.configService.getTranslationPrefix() + ".filters"),
7999
+ lookupDisplayField: "label",
8000
+ multiple: false,
8001
+ name: "rules",
8002
+ recordLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".records_found"),
8003
+ recordsLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".records_found"),
8004
+ required: true,
8005
+ searchEmptyTitle: this.translate.instant(this.configService.getTranslationPrefix() + ".nothing_found"),
8006
+ searchFields: this.getRulesFields(),
8007
+ searchGridFields: this.getRulesFields(),
8008
+ selectLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".select"),
8009
+ visible: true,
8010
+ isCollective: false,
8011
+ },
8012
+ filters: {
8013
+ additionalFilter: undefined,
8014
+ initialFilter: undefined,
8015
+ },
8016
+ };
8017
+ this.ngUnsubscribe = new rxjs.Subject();
8018
+ }
8019
+ RulesLookupService.prototype.updateSuggestions = function (value) {
8020
+ if (value === null || value === void 0 ? void 0 : value[this.lookupServiceConfig.entityName]) {
8021
+ value[this.lookupServiceConfig.entityName].label = this.getSuggestionValue(this.lookupServiceConfig.lookupDisplayFields, this.lookupServiceConfig.entityName, value, this.lookupServiceConfig.lookupSeparator);
8022
+ if ((value === null || value === void 0 ? void 0 : value[this.lookupServiceConfig.entityName].label.trim()) === this.lookupServiceConfig.lookupSeparator.trim()) {
8023
+ delete value[this.lookupServiceConfig.entityName].label;
8024
+ }
8025
+ }
8026
+ };
8027
+ RulesLookupService.prototype.getSuggestionValue = function (displayFields, ownerEntity, value, separator) {
8028
+ return displayFields
8029
+ .map(function (field) { return getProp(value, ownerEntity + "." + field); })
8030
+ .reduce(function (acc, val) { return "" + acc + separator + val; });
8031
+ };
8032
+ RulesLookupService.prototype.getFormField = function () {
8033
+ var _this = this;
8034
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
8035
+ return new angularComponents.FormField({
8036
+ cancelLabel: (_a = this.lookupServiceConfig.dynamicFormOptions) === null || _a === void 0 ? void 0 : _a.cancelLabel,
8037
+ clearLabel: (_b = this.lookupServiceConfig.dynamicFormOptions) === null || _b === void 0 ? void 0 : _b.clearLabel,
8038
+ recordLabel: (_c = this.lookupServiceConfig.dynamicFormOptions) === null || _c === void 0 ? void 0 : _c.recordLabel,
8039
+ recordsLabel: (_d = this.lookupServiceConfig.dynamicFormOptions) === null || _d === void 0 ? void 0 : _d.recordsLabel,
8040
+ searchEmptyTitle: (_e = this.lookupServiceConfig.dynamicFormOptions) === null || _e === void 0 ? void 0 : _e.searchEmptyTitle,
8041
+ searchFields: (_f = this.lookupServiceConfig.dynamicFormOptions) === null || _f === void 0 ? void 0 : _f.searchFields,
8042
+ searchTitle: (_g = this.lookupServiceConfig.dynamicFormOptions) === null || _g === void 0 ? void 0 : _g.searchTitle,
8043
+ selectLabel: (_h = this.lookupServiceConfig.dynamicFormOptions) === null || _h === void 0 ? void 0 : _h.selectLabel,
8044
+ dataKey: (_j = this.lookupServiceConfig.dynamicFormOptions) === null || _j === void 0 ? void 0 : _j.dataKey,
8045
+ emptyFieldLabel: (_k = this.lookupServiceConfig.dynamicFormOptions) === null || _k === void 0 ? void 0 : _k.emptyFieldLabel,
8046
+ emptyMessage: (_l = this.lookupServiceConfig.dynamicFormOptions) === null || _l === void 0 ? void 0 : _l.emptyMessage,
8047
+ filterLabel: (_m = this.lookupServiceConfig.dynamicFormOptions) === null || _m === void 0 ? void 0 : _m.filterLabel,
8048
+ filterTitle: (_o = this.lookupServiceConfig.dynamicFormOptions) === null || _o === void 0 ? void 0 : _o.filterTitle,
8049
+ label: (_p = this.lookupServiceConfig.dynamicFormOptions) === null || _p === void 0 ? void 0 : _p.label,
8050
+ lookupDisplayField: (_q = this.lookupServiceConfig.dynamicFormOptions) === null || _q === void 0 ? void 0 : _q.lookupDisplayField,
8051
+ multiple: (_r = this.lookupServiceConfig.dynamicFormOptions) === null || _r === void 0 ? void 0 : _r.multiple,
8052
+ name: (_s = this.lookupServiceConfig.dynamicFormOptions) === null || _s === void 0 ? void 0 : _s.name,
8053
+ onLookupRequest: function (value) { return _this.onRulesLookupRequest(value); },
8054
+ onSearchRequest: function (event) { return _this.onRulesSearchRequest(event); },
8055
+ required: function () { var _a; return (_a = _this.lookupServiceConfig.dynamicFormOptions) === null || _a === void 0 ? void 0 : _a.required; },
8056
+ searchObservable: this.lookupServiceConfig.searchSubject,
8057
+ suggestionsObservable: this.lookupServiceConfig.lookupSubject,
8058
+ type: angularComponents.FieldType.Lookup,
8059
+ visible: function () { var _a; return !((_a = _this.lookupServiceConfig.dynamicFormOptions) === null || _a === void 0 ? void 0 : _a.isCollective); },
8060
+ });
8061
+ };
8062
+ RulesLookupService.prototype.onRulesSearchRequest = function (event) {
8063
+ var _this = this;
8064
+ var _a, _b;
8065
+ this.onRulesRequestObservable(event, (_b = (_a = this.lookupServiceConfig) === null || _a === void 0 ? void 0 : _a.filters) === null || _b === void 0 ? void 0 : _b.additionalFilter, true).subscribe(function (data) { return _this.lookupServiceConfig.searchSubject.next(data); });
8066
+ };
8067
+ RulesLookupService.prototype.onRulesRequestObservable = function (event, additionalFilter, isDynamicForm) {
8068
+ var _this = this;
8069
+ if (isDynamicForm === void 0) { isDynamicForm = false; }
8070
+ var first = event.first, rows = event.rows, multiSortMeta = event.multiSortMeta, filterData = event.filterData;
8071
+ var page = first / rows;
8072
+ var sort = multiSortMeta;
8073
+ var rulesFilterQuery = createSearchRequestFilter(filterData, this.getRulesFields());
8074
+ rulesFilterQuery = this.getFiltersDefaultRules(rulesFilterQuery, additionalFilter);
8075
+ var displayFields = mergeUnique(this.lookupServiceConfig.lookupDisplayFields, __spread(this.lookupServiceConfig.lookupDisplayFields));
8076
+ return this.rulesService
8077
+ .list({ page: page, sort: sort, filterQuery: rulesFilterQuery, displayFields: displayFields })
8078
+ .pipe(operators.takeUntil(this.ngUnsubscribe))
8079
+ .pipe(operators.map(function (list) { return _this.mapToComponent(list, isDynamicForm); }));
8080
+ };
8081
+ RulesLookupService.prototype.getFiltersDefaultRules = function (filterData, additionalFilter) {
8082
+ var filters = [];
8083
+ additionalFilter && filters.push("(" + additionalFilter + ")");
8084
+ filterData && filters.push("(" + filterData + ")");
8085
+ return filters.join(' and ');
8086
+ };
8087
+ RulesLookupService.prototype.mapToComponent = function (list, isDynamicForm) {
8088
+ var _this = this;
8089
+ if (isDynamicForm === void 0) { isDynamicForm = false; }
8090
+ if (isDynamicForm) {
8091
+ return ({
8092
+ gridData: list.contents
8093
+ .map(function (item) { return (__assign(__assign({}, item), { label: _this.getLabelForMaping(item) })); }),
8094
+ totalRecords: list === null || list === void 0 ? void 0 : list.totalElements,
8095
+ });
8096
+ }
8097
+ else {
8098
+ return (__assign(__assign({}, list), { contents: list.contents.map(function (item) { return (__assign(__assign({}, item), { label: _this.getLabelForMaping(item) })); }) }));
8099
+ }
8100
+ };
8101
+ RulesLookupService.prototype.getLabelForMaping = function (item) {
8102
+ var _this = this;
8103
+ return this.lookupServiceConfig.lookupDisplayFields
8104
+ .map(function (field) {
8105
+ if (field === "name" && !(item === null || item === void 0 ? void 0 : item.name)) {
8106
+ item.name = _this.translate
8107
+ .instant(_this.configService.getTranslationPrefix() + ".list_grid_empty_field");
8108
+ }
8109
+ if (field.indexOf(".") > 0) {
8110
+ return getProp(item, field);
8111
+ }
8112
+ return item[field];
8113
+ })
8114
+ .join(this.lookupServiceConfig.lookupSeparator);
8115
+ };
8116
+ RulesLookupService.prototype.onRulesLookupRequest = function (value) {
8117
+ var _this = this;
8118
+ var _a, _b;
8119
+ this.onRulesLookupRequestObservable(value, (_b = (_a = this.lookupServiceConfig) === null || _a === void 0 ? void 0 : _a.filters) === null || _b === void 0 ? void 0 : _b.additionalFilter).subscribe(function (data) { return _this.lookupServiceConfig.lookupSubject.next(data.contents); });
8120
+ };
8121
+ RulesLookupService.prototype.onRulesLookupRequestObservable = function (value, additionalFilter) {
8122
+ var _this = this;
8123
+ var sort = this.lookupServiceConfig.lookupDisplayFields
8124
+ .map(function (field) { return ({ field: field, order: 1 }); });
8125
+ var rulesFilterQuery = createLookupRequestFilter(value, this.getRulesFields());
8126
+ rulesFilterQuery = this.getFiltersDefaultRules(rulesFilterQuery, additionalFilter);
8127
+ var displayFields = mergeUnique(this.lookupServiceConfig.lookupDisplayFields, __spread(this.lookupServiceConfig.lookupDisplayFields));
8128
+ return this.rulesService
8129
+ .list({ sort: sort, filterQuery: rulesFilterQuery, displayFields: displayFields })
8130
+ .pipe(operators.takeUntil(this.ngUnsubscribe))
8131
+ .pipe(operators.map(function (list) { return (__assign(__assign({}, list), { contents: list.contents.map(function (item) { return (__assign(__assign({}, item), { label: _this.lookupServiceConfig.lookupDisplayFields
8132
+ .map(function (field) {
8133
+ if (field === "name" && !item.name) {
8134
+ item.name = _this.translate
8135
+ .instant(_this.configService.getTranslationPrefix() + ".list_grid_empty_field");
8136
+ }
8137
+ if (field.indexOf(".") > 0) {
8138
+ return getProp(item, field);
8139
+ }
8140
+ return item[field];
8141
+ }).join(_this.lookupServiceConfig.lookupSeparator) })); }) })); }));
8142
+ };
8143
+ RulesLookupService.prototype.getRulesFields = function () {
8144
+ return [
8145
+ new angularComponents.FormField({
8146
+ name: "description",
8147
+ label: this.translate.instant(this.configService.getTranslationPrefix() + ".rules_description"),
8148
+ type: angularComponents.FieldType.String,
8149
+ })
8150
+ ];
8151
+ };
8152
+ RulesLookupService.ctorParameters = function () { return [
8153
+ { type: core$1.TranslateService },
8154
+ { type: EntityLookupConfigService },
8155
+ { type: RulesService }
8156
+ ]; };
8157
+ RulesLookupService = __decorate([
8158
+ core.Injectable()
8159
+ ], RulesLookupService);
8160
+ return RulesLookupService;
8161
+ }());
8162
+
8163
+ var RulesLookupComponent = /** @class */ (function (_super) {
8164
+ __extends(RulesLookupComponent, _super);
8165
+ function RulesLookupComponent(translate, cdRef, configService, structerService, rulesLookupService) {
8166
+ var _this = _super.call(this, translate, cdRef, configService, structerService) || this;
8167
+ _this.translate = translate;
8168
+ _this.cdRef = cdRef;
8169
+ _this.configService = configService;
8170
+ _this.structerService = structerService;
8171
+ _this.rulesLookupService = rulesLookupService;
8172
+ _this.controlName = "rules";
8173
+ _this.entity = "rules";
8174
+ _this.domain = "tax_obligation";
8175
+ _this.service = "shared";
8176
+ _this.useDateValidation = false;
8177
+ return _this;
8178
+ }
8179
+ RulesLookupComponent.prototype.ngOnInit = function () {
8180
+ this.rulesSearchFields = this.rulesLookupService.getRulesFields();
8181
+ this.rulesSearchGridFields = this.rulesLookupService.getRulesFields();
8182
+ };
8183
+ RulesLookupComponent.prototype.onRulesLookupRequest = function (value) {
8184
+ var _this = this;
8185
+ this.rulesLookupService
8186
+ .onRulesLookupRequestObservable(value, this.rulesLookupService.lookupServiceConfig.filters.additionalFilter)
8187
+ .subscribe(function (list) {
8188
+ _this.rulesSuggestions = list === null || list === void 0 ? void 0 : list.contents;
8189
+ });
8190
+ };
8191
+ RulesLookupComponent.prototype.onRulesSearchRequest = function (event) {
8192
+ var _this = this;
8193
+ this.rulesLookupService
8194
+ .onRulesRequestObservable(event, this.rulesLookupService.lookupServiceConfig.filters.additionalFilter)
8195
+ .subscribe(function (list) {
8196
+ _this.rulesSearchGridData = list === null || list === void 0 ? void 0 : list.contents;
8197
+ _this.rulesSearchTotalRecords = list === null || list === void 0 ? void 0 : list.totalElements;
8198
+ });
8199
+ };
8200
+ RulesLookupComponent.ctorParameters = function () { return [
8201
+ { type: core$1.TranslateService },
8202
+ { type: core.ChangeDetectorRef },
8203
+ { type: EntityLookupConfigService },
8204
+ { type: StructureFilterService },
8205
+ { type: RulesLookupService }
8206
+ ]; };
8207
+ RulesLookupComponent = __decorate([
8208
+ core.Component({
8209
+ selector: "flx-rules-lookup",
8210
+ template: "<s-loading-state [loading]=\"loading\" [blockWindow]=\"true\"></s-loading-state>\n<form [formGroup]=\"formGroup\">\n <s-lookup dataKey=\"id\" id=\"rules\" name=\"rules\" [formControlName]=\"controlName\"\n [searchFields]=\"rulesSearchFields\"\n [searchGridFields]=\"rulesSearchGridFields\"\n [searchGridData]=\"rulesSearchGridData\"\n (onSelect)=\"selectOption($event)\"\n (onClear)=\"onClearItem($event)\"\n [multiple]=\"multiple\"\n [disabled]=\"isDisabled\"\n [lookupSuggestions]=\"rulesSuggestions\"\n (onLookupRequest)=\"onRulesLookupRequest($event)\"\n (onSearchRequest)=\"onRulesSearchRequest($event)\"\n lookupDisplayField=\"label\"\n [searchTotalRecords]=\"rulesSearchTotalRecords\"\n [searchTitle]=\"configService.getTranslationPrefix() \n + '.rules_search_title' | translate\"\n [searchEmptyTitle]=\"configService.getTranslationPrefix()\n + '.nothing_found' | translate\" [filterLabel]=\"configService.getTranslationPrefix()\n + '.filter' | translate\" [filterTitle]=\"configService.getTranslationPrefix()\n + '.filters' | translate\" [clearLabel]=\"configService.getTranslationPrefix()\n + '.clear' | translate\" [cancelLabel]=\"configService.getTranslationPrefix()\n + '.cancel' | translate\" [selectLabel]=\"configService.getTranslationPrefix()\n + '.select' | translate\" [searchTotalRecordsLabel]=\"configService.getTranslationPrefix()\n + '.total_records' | translate: {value: rulesSearchTotalRecords}\"></s-lookup>\n</form>\n"
8211
+ })
8212
+ ], RulesLookupComponent);
8213
+ return RulesLookupComponent;
8214
+ }(BaseLookupComponent));
8215
+
8216
+ var RulesLookupModule = /** @class */ (function () {
8217
+ function RulesLookupModule() {
8218
+ }
8219
+ RulesLookupModule = __decorate([
8220
+ core.NgModule({
8221
+ declarations: [
8222
+ RulesLookupComponent,
8223
+ ],
8224
+ exports: [
8225
+ RulesLookupComponent,
8226
+ ],
8227
+ imports: [
8228
+ SharedModule,
8229
+ angularComponents.LoadingStateModule,
8230
+ ],
8231
+ providers: [
8232
+ RulesLookupService,
8233
+ RulesService
8234
+ ],
8235
+ })
8236
+ ], RulesLookupModule);
8237
+ return RulesLookupModule;
8238
+ }());
8239
+
8240
+ var FgtsTaxationService = /** @class */ (function (_super) {
8241
+ __extends(FgtsTaxationService, _super);
8242
+ function FgtsTaxationService(http, messageService, translate, configService) {
8243
+ var _this = _super.call(this, http, messageService, "tax_obligation/shared/entities/fgtsTaxation", "tax_obligation/shared/actions", translate, configService) || this;
8244
+ _this.http = http;
8245
+ _this.messageService = messageService;
8246
+ _this.translate = translate;
8247
+ _this.configService = configService;
8248
+ return _this;
8249
+ }
8250
+ FgtsTaxationService.ctorParameters = function () { return [
8251
+ { type: http.HttpClient },
8252
+ { type: api.MessageService },
8253
+ { type: core$1.TranslateService },
8254
+ { type: EntityLookupConfigService }
8255
+ ]; };
8256
+ FgtsTaxationService = __decorate([
8257
+ core.Injectable()
8258
+ ], FgtsTaxationService);
8259
+ return FgtsTaxationService;
8260
+ }(EntityService));
8261
+
8262
+ var FgtsTaxationLookupService = /** @class */ (function () {
8263
+ function FgtsTaxationLookupService(translate, configService, fgtsTaxationService) {
8264
+ this.translate = translate;
8265
+ this.configService = configService;
8266
+ this.fgtsTaxationService = fgtsTaxationService;
8267
+ this.fgtsTaxationDisplayFields = ["fgtsTaxationGroup.code", "fgtsTaxationGroup.description", "code", "description"];
8268
+ this.lookupServiceConfig = {
8269
+ lookupDisplayFields: this.fgtsTaxationDisplayFields,
8270
+ lookupSeparator: " - ",
8271
+ searchSubject: new rxjs.Subject(),
8272
+ lookupSubject: new rxjs.Subject(),
8273
+ entityName: "fgtsTaxation",
8274
+ dynamicFormOptions: {
8275
+ cancelLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".cancel"),
8276
+ clearLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".clear"),
8277
+ dataKey: "id",
8278
+ emptyFieldLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".list_grid_empty_field"),
8279
+ emptyMessage: this.translate.instant(this.configService.getTranslationPrefix() + ".empty_message_field"),
8280
+ filterLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".filter"),
8281
+ filterTitle: this.translate.instant(this.configService.getTranslationPrefix() + ".filters"),
8282
+ label: this.translate.instant(this.configService.getTranslationPrefix() + ".company_linked_location"),
8283
+ lookupDisplayField: "label",
8284
+ name: "fgtsTaxation",
8285
+ recordLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".records_found"),
8286
+ recordsLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".records_found"),
8287
+ required: true,
8288
+ searchEmptyTitle: this.translate.instant(this.configService.getTranslationPrefix() + ".nothing_found"),
8289
+ searchFields: this.getFgtsTaxationSearchFields(),
8290
+ searchGridFields: this.getFgtsTaxationSearchFields(),
8291
+ searchTitle: this.translate.instant(this.configService.getTranslationPrefix() + ".company_linked_location_search_title"),
8292
+ selectLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".select"),
8293
+ visible: true,
8294
+ isCollective: false,
8295
+ },
8296
+ filters: {
8297
+ additionalFilter: undefined,
8298
+ initialFilter: undefined,
8299
+ companyIds: [],
8300
+ },
8301
+ };
8302
+ this.ngUnsubscribe = new rxjs.Subject();
8303
+ }
8304
+ FgtsTaxationLookupService.prototype.setDisplayFields = function (fields) {
8305
+ this.fgtsTaxationDisplayFields = fields;
8306
+ };
8307
+ FgtsTaxationLookupService.prototype.updateSuggestions = function (value) {
8308
+ if (value === null || value === void 0 ? void 0 : value[this.lookupServiceConfig.entityName]) {
8309
+ value[this.lookupServiceConfig.entityName].label = this.getSuggestionValue(this.lookupServiceConfig.lookupDisplayFields, this.lookupServiceConfig.entityName, value, this.lookupServiceConfig.lookupSeparator);
8310
+ if ((value === null || value === void 0 ? void 0 : value[this.lookupServiceConfig.entityName].label.trim()) === this.lookupServiceConfig.lookupSeparator.trim()) {
8311
+ delete value[this.lookupServiceConfig.entityName].label;
8312
+ }
8313
+ }
8314
+ };
8315
+ FgtsTaxationLookupService.prototype.getSuggestionValue = function (displayFields, ownerEntity, value, separator) {
8316
+ return displayFields
8317
+ .map(function (field) { return getProp(value, ownerEntity + "." + field); })
8318
+ .reduce(function (acc, val) { return "" + acc + separator + val; });
8319
+ };
8320
+ FgtsTaxationLookupService.prototype.getFormField = function () {
8321
+ var _this = this;
8322
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
8323
+ return new angularComponents.FormField({
8324
+ cancelLabel: (_a = this.lookupServiceConfig.dynamicFormOptions) === null || _a === void 0 ? void 0 : _a.cancelLabel,
8325
+ clearLabel: (_b = this.lookupServiceConfig.dynamicFormOptions) === null || _b === void 0 ? void 0 : _b.clearLabel,
8326
+ recordLabel: (_c = this.lookupServiceConfig.dynamicFormOptions) === null || _c === void 0 ? void 0 : _c.recordLabel,
8327
+ recordsLabel: (_d = this.lookupServiceConfig.dynamicFormOptions) === null || _d === void 0 ? void 0 : _d.recordsLabel,
8328
+ searchEmptyTitle: (_e = this.lookupServiceConfig.dynamicFormOptions) === null || _e === void 0 ? void 0 : _e.searchEmptyTitle,
8329
+ searchFields: (_f = this.lookupServiceConfig.dynamicFormOptions) === null || _f === void 0 ? void 0 : _f.searchFields,
8330
+ searchTitle: (_g = this.lookupServiceConfig.dynamicFormOptions) === null || _g === void 0 ? void 0 : _g.searchTitle,
8331
+ selectLabel: (_h = this.lookupServiceConfig.dynamicFormOptions) === null || _h === void 0 ? void 0 : _h.selectLabel,
8332
+ dataKey: (_j = this.lookupServiceConfig.dynamicFormOptions) === null || _j === void 0 ? void 0 : _j.dataKey,
8333
+ emptyFieldLabel: (_k = this.lookupServiceConfig.dynamicFormOptions) === null || _k === void 0 ? void 0 : _k.emptyFieldLabel,
8334
+ emptyMessage: (_l = this.lookupServiceConfig.dynamicFormOptions) === null || _l === void 0 ? void 0 : _l.emptyMessage,
8335
+ filterLabel: (_m = this.lookupServiceConfig.dynamicFormOptions) === null || _m === void 0 ? void 0 : _m.filterLabel,
8336
+ filterTitle: (_o = this.lookupServiceConfig.dynamicFormOptions) === null || _o === void 0 ? void 0 : _o.filterTitle,
8337
+ label: (_p = this.lookupServiceConfig.dynamicFormOptions) === null || _p === void 0 ? void 0 : _p.label,
8338
+ lookupDisplayField: (_q = this.lookupServiceConfig.dynamicFormOptions) === null || _q === void 0 ? void 0 : _q.lookupDisplayField,
8339
+ name: (_r = this.lookupServiceConfig.dynamicFormOptions) === null || _r === void 0 ? void 0 : _r.name,
8340
+ onLookupRequest: function (value) { return _this.onFgtsTaxationLookupRequest(value); },
8341
+ onSearchRequest: function (event) { return _this.onFgtsTaxationSearchRequest(event); },
8342
+ required: function () { var _a; return (_a = _this.lookupServiceConfig.dynamicFormOptions) === null || _a === void 0 ? void 0 : _a.required; },
8343
+ searchObservable: this.lookupServiceConfig.searchSubject,
8344
+ suggestionsObservable: this.lookupServiceConfig.lookupSubject,
8345
+ type: angularComponents.FieldType.Lookup,
8346
+ visible: function () { var _a; return !((_a = _this.lookupServiceConfig.dynamicFormOptions) === null || _a === void 0 ? void 0 : _a.isCollective); },
8347
+ });
8348
+ };
8349
+ FgtsTaxationLookupService.prototype.onFgtsTaxationSearchRequest = function (event) {
8350
+ var _this = this;
8351
+ var _a, _b, _c, _d;
8352
+ this.onFgtsTaxationSearchRequestObservable(event, (_b = (_a = this.lookupServiceConfig) === null || _a === void 0 ? void 0 : _a.filters) === null || _b === void 0 ? void 0 : _b.additionalFilter, (_d = (_c = this.lookupServiceConfig) === null || _c === void 0 ? void 0 : _c.filters) === null || _d === void 0 ? void 0 : _d.companyIds, true).subscribe(function (data) { return _this.lookupServiceConfig.searchSubject.next(data); });
8353
+ };
8354
+ FgtsTaxationLookupService.prototype.onFgtsTaxationSearchRequestObservable = function (event, additionalFilter, companyIds, isDynamicForm) {
8355
+ var _this = this;
8356
+ if (isDynamicForm === void 0) { isDynamicForm = false; }
8357
+ var first = event.first, rows = event.rows, multiSortMeta = event.multiSortMeta, filterData = event.filterData;
8358
+ var page = first / rows;
8359
+ var sort = multiSortMeta;
8360
+ var fgtsTaxationFilterQuery = createSearchRequestFilter(filterData, this.getFgtsTaxationSearchFields());
8361
+ fgtsTaxationFilterQuery = this.getFiltersDefaultFgtsTaxation(companyIds, fgtsTaxationFilterQuery, additionalFilter);
8362
+ var displayFields = mergeUnique(this.lookupServiceConfig.lookupDisplayFields.concat("e070emp"), __spread(this.lookupServiceConfig.lookupDisplayFields));
8363
+ return this.fgtsTaxationService
8364
+ .list({ page: page, sort: sort, filterQuery: fgtsTaxationFilterQuery, displayFields: displayFields })
8365
+ .pipe(operators.takeUntil(this.ngUnsubscribe))
8366
+ .pipe(operators.map(function (list) { return _this.mapToComponent(list, isDynamicForm); }));
8367
+ };
8368
+ FgtsTaxationLookupService.prototype.getFiltersDefaultFgtsTaxation = function (companyIds, filterData, additionalFilter) {
8369
+ var filters = [];
8370
+ additionalFilter && filters.push("(" + additionalFilter + ")");
8371
+ filterData && filters.push("(" + filterData + ")");
8372
+ (companyIds === null || companyIds === void 0 ? void 0 : companyIds.length) && filters.push("(e070emp.id in (" + companyIds.map(function (id) { return "'" + id + "'"; }) + "))");
8373
+ return filters.join(' and ');
8374
+ };
8375
+ FgtsTaxationLookupService.prototype.mapToComponent = function (list, isDynamicForm) {
8376
+ var _this = this;
8377
+ if (isDynamicForm === void 0) { isDynamicForm = false; }
8378
+ if (isDynamicForm) {
8379
+ return ({
8380
+ gridData: list.contents
8381
+ .map(function (item) { return (__assign(__assign({}, item), { label: _this.getLabelForMaping(item) })); }),
8382
+ totalRecords: list === null || list === void 0 ? void 0 : list.totalElements,
8383
+ });
8384
+ }
8385
+ else {
8386
+ return (__assign(__assign({}, list), { contents: list.contents.map(function (item) { return (__assign(__assign({}, item), { label: _this.getLabelForMaping(item) })); }) }));
8387
+ }
8388
+ };
8389
+ FgtsTaxationLookupService.prototype.getLabelForMaping = function (item) {
8390
+ var _this = this;
8391
+ return this.lookupServiceConfig.lookupDisplayFields
8392
+ .map(function (field) {
8393
+ if (field === "name" && !(item === null || item === void 0 ? void 0 : item.name)) {
8394
+ item.name = _this.translate
8395
+ .instant(_this.configService.getTranslationPrefix() + ".list_grid_empty_field");
8396
+ }
8397
+ if (field.indexOf(".") > 0) {
8398
+ return getProp(item, field);
8399
+ }
8400
+ return item[field];
8401
+ })
8402
+ .join(this.lookupServiceConfig.lookupSeparator);
8403
+ };
8404
+ FgtsTaxationLookupService.prototype.onFgtsTaxationLookupRequest = function (value) {
8405
+ var _this = this;
8406
+ var _a, _b;
8407
+ this.onFgtsTaxationLookupRequestObservable(value, (_b = (_a = this.lookupServiceConfig) === null || _a === void 0 ? void 0 : _a.filters) === null || _b === void 0 ? void 0 : _b.additionalFilter).subscribe(function (data) { return _this.lookupServiceConfig.lookupSubject.next(data.contents); });
8408
+ };
8409
+ FgtsTaxationLookupService.prototype.onFgtsTaxationLookupRequestObservable = function (value, additionalFilter, filter) {
8410
+ var _this = this;
8411
+ var sort = this.fgtsTaxationDisplayFields.map(function (field) { return ({
8412
+ field: field,
8413
+ order: 1
8414
+ }); });
8415
+ var filterQuery = createLookupRequestFilter(value, this.getFgtsTaxationSearchFields());
8416
+ filterQuery = getFiltersForCustomDisplayFields(filterQuery, filter);
8417
+ var displayFields = mergeUnique(this.lookupServiceConfig.lookupDisplayFields, __spread(this.lookupServiceConfig.lookupDisplayFields));
8418
+ return this.fgtsTaxationService
8419
+ .list({ sort: sort, filterQuery: filterQuery, displayFields: displayFields })
8420
+ .pipe(operators.takeUntil(this.ngUnsubscribe))
8421
+ .pipe(operators.map(function (list) { return _this.mapToComponent(list); }));
8422
+ };
8423
+ FgtsTaxationLookupService.prototype.getFgtsTaxationSearchFields = function (displayFields) {
8424
+ var fields = [
8425
+ new angularComponents.FormField({
8426
+ name: "code",
8427
+ label: this.translate.instant(this.configService.getTranslationPrefix() + ".fgts_taxation_code"),
8428
+ type: angularComponents.FieldType.String,
8429
+ }),
8430
+ new angularComponents.FormField({
8431
+ name: "description",
8432
+ label: this.translate.instant(this.configService.getTranslationPrefix() + ".fgts_taxation_description"),
8433
+ type: angularComponents.FieldType.String,
8434
+ }),
8435
+ ];
8436
+ if (displayFields && displayFields.length > 0) {
8437
+ return displayFields
8438
+ .map(function (fieldName) { return fields.find(function (field) { return field.name === fieldName; }); })
8439
+ .filter(function (field) { return field !== undefined; });
8440
+ }
8441
+ return fields;
8442
+ };
8443
+ FgtsTaxationLookupService.ctorParameters = function () { return [
8444
+ { type: core$1.TranslateService },
8445
+ { type: EntityLookupConfigService },
8446
+ { type: FgtsTaxationService }
8447
+ ]; };
8448
+ FgtsTaxationLookupService = __decorate([
8449
+ core.Injectable()
8450
+ ], FgtsTaxationLookupService);
8451
+ return FgtsTaxationLookupService;
8452
+ }());
8453
+
8454
+ var FgtsTaxationLookupComponent = /** @class */ (function (_super) {
8455
+ __extends(FgtsTaxationLookupComponent, _super);
8456
+ function FgtsTaxationLookupComponent(translate, cdRef, configService, structerService, fgtsTaxationLookupService) {
8457
+ var _this = _super.call(this, translate, cdRef, configService, structerService) || this;
8458
+ _this.translate = translate;
8459
+ _this.cdRef = cdRef;
8460
+ _this.configService = configService;
8461
+ _this.structerService = structerService;
8462
+ _this.fgtsTaxationLookupService = fgtsTaxationLookupService;
8463
+ _this.displayFields = ["fgtsTaxationGroup.code", "fgtsTaxationGroup.description", "code", "description"];
8464
+ _this.controlName = "fgtsTaxation";
8465
+ _this.entity = "fgtsTaxation";
8466
+ _this.domain = "tax_obligation";
8467
+ _this.service = "shared";
8468
+ _this.useDateValidation = false;
8469
+ return _this;
8470
+ }
8471
+ FgtsTaxationLookupComponent.prototype.ngOnInit = function () {
8472
+ this.fgtsTaxationLookupService.setDisplayFields(this.displayFields);
8473
+ this.fgtsTaxationSearchFields = this.fgtsTaxationLookupService.getFgtsTaxationSearchFields(this.displayFields);
8474
+ this.fgtsTaxationSearchGridFields = this.fgtsTaxationLookupService.getFgtsTaxationSearchFields(this.displayFields);
8475
+ };
8476
+ FgtsTaxationLookupComponent.prototype.onFgtsTaxationLookupRequest = function (value) {
8477
+ var _this = this;
8478
+ this.fgtsTaxationLookupService
8479
+ .onFgtsTaxationLookupRequestObservable(value, this.fgtsTaxationLookupService.lookupServiceConfig.filters.additionalFilter, null)
8480
+ .subscribe(function (list) {
8481
+ _this.fgtsTaxationSuggestions = list === null || list === void 0 ? void 0 : list.contents;
8482
+ });
8483
+ };
8484
+ FgtsTaxationLookupComponent.prototype.onFgtsTaxationSearchRequest = function (event) {
8485
+ var _this = this;
8486
+ this.fgtsTaxationLookupService
8487
+ .onFgtsTaxationSearchRequestObservable(event, this.fgtsTaxationLookupService.lookupServiceConfig.filters.additionalFilter, this.companyIds)
8488
+ .subscribe(function (list) {
8489
+ _this.fgtsTaxationSearchGridData = list === null || list === void 0 ? void 0 : list.contents;
8490
+ _this.fgtsTaxationSearchTotalRecords = list === null || list === void 0 ? void 0 : list.totalElements;
8491
+ });
8492
+ };
8493
+ FgtsTaxationLookupComponent.ctorParameters = function () { return [
8494
+ { type: core$1.TranslateService },
8495
+ { type: core.ChangeDetectorRef },
8496
+ { type: EntityLookupConfigService },
8497
+ { type: StructureFilterService },
8498
+ { type: FgtsTaxationLookupService }
8499
+ ]; };
8500
+ __decorate([
8501
+ core.Input()
8502
+ ], FgtsTaxationLookupComponent.prototype, "displayFields", void 0);
8503
+ FgtsTaxationLookupComponent = __decorate([
8504
+ core.Component({
8505
+ selector: "hcm-fgts-taxation-lookup",
8506
+ template: "<s-loading-state [loading]=\"loading\" [blockWindow]=\"true\"></s-loading-state>\n<form [formGroup]=\"formGroup\">\n <s-lookup dataKey=\"id\" id=\"fgtsTaxation\" name=\"fgtsTaxation\" [formControlName]=\"controlName\"\n [searchFields]=\"fgtsTaxationSearchFields\"\n [searchGridFields]=\"fgtsTaxationSearchGridFields\"\n [searchGridData]=\"fgtsTaxationSearchGridData\"\n (onSelect)=\"selectOption($event)\"\n (onClear)=\"onClearItem($event)\"\n [multiple]=\"multiple\"\n [disabled]=\"isDisabled\"\n [lookupSuggestions]=\"fgtsTaxationSuggestions\"\n (onLookupRequest)=\"onFgtsTaxationLookupRequest($event)\"\n (onSearchRequest)=\"onFgtsTaxationSearchRequest($event)\"\n lookupDisplayField=\"label\"\n [searchTotalRecords]=\"fgtsTaxationSearchTotalRecords\"\n [searchTitle]=\"configService.getTranslationPrefix() \n + '.fgts_taxation_search_title' | translate\"\n [searchEmptyTitle]=\"configService.getTranslationPrefix()\n + '.nothing_found' | translate\" [filterLabel]=\"configService.getTranslationPrefix()\n + '.filter' | translate\" [filterTitle]=\"configService.getTranslationPrefix()\n + '.filters' | translate\" [clearLabel]=\"configService.getTranslationPrefix()\n + '.clear' | translate\" [cancelLabel]=\"configService.getTranslationPrefix()\n + '.cancel' | translate\" [selectLabel]=\"configService.getTranslationPrefix()\n + '.select' | translate\" [searchTotalRecordsLabel]=\"configService.getTranslationPrefix()\n + '.total_records' | translate: {value: fgtsTaxationSearchTotalRecords}\"></s-lookup>\n</form>\n"
8507
+ })
8508
+ ], FgtsTaxationLookupComponent);
8509
+ return FgtsTaxationLookupComponent;
8510
+ }(BaseLookupComponent));
8511
+
8512
+ var FgtsTaxationLookupModule = /** @class */ (function () {
8513
+ function FgtsTaxationLookupModule() {
8514
+ }
8515
+ FgtsTaxationLookupModule = __decorate([
8516
+ core.NgModule({
8517
+ declarations: [
8518
+ FgtsTaxationLookupComponent,
8519
+ ],
8520
+ exports: [
8521
+ FgtsTaxationLookupComponent,
8522
+ ],
8523
+ imports: [
8524
+ SharedModule,
8525
+ angularComponents.LoadingStateModule,
8526
+ ],
8527
+ providers: [
8528
+ FgtsTaxationLookupService,
8529
+ FgtsTaxationService
8530
+ ],
8531
+ })
8532
+ ], FgtsTaxationLookupModule);
8533
+ return FgtsTaxationLookupModule;
8534
+ }());
8535
+
8536
+ var InssTaxationService = /** @class */ (function (_super) {
8537
+ __extends(InssTaxationService, _super);
8538
+ function InssTaxationService(http, messageService, translate, configService) {
8539
+ var _this = _super.call(this, http, messageService, "tax_obligation/shared/entities/inssTaxation", "tax_obligation/shared/actions", translate, configService) || this;
8540
+ _this.http = http;
8541
+ _this.messageService = messageService;
8542
+ _this.translate = translate;
8543
+ _this.configService = configService;
8544
+ return _this;
8545
+ }
8546
+ InssTaxationService.prototype.listExternalInssTaxation = function (listParams) {
8547
+ return this.http
8548
+ .get("tax_obligation/shared/entities/inssTaxation", {
8549
+ params: this.getListQueryParams(listParams),
8550
+ })
8551
+ .pipe(this.defaultCatch());
8552
+ };
8553
+ InssTaxationService.ctorParameters = function () { return [
8554
+ { type: http.HttpClient },
8555
+ { type: api.MessageService },
8556
+ { type: core$1.TranslateService },
8557
+ { type: EntityLookupConfigService }
8558
+ ]; };
8559
+ InssTaxationService = __decorate([
8560
+ core.Injectable()
8561
+ ], InssTaxationService);
8562
+ return InssTaxationService;
8563
+ }(EntityService));
8564
+
8565
+ var InssTaxationLookupService = /** @class */ (function () {
8566
+ function InssTaxationLookupService(translate, configService, inssTaxationService) {
8567
+ this.translate = translate;
8568
+ this.configService = configService;
8569
+ this.inssTaxationService = inssTaxationService;
8570
+ this.inssTaxationDisplayFields = ["inssTaxationGroup.code", "inssTaxationGroup.description", "code", "description"];
8571
+ this.lookupServiceConfig = {
8572
+ lookupDisplayFields: this.inssTaxationDisplayFields,
8573
+ lookupSeparator: " - ",
8574
+ searchSubject: new rxjs.Subject(),
8575
+ lookupSubject: new rxjs.Subject(),
8576
+ entityName: "inssTaxation",
8577
+ dynamicFormOptions: {
8578
+ cancelLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".cancel"),
8579
+ clearLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".clear"),
8580
+ dataKey: "id",
8581
+ emptyFieldLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".list_grid_empty_field"),
8582
+ emptyMessage: this.translate.instant(this.configService.getTranslationPrefix() + ".empty_message_field"),
8583
+ filterLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".filter"),
8584
+ filterTitle: this.translate.instant(this.configService.getTranslationPrefix() + ".filters"),
8585
+ label: this.translate.instant(this.configService.getTranslationPrefix() + ".company_linked_location"),
8586
+ lookupDisplayField: "label",
8587
+ name: "inssTaxation",
8588
+ recordLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".records_found"),
8589
+ recordsLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".records_found"),
8590
+ required: true,
8591
+ searchEmptyTitle: this.translate.instant(this.configService.getTranslationPrefix() + ".nothing_found"),
8592
+ searchFields: this.getInssTaxationSearchFields(),
8593
+ searchGridFields: this.getInssTaxationSearchFields(),
8594
+ searchTitle: this.translate.instant(this.configService.getTranslationPrefix() + ".company_linked_location_search_title"),
8595
+ selectLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".select"),
8596
+ visible: true,
8597
+ isCollective: false,
8598
+ },
8599
+ filters: {
8600
+ additionalFilter: undefined,
8601
+ initialFilter: undefined,
8602
+ companyIds: [],
8603
+ },
8604
+ };
8605
+ this.ngUnsubscribe = new rxjs.Subject();
8606
+ }
8607
+ InssTaxationLookupService.prototype.setDisplayFields = function (fields) {
8608
+ this.inssTaxationDisplayFields = fields;
8609
+ };
8610
+ InssTaxationLookupService.prototype.updateSuggestions = function (value) {
8611
+ if (value === null || value === void 0 ? void 0 : value[this.lookupServiceConfig.entityName]) {
8612
+ value[this.lookupServiceConfig.entityName].label = this.getSuggestionValue(this.lookupServiceConfig.lookupDisplayFields, this.lookupServiceConfig.entityName, value, this.lookupServiceConfig.lookupSeparator);
8613
+ if ((value === null || value === void 0 ? void 0 : value[this.lookupServiceConfig.entityName].label.trim()) === this.lookupServiceConfig.lookupSeparator.trim()) {
8614
+ delete value[this.lookupServiceConfig.entityName].label;
8615
+ }
8616
+ }
8617
+ };
8618
+ InssTaxationLookupService.prototype.getSuggestionValue = function (displayFields, ownerEntity, value, separator) {
8619
+ return displayFields
8620
+ .map(function (field) { return getProp(value, ownerEntity + "." + field); })
8621
+ .reduce(function (acc, val) { return "" + acc + separator + val; });
8622
+ };
8623
+ InssTaxationLookupService.prototype.getFormField = function () {
8624
+ var _this = this;
8625
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
8626
+ return new angularComponents.FormField({
8627
+ cancelLabel: (_a = this.lookupServiceConfig.dynamicFormOptions) === null || _a === void 0 ? void 0 : _a.cancelLabel,
8628
+ clearLabel: (_b = this.lookupServiceConfig.dynamicFormOptions) === null || _b === void 0 ? void 0 : _b.clearLabel,
8629
+ recordLabel: (_c = this.lookupServiceConfig.dynamicFormOptions) === null || _c === void 0 ? void 0 : _c.recordLabel,
8630
+ recordsLabel: (_d = this.lookupServiceConfig.dynamicFormOptions) === null || _d === void 0 ? void 0 : _d.recordsLabel,
8631
+ searchEmptyTitle: (_e = this.lookupServiceConfig.dynamicFormOptions) === null || _e === void 0 ? void 0 : _e.searchEmptyTitle,
8632
+ searchFields: (_f = this.lookupServiceConfig.dynamicFormOptions) === null || _f === void 0 ? void 0 : _f.searchFields,
8633
+ searchTitle: (_g = this.lookupServiceConfig.dynamicFormOptions) === null || _g === void 0 ? void 0 : _g.searchTitle,
8634
+ selectLabel: (_h = this.lookupServiceConfig.dynamicFormOptions) === null || _h === void 0 ? void 0 : _h.selectLabel,
8635
+ dataKey: (_j = this.lookupServiceConfig.dynamicFormOptions) === null || _j === void 0 ? void 0 : _j.dataKey,
8636
+ emptyFieldLabel: (_k = this.lookupServiceConfig.dynamicFormOptions) === null || _k === void 0 ? void 0 : _k.emptyFieldLabel,
8637
+ emptyMessage: (_l = this.lookupServiceConfig.dynamicFormOptions) === null || _l === void 0 ? void 0 : _l.emptyMessage,
8638
+ filterLabel: (_m = this.lookupServiceConfig.dynamicFormOptions) === null || _m === void 0 ? void 0 : _m.filterLabel,
8639
+ filterTitle: (_o = this.lookupServiceConfig.dynamicFormOptions) === null || _o === void 0 ? void 0 : _o.filterTitle,
8640
+ label: (_p = this.lookupServiceConfig.dynamicFormOptions) === null || _p === void 0 ? void 0 : _p.label,
8641
+ lookupDisplayField: (_q = this.lookupServiceConfig.dynamicFormOptions) === null || _q === void 0 ? void 0 : _q.lookupDisplayField,
8642
+ name: (_r = this.lookupServiceConfig.dynamicFormOptions) === null || _r === void 0 ? void 0 : _r.name,
8643
+ onLookupRequest: function (value) { return _this.onInssTaxationLookupRequest(value); },
8644
+ onSearchRequest: function (event) { return _this.onInssTaxationSearchRequest(event); },
8645
+ required: function () { var _a; return (_a = _this.lookupServiceConfig.dynamicFormOptions) === null || _a === void 0 ? void 0 : _a.required; },
8646
+ searchObservable: this.lookupServiceConfig.searchSubject,
8647
+ suggestionsObservable: this.lookupServiceConfig.lookupSubject,
8648
+ type: angularComponents.FieldType.Lookup,
8649
+ visible: function () { var _a; return !((_a = _this.lookupServiceConfig.dynamicFormOptions) === null || _a === void 0 ? void 0 : _a.isCollective); },
8650
+ });
8651
+ };
8652
+ InssTaxationLookupService.prototype.onInssTaxationSearchRequest = function (event) {
8653
+ var _this = this;
8654
+ var _a, _b, _c, _d;
8655
+ this.onInssTaxationSearchRequestObservable(event, (_b = (_a = this.lookupServiceConfig) === null || _a === void 0 ? void 0 : _a.filters) === null || _b === void 0 ? void 0 : _b.additionalFilter, (_d = (_c = this.lookupServiceConfig) === null || _c === void 0 ? void 0 : _c.filters) === null || _d === void 0 ? void 0 : _d.companyIds, true).subscribe(function (data) { return _this.lookupServiceConfig.searchSubject.next(data); });
8656
+ };
8657
+ InssTaxationLookupService.prototype.onInssTaxationSearchRequestObservable = function (event, additionalFilter, companyIds, isDynamicForm) {
8658
+ var _this = this;
8659
+ if (isDynamicForm === void 0) { isDynamicForm = false; }
8660
+ var first = event.first, rows = event.rows, multiSortMeta = event.multiSortMeta, filterData = event.filterData;
8661
+ var page = first / rows;
8662
+ var sort = multiSortMeta;
8663
+ var inssTaxationFilterQuery = createSearchRequestFilter(filterData, this.getInssTaxationSearchFields());
8664
+ inssTaxationFilterQuery = this.getFiltersDefaultInssTaxation(companyIds, inssTaxationFilterQuery, additionalFilter);
8665
+ var displayFields = mergeUnique(this.lookupServiceConfig.lookupDisplayFields.concat("e070emp"), __spread(this.lookupServiceConfig.lookupDisplayFields));
8666
+ return this.inssTaxationService
8667
+ .list({ page: page, sort: sort, filterQuery: inssTaxationFilterQuery, displayFields: displayFields })
8668
+ .pipe(operators.takeUntil(this.ngUnsubscribe))
8669
+ .pipe(operators.map(function (list) { return _this.mapToComponent(list, isDynamicForm); }));
8670
+ };
8671
+ InssTaxationLookupService.prototype.getFiltersDefaultInssTaxation = function (companyIds, filterData, additionalFilter) {
8672
+ var filters = [];
8673
+ additionalFilter && filters.push("(" + additionalFilter + ")");
8674
+ filterData && filters.push("(" + filterData + ")");
8675
+ (companyIds === null || companyIds === void 0 ? void 0 : companyIds.length) && filters.push("(e070emp.id in (" + companyIds.map(function (id) { return "'" + id + "'"; }) + "))");
8676
+ return filters.join(' and ');
8677
+ };
8678
+ InssTaxationLookupService.prototype.mapToComponent = function (list, isDynamicForm) {
8679
+ var _this = this;
8680
+ if (isDynamicForm === void 0) { isDynamicForm = false; }
8681
+ if (isDynamicForm) {
8682
+ return ({
8683
+ gridData: list.contents
8684
+ .map(function (item) { return (__assign(__assign({}, item), { label: _this.getLabelForMaping(item) })); }),
8685
+ totalRecords: list === null || list === void 0 ? void 0 : list.totalElements,
8686
+ });
8687
+ }
8688
+ else {
8689
+ return (__assign(__assign({}, list), { contents: list.contents.map(function (item) { return (__assign(__assign({}, item), { label: _this.getLabelForMaping(item) })); }) }));
8690
+ }
8691
+ };
8692
+ InssTaxationLookupService.prototype.getLabelForMaping = function (item) {
8693
+ var _this = this;
8694
+ return this.lookupServiceConfig.lookupDisplayFields
8695
+ .map(function (field) {
8696
+ if (field === "name" && !(item === null || item === void 0 ? void 0 : item.name)) {
8697
+ item.name = _this.translate
8698
+ .instant(_this.configService.getTranslationPrefix() + ".list_grid_empty_field");
8699
+ }
8700
+ if (field.indexOf(".") > 0) {
8701
+ return getProp(item, field);
8702
+ }
8703
+ return item[field];
8704
+ })
8705
+ .join(this.lookupServiceConfig.lookupSeparator);
8706
+ };
8707
+ InssTaxationLookupService.prototype.onInssTaxationLookupRequest = function (value) {
8708
+ var _this = this;
8709
+ var _a, _b;
8710
+ this.onInssTaxationLookupRequestObservable(value, (_b = (_a = this.lookupServiceConfig) === null || _a === void 0 ? void 0 : _a.filters) === null || _b === void 0 ? void 0 : _b.additionalFilter).subscribe(function (data) { return _this.lookupServiceConfig.lookupSubject.next(data.contents); });
8711
+ };
8712
+ InssTaxationLookupService.prototype.onInssTaxationLookupRequestObservable = function (value, additionalFilter, filter) {
8713
+ var _this = this;
8714
+ var sort = this.inssTaxationDisplayFields.map(function (field) { return ({
8715
+ field: field,
8716
+ order: 1
8717
+ }); });
8718
+ var filterQuery = createLookupRequestFilter(value, this.getInssTaxationSearchFields());
8719
+ filterQuery = getFiltersForCustomDisplayFields(filterQuery, filter);
8720
+ var displayFields = mergeUnique(this.lookupServiceConfig.lookupDisplayFields, __spread(this.lookupServiceConfig.lookupDisplayFields));
8721
+ return this.inssTaxationService
8722
+ .list({ sort: sort, filterQuery: filterQuery, displayFields: displayFields })
8723
+ .pipe(operators.takeUntil(this.ngUnsubscribe))
8724
+ .pipe(operators.map(function (list) { return _this.mapToComponent(list); }));
8725
+ };
8726
+ InssTaxationLookupService.prototype.getInssTaxationSearchFields = function (displayFields) {
8727
+ var fields = [
8728
+ new angularComponents.FormField({
8729
+ name: "inssTaxationGroup.code",
8730
+ label: this.translate.instant(this.configService.getTranslationPrefix() + ".inss_taxation_inss_taxation_group_code"),
8731
+ type: angularComponents.FieldType.String,
8732
+ }),
8733
+ new angularComponents.FormField({
8734
+ name: "inssTaxationGroup.description",
8735
+ label: this.translate.instant(this.configService.getTranslationPrefix() + ".inss_taxation_inss_taxation_description"),
8736
+ type: angularComponents.FieldType.String,
8737
+ }),
8738
+ new angularComponents.FormField({
8739
+ name: "code",
8740
+ label: this.translate.instant(this.configService.getTranslationPrefix() + ".inss_taxation_code"),
8741
+ type: angularComponents.FieldType.String,
8742
+ }),
8743
+ new angularComponents.FormField({
8744
+ name: "description",
8745
+ label: this.translate.instant(this.configService.getTranslationPrefix() + ".inss_taxation_description"),
8746
+ type: angularComponents.FieldType.String,
8747
+ })
8748
+ ];
8749
+ if (displayFields && displayFields.length > 0) {
8750
+ return displayFields
8751
+ .map(function (fieldName) { return fields.find(function (field) { return field.name === fieldName; }); })
8752
+ .filter(function (field) { return field !== undefined; });
8753
+ }
8754
+ return fields;
8755
+ };
8756
+ InssTaxationLookupService.ctorParameters = function () { return [
8757
+ { type: core$1.TranslateService },
8758
+ { type: EntityLookupConfigService },
8759
+ { type: InssTaxationService }
8760
+ ]; };
8761
+ InssTaxationLookupService = __decorate([
8762
+ core.Injectable()
8763
+ ], InssTaxationLookupService);
8764
+ return InssTaxationLookupService;
8765
+ }());
8766
+
8767
+ var InssTaxationLookupComponent = /** @class */ (function (_super) {
8768
+ __extends(InssTaxationLookupComponent, _super);
8769
+ function InssTaxationLookupComponent(translate, cdRef, configService, structerService, inssTaxationLookupService) {
8770
+ var _this = _super.call(this, translate, cdRef, configService, structerService) || this;
8771
+ _this.translate = translate;
8772
+ _this.cdRef = cdRef;
8773
+ _this.configService = configService;
8774
+ _this.structerService = structerService;
8775
+ _this.inssTaxationLookupService = inssTaxationLookupService;
8776
+ _this.displayFields = ["inssTaxationGroup.code", "inssTaxationGroup.description", "code", "description"];
8777
+ _this.controlName = "inssTaxation";
8778
+ _this.entity = "inssTaxation";
8779
+ _this.domain = "tax_obligation";
8780
+ _this.service = "shared";
8781
+ _this.useDateValidation = false;
8782
+ return _this;
8783
+ }
8784
+ InssTaxationLookupComponent.prototype.ngOnInit = function () {
8785
+ this.inssTaxationLookupService.setDisplayFields(this.displayFields);
8786
+ this.inssTaxationSearchFields = this.inssTaxationLookupService.getInssTaxationSearchFields(this.displayFields);
8787
+ this.inssTaxationSearchGridFields = this.inssTaxationLookupService.getInssTaxationSearchFields(this.displayFields);
8788
+ };
8789
+ InssTaxationLookupComponent.prototype.onInssTaxationLookupRequest = function (value) {
8790
+ var _this = this;
8791
+ this.inssTaxationLookupService
8792
+ .onInssTaxationLookupRequestObservable(value, this.inssTaxationLookupService.lookupServiceConfig.filters.additionalFilter, null)
8793
+ .subscribe(function (list) {
8794
+ _this.inssTaxationSuggestions = list === null || list === void 0 ? void 0 : list.contents;
8795
+ });
8796
+ };
8797
+ InssTaxationLookupComponent.prototype.onInssTaxationSearchRequest = function (event) {
8798
+ var _this = this;
8799
+ this.inssTaxationLookupService
8800
+ .onInssTaxationSearchRequestObservable(event, this.inssTaxationLookupService.lookupServiceConfig.filters.additionalFilter, this.companyIds)
8801
+ .subscribe(function (list) {
8802
+ _this.inssTaxationSearchGridData = list === null || list === void 0 ? void 0 : list.contents;
8803
+ _this.inssTaxationSearchTotalRecords = list === null || list === void 0 ? void 0 : list.totalElements;
8804
+ });
8805
+ };
8806
+ InssTaxationLookupComponent.ctorParameters = function () { return [
8807
+ { type: core$1.TranslateService },
8808
+ { type: core.ChangeDetectorRef },
8809
+ { type: EntityLookupConfigService },
8810
+ { type: StructureFilterService },
8811
+ { type: InssTaxationLookupService }
8812
+ ]; };
8813
+ __decorate([
8814
+ core.Input()
8815
+ ], InssTaxationLookupComponent.prototype, "displayFields", void 0);
8816
+ InssTaxationLookupComponent = __decorate([
8817
+ core.Component({
8818
+ selector: "hcm-inss-taxation-lookup",
8819
+ template: "<s-loading-state [loading]=\"loading\" [blockWindow]=\"true\"></s-loading-state>\n<form [formGroup]=\"formGroup\">\n <s-lookup dataKey=\"id\" id=\"inssTaxation\" name=\"inssTaxation\" [formControlName]=\"controlName\"\n [searchFields]=\"inssTaxationSearchFields\"\n [searchGridFields]=\"inssTaxationSearchGridFields\"\n [searchGridData]=\"inssTaxationSearchGridData\"\n (onSelect)=\"selectOption($event)\"\n (onClear)=\"onClearItem($event)\"\n [multiple]=\"multiple\"\n [disabled]=\"isDisabled\"\n [lookupSuggestions]=\"inssTaxationSuggestions\"\n (onLookupRequest)=\"onInssTaxationLookupRequest($event)\"\n (onSearchRequest)=\"onInssTaxationSearchRequest($event)\"\n lookupDisplayField=\"label\"\n [searchTotalRecords]=\"inssTaxationSearchTotalRecords\"\n [searchTitle]=\"configService.getTranslationPrefix() \n + '.inss_taxation_search_title' | translate\"\n [searchEmptyTitle]=\"configService.getTranslationPrefix()\n + '.nothing_found' | translate\" [filterLabel]=\"configService.getTranslationPrefix()\n + '.filter' | translate\" [filterTitle]=\"configService.getTranslationPrefix()\n + '.filters' | translate\" [clearLabel]=\"configService.getTranslationPrefix()\n + '.clear' | translate\" [cancelLabel]=\"configService.getTranslationPrefix()\n + '.cancel' | translate\" [selectLabel]=\"configService.getTranslationPrefix()\n + '.select' | translate\" [searchTotalRecordsLabel]=\"configService.getTranslationPrefix()\n + '.total_records' | translate: {value: inssTaxationSearchTotalRecords}\"></s-lookup>\n</form>\n"
8820
+ })
8821
+ ], InssTaxationLookupComponent);
8822
+ return InssTaxationLookupComponent;
8823
+ }(BaseLookupComponent));
8824
+
8825
+ var InssTaxationLookupModule = /** @class */ (function () {
8826
+ function InssTaxationLookupModule() {
8827
+ }
8828
+ InssTaxationLookupModule = __decorate([
8829
+ core.NgModule({
8830
+ declarations: [
8831
+ InssTaxationLookupComponent,
8832
+ ],
8833
+ exports: [
8834
+ InssTaxationLookupComponent,
8835
+ ],
8836
+ imports: [
8837
+ SharedModule,
8838
+ angularComponents.LoadingStateModule,
8839
+ ],
8840
+ providers: [
8841
+ InssTaxationLookupService,
8842
+ InssTaxationService
8843
+ ],
8844
+ })
8845
+ ], InssTaxationLookupModule);
8846
+ return InssTaxationLookupModule;
8847
+ }());
8848
+
8849
+ var IrrfTaxationService = /** @class */ (function (_super) {
8850
+ __extends(IrrfTaxationService, _super);
8851
+ function IrrfTaxationService(http, messageService, translate, configService) {
8852
+ var _this = _super.call(this, http, messageService, "tax_obligation/shared/entities/irrfTaxation", "tax_obligation/shared/actions", translate, configService) || this;
8853
+ _this.http = http;
8854
+ _this.messageService = messageService;
8855
+ _this.translate = translate;
8856
+ _this.configService = configService;
8857
+ return _this;
8858
+ }
8859
+ IrrfTaxationService.prototype.listExternalIrrfTaxation = function (listParams) {
8860
+ return this.http
8861
+ .get("tax_obligation/shared/entities/irrfTaxation", {
8862
+ params: this.getListQueryParams(listParams),
8863
+ })
8864
+ .pipe(this.defaultCatch());
8865
+ };
8866
+ IrrfTaxationService.ctorParameters = function () { return [
8867
+ { type: http.HttpClient },
8868
+ { type: api.MessageService },
8869
+ { type: core$1.TranslateService },
8870
+ { type: EntityLookupConfigService }
8871
+ ]; };
8872
+ IrrfTaxationService = __decorate([
8873
+ core.Injectable()
8874
+ ], IrrfTaxationService);
8875
+ return IrrfTaxationService;
8876
+ }(EntityService));
8877
+
8878
+ var IrrfTaxationLookupService = /** @class */ (function () {
8879
+ function IrrfTaxationLookupService(translate, configService, irrfTaxationService) {
8880
+ this.translate = translate;
8881
+ this.configService = configService;
8882
+ this.irrfTaxationService = irrfTaxationService;
8883
+ this.irrfTaxationDisplayFields = ["irrfTaxationGroup.code", "irrfTaxationGroup.description", "code", "description"];
8884
+ this.lookupServiceConfig = {
8885
+ lookupDisplayFields: this.irrfTaxationDisplayFields,
8886
+ lookupSeparator: " - ",
8887
+ searchSubject: new rxjs.Subject(),
8888
+ lookupSubject: new rxjs.Subject(),
8889
+ entityName: "irrfTaxation",
8890
+ dynamicFormOptions: {
8891
+ cancelLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".cancel"),
8892
+ clearLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".clear"),
8893
+ dataKey: "id",
8894
+ emptyFieldLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".list_grid_empty_field"),
8895
+ emptyMessage: this.translate.instant(this.configService.getTranslationPrefix() + ".empty_message_field"),
8896
+ filterLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".filter"),
8897
+ filterTitle: this.translate.instant(this.configService.getTranslationPrefix() + ".filters"),
8898
+ label: this.translate.instant(this.configService.getTranslationPrefix() + ".company_linked_location"),
8899
+ lookupDisplayField: "label",
8900
+ name: "irrfTaxation",
8901
+ recordLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".records_found"),
8902
+ recordsLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".records_found"),
8903
+ required: true,
8904
+ searchEmptyTitle: this.translate.instant(this.configService.getTranslationPrefix() + ".nothing_found"),
8905
+ searchFields: this.getIrrfTaxationSearchFields(),
8906
+ searchGridFields: this.getIrrfTaxationSearchFields(),
8907
+ searchTitle: this.translate.instant(this.configService.getTranslationPrefix() + ".company_linked_location_search_title"),
8908
+ selectLabel: this.translate.instant(this.configService.getTranslationPrefix() + ".select"),
8909
+ visible: true,
8910
+ isCollective: false,
8911
+ },
8912
+ filters: {
8913
+ additionalFilter: undefined,
8914
+ initialFilter: undefined,
8915
+ companyIds: [],
8916
+ },
8917
+ };
8918
+ this.ngUnsubscribe = new rxjs.Subject();
8919
+ }
8920
+ IrrfTaxationLookupService.prototype.setDisplayFields = function (fields) {
8921
+ this.irrfTaxationDisplayFields = fields;
8922
+ };
8923
+ IrrfTaxationLookupService.prototype.updateSuggestions = function (value) {
8924
+ if (value === null || value === void 0 ? void 0 : value[this.lookupServiceConfig.entityName]) {
8925
+ value[this.lookupServiceConfig.entityName].label = this.getSuggestionValue(this.lookupServiceConfig.lookupDisplayFields, this.lookupServiceConfig.entityName, value, this.lookupServiceConfig.lookupSeparator);
8926
+ if ((value === null || value === void 0 ? void 0 : value[this.lookupServiceConfig.entityName].label.trim()) === this.lookupServiceConfig.lookupSeparator.trim()) {
8927
+ delete value[this.lookupServiceConfig.entityName].label;
8928
+ }
8929
+ }
8930
+ };
8931
+ IrrfTaxationLookupService.prototype.getSuggestionValue = function (displayFields, ownerEntity, value, separator) {
8932
+ return displayFields
8933
+ .map(function (field) { return getProp(value, ownerEntity + "." + field); })
8934
+ .reduce(function (acc, val) { return "" + acc + separator + val; });
8935
+ };
8936
+ IrrfTaxationLookupService.prototype.getFormField = function () {
8937
+ var _this = this;
8938
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
8939
+ return new angularComponents.FormField({
8940
+ cancelLabel: (_a = this.lookupServiceConfig.dynamicFormOptions) === null || _a === void 0 ? void 0 : _a.cancelLabel,
8941
+ clearLabel: (_b = this.lookupServiceConfig.dynamicFormOptions) === null || _b === void 0 ? void 0 : _b.clearLabel,
8942
+ recordLabel: (_c = this.lookupServiceConfig.dynamicFormOptions) === null || _c === void 0 ? void 0 : _c.recordLabel,
8943
+ recordsLabel: (_d = this.lookupServiceConfig.dynamicFormOptions) === null || _d === void 0 ? void 0 : _d.recordsLabel,
8944
+ searchEmptyTitle: (_e = this.lookupServiceConfig.dynamicFormOptions) === null || _e === void 0 ? void 0 : _e.searchEmptyTitle,
8945
+ searchFields: (_f = this.lookupServiceConfig.dynamicFormOptions) === null || _f === void 0 ? void 0 : _f.searchFields,
8946
+ searchTitle: (_g = this.lookupServiceConfig.dynamicFormOptions) === null || _g === void 0 ? void 0 : _g.searchTitle,
8947
+ selectLabel: (_h = this.lookupServiceConfig.dynamicFormOptions) === null || _h === void 0 ? void 0 : _h.selectLabel,
8948
+ dataKey: (_j = this.lookupServiceConfig.dynamicFormOptions) === null || _j === void 0 ? void 0 : _j.dataKey,
8949
+ emptyFieldLabel: (_k = this.lookupServiceConfig.dynamicFormOptions) === null || _k === void 0 ? void 0 : _k.emptyFieldLabel,
8950
+ emptyMessage: (_l = this.lookupServiceConfig.dynamicFormOptions) === null || _l === void 0 ? void 0 : _l.emptyMessage,
8951
+ filterLabel: (_m = this.lookupServiceConfig.dynamicFormOptions) === null || _m === void 0 ? void 0 : _m.filterLabel,
8952
+ filterTitle: (_o = this.lookupServiceConfig.dynamicFormOptions) === null || _o === void 0 ? void 0 : _o.filterTitle,
8953
+ label: (_p = this.lookupServiceConfig.dynamicFormOptions) === null || _p === void 0 ? void 0 : _p.label,
8954
+ lookupDisplayField: (_q = this.lookupServiceConfig.dynamicFormOptions) === null || _q === void 0 ? void 0 : _q.lookupDisplayField,
8955
+ name: (_r = this.lookupServiceConfig.dynamicFormOptions) === null || _r === void 0 ? void 0 : _r.name,
8956
+ onLookupRequest: function (value) { return _this.onIrrfTaxationLookupRequest(value); },
8957
+ onSearchRequest: function (event) { return _this.onIrrfTaxationSearchRequest(event); },
8958
+ required: function () { var _a; return (_a = _this.lookupServiceConfig.dynamicFormOptions) === null || _a === void 0 ? void 0 : _a.required; },
8959
+ searchObservable: this.lookupServiceConfig.searchSubject,
8960
+ suggestionsObservable: this.lookupServiceConfig.lookupSubject,
8961
+ type: angularComponents.FieldType.Lookup,
8962
+ visible: function () { var _a; return !((_a = _this.lookupServiceConfig.dynamicFormOptions) === null || _a === void 0 ? void 0 : _a.isCollective); },
8963
+ });
8964
+ };
8965
+ IrrfTaxationLookupService.prototype.onIrrfTaxationSearchRequest = function (event) {
8966
+ var _this = this;
8967
+ var _a, _b, _c, _d;
8968
+ this.onIrrfTaxationSearchRequestObservable(event, (_b = (_a = this.lookupServiceConfig) === null || _a === void 0 ? void 0 : _a.filters) === null || _b === void 0 ? void 0 : _b.additionalFilter, (_d = (_c = this.lookupServiceConfig) === null || _c === void 0 ? void 0 : _c.filters) === null || _d === void 0 ? void 0 : _d.companyIds, true).subscribe(function (data) { return _this.lookupServiceConfig.searchSubject.next(data); });
8969
+ };
8970
+ IrrfTaxationLookupService.prototype.onIrrfTaxationSearchRequestObservable = function (event, additionalFilter, companyIds, isDynamicForm) {
8971
+ var _this = this;
8972
+ if (isDynamicForm === void 0) { isDynamicForm = false; }
8973
+ var first = event.first, rows = event.rows, multiSortMeta = event.multiSortMeta, filterData = event.filterData;
8974
+ var page = first / rows;
8975
+ var sort = multiSortMeta;
8976
+ var irrfTaxationFilterQuery = createSearchRequestFilter(filterData, this.getIrrfTaxationSearchFields());
8977
+ irrfTaxationFilterQuery = this.getFiltersDefaultIrrfTaxation(companyIds, irrfTaxationFilterQuery, additionalFilter);
8978
+ var displayFields = mergeUnique(this.lookupServiceConfig.lookupDisplayFields.concat("e070emp"), __spread(this.lookupServiceConfig.lookupDisplayFields));
8979
+ return this.irrfTaxationService
8980
+ .list({ page: page, sort: sort, filterQuery: irrfTaxationFilterQuery, displayFields: displayFields })
8981
+ .pipe(operators.takeUntil(this.ngUnsubscribe))
8982
+ .pipe(operators.map(function (list) { return _this.mapToComponent(list, isDynamicForm); }));
8983
+ };
8984
+ IrrfTaxationLookupService.prototype.getFiltersDefaultIrrfTaxation = function (companyIds, filterData, additionalFilter) {
8985
+ var filters = [];
8986
+ additionalFilter && filters.push("(" + additionalFilter + ")");
8987
+ filterData && filters.push("(" + filterData + ")");
8988
+ (companyIds === null || companyIds === void 0 ? void 0 : companyIds.length) && filters.push("(e070emp.id in (" + companyIds.map(function (id) { return "'" + id + "'"; }) + "))");
8989
+ return filters.join(' and ');
8990
+ };
8991
+ IrrfTaxationLookupService.prototype.mapToComponent = function (list, isDynamicForm) {
8992
+ var _this = this;
8993
+ if (isDynamicForm === void 0) { isDynamicForm = false; }
8994
+ if (isDynamicForm) {
8995
+ return ({
8996
+ gridData: list.contents
8997
+ .map(function (item) { return (__assign(__assign({}, item), { label: _this.getLabelForMaping(item) })); }),
8998
+ totalRecords: list === null || list === void 0 ? void 0 : list.totalElements,
8999
+ });
9000
+ }
9001
+ else {
9002
+ return (__assign(__assign({}, list), { contents: list.contents.map(function (item) { return (__assign(__assign({}, item), { label: _this.getLabelForMaping(item) })); }) }));
9003
+ }
9004
+ };
9005
+ IrrfTaxationLookupService.prototype.getLabelForMaping = function (item) {
9006
+ var _this = this;
9007
+ return this.lookupServiceConfig.lookupDisplayFields
9008
+ .map(function (field) {
9009
+ if (field === "name" && !(item === null || item === void 0 ? void 0 : item.name)) {
9010
+ item.name = _this.translate
9011
+ .instant(_this.configService.getTranslationPrefix() + ".list_grid_empty_field");
9012
+ }
9013
+ if (field.indexOf(".") > 0) {
9014
+ return getProp(item, field);
9015
+ }
9016
+ return item[field];
9017
+ })
9018
+ .join(this.lookupServiceConfig.lookupSeparator);
9019
+ };
9020
+ IrrfTaxationLookupService.prototype.onIrrfTaxationLookupRequest = function (value) {
9021
+ var _this = this;
9022
+ var _a, _b;
9023
+ this.onIrrfTaxationLookupRequestObservable(value, (_b = (_a = this.lookupServiceConfig) === null || _a === void 0 ? void 0 : _a.filters) === null || _b === void 0 ? void 0 : _b.additionalFilter).subscribe(function (data) { return _this.lookupServiceConfig.lookupSubject.next(data.contents); });
9024
+ };
9025
+ IrrfTaxationLookupService.prototype.onIrrfTaxationLookupRequestObservable = function (value, additionalFilter, filter) {
9026
+ var _this = this;
9027
+ var sort = this.irrfTaxationDisplayFields.map(function (field) { return ({
9028
+ field: field,
9029
+ order: 1
9030
+ }); });
9031
+ var filterQuery = createLookupRequestFilter(value, this.getIrrfTaxationSearchFields());
9032
+ filterQuery = getFiltersForCustomDisplayFields(filterQuery, filter);
9033
+ var displayFields = mergeUnique(this.lookupServiceConfig.lookupDisplayFields, __spread(this.lookupServiceConfig.lookupDisplayFields));
9034
+ return this.irrfTaxationService
9035
+ .list({ sort: sort, filterQuery: filterQuery, displayFields: displayFields })
9036
+ .pipe(operators.takeUntil(this.ngUnsubscribe))
9037
+ .pipe(operators.map(function (list) { return _this.mapToComponent(list); }));
9038
+ };
9039
+ IrrfTaxationLookupService.prototype.getIrrfTaxationSearchFields = function (displayFields) {
9040
+ var fields = [
9041
+ new angularComponents.FormField({
9042
+ name: "irrfTaxationGroup.code",
9043
+ label: this.translate.instant(this.configService.getTranslationPrefix() + ".irrf_taxation_irrf_taxation_group_code"),
9044
+ type: angularComponents.FieldType.String,
9045
+ }),
9046
+ new angularComponents.FormField({
9047
+ name: "irrfTaxationGroup.description",
9048
+ label: this.translate.instant(this.configService.getTranslationPrefix() + ".irrf_taxation_irrf_taxation_group_description"),
9049
+ type: angularComponents.FieldType.String,
9050
+ }),
9051
+ new angularComponents.FormField({
9052
+ name: "code",
9053
+ label: this.translate.instant(this.configService.getTranslationPrefix() + ".irrf_taxation_code"),
9054
+ type: angularComponents.FieldType.String,
9055
+ }),
9056
+ new angularComponents.FormField({
9057
+ name: "description",
9058
+ label: this.translate.instant(this.configService.getTranslationPrefix() + ".irrf_taxation_description"),
9059
+ type: angularComponents.FieldType.String,
9060
+ })
9061
+ ];
9062
+ if (displayFields && displayFields.length > 0) {
9063
+ return displayFields
9064
+ .map(function (fieldName) { return fields.find(function (field) { return field.name === fieldName; }); })
9065
+ .filter(function (field) { return field !== undefined; });
9066
+ }
9067
+ return fields;
9068
+ };
9069
+ IrrfTaxationLookupService.ctorParameters = function () { return [
9070
+ { type: core$1.TranslateService },
9071
+ { type: EntityLookupConfigService },
9072
+ { type: IrrfTaxationService }
9073
+ ]; };
9074
+ IrrfTaxationLookupService = __decorate([
9075
+ core.Injectable()
9076
+ ], IrrfTaxationLookupService);
9077
+ return IrrfTaxationLookupService;
9078
+ }());
9079
+
9080
+ var IrrfTaxationLookupComponent = /** @class */ (function (_super) {
9081
+ __extends(IrrfTaxationLookupComponent, _super);
9082
+ function IrrfTaxationLookupComponent(translate, cdRef, configService, structerService, irrfTaxationLookupService) {
9083
+ var _this = _super.call(this, translate, cdRef, configService, structerService) || this;
9084
+ _this.translate = translate;
9085
+ _this.cdRef = cdRef;
9086
+ _this.configService = configService;
9087
+ _this.structerService = structerService;
9088
+ _this.irrfTaxationLookupService = irrfTaxationLookupService;
9089
+ _this.displayFields = ["irrfTaxationGroup.code", "irrfTaxationGroup.description", "code", "description"];
9090
+ _this.controlName = "irrfTaxation";
9091
+ _this.entity = "irrfTaxation";
9092
+ _this.domain = "tax_obligation";
9093
+ _this.service = "shared";
9094
+ _this.useDateValidation = false;
9095
+ return _this;
9096
+ }
9097
+ IrrfTaxationLookupComponent.prototype.ngOnInit = function () {
9098
+ this.irrfTaxationLookupService.setDisplayFields(this.displayFields);
9099
+ this.irrfTaxationSearchFields = this.irrfTaxationLookupService.getIrrfTaxationSearchFields(this.displayFields);
9100
+ this.irrfTaxationSearchGridFields = this.irrfTaxationLookupService.getIrrfTaxationSearchFields(this.displayFields);
9101
+ };
9102
+ IrrfTaxationLookupComponent.prototype.onIrrfTaxationLookupRequest = function (value) {
9103
+ var _this = this;
9104
+ this.irrfTaxationLookupService
9105
+ .onIrrfTaxationLookupRequestObservable(value, this.irrfTaxationLookupService.lookupServiceConfig.filters.additionalFilter, null)
9106
+ .subscribe(function (list) {
9107
+ _this.irrfTaxationSuggestions = list === null || list === void 0 ? void 0 : list.contents;
9108
+ });
9109
+ };
9110
+ IrrfTaxationLookupComponent.prototype.onIrrfTaxationSearchRequest = function (event) {
9111
+ var _this = this;
9112
+ this.irrfTaxationLookupService
9113
+ .onIrrfTaxationSearchRequestObservable(event, this.irrfTaxationLookupService.lookupServiceConfig.filters.additionalFilter, this.companyIds)
9114
+ .subscribe(function (list) {
9115
+ _this.irrfTaxationSearchGridData = list === null || list === void 0 ? void 0 : list.contents;
9116
+ _this.irrfTaxationSearchTotalRecords = list === null || list === void 0 ? void 0 : list.totalElements;
9117
+ });
9118
+ };
9119
+ IrrfTaxationLookupComponent.ctorParameters = function () { return [
9120
+ { type: core$1.TranslateService },
9121
+ { type: core.ChangeDetectorRef },
9122
+ { type: EntityLookupConfigService },
9123
+ { type: StructureFilterService },
9124
+ { type: IrrfTaxationLookupService }
9125
+ ]; };
9126
+ __decorate([
9127
+ core.Input()
9128
+ ], IrrfTaxationLookupComponent.prototype, "displayFields", void 0);
9129
+ IrrfTaxationLookupComponent = __decorate([
9130
+ core.Component({
9131
+ selector: "hcm-irrf-taxation-lookup",
9132
+ template: "<s-loading-state [loading]=\"loading\" [blockWindow]=\"true\"></s-loading-state>\n<form [formGroup]=\"formGroup\">\n <s-lookup dataKey=\"id\" id=\"irrfTaxation\" name=\"irrfTaxation\" [formControlName]=\"controlName\"\n [searchFields]=\"irrfTaxationSearchFields\"\n [searchGridFields]=\"irrfTaxationSearchGridFields\"\n [searchGridData]=\"irrfTaxationSearchGridData\"\n (onSelect)=\"selectOption($event)\"\n (onClear)=\"onClearItem($event)\"\n [multiple]=\"multiple\"\n [disabled]=\"isDisabled\"\n [lookupSuggestions]=\"irrfTaxationSuggestions\"\n (onLookupRequest)=\"onIrrfTaxationLookupRequest($event)\"\n (onSearchRequest)=\"onIrrfTaxationSearchRequest($event)\"\n lookupDisplayField=\"label\"\n [searchTotalRecords]=\"irrfTaxationSearchTotalRecords\"\n [searchTitle]=\"configService.getTranslationPrefix() \n + '.irrf_taxation_search_title' | translate\"\n [searchEmptyTitle]=\"configService.getTranslationPrefix()\n + '.nothing_found' | translate\" [filterLabel]=\"configService.getTranslationPrefix()\n + '.filter' | translate\" [filterTitle]=\"configService.getTranslationPrefix()\n + '.filters' | translate\" [clearLabel]=\"configService.getTranslationPrefix()\n + '.clear' | translate\" [cancelLabel]=\"configService.getTranslationPrefix()\n + '.cancel' | translate\" [selectLabel]=\"configService.getTranslationPrefix()\n + '.select' | translate\" [searchTotalRecordsLabel]=\"configService.getTranslationPrefix()\n + '.total_records' | translate: {value: irrfTaxationSearchTotalRecords}\"></s-lookup>\n</form>\n"
9133
+ })
9134
+ ], IrrfTaxationLookupComponent);
9135
+ return IrrfTaxationLookupComponent;
9136
+ }(BaseLookupComponent));
9137
+
9138
+ var IrrfTaxationLookupModule = /** @class */ (function () {
9139
+ function IrrfTaxationLookupModule() {
9140
+ }
9141
+ IrrfTaxationLookupModule = __decorate([
9142
+ core.NgModule({
9143
+ declarations: [
9144
+ IrrfTaxationLookupComponent,
9145
+ ],
9146
+ exports: [
9147
+ IrrfTaxationLookupComponent,
9148
+ ],
9149
+ imports: [
9150
+ SharedModule,
9151
+ angularComponents.LoadingStateModule,
9152
+ ],
9153
+ providers: [
9154
+ IrrfTaxationLookupService,
9155
+ IrrfTaxationService
9156
+ ],
9157
+ })
9158
+ ], IrrfTaxationLookupModule);
9159
+ return IrrfTaxationLookupModule;
9160
+ }());
9161
+
9162
+ var EntityLookupModule = /** @class */ (function () {
9163
+ function EntityLookupModule() {
9164
+ }
9165
+ EntityLookupModule_1 = EntityLookupModule;
9166
+ EntityLookupModule.forRoot = function (config) {
9167
+ return {
9168
+ ngModule: EntityLookupModule_1,
9169
+ providers: [
9170
+ {
9171
+ provide: ProjectConfigsInjectionToken,
9172
+ useValue: config
9173
+ }
9174
+ ]
9175
+ };
9176
+ };
9177
+ var EntityLookupModule_1;
9178
+ EntityLookupModule = EntityLookupModule_1 = __decorate([
9179
+ core.NgModule({
9180
+ providers: []
9181
+ })
9182
+ ], EntityLookupModule);
9183
+ return EntityLookupModule;
9184
+ }());
9185
+
9186
+ var fallback = {
9187
+ "hcm_contract.employment_additional_info.e_001_pes_cod": "Código",
9188
+ "hcm_contract.employment_additional_info.e_001_pes_nom": "Nome",
9189
+ "hcm_contract.employment_additional_info.e_001_pes_dat": "Data de nascimento",
9190
+ "hcm_contract.employment_additional_info.e_044_ccu_cod_ccu": "Código",
9191
+ "hcm_contract.employment_additional_info.e_044_ccu_des_ccu": "Descrição",
9192
+ "hcm_contract.employment_additional_info.e_070_fil_cod_fil": "Código",
9193
+ "hcm_contract.employment_additional_info.e_070_fil_nom_fil": "Nome",
9194
+ "hcm_contract.employment_additional_info.data_person_id_lookup_title": "Localizar a pessoa",
9195
+ "hcm_contract.employment_additional_info.cost_center_history_cost_center_search_title": "Localizar o centro de custo",
9196
+ "hcm_contract.employment_additional_info.employee_employer_cod_emp": "Código da empresa",
9197
+ "hcm_contract.employment_additional_info.employee_employment_relationship_contract_type": "Tipo de contrato",
9198
+ "hcm_contract.employment_additional_info.employee_person_nom_pes": "Nome do colaborador",
9199
+ "hcm_contract.employment_additional_info.company_branch_history_company_branch_search_title": "Localizar a filial",
9200
+ "hcm_contract.employment_additional_info.company_branch_history_employee_search_title": "Localizar o colaborador",
9201
+ "hcm_contract.employment_additional_info.employee": "Empregado",
9202
+ "hcm_contract.employment_additional_info.employee_code": "Código",
9203
+ "hcm_contract.employment_additional_info.employer_name": "Nome da empresa",
9204
+ "hcm_contract.employment_additional_info.position_acting_type_code": "Código",
9205
+ "hcm_contract.employment_additional_info.position_acting_type_name": "Descrição",
9206
+ "hcm_contract.employment_additional_info.position_history_position_code": "Código",
9207
+ "hcm_contract.employment_additional_info.position_history_position_name": "Descrição",
9208
+ "hcm_contract.employment_additional_info.location_code": "Código",
9209
+ "hcm_contract.employment_additional_info.location_name": "Descrição",
9210
+ "hcm_contract.employment_additional_info.filter": "Filtrar",
9211
+ "hcm_contract.employment_additional_info.filters": "Filtros",
9212
+ "hcm_contract.employment_additional_info.cancel": "Cancelar",
9213
+ "hcm_contract.employment_additional_info.clear": "Limpar",
9214
+ "hcm_contract.employment_additional_info.select": "Selecionar",
9215
+ "hcm_contract.employment_additional_info.nothing_found": "Nenhum registro encontrado",
9216
+ "hcm_contract.employment_additional_info.total_records": "{{value}} registro(s) encontrado(s)",
9217
+ "hcm_contract.employment_additional_info.error_unauthorized_title": "Não autorizado.",
9218
+ "hcm_contract.employment_additional_info.structure_empty_title": "Empresa sem estrutura de {{entity}}",
9219
+ "hcm_contract.employment_additional_info.structure_empty_message": "Você precisa cadastrar uma estrutura de {{entity}} na empresa selecionada, posterior ou igual a data {{startDate}}",
9220
+ "hcm_contract.employment_additional_info.employee_situation": "Situação",
9221
+ "hcm_contract.employment_additional_info.resignation_situation_type_working": "Trabalhando",
9222
+ "hcm_contract.employment_additional_info.resignation_situation_type_dismissed": "Desligado",
9223
+ "hcm_contract.employment_additional_info.resignation_situation_type_all": "Todos"
9224
+ };
9225
+
9226
+ var AnnotationTypeModule = /** @class */ (function () {
9227
+ function AnnotationTypeModule() {
9228
+ }
9229
+ AnnotationTypeModule = __decorate([
9230
+ core.NgModule({
9231
+ imports: [
9232
+ platformComponents.PermissionsModule.forChild([
9233
+ {
9234
+ name: "annotationType",
9235
+ actions: ["Visualizar", "Incluir", "Editar", "Excluir"],
9236
+ uri: "res://senior.com.br/hcm_foundation/general/entities/annotationType",
9237
+ },
9238
+ ]),
9239
+ ],
9240
+ providers: [
9241
+ AnnotationTypeService,
9242
+ ],
9243
+ declarations: [],
9244
+ exports: [],
9245
+ })
9246
+ ], AnnotationTypeModule);
9247
+ return AnnotationTypeModule;
9248
+ }());
9249
+
9250
+ var CalculationDefinitionModule = /** @class */ (function () {
9251
+ function CalculationDefinitionModule() {
9252
+ }
9253
+ CalculationDefinitionModule = __decorate([
9254
+ core.NgModule({
9255
+ imports: [
9256
+ platformComponents.PermissionsModule.forChild([
9257
+ {
9258
+ name: "calculationDefition",
9259
+ actions: ["Visualizar", "Incluir", "Editar", "Excluir"],
9260
+ uri: "res://senior.com.br/hcm_payroll_foundation/general/entities/calculationDefition",
9261
+ },
9262
+ ]),
9263
+ ],
9264
+ providers: [
9265
+ CalculationDefinitionService,
9266
+ ],
9267
+ declarations: [],
9268
+ exports: [],
9269
+ })
9270
+ ], CalculationDefinitionModule);
9271
+ return CalculationDefinitionModule;
9272
+ }());
9273
+
9274
+ var CompanyLinkedLocationModule = /** @class */ (function () {
9275
+ function CompanyLinkedLocationModule() {
9276
+ }
9277
+ CompanyLinkedLocationModule = __decorate([
9278
+ core.NgModule({
9279
+ declarations: [],
9280
+ exports: [],
9281
+ imports: [
9282
+ platformComponents.PermissionsModule.forChild([
9283
+ {
9284
+ actions: ["Visualizar", "Incluir", "Editar", "Excluir"],
9285
+ name: "companyLinkedLocation",
9286
+ uri: "res://senior.com.br/erpx_fnd/empresa/entities/companyLinkedLocation",
9287
+ },
9288
+ ]),
9289
+ ],
9290
+ providers: [
9291
+ CompanyLinkedLocationService,
9292
+ ],
9293
+ })
9294
+ ], CompanyLinkedLocationModule);
9295
+ return CompanyLinkedLocationModule;
9296
+ }());
9297
+
9298
+ var E001PesModule = /** @class */ (function () {
9299
+ function E001PesModule() {
9300
+ }
9301
+ E001PesModule = __decorate([
9302
+ core.NgModule({
9303
+ imports: [
9304
+ platformComponents.PermissionsModule.forChild([
9305
+ {
9306
+ name: "e001pes",
9307
+ actions: ["Visualizar", "Incluir", "Editar", "Excluir"],
9308
+ uri: "res://senior.com.br/erpx_fnd/pessoa/entities/e001pes",
9309
+ },
9310
+ ]),
9311
+ ],
9312
+ providers: [
9313
+ E001PesService,
9314
+ ],
9315
+ declarations: [],
9316
+ exports: [],
9317
+ })
9318
+ ], E001PesModule);
9319
+ return E001PesModule;
9320
+ }());
9321
+
9322
+ var projectInfo = {
9323
+ app: "gestao-pessoas",
9324
+ domain: "hcm_entity",
9325
+ service: "lookups",
9326
+ };
9327
+ var environment = {
9328
+ name: "@senior-gestao-pessoas/hcm-entity-lookups",
9329
+ project: projectInfo,
9330
+ production: false,
9331
+ ignorePermissions: false,
9332
+ };
9333
+
9334
+ /*{CA:PACKAGE_IMPORTS:START}*/
9335
+ /*{CA:PACKAGE_IMPORTS:END}*/
9336
+ /*{CA:PROJECT_IMPORTS:START}*/
9337
+ /*{CA:PROJECT_IMPORTS:END}*/
9338
+ var E030AgeService = /** @class */ (function (_super) {
9339
+ __extends(E030AgeService, _super);
9340
+ /*{CA:CLASS_ATTRIBUTES:START}*/
9341
+ /*{CA:CLASS_ATTRIBUTES:END}*/
9342
+ function E030AgeService(http, messageService, translate, configService) {
9343
+ var _this = _super.call(this, http, messageService, environment.project.domain + "/" + environment.project.service + "/entities/e030age", environment.project.domain + "/" + environment.project.service + "/actions", translate, configService) || this;
9344
+ _this.http = http;
9345
+ _this.messageService = messageService;
9346
+ _this.translate = translate;
9347
+ _this.configService = configService;
9348
+ return _this;
9349
+ /*{CA:CONSTRUCTOR_END:START}*/
9350
+ /*{CA:CONSTRUCTOR_END:END}*/
9351
+ }
9352
+ E030AgeService.prototype.listExternalE030Age = function (listParams) {
9353
+ return this.http
9354
+ .get("erpx_fnd/financeiro/entities/e030age", {
9355
+ params: this.getListQueryParams(listParams),
9356
+ })
9357
+ .pipe(this.defaultCatch());
9358
+ };
9359
+ E030AgeService.ctorParameters = function () { return [
9360
+ { type: http.HttpClient },
9361
+ { type: api.MessageService },
9362
+ { type: core$1.TranslateService },
9363
+ { type: EntityLookupConfigService }
9364
+ ]; };
9365
+ E030AgeService = __decorate([
9366
+ core.Injectable()
9367
+ ], E030AgeService);
9368
+ return E030AgeService;
9369
+ }(EntityService));
9370
+ /*{CA:FILE_CONTENTS:START}*/
9371
+ /*{CA:FILE_CONTENTS:END}*/
9372
+
9373
+ /*{CA:PACKAGE_IMPORTS:START}*/
9374
+ /*{CA:PACKAGE_IMPORTS:END}*/
9375
+ /*{CA:PROJECT_IMPORTS:START}*/
9376
+ /*{CA:PROJECT_IMPORTS:END}*/
9377
+ var E030AgeModule = /** @class */ (function () {
9378
+ function E030AgeModule() {
9379
+ }
9380
+ E030AgeModule = __decorate([
9381
+ core.NgModule({
9382
+ imports: [
9383
+ platformComponents.PermissionsModule.forChild([
9384
+ {
9385
+ name: "e030age",
9386
+ actions: ["Visualizar", "Incluir", "Editar", "Excluir"],
9387
+ uri: "res://senior.com.br/erpx_fnd/financeiro/entities/e030age",
9388
+ },
9389
+ ]),
9390
+ ],
9391
+ providers: [
9392
+ E030AgeService,
9393
+ ],
9394
+ declarations: [
9395
+ /*{CA:MODULE_DECLARATIONS:START}*/
9396
+ /*{CA:MODULE_DECLARATIONS:END}*/
9397
+ ],
9398
+ exports: [
9399
+ /*{CA:MODULE_EXPORTS:START}*/
9400
+ /*{CA:MODULE_EXPORTS:END}*/
9401
+ ],
9402
+ })
9403
+ ], E030AgeModule);
9404
+ return E030AgeModule;
9405
+ }());
9406
+ /*{CA:FILE_CONTENTS:START}*/
9407
+ /*{CA:FILE_CONTENTS:END}*/
9408
+
9409
+ /*{CA:PACKAGE_IMPORTS:START}*/
9410
+ /*{CA:PACKAGE_IMPORTS:END}*/
9411
+ /*{CA:PROJECT_IMPORTS:START}*/
9412
+ /*{CA:PROJECT_IMPORTS:END}*/
9413
+ var E030BanService = /** @class */ (function (_super) {
9414
+ __extends(E030BanService, _super);
9415
+ /*{CA:CLASS_ATTRIBUTES:START}*/
9416
+ /*{CA:CLASS_ATTRIBUTES:END}*/
9417
+ function E030BanService(http, messageService, translate, configService) {
9418
+ var _this = _super.call(this, http, messageService, environment.project.domain + "/" + environment.project.service + "/entities/e030ban", environment.project.domain + "/" + environment.project.service + "/actions", translate, configService) || this;
9419
+ _this.http = http;
9420
+ _this.messageService = messageService;
9421
+ _this.translate = translate;
9422
+ _this.configService = configService;
9423
+ return _this;
9424
+ /*{CA:CONSTRUCTOR_END:START}*/
9425
+ /*{CA:CONSTRUCTOR_END:END}*/
9426
+ }
9427
+ E030BanService.prototype.listExternalE030Ban = function (listParams) {
9428
+ return this.http
9429
+ .get("erpx_fnd/financeiro/entities/e030ban", {
9430
+ params: this.getListQueryParams(listParams),
9431
+ })
9432
+ .pipe(this.defaultCatch());
9433
+ };
9434
+ E030BanService.ctorParameters = function () { return [
9435
+ { type: http.HttpClient },
9436
+ { type: api.MessageService },
9437
+ { type: core$1.TranslateService },
9438
+ { type: EntityLookupConfigService }
9439
+ ]; };
9440
+ E030BanService = __decorate([
9441
+ core.Injectable()
9442
+ ], E030BanService);
9443
+ return E030BanService;
9444
+ }(EntityService));
9445
+ /*{CA:FILE_CONTENTS:START}*/
9446
+ /*{CA:FILE_CONTENTS:END}*/
9447
+
9448
+ /*{CA:PACKAGE_IMPORTS:START}*/
9449
+ /*{CA:PACKAGE_IMPORTS:END}*/
9450
+ /*{CA:PROJECT_IMPORTS:START}*/
9451
+ /*{CA:PROJECT_IMPORTS:END}*/
7583
9452
  var E030BanModule = /** @class */ (function () {
7584
9453
  function E030BanModule() {
7585
9454
  }
@@ -7767,6 +9636,28 @@
7767
9636
  return EmploymentRelationshipModule;
7768
9637
  }());
7769
9638
 
9639
+ var FpasRegistrationModule = /** @class */ (function () {
9640
+ function FpasRegistrationModule() {
9641
+ }
9642
+ FpasRegistrationModule = __decorate([
9643
+ core.NgModule({
9644
+ imports: [
9645
+ platformComponents.PermissionsModule.forChild([
9646
+ {
9647
+ name: 'fpasRegistration',
9648
+ actions: ['Visualizar', 'Incluir', 'Editar', 'Excluir'],
9649
+ uri: "res://senior.com.br/tax_obligation/shared/entities/fpasRegistration",
9650
+ },
9651
+ ]),
9652
+ ],
9653
+ providers: [
9654
+ FpasRegistrationService
9655
+ ]
9656
+ })
9657
+ ], FpasRegistrationModule);
9658
+ return FpasRegistrationModule;
9659
+ }());
9660
+
7770
9661
  /*{CA:PACKAGE_IMPORTS:START}*/
7771
9662
  /*{CA:PACKAGE_IMPORTS:END}*/
7772
9663
  /*{CA:PROJECT_IMPORTS:START}*/
@@ -7917,6 +9808,76 @@
7917
9808
  /*{CA:FILE_CONTENTS:START}*/
7918
9809
  /*{CA:FILE_CONTENTS:END}*/
7919
9810
 
9811
+ var InssTaxationGroupService = /** @class */ (function (_super) {
9812
+ __extends(InssTaxationGroupService, _super);
9813
+ function InssTaxationGroupService(http, messageService, translate, configService) {
9814
+ var _this = _super.call(this, http, messageService, "tax_obligation/shared/entities/inssTaxationGroup", "tax_obligation/shared/actions", translate, configService) || this;
9815
+ _this.http = http;
9816
+ _this.messageService = messageService;
9817
+ _this.translate = translate;
9818
+ _this.configService = configService;
9819
+ return _this;
9820
+ }
9821
+ InssTaxationGroupService.ctorParameters = function () { return [
9822
+ { type: http.HttpClient },
9823
+ { type: api.MessageService },
9824
+ { type: core$1.TranslateService },
9825
+ { type: EntityLookupConfigService }
9826
+ ]; };
9827
+ InssTaxationGroupService = __decorate([
9828
+ core.Injectable()
9829
+ ], InssTaxationGroupService);
9830
+ return InssTaxationGroupService;
9831
+ }(EntityService));
9832
+
9833
+ var InssTaxationGroupModule = /** @class */ (function () {
9834
+ function InssTaxationGroupModule() {
9835
+ }
9836
+ InssTaxationGroupModule = __decorate([
9837
+ core.NgModule({
9838
+ imports: [
9839
+ platformComponents.PermissionsModule.forChild([
9840
+ {
9841
+ name: "inssTaxationGroup",
9842
+ actions: ["Visualizar", "Incluir", "Editar", "Excluir"],
9843
+ uri: "res://senior.com.br/tax_obligation/shared/entities/inssTaxationGroup",
9844
+ },
9845
+ ]),
9846
+ ],
9847
+ providers: [
9848
+ InssTaxationGroupService,
9849
+ ],
9850
+ declarations: [],
9851
+ exports: [],
9852
+ })
9853
+ ], InssTaxationGroupModule);
9854
+ return InssTaxationGroupModule;
9855
+ }());
9856
+
9857
+ var InssTaxationModule = /** @class */ (function () {
9858
+ function InssTaxationModule() {
9859
+ }
9860
+ InssTaxationModule = __decorate([
9861
+ core.NgModule({
9862
+ imports: [
9863
+ platformComponents.PermissionsModule.forChild([
9864
+ {
9865
+ name: "inssTaxation",
9866
+ actions: ["Visualizar", "Incluir", "Editar", "Excluir"],
9867
+ uri: "res://senior.com.br/tax_obligation/shared/entities/inssTaxation",
9868
+ },
9869
+ ]),
9870
+ ],
9871
+ providers: [
9872
+ InssTaxationService,
9873
+ ],
9874
+ declarations: [],
9875
+ exports: [],
9876
+ })
9877
+ ], InssTaxationModule);
9878
+ return InssTaxationModule;
9879
+ }());
9880
+
7920
9881
  var JobPositionModule = /** @class */ (function () {
7921
9882
  function JobPositionModule() {
7922
9883
  }
@@ -8052,216 +10013,124 @@
8052
10013
  /*{CA:FILE_CONTENTS:START}*/
8053
10014
  /*{CA:FILE_CONTENTS:END}*/
8054
10015
 
8055
- /*{CA:PACKAGE_IMPORTS:START}*/
8056
- /*{CA:PACKAGE_IMPORTS:END}*/
8057
- /*{CA:PROJECT_IMPORTS:START}*/
8058
- /*{CA:PROJECT_IMPORTS:END}*/
8059
- var PositionActingTypeModule = /** @class */ (function () {
8060
- function PositionActingTypeModule() {
8061
- }
8062
- PositionActingTypeModule = __decorate([
8063
- core.NgModule({
8064
- imports: [
8065
- platformComponents.PermissionsModule.forChild([
8066
- {
8067
- name: "positionActingType",
8068
- actions: ["Visualizar", "Incluir", "Editar", "Excluir"],
8069
- uri: "res://senior.com.br/hcm_foundation/position/entities/positionActingType",
8070
- },
8071
- ]),
8072
- ],
8073
- providers: [
8074
- PositionActingTypeService,
8075
- ],
8076
- declarations: [
8077
- /*{CA:MODULE_DECLARATIONS:START}*/
8078
- /*{CA:MODULE_DECLARATIONS:END}*/
8079
- ],
8080
- exports: [
8081
- /*{CA:MODULE_EXPORTS:START}*/
8082
- /*{CA:MODULE_EXPORTS:END}*/
8083
- ],
8084
- })
8085
- ], PositionActingTypeModule);
8086
- return PositionActingTypeModule;
8087
- }());
8088
- /*{CA:FILE_CONTENTS:START}*/
8089
- /*{CA:FILE_CONTENTS:END}*/
8090
-
8091
- /*{CA:PACKAGE_IMPORTS:START}*/
8092
- /*{CA:PACKAGE_IMPORTS:END}*/
8093
- /*{CA:PROJECT_IMPORTS:START}*/
8094
- /*{CA:PROJECT_IMPORTS:END}*/
8095
- var PositionModule = /** @class */ (function () {
8096
- function PositionModule() {
8097
- }
8098
- PositionModule = __decorate([
8099
- core.NgModule({
8100
- imports: [
8101
- platformComponents.PermissionsModule.forChild([
8102
- {
8103
- name: "position",
8104
- actions: ["Visualizar", "Incluir", "Editar", "Excluir"],
8105
- uri: "res://senior.com.br/hcm_foundation/position/entities/position",
8106
- },
8107
- ]),
8108
- ],
8109
- providers: [
8110
- PositionService,
8111
- ],
8112
- declarations: [
8113
- /*{CA:MODULE_DECLARATIONS:START}*/
8114
- /*{CA:MODULE_DECLARATIONS:END}*/
8115
- ],
8116
- exports: [
8117
- /*{CA:MODULE_EXPORTS:START}*/
8118
- /*{CA:MODULE_EXPORTS:END}*/
8119
- ],
8120
- })
8121
- ], PositionModule);
8122
- return PositionModule;
8123
- }());
8124
- /*{CA:FILE_CONTENTS:START}*/
8125
- /*{CA:FILE_CONTENTS:END}*/
8126
-
8127
- var SyndicateModule = /** @class */ (function () {
8128
- function SyndicateModule() {
8129
- }
8130
- SyndicateModule = __decorate([
8131
- core.NgModule({
8132
- declarations: [],
8133
- exports: [],
8134
- imports: [
8135
- platformComponents.PermissionsModule.forChild([
8136
- {
8137
- actions: ["Visualizar", "Incluir", "Editar", "Excluir"],
8138
- name: "syndicate",
8139
- uri: "res://senior.com.br/hcm_foundation/general/entities/syndicate",
8140
- },
8141
- ]),
8142
- ],
8143
- providers: [
8144
- SyndicateService,
8145
- ],
8146
- })
8147
- ], SyndicateModule);
8148
- return SyndicateModule;
8149
- }());
8150
-
8151
- var WageTypeModule = /** @class */ (function () {
8152
- function WageTypeModule() {
10016
+ var NaturePayrollRubricaModule = /** @class */ (function () {
10017
+ function NaturePayrollRubricaModule() {
8153
10018
  }
8154
- WageTypeModule = __decorate([
10019
+ NaturePayrollRubricaModule = __decorate([
8155
10020
  core.NgModule({
8156
10021
  imports: [
8157
10022
  platformComponents.PermissionsModule.forChild([
8158
10023
  {
10024
+ name: "naturePayrollRubrica",
8159
10025
  actions: ["Visualizar", "Incluir", "Editar", "Excluir"],
8160
- name: "wageType",
8161
- uri: "res://senior.com.br/hcm_payroll_wage_type/general/entities/wageType",
10026
+ uri: "res://senior.com.br/tax_obligation/shared/entities/naturePayrollRubrica",
8162
10027
  },
8163
10028
  ]),
8164
10029
  ],
8165
10030
  providers: [
8166
- WageTypeService,
8167
- ],
8168
- })
8169
- ], WageTypeModule);
8170
- return WageTypeModule;
8171
- }());
8172
-
8173
- var WorkshiftGroupService = /** @class */ (function (_super) {
8174
- __extends(WorkshiftGroupService, _super);
8175
- function WorkshiftGroupService(http, messageService, configService, translate) {
8176
- var _this = _super.call(this, http, messageService, "hcm_foundation/work_schedule/entities/workshiftGroup", "hcm_foundation/work_schedule/actions", translate, configService) || this;
8177
- _this.http = http;
8178
- _this.messageService = messageService;
8179
- _this.configService = configService;
8180
- _this.translate = translate;
8181
- return _this;
8182
- }
8183
- WorkshiftGroupService.ctorParameters = function () { return [
8184
- { type: http.HttpClient },
8185
- { type: api.MessageService },
8186
- { type: EntityLookupConfigService },
8187
- { type: core$1.TranslateService }
8188
- ]; };
8189
- WorkshiftGroupService = __decorate([
8190
- core.Injectable()
8191
- ], WorkshiftGroupService);
8192
- return WorkshiftGroupService;
8193
- }(EntityService));
10031
+ NaturePayrollRubricaService,
10032
+ ],
10033
+ declarations: [],
10034
+ exports: [],
10035
+ })
10036
+ ], NaturePayrollRubricaModule);
10037
+ return NaturePayrollRubricaModule;
10038
+ }());
8194
10039
 
8195
- var WorkshiftGroupModule = /** @class */ (function () {
8196
- function WorkshiftGroupModule() {
10040
+ /*{CA:PACKAGE_IMPORTS:START}*/
10041
+ /*{CA:PACKAGE_IMPORTS:END}*/
10042
+ /*{CA:PROJECT_IMPORTS:START}*/
10043
+ /*{CA:PROJECT_IMPORTS:END}*/
10044
+ var PositionActingTypeModule = /** @class */ (function () {
10045
+ function PositionActingTypeModule() {
8197
10046
  }
8198
- WorkshiftGroupModule = __decorate([
10047
+ PositionActingTypeModule = __decorate([
8199
10048
  core.NgModule({
8200
- declarations: [],
8201
- exports: [],
8202
10049
  imports: [
8203
10050
  platformComponents.PermissionsModule.forChild([
8204
10051
  {
10052
+ name: "positionActingType",
8205
10053
  actions: ["Visualizar", "Incluir", "Editar", "Excluir"],
8206
- name: "workshiftGroup",
8207
- uri: "res://senior.com.br/hcm_foundation/work_schedule/entities/workshiftGroup",
10054
+ uri: "res://senior.com.br/hcm_foundation/position/entities/positionActingType",
8208
10055
  },
8209
10056
  ]),
8210
10057
  ],
8211
10058
  providers: [
8212
- WorkshiftGroupService,
10059
+ PositionActingTypeService,
10060
+ ],
10061
+ declarations: [
10062
+ /*{CA:MODULE_DECLARATIONS:START}*/
10063
+ /*{CA:MODULE_DECLARATIONS:END}*/
10064
+ ],
10065
+ exports: [
10066
+ /*{CA:MODULE_EXPORTS:START}*/
10067
+ /*{CA:MODULE_EXPORTS:END}*/
8213
10068
  ],
8214
10069
  })
8215
- ], WorkshiftGroupModule);
8216
- return WorkshiftGroupModule;
10070
+ ], PositionActingTypeModule);
10071
+ return PositionActingTypeModule;
8217
10072
  }());
10073
+ /*{CA:FILE_CONTENTS:START}*/
10074
+ /*{CA:FILE_CONTENTS:END}*/
8218
10075
 
8219
- var WorkshiftModule = /** @class */ (function () {
8220
- function WorkshiftModule() {
10076
+ /*{CA:PACKAGE_IMPORTS:START}*/
10077
+ /*{CA:PACKAGE_IMPORTS:END}*/
10078
+ /*{CA:PROJECT_IMPORTS:START}*/
10079
+ /*{CA:PROJECT_IMPORTS:END}*/
10080
+ var PositionModule = /** @class */ (function () {
10081
+ function PositionModule() {
8221
10082
  }
8222
- WorkshiftModule = __decorate([
10083
+ PositionModule = __decorate([
8223
10084
  core.NgModule({
8224
- declarations: [],
8225
- exports: [],
8226
10085
  imports: [
8227
10086
  platformComponents.PermissionsModule.forChild([
8228
10087
  {
10088
+ name: "position",
8229
10089
  actions: ["Visualizar", "Incluir", "Editar", "Excluir"],
8230
- name: "workshift",
8231
- uri: "res://senior.com.br/hcm_foundation/work_schedule/entities/workshift",
10090
+ uri: "res://senior.com.br/hcm_foundation/position/entities/position",
8232
10091
  },
8233
10092
  ]),
8234
10093
  ],
8235
10094
  providers: [
8236
- WorkshiftService,
10095
+ PositionService,
10096
+ ],
10097
+ declarations: [
10098
+ /*{CA:MODULE_DECLARATIONS:START}*/
10099
+ /*{CA:MODULE_DECLARATIONS:END}*/
10100
+ ],
10101
+ exports: [
10102
+ /*{CA:MODULE_EXPORTS:START}*/
10103
+ /*{CA:MODULE_EXPORTS:END}*/
8237
10104
  ],
8238
10105
  })
8239
- ], WorkshiftModule);
8240
- return WorkshiftModule;
10106
+ ], PositionModule);
10107
+ return PositionModule;
8241
10108
  }());
10109
+ /*{CA:FILE_CONTENTS:START}*/
10110
+ /*{CA:FILE_CONTENTS:END}*/
8242
10111
 
8243
- var AnnotationTypeModule = /** @class */ (function () {
8244
- function AnnotationTypeModule() {
10112
+ var SyndicateModule = /** @class */ (function () {
10113
+ function SyndicateModule() {
8245
10114
  }
8246
- AnnotationTypeModule = __decorate([
10115
+ SyndicateModule = __decorate([
8247
10116
  core.NgModule({
10117
+ declarations: [],
10118
+ exports: [],
8248
10119
  imports: [
8249
10120
  platformComponents.PermissionsModule.forChild([
8250
10121
  {
8251
- name: "annotationType",
8252
10122
  actions: ["Visualizar", "Incluir", "Editar", "Excluir"],
8253
- uri: "res://senior.com.br/hcm_foundation/general/entities/annotationType",
10123
+ name: "syndicate",
10124
+ uri: "res://senior.com.br/hcm_foundation/general/entities/syndicate",
8254
10125
  },
8255
10126
  ]),
8256
10127
  ],
8257
10128
  providers: [
8258
- AnnotationTypeService,
10129
+ SyndicateService,
8259
10130
  ],
8260
- declarations: [],
8261
- exports: [],
8262
10131
  })
8263
- ], AnnotationTypeModule);
8264
- return AnnotationTypeModule;
10132
+ ], SyndicateModule);
10133
+ return SyndicateModule;
8265
10134
  }());
8266
10135
 
8267
10136
  var VariableEntryModule = /** @class */ (function () {
@@ -8288,56 +10157,76 @@
8288
10157
  return VariableEntryModule;
8289
10158
  }());
8290
10159
 
8291
- var CalculationDefinitionModule = /** @class */ (function () {
8292
- function CalculationDefinitionModule() {
10160
+ var WageTypePayrollModule = /** @class */ (function () {
10161
+ function WageTypePayrollModule() {
8293
10162
  }
8294
- CalculationDefinitionModule = __decorate([
10163
+ WageTypePayrollModule = __decorate([
8295
10164
  core.NgModule({
8296
10165
  imports: [
8297
10166
  platformComponents.PermissionsModule.forChild([
8298
10167
  {
8299
- name: "calculationDefition",
10168
+ name: "wageTypePayroll",
8300
10169
  actions: ["Visualizar", "Incluir", "Editar", "Excluir"],
8301
- uri: "res://senior.com.br/hcm_payroll_foundation/general/entities/calculationDefition",
10170
+ uri: "res://senior.com.br/hcm_payroll_wage_type/general/entities/wageTypePayroll",
8302
10171
  },
8303
10172
  ]),
8304
10173
  ],
8305
10174
  providers: [
8306
- CalculationDefinitionService,
10175
+ WageTypePayrollService,
8307
10176
  ],
8308
- declarations: [],
8309
- exports: [],
8310
10177
  })
8311
- ], CalculationDefinitionModule);
8312
- return CalculationDefinitionModule;
10178
+ ], WageTypePayrollModule);
10179
+ return WageTypePayrollModule;
8313
10180
  }());
8314
10181
 
8315
- var WageTypePayrollModule = /** @class */ (function () {
8316
- function WageTypePayrollModule() {
10182
+ var WageTypeModule = /** @class */ (function () {
10183
+ function WageTypeModule() {
8317
10184
  }
8318
- WageTypePayrollModule = __decorate([
10185
+ WageTypeModule = __decorate([
8319
10186
  core.NgModule({
8320
10187
  imports: [
8321
10188
  platformComponents.PermissionsModule.forChild([
8322
10189
  {
8323
- name: "wageTypePayroll",
8324
10190
  actions: ["Visualizar", "Incluir", "Editar", "Excluir"],
8325
- uri: "res://senior.com.br/hcm_payroll_wage_type/general/entities/wageTypePayroll",
10191
+ name: "wageType",
10192
+ uri: "res://senior.com.br/hcm_payroll_wage_type/general/entities/wageType",
8326
10193
  },
8327
10194
  ]),
8328
10195
  ],
8329
10196
  providers: [
8330
- WageTypePayrollService,
10197
+ WageTypeService,
8331
10198
  ],
8332
10199
  })
8333
- ], WageTypePayrollModule);
8334
- return WageTypePayrollModule;
10200
+ ], WageTypeModule);
10201
+ return WageTypeModule;
8335
10202
  }());
8336
10203
 
8337
- var CompanyLinkedLocationModule = /** @class */ (function () {
8338
- function CompanyLinkedLocationModule() {
10204
+ var WorkshiftGroupService = /** @class */ (function (_super) {
10205
+ __extends(WorkshiftGroupService, _super);
10206
+ function WorkshiftGroupService(http, messageService, configService, translate) {
10207
+ var _this = _super.call(this, http, messageService, "hcm_foundation/work_schedule/entities/workshiftGroup", "hcm_foundation/work_schedule/actions", translate, configService) || this;
10208
+ _this.http = http;
10209
+ _this.messageService = messageService;
10210
+ _this.configService = configService;
10211
+ _this.translate = translate;
10212
+ return _this;
8339
10213
  }
8340
- CompanyLinkedLocationModule = __decorate([
10214
+ WorkshiftGroupService.ctorParameters = function () { return [
10215
+ { type: http.HttpClient },
10216
+ { type: api.MessageService },
10217
+ { type: EntityLookupConfigService },
10218
+ { type: core$1.TranslateService }
10219
+ ]; };
10220
+ WorkshiftGroupService = __decorate([
10221
+ core.Injectable()
10222
+ ], WorkshiftGroupService);
10223
+ return WorkshiftGroupService;
10224
+ }(EntityService));
10225
+
10226
+ var WorkshiftGroupModule = /** @class */ (function () {
10227
+ function WorkshiftGroupModule() {
10228
+ }
10229
+ WorkshiftGroupModule = __decorate([
8341
10230
  core.NgModule({
8342
10231
  declarations: [],
8343
10232
  exports: [],
@@ -8345,39 +10234,41 @@
8345
10234
  platformComponents.PermissionsModule.forChild([
8346
10235
  {
8347
10236
  actions: ["Visualizar", "Incluir", "Editar", "Excluir"],
8348
- name: "companyLinkedLocation",
8349
- uri: "res://senior.com.br/erpx_fnd/empresa/entities/companyLinkedLocation",
10237
+ name: "workshiftGroup",
10238
+ uri: "res://senior.com.br/hcm_foundation/work_schedule/entities/workshiftGroup",
8350
10239
  },
8351
10240
  ]),
8352
10241
  ],
8353
10242
  providers: [
8354
- CompanyLinkedLocationService,
10243
+ WorkshiftGroupService,
8355
10244
  ],
8356
10245
  })
8357
- ], CompanyLinkedLocationModule);
8358
- return CompanyLinkedLocationModule;
10246
+ ], WorkshiftGroupModule);
10247
+ return WorkshiftGroupModule;
8359
10248
  }());
8360
10249
 
8361
- var FpasRegistrationModule = /** @class */ (function () {
8362
- function FpasRegistrationModule() {
10250
+ var WorkshiftModule = /** @class */ (function () {
10251
+ function WorkshiftModule() {
8363
10252
  }
8364
- FpasRegistrationModule = __decorate([
10253
+ WorkshiftModule = __decorate([
8365
10254
  core.NgModule({
10255
+ declarations: [],
10256
+ exports: [],
8366
10257
  imports: [
8367
10258
  platformComponents.PermissionsModule.forChild([
8368
10259
  {
8369
- name: 'fpasRegistration',
8370
- actions: ['Visualizar', 'Incluir', 'Editar', 'Excluir'],
8371
- uri: "res://senior.com.br/tax_obligation/shared/entities/fpasRegistration",
10260
+ actions: ["Visualizar", "Incluir", "Editar", "Excluir"],
10261
+ name: "workshift",
10262
+ uri: "res://senior.com.br/hcm_foundation/work_schedule/entities/workshift",
8372
10263
  },
8373
10264
  ]),
8374
10265
  ],
8375
10266
  providers: [
8376
- FpasRegistrationService
8377
- ]
10267
+ WorkshiftService,
10268
+ ],
8378
10269
  })
8379
- ], FpasRegistrationModule);
8380
- return FpasRegistrationModule;
10270
+ ], WorkshiftModule);
10271
+ return WorkshiftModule;
8381
10272
  }());
8382
10273
 
8383
10274
  var CoreLookupModule = /** @class */ (function () {
@@ -8410,7 +10301,10 @@
8410
10301
  EmploymentRelationshipModule,
8411
10302
  WageTypePayrollModule,
8412
10303
  CompanyLinkedLocationModule,
8413
- FpasRegistrationModule
10304
+ FpasRegistrationModule,
10305
+ NaturePayrollRubricaModule,
10306
+ InssTaxationModule,
10307
+ InssTaxationGroupModule
8414
10308
  ],
8415
10309
  })
8416
10310
  ], CoreLookupModule);
@@ -9240,10 +11134,11 @@
9240
11134
  model.createdDate = model.createdDate && moment$k(model.createdDate).toDate();
9241
11135
  model.lastModifiedDate = model.lastModifiedDate && moment$k(model.lastModifiedDate).toDate();
9242
11136
  var lookupSeparator = " - ";
9243
- var displayFields = [
9244
- "description",
9245
- ];
9246
- model.label = displayFields.map(function (field) { return model[field]; }).join(lookupSeparator);
11137
+ var displayFields = ["description", "XTCharacteristicCode"];
11138
+ var values = displayFields
11139
+ .map(function (field) { return model[field]; })
11140
+ .filter(function (value) { return value != null && value !== ""; });
11141
+ model.label = values.length > 1 ? values.join(lookupSeparator) : values[0] || "";
9247
11142
  return model;
9248
11143
  };
9249
11144
  Characteristics.toDto = function (characteristics, originEntity) {
@@ -9256,28 +11151,6 @@
9256
11151
  return Characteristics;
9257
11152
  }());
9258
11153
 
9259
- var CharacteristicsService = /** @class */ (function (_super) {
9260
- __extends(CharacteristicsService, _super);
9261
- function CharacteristicsService(http, messageService, translate, configService) {
9262
- var _this = _super.call(this, http, messageService, "hcm_payroll/shared/entities/characteristics", "hcm_payroll/shared/actions", translate, configService) || this;
9263
- _this.http = http;
9264
- _this.messageService = messageService;
9265
- _this.translate = translate;
9266
- _this.configService = configService;
9267
- return _this;
9268
- }
9269
- CharacteristicsService.ctorParameters = function () { return [
9270
- { type: http.HttpClient },
9271
- { type: api.MessageService },
9272
- { type: core$1.TranslateService },
9273
- { type: EntityLookupConfigService }
9274
- ]; };
9275
- CharacteristicsService = __decorate([
9276
- core.Injectable()
9277
- ], CharacteristicsService);
9278
- return CharacteristicsService;
9279
- }(EntityService));
9280
-
9281
11154
  var Rules = /** @class */ (function () {
9282
11155
  function Rules() {
9283
11156
  this.deleted = false;
@@ -9301,35 +11174,6 @@
9301
11174
  return Rules;
9302
11175
  }());
9303
11176
 
9304
- var RulesService = /** @class */ (function (_super) {
9305
- __extends(RulesService, _super);
9306
- function RulesService(http, messageService, translate, configService) {
9307
- var _this = _super.call(this, http, messageService, "hcm_payroll/shared/entities/rules", "hcm_payroll/shared/actions", translate, configService) || this;
9308
- _this.http = http;
9309
- _this.messageService = messageService;
9310
- _this.translate = translate;
9311
- _this.configService = configService;
9312
- return _this;
9313
- }
9314
- RulesService.prototype.listExternalRules = function (listParams) {
9315
- return this.http
9316
- .get("hcm_payroll/shared/entities/rules", {
9317
- params: this.getListQueryParams(listParams),
9318
- })
9319
- .pipe(this.defaultCatch());
9320
- };
9321
- RulesService.ctorParameters = function () { return [
9322
- { type: http.HttpClient },
9323
- { type: api.MessageService },
9324
- { type: core$1.TranslateService },
9325
- { type: EntityLookupConfigService }
9326
- ]; };
9327
- RulesService = __decorate([
9328
- core.Injectable()
9329
- ], RulesService);
9330
- return RulesService;
9331
- }(EntityService));
9332
-
9333
11177
  var ESocialCategory = /** @class */ (function () {
9334
11178
  function ESocialCategory() {
9335
11179
  }
@@ -9409,6 +11253,47 @@
9409
11253
  return CompanyLinkedLocation;
9410
11254
  }());
9411
11255
 
11256
+ var NaturePayrollRubrica = /** @class */ (function () {
11257
+ function NaturePayrollRubrica() {
11258
+ }
11259
+ NaturePayrollRubrica.fromDto = function (naturePayrollRubricaDto, originEntity) {
11260
+ var model = __assign({}, naturePayrollRubricaDto);
11261
+ model.startDate = model.startDate && moment$k(model.startDate).toDate();
11262
+ model.endDate = model.endDate && moment$k(model.endDate).toDate();
11263
+ var lookupSeparator = " - ";
11264
+ var displayFields = ["id", "code", "name", "startDate", "endDate"];
11265
+ model.label = displayFields.map(function (field) { return model[field]; }).join(lookupSeparator);
11266
+ return model;
11267
+ };
11268
+ NaturePayrollRubrica.toDto = function (naturePayrollRubrica, originEntity) {
11269
+ var dto = __assign({}, naturePayrollRubrica);
11270
+ dto.startDate = dto.startDate && moment$k(dto.startDate).format("YYYY-MM-DD");
11271
+ dto.endDate = dto.endDate && moment$k(dto.endDate).format("YYYY-MM-DD");
11272
+ delete dto.label;
11273
+ return dto;
11274
+ };
11275
+ return NaturePayrollRubrica;
11276
+ }());
11277
+
11278
+ var InssTaxationGroup = /** @class */ (function () {
11279
+ function InssTaxationGroup() {
11280
+ this.calculateBase = false;
11281
+ }
11282
+ InssTaxationGroup.fromDto = function (inssTaxationGroupDto, originEntity) {
11283
+ var model = __assign({}, inssTaxationGroupDto);
11284
+ var lookupSeparator = " - ";
11285
+ var displayFields = ["id", "code", "description", "calculateBase"];
11286
+ model.label = displayFields.map(function (field) { return model[field]; }).join(lookupSeparator);
11287
+ return model;
11288
+ };
11289
+ InssTaxationGroup.toDto = function (inssTaxationGroup, originEntity) {
11290
+ var dto = __assign({}, inssTaxationGroup);
11291
+ delete dto.label;
11292
+ return dto;
11293
+ };
11294
+ return InssTaxationGroup;
11295
+ }());
11296
+
9412
11297
  exports.AdministrativeJudicialCase = AdministrativeJudicialCase;
9413
11298
  exports.AdministrativeJudicialCaseLookupComponent = AdministrativeJudicialCaseLookupComponent;
9414
11299
  exports.AdministrativeJudicialCaseLookupModule = AdministrativeJudicialCaseLookupModule;
@@ -9427,6 +11312,9 @@
9427
11312
  exports.CalculationDefinitionLookupService = CalculationDefinitionLookupService;
9428
11313
  exports.CalculationDefinitionService = CalculationDefinitionService;
9429
11314
  exports.Characteristics = Characteristics;
11315
+ exports.CharacteristicsLookupComponent = CharacteristicsLookupComponent;
11316
+ exports.CharacteristicsLookupModule = CharacteristicsLookupModule;
11317
+ exports.CharacteristicsLookupService = CharacteristicsLookupService;
9430
11318
  exports.CharacteristicsService = CharacteristicsService;
9431
11319
  exports.CollectiveHistoryFiltersService = CollectiveHistoryFiltersService;
9432
11320
  exports.CompanyBranchLookupModule = CompanyBranchLookupModule;
@@ -9472,12 +11360,23 @@
9472
11360
  exports.EmploymentRelationshipService = EmploymentRelationshipService;
9473
11361
  exports.EntityLookupConfigService = EntityLookupConfigService;
9474
11362
  exports.EntityLookupModule = EntityLookupModule;
11363
+ exports.FgtsTaxationLookupComponent = FgtsTaxationLookupComponent;
11364
+ exports.FgtsTaxationLookupModule = FgtsTaxationLookupModule;
11365
+ exports.FgtsTaxationLookupService = FgtsTaxationLookupService;
9475
11366
  exports.FpasRegistrationLookupModule = FpasRegistrationLookupModule;
9476
11367
  exports.FpasRegistrationLookupService = FpasRegistrationLookupService;
9477
11368
  exports.Holiday = Holiday;
9478
11369
  exports.HolidayGroup = HolidayGroup;
9479
11370
  exports.HolidayGroupService = HolidayGroupService;
9480
11371
  exports.HolidayService = HolidayService;
11372
+ exports.InssTaxationGroup = InssTaxationGroup;
11373
+ exports.InssTaxationGroupService = InssTaxationGroupService;
11374
+ exports.InssTaxationLookupComponent = InssTaxationLookupComponent;
11375
+ exports.InssTaxationLookupModule = InssTaxationLookupModule;
11376
+ exports.InssTaxationLookupService = InssTaxationLookupService;
11377
+ exports.IrrfTaxationLookupComponent = IrrfTaxationLookupComponent;
11378
+ exports.IrrfTaxationLookupModule = IrrfTaxationLookupModule;
11379
+ exports.IrrfTaxationLookupService = IrrfTaxationLookupService;
9481
11380
  exports.JobPosition = JobPosition;
9482
11381
  exports.JobPositionLookupComponent = JobPositionLookupComponent;
9483
11382
  exports.JobPositionLookupModule = JobPositionLookupModule;
@@ -9488,6 +11387,11 @@
9488
11387
  exports.LocationLookupModule = LocationLookupModule;
9489
11388
  exports.LocationLookupService = LocationLookupService;
9490
11389
  exports.LocationService = LocationService;
11390
+ exports.NaturePayrollRubrica = NaturePayrollRubrica;
11391
+ exports.NaturePayrollRubricaLookupComponent = NaturePayrollRubricaLookupComponent;
11392
+ exports.NaturePayrollRubricaLookupModule = NaturePayrollRubricaLookupModule;
11393
+ exports.NaturePayrollRubricaLookupService = NaturePayrollRubricaLookupService;
11394
+ exports.NaturePayrollRubricaService = NaturePayrollRubricaService;
9491
11395
  exports.PersonLookupModule = PersonLookupModule;
9492
11396
  exports.PersonLookupService = PersonLookupService;
9493
11397
  exports.PisPasepTaxationLookupComponent = PisPasepTaxationLookupComponent;
@@ -9505,6 +11409,9 @@
9505
11409
  exports.PositionService = PositionService;
9506
11410
  exports.ProjectConfigsInjectionToken = ProjectConfigsInjectionToken;
9507
11411
  exports.Rules = Rules;
11412
+ exports.RulesLookupComponent = RulesLookupComponent;
11413
+ exports.RulesLookupModule = RulesLookupModule;
11414
+ exports.RulesLookupService = RulesLookupService;
9508
11415
  exports.RulesService = RulesService;
9509
11416
  exports.StructureFilterService = StructureFilterService;
9510
11417
  exports.Syndicate = Syndicate;
@@ -9536,37 +11443,43 @@
9536
11443
  exports.fallback = fallback;
9537
11444
  exports.ɵa = PisPasepTaxationService;
9538
11445
  exports.ɵb = EntityService;
9539
- exports.ɵba = SyndicateModule;
9540
- exports.ɵbb = VariableEntryModule;
9541
- exports.ɵbc = CalculationDefinitionModule;
9542
- exports.ɵbd = EmploymentRelationshipModule;
9543
- exports.ɵbe = WageTypePayrollModule;
9544
- exports.ɵbf = CompanyLinkedLocationModule;
9545
- exports.ɵbg = FpasRegistrationModule;
11446
+ exports.ɵba = WorkshiftGroupModule;
11447
+ exports.ɵbb = WageTypeModule;
11448
+ exports.ɵbc = AnnotationTypeModule;
11449
+ exports.ɵbd = SyndicateModule;
11450
+ exports.ɵbe = VariableEntryModule;
11451
+ exports.ɵbf = CalculationDefinitionModule;
11452
+ exports.ɵbg = EmploymentRelationshipModule;
11453
+ exports.ɵbh = WageTypePayrollModule;
11454
+ exports.ɵbi = CompanyLinkedLocationModule;
11455
+ exports.ɵbj = FpasRegistrationModule;
11456
+ exports.ɵbk = NaturePayrollRubricaModule;
11457
+ exports.ɵbl = InssTaxationModule;
11458
+ exports.ɵbm = InssTaxationGroupModule;
9546
11459
  exports.ɵc = SharedModule;
9547
11460
  exports.ɵd = CompanyBranchLookupComponent;
9548
11461
  exports.ɵe = PersonLookupComponent;
9549
11462
  exports.ɵf = FpasRegistrationLookupComponent;
9550
11463
  exports.ɵg = FpasRegistrationService;
9551
- exports.ɵh = E030AgeModule;
9552
- exports.ɵi = E030BanModule;
9553
- exports.ɵj = E044CcuModule;
9554
- exports.ɵk = E070EmpModule;
9555
- exports.ɵl = E070FilModule;
9556
- exports.ɵm = HolidayModule;
9557
- exports.ɵn = HolidayGroupModule;
9558
- exports.ɵo = LocationModule;
9559
- exports.ɵp = LocationStructureModule;
9560
- exports.ɵq = LocationStructureService;
9561
- exports.ɵr = PositionActingTypeModule;
9562
- exports.ɵs = PositionModule;
9563
- exports.ɵt = E001PesModule;
9564
- exports.ɵu = EmployeeModule;
9565
- exports.ɵv = JobPositionModule;
9566
- exports.ɵw = WorkshiftModule;
9567
- exports.ɵx = WorkshiftGroupModule;
9568
- exports.ɵy = WageTypeModule;
9569
- exports.ɵz = AnnotationTypeModule;
11464
+ exports.ɵh = FgtsTaxationService;
11465
+ exports.ɵi = InssTaxationService;
11466
+ exports.ɵj = IrrfTaxationService;
11467
+ exports.ɵk = E030AgeModule;
11468
+ exports.ɵl = E030BanModule;
11469
+ exports.ɵm = E044CcuModule;
11470
+ exports.ɵn = E070EmpModule;
11471
+ exports.ɵo = E070FilModule;
11472
+ exports.ɵp = HolidayModule;
11473
+ exports.ɵq = HolidayGroupModule;
11474
+ exports.ɵr = LocationModule;
11475
+ exports.ɵs = LocationStructureModule;
11476
+ exports.ɵt = LocationStructureService;
11477
+ exports.ɵu = PositionActingTypeModule;
11478
+ exports.ɵv = PositionModule;
11479
+ exports.ɵw = E001PesModule;
11480
+ exports.ɵx = EmployeeModule;
11481
+ exports.ɵy = JobPositionModule;
11482
+ exports.ɵz = WorkshiftModule;
9570
11483
 
9571
11484
  Object.defineProperty(exports, '__esModule', { value: true });
9572
11485