Overview
This PR (mo/fix_user_breaks_update_button, PR #417) fixes two unrelated but long-standing bugs in Dentolize. Both are "silent failure" bugs: the UI or database looked fine at a glance, but a specific action didn't do what it was supposed to.
What's fixed
1. The break-time "Update" button in User Calendar Settings could get stuck disabled. If a receptionist or clinic admin opened a user's calendar settings and only added or edited a lunch/prayer break (without touching any other field), the Update button could stay disabled and refuse to save — because the button's "did anything change?" check never looked at the one thing that did change. See Calendar Break Update Button.
2. Patient tags never made it back to the linked WhatsApp conversation. Dentolize's WhatsApp integration keeps its own copy of a patient's tags on the OnlineConversation record (used for WhatsApp automation and filtering conversations by tag). Whenever staff edited a lead's tags — or created a new patient straight from a WhatsApp chat — that copy was supposed to be updated to match. It never was, because the code guarding the update was checking a field that had never actually been fetched from the database, so the guard was always false. See WhatsApp Conversation Tag Sync.
Why this matters
Both bugs are the frustrating kind: they don't throw errors, they don't show up in logs, and the rest of the form works fine — a save just quietly doesn't happen, or a WhatsApp automation rule that filters by tag quietly never fires because the conversation's tag list is stale. Nobody gets an error message; they just get confused about why "nothing changed."
Scope
This is a small, targeted bug-fix PR — five files, no schema changes, no new UI. There are no new screens or settings to learn; existing screens now behave the way they were always meant to.
| Area | Files touched (in /work/repo) |
|---|---|
| Calendar break button | packages/clinic-web/src/components/dashboard/settings/Users/UserCalendarSettingsTab.js |
| Lead tag sync | packages/server/src/resolvers/mutations/actions/leads/editLead.js |
| New-patient tag sync | packages/server/src/resolvers/mutations/actions/patient/addNewPatient.js |
| Pre-filling tags into the new-patient form | packages/clinic-web/src/components/dashboard/officialWhatsapp/conversations/NewPatientButton.js, packages/clinic-mobile/src/components/dashboard/WhatsApp/conversationMessages/ConversationMessagesScreen.js |
This feature is unreleased — it ships with this PR and has not yet reached customers.