errors fixing

This commit is contained in:
2025-07-03 13:27:25 +02:00
parent 90e1d70f64
commit 69b0c0f976
3 changed files with 41 additions and 79 deletions

View File

@ -1,15 +1,10 @@
<template>
<UiContainer v-if="!userStore.vCodeVerify"
class="flex py-20 sm:py-14"
>
<div
class="hidden xl:block rounded-2xl min-w-[60%] h-[830px]"
:style="{
<UiContainer v-if="!userStore.vCodeVerify" 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')`,
backgroundSize: 'cover',
backgroundPosition: 'center',
}"
/>
}" />
<div class="w-full sm:w-[80%] mx-auto my-auto xl:w-full xl:px-12">
<div class="space-25-55">
<div class="flex flex-wrap-reverse gap-y-4 justify-between">
@ -18,8 +13,7 @@
</h2>
<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"
@click="menuStore.navigateToItem()"
>
@click="menuStore.navigateToItem()">
{{ $t("back_to_home") }}
</button>
</div>
@ -27,37 +21,22 @@
<p class="pl-6">
{{ $t("email") }}
</p>
<input
v-model="userStore.email"
: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"
>
<input v-model="userStore.email" :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 class="space-y-[15px]">
<p class="pl-6">
{{ $t("password") }}
</p>
<input
v-model="userStore.password"
: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"
>
<input v-model="userStore.password" :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>
<p
class="text-button hover:text-button-hover transition-all font-medium mt-[30px] cursor-pointer"
>
<p class="text-button hover:text-button-hover transition-all font-medium mt-[30px] cursor-pointer">
{{ $t("forgot_password_question") }}
</p>
<div
class="py-[25px] sm:py-12 border-b border-gray flex justify-center w-full"
>
<UiButtonArrow type="fill"
:arrow="true"
@click="userStore.logIn()"
>
<div class="py-[25px] sm:py-12 border-b border-gray flex justify-center w-full">
<UiButtonArrow type="fill" :arrow="true" @click="userStore.logIn()">
{{
$t("login")
}}
@ -74,17 +53,12 @@
</div>
</UiContainer>
<UiContainer v-if="userStore.vCodeVerify"
class="flex py-20 sm:py-14"
>
<div
class="hidden xl:block rounded-2xl min-w-[60%] h-[830px]"
:style="{
<UiContainer v-if="userStore.vCodeVerify" 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')`,
backgroundSize: 'cover',
backgroundPosition: 'center',
}"
/>
}" />
<div class="w-full sm:w-[80%] mx-auto my-auto xl:w-full xl:px-12">
<div class="space-25-55">
<div class="flex flex-wrap-reverse gap-y-4 justify-between">
@ -93,8 +67,7 @@
</h2>
<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"
@click="menuStore.navigateToItem()"
>
@click="menuStore.navigateToItem()">
{{ $t("back_to_home") }}
</button>
</div>
@ -108,21 +81,13 @@
<p class="pl-6">
{{ $t("code") }}
</p>
<input
v-model="userStore.vCode"
: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"
>
<input v-model="userStore.vCode" :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 class="py-[25px] sm:py-12 flex justify-center w-full">
<UiButtonArrow
type="fill"
:arrow="true"
@click="userStore.sendFormCode(true)"
>
<UiButtonArrow type="fill" :arrow="true" @click="userStore.sendFormCode(true)">
{{ $t("confirm") }}
</UiButtonArrow>
</div>
@ -139,13 +104,9 @@ defineProps<{
component_name: string
is_no_lang: boolean
page_name: string
front_section_lang: {
data: {}
id_front_section: number
id_lang: number
}[]
}
}>()
const userStore = useUserStore()
const menuStore = useMenuStore()
</script>

View File

@ -300,6 +300,9 @@ const isInfo = ref<boolean>(true)
const selectedFilters = ref<any>([])
const categoryId = ref<number>(1)
console.log(selectedFilters.value);
const loading = ref(false)
const reachedEnd = ref(false)

View File

@ -205,7 +205,7 @@ export const useCheckoutStore = defineStore('checkoutStore', () => {
}
}
const changeActive = (item: any) => {
const changeActive = (item: AddressesList) => {
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
const deliveryOption = ref()
const currentDelivery = ref()
@ -270,18 +279,7 @@ export const useCheckoutStore = defineStore('checkoutStore', () => {
async function getDeliveryOptions() {
try {
const { data } = await useMyFetch<
GenericResponseItems<{
items: [
{
country_iso: string
country_name: string
delivery_supplier_id: number
delivery_supplier_name: string
id: number
shippment_price: string
},
]
}>
GenericResponseItems<DeliveryOption[]>
>(`/api/restricted/cart/checkout/delivery-options`, {
headers: {
'Content-Type': 'application/json',
@ -312,7 +310,7 @@ export const useCheckoutStore = defineStore('checkoutStore', () => {
GenericResponse<{
addresses: [
{
is_default: string
is_default: boolean
},
]
}>
@ -329,7 +327,7 @@ export const useCheckoutStore = defineStore('checkoutStore', () => {
})
defaultAddress.value = data.addresses.find(
(el: any) => el.is_default === true,
(el: { is_default: boolean }) => el.is_default === true,
)
}
catch (error) {