canvis detectats pel pablo
This commit is contained in:
parent
7dda6c969d
commit
8f31d7b18b
|
@ -62,7 +62,10 @@ export default defineComponent({
|
||||||
postalCodeValid.value.isValid = false;
|
postalCodeValid.value.isValid = false;
|
||||||
} else {
|
} else {
|
||||||
postalCodeValid.value.isValid = true;
|
postalCodeValid.value.isValid = true;
|
||||||
document.querySelector("#carousel-form .calendar .custom-date-btn").click();
|
let calendar = null;
|
||||||
|
if(document.querySelector("#carousel-form .calendar .custom-date-btn")) calendar = document.querySelector("#carousel-form .calendar .custom-date-btn");
|
||||||
|
else if(document.querySelector("#filters-form .calendar .custom-date-btn")) calendar = document.querySelector("#filters-form .calendar .custom-date-btn");
|
||||||
|
calendar.click();
|
||||||
}
|
}
|
||||||
|
|
||||||
postalCodeValid.value.dataOptions = dates;
|
postalCodeValid.value.dataOptions = dates;
|
||||||
|
@ -73,6 +76,7 @@ export default defineComponent({
|
||||||
message:
|
message:
|
||||||
"Se ha producido un error en el proceso de identificación del código postal",
|
"Se ha producido un error en el proceso de identificación del código postal",
|
||||||
});
|
});
|
||||||
|
console.log(error)
|
||||||
isPostalCodeLoading.value = false;
|
isPostalCodeLoading.value = false;
|
||||||
} finally {
|
} finally {
|
||||||
|
|
||||||
|
|
|
@ -112,6 +112,7 @@ export function useCheckoutForm() {
|
||||||
const getFormatedDate = (date) => {
|
const getFormatedDate = (date) => {
|
||||||
if(date){
|
if(date){
|
||||||
let dated = new Date(date.replace('Z', ''));
|
let dated = new Date(date.replace('Z', ''));
|
||||||
|
dated.setHours(12);
|
||||||
return `${dated.toLocaleString('es-ES', { day: "numeric" })} de ${dated.toLocaleString('es-ES', { month: "short" })}`;
|
return `${dated.toLocaleString('es-ES', { day: "numeric" })} de ${dated.toLocaleString('es-ES', { month: "short" })}`;
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
|
|
|
@ -148,9 +148,14 @@ export default defineComponent({
|
||||||
const categoryPath = route.path.split("/")[2];
|
const categoryPath = route.path.split("/")[2];
|
||||||
|
|
||||||
if (categoryPath !== "all") {
|
if (categoryPath !== "all") {
|
||||||
await getProducts({
|
let params = {
|
||||||
type: categoryObj[categoryPath],
|
type: categoryObj[categoryPath]
|
||||||
});
|
}
|
||||||
|
if(availabilityStoraged.value) {
|
||||||
|
params.postalCode = availabilityStoraged.value.postalCode,
|
||||||
|
params.dateExpired = availabilityStoraged.value.dateExpired
|
||||||
|
}
|
||||||
|
await getProducts(params);
|
||||||
datePostalCode.value = availability.value;
|
datePostalCode.value = availability.value;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -211,13 +216,13 @@ export default defineComponent({
|
||||||
Disponibilidad para:
|
Disponibilidad para:
|
||||||
<span
|
<span
|
||||||
v-if="
|
v-if="
|
||||||
datePostalCode.dateExpired && datePostalCode.postalCode
|
availabilityStoraged.dateExpired && availabilityStoraged.postalCode
|
||||||
"
|
"
|
||||||
class="green-text"
|
class="green-text"
|
||||||
>
|
>
|
||||||
{{ dateExpiredDay }} {{ currentMonth }} en
|
{{ dateExpiredDay }} {{ currentMonth }} en
|
||||||
{{
|
{{
|
||||||
availability.postalCode || datePostalCode.postalCode
|
availabilityStoraged.postalCode
|
||||||
}}</span
|
}}</span
|
||||||
>
|
>
|
||||||
</p>
|
</p>
|
||||||
|
@ -276,6 +281,7 @@ export default defineComponent({
|
||||||
<div class="products-section-body">
|
<div class="products-section-body">
|
||||||
<Container cardContainer class="category-container">
|
<Container cardContainer class="category-container">
|
||||||
<template v-for="item in products.data" :key="item?.id">
|
<template v-for="item in products.data" :key="item?.id">
|
||||||
|
{{ item }}
|
||||||
<Card
|
<Card
|
||||||
v-if="item"
|
v-if="item"
|
||||||
:price="item.price"
|
:price="item.price"
|
||||||
|
|
Loading…
Reference in New Issue