iptdevs-design-system 3.1.321 → 3.1.322
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 +12 -12
- package/fesm2015/iptdevs-design-system.mjs +11 -11
- package/fesm2015/iptdevs-design-system.mjs.map +1 -1
- package/fesm2020/iptdevs-design-system.mjs +11 -11
- package/fesm2020/iptdevs-design-system.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -4367,23 +4367,23 @@ class CodFormStepFourComponent extends CodFormSteps {
|
|
|
4367
4367
|
setDataFromPreviusCodPrices() {
|
|
4368
4368
|
this.codFormStepFour.controls['payment_method'].setValue(this.initialData.cod_payment?.length == 1 ? 2 : 1);
|
|
4369
4369
|
if (this.codFormStepFour.get('payment_method')?.value == 1) {
|
|
4370
|
-
this.codFormStepFour.controls['quota_times'].setValue(this.initialData.cod_price.code);
|
|
4371
|
-
this.codFormStepFour.controls['total_price'].setValue(this.initialData.cod_price.enrollment);
|
|
4372
|
-
this.codFormStepFour.controls['program_price'].setValue(this.initialData.cod_price.financed_price);
|
|
4370
|
+
this.codFormStepFour.controls['quota_times'].setValue(this.initialData.cod_payment ? this.initialData.cod_price.code : 0);
|
|
4371
|
+
this.codFormStepFour.controls['total_price'].setValue(this.initialData.cod_payment ? this.initialData.cod_price.enrollment : 0);
|
|
4372
|
+
this.codFormStepFour.controls['program_price'].setValue(this.initialData.cod_payment ? this.initialData.cod_price.financed_price : 0);
|
|
4373
4373
|
this.codFormStepFour.controls['paid_level'].setValue(this.initialData.cod_price.paid_level);
|
|
4374
|
-
this.codFormStepFour.controls['fee_number'].setValue(this.initialData.cod_payment?.length);
|
|
4375
|
-
this.codFormStepFour.controls['quota_price'].setValue(this.initialData.cod_price.quota_price);
|
|
4376
|
-
this.codFormStepFour.controls['payment_date'].setValue(this.initialData.cod_payment[0]?.timely_date);
|
|
4374
|
+
this.codFormStepFour.controls['fee_number'].setValue(this.initialData.cod_payment ? this.initialData.cod_payment?.length : 0);
|
|
4375
|
+
this.codFormStepFour.controls['quota_price'].setValue(this.initialData.cod_payment ? this.initialData.cod_price.quota_price : 0);
|
|
4376
|
+
this.codFormStepFour.controls['payment_date'].setValue(this.initialData.cod_payment ? this.initialData.cod_payment[0]?.timely_date : null);
|
|
4377
4377
|
this.updateValueAndValidity();
|
|
4378
4378
|
}
|
|
4379
4379
|
else if (this.codFormStepFour.get('payment_method')?.value == 2) {
|
|
4380
|
-
this.codFormStepFour.controls['quota_times'].setValue(this.initialData.cod_price.code);
|
|
4380
|
+
this.codFormStepFour.controls['quota_times'].setValue(this.initialData.cod_payment ? this.initialData.cod_price.code : 0);
|
|
4381
4381
|
this.codFormStepFour.controls['total_price'].setValue(0);
|
|
4382
|
-
this.codFormStepFour.controls['program_price'].setValue(this.initialData.cod_price.normal_price);
|
|
4382
|
+
this.codFormStepFour.controls['program_price'].setValue(this.initialData.cod_payment ? this.initialData.cod_price.normal_price : 0);
|
|
4383
4383
|
this.codFormStepFour.controls['paid_level'].setValue(this.initialData.cod_price.paid_level);
|
|
4384
|
-
this.codFormStepFour.controls['fee_number'].setValue(1);
|
|
4385
|
-
this.codFormStepFour.controls['quota_price'].setValue(this.initialData.cod_price.normal_price);
|
|
4386
|
-
this.codFormStepFour.controls['payment_date'].setValue(this.initialData.cod_payment[0]?.timely_date);
|
|
4384
|
+
this.codFormStepFour.controls['fee_number'].setValue(this.initialData.cod_payment ? 1 : 0);
|
|
4385
|
+
this.codFormStepFour.controls['quota_price'].setValue(this.initialData.cod_payment ? this.initialData.cod_price.normal_price : 0);
|
|
4386
|
+
this.codFormStepFour.controls['payment_date'].setValue(this.initialData.cod_payment ? this.initialData.cod_payment[0]?.timely_date : null);
|
|
4387
4387
|
this.updateValueAndValidity();
|
|
4388
4388
|
}
|
|
4389
4389
|
// this.codFormStepFour.controls['total_price'].setValue(this.initialData.cod_price.enrollment);
|