═══════════════════════════════════════════════════════════════════════════════ CiC WALKTHROUGH PROMPT — Customer Management mini-PWA (Phases 1–5) URL: https://srv1111289.hstgr.cloud/sales/customers/ SW version expected: customers-v4 Login required: harish or pramod (default Phase-1 access grant) Test dataset: load sales/customers/test_data.sql first (8 customers / 13 contacts / 10 addresses / 6 leads / 7 opportunities / 12 communications). Cleanup: sales/customers/test_data_cleanup.sql ═══════════════════════════════════════════════════════════════════════════════ Paste this whole block into Claude-in-Chrome. Mark each checkpoint as ✅ / ❌ inline with a one-line observation. Pause for screenshot whenever a checkpoint says 📸. Report any unexpected behaviour at the end under "Surprises". You are walking through the Customer Management mini-PWA as a sales-ops user. The dataset is already loaded. Do NOT create your own customers from scratch during Parts 1–6 — only use the provided seed (cm-test-* IDs). Part 7 is the only section where you create new rows. ─── PART 1 — Landing & Search ───────────────────────────────────────────────── 1.1 Open the URL. You should land on the List screen with 3 tiles: Total = 8+ · Business = 5+ · Individual = 2+ (real production rows from prior session may also count) 👉 Verify all three tile numbers are populated, NOT "—". 📸 Screenshot the list with tiles. 1.2 Type "park" into the search box. 👉 List shrinks to 1 row: "Park Hospital Pvt Ltd" 👉 The badge reads "Business"; meta row shows 👤 Dr. Rajesh Mehta, 📞 9810012345, GST: 07AABCP1234F1Z5, 📍 Faridabad 1.3 Clear search. Type "9888". 👉 1 row appears: "Marketing Vibes Agency" (search hit on phone). 1.4 Clear search. Type "anil". 👉 1 row: "Anil Gupta" — badge reads "Individual". 1.5 Click chip "Individual". 👉 List filters to individuals only (Anil Gupta, Priya Khurana, plus any production individuals). 1.6 Click chip "All". ─── PART 2 — Customer Detail (Park Hospital) ────────────────────────────────── 2.1 Search "park" and open Park Hospital. Detail screen opens. 👉 Header: "Park Hospital Pvt Ltd", sub: "Business" 2.2 Info tab — verify 360 card at top has these cells: Jobs · Offers · Activity · Open Opps · Won · Lost Won value (lifetime) · Pipeline ₹ 👉 Offers cell ≥ 1, Open Opps ≥ 1, Won ≥ 1 👉 Won value should read at least ₹5.2L (₹520,000) 📸 Screenshot the 360 card. 2.3 Below the 360 card, Info shows the detail rows (Proprietor: Dr. Rajesh Mehta; Display name: Park Hospital; GSTIN: 07AABCP1234F1Z5; etc.) 👉 Aliases row shows "Park Hosp, Park" 2.4 Tap "Contacts" chip. 👉 3 contacts listed; Dr. Rajesh Mehta has both "primary" AND "PRIMARY" badges visible. Sunita = billing, Ramesh = site. 👉 Each row shows phone/whatsapp/email icons inline. 2.5 Tap "Addresses" chip. 👉 2 addresses: billing (default badge) + site. Both show "06" state code in meta row. Faridabad / Haryana. 2.6 Tap "Jobs" chip. 👉 If pre-Phase-2 jobs exist for "Park" they appear here. If none, see empty state. Either is OK — the join works both ways. 2.7 Tap "Offers" chip. 👉 If pre-Phase-2 offers exist with client_name LIKE "%park%" or with customer_id linked, they appear. (Acceptable to be empty if your DB has no Park-Hospital offers.) 2.8 Tap "Deals" chip. 👉 2 opportunity rows: "Q3 Dealer-Meet Branding" (qualification, ₹4.25L) and "Wellness Wing Inauguration" (won, ₹5.2L). 👉 Both rows are clickable and open the Opp modal. 2.9 Tap "Activity" chip. 👉 Comm thread appears with composer on top (Kind/Direction/Owner/ Subject/Body/Follow-up/Save) and 2 newest-first comm cards below. 👉 Top card: "meeting · outbound · 3 days ago · Harish Kumar Lal" with body about Q3 BTL + Wellness wing. 👉 Older card has 🔔 Follow-up date in YELLOW (it is overdue — yesterday in seed). 2.10 Edit a comm: change the subject in the composer to "Test note", click "Log activity". Verify a new card appears at top. Then click the ✕ on that new card to delete it. Verify it vanishes. (Do NOT delete any other comm.) 📸 Screenshot the Activity tab after the test note is gone. ─── PART 3 — Pipeline (Leads kanban) ────────────────────────────────────────── 3.1 Tap 🔁 Pipeline in bottom nav. 👉 Header shows "X leads · Y opportunities". Tile row: Total / Open / Pipeline ₹. 👉 Below summary, a follow-ups indicator is visible: either "🔔 N follow-up(s) due / overdue" (yellow) OR "✓ No overdue follow-ups" (green). In the seed dataset we PLANTED 1 overdue + 2 due-today follow-ups, so the indicator SHOULD be yellow with at least 3 items. 3.2 Owner chips visible directly below: "All · Unassigned · Harish Kumar Lal · pramod · (maybe more)". 👉 Click "Harish Kumar Lal" — Leads kanban filters: only Pooja, Mehul, Rajat cards remain (3 cards). 👉 Click "All" to clear. 3.3 Kanban has 5 columns: New / Contacted / Qualified / Disqualified / Converted. 👉 New = 2 cards (Pooja Reddy + Snehal Pawar) 👉 Contacted = 1 (Sameer Iyer) 👉 Qualified = 2 (Mehul, Kavita) 👉 Disqualified = 1 (Rajat) 👉 Each column header shows "(N · ₹XL)" totals. 📸 Screenshot the Leads kanban. 3.4 Tap card "Mehul Joshi". Lead modal opens. 👉 Title: "Edit Lead". Owner picker shows "Harish Kumar Lal · Developer & Operations" preselected. 👉 Status = Qualified. Source = Referral. Expected value = 750000. 👉 Scroll down — "🔁 Convert to Customer" button visible. 👉 "History" section may be empty (no status changes yet). 👉 "Activity" section shows 1 comm: "Joshi Realty Tower site (site_visit)" 3.5 Add a quick test note inside the lead's Activity composer: subject "PW test note", body "ignore", Save. Confirm it appears in the thread above. Delete it with ✕. 3.6 Close the modal with ✕. Back on kanban. ─── PART 4 — Opportunities kanban + By Owner ────────────────────────────────── 4.1 Switch to "💼 Opportunities" pipe-tab. 👉 Summary tiles change: Open / Won ₹ / Pipeline ₹ 👉 5 stage columns now visible. 👉 ALSO a new "By Owner" table appears between summary and kanban (this is hidden on Leads tab). 4.2 By Owner table columns: Owner · Open · Won · Pipeline ₹ · Won ₹ 👉 Harish Kumar Lal: open=3, won=1, pipeline ≈ ₹19.6L (sum of opp-1 ₹4.25L + opp-3 ₹12.5L + opp-5 ₹2.85L), won ≈ ₹5.2L 👉 pramod: open=2, won=0 (lost opp-7 doesn't add to won), pipeline ≈ ₹34.8L (₹6.8L + ₹28L) 📸 Screenshot the By Owner table. 4.3 Kanban distribution check: Qualification = 1 (Park — Q3 Dealer-Meet) Proposal = 2 (Verve Diwali, Marketing Vibes Punjab) Negotiation = 2 (Asian Paints Annual, Flux Launch) Won = 1 (Park Wellness) Lost = 1 (Everything Else) 4.4 Click card "Annual Trade-Marketing PA". Opp modal opens. 👉 Customer dropdown shows "Asian Paints Limited" + is DISABLED (cannot change customer on edit — by design). 👉 Stage = Negotiation. Owner = pramod (resolved name visible). 👉 Expected value = 2800000. 👉 Switch stage to "Lost" — a "Loss reason" field appears below. Change it back to "Negotiation"; field hides. 👉 Click ✕ to close WITHOUT saving any change. 4.5 Test owner-filter on Opps: Click "pramod" owner chip → kanban shrinks to pramod's cards only. By Owner table is NOT filtered (it shows everyone's totals — by design). Click "All" to clear. ─── PART 5 — Lead → Customer conversion ─────────────────────────────────────── 5.1 On Leads tab, click card "Pooja Reddy" (qualified status preferred for conversion, but new/contacted/qualified all work). Lead modal opens. 5.2 Tap "🔁 Convert to Customer". A confirm dialog asks to proceed → OK. 5.3 Expected outcome: 👉 Toast "✅ Converted — customer + opportunity created" 👉 Modal closes 👉 Lead moves to the "Converted" column 👉 A new customer "Aroma Wellness Spa" appears in the List screen (search "aroma" to find) 👉 A new opportunity appears on the Opps kanban in the Qualification column with name ≈ "Pooja Reddy — initial deal" OR the lead's notes text. Owner = harish, value = ₹1.8L (inherited). 📸 Screenshot Lead modal AFTER reopening Pooja's card — it should show status "Converted" and disable the Convert button. 5.4 Open the new "Aroma Wellness Spa" customer (List → search → tap). 👉 Activity / Deals / Contacts tabs should all show data inherited from the lead: 1 opp in Deals, 1 contact "Pooja Reddy" (since lead.name differed from lead.company). ─── PART 6 — Managed lookups (datalists) ────────────────────────────────────── 6.1 Tap ➕ Add bottom nav. Form opens. Type "Hosp" into Industry — datalist should suggest "Hospitality" (from the test seed). Similarly "VIP" / "Standard" / "Enterprise" in Customer Group, "Delhi-NCR" / "Mumbai" / etc. in Territory. 6.2 Cancel (back arrow) — don't save. The datalist suggestions reflect what's in the lookup tables. ─── PART 7 — Quick-add inline (Sales PWA integration check) ─────────────────── 7.1 Open /sales/ (NOT /sales/customers/). Go to "+ New Job" form. 7.2 In the Client input, type "Park" — suggestion dropdown shows "Park Hospital Pvt Ltd" with type-badge "BIZ" and meta (GST + primary contact name). 7.3 Click that suggestion. The field fills "Park Hospital Pvt Ltd" and a green "✓ linked" pill appears next to the label. 7.4 Type something not in the list: "Brand New Co {your initials}". Suggestion dropdown shows green "➕ Add 'Brand New Co XX' as new customer". Click it. 👉 Toast "✅ Customer added & linked" 👉 Field shows "Brand New Co XX" with the ✓ linked pill Cancel out of the job form. (No need to save the job.) 7.5 Go back to /sales/customers/. Search "brand new co" — your new customer should be there with note "Quick-added from Sales PWA". 7.6 CLEANUP: Open that quick-added customer → Edit → 🗑️ Soft-delete. Confirm it disappears from the list (it stays in DB with is_active=false). ─── PART 8 — Access gate ────────────────────────────────────────────────────── 8.1 /hub/ → log out → log in as a user WITHOUT customers access (e.g. ashok or amit). Open /sales/customers/. 👉 You should see "🔒 Access Restricted" screen with a Back to Hub button. The full PWA should NOT render. ─── Summary checklist ───────────────────────────────────────────────────────── [ ] Part 1 — Landing + Search [ ] Part 2 — Customer Detail (all 7 tabs) [ ] Part 3 — Leads kanban [ ] Part 4 — Opps kanban + By Owner [ ] Part 5 — Lead conversion [ ] Part 6 — Lookups datalists [ ] Part 7 — Sales PWA picker [ ] Part 8 — Access gate ═══════════════════════════════════════════════════════════════════════════════ SURPRISES / DEVIATIONS: (Report any failure, unexpected wording, missing element, slowness > 2s, visual glitch, or behaviour that contradicts the expected outcome above.) ═══════════════════════════════════════════════════════════════════════════════