@hitsoft/e-donusum 1.0.14 → 1.0.15

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.
@@ -6703,6 +6703,7 @@ class HitParamsIntegratorComponent {
6703
6703
  });
6704
6704
  }
6705
6705
  async submitForm() {
6706
+ debugger;
6706
6707
  if (this.formParamsIntegrator.invalid) {
6707
6708
  window.scroll({
6708
6709
  top: 0,
@@ -6737,7 +6738,7 @@ class HitParamsIntegratorComponent {
6737
6738
  }), tap$1(() => { }))
6738
6739
  .subscribe(async () => {
6739
6740
  // this.toasterService.success('eDonusum::TransactionSuccessful');
6740
- await this.getParamsIntegrator(false, this.paramsIntegratorDtoWithNavigationPropertiesDto.branch
6741
+ await this.getParamsIntegrator(false, this.paramsIntegratorDtoWithNavigationPropertiesDto?.branch
6741
6742
  ? this.paramsIntegratorDtoWithNavigationPropertiesDto.branch.id
6742
6743
  : '00000000-0000-0000-0000-000000000000');
6743
6744
  this.valid.emit(true);
@@ -6747,7 +6748,9 @@ class HitParamsIntegratorComponent {
6747
6748
  });
6748
6749
  }
6749
6750
  async getParamsIntegrator(buildForm = false, branchId) {
6751
+ debugger;
6750
6752
  this.hitParamsIntegratorsService.getParamsIntegrator(branchId).subscribe(data => {
6753
+ debugger;
6751
6754
  this.paramsIntegratorDtoWithNavigationPropertiesDto = data;
6752
6755
  if (buildForm)
6753
6756
  this.buildForm();
@@ -6772,11 +6775,19 @@ class HitParamsIntegratorComponent {
6772
6775
  // });
6773
6776
  // }
6774
6777
  async connectionTest() {
6775
- if (this.formParamsIntegrator.controls.branchId.value == '')
6778
+ if (this.formParamsIntegrator.controls.branchId?.value == '')
6776
6779
  this.formParamsIntegrator.controls.branchId.setValue('00000000-0000-0000-0000-000000000000');
6777
6780
  let request = this.formParamsIntegrator.value;
6778
6781
  return await this.hitEntegratorsService.connectionTest(request).then(data => {
6779
- return data;
6782
+ this.submitButtonDisabled = false;
6783
+ if (data) {
6784
+ this.toasterService.success('eDonusum::ConnectionSuccessful');
6785
+ return true;
6786
+ }
6787
+ else {
6788
+ this.toasterService.error(data.message);
6789
+ return false;
6790
+ }
6780
6791
  });
6781
6792
  }
6782
6793
  }
@@ -6940,9 +6951,11 @@ class HitParamsGeneralPart1Component {
6940
6951
  .pipe(finalize$1(() => {
6941
6952
  this.submitButtonDisabled = false;
6942
6953
  }), tap$1(() => { }))
6943
- .subscribe(async () => {
6954
+ .subscribe(async (data) => {
6944
6955
  // this.toasterService.success('eDonusum::TransactionSuccessful');
6956
+ await this.getGeneralParams();
6945
6957
  this.valid.emit(true);
6958
+ this.paramsGeneralDtoPart1.emit(data);
6946
6959
  }, err => {
6947
6960
  this.toasterService.error('eDonusum::TransactionUnsuccessful');
6948
6961
  this.valid.emit(false);
@@ -7046,25 +7059,32 @@ class HitParamsGeneralPart2Component {
7046
7059
  });
7047
7060
  }
7048
7061
  submitForm() {
7049
- if (this.generalformParamsGeneralPart2.invalid)
7050
- return;
7051
- this.submitButtonDisabled = true;
7052
- // this.toasterService.info('eDonusum::TransactionStarted');
7053
- this.paramsGeneralDtoPart1.integrator =
7054
- this.generalformParamsGeneralPart2.controls.integrator.value;
7055
- const request = this.service.update(this.paramsGeneralDto.id, {
7056
- ...this.paramsGeneralDtoPart1,
7057
- });
7058
- request
7059
- .pipe(finalize$1(() => {
7060
- this.submitButtonDisabled = false;
7061
- }), tap$1(() => { }))
7062
- .subscribe(() => {
7063
- // this.toasterService.success('eDonusum::TransactionSuccessful');
7064
- this.valid.emit(true);
7065
- }, err => {
7066
- this.toasterService.error('eDonusum::TransactionUnsuccessful');
7067
- this.valid.emit(false);
7062
+ debugger;
7063
+ this.hitParamsGeneralsService.getParamsGeneral().subscribe(data => {
7064
+ this.paramsGeneralDto = data;
7065
+ if (this.generalformParamsGeneralPart2.invalid)
7066
+ return;
7067
+ this.submitButtonDisabled = true;
7068
+ // this.toasterService.info('eDonusum::TransactionStarted');
7069
+ this.paramsGeneralDtoPart1.integrator =
7070
+ this.generalformParamsGeneralPart2.controls.integrator.value;
7071
+ const request = this.service.update(this.paramsGeneralDto?.id, {
7072
+ ...this.paramsGeneralDtoPart1,
7073
+ });
7074
+ request
7075
+ .pipe(finalize$1(() => {
7076
+ this.submitButtonDisabled = false;
7077
+ }), tap$1(() => { }))
7078
+ .subscribe(() => {
7079
+ // this.toasterService.success('eDonusum::TransactionSuccessful');
7080
+ this.hitParamsGeneralsService.getParamsGeneral().subscribe(data => {
7081
+ this.paramsGeneralDto = data;
7082
+ });
7083
+ this.valid.emit(true);
7084
+ }, err => {
7085
+ this.toasterService.error('eDonusum::TransactionUnsuccessful');
7086
+ this.valid.emit(false);
7087
+ });
7068
7088
  });
7069
7089
  }
7070
7090
  }