Appointment statuses in the plugin settings; call-outs as their own entry

Statuses (name, colour, counts toward hours, order) are set up on the plugin's settings page
instead of being hard-coded. Appointments keep a fixed key, so renaming is safe; removing a status
in use asks which status to move its appointments to (done on save by a SettingsController hook).
Colours come from the settings everywhere statuses show, which also fixes Cancelled never being
coloured (cancelled/canceled mismatch).

Call-outs (an employee off work) are their own kind of entry (event_type 'call_out') with an
employee, date, days and notes, added from a button on each calendar day. They sit at the top of
the day in red stripes and never count toward hours. Migration 004 converts Call_Out appointments.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-02 20:22:52 -05:00
1 parent f2a16b1821
commit 31356ac3fb
23 files changed
+536 -252

No files matched your search

+52 -173
View File
@@ -267,134 +267,41 @@ h2 .appointment-title {
}
/* ==========================================================================
Custom High-Vibrancy Hex Status Themes & Tinted Tooltips
Status colours: each status's colour (set in the plugin settings) arrives as --status-color
========================================================================== */
/* Scheduled - #1FC0FF */
.appointment-block.scheduled,
.appointment-block.scheduled:hover,
.appointment-block.scheduled.open { background: #e8f8ff !important; border-color: #91e2ff !important; }
.appointment-block.scheduled .appointment-bar { background-color: #1fc0ff !important; }
.appointment-block.scheduled .appointment-divider { border-top-color: #b3ebff !important; }
.appointment-block.scheduled .tip,
.appointment-block.scheduled:hover .tip,
.appointment-block.scheduled.open .tip { background: #f2faff !important; border-color: #70d6ff !important; }
.appointment-block,
.appointment-block:hover,
.appointment-block.open {
background: color-mix(in srgb, var(--status-color, #1fc0ff) 10%, #fff) !important;
border-color: color-mix(in srgb, var(--status-color, #1fc0ff) 50%, #fff) !important;
}
.appointment-block .appointment-bar { background-color: var(--status-color, #1fc0ff) !important; }
.appointment-block .appointment-divider { border-top-color: color-mix(in srgb, var(--status-color, #1fc0ff) 30%, #fff) !important; }
.appointment-block .tip,
.appointment-block:hover .tip,
.appointment-block.open .tip {
background: color-mix(in srgb, var(--status-color, #1fc0ff) 5%, #fff) !important;
border-color: color-mix(in srgb, var(--status-color, #1fc0ff) 65%, #fff) !important;
}
/* Ready - #1FFF1F */
.appointment-block.ready,
.appointment-block.ready:hover,
.appointment-block.ready.open { background: #e8ffe8 !important; border-color: #8bff8b !important; }
.appointment-block.ready .appointment-bar { background-color: #1fff1f !important; }
.appointment-block.ready .appointment-divider { border-top-color: #b5ffb5 !important; }
.appointment-block.ready .tip,
.appointment-block.ready:hover .tip,
.appointment-block.ready.open .tip { background: #f2fff2 !important; border-color: #66ff66 !important; }
/* CheckedIn - #CE1FFF */
.appointment-block.checked-in,
.appointment-block.checkedin,
.appointment-block.checked_in,
.appointment-block.checked-in:hover,
.appointment-block.checkedin:hover,
.appointment-block.checked_in:hover,
.appointment-block.checked-in.open,
.appointment-block.checkedin.open,
.appointment-block.checked_in.open { background: #f8e8ff !important; border-color: #e891ff !important; }
.appointment-block.checked-in .appointment-bar,
.appointment-block.checkedin .appointment-bar,
.appointment-block.checked_in .appointment-bar { background-color: #ce1fff !important; }
.appointment-block.checked-in .appointment-divider,
.appointment-block.checkedin .appointment-divider,
.appointment-block.checked_in .appointment-divider { border-top-color: #f0b3ff !important; }
.appointment-block.checked-in .tip,
.appointment-block.checkedin .tip,
.appointment-block.checked_in .tip,
.appointment-block.checked-in:hover .tip,
.appointment-block.checkedin:hover .tip,
.appointment-block.checked_in:hover .tip,
.appointment-block.checked-in.open .tip,
.appointment-block.checkedin.open .tip,
.appointment-block.checked_in.open .tip { background: #fcf2ff !important; border-color: #df70ff !important; }
/* InProgress - #FF5E1F */
.appointment-block.in-progress,
.appointment-block.inprogress,
.appointment-block.in_progress,
.appointment-block.in-progress:hover,
.appointment-block.inprogress:hover,
.appointment-block.in_progress:hover,
.appointment-block.in-progress.open,
.appointment-block.inprogress.open,
.appointment-block.in_progress.open { background: #fff0e8 !important; border-color: #ffb391 !important; }
.appointment-block.in-progress .appointment-bar,
.appointment-block.inprogress .appointment-bar,
.appointment-block.in_progress .appointment-bar { background-color: #ff5e1f !important; }
.appointment-block.in-progress .appointment-divider,
.appointment-block.inprogress .appointment-divider,
.appointment-block.in_progress .appointment-divider { border-top-color: #ffccb3 !important; }
.appointment-block.in-progress .tip,
.appointment-block.inprogress .tip,
.appointment-block.in_progress .tip,
.appointment-block.in-progress:hover .tip,
.appointment-block.inprogress:hover .tip,
.appointment-block.in_progress:hover .tip,
.appointment-block.in-progress.open .tip,
.appointment-block.inprogress.open .tip,
.appointment-block.in_progress.open .tip { background: #fff6f2 !important; border-color: #ff9970 !important; }
/* Completed - #008000 */
.appointment-block.completed,
.appointment-block.completed:hover,
.appointment-block.completed.open { background: #e6f5e6 !important; border-color: #80c080 !important; }
.appointment-block.completed .appointment-bar { background-color: #008000 !important; }
.appointment-block.completed .appointment-divider { border-top-color: #a3d9a3 !important; }
.appointment-block.completed .tip,
.appointment-block.completed:hover .tip,
.appointment-block.completed.open .tip { background: #f0fcf0 !important; border-color: #66b366 !important; }
/* Cancelled - #FF1F1F & Strikethrough */
.appointment-block.cancelled,
.appointment-block.canceled,
.appointment-block.cancelled:hover,
.appointment-block.canceled:hover,
.appointment-block.cancelled.open,
.appointment-block.canceled.open { background: #ffe8e8 !important; border-color: #ff9191 !important; }
.appointment-block.cancelled .appointment-bar,
.appointment-block.canceled .appointment-bar { background-color: #ff1f1f !important; }
.appointment-block.cancelled .appointment-divider,
.appointment-block.canceled .appointment-divider { border-top-color: #ffb3b3 !important; }
.appointment-block.cancelled .tip,
.appointment-block.canceled .tip,
.appointment-block.cancelled:hover .tip,
.appointment-block.canceled:hover .tip,
.appointment-block.cancelled.open .tip,
.appointment-block.canceled.open .tip { background: #fff2f2 !important; border-color: #ff7070 !important; }
.appointment-block.cancelled .appointment-title,
.appointment-block.cancelled .appointment-link,
.appointment-block.canceled .appointment-title,
.appointment-block.canceled .appointment-link {
/* Statuses that don't count toward the hours (e.g. Cancelled) */
.appointment-block.no-hours .appointment-title,
.appointment-block.no-hours .appointment-link {
text-decoration: line-through;
}
/* Call Out - #FFFF00 */
.appointment-block.call_out,
.appointment-block.call_out:hover,
.appointment-block.call_out.open { background: hsl(60, 100%, 95%) !important; border-color: hsl(60, 100%, 50%) !important; }
.appointment-block.call_out .appointment-bar { background-color: hsl(60, 100%, 45%) !important; }
.appointment-block.call_out .appointment-divider { border-top-color: hsl(60, 100%, 80%) !important; }
.appointment-block.call_out .tip,
.appointment-block.call_out:hover .tip,
.appointment-block.call_out.open .tip { background: hsl(60, 100%, 97%) !important; border-color: hsl(60, 100%, 60%) !important; }
/* Call-outs: an employee off work, not a customer appointment */
.appointment-block.call-out,
.appointment-block.call-out:hover,
.appointment-block.call-out.open {
background: repeating-linear-gradient(-45deg, #fdeceb, #fdeceb 6px, #f8d7d4 6px, #f8d7d4 12px) !important;
border: 1px dashed #d52b1e !important;
}
.appointment-block.call-out .appointment-bar { background-color: #d52b1e !important; }
.appointment-block.call-out .appointment-divider { border-top-color: #f0b4ae !important; }
.appointment-block.call-out .tip { background: #fff !important; border-color: #d52b1e !important; }
.appointment-block.call-out .appointment-call-out-label { color: #b3261b; font-size: .9em; }
/* Table List Alignment */
table.appointments td,
@@ -449,61 +356,22 @@ table.appointments td.status {
}
/* ==========================================================================
Badges & Quick Action Buttons
Badges & Quick Action Buttons, in the status's colour
========================================================================== */
/* Scheduled - #1FC0FF */
.status-scheduled {
background-color: #e8f8ff !important;
border-color: #91e2ff !important;
color: #0077a3 !important;
.status-badge,
.quick-status-btn,
.status-key-badge {
background-color: color-mix(in srgb, var(--status-color, #8d9096) 12%, #fff) !important;
border: 1px solid color-mix(in srgb, var(--status-color, #8d9096) 50%, #fff) !important;
color: color-mix(in srgb, var(--status-color, #8d9096) 65%, #000) !important;
}
/* Ready - #1FFF1F */
.status-ready {
background-color: #e8ffe8 !important;
border-color: #8bff8b !important;
color: #008f00 !important;
}
/* CheckedIn - #CE1FFF */
.status-checked-in,
.status-checkedin,
.status-checked_in {
background-color: #f8e8ff !important;
border-color: #e891ff !important;
color: #8300ad !important;
}
/* InProgress - #FF5E1F */
.status-in-progress,
.status-inprogress,
.status-in_progress {
background-color: #fff0e8 !important;
border-color: #ff9191 !important;
color: #b33000 !important;
}
/* Completed - #008000 */
.status-completed {
background-color: #e6f5e6 !important;
border-color: #80c080 !important;
color: #005200 !important;
}
/* Cancelled - #FF1F1F */
.status-cancelled,
.status-canceled {
background-color: #ffe8e8 !important;
border-color: #ff9191 !important;
color: #b30000 !important;
}
/* Completed - #FFFF00 */
.status-call_out {
background-color: hwb(60 0% 0%) !important;
border-color: lab(0% 0 0) !important;
color: hwb(60 0% 100%) !important;
.status-badge.status-call-out,
.status-key-badge.status-call-out {
background: repeating-linear-gradient(-45deg, #fdeceb, #fdeceb 4px, #f8d7d4 4px, #f8d7d4 8px) !important;
border: 1px dashed #d52b1e !important;
color: #9c1f16 !important;
}
/* Redefine grid column proportions for the calendar layout */
@@ -645,3 +513,14 @@ table.estimate-issues-preview tr.created td {
.estimate-issue-fields .estimate-issue-fields-info {
padding-left: 0;
}
/* Calendar day: add a call-out, next to the add appointment button */
.calendar-add-call-out {
margin-left: 6px;
color: #8d9096;
font-size: 0.85em;
text-decoration: none !important;
}
.calendar-add-call-out:hover {
color: #393a3d;
}