@senior-gestao-pessoas/hcm-entity-lookups 4.1.1-develop-09a9d1da → 4.1.2-develop-652f766c

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.
@@ -6831,18 +6831,8 @@
6831
6831
  return item[field];
6832
6832
  }).join(_this.administrativeJudicialCaseLookupSeparator) })); }) })); }));
6833
6833
  };
6834
- AdministrativeJudicialCaseLookupService.prototype.getAdministrativeJudicialCaseSearchFields = function (caseClassificationType) {
6834
+ AdministrativeJudicialCaseLookupService.prototype.getAdministrativeJudicialCaseSearchFields = function (caseClassificationType, companyIds) {
6835
6835
  var searchFields = [
6836
- new angularComponents.FormField({
6837
- label: this.translate.instant(this.configService.getTranslationPrefix() + ".administrative_judicial_case_cod_emp"),
6838
- name: "company.codEmp",
6839
- type: angularComponents.FieldType.Integer,
6840
- }),
6841
- new angularComponents.FormField({
6842
- label: this.translate.instant(this.configService.getTranslationPrefix() + ".administrative_judicial_case_nom_emp"),
6843
- name: "company.nomEmp",
6844
- type: angularComponents.FieldType.String,
6845
- }),
6846
6836
  new angularComponents.FormField({
6847
6837
  type: angularComponents.FieldType.Enum,
6848
6838
  name: "caseType",
@@ -6857,7 +6847,21 @@
6857
6847
  label: this.translate.instant(this.configService.getTranslationPrefix() + ".administrative_judicial_case_case_number"),
6858
6848
  })
6859
6849
  ];
6860
- if (caseClassificationType) {
6850
+ if (!companyIds || companyIds.length === 0) {
6851
+ searchFields.unshift.apply(searchFields, __spread([
6852
+ new angularComponents.FormField({
6853
+ label: this.translate.instant(this.configService.getTranslationPrefix() + ".administrative_judicial_case_cod_emp"),
6854
+ name: "company.codEmp",
6855
+ type: angularComponents.FieldType.Integer,
6856
+ }),
6857
+ new angularComponents.FormField({
6858
+ label: this.translate.instant(this.configService.getTranslationPrefix() + ".administrative_judicial_case_nom_emp"),
6859
+ name: "company.nomEmp",
6860
+ type: angularComponents.FieldType.String,
6861
+ })
6862
+ ]));
6863
+ }
6864
+ if (!caseClassificationType) {
6861
6865
  searchFields.push(new angularComponents.FormField({
6862
6866
  type: angularComponents.FieldType.Enum,
6863
6867
  name: "caseClassificationType",
@@ -6897,11 +6901,18 @@
6897
6901
  return _this;
6898
6902
  }
6899
6903
  AdministrativeJudicialCaseLookupComponent.prototype.ngOnInit = function () {
6900
- this.administrativeJudicialCaseSearchFields = this.administrativeJudicialCaseLookupService.getAdministrativeJudicialCaseSearchFields(this.caseClassificationType);
6901
- this.administrativeJudicialCaseSearchGridFields = this.administrativeJudicialCaseLookupService.getAdministrativeJudicialCaseSearchFields(this.caseClassificationType);
6904
+ this.administrativeJudicialCaseSearchFields = this.administrativeJudicialCaseLookupService
6905
+ .getAdministrativeJudicialCaseSearchFields(this.caseClassificationType, this.companyIds);
6906
+ this.administrativeJudicialCaseSearchGridFields = this.administrativeJudicialCaseLookupService
6907
+ .getAdministrativeJudicialCaseSearchFields(this.caseClassificationType, this.companyIds);
6908
+ var filters = [];
6902
6909
  if (this.caseClassificationType) {
6903
- this.initialFilter = "caseClassificationType eq '" + this.caseClassificationType + "'";
6910
+ filters.push("caseClassificationType eq '" + this.caseClassificationType + "'");
6911
+ }
6912
+ if (this.companyIds && this.companyIds.length > 0) {
6913
+ filters.push("company in (" + this.companyIds.map(function (id) { return "'" + id + "'"; }).join(",") + ")");
6904
6914
  }
6915
+ this.initialFilter = filters.join(" and ");
6905
6916
  };
6906
6917
  AdministrativeJudicialCaseLookupComponent.prototype.onAdministrativeJudicialCaseLookupRequest = function (value) {
6907
6918
  var _this = this;