feat: offer_type (una tantum/retainer), dedup tiers, redesigned Offerte tab
- offer_macros.offer_type ('una_tantum'|'retainer') + editor "Modalità" toggle
(migration 0012, applied to prod)
- migration 0012 also adds UNIQUE(macro_id, tier_letter) — prevents duplicate
tiers; ran after a one-time dedup of Web Domination's duplicate A/B/C tiers
- OffersTab redesigned: two-step assign (Offer → Tier cards with price), type
badge "Una tantum/Ricorrente" instead of misleading "X mesi", no redundant
"· A" when public_name == tier letter, cleaner active-offers cards
- getProjectFullDetail: availableMicros grouped by macro + defensive dedup;
projectOffers/availableMicros carry offer_type/category/price
- proposal deck PricingSection shows offer type (fallback to duration for
pre-existing proposals)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -279,6 +279,7 @@ export const offer_macros = pgTable("offer_macros", {
|
||||
description: text("description"), // short description shown on offer cards
|
||||
category: text("category"), // single-select "Categoria" (Entry/Signature/Retainer Offer) — OFFER-15/18
|
||||
ticket: text("ticket"), // single-select "Ticket" (Low/Mid/High Ticket) — OFFER-15
|
||||
offer_type: text("offer_type").notNull().default("una_tantum"), // una_tantum | retainer (v2.3)
|
||||
is_archived: boolean("is_archived").notNull().default(false), // OFFER-18 archive flag
|
||||
cliente_ideale: text("cliente_ideale"), // "Aiuto: [Cliente Ideale]"
|
||||
risultato: text("risultato"), // "A ottenere: [Risultato]"
|
||||
|
||||
Reference in New Issue
Block a user