From 939516a2803f45af3912d7304e166997c80265c6 Mon Sep 17 00:00:00 2001 From: Mamalizz Date: Thu, 27 Feb 2025 20:47:00 +0330 Subject: [PATCH 01/16] changed address text size --- frontend/components/cart/AddressItem.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/components/cart/AddressItem.vue b/frontend/components/cart/AddressItem.vue index a042ed9..a6a54a4 100644 --- a/frontend/components/cart/AddressItem.vue +++ b/frontend/components/cart/AddressItem.vue @@ -105,7 +105,7 @@ const handleDeleteAddress = (id: number) => { >
{{ !!address From dd78b22f32951ce18bd914b4e7bccedef2eae64d Mon Sep 17 00:00:00 2001 From: Mamalizz Date: Thu, 27 Feb 2025 20:47:11 +0330 Subject: [PATCH 02/16] added avatar group component --- frontend/components/global/AvatarGroup.vue | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 frontend/components/global/AvatarGroup.vue diff --git a/frontend/components/global/AvatarGroup.vue b/frontend/components/global/AvatarGroup.vue new file mode 100644 index 0000000..6e65bad --- /dev/null +++ b/frontend/components/global/AvatarGroup.vue @@ -0,0 +1,46 @@ + + + From e7ccb27e4017abb634c5e325b0335ba65034dcc0 Mon Sep 17 00:00:00 2001 From: Mamalizz Date: Thu, 27 Feb 2025 20:47:28 +0330 Subject: [PATCH 03/16] added new types --- frontend/types/global.d.ts | 132 +++++++++++++++++++++++-------------- 1 file changed, 81 insertions(+), 51 deletions(-) diff --git a/frontend/types/global.d.ts b/frontend/types/global.d.ts index 16ca7f9..10f0cb4 100644 --- a/frontend/types/global.d.ts +++ b/frontend/types/global.d.ts @@ -25,71 +25,73 @@ declare global { }; type ProductVariantAttribute = { - "id": number, - "attribute_type": { - "id": number, - "name": string - }, - "value": string - } + id: number; + attribute_type: { + id: number; + name: string; + }; + value: string; + }; type ProductImage = { - "id": number, - "name": string, - "image": string - } - + id: number; + name: string; + image: string; + }; type ProductDetailItem = { - "id": number, - "title": string, - "detail_text1": string, - "detail_text2": string, - "detail_text3": string, - "detail_text4": string - } + id: number; + title: string; + detail_text1: string; + detail_text2: string; + detail_text3: string; + detail_text4: string; + }; type ProductDetail = { - "id": number, - "detail": ProductDetailItem[], - "detail_category": number - } + id: number; + detail: ProductDetailItem[]; + detail_category: number; + }; type ProductInPackItem = { - "id": number, - "item_title": string, - "cover": string - } + id: number; + item_title: string; + cover: string; + }; type ProductVariant = { - "id": number, - "product_attributes": ProductVariantAttribute[], - "price": string, - "in_pack_items": ProductInPackItem[], - "details": ProductDetail[], - "images": ProductImage[], - "in_stock": number, - "discount": number, - "color": string, - "video": string | null + id: number; + product_attributes: ProductVariantAttribute[]; + price: string; + in_pack_items: ProductInPackItem[]; + details: ProductDetail[]; + images: ProductImage[]; + in_stock: number; + discount: number; + color: string; + video: string | null; }; type Product = { - "id": number, - "variants": ProductVariant[], - "related_products": ProductListItem[], - "name": string, - "description": string, - "rating": number, - "slug": string, - "meta_description": string | null, - "meta_keywords": string | null, - "meta_rating": number, - "category": number, - "colors": string[] - } + id: number; + variants: ProductVariant[]; + related_products: ProductListItem[]; + name: string; + description: string; + rating: number; + slug: string; + meta_description: string | null; + meta_keywords: string | null; + meta_rating: number; + category: number; + colors: string[]; + }; - type ProductListItem = Pick + type ProductListItem = Pick< + Product, + "id" | "variants" | "name" | "rating" | "slug" | "category" | "colors" + >; type Article = { id: number; @@ -166,12 +168,40 @@ declare global { onClick?: () => void; }; + type Order = { + id: number; + count: number; + images: string[]; + discount_code: string | null; + status: string; + is_paid: boolean; + created_at: string | null; + address: Address | null; + }; + + type ServerFile = { + id: number; + file_link: string; + date: string; + size: number; + name: string; + }; + + type TicketMessage = { + id: number; + content: string; + created_at: string; + attachments: ServerFile[]; + }; + type Ticket = { id: number; + messages: TicketMessage[]; subject: string; ticket_category: string; status: string; created_at: string; updated_at: string; + order: Order; }; } From 0bfb3c2697c8ca1e10f33e01bd1a91bf55635d45 Mon Sep 17 00:00:00 2001 From: Mamalizz Date: Thu, 27 Feb 2025 20:47:37 +0330 Subject: [PATCH 04/16] changed type --- frontend/components/global/FileInput.vue | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/frontend/components/global/FileInput.vue b/frontend/components/global/FileInput.vue index e0e3beb..8d0fad7 100644 --- a/frontend/components/global/FileInput.vue +++ b/frontend/components/global/FileInput.vue @@ -6,13 +6,7 @@ import { useToast } from "~/composables/global/useToast"; // types type Props = { - modelValue: { - id: number; - file_link: string; - date: string; - size: number; - name: string; - }[]; + modelValue: ServerFile[]; loading?: boolean; }; From 46e8d4b7abcf3aa4bd1bb9b834fefa712787f777 Mon Sep 17 00:00:00 2001 From: Mamalizz Date: Thu, 27 Feb 2025 20:47:54 +0330 Subject: [PATCH 05/16] changed first and last buttons --- frontend/components/global/Pagination.vue | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/frontend/components/global/Pagination.vue b/frontend/components/global/Pagination.vue index 875201c..0e3ee75 100644 --- a/frontend/components/global/Pagination.vue +++ b/frontend/components/global/Pagination.vue @@ -34,11 +34,11 @@ const page = computed({ v-model:page="page" > - - برو آخر - + برو اول + @@ -73,11 +73,12 @@ const page = computed({ > - - برو اول - + برو آخر + From 97d5b42652de3fb98d6c241abbc2c1f41f11618c Mon Sep 17 00:00:00 2001 From: Mamalizz Date: Thu, 27 Feb 2025 20:48:09 +0330 Subject: [PATCH 06/16] added loading for select --- frontend/components/global/Select.vue | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/frontend/components/global/Select.vue b/frontend/components/global/Select.vue index 45f9d9c..459509b 100644 --- a/frontend/components/global/Select.vue +++ b/frontend/components/global/Select.vue @@ -9,6 +9,7 @@ type Props = { options?: string[]; placeholder?: string; triggerRootClass?: string; + loading?: boolean; }; type Emits = { @@ -21,6 +22,7 @@ const props = withDefaults(defineProps(), { variant: "solid", disabled: false, placeholder: "وارد نشده", + loading: false, }); const { modelValue, variant, error, triggerRootClass } = toRefs(props); @@ -53,15 +55,25 @@ const classes = computed(() => {