iptdevs-design-system 3.1.857 → 3.1.858

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.
@@ -3781,7 +3781,6 @@ class CodFormStepOneComponent extends CodFormSteps {
3781
3781
  getParameters() {
3782
3782
  this.plans = this.parametersAll?.academicPlan;
3783
3783
  this.levels = this.parametersAll?.english_levels;
3784
- console.log("cod_form step1: ", this.parametersAll);
3785
3784
  }
3786
3785
  initForm() {
3787
3786
  this.codFormStepOne = this.fb.group({
@@ -3865,7 +3864,7 @@ class CodFormStepOneComponent extends CodFormSteps {
3865
3864
  getAgreementByPlan(plan) {
3866
3865
  const planNumber = typeof plan === 'string' ? parseInt(plan, 10) : plan;
3867
3866
  if (this.parametersAll && this.parametersAll?.agreement) {
3868
- this.course_type = this.parametersAll.agreement.filter((course) => {
3867
+ this.agreements = this.parametersAll.agreement.filter((course) => {
3869
3868
  const academicPlan = typeof course.category === 'string'
3870
3869
  ? parseInt(course.category, 10)
3871
3870
  : course.category;
@@ -3873,7 +3872,7 @@ class CodFormStepOneComponent extends CodFormSteps {
3873
3872
  });
3874
3873
  }
3875
3874
  else {
3876
- this.course_type = [];
3875
+ this.agreements = [];
3877
3876
  }
3878
3877
  }
3879
3878
  selectCoursesTypesByPlan(coursesTypes) {
@@ -4201,10 +4200,23 @@ class CodFormStepTwoComponent extends CodFormSteps {
4201
4200
  this.getCity(state);
4202
4201
  }
4203
4202
  getCity(state) {
4204
- this.parameterService.getCitiesByState(state).subscribe((response) => {
4205
- this.cities = response.data;
4206
- this.selectCity(this.localStorageCOD.getCodFormData(2, 'city'));
4207
- });
4203
+ // this.parameterService.getCitiesByState(state).subscribe((response) => {
4204
+ // this.cities = response.data;
4205
+ // this.selectCity(this.localStorageCOD.getCodFormData(2, 'city'));
4206
+ // });
4207
+ const stateNumber = typeof state === 'string' ? parseInt(state, 10) : state;
4208
+ if (this.parametersAll && this.parametersAll?.city) {
4209
+ this.cities = this.parametersAll.city.filter((course) => {
4210
+ const academicPlan = typeof course.state === 'string'
4211
+ ? parseInt(course.state, 10)
4212
+ : course.state;
4213
+ return academicPlan === stateNumber;
4214
+ });
4215
+ }
4216
+ else {
4217
+ this.cities = [];
4218
+ }
4219
+ this.selectCity(this.localStorageCOD.getCodFormData(2, 'city'));
4208
4220
  }
4209
4221
  // Eventos de los select
4210
4222
  selectCountry(country) {