feat(messaging): Add broadcast messaging system for owners and managers

- Add BroadcastMessage and MessageRecipient models for sending messages to groups or individuals
- Add Messages page with compose form and sent messages list
- Support targeting by role (owners, managers, staff, customers) or individual users
- Add can_send_messages permission (owners always, managers by default with revocable permission)
- Add autofill search dropdown with infinite scroll for selecting individual recipients
- Add staff permission toggle for managers' messaging access
- Integrate Messages link in sidebar for users with permission

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
poduck
2025-12-08 02:33:27 -05:00
parent 67ce2c433c
commit a4b23e44b6
17 changed files with 1782 additions and 27 deletions

View File

@@ -491,9 +491,31 @@
"reactivateAccount": "Reactivate Account",
"deactivateHint": "Prevent this user from logging in while keeping their data",
"reactivateHint": "Allow this user to log in again",
"canSendMessages": "Can send broadcast messages",
"canSendMessagesHint": "Send messages to groups of staff and customers",
"deactivate": "Deactivate",
"canInviteStaff": "Can invite new staff members",
"canInviteStaffHint": "Allow this manager to send invitations to new staff members",
"canManageResources": "Can manage resources",
"canManageResourcesHint": "Create, edit, and delete bookable resources",
"canManageServices": "Can manage services",
"canManageServicesHint": "Create, edit, and delete service offerings",
"canViewReports": "Can view reports",
"canViewReportsHint": "Access business analytics and financial reports",
"canAccessSettings": "Can access business settings",
"canAccessSettingsHint": "Modify business profile, branding, and configuration",
"canRefundPayments": "Can refund payments",
"canRefundPaymentsHint": "Process refunds for customer payments",
"canViewAllSchedules": "Can view all schedules",
"canViewAllSchedulesHint": "View schedules of other staff members (otherwise only their own)",
"canManageOwnAppointments": "Can manage own appointments",
"canManageOwnAppointmentsHint": "Create, reschedule, and cancel their own appointments",
"canSelfApproveTimeOff": "Can self-approve time off",
"canSelfApproveTimeOffHint": "Add time off without requiring manager/owner approval"
"canSelfApproveTimeOffHint": "Add time off without requiring manager/owner approval",
"canAccessTickets": "Can access support tickets",
"canAccessTicketsHint": "View and manage customer support tickets",
"managerPermissions": "Manager Permissions",
"staffPermissions": "Staff Permissions"
},
"staffDashboard": {
"welcomeTitle": "Welcome, {{name}}!",