# 03 – CRM (leads, follow-ups, customers)

Tested in the QA company only · Pages: Add Lead, Follow Up Leads, Quotation Leads, Missed Followups, Bulk Upload Leads, Customer, Direct Customer, Add/Edit Customer

## Works fine

- All 8 CRM pages open. Add Lead (Follow Up and Quotation types) saves and shows the lead in the right list.
- Live messages on Add Lead: "Please enter a valid email…", "Phone must be 10 digits". Duplicate email → "This email already exists in your company."
- Lead: View side panel, Edit (values pre-filled, saves), Delete (asks "Are you sure?", then removes).
- Customer: Add (all required fields, mailing address, credit limit), View, Edit (pre-filled, saves), Active/Inactive switch (asks first: "customer will be immediately unable to log in").
- Assign User opens. Bulk Upload page and the Excel template download (200 OK).
- A new customer can log in and reaches the customer dashboard.

## Issues

| # | Sev | What the user experiences | Steps | Evidence |
|---|-----|---------------------------|-------|----------|
| C1 | Medium | **A brand-new company has empty Lead Status / Customer Type lists** (also Lead Source, Equipment) but they are required. It works once they are added under Master, but the form gives no hint: the only message is "The lead status field is required." | New company → Add Lead / Add Customer → open the dropdowns | `screens/lead_valid_no_status.png` |
| C2 | Medium – *fixed locally, awaiting upload* | **An empty follow-up is saved with "Follow-up saved successfully".** No status, date or remarks needed; the lead moves to the Follow Up list as "Completed". | Follow Up Leads (New) → Add Follow Up → Save with nothing filled | `screens/followup_list_after_empty.png` |
| C3 | Medium – *fixed locally, awaiting upload* | **A phone number used by a lead/customer in ANY company blocked the same phone in every other company**, with a technical message ("The phone has already been taken" / "The contacts number has already been taken"). A new lead/customer must only be blocked if the phone already exists **in the same company**. (My first note that carriers/users also blocked it was not correct for leads – only company-wide duplicates did.) | Add a lead/customer whose phone another company already has | `screens/lead_dup_phone.png`, `screens/cust_dup_phone.png` |
| C4 | Medium | **A script file is missing on every CRM page** (`assets/bsmultiselect/bootstrap-multiselect.min.js` → 404) and Add Lead, Add Customer, Missed Followups and Direct Customer also throw script errors (`addEventListener` / `classList` of null, `backdrop` of undefined). Dropdowns/pop-ups may misbehave. | Open those pages, look at the browser console | – |
| C5 | Medium (security) | **New customers get the default password `12345678`** and the login worked with it. | Add Customer without a password → log in with 12345678 | `screens/customer_portal_landing.png` |
| C6 | Low | **Login button stays disabled** for a customer/carrier email until the user clicks the "Customer" tile – no hint (admins are pre-selected). | Type a customer email on the login page | `screens/login_customer_before_portal_click.png` |
| C7 | Low | No clear confirmation after Edit lead, Delete lead or Update customer – the page just reloads. | Do each action | – |
| C8 | Low | Typo on every list: **"From Begninig to End"**. | Open any CRM list | `screens/crm_list_FollowUp_Leads_latest.png` |
| C9 | Low | Add Lead shows red "This field is required" under Company/Lead Name **before** anything is typed. | Open Add Lead | `screens/crm_page_add_lead.png` |
| C10 | Low | IDs of a new company start high (Lead 1535, Customer 1536) instead of 1; edit URL id differs from the shown Lead ID. | Create first lead | `screens/lead_created.png` |

## Not tested (and why)

- Bulk **import of a file** – the drag-and-drop box cannot be driven by my browser tool.
- Assigning a lead/customer to a **staff user** (the QA company has no staff yet), Upload Agreement, rating, Add To Quotation (Quotation module), print/export buttons, search/filter combinations.
- Real company data and speed with large lists – only the empty QA company was used.
