iptdevs-design-system 2.7.80 → 2.7.82

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.
@@ -2228,28 +2228,28 @@ class LocalStorageCODService {
2228
2228
  constructor() { }
2229
2229
  getCodFormData(step, control) {
2230
2230
  if (step === 1)
2231
- return localStorage.getItem(`COD FORM - step1(${control})`);
2231
+ return sessionStorage.getItem(`COD FORM - step1(${control})`);
2232
2232
  if (step === 2)
2233
- return localStorage.getItem(`COD FORM - step2(${control})`);
2233
+ return sessionStorage.getItem(`COD FORM - step2(${control})`);
2234
2234
  if (step === 3)
2235
- return localStorage.getItem(`COD FORM - step3(${control})`);
2235
+ return sessionStorage.getItem(`COD FORM - step3(${control})`);
2236
2236
  if (step === 4)
2237
- return localStorage.getItem(`COD FORM - step4(${control})`);
2237
+ return sessionStorage.getItem(`COD FORM - step4(${control})`);
2238
2238
  if (step === 5)
2239
- return localStorage.getItem(`COD FORM - step5(${control})`);
2239
+ return sessionStorage.getItem(`COD FORM - step5(${control})`);
2240
2240
  return null;
2241
2241
  }
2242
2242
  setCodFormData(step, control, value) {
2243
2243
  if (step === 1)
2244
- localStorage.setItem(`COD FORM - step1(${control})`, value);
2244
+ sessionStorage.setItem(`COD FORM - step1(${control})`, value);
2245
2245
  if (step === 2)
2246
- localStorage.setItem(`COD FORM - step2(${control})`, value);
2246
+ sessionStorage.setItem(`COD FORM - step2(${control})`, value);
2247
2247
  if (step === 3)
2248
- localStorage.setItem(`COD FORM - step3(${control})`, value);
2248
+ sessionStorage.setItem(`COD FORM - step3(${control})`, value);
2249
2249
  if (step === 4)
2250
- localStorage.setItem(`COD FORM - step4(${control})`, value);
2250
+ sessionStorage.setItem(`COD FORM - step4(${control})`, value);
2251
2251
  if (step === 5)
2252
- localStorage.setItem(`COD FORM - step5(${control})`, value);
2252
+ sessionStorage.setItem(`COD FORM - step5(${control})`, value);
2253
2253
  }
2254
2254
  }
2255
2255
  LocalStorageCODService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: LocalStorageCODService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
@@ -2990,13 +2990,15 @@ class CodFormStepTwoComponent extends CodFormSteps {
2990
2990
  this.codFormStepTwo.controls['student_last_name'].setValue(this.initialData.student.last_name);
2991
2991
  this.codFormStepTwo.controls['student_id_card_type'].setValue(this.initialData.student.id_card_type);
2992
2992
  this.codFormStepTwo.controls['student_id_card'].setValue(this.initialData.student.id_card);
2993
- this.codFormStepTwo.controls['country'].setValue(this.initialData.student.city.country);
2994
- this.codFormStepTwo.controls['state'].setValue(this.initialData.student.city.state);
2995
- this.codFormStepTwo.controls['city'].setValue(this.initialData.student.city.code);
2993
+ this.codFormStepTwo.controls['country'].setValue(this.initialData.student.city[0].country);
2994
+ this.codFormStepTwo.controls['state'].setValue(this.initialData.student.city[0].state);
2995
+ this.codFormStepTwo.controls['city'].setValue(this.initialData.student.city[0].code);
2996
2996
  this.codFormStepTwo.controls['gender'].setValue(this.initialData.student.gender);
2997
- this.codFormStepTwo.controls['grade'].setValue(this.initialData.aditional_information.grade);
2998
- this.codFormStepTwo.controls['student_occupation'].setValue(this.initialData.aditional_information.occupation);
2999
2997
  this.codFormStepTwo.controls['nickname'].setValue(this.initialData.student.nick_name);
2998
+ this.codFormStepTwo.controls['stratum'].setValue(this.initialData.aditional_information.social_stratum);
2999
+ this.codFormStepTwo.controls['student_occupation'].setValue(this.initialData.aditional_information.student_occupation);
3000
+ this.codFormStepTwo.controls['grade'].setValue(this.initialData.aditional_information.educational_level);
3001
+ this.codFormStepTwo.controls['civil_status'].setValue(this.initialData.aditional_information.civil_status);
3000
3002
  this.codFormStepTwo.controls['student_phone_indicative'].setValue(this.initialData.student.phone_indicative);
3001
3003
  this.codFormStepTwo.controls['student_phone_number'].setValue(this.initialData.student.phone_number);
3002
3004
  this.codFormStepTwo.controls['birthdate'].setValue(this.initialData.student.birthdate);
@@ -3096,6 +3098,7 @@ class CodFormStepTwoComponent extends CodFormSteps {
3096
3098
  });
3097
3099
  this.parameterService.getGenders().subscribe((response) => {
3098
3100
  this.genders = response.data;
3101
+ console.log(this.genders);
3099
3102
  });
3100
3103
  this.parameterService.getAllCities().subscribe((response) => {
3101
3104
  this.cities = response.data;
@@ -3242,13 +3245,29 @@ class CodFormStepThreeComponent extends CodFormSteps {
3242
3245
  // Controls del formulario
3243
3246
  this.controls = new CodFormControls().controls[2];
3244
3247
  }
3245
- ngOnInit() {
3248
+ // ngOnInit(): void {
3249
+ // this.getParameters();
3250
+ // this.initForm();
3251
+ // this.startLocalStorageWork();
3252
+ // this.validateErrors();
3253
+ // if (this.initialData != null) {
3254
+ // this.setValueStepThree();
3255
+ // }
3256
+ // }
3257
+ ngOnChanges(changes) {
3246
3258
  this.getParameters();
3247
3259
  this.initForm();
3248
3260
  this.startLocalStorageWork();
3249
3261
  this.validateErrors();
3250
- if (this.initialData != null) {
3251
- this.setValueStepThree();
3262
+ if (changes['initialData']) {
3263
+ if (this.initialData.parent != null) {
3264
+ console.log(this.initialData.parent);
3265
+ this.selectNeedAtendant(1);
3266
+ this.setValueStepThree();
3267
+ }
3268
+ else {
3269
+ console.log('No tiene acudiente');
3270
+ }
3252
3271
  }
3253
3272
  }
3254
3273
  validateErrors() {
@@ -3394,7 +3413,7 @@ class CodFormStepThreeComponent extends CodFormSteps {
3394
3413
  }
3395
3414
  }
3396
3415
  CodFormStepThreeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CodFormStepThreeComponent, deps: [{ token: i1$1.FormBuilder }, { token: ParameterService }, { token: CodFormControls }], target: i0.ɵɵFactoryTarget.Component });
3397
- CodFormStepThreeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: CodFormStepThreeComponent, selector: "app-cod-form-step-three", inputs: { initialData: "initialData" }, outputs: { changeStepEvent: "changeStepEvent" }, usesInheritance: true, ngImport: i0, template: "<form autocomplete=\"off\" [formGroup]=\"codFormStepThree\"class=\"grid\">\n <div class=\"col-12\">\n <ipt-select\n [initialValue]=\"codFormStepThree.controls['needAtendant'].value\"\n [control]=\"codFormStepThree.controls['needAtendant']\"\n (eventSelect)=\"selectNeedAtendant($event)\"\n [data]=\"needAtendants\"\n [defaultText]=\"'Requiere acudiente'\"\n ></ipt-select>\n </div>\n\n <div *ngIf=\"needAtendant()\" class=\"grid col-12\">\n <div class=\"col-12 md:col-6\">\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Nombres'\"\n [control]=\"codFormStepThree.controls['parent_name']\"\n ></ipt-input>\n <ipt-select\n [initialValue]=\"codFormStepThree.controls['parent_id_card_type'].value\"\n [data]=\"idTypes\"\n (eventSelect)=\"selectIdTypeParents($event)\"\n [defaultText]=\"'Tipo de documento'\"\n [control]=\"codFormStepThree.controls['parent_id_card_type']\"\n ></ipt-select>\n <ipt-select\n [initialValue]=\"codFormStepThree.controls['parent_phone_indicative'].value\"\n [data]=\"indicatives\"\n (eventSelect)=\"selectIndicativesParents($event)\"\n [defaultText]=\"'Indicativo'\"\n [control]=\"codFormStepThree.controls['parent_phone_indicative']\"\n ></ipt-select>\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Ocupaci\u00F3n'\"\n [control]=\"codFormStepThree.controls['parent_occupation']\"\n ></ipt-input>\n </div>\n <div class=\"col-12 md:col-6\">\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Apellidos'\"\n [control]=\"codFormStepThree.controls['parent_last_name']\"\n ></ipt-input>\n <ipt-input\n [inputType]=\"'number'\"\n [placeHolder]=\"'N\u00FAmero de documento'\"\n [control]=\"codFormStepThree.controls['parent_id_card']\"\n ></ipt-input>\n <ipt-input\n [inputType]=\"'number'\"\n [placeHolder]=\"'N\u00FAmero de tel\u00E9fono'\"\n [control]=\"codFormStepThree.controls['parent_phone_number']\"\n ></ipt-input>\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Direcci\u00F3n - Oficina'\"\n [control]=\"codFormStepThree.controls['parent_address']\"\n ></ipt-input>\n </div>\n </div>\n</form>\n\n<div class=\"flex mt-3 align-items-center gap-3\">\n <span *ngIf=\"(codFormStepThree.invalid && codFormStepThree.touched) && needAtendant()\" class=\"text-red-500 font-bold text-center mt-1 py-2 bg-red-100 w-full border-round-xl\">{{ errorMessage }}</span>\n <button type=\"submit\" class=\"ml-auto p-button-sm\" (click)=\"sendForm()\" pButton label=\"Siguiente\" icon=\"pi pi-arrow-right\"></button>\n</div>\n", styles: [""], components: [{ type: SelectComponent, selector: "ipt-select", inputs: ["isRequired", "data", "defaultText", "selectCode", "disabledSel", "initialValue", "control"], outputs: ["eventSelect"] }, { type: InputComponent, selector: "ipt-input", inputs: ["inputType", "placeHolder", "validateText", "withPipe", "list", "iconUrl", "control", "prefix", "thousands", "decimal"], outputs: ["dateSelected"] }], directives: [{ type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }] });
3416
+ CodFormStepThreeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: CodFormStepThreeComponent, selector: "app-cod-form-step-three", inputs: { initialData: "initialData" }, outputs: { changeStepEvent: "changeStepEvent" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<form autocomplete=\"off\" [formGroup]=\"codFormStepThree\"class=\"grid\">\n <div class=\"col-12\">\n <ipt-select\n [initialValue]=\"codFormStepThree.controls['needAtendant'].value\"\n [control]=\"codFormStepThree.controls['needAtendant']\"\n (eventSelect)=\"selectNeedAtendant($event)\"\n [data]=\"needAtendants\"\n [defaultText]=\"'Requiere acudiente'\"\n ></ipt-select>\n </div>\n\n <div *ngIf=\"needAtendant()\" class=\"grid col-12\">\n <div class=\"col-12 md:col-6\">\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Nombres'\"\n [control]=\"codFormStepThree.controls['parent_name']\"\n ></ipt-input>\n <ipt-select\n [initialValue]=\"codFormStepThree.controls['parent_id_card_type'].value\"\n [data]=\"idTypes\"\n (eventSelect)=\"selectIdTypeParents($event)\"\n [defaultText]=\"'Tipo de documento'\"\n [control]=\"codFormStepThree.controls['parent_id_card_type']\"\n ></ipt-select>\n <ipt-select\n [initialValue]=\"codFormStepThree.controls['parent_phone_indicative'].value\"\n [data]=\"indicatives\"\n (eventSelect)=\"selectIndicativesParents($event)\"\n [defaultText]=\"'Indicativo'\"\n [control]=\"codFormStepThree.controls['parent_phone_indicative']\"\n ></ipt-select>\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Ocupaci\u00F3n'\"\n [control]=\"codFormStepThree.controls['parent_occupation']\"\n ></ipt-input>\n </div>\n <div class=\"col-12 md:col-6\">\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Apellidos'\"\n [control]=\"codFormStepThree.controls['parent_last_name']\"\n ></ipt-input>\n <ipt-input\n [inputType]=\"'number'\"\n [placeHolder]=\"'N\u00FAmero de documento'\"\n [control]=\"codFormStepThree.controls['parent_id_card']\"\n ></ipt-input>\n <ipt-input\n [inputType]=\"'number'\"\n [placeHolder]=\"'N\u00FAmero de tel\u00E9fono'\"\n [control]=\"codFormStepThree.controls['parent_phone_number']\"\n ></ipt-input>\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Direcci\u00F3n - Oficina'\"\n [control]=\"codFormStepThree.controls['parent_address']\"\n ></ipt-input>\n </div>\n </div>\n</form>\n\n<div class=\"flex mt-3 align-items-center gap-3\">\n <span *ngIf=\"(codFormStepThree.invalid && codFormStepThree.touched) && needAtendant()\" class=\"text-red-500 font-bold text-center mt-1 py-2 bg-red-100 w-full border-round-xl\">{{ errorMessage }}</span>\n <button type=\"submit\" class=\"ml-auto p-button-sm\" (click)=\"sendForm()\" pButton label=\"Siguiente\" icon=\"pi pi-arrow-right\"></button>\n</div>\n", styles: [""], components: [{ type: SelectComponent, selector: "ipt-select", inputs: ["isRequired", "data", "defaultText", "selectCode", "disabledSel", "initialValue", "control"], outputs: ["eventSelect"] }, { type: InputComponent, selector: "ipt-input", inputs: ["inputType", "placeHolder", "validateText", "withPipe", "list", "iconUrl", "control", "prefix", "thousands", "decimal"], outputs: ["dateSelected"] }], directives: [{ type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }] });
3398
3417
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CodFormStepThreeComponent, decorators: [{
3399
3418
  type: Component,
3400
3419
  args: [{ selector: 'app-cod-form-step-three', template: "<form autocomplete=\"off\" [formGroup]=\"codFormStepThree\"class=\"grid\">\n <div class=\"col-12\">\n <ipt-select\n [initialValue]=\"codFormStepThree.controls['needAtendant'].value\"\n [control]=\"codFormStepThree.controls['needAtendant']\"\n (eventSelect)=\"selectNeedAtendant($event)\"\n [data]=\"needAtendants\"\n [defaultText]=\"'Requiere acudiente'\"\n ></ipt-select>\n </div>\n\n <div *ngIf=\"needAtendant()\" class=\"grid col-12\">\n <div class=\"col-12 md:col-6\">\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Nombres'\"\n [control]=\"codFormStepThree.controls['parent_name']\"\n ></ipt-input>\n <ipt-select\n [initialValue]=\"codFormStepThree.controls['parent_id_card_type'].value\"\n [data]=\"idTypes\"\n (eventSelect)=\"selectIdTypeParents($event)\"\n [defaultText]=\"'Tipo de documento'\"\n [control]=\"codFormStepThree.controls['parent_id_card_type']\"\n ></ipt-select>\n <ipt-select\n [initialValue]=\"codFormStepThree.controls['parent_phone_indicative'].value\"\n [data]=\"indicatives\"\n (eventSelect)=\"selectIndicativesParents($event)\"\n [defaultText]=\"'Indicativo'\"\n [control]=\"codFormStepThree.controls['parent_phone_indicative']\"\n ></ipt-select>\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Ocupaci\u00F3n'\"\n [control]=\"codFormStepThree.controls['parent_occupation']\"\n ></ipt-input>\n </div>\n <div class=\"col-12 md:col-6\">\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Apellidos'\"\n [control]=\"codFormStepThree.controls['parent_last_name']\"\n ></ipt-input>\n <ipt-input\n [inputType]=\"'number'\"\n [placeHolder]=\"'N\u00FAmero de documento'\"\n [control]=\"codFormStepThree.controls['parent_id_card']\"\n ></ipt-input>\n <ipt-input\n [inputType]=\"'number'\"\n [placeHolder]=\"'N\u00FAmero de tel\u00E9fono'\"\n [control]=\"codFormStepThree.controls['parent_phone_number']\"\n ></ipt-input>\n <ipt-input\n [inputType]=\"'text'\"\n [placeHolder]=\"'Direcci\u00F3n - Oficina'\"\n [control]=\"codFormStepThree.controls['parent_address']\"\n ></ipt-input>\n </div>\n </div>\n</form>\n\n<div class=\"flex mt-3 align-items-center gap-3\">\n <span *ngIf=\"(codFormStepThree.invalid && codFormStepThree.touched) && needAtendant()\" class=\"text-red-500 font-bold text-center mt-1 py-2 bg-red-100 w-full border-round-xl\">{{ errorMessage }}</span>\n <button type=\"submit\" class=\"ml-auto p-button-sm\" (click)=\"sendForm()\" pButton label=\"Siguiente\" icon=\"pi pi-arrow-right\"></button>\n</div>\n", styles: [""] }]