diff --git a/src/components/Item.js b/src/components/Item.js index 50c0c61..a8e26a9 100644 --- a/src/components/Item.js +++ b/src/components/Item.js @@ -5,6 +5,7 @@ const Item = ({ forCart, forInvoice, portrait, + hideDetails, name: initialName, description: initialDescription, price: initialPrice, @@ -147,75 +148,14 @@ const Item = ({ )} )} -
- {forInvoice && -
- ⌧ -
- } - {/* Title under image for portrait, non-overlay */} - {portrait && null} - {!portrait && ( -
-

{displayName}

- {initialDescription && !forInvoice && ( -

{initialDescription}

- )} - {!forInvoice && ( -
- {promoPrice && promoPrice != 0 && promoPrice != '' ? ( - <> -
- Rp {formatCurrency(promoPrice)} - Rp {formatCurrency(initialPrice)} -
- - ) : ( - Rp {formatCurrency(initialPrice)} - )} -
- )} -
- )} - {forInvoice && ( - <> -

x

-

{itemQty}

- - )} - - {!forInvoice && ( - portrait ? ( - (blank || isBeingEdit) ? ( -
- -
- ) : null - ) : ( - !isBeingEdit ? ( -
-
- - {itemQty} - -
-
- ) : ( -
- -
- ) - ) - )} - - {forInvoice && ( + {forInvoice && ( +
+
+

x

+

{itemQty}

Rp {formatCurrency(itemQty * (promoPrice > 0 ? promoPrice : itemPrice))}

- )} -
+
+ )} {forCart && (
ⓧ @@ -227,4 +167,4 @@ const Item = ({ ); }; -export default Item; \ No newline at end of file +export default Item; diff --git a/src/components/Item.module.css b/src/components/Item.module.css index 7c2ac2f..41ef6b1 100644 --- a/src/components/Item.module.css +++ b/src/components/Item.module.css @@ -20,10 +20,7 @@ position: relative; } -.item:hover { - box-shadow: 0 4px 12px rgba(0,0,0,0.12); - transform: translateY(-2px); -} +.item:hover { /* remove hover effect on list items */ } /* Portrait variant for cafe page grid */ .itemPortrait { @@ -726,10 +723,7 @@ transition: all 0.2s ease; } -.item-card:hover { - box-shadow: 0 4px 16px rgba(0,0,0,0.12); - transform: translateY(-2px); -} +.item-card:hover { /* no hover */ } /* List variant */ .item-list-item { @@ -743,6 +737,4 @@ transition: all 0.2s ease; } -.item-list-item:hover { - box-shadow: 0 2px 8px rgba(0,0,0,0.1); -} \ No newline at end of file +.item-list-item:hover { /* no hover */ } diff --git a/src/components/ItemConfig.module.css b/src/components/ItemConfig.module.css index 09ebce5..816cbd1 100644 --- a/src/components/ItemConfig.module.css +++ b/src/components/ItemConfig.module.css @@ -8,7 +8,7 @@ bottom: 0; display: flex; flex-direction: column-reverse; - z-index: 200; + z-index: 2147483600 !important; /* above watermark and page layers */ background-color: rgba(0, 0, 0, 0.38); /* #00000061 */ } @@ -98,4 +98,4 @@ display: flex; justify-content: center; align-items: center; -} \ No newline at end of file +} diff --git a/src/components/ItemLister.js b/src/components/ItemLister.js index 199fbc9..1fd0cc4 100644 --- a/src/components/ItemLister.js +++ b/src/components/ItemLister.js @@ -88,7 +88,7 @@ const ItemLister = ({ availability: true, selectedImage: null, })); - const displayItems = showGrid ? [...items, ...dummyItems] : items; + const displayItems = items; // no dummy items on cafe page const handlePlusClick = (itemId) => { const updatedItems = items.map((item) => { @@ -913,7 +913,7 @@ const ItemLister = ({ cancelEdit={() => toggleAddNewItem()} handleCreateItem={onCreateItem} /> - + )} @@ -977,6 +977,7 @@ const ItemLister = ({ qty={item.qty} imageUrl={item.image} imageFile={item.selectedImage} + hideDetails={!showGrid} onPlusClick={() => handlePlusClick(item.itemId)} onNegativeClick={() => handleNegativeClick(item.itemId)} onRemoveClick={() => handleRemoveClick(item.itemId)} @@ -991,7 +992,7 @@ const ItemLister = ({ ) : null; })} - {(showGrid ? [...items, ...dummyItems] : items).map((item, indexx) => { + {items.map((item, indexx) => { return !forCart || (forCart && item.qty > 0) ? (
@@ -1061,10 +1062,11 @@ const ItemLister = ({ =200) */ overflow-y: auto; } @@ -97,7 +97,7 @@ margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); position: relative; - z-index: 151; + z-index: 0 !important; /* ensure behind modal overlay */ } .titleActions { @@ -120,7 +120,7 @@ transition: all 0.2s ease; box-shadow: 0 1px 3px rgba(0,0,0,0.05); position: relative; - z-index: 152; + z-index: 0 !important; /* ensure behind modal overlay */ } .iconBtn:disabled { opacity: 0.5; @@ -169,26 +169,50 @@ } .add-item-button { - margin-top: 16px; - padding: 12px 20px; - font-size: 16px; - background-color: #359d42d1; - color: #fff; + margin: 0; /* follow parent gap for top/bottom spacing */ + display: inline-block; + width: 275px; /* requested size */ + height: 275px; /* requested size */ + padding: 0; /* match image padding (none) */ border: none; - border-radius: 10px; + background: transparent; /* card drawn via ::before */ + color: transparent; /* no visible text */ + border-radius: 12px; /* match portrait image radius */ cursor: pointer; - transition: all 0.2s ease; - box-shadow: 0 2px 6px rgba(53, 157, 66, 0.2); - display: flex; - align-items: center; - justify-content: center; - gap: 8px; + transition: none; + box-shadow: none; position: relative; - z-index: 151; + z-index: 1; /* behind modal overlay */ } + +.add-item-button::before { + content: ""; + position: absolute; + inset: 0; /* fill container */ + border-radius: 12px; /* match portrait image radius */ + background: + /* vertical bar */ + linear-gradient(var(--brand-sage, #6B8F71), var(--brand-sage, #6B8F71)) center/5px 20% no-repeat, + /* horizontal bar */ + linear-gradient(var(--brand-sage, #6B8F71), var(--brand-sage, #6B8F71)) center/20% 5px no-repeat, + /* base */ + var(--brand-sage-50, #F0F6F2); + border: 2px dashed var(--brand-sage, #6B8F71); + box-shadow: 0 4px 12px rgba(0,0,0,0.10); +} + +.add-item-button:focus-visible { + outline: 2px solid var(--brand-sage, #6B8F71); + outline-offset: 2px; + border-radius: 12px; +} + +/* Overlay text inside the left tile area */ +.add-item-button::after { content: none; } + .add-item-button:hover { - background-color: #2d8a39; - box-shadow: 0 4px 10px rgba(53, 157, 66, 0.3); + background-color: #ffffff; + box-shadow: none; } .item-list { @@ -196,7 +220,20 @@ flex-direction: column; gap: 16px; position: relative; - z-index: 150; + z-index: 0 !important; /* ensure behind modal overlay */ +} + +/* Generic switch row styling reused in multiple spots */ +.switch-container { + display: inline-flex; + align-items: center; + gap: 8px; +} + +.switch-label { + font-size: 13px; + font-weight: 600; + color: #333; } /* Grid layout for portrait cards on cafe page */ @@ -234,33 +271,62 @@ position: relative; z-index: 150; } -.itemWrapper:hover { - box-shadow: 0 4px 12px rgba(0,0,0,0.12); - transform: translateY(-2px); -} +.itemWrapper:hover { /* remove hover effect */ } -.editModeLayout { - border-radius: 12px 12px 0 0; +.editModeLayout { + /* Turn full-width bar into subtle corner controls over image */ position: absolute; - z-index: 155; /* Memastikan berada di atas itemWrapper */ - background-color: #000000cc; - width: 100%; - top: 0; - left: 0; - right: 0; - display: flex; - flex-direction: row; - align-items: center; - justify-content: space-between; - font-size: 14px; - padding: 12px 16px; - color: white; + inset: 0; + z-index: 155; /* above itemWrapper */ + pointer-events: none; /* only children are interactive */ } -.editModeLayout h3 { - margin: 0; - font-weight: 500; - font-size: 14px; +/* Left badge: availability switch + label */ +.editModeLayout > div:first-child { + position: absolute; + top: 16px; + left: 16px; + display: inline-flex; + align-items: center; + gap: 8px; + background: rgba(0, 0, 0, 0.55); + color: #fff; + border-radius: 999px; + padding: 6px 10px; + pointer-events: auto; + backdrop-filter: blur(2px); +} + +/* Right badge: edit/unmark button */ +.editModeLayout > div:last-child { + position: absolute; + top: 16px; + right: 16px; + display: inline-flex; + align-items: center; + justify-content: center; + width: 32px; + height: 32px; + background: rgba(0, 0, 0, 0.55); + color: #fff; + border-radius: 999px; + pointer-events: auto; + cursor: pointer; + transition: background 0.2s ease, transform 0.2s ease; + backdrop-filter: blur(2px); +} + +.editModeLayout > div:last-child:hover { + background: rgba(0, 0, 0, 0.7); + transform: translateY(-1px); +} + +/* When label exists, keep it compact and readable */ +.editModeLayout .switch-label { + font-size: 12px; + font-weight: 600; + color: #fff; + white-space: nowrap; } .PaymentOption { @@ -384,4 +450,4 @@ color: #727272; font-size: 12px; text-decoration: line-through; -} \ No newline at end of file +} diff --git a/src/components/Modal.module.css b/src/components/Modal.module.css index b1d694b..308981b 100644 --- a/src/components/Modal.module.css +++ b/src/components/Modal.module.css @@ -8,7 +8,7 @@ display: flex; justify-content: center; align-items: center; - z-index: 9999; + z-index: 2147483647 !important; /* ensure above any app layers */ padding: 20px; }