iptdevs-design-system 3.1.682 → 3.1.684
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-four/cod-self-form-step-four.component.mjs +12 -21
- package/esm2020/lib/core/services/commercial-service/comercial.service.mjs +6 -1
- package/fesm2015/iptdevs-design-system.mjs +16 -20
- package/fesm2015/iptdevs-design-system.mjs.map +1 -1
- package/fesm2020/iptdevs-design-system.mjs +16 -20
- package/fesm2020/iptdevs-design-system.mjs.map +1 -1
- package/lib/cod-self-managed/steps/cod-form-step-four/cod-self-form-step-four.component.d.ts +4 -1
- package/lib/core/services/commercial-service/comercial.service.d.ts +1 -0
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ import { MessageService } from 'primeng/api';
|
|
|
9
9
|
import * as i6$2 from 'primeng/tabview';
|
|
10
10
|
import { TabViewModule } from 'primeng/tabview';
|
|
11
11
|
import * as i1$1 from '@angular/forms';
|
|
12
|
-
import { Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
12
|
+
import { Validators, FormsModule, ReactiveFormsModule, FormControl } from '@angular/forms';
|
|
13
13
|
import Swal from 'sweetalert2';
|
|
14
14
|
import * as i1$2 from '@angular/common/http';
|
|
15
15
|
import { HttpHeaders } from '@angular/common/http';
|
|
@@ -3163,6 +3163,11 @@ class CommercialService extends IPTGeneralService {
|
|
|
3163
3163
|
this.generateRequestParams(params);
|
|
3164
3164
|
return this.http.post(serviceUrl, this.httpOptions);
|
|
3165
3165
|
}
|
|
3166
|
+
obtainStatusAndReferralsByUserCode(params) {
|
|
3167
|
+
let serviceUrl = this.SERVICE_URL + 'obtain/status/and/referrals/by/user/code';
|
|
3168
|
+
this.generateRequestParams(params);
|
|
3169
|
+
return this.http.post(serviceUrl, this.httpOptions);
|
|
3170
|
+
}
|
|
3166
3171
|
}
|
|
3167
3172
|
CommercialService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CommercialService, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3168
3173
|
CommercialService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.7", ngImport: i0, type: CommercialService, providedIn: 'root' });
|
|
@@ -7484,11 +7489,12 @@ class CodSelfFormStepFourComponent extends CodSelfManagedSteps {
|
|
|
7484
7489
|
{ code: 1, key: 'in', name: 'Instalaciones' },
|
|
7485
7490
|
{ code: 2, key: 'tr', name: 'Transferencia' },
|
|
7486
7491
|
];
|
|
7492
|
+
this.studentIdCardType = new FormControl();
|
|
7487
7493
|
this.initForm();
|
|
7488
7494
|
}
|
|
7489
7495
|
ngOnInit() {
|
|
7490
|
-
// this.getParamenters();
|
|
7491
7496
|
this.startLocalStorageWork();
|
|
7497
|
+
this.subscribeToStudentIdCardTypeChanges();
|
|
7492
7498
|
this.getDataUser();
|
|
7493
7499
|
console.log('idTypes', this.idTypes);
|
|
7494
7500
|
}
|
|
@@ -7501,9 +7507,16 @@ class CodSelfFormStepFourComponent extends CodSelfManagedSteps {
|
|
|
7501
7507
|
invoicing_document: ['', [Validators.required]],
|
|
7502
7508
|
});
|
|
7503
7509
|
}
|
|
7510
|
+
subscribeToStudentIdCardTypeChanges() {
|
|
7511
|
+
this.studentIdCardType.valueChanges.subscribe(value => {
|
|
7512
|
+
this.updateBillingDataFields(value);
|
|
7513
|
+
});
|
|
7514
|
+
}
|
|
7504
7515
|
getDataUser() {
|
|
7505
7516
|
const typeIdCard = this.localStorageCOD.getCodFormData(1, 'student_id_card_type');
|
|
7506
|
-
|
|
7517
|
+
this.studentIdCardType.setValue(typeIdCard);
|
|
7518
|
+
}
|
|
7519
|
+
updateBillingDataFields(typeIdCard) {
|
|
7507
7520
|
if (typeIdCard != null && typeIdCard != "2") {
|
|
7508
7521
|
const nameStudent = this.localStorageCOD.getCodFormData(1, 'student_name');
|
|
7509
7522
|
const lastNameStudent = this.localStorageCOD.getCodFormData(1, 'student_last_name');
|
|
@@ -7521,29 +7534,23 @@ class CodSelfFormStepFourComponent extends CodSelfManagedSteps {
|
|
|
7521
7534
|
}
|
|
7522
7535
|
back() {
|
|
7523
7536
|
if (!this.isSelectionOptionPayments && !this.isEditBillingData) {
|
|
7524
|
-
// Volver a la edición de datos de facturación
|
|
7525
7537
|
this.isEditBillingData = true;
|
|
7526
7538
|
}
|
|
7527
7539
|
else if (!this.isSelectionOptionPayments && this.isEditBillingData) {
|
|
7528
|
-
// Volver a la selección de opciones de pago
|
|
7529
7540
|
this.isSelectionOptionPayments = true;
|
|
7530
7541
|
}
|
|
7531
7542
|
else {
|
|
7532
|
-
// Volver al paso anterior
|
|
7533
7543
|
this.completed.emit(2);
|
|
7534
7544
|
}
|
|
7535
7545
|
}
|
|
7536
7546
|
next() {
|
|
7537
7547
|
if (this.isSelectionOptionPayments) {
|
|
7538
|
-
// Avanzar a la edición de datos de facturación
|
|
7539
7548
|
this.isSelectionOptionPayments = false;
|
|
7540
7549
|
}
|
|
7541
7550
|
else if (!this.isEditBillingData) {
|
|
7542
|
-
// Finalizar la edición de datos de facturación
|
|
7543
7551
|
this.isEditBillingData = true;
|
|
7544
7552
|
}
|
|
7545
7553
|
else {
|
|
7546
|
-
// Completar el formulario y proceder
|
|
7547
7554
|
this.sendForm();
|
|
7548
7555
|
}
|
|
7549
7556
|
}
|
|
@@ -7555,25 +7562,15 @@ class CodSelfFormStepFourComponent extends CodSelfManagedSteps {
|
|
|
7555
7562
|
});
|
|
7556
7563
|
}
|
|
7557
7564
|
editBillingData() {
|
|
7558
|
-
// Activar la edición de datos de facturación
|
|
7559
7565
|
this.isEditBillingData = false;
|
|
7560
7566
|
}
|
|
7561
7567
|
updateDatosBillingData() {
|
|
7562
|
-
// Guardar datos de facturación y regresar a la vista de resumen
|
|
7563
7568
|
this.isEditBillingData = true;
|
|
7564
7569
|
}
|
|
7565
|
-
// getParamenters() {
|
|
7566
|
-
// this.parameterService.getCardTypes('col').subscribe((response) => {
|
|
7567
|
-
// this.idTypes = response.data;
|
|
7568
|
-
// });
|
|
7569
|
-
// }
|
|
7570
7570
|
sendForm() {
|
|
7571
|
-
// Aquí va la lógica para enviar el formulario
|
|
7572
7571
|
this.codSelfFormStepFour.markAllAsTouched();
|
|
7573
|
-
// if (this.codSelfFormStepFour.invalid || this.termsCheckboxStatus === false) return;
|
|
7574
7572
|
this.action.emit('create');
|
|
7575
7573
|
console.log('Ejecuta endpoint');
|
|
7576
|
-
// this.completed.emit(4);
|
|
7577
7574
|
}
|
|
7578
7575
|
onReject() {
|
|
7579
7576
|
this.messageService.clear('confirm');
|
|
@@ -7603,7 +7600,6 @@ class CodSelfFormStepFourComponent extends CodSelfManagedSteps {
|
|
|
7603
7600
|
this.codSelfFormStepFour.controls['invoicing_idType'].setValue(null);
|
|
7604
7601
|
}
|
|
7605
7602
|
}
|
|
7606
|
-
// Método para determinar la vista basada en el código de la opción de pago seleccionada
|
|
7607
7603
|
getViewBasedOnPaymentOption() {
|
|
7608
7604
|
if (this.selectedOptionPayments?.code === 1) {
|
|
7609
7605
|
return 'in';
|