iptdevs-design-system 3.1.876 → 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.
@@ -3965,6 +3965,8 @@ class CodFormStepOneComponent extends CodFormSteps {
3965
3965
  // }
3966
3966
  // }
3967
3967
  getAvailibleCourses() {
3968
+ if (this.isLoading)
3969
+ return;
3968
3970
  if (this.validRequest()) {
3969
3971
  this.isLoading = true;
3970
3972
  // Guarda los valores actuales antes de la llamada
@@ -3982,7 +3984,10 @@ class CodFormStepOneComponent extends CodFormSteps {
3982
3984
  course_type: currentValues.course_type,
3983
3985
  };
3984
3986
  this.courseService.getAvailableCoursesByLevAgreeCType(request_availibleCourses)
3985
- .pipe(finalize(() => this.isLoading = false))
3987
+ .pipe(finalize(() => {
3988
+ this.isLoading = false;
3989
+ this.cdRef.detectChanges();
3990
+ }))
3986
3991
  .subscribe({
3987
3992
  next: (response) => {
3988
3993
  if (response.data) {
@@ -4002,7 +4007,6 @@ class CodFormStepOneComponent extends CodFormSteps {
4002
4007
  this.codFormStepOne.get('availible_courses')?.setValue(null);
4003
4008
  this.setValueStepFour();
4004
4009
  }
4005
- this.cdRef.detectChanges();
4006
4010
  },
4007
4011
  error: (err) => {
4008
4012
  console.error('Error loading courses:', err);