# Feature Spec: Announcements & Mass Communication

**Priority**: 🟡 Medium  
**Phase**: 9  
**Status**: ✅ Implemented

---

## Overview

Enable facility-wide announcements, team messaging, shift handoffs, and emergency alerts. Ensure message acknowledgement for compliance.

---

## Models

### Announcement

- `id`: UUID
- `title`: string
- `content`: string (markdown supported)
- `priority`: enum (LOW, NORMAL, HIGH, CRITICAL)
- `targetRoles`: string[] (which roles see this)
- `requiresAck`: boolean
- `expiresAt`: datetime (optional)
- `createdById`: FK to User
- `createdAt`: datetime

### AnnouncementAck

- `id`: UUID
- `announcementId`: FK
- `userId`: FK
- `readAt`: datetime
- `acknowledged`: boolean
- `acknowledgedAt`: datetime (optional)

### ShiftNote

- `id`: UUID
- `content`: string
- `importance`: enum (LOW, NORMAL, HIGH)
- `roomId`: FK (optional)
- `batchId`: FK (optional)
- `createdById`: FK to User
- `createdAt`: datetime

---

## API Endpoints

### Announcements

- `GET /api/messaging/announcements` - List active announcements
- `POST /api/messaging/announcements` - Create announcement (admin)
- `GET /api/messaging/announcements/:id` - Get details
- `PUT /api/messaging/announcements/:id` - Update
- `DELETE /api/messaging/announcements/:id` - Delete
- `POST /api/messaging/announcements/:id/acknowledge` - Ack
- `GET /api/messaging/announcements/:id/status` - Ack status (admin)
- `GET /api/messaging/pending` - Pending acks for current user

### Shift Notes

- `GET /api/messaging/shift-notes` - List shift notes
- `POST /api/messaging/shift-notes` - Create note
- `GET /api/messaging/shift-notes/:id` - Get note
- `DELETE /api/messaging/shift-notes/:id` - Delete

---

## Frontend Components

### AnnouncementBanner

- Displays at top of layout
- Critical priority = red, High = amber, Normal = blue
- Expandable to show all active
- Acknowledge button for required messages

### ShiftNotesWidget

- Shows on dashboard
- Filter by room/batch
- Quick add functionality

---

## Compliance Notes

- Required acknowledgements tracked per user
- Admin can view acknowledgement status
- All announcements immutably logged
- Audit trail for compliance reporting
