Nouveau Deals

Deals: the tables and services for pipelines, stages and deals

Internal: the first slice of Deals adds its nine tables and the services that keep pipelines, stages, deals, their people, notes and history. No page uses them yet.

Internal: slice 1 of docs/specs/DEALS.md. Migration 11261 adds deal_pipelines, deal_stages, deal_lost_reasons, deals, deal_contacts, deal_notes, deal_events, deal_links and deal_preferences. The services in src/Services/Deals/ give a team its first pipeline (Sales, with four stages), add pipelines under the plan's limit of one on Free and ten on Pro and Team, keep a pipeline's stages in order with a chance of winning each, make deals and change their name, value, currency, expected close date, owner, stage and pipeline, mark them won, lost and reopened, keep their people, notes and lost reasons, and write each change to the deal's history. A Trash provider is written and joins Trash with the area. Nothing is reachable from a page yet; the area stays a site administrator preview.