Add Formula Library ratings, Job Profitability report, and Quote Revision History improvements

- Formula Library ratings: thumbs up/down per company per formula; toggle on/off; sorts by net score; own formulas not rateable; FormulaLibraryRating entity + migration AddFormulaLibraryRatings
- Job Profitability report: actual labor cost (logged hours x StandardLaborRate) vs powder cost vs billed price per job; gross margin % color-coded; time-tracked-only filter; totals footer
- Quote Revision History: track Total price changes on every save; log Sent/Resent events with recipient email; replace flat table with grouped timeline UI (icons per event type, total-change badge on header)
- Setup Wizard: cap CompletedCount at TotalSteps so old 10-step data no longer shows 10/5
- Formula Library card: fix badge overflow on long titles; add Rate: label to make voting buttons discoverable
- Help docs and AI knowledge base updated for all three features

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-01 09:02:07 -04:00
parent 81119035c7
commit ed35362c7a
24 changed files with 12273 additions and 75 deletions
@@ -242,6 +242,8 @@ public static class HelpKnowledgeBase
**Changing the customer on a quote:** On the Quote Details page, the Customer field is an always-visible dropdown. Select a different customer a confirmation banner appears asking you to confirm the change. Click **Save** to apply or **Cancel** to revert to the original. This is especially useful when a quote was created under the "Walk-In / Phone" placeholder and the real customer record is added later.
**Quote Revision History:** Every change to a quote is recorded in a timeline at the bottom of the Quote Details page. Changes from the same save are grouped into one revision entry. Tracked events include: total price changes (shown as oldnew badge on the revision header), status transitions, sent/resent events (including recipient email), approvals, line item adds/removes/edits, and field changes (dates, terms, notes, tax, discount). Timeline icons: blue envelope = sent to customer, green check = approved, red X = rejected, purple arrow = converted to job, grey pencil = general edit.
---
## JOBS
@@ -627,6 +629,7 @@ public static class HelpKnowledgeBase
- *Ask Your Financials* [/Reports/FinancialQuery](/Reports/FinancialQuery) natural language query interface. Type any financial question ("What were my top expenses last quarter?", "Which customers owe the most?") and the AI answers using your real data. Includes suggestion chips, follow-up prompts, supporting facts, and session history. The right panel shows a YTD financial snapshot (revenue, expenses, net income, open AR, open AP).
- *Powder Usage Report* powder consumption by item/job
- *Job Cycle Time Report* how long jobs spend in each status
- *Job Profitability Report* [/Reports/JobProfitability](/Reports/JobProfitability) compares each job's billed price against actual labor cost (logged hours × Standard Labor Rate) and estimated powder cost (lbs × cost/lb). Shows gross margin and margin % per job. Jobs without time entries show $0 labor cost; use the "Time-tracked jobs only" toggle to filter for accurate averages. Color-coded: green 40%, yellow 20%, red below 20%. This is a direct-cost margin only overhead and equipment are not broken out separately.
Most financial reports support PDF export. The Sales Tax Report also supports CSV export.
@@ -1443,7 +1446,8 @@ public static class HelpKnowledgeBase
- Importing: click Import to My Formulas in the preview modal a fully independent copy is added to your local library; edits to the copy do not affect the original. If the original creator deletes their diagram image, the image is automatically cleared from all imported copies.
- Attribution: every card shows the source company name. If a company imports a formula, modifies it, and re-shares it, the card displays "Inspired by [original name] from [original company]".
- Your own shared formulas: appear in the library with a gold "Your Formula" badge; Manage button links back to Company Settings. To remove from the library, click Unshare in the Library column existing imports are unaffected.
- Import counts are shown on each card and the library is sorted by popularity (most imported first).
- Import counts are shown on each card.
- Rating: each card from another company has thumbs-up / thumbs-down buttons labelled "Rate:". One vote per company per formula; clicking the same button again removes the vote; clicking the opposite button switches it. Cannot rate your own formulas. Library sorts by net rating (thumbs up minus thumbs down) then by import count.
---