diff --git a/backend/gestion/db/db_product.go b/backend/gestion/db/db_product.go index d085b16f..95e639b8 100644 --- a/backend/gestion/db/db_product.go +++ b/backend/gestion/db/db_product.go @@ -88,7 +88,7 @@ func (d *Database) GetProductByID(id int) (models.Product, error) { var p models.Product err := d.GDB.Raw(` - SELECT id, name, category, description, stock, unit, created_at, updated_at + SELECT id, name, category, description, stock, unit, coming_soon, created_at, updated_at FROM products WHERE id = ?`, id).Scan(&p).Error if err != nil { @@ -115,7 +115,7 @@ func (d *Database) GetAllProducts() ([]models.Product, error) { var products []models.Product err := d.GDB.Raw(` - SELECT id, name, category, description, stock, unit, created_at, updated_at + SELECT id, name, category, description, stock, unit, coming_soon, created_at, updated_at FROM products ORDER BY id ASC`).Scan(&products).Error if err != nil { @@ -153,7 +153,7 @@ func (d *Database) GetProductsByCategory(category string) ([]models.Product, err var products []models.Product err := d.GDB.Raw(` - SELECT id, name, category, description, stock, unit, created_at, updated_at + SELECT id, name, category, description, stock, unit, coming_soon, created_at, updated_at FROM products WHERE category = ? ORDER BY created_at DESC`, category).Scan(&products).Error diff --git a/frontend-prep/src/components/ProductCard.css b/frontend-prep/src/components/ProductCard.css index ff17b978..9dc7be91 100644 --- a/frontend-prep/src/components/ProductCard.css +++ b/frontend-prep/src/components/ProductCard.css @@ -70,19 +70,19 @@ text-align: center; z-index: 5; pointer-events: none; - background-color: rgba(245, 158, 11, 0.95); - color: white; - border: 6px solid white; + background-color: rgba(0, 0, 0, 0.8); + color: rgba(34, 197, 94, 0.95); + border: 6px solid rgba(34, 197, 94, 0.95); padding: clamp(0.5rem, 2vw, 0.8rem) clamp(1.5rem, 5vw, 2.5rem); font-size: clamp(1.1rem, 4.5vw, 1.8rem); font-weight: 900; letter-spacing: 3px; text-transform: uppercase; white-space: nowrap; - box-shadow: 0 0 8px rgba(245, 158, 11, 0.6); + box-shadow: 0 0 8px rgba(34, 197, 94, 0.6); text-shadow: - 2px 2px 6px rgba(0, 0, 0, 0.6), - -2px -2px 6px rgba(0, 0, 0, 0.6); + 2px 2px 6px rgba(0, 0, 0, 0.9), + -2px -2px 6px rgba(0, 0, 0, 0.9); } .product-card.out-of-stock { diff --git a/frontend-prep/src/components/ProductCard.tsx b/frontend-prep/src/components/ProductCard.tsx index 287d6ba6..07e9b4dd 100644 --- a/frontend-prep/src/components/ProductCard.tsx +++ b/frontend-prep/src/components/ProductCard.tsx @@ -159,7 +159,7 @@ function ProductCard({ {isOutOfStock && (
SOLD OUT
)} - {isComingSoon && !isOutOfStock && ( + {isComingSoon && (
À VENIR
)} diff --git a/frontend-prep/src/pages/User/ProductDetail.css b/frontend-prep/src/pages/User/ProductDetail.css index dfc40b8f..1a08706f 100644 --- a/frontend-prep/src/pages/User/ProductDetail.css +++ b/frontend-prep/src/pages/User/ProductDetail.css @@ -139,9 +139,9 @@ top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-15deg); - background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); - color: white; - border: 4px solid white; + background: rgba(0, 0, 0, 0.8); + color: rgba(34, 197, 94, 0.95); + border: 4px solid rgba(34, 197, 94, 0.95); padding: clamp(1rem, 4vw, 1.5rem) clamp(2.5rem, 8vw, 4rem); font-size: clamp(2rem, 8vw, 3.5rem); font-weight: 900; @@ -149,16 +149,16 @@ text-transform: uppercase; white-space: nowrap; box-shadow: - 0 0 40px rgba(245, 158, 11, 0.8), + 0 0 40px rgba(34, 197, 94, 0.6), 0 8px 32px rgba(0, 0, 0, 0.6); text-shadow: 2px 2px 12px rgba(0, 0, 0, 0.9), - 0 0 20px rgba(255, 255, 255, 0.3); + 0 0 20px rgba(34, 197, 94, 0.3); z-index: 10; - animation: pulseAmber 2s infinite; + animation: pulseGreen 2s infinite; } -@keyframes pulseAmber { +@keyframes pulseGreen { 0%, 100% { transform: translate(-50%, -50%) rotate(-15deg) scale(1); } diff --git a/frontend-prep/src/pages/User/ProductDetail.tsx b/frontend-prep/src/pages/User/ProductDetail.tsx index 686ceb89..1730d99a 100644 --- a/frontend-prep/src/pages/User/ProductDetail.tsx +++ b/frontend-prep/src/pages/User/ProductDetail.tsx @@ -249,7 +249,7 @@ function ProductDetail() { className="product-detail-image" /> {isOutOfStock &&
SOLD OUT
} - {isComingSoon && !isOutOfStock &&
À VENIR
} + {isComingSoon &&
À VENIR
}
diff --git a/mobile/src/components/ProductCard.tsx b/mobile/src/components/ProductCard.tsx index f58fe9ca..8341a764 100644 --- a/mobile/src/components/ProductCard.tsx +++ b/mobile/src/components/ProductCard.tsx @@ -466,14 +466,14 @@ const styles = StyleSheet.create({ { translateY: -25 }, { rotate: "-15deg" }, ], - backgroundColor: "rgba(0,0,0,0.75)", + backgroundColor: "rgba(0,0,0,0.8)", borderWidth: 4, - borderColor: "rgba(245,158,11,0.95)", + borderColor: "rgba(34,197,94,0.95)", paddingHorizontal: 22, paddingVertical: 12, }, comingSoonText: { - color: "rgba(245,158,11,0.95)", + color: "rgba(34,197,94,0.95)", fontSize: 24, fontWeight: "900", letterSpacing: 2, diff --git a/mobile/src/screens/client/ProductDetailScreen.tsx b/mobile/src/screens/client/ProductDetailScreen.tsx index be84485e..780404e0 100644 --- a/mobile/src/screens/client/ProductDetailScreen.tsx +++ b/mobile/src/screens/client/ProductDetailScreen.tsx @@ -218,15 +218,15 @@ export default function ProductDetailScreen() { { translateY: -30 }, { rotate: "-15deg" }, ], - backgroundColor: "rgba(245,158,11,0.95)", + backgroundColor: "rgba(0,0,0,0.8)", borderWidth: 4, - borderColor: colors.white, + borderColor: "rgba(34,197,94,0.95)", paddingHorizontal: 40, paddingVertical: 16, elevation: 10, }, comingSoonText: { - color: colors.white, + color: "rgba(34,197,94,0.95)", fontSize: 28, fontWeight: "900", letterSpacing: 4, @@ -544,7 +544,7 @@ export default function ProductDetailScreen() { SOLD OUT )} - {isComingSoon && !isOutOfStock && ( + {isComingSoon && ( À VENIR