# Phase 20 — Appointments & Scheduling

Adds a mobile-friendly appointment calendar and connects appointments to therapy sessions.

## Install

1. Copy the CRM package into `C:\laragon\www\crm`.
2. Keep your existing `.env` and storage data as appropriate.
3. Run **only** `database/migrations/014_phase20_appointments.sql` against `grow_tool_therapies_crm`.
4. Log in and open `/crm/public/appointments`.

## Workflow

Patient assignment → Appointment → Session → Completed → Billable → Invoice.

When a session is created from an appointment using the **Session** action, the session stores the appointment link and the appointment is marked completed after the session is saved.

## Permissions

- Admin/Super Admin: view, create and edit all appointments.
- Therapist: view, create and edit only appointments for their own active patient assignments.
- Therapists cannot use appointments to create/manage patients.

## Views

- Day
- Week
- Month

Appointments can be filtered by status and date.


## Phase 21 role rule
Appointment creation/editing is restricted to SUPER_ADMIN and ADMIN (and any future staff role granted those permissions). Therapists only view their own appointments and can mark them completed or no-show.
