Examples

Clinic appointments

Built with the mantine-schedule skill

Week
47
07:00
08:00
09:00
10:00
11:00
12:00
13:00
14:00
15:00
16:00
17:00
18:00
19:00
20:00

Lunch break

Lunch break

Lunch break

Lunch break

Lunch break

Appointments of Dr. Anna Keller (9)

[
  {
    "id": "apt-1",
    "patient": "Olivia Bennett",
    "phone": "(555) 201-4417",
    "type": "consultation",
    "start": "2026-11-16 10:00:00",
    "end": "2026-11-16 10:30:00",
    "note": ""
  },
  {
    "id": "apt-7",
    "patient": "Emma Thompson",
    "phone": "(555) 214-7720",
    "type": "consultation",
    "start": "2026-11-18 10:00:00",
    "end": "2026-11-18 10:30:00",
    "note": ""
  },
  {
    "id": "apt-6",
    "patient": "David Silva",
    "phone": "(555) 357-4362",
    "type": "follow-up",
    "start": "2026-11-18 10:30:00",
    "end": "2026-11-18 10:45:00",
    "note": ""
  },
  {
    "id": "apt-10",
    "patient": "Daniel Becker",
    "phone": "(555) 305-2289",
    "type": "consultation",
    "start": "2026-11-19 09:00:00",
    "end": "2026-11-19 09:30:00",
    "note": "Fasting since midnight"
  },
  {
    "id": "apt-12",
    "patient": "Joseph Marino",
    "phone": "(555) 366-6208",
    "type": "follow-up",
    "start": "2026-11-20 17:00:00",
    "end": "2026-11-20 17:15:00",
    "note": ""
  },
  {
    "id": "apt-17",
    "patient": "Lily Chen",
    "phone": "(555) 344-5584",
    "type": "vaccination",
    "start": "2026-11-23 09:00:00",
    "end": "2026-11-23 09:15:00",
    "note": ""
  },
  {
    "id": "apt-21",
    "patient": "Abigail Santos",
    "phone": "(555) 292-6638",
    "type": "procedure",
    "start": "2026-11-24 15:00:00",
    "end": "2026-11-24 16:00:00",
    "note": ""
  },
  {
    "id": "apt-29",
    "patient": "Nora Eriksen",
    "phone": "(555) 361-0935",
    "type": "vaccination",
    "start": "2026-11-26 11:30:00",
    "end": "2026-11-26 11:45:00",
    "note": ""
  },
  {
    "id": "apt-28",
    "patient": "Sebastian Vogel",
    "phone": "(555) 331-6905",
    "type": "consultation",
    "start": "2026-11-26 15:00:00",
    "end": "2026-11-26 15:30:00",
    "note": "Fasting since midnight"
  }
]

Build the appointments calendar of a small clinic, used by the front desk to book patients.

Data:

  • 4 hard-coded doctors (name, specialty), each with their own working hours per weekday (for example Mon/Wed 9:00–17:00, Fri 12:00–20:00) and lunch breaks
  • 4 appointment types with fixed durations: consultation 30 min, follow-up 15 min, procedure 60 min, vaccination 15 min
  • 40 hard-coded patients (name, date of birth, phone)
  • about 30 appointments in the current and next week, generated relative to today

Calendar:

  • one doctor at a time, picked with a doctor selector that sits in the calendar header row, next to the date navigation; the week view shows the doctor's working hours as available time, everything else (and the lunch break) is unavailable
  • each appointment shows the patient name and the appointment type
  • appointments resize in steps of 15 minutes and can be dragged to another time; they cannot be placed outside the doctor's working hours or overlap another appointment of the same doctor
  • on screens narrower than a tablet the calendar switches to a month view with the list of the selected day's appointments under it

Booking:

  • clicking an available slot opens a booking form: patient (searchable by name or phone), appointment type, start time, note; the end time follows from the type and is shown, not edited
  • the form rejects a slot where the appointment would not fit before the end of working hours or the next appointment, and shows why
  • clicking an appointment opens the same form to edit or cancel it
  • after every change show a short notification and display the doctor's appointments as JSON under the calendar

The component is shown on a demo page that already has a title: do not add a page title or intro text.

Write tests for the component.