iptdevs-design-system 3.1.888 → 3.1.889

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.
@@ -4714,6 +4714,7 @@ class CodFormStepFourComponent extends CodFormSteps {
4714
4714
  this.isSemestral = false;
4715
4715
  this.codPrices = [];
4716
4716
  this.codPricesFilter = [];
4717
+ this.dataPrices = [];
4717
4718
  this.feeResponse = false;
4718
4719
  this.thereArePlans = false;
4719
4720
  this.isDisabledSel = false;
@@ -4962,7 +4963,19 @@ class CodFormStepFourComponent extends CodFormSteps {
4962
4963
  };
4963
4964
  this.commercialService.ObtainCodPrices(request).subscribe((response) => {
4964
4965
  if (response.data != null) {
4966
+ const course_type = Number(this.localStorageCOD.getCodFormData(1, 'course_type'));
4967
+ const english_level = Number(this.localStorageCOD.getCodFormData(1, 'english_level'));
4968
+ // Cursos técnicos que requieren filtrado especial
4969
+ const technicalCourses = [3, 4, 5, 6, 7, 8, 15, 21, 30, 33];
4965
4970
  this.dataPrices = response.data;
4971
+ if (technicalCourses.includes(course_type)) {
4972
+ // Calculamos los paid_levels permitidos basado en el english_level
4973
+ const maxPaidLevel = 14 - english_level + 1; // 14 es el nivel máximo (C1)
4974
+ const allowedPaidLevels = Math.min(4, maxPaidLevel); // Máximo 4 niveles com
4975
+ this.dataPrices = this.dataPrices.filter((item) => {
4976
+ item.paid_level <= allowedPaidLevels;
4977
+ });
4978
+ }
4966
4979
  this.feeResponse = false;
4967
4980
  this.thereArePlans = true;
4968
4981
  }