errors fixing
This commit is contained in:
@ -1,15 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<UiContainer v-if="!userStore.vCodeVerify"
|
<UiContainer v-if="!userStore.vCodeVerify" class="flex py-20 sm:py-14">
|
||||||
class="flex py-20 sm:py-14"
|
<div class="hidden xl:block rounded-2xl min-w-[60%] h-[830px]" :style="{
|
||||||
>
|
backgroundImage: `url('/api/public/file/${component.img[0]}_l.webp')`,
|
||||||
<div
|
backgroundSize: 'cover',
|
||||||
class="hidden xl:block rounded-2xl min-w-[60%] h-[830px]"
|
backgroundPosition: 'center',
|
||||||
:style="{
|
}" />
|
||||||
backgroundImage: `url('/api/public/file/${component.img[0]}_l.webp')`,
|
|
||||||
backgroundSize: 'cover',
|
|
||||||
backgroundPosition: 'center',
|
|
||||||
}"
|
|
||||||
/>
|
|
||||||
<div class="w-full sm:w-[80%] mx-auto my-auto xl:w-full xl:px-12">
|
<div class="w-full sm:w-[80%] mx-auto my-auto xl:w-full xl:px-12">
|
||||||
<div class="space-25-55">
|
<div class="space-25-55">
|
||||||
<div class="flex flex-wrap-reverse gap-y-4 justify-between">
|
<div class="flex flex-wrap-reverse gap-y-4 justify-between">
|
||||||
@ -18,8 +13,7 @@
|
|||||||
</h2>
|
</h2>
|
||||||
<button
|
<button
|
||||||
class="h-[40px] sm:h-[43px] px-[10px] sm:px-[17px] border border-gray dark:border-button-disabled text-gray dark:text-button-disabled hover:bg-gray transition-all hover:text-white rounded-[8px] cursor-pointer"
|
class="h-[40px] sm:h-[43px] px-[10px] sm:px-[17px] border border-gray dark:border-button-disabled text-gray dark:text-button-disabled hover:bg-gray transition-all hover:text-white rounded-[8px] cursor-pointer"
|
||||||
@click="menuStore.navigateToItem()"
|
@click="menuStore.navigateToItem()">
|
||||||
>
|
|
||||||
{{ $t("back_to_home") }}
|
{{ $t("back_to_home") }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -27,37 +21,22 @@
|
|||||||
<p class="pl-6">
|
<p class="pl-6">
|
||||||
{{ $t("email") }}
|
{{ $t("email") }}
|
||||||
</p>
|
</p>
|
||||||
<input
|
<input v-model="userStore.email" :placeholder="$t('email')" type="text"
|
||||||
v-model="userStore.email"
|
class="border-2 border-block placeholder:text-gray dark:placeholder:text-button-disabled text-bg-dark dark:text-bg-light rounded-lg px-6 h-[50px] sm:h-[67px] w-full focus:outline-none focus:ring-0 focus:border-2">
|
||||||
:placeholder="$t('email')"
|
|
||||||
type="text"
|
|
||||||
class="border-2 border-block placeholder:text-gray dark:placeholder:text-button-disabled text-bg-dark dark:text-bg-light rounded-lg px-6 h-[50px] sm:h-[67px] w-full focus:outline-none focus:ring-0 focus:border-2"
|
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="space-y-[15px]">
|
<div class="space-y-[15px]">
|
||||||
<p class="pl-6">
|
<p class="pl-6">
|
||||||
{{ $t("password") }}
|
{{ $t("password") }}
|
||||||
</p>
|
</p>
|
||||||
<input
|
<input v-model="userStore.password" :placeholder="$t('placeholder_password')" type="text"
|
||||||
v-model="userStore.password"
|
class="border-2 border-block placeholder:text-gray dark:placeholder:text-button-disabled text-bg-dark dark:text-bg-light rounded-lg px-6 h-[50px] sm:h-[67px] w-full focus:outline-none focus:ring-0 focus:border-2">
|
||||||
:placeholder="$t('placeholder_password')"
|
|
||||||
type="text"
|
|
||||||
class="border-2 border-block placeholder:text-gray dark:placeholder:text-button-disabled text-bg-dark dark:text-bg-light rounded-lg px-6 h-[50px] sm:h-[67px] w-full focus:outline-none focus:ring-0 focus:border-2"
|
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p
|
<p class="text-button hover:text-button-hover transition-all font-medium mt-[30px] cursor-pointer">
|
||||||
class="text-button hover:text-button-hover transition-all font-medium mt-[30px] cursor-pointer"
|
|
||||||
>
|
|
||||||
{{ $t("forgot_password_question") }}
|
{{ $t("forgot_password_question") }}
|
||||||
</p>
|
</p>
|
||||||
<div
|
<div class="py-[25px] sm:py-12 border-b border-gray flex justify-center w-full">
|
||||||
class="py-[25px] sm:py-12 border-b border-gray flex justify-center w-full"
|
<UiButtonArrow type="fill" :arrow="true" @click="userStore.logIn()">
|
||||||
>
|
|
||||||
<UiButtonArrow type="fill"
|
|
||||||
:arrow="true"
|
|
||||||
@click="userStore.logIn()"
|
|
||||||
>
|
|
||||||
{{
|
{{
|
||||||
$t("login")
|
$t("login")
|
||||||
}}
|
}}
|
||||||
@ -74,17 +53,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</UiContainer>
|
</UiContainer>
|
||||||
|
|
||||||
<UiContainer v-if="userStore.vCodeVerify"
|
<UiContainer v-if="userStore.vCodeVerify" class="flex py-20 sm:py-14">
|
||||||
class="flex py-20 sm:py-14"
|
<div class="hidden xl:block rounded-2xl min-w-[60%] h-[830px]" :style="{
|
||||||
>
|
backgroundImage: `url('/api/public/file/${component.img[0]}_l.webp')`,
|
||||||
<div
|
backgroundSize: 'cover',
|
||||||
class="hidden xl:block rounded-2xl min-w-[60%] h-[830px]"
|
backgroundPosition: 'center',
|
||||||
:style="{
|
}" />
|
||||||
backgroundImage: `url('/api/public/file/${component.img[0]}_l.webp')`,
|
|
||||||
backgroundSize: 'cover',
|
|
||||||
backgroundPosition: 'center',
|
|
||||||
}"
|
|
||||||
/>
|
|
||||||
<div class="w-full sm:w-[80%] mx-auto my-auto xl:w-full xl:px-12">
|
<div class="w-full sm:w-[80%] mx-auto my-auto xl:w-full xl:px-12">
|
||||||
<div class="space-25-55">
|
<div class="space-25-55">
|
||||||
<div class="flex flex-wrap-reverse gap-y-4 justify-between">
|
<div class="flex flex-wrap-reverse gap-y-4 justify-between">
|
||||||
@ -93,8 +67,7 @@
|
|||||||
</h2>
|
</h2>
|
||||||
<button
|
<button
|
||||||
class="h-[40px] sm:h-[43px] px-[10px] sm:px-[17px] border border-gray dark:border-button-disabled text-gray dark:text-button-disabled hover:bg-gray transition-all hover:text-white rounded-[8px] cursor-pointer"
|
class="h-[40px] sm:h-[43px] px-[10px] sm:px-[17px] border border-gray dark:border-button-disabled text-gray dark:text-button-disabled hover:bg-gray transition-all hover:text-white rounded-[8px] cursor-pointer"
|
||||||
@click="menuStore.navigateToItem()"
|
@click="menuStore.navigateToItem()">
|
||||||
>
|
|
||||||
{{ $t("back_to_home") }}
|
{{ $t("back_to_home") }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -108,21 +81,13 @@
|
|||||||
<p class="pl-6">
|
<p class="pl-6">
|
||||||
{{ $t("code") }}
|
{{ $t("code") }}
|
||||||
</p>
|
</p>
|
||||||
<input
|
<input v-model="userStore.vCode" :placeholder="$t('code')" type="text"
|
||||||
v-model="userStore.vCode"
|
class="border-2 border-block placeholder:text-gray dark:placeholder:text-button-disabled text-bg-dark dark:text-bg-light rounded-lg px-6 h-[50px] sm:h-[67px] w-full focus:outline-none focus:ring-0 focus:border-2">
|
||||||
:placeholder="$t('code')"
|
|
||||||
type="text"
|
|
||||||
class="border-2 border-block placeholder:text-gray dark:placeholder:text-button-disabled text-bg-dark dark:text-bg-light rounded-lg px-6 h-[50px] sm:h-[67px] w-full focus:outline-none focus:ring-0 focus:border-2"
|
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="py-[25px] sm:py-12 flex justify-center w-full">
|
<div class="py-[25px] sm:py-12 flex justify-center w-full">
|
||||||
<UiButtonArrow
|
<UiButtonArrow type="fill" :arrow="true" @click="userStore.sendFormCode(true)">
|
||||||
type="fill"
|
|
||||||
:arrow="true"
|
|
||||||
@click="userStore.sendFormCode(true)"
|
|
||||||
>
|
|
||||||
{{ $t("confirm") }}
|
{{ $t("confirm") }}
|
||||||
</UiButtonArrow>
|
</UiButtonArrow>
|
||||||
</div>
|
</div>
|
||||||
@ -139,13 +104,9 @@ defineProps<{
|
|||||||
component_name: string
|
component_name: string
|
||||||
is_no_lang: boolean
|
is_no_lang: boolean
|
||||||
page_name: string
|
page_name: string
|
||||||
front_section_lang: {
|
|
||||||
data: {}
|
|
||||||
id_front_section: number
|
|
||||||
id_lang: number
|
|
||||||
}[]
|
|
||||||
}
|
}
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const menuStore = useMenuStore()
|
const menuStore = useMenuStore()
|
||||||
</script>
|
</script>
|
||||||
|
@ -300,6 +300,9 @@ const isInfo = ref<boolean>(true)
|
|||||||
const selectedFilters = ref<any>([])
|
const selectedFilters = ref<any>([])
|
||||||
const categoryId = ref<number>(1)
|
const categoryId = ref<number>(1)
|
||||||
|
|
||||||
|
console.log(selectedFilters.value);
|
||||||
|
|
||||||
|
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const reachedEnd = ref(false)
|
const reachedEnd = ref(false)
|
||||||
|
|
||||||
|
@ -205,7 +205,7 @@ export const useCheckoutStore = defineStore('checkoutStore', () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const changeActive = (item: any) => {
|
const changeActive = (item: AddressesList) => {
|
||||||
activeAddress.value = item
|
activeAddress.value = item
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -263,6 +263,15 @@ export const useCheckoutStore = defineStore('checkoutStore', () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type DeliveryOption = {
|
||||||
|
country_iso: string
|
||||||
|
country_name: string
|
||||||
|
delivery_supplier_id: number
|
||||||
|
delivery_supplier_name: string
|
||||||
|
id: number
|
||||||
|
shippment_price: string
|
||||||
|
}
|
||||||
|
|
||||||
// get delivery options
|
// get delivery options
|
||||||
const deliveryOption = ref()
|
const deliveryOption = ref()
|
||||||
const currentDelivery = ref()
|
const currentDelivery = ref()
|
||||||
@ -270,18 +279,7 @@ export const useCheckoutStore = defineStore('checkoutStore', () => {
|
|||||||
async function getDeliveryOptions() {
|
async function getDeliveryOptions() {
|
||||||
try {
|
try {
|
||||||
const { data } = await useMyFetch<
|
const { data } = await useMyFetch<
|
||||||
GenericResponseItems<{
|
GenericResponseItems<DeliveryOption[]>
|
||||||
items: [
|
|
||||||
{
|
|
||||||
country_iso: string
|
|
||||||
country_name: string
|
|
||||||
delivery_supplier_id: number
|
|
||||||
delivery_supplier_name: string
|
|
||||||
id: number
|
|
||||||
shippment_price: string
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}>
|
|
||||||
>(`/api/restricted/cart/checkout/delivery-options`, {
|
>(`/api/restricted/cart/checkout/delivery-options`, {
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
@ -312,7 +310,7 @@ export const useCheckoutStore = defineStore('checkoutStore', () => {
|
|||||||
GenericResponse<{
|
GenericResponse<{
|
||||||
addresses: [
|
addresses: [
|
||||||
{
|
{
|
||||||
is_default: string
|
is_default: boolean
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}>
|
}>
|
||||||
@ -329,7 +327,7 @@ export const useCheckoutStore = defineStore('checkoutStore', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
defaultAddress.value = data.addresses.find(
|
defaultAddress.value = data.addresses.find(
|
||||||
(el: any) => el.is_default === true,
|
(el: { is_default: boolean }) => el.is_default === true,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
|
Reference in New Issue
Block a user