iptdevs-design-system 3.1.508 → 3.1.509
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.
- package/esm2020/lib/cod-self-managed/steps/cod-form-step-two/cod-self-form-step-two.component.mjs +18 -10
- package/fesm2015/iptdevs-design-system.mjs +17 -9
- package/fesm2015/iptdevs-design-system.mjs.map +1 -1
- package/fesm2020/iptdevs-design-system.mjs +17 -9
- package/fesm2020/iptdevs-design-system.mjs.map +1 -1
- package/lib/cod-self-managed/steps/cod-form-step-two/cod-self-form-step-two.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -6632,10 +6632,10 @@ class CodSelfFormStepTwoComponent extends CodSelfManagedSteps {
|
|
|
6632
6632
|
this.messageInfo = 'Busca un plan deacuerdo a tu disponibilidad';
|
|
6633
6633
|
this.initForm();
|
|
6634
6634
|
this.minDate = new Date();
|
|
6635
|
-
this.codSelfFormStepTwo.controls['schedule'].setValue("");
|
|
6636
6635
|
}
|
|
6637
6636
|
ngOnInit() {
|
|
6638
6637
|
this.startLocalStorageWork();
|
|
6638
|
+
this.valuesInitialSchedule();
|
|
6639
6639
|
}
|
|
6640
6640
|
ngOnChanges() {
|
|
6641
6641
|
// this.initForm();
|
|
@@ -6656,6 +6656,19 @@ class CodSelfFormStepTwoComponent extends CodSelfManagedSteps {
|
|
|
6656
6656
|
// course_modality: ['', [Validators.required],],
|
|
6657
6657
|
});
|
|
6658
6658
|
}
|
|
6659
|
+
valuesInitialSchedule() {
|
|
6660
|
+
const scheduleValue = localStorage.getItem('COD SELF - step2(schedule)');
|
|
6661
|
+
console.log(scheduleValue);
|
|
6662
|
+
// Verifica si hay un valor en el localStorage
|
|
6663
|
+
if (scheduleValue && scheduleValue.trim() != '') {
|
|
6664
|
+
// Si hay un valor en el localStorage, establece el valor del FormControl
|
|
6665
|
+
this.codSelfFormStepTwo.controls['schedule'].setValue(new Date(scheduleValue));
|
|
6666
|
+
}
|
|
6667
|
+
else {
|
|
6668
|
+
// Si no hay un valor en el localStorage, o si es null o vacío, establece un valor predeterminado
|
|
6669
|
+
this.codSelfFormStepTwo.controls['schedule'].setValue(new Date());
|
|
6670
|
+
}
|
|
6671
|
+
}
|
|
6659
6672
|
back() {
|
|
6660
6673
|
// Movernos al paso anterior
|
|
6661
6674
|
this.completed.emit(0);
|
|
@@ -6710,14 +6723,9 @@ class CodSelfFormStepTwoComponent extends CodSelfManagedSteps {
|
|
|
6710
6723
|
}
|
|
6711
6724
|
}
|
|
6712
6725
|
onDateChange(event) {
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
|
|
6716
|
-
console.log(event);
|
|
6717
|
-
}
|
|
6718
|
-
else {
|
|
6719
|
-
console.error('Error: El evento no es una instancia de Date.');
|
|
6720
|
-
}
|
|
6726
|
+
// Convierte la fecha a una cadena ISO 8601 y guárdala en el localStorage
|
|
6727
|
+
localStorage.setItem('COD SELF - step2(schedule)', event.toISOString());
|
|
6728
|
+
console.log(event);
|
|
6721
6729
|
}
|
|
6722
6730
|
onReject() {
|
|
6723
6731
|
this.messageService.clear('confirm');
|