diff --git a/apps/user-app/public/img/products/bracelets-0.svg b/apps/user-app/public/img/products/bracelets-0.svg new file mode 100644 index 0000000..55a604e --- /dev/null +++ b/apps/user-app/public/img/products/bracelets-0.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/apps/user-app/public/img/products/bracelets-1.svg b/apps/user-app/public/img/products/bracelets-1.svg new file mode 100644 index 0000000..74d6640 --- /dev/null +++ b/apps/user-app/public/img/products/bracelets-1.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/apps/user-app/public/img/products/bracelets-2.svg b/apps/user-app/public/img/products/bracelets-2.svg new file mode 100644 index 0000000..c47e7c9 --- /dev/null +++ b/apps/user-app/public/img/products/bracelets-2.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/apps/user-app/public/img/products/bracelets-3.svg b/apps/user-app/public/img/products/bracelets-3.svg new file mode 100644 index 0000000..679a23a --- /dev/null +++ b/apps/user-app/public/img/products/bracelets-3.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/apps/user-app/public/img/products/bracelets-4.svg b/apps/user-app/public/img/products/bracelets-4.svg new file mode 100644 index 0000000..fe8c95f --- /dev/null +++ b/apps/user-app/public/img/products/bracelets-4.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/apps/user-app/public/img/products/bracelets-5.svg b/apps/user-app/public/img/products/bracelets-5.svg new file mode 100644 index 0000000..bde5b3f --- /dev/null +++ b/apps/user-app/public/img/products/bracelets-5.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/apps/user-app/public/img/products/coins-0.svg b/apps/user-app/public/img/products/coins-0.svg new file mode 100644 index 0000000..dfd45b2 --- /dev/null +++ b/apps/user-app/public/img/products/coins-0.svg @@ -0,0 +1,6 @@ + + + + Au + + \ No newline at end of file diff --git a/apps/user-app/public/img/products/coins-1.svg b/apps/user-app/public/img/products/coins-1.svg new file mode 100644 index 0000000..f361a45 --- /dev/null +++ b/apps/user-app/public/img/products/coins-1.svg @@ -0,0 +1,6 @@ + + + + Au + + \ No newline at end of file diff --git a/apps/user-app/public/img/products/coins-2.svg b/apps/user-app/public/img/products/coins-2.svg new file mode 100644 index 0000000..f047ea2 --- /dev/null +++ b/apps/user-app/public/img/products/coins-2.svg @@ -0,0 +1,6 @@ + + + + Au + + \ No newline at end of file diff --git a/apps/user-app/public/img/products/coins-3.svg b/apps/user-app/public/img/products/coins-3.svg new file mode 100644 index 0000000..2a33792 --- /dev/null +++ b/apps/user-app/public/img/products/coins-3.svg @@ -0,0 +1,6 @@ + + + + Au + + \ No newline at end of file diff --git a/apps/user-app/public/img/products/coins-4.svg b/apps/user-app/public/img/products/coins-4.svg new file mode 100644 index 0000000..53c3e23 --- /dev/null +++ b/apps/user-app/public/img/products/coins-4.svg @@ -0,0 +1,6 @@ + + + + Au + + \ No newline at end of file diff --git a/apps/user-app/public/img/products/coins-5.svg b/apps/user-app/public/img/products/coins-5.svg new file mode 100644 index 0000000..5e6e030 --- /dev/null +++ b/apps/user-app/public/img/products/coins-5.svg @@ -0,0 +1,6 @@ + + + + Au + + \ No newline at end of file diff --git a/apps/user-app/public/img/products/earrings-0.svg b/apps/user-app/public/img/products/earrings-0.svg new file mode 100644 index 0000000..078e3ee --- /dev/null +++ b/apps/user-app/public/img/products/earrings-0.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/apps/user-app/public/img/products/earrings-1.svg b/apps/user-app/public/img/products/earrings-1.svg new file mode 100644 index 0000000..154406e --- /dev/null +++ b/apps/user-app/public/img/products/earrings-1.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/apps/user-app/public/img/products/earrings-2.svg b/apps/user-app/public/img/products/earrings-2.svg new file mode 100644 index 0000000..9139d6e --- /dev/null +++ b/apps/user-app/public/img/products/earrings-2.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/apps/user-app/public/img/products/earrings-3.svg b/apps/user-app/public/img/products/earrings-3.svg new file mode 100644 index 0000000..f176aac --- /dev/null +++ b/apps/user-app/public/img/products/earrings-3.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/apps/user-app/public/img/products/earrings-4.svg b/apps/user-app/public/img/products/earrings-4.svg new file mode 100644 index 0000000..6bb871a --- /dev/null +++ b/apps/user-app/public/img/products/earrings-4.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/apps/user-app/public/img/products/earrings-5.svg b/apps/user-app/public/img/products/earrings-5.svg new file mode 100644 index 0000000..149648c --- /dev/null +++ b/apps/user-app/public/img/products/earrings-5.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/apps/user-app/public/img/products/necklaces-0.svg b/apps/user-app/public/img/products/necklaces-0.svg new file mode 100644 index 0000000..6515a59 --- /dev/null +++ b/apps/user-app/public/img/products/necklaces-0.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/apps/user-app/public/img/products/necklaces-1.svg b/apps/user-app/public/img/products/necklaces-1.svg new file mode 100644 index 0000000..bde3ce6 --- /dev/null +++ b/apps/user-app/public/img/products/necklaces-1.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/apps/user-app/public/img/products/necklaces-2.svg b/apps/user-app/public/img/products/necklaces-2.svg new file mode 100644 index 0000000..2bd0775 --- /dev/null +++ b/apps/user-app/public/img/products/necklaces-2.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/apps/user-app/public/img/products/necklaces-3.svg b/apps/user-app/public/img/products/necklaces-3.svg new file mode 100644 index 0000000..e9cc04b --- /dev/null +++ b/apps/user-app/public/img/products/necklaces-3.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/apps/user-app/public/img/products/necklaces-4.svg b/apps/user-app/public/img/products/necklaces-4.svg new file mode 100644 index 0000000..c76fbe4 --- /dev/null +++ b/apps/user-app/public/img/products/necklaces-4.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/apps/user-app/public/img/products/necklaces-5.svg b/apps/user-app/public/img/products/necklaces-5.svg new file mode 100644 index 0000000..25e7a73 --- /dev/null +++ b/apps/user-app/public/img/products/necklaces-5.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/apps/user-app/public/img/products/rings-0.svg b/apps/user-app/public/img/products/rings-0.svg new file mode 100644 index 0000000..04c1ca8 --- /dev/null +++ b/apps/user-app/public/img/products/rings-0.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/apps/user-app/public/img/products/rings-1.svg b/apps/user-app/public/img/products/rings-1.svg new file mode 100644 index 0000000..51a686d --- /dev/null +++ b/apps/user-app/public/img/products/rings-1.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/apps/user-app/public/img/products/rings-2.svg b/apps/user-app/public/img/products/rings-2.svg new file mode 100644 index 0000000..5be6059 --- /dev/null +++ b/apps/user-app/public/img/products/rings-2.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/apps/user-app/public/img/products/rings-3.svg b/apps/user-app/public/img/products/rings-3.svg new file mode 100644 index 0000000..0a27af8 --- /dev/null +++ b/apps/user-app/public/img/products/rings-3.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/apps/user-app/public/img/products/rings-4.svg b/apps/user-app/public/img/products/rings-4.svg new file mode 100644 index 0000000..59d0505 --- /dev/null +++ b/apps/user-app/public/img/products/rings-4.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/apps/user-app/public/img/products/rings-5.svg b/apps/user-app/public/img/products/rings-5.svg new file mode 100644 index 0000000..d758277 --- /dev/null +++ b/apps/user-app/public/img/products/rings-5.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/apps/user-app/src/api/client.ts b/apps/user-app/src/api/client.ts index 2b2f9bb..d75f0aa 100644 --- a/apps/user-app/src/api/client.ts +++ b/apps/user-app/src/api/client.ts @@ -19,6 +19,12 @@ export interface ProductVariantSummary { title: string; rashWeightGrams: string; defaultWagePercent: string; + /// On-hand stock and the "orderable at zero stock" flag. Both exist on + /// ProductVariant and are already returned by GET /catalog/products (the + /// catalog service includes every variant field) — declared here so the UI + /// can read them. + qty?: number; + isPreOrder?: boolean; } export interface CategorySummary { @@ -43,6 +49,9 @@ export interface ProductSummary { id: string; title: string; description: string | null; + /// Legacy Product.product_code — the human-facing code. Already returned by + /// GET /catalog/products. + productCode?: string | null; variants: ProductVariantSummary[]; images: Array<{ url: string }>; category: CategorySummary | null; diff --git a/apps/user-app/src/components/home/AccountStrip.vue b/apps/user-app/src/components/home/AccountStrip.vue new file mode 100644 index 0000000..747fe20 --- /dev/null +++ b/apps/user-app/src/components/home/AccountStrip.vue @@ -0,0 +1,229 @@ + + + + + + diff --git a/apps/user-app/src/components/home/CategoryRail.vue b/apps/user-app/src/components/home/CategoryRail.vue new file mode 100644 index 0000000..ea4252b --- /dev/null +++ b/apps/user-app/src/components/home/CategoryRail.vue @@ -0,0 +1,94 @@ + + + + + + diff --git a/apps/user-app/src/components/home/RateStrip.vue b/apps/user-app/src/components/home/RateStrip.vue new file mode 100644 index 0000000..939ce2c --- /dev/null +++ b/apps/user-app/src/components/home/RateStrip.vue @@ -0,0 +1,107 @@ + + + + + + diff --git a/apps/user-app/src/components/home/SectionHead.vue b/apps/user-app/src/components/home/SectionHead.vue new file mode 100644 index 0000000..d68150e --- /dev/null +++ b/apps/user-app/src/components/home/SectionHead.vue @@ -0,0 +1,59 @@ + + + + + + diff --git a/apps/user-app/src/components/home/ShowcaseCard.vue b/apps/user-app/src/components/home/ShowcaseCard.vue new file mode 100644 index 0000000..bd7257e --- /dev/null +++ b/apps/user-app/src/components/home/ShowcaseCard.vue @@ -0,0 +1,150 @@ + + + + + + diff --git a/apps/user-app/src/components/home/ShowcaseSlider.vue b/apps/user-app/src/components/home/ShowcaseSlider.vue new file mode 100644 index 0000000..2ca7eb6 --- /dev/null +++ b/apps/user-app/src/components/home/ShowcaseSlider.vue @@ -0,0 +1,201 @@ + + + + + + diff --git a/apps/user-app/src/components/product/SingleProduct.vue b/apps/user-app/src/components/product/SingleProduct.vue index 7b92274..1d1aee0 100644 --- a/apps/user-app/src/components/product/SingleProduct.vue +++ b/apps/user-app/src/components/product/SingleProduct.vue @@ -1,156 +1,220 @@ + + diff --git a/apps/user-app/src/composables/useProduct.ts b/apps/user-app/src/composables/useProduct.ts index 9691efe..0abe7d1 100644 --- a/apps/user-app/src/composables/useProduct.ts +++ b/apps/user-app/src/composables/useProduct.ts @@ -36,7 +36,13 @@ export function useProduct(productItem: ProductSummary, initialVariant?: Product const min_gram = computed(() => selectedVariant.value ? parseFloat(selectedVariant.value.rashWeightGrams) : 0) const wage = computed(() => (selectedVariant.value ? parseFloat(selectedVariant.value.defaultWagePercent) : null)) const hasDiscountWage = ref(null) // no promotions backend yet — see file header - const is_exist = ref(true) // no stock field on ProductVariant yet + // REAL stock: ProductVariant.qty / isPreOrder exist and are returned by + // GET /catalog/products. A variant is orderable when it has stock, or when + // it is flagged pre-order — the same rule the admin cart uses. + const qty = computed(() => selectedVariant.value?.qty ?? 0) + const isPreOrder = computed(() => selectedVariant.value?.isPreOrder ?? false) + const is_exist = computed(() => qty.value > 0 || isPreOrder.value) + const productCode = computed(() => product.value.productCode ?? null) const has_warranty = ref(false) // no warranty field on ProductVariant yet return { @@ -44,11 +50,14 @@ export function useProduct(productItem: ProductSummary, initialVariant?: Product image, id, title, + productCode, variants, selectedVariant, min_gram, wage, hasDiscountWage, + qty, + isPreOrder, is_exist, has_warranty, } diff --git a/apps/user-app/src/views/HomeView.vue b/apps/user-app/src/views/HomeView.vue index aae2c2a..b449984 100644 --- a/apps/user-app/src/views/HomeView.vue +++ b/apps/user-app/src/views/HomeView.vue @@ -1,126 +1,381 @@ + + diff --git a/apps/user-app/themeConfig/colors.json b/apps/user-app/themeConfig/colors.json index af56960..49344f5 100644 --- a/apps/user-app/themeConfig/colors.json +++ b/apps/user-app/themeConfig/colors.json @@ -22,5 +22,17 @@ "gray-400": "#9ca3af", "gray-500": "#6b7280", "green": "#16a34a", - "red": "#dc2626" + "red": "#dc2626", + "ink": "#14161A", + "inkSoft": "#22262E", + "inkMuted": "#5B616E", + "inkFaint": "#8A909C", + "wine": "#7A1B33", + "wineDeep": "#5E1427", + "wineSoft": "#A33C55", + "wineWash": "#FBF2F4", + "canvas": "#FFFFFF", + "canvasSoft": "#FAFAFA", + "hairline": "#ECEDEF", + "hairlineSoft": "#F4F5F6" }