iptdevs-design-system 3.1.875 → 3.1.877

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.
@@ -3672,7 +3672,10 @@ class CodFormStepOneComponent extends CodFormSteps {
3672
3672
  this.cdRef = cdRef;
3673
3673
  this.changeStepEvent = new EventEmitter();
3674
3674
  this.isLoading = false;
3675
+ // Parameters
3676
+ this.agreements = [];
3675
3677
  this.availibleCourses = [];
3678
+ this.course_type = [];
3676
3679
  this.isDisabledSel = false;
3677
3680
  // Controls del formulario
3678
3681
  this.controls = new CodFormControls().controls[0];
@@ -3962,6 +3965,8 @@ class CodFormStepOneComponent extends CodFormSteps {
3962
3965
  // }
3963
3966
  // }
3964
3967
  getAvailibleCourses() {
3968
+ if (this.isLoading)
3969
+ return;
3965
3970
  if (this.validRequest()) {
3966
3971
  this.isLoading = true;
3967
3972
  // Guarda los valores actuales antes de la llamada
@@ -3979,7 +3984,10 @@ class CodFormStepOneComponent extends CodFormSteps {
3979
3984
  course_type: currentValues.course_type,
3980
3985
  };
3981
3986
  this.courseService.getAvailableCoursesByLevAgreeCType(request_availibleCourses)
3982
- .pipe(finalize(() => this.isLoading = false))
3987
+ .pipe(finalize(() => {
3988
+ this.isLoading = false;
3989
+ this.cdRef.detectChanges();
3990
+ }))
3983
3991
  .subscribe({
3984
3992
  next: (response) => {
3985
3993
  if (response.data) {
@@ -3999,7 +4007,6 @@ class CodFormStepOneComponent extends CodFormSteps {
3999
4007
  this.codFormStepOne.get('availible_courses')?.setValue(null);
4000
4008
  this.setValueStepFour();
4001
4009
  }
4002
- this.cdRef.detectChanges();
4003
4010
  },
4004
4011
  error: (err) => {
4005
4012
  console.error('Error loading courses:', err);