Each discrete item (pre-roll, edible, etc.) is now always one physical unit with its own asset ID. The quantity field is gone from both add and edit flows, countOriginal is hardcoded to 1, and price is just "Price" instead of "Price per unit." Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -216,35 +216,11 @@ export function ProductDetail({
|
||||
>
|
||||
{(
|
||||
[
|
||||
["Price", fmt.money(item.price)],
|
||||
[
|
||||
"Price",
|
||||
item.kind === "discrete" && item.countOriginal > 0 ? (
|
||||
<>
|
||||
{fmt.money(item.price / item.countOriginal)}
|
||||
<span style={{ fontSize: 14, color: "var(--ink-3)", marginLeft: 4 }}>
|
||||
/unit
|
||||
</span>
|
||||
<div
|
||||
style={{
|
||||
fontSize: 11,
|
||||
color: "var(--ink-3)",
|
||||
fontWeight: 400,
|
||||
marginTop: 2,
|
||||
fontFamily: "var(--mono)",
|
||||
letterSpacing: 0,
|
||||
}}
|
||||
>
|
||||
{fmt.money(item.price)} total
|
||||
</div>
|
||||
</>
|
||||
) : (
|
||||
fmt.money(item.price)
|
||||
),
|
||||
],
|
||||
[
|
||||
item.kind === "discrete" ? "Quantity" : "Size",
|
||||
item.kind === "discrete" ? "Unit weight" : "Size",
|
||||
item.kind === "discrete"
|
||||
? `${item.countOriginal} ${cfg?.unit ?? "ct"}`
|
||||
? `${item.unitWeight} g`
|
||||
: `${item.weight} ${cfg?.unit ?? "g"}`,
|
||||
],
|
||||
["THC", `${item.thc.toFixed(1)}%`],
|
||||
|
||||
Reference in New Issue
Block a user