iptdevs-design-system 3.1.3101 → 3.1.3103

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.
@@ -6119,6 +6119,7 @@ class CodSelfFormStepOneComponent {
6119
6119
  ngOnInit() {
6120
6120
  this.initForm();
6121
6121
  this.getParameters();
6122
+ this.setDataUsers();
6122
6123
  }
6123
6124
  initForm() {
6124
6125
  this.codSelfFormStepOne = this.fb.group({
@@ -6126,14 +6127,11 @@ class CodSelfFormStepOneComponent {
6126
6127
  student_last_name: ['', [Validators.required]],
6127
6128
  student_id_card_type: ['', [Validators.required], []],
6128
6129
  student_id_card: [{ value: '', disabled: true }, [Validators.required, Validators.minLength(5), Validators.maxLength(20)]],
6129
- // student_email: ['', [Validators.required, Validators.email]],
6130
6130
  gender: ['', [Validators.required]],
6131
- // age: ['', [Validators.required]],
6132
6131
  birthdate: ['', [Validators.required], []],
6133
6132
  country: ['', [Validators.required], []],
6134
6133
  state: ['', [Validators.required], []],
6135
6134
  city: ['', [Validators.required], []],
6136
- // student_address: ['', [Validators.required], []],
6137
6135
  });
6138
6136
  }
6139
6137
  getParameters() {
@@ -6146,12 +6144,6 @@ class CodSelfFormStepOneComponent {
6146
6144
  this.parameterService.getCountries().subscribe((response) => {
6147
6145
  this.countries = response.data;
6148
6146
  });
6149
- // this.parameterService.getStratums().subscribe((response) => {
6150
- // this.stratums = response.data;
6151
- // });
6152
- // this.parameterService.getCivilStatus().subscribe((response) => {
6153
- // this.civilStatus = response.data;
6154
- // });
6155
6147
  this.parameterService.getAllCities().subscribe((response) => {
6156
6148
  this.cities = response.data;
6157
6149
  });
@@ -6168,6 +6160,17 @@ class CodSelfFormStepOneComponent {
6168
6160
  });
6169
6161
  });
6170
6162
  }
6163
+ setDataUsers() {
6164
+ this.codSelfFormStepOne.controls['student_name'].setValue(this.user.name ? this.user.name : null);
6165
+ this.codSelfFormStepOne.controls['student_last_name'].setValue(this.user.last_name ? this.user.last_name : null);
6166
+ this.codSelfFormStepOne.controls['student_id_card_type'].setValue(this.user.id_card_type ? this.user.id_card_type : null);
6167
+ this.codSelfFormStepOne.controls['student_id_card'].setValue(this.user.id_card ? this.user.id_card : null);
6168
+ this.codSelfFormStepOne.controls['country'].setValue(this.user.city[0]?.country != (1 || null) ? this.user.city[0]?.country : null);
6169
+ this.codSelfFormStepOne.controls['state'].setValue(this.user.city[0]?.state != (1 || null) ? this.user.city[0]?.state : null);
6170
+ this.codSelfFormStepOne.controls['city'].setValue(this.user.city[0]?.code != (1 || null) ? this.user.city[0]?.code : null);
6171
+ this.codSelfFormStepOne.controls['gender'].setValue(this.user.gender ? this.user.gender : null);
6172
+ this.codSelfFormStepOne.controls['birthdate'].setValue(this.user.birthdate ? this.user.birthdate : null);
6173
+ }
6171
6174
  selectCountry(country) {
6172
6175
  let iso = '';
6173
6176
  if (country === '2')