@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.
@@ -6560,6 +6560,7 @@ class HitParamsIntegratorComponent {
6560
6560
  }
6561
6561
  submitForm() {
6562
6562
  return __awaiter(this, void 0, void 0, function* () {
6563
+ debugger;
6563
6564
  if (this.formParamsIntegrator.invalid) {
6564
6565
  window.scroll({
6565
6566
  top: 0,
@@ -6591,8 +6592,9 @@ class HitParamsIntegratorComponent {
6591
6592
  this.submitButtonDisabled = false;
6592
6593
  }), tap$1(() => { }))
6593
6594
  .subscribe(() => __awaiter(this, void 0, void 0, function* () {
6595
+ var _a;
6594
6596
  // this.toasterService.success('eDonusum::TransactionSuccessful');
6595
- yield this.getParamsIntegrator(false, this.paramsIntegratorDtoWithNavigationPropertiesDto.branch
6597
+ yield this.getParamsIntegrator(false, ((_a = this.paramsIntegratorDtoWithNavigationPropertiesDto) === null || _a === void 0 ? void 0 : _a.branch)
6596
6598
  ? this.paramsIntegratorDtoWithNavigationPropertiesDto.branch.id
6597
6599
  : '00000000-0000-0000-0000-000000000000');
6598
6600
  this.valid.emit(true);
@@ -6604,7 +6606,9 @@ class HitParamsIntegratorComponent {
6604
6606
  }
6605
6607
  getParamsIntegrator(buildForm = false, branchId) {
6606
6608
  return __awaiter(this, void 0, void 0, function* () {
6609
+ debugger;
6607
6610
  this.hitParamsIntegratorsService.getParamsIntegrator(branchId).subscribe(data => {
6611
+ debugger;
6608
6612
  this.paramsIntegratorDtoWithNavigationPropertiesDto = data;
6609
6613
  if (buildForm)
6610
6614
  this.buildForm();
@@ -6630,12 +6634,21 @@ class HitParamsIntegratorComponent {
6630
6634
  // });
6631
6635
  // }
6632
6636
  connectionTest() {
6637
+ var _a;
6633
6638
  return __awaiter(this, void 0, void 0, function* () {
6634
- if (this.formParamsIntegrator.controls.branchId.value == '')
6639
+ if (((_a = this.formParamsIntegrator.controls.branchId) === null || _a === void 0 ? void 0 : _a.value) == '')
6635
6640
  this.formParamsIntegrator.controls.branchId.setValue('00000000-0000-0000-0000-000000000000');
6636
6641
  let request = this.formParamsIntegrator.value;
6637
6642
  return yield this.hitEntegratorsService.connectionTest(request).then(data => {
6638
- return data;
6643
+ this.submitButtonDisabled = false;
6644
+ if (data) {
6645
+ this.toasterService.success('eDonusum::ConnectionSuccessful');
6646
+ return true;
6647
+ }
6648
+ else {
6649
+ this.toasterService.error(data.message);
6650
+ return false;
6651
+ }
6639
6652
  });
6640
6653
  });
6641
6654
  }
@@ -6804,9 +6817,11 @@ class HitParamsGeneralPart1Component {
6804
6817
  .pipe(finalize$1(() => {
6805
6818
  this.submitButtonDisabled = false;
6806
6819
  }), tap$1(() => { }))
6807
- .subscribe(() => __awaiter(this, void 0, void 0, function* () {
6820
+ .subscribe((data) => __awaiter(this, void 0, void 0, function* () {
6808
6821
  // this.toasterService.success('eDonusum::TransactionSuccessful');
6822
+ yield this.getGeneralParams();
6809
6823
  this.valid.emit(true);
6824
+ this.paramsGeneralDtoPart1.emit(data);
6810
6825
  }), err => {
6811
6826
  this.toasterService.error('eDonusum::TransactionUnsuccessful');
6812
6827
  this.valid.emit(false);
@@ -6915,23 +6930,31 @@ class HitParamsGeneralPart2Component {
6915
6930
  });
6916
6931
  }
6917
6932
  submitForm() {
6918
- if (this.generalformParamsGeneralPart2.invalid)
6919
- return;
6920
- this.submitButtonDisabled = true;
6921
- // this.toasterService.info('eDonusum::TransactionStarted');
6922
- this.paramsGeneralDtoPart1.integrator =
6923
- this.generalformParamsGeneralPart2.controls.integrator.value;
6924
- const request = this.service.update(this.paramsGeneralDto.id, Object.assign({}, this.paramsGeneralDtoPart1));
6925
- request
6926
- .pipe(finalize$1(() => {
6927
- this.submitButtonDisabled = false;
6928
- }), tap$1(() => { }))
6929
- .subscribe(() => {
6930
- // this.toasterService.success('eDonusum::TransactionSuccessful');
6931
- this.valid.emit(true);
6932
- }, err => {
6933
- this.toasterService.error('eDonusum::TransactionUnsuccessful');
6934
- this.valid.emit(false);
6933
+ debugger;
6934
+ this.hitParamsGeneralsService.getParamsGeneral().subscribe(data => {
6935
+ var _a;
6936
+ this.paramsGeneralDto = data;
6937
+ if (this.generalformParamsGeneralPart2.invalid)
6938
+ return;
6939
+ this.submitButtonDisabled = true;
6940
+ // this.toasterService.info('eDonusum::TransactionStarted');
6941
+ this.paramsGeneralDtoPart1.integrator =
6942
+ this.generalformParamsGeneralPart2.controls.integrator.value;
6943
+ const request = this.service.update((_a = this.paramsGeneralDto) === null || _a === void 0 ? void 0 : _a.id, Object.assign({}, this.paramsGeneralDtoPart1));
6944
+ request
6945
+ .pipe(finalize$1(() => {
6946
+ this.submitButtonDisabled = false;
6947
+ }), tap$1(() => { }))
6948
+ .subscribe(() => {
6949
+ // this.toasterService.success('eDonusum::TransactionSuccessful');
6950
+ this.hitParamsGeneralsService.getParamsGeneral().subscribe(data => {
6951
+ this.paramsGeneralDto = data;
6952
+ });
6953
+ this.valid.emit(true);
6954
+ }, err => {
6955
+ this.toasterService.error('eDonusum::TransactionUnsuccessful');
6956
+ this.valid.emit(false);
6957
+ });
6935
6958
  });
6936
6959
  }
6937
6960
  }