chore: update
This commit is contained in:
@@ -88,7 +88,7 @@ func (d *Database) GetProductByID(id int) (models.Product, error) {
|
|||||||
|
|
||||||
var p models.Product
|
var p models.Product
|
||||||
err := d.GDB.Raw(`
|
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
|
FROM products
|
||||||
WHERE id = ?`, id).Scan(&p).Error
|
WHERE id = ?`, id).Scan(&p).Error
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -115,7 +115,7 @@ func (d *Database) GetAllProducts() ([]models.Product, error) {
|
|||||||
|
|
||||||
var products []models.Product
|
var products []models.Product
|
||||||
err := d.GDB.Raw(`
|
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
|
FROM products
|
||||||
ORDER BY id ASC`).Scan(&products).Error
|
ORDER BY id ASC`).Scan(&products).Error
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -153,7 +153,7 @@ func (d *Database) GetProductsByCategory(category string) ([]models.Product, err
|
|||||||
|
|
||||||
var products []models.Product
|
var products []models.Product
|
||||||
err := d.GDB.Raw(`
|
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
|
FROM products
|
||||||
WHERE category = ?
|
WHERE category = ?
|
||||||
ORDER BY created_at DESC`, category).Scan(&products).Error
|
ORDER BY created_at DESC`, category).Scan(&products).Error
|
||||||
|
|||||||
@@ -70,19 +70,19 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
z-index: 5;
|
z-index: 5;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
background-color: rgba(245, 158, 11, 0.95);
|
background-color: rgba(0, 0, 0, 0.8);
|
||||||
color: white;
|
color: rgba(34, 197, 94, 0.95);
|
||||||
border: 6px solid white;
|
border: 6px solid rgba(34, 197, 94, 0.95);
|
||||||
padding: clamp(0.5rem, 2vw, 0.8rem) clamp(1.5rem, 5vw, 2.5rem);
|
padding: clamp(0.5rem, 2vw, 0.8rem) clamp(1.5rem, 5vw, 2.5rem);
|
||||||
font-size: clamp(1.1rem, 4.5vw, 1.8rem);
|
font-size: clamp(1.1rem, 4.5vw, 1.8rem);
|
||||||
font-weight: 900;
|
font-weight: 900;
|
||||||
letter-spacing: 3px;
|
letter-spacing: 3px;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
white-space: nowrap;
|
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:
|
text-shadow:
|
||||||
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.6);
|
-2px -2px 6px rgba(0, 0, 0, 0.9);
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-card.out-of-stock {
|
.product-card.out-of-stock {
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ function ProductCard({
|
|||||||
{isOutOfStock && (
|
{isOutOfStock && (
|
||||||
<div className="sold-out-overlay">SOLD OUT</div>
|
<div className="sold-out-overlay">SOLD OUT</div>
|
||||||
)}
|
)}
|
||||||
{isComingSoon && !isOutOfStock && (
|
{isComingSoon && (
|
||||||
<div className="coming-soon-overlay">À VENIR</div>
|
<div className="coming-soon-overlay">À VENIR</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -139,9 +139,9 @@
|
|||||||
top: 50%;
|
top: 50%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translate(-50%, -50%) rotate(-15deg);
|
transform: translate(-50%, -50%) rotate(-15deg);
|
||||||
background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
|
background: rgba(0, 0, 0, 0.8);
|
||||||
color: white;
|
color: rgba(34, 197, 94, 0.95);
|
||||||
border: 4px solid white;
|
border: 4px solid rgba(34, 197, 94, 0.95);
|
||||||
padding: clamp(1rem, 4vw, 1.5rem) clamp(2.5rem, 8vw, 4rem);
|
padding: clamp(1rem, 4vw, 1.5rem) clamp(2.5rem, 8vw, 4rem);
|
||||||
font-size: clamp(2rem, 8vw, 3.5rem);
|
font-size: clamp(2rem, 8vw, 3.5rem);
|
||||||
font-weight: 900;
|
font-weight: 900;
|
||||||
@@ -149,16 +149,16 @@
|
|||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
box-shadow:
|
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);
|
0 8px 32px rgba(0, 0, 0, 0.6);
|
||||||
text-shadow:
|
text-shadow:
|
||||||
2px 2px 12px rgba(0, 0, 0, 0.9),
|
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;
|
z-index: 10;
|
||||||
animation: pulseAmber 2s infinite;
|
animation: pulseGreen 2s infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes pulseAmber {
|
@keyframes pulseGreen {
|
||||||
0%, 100% {
|
0%, 100% {
|
||||||
transform: translate(-50%, -50%) rotate(-15deg) scale(1);
|
transform: translate(-50%, -50%) rotate(-15deg) scale(1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -249,7 +249,7 @@ function ProductDetail() {
|
|||||||
className="product-detail-image"
|
className="product-detail-image"
|
||||||
/>
|
/>
|
||||||
{isOutOfStock && <div className="sold-out-badge">SOLD OUT</div>}
|
{isOutOfStock && <div className="sold-out-badge">SOLD OUT</div>}
|
||||||
{isComingSoon && !isOutOfStock && <div className="coming-soon-badge">À VENIR</div>}
|
{isComingSoon && <div className="coming-soon-badge">À VENIR</div>}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="product-info-section">
|
<div className="product-info-section">
|
||||||
|
|||||||
@@ -466,14 +466,14 @@ const styles = StyleSheet.create({
|
|||||||
{ translateY: -25 },
|
{ translateY: -25 },
|
||||||
{ rotate: "-15deg" },
|
{ rotate: "-15deg" },
|
||||||
],
|
],
|
||||||
backgroundColor: "rgba(0,0,0,0.75)",
|
backgroundColor: "rgba(0,0,0,0.8)",
|
||||||
borderWidth: 4,
|
borderWidth: 4,
|
||||||
borderColor: "rgba(245,158,11,0.95)",
|
borderColor: "rgba(34,197,94,0.95)",
|
||||||
paddingHorizontal: 22,
|
paddingHorizontal: 22,
|
||||||
paddingVertical: 12,
|
paddingVertical: 12,
|
||||||
},
|
},
|
||||||
comingSoonText: {
|
comingSoonText: {
|
||||||
color: "rgba(245,158,11,0.95)",
|
color: "rgba(34,197,94,0.95)",
|
||||||
fontSize: 24,
|
fontSize: 24,
|
||||||
fontWeight: "900",
|
fontWeight: "900",
|
||||||
letterSpacing: 2,
|
letterSpacing: 2,
|
||||||
|
|||||||
@@ -218,15 +218,15 @@ export default function ProductDetailScreen() {
|
|||||||
{ translateY: -30 },
|
{ translateY: -30 },
|
||||||
{ rotate: "-15deg" },
|
{ rotate: "-15deg" },
|
||||||
],
|
],
|
||||||
backgroundColor: "rgba(245,158,11,0.95)",
|
backgroundColor: "rgba(0,0,0,0.8)",
|
||||||
borderWidth: 4,
|
borderWidth: 4,
|
||||||
borderColor: colors.white,
|
borderColor: "rgba(34,197,94,0.95)",
|
||||||
paddingHorizontal: 40,
|
paddingHorizontal: 40,
|
||||||
paddingVertical: 16,
|
paddingVertical: 16,
|
||||||
elevation: 10,
|
elevation: 10,
|
||||||
},
|
},
|
||||||
comingSoonText: {
|
comingSoonText: {
|
||||||
color: colors.white,
|
color: "rgba(34,197,94,0.95)",
|
||||||
fontSize: 28,
|
fontSize: 28,
|
||||||
fontWeight: "900",
|
fontWeight: "900",
|
||||||
letterSpacing: 4,
|
letterSpacing: 4,
|
||||||
@@ -544,7 +544,7 @@ export default function ProductDetailScreen() {
|
|||||||
<Text style={styles.soldOutText}>SOLD OUT</Text>
|
<Text style={styles.soldOutText}>SOLD OUT</Text>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
{isComingSoon && !isOutOfStock && (
|
{isComingSoon && (
|
||||||
<View style={styles.comingSoonBadge}>
|
<View style={styles.comingSoonBadge}>
|
||||||
<Text style={styles.comingSoonText}>À VENIR</Text>
|
<Text style={styles.comingSoonText}>À VENIR</Text>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
Reference in New Issue
Block a user