Bundles: protect their parts from deletion, show the saving #8

Merged
reudy merged 2 commits from bundle-parts-sale-price into main 2026-10-26 12:02:42 +01:00

2 commits

Author SHA1 Message Date
23c5b70a93 Shop: show the bundle's separate price as a saving; hide unsellable bundles
Bundle cards show what the parts cost one by one, crossed out when it's
more than the bundle price. Bundles with a part that isn't on sale are
left out of the shop data, so their parts always have names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-26 09:04:35 +00:00
338aef9e01 Bundles: keep parts from being deleted out from under them
Bundle parts are JSON, so deleting a service left bundles pointing at
nothing (shown as "Item" in the shop). An onRecordDelete hook on items
now refuses while a bundle contains it or a usable code still has
sessions of it to book. A bundle with an inactive part is no longer sold
or issued; the admin items list marks it "Not on sale" and shows how many
codes are waiting on an inactive service.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-26 09:04:35 +00:00