iptdevs-design-system 2.7.137 → 2.7.139
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/steps/cod-form-step-four/cod-form-step-four.component.mjs +16 -9
- package/fesm2015/iptdevs-design-system.mjs +15 -8
- package/fesm2015/iptdevs-design-system.mjs.map +1 -1
- package/fesm2020/iptdevs-design-system.mjs +15 -8
- package/fesm2020/iptdevs-design-system.mjs.map +1 -1
- package/lib/cod/steps/cod-form-step-four/cod-form-step-four.component.d.ts +1 -1
- package/package.json +1 -1
|
@@ -3581,18 +3581,20 @@ class CodFormStepFourComponent extends CodFormSteps {
|
|
|
3581
3581
|
agreementSelected = this.localStorageCOD.getCodFormData(1, 'agreement_by_category');
|
|
3582
3582
|
}
|
|
3583
3583
|
if (this.codFormStepFour.controls['payment_method'].value === '1') {
|
|
3584
|
-
|
|
3584
|
+
console.log(agreementSelected);
|
|
3585
|
+
this.searchPriceByTypePayment(agreementSelected, 'cuotas', '1');
|
|
3585
3586
|
const aux = this.codPrices.filter(codPrice => codPrice.agreement === Number(agreementSelected))[0];
|
|
3586
|
-
this.codFormStepFour.controls['quota_times'].setValue(
|
|
3587
|
-
this.codFormStepFour.controls['program_price'].setValue(
|
|
3587
|
+
this.codFormStepFour.controls['quota_times'].setValue(this.codPrices[0].code);
|
|
3588
|
+
this.codFormStepFour.controls['program_price'].setValue(this.codPrices[0].normal_price);
|
|
3588
3589
|
}
|
|
3589
3590
|
else {
|
|
3590
3591
|
if (this.codFormStepFour.controls['payment_method'].value === '2') {
|
|
3591
|
-
|
|
3592
|
+
console.log(agreementSelected);
|
|
3593
|
+
this.searchPriceByTypePayment(agreementSelected, 'contado', '2');
|
|
3592
3594
|
const aux = this.codPrices.filter(codPrice => codPrice.fee_number === 1)[0];
|
|
3593
|
-
this.codFormStepFour.controls['quota_times'].setValue(
|
|
3594
|
-
this.codFormStepFour.controls['program_price'].setValue(
|
|
3595
|
-
this.codFormStepFour.controls['total_price'].setValue(
|
|
3595
|
+
this.codFormStepFour.controls['quota_times'].setValue(this.codPrices[0].code);
|
|
3596
|
+
this.codFormStepFour.controls['program_price'].setValue(this.codPrices[0].normal_price);
|
|
3597
|
+
this.codFormStepFour.controls['total_price'].setValue(this.codPrices[0].enrollment);
|
|
3596
3598
|
}
|
|
3597
3599
|
}
|
|
3598
3600
|
// this.commercialService.getCodPricesByAgreement(Number(agreementSelected)).subscribe({
|
|
@@ -3631,13 +3633,18 @@ class CodFormStepFourComponent extends CodFormSteps {
|
|
|
3631
3633
|
}
|
|
3632
3634
|
});
|
|
3633
3635
|
}
|
|
3634
|
-
searchPriceByTypePayment(agreementSelected, type) {
|
|
3636
|
+
searchPriceByTypePayment(agreementSelected, type, change) {
|
|
3635
3637
|
let request = {
|
|
3636
3638
|
agreement: Number(agreementSelected),
|
|
3637
3639
|
payment_method: type
|
|
3638
3640
|
};
|
|
3639
3641
|
this.commercialService.getCodPricesByAgreementTypePayment(request).subscribe((response) => {
|
|
3640
3642
|
this.codPrices = response.data;
|
|
3643
|
+
console.log(this.codPrices);
|
|
3644
|
+
// Actualizar para que se tomen los cambios
|
|
3645
|
+
this.updateValueAndValidity();
|
|
3646
|
+
// Actualizar los controls globales
|
|
3647
|
+
this.updateGlobalControls(change);
|
|
3641
3648
|
});
|
|
3642
3649
|
}
|
|
3643
3650
|
initForm() {
|