iptdevs-design-system 2.7.52 → 2.7.54
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/logic/calculate-quotes.service.mjs +5 -7
- package/esm2020/lib/cod/steps/cod-form-step-two/cod-form-step-two.component.mjs +11 -11
- package/fesm2015/iptdevs-design-system.mjs +14 -16
- package/fesm2015/iptdevs-design-system.mjs.map +1 -1
- package/fesm2020/iptdevs-design-system.mjs +14 -16
- package/fesm2020/iptdevs-design-system.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -3075,17 +3075,17 @@ class CodFormStepTwoComponent extends CodFormSteps {
|
|
|
3075
3075
|
}
|
|
3076
3076
|
// Eventos de los select
|
|
3077
3077
|
selectCountry(country) {
|
|
3078
|
-
|
|
3078
|
+
let iso = '';
|
|
3079
|
+
if (country === '2')
|
|
3080
|
+
iso = 'col';
|
|
3081
|
+
else if (country === '3')
|
|
3082
|
+
iso = 'ven';
|
|
3083
|
+
else if (country === '4')
|
|
3084
|
+
iso = 'usa';
|
|
3085
|
+
else
|
|
3086
|
+
iso = '';
|
|
3087
|
+
if (iso != '') {
|
|
3079
3088
|
this.codFormStepTwo.controls['country'].setValue(country);
|
|
3080
|
-
let iso = '';
|
|
3081
|
-
if (country === '1')
|
|
3082
|
-
iso = 'nul';
|
|
3083
|
-
if (country === '2')
|
|
3084
|
-
iso = 'col';
|
|
3085
|
-
if (country === '3')
|
|
3086
|
-
iso = 'ven';
|
|
3087
|
-
if (country === '4')
|
|
3088
|
-
iso = 'usa';
|
|
3089
3089
|
this.parameterService.getStatesByCountry(iso).subscribe((response) => {
|
|
3090
3090
|
this.states = response.data;
|
|
3091
3091
|
this.selectState(this.localStorageCOD.getCodFormData(2, 'state'));
|
|
@@ -3334,14 +3334,12 @@ class CalculateQuotesService {
|
|
|
3334
3334
|
constructor() { }
|
|
3335
3335
|
calculateQuotes(params) {
|
|
3336
3336
|
console.log(params);
|
|
3337
|
+
console.log(params.date);
|
|
3337
3338
|
let dataFinancing = [];
|
|
3338
3339
|
let index = 1; // Indicador de cant. de cuotas
|
|
3339
|
-
let
|
|
3340
|
-
let momentJs = new Date(params.date);
|
|
3341
|
-
momentJs.setDate(momentJs.getDate() + 1);
|
|
3340
|
+
let momentJs = moment(params.date).add(1, 'days');
|
|
3342
3341
|
console.log(momentJs);
|
|
3343
|
-
|
|
3344
|
-
if (this.validateSunday(momentJs)) {
|
|
3342
|
+
if (this.validateSunday(momentJs.toDate())) {
|
|
3345
3343
|
Swal.fire({
|
|
3346
3344
|
title: 'Fecha inválida',
|
|
3347
3345
|
text: 'Debe seleccionar un día de la semana diferente al domingo',
|
|
@@ -3356,7 +3354,7 @@ class CalculateQuotesService {
|
|
|
3356
3354
|
currency: 'USD',
|
|
3357
3355
|
minimumFractionDigits: 0
|
|
3358
3356
|
}).format(Math.round(parseFloat(params.quotaValues.toString()))),
|
|
3359
|
-
|
|
3357
|
+
momentJs.format('dddd') + ', ' + momentJs.format('MMMM DD YYYY')
|
|
3360
3358
|
];
|
|
3361
3359
|
dataFinancing.push(quota);
|
|
3362
3360
|
while (index < params.quotaTimes) {
|