@model PagedResult @{ ViewData["Title"] = "Appointments"; ViewData["PageIcon"] = "bi-calendar-event"; ViewData["PageHelpTitle"] = "Appointments"; ViewData["PageHelpContent"] = "Schedule and track customer visits, drop-offs, pick-ups, consultations, and internal meetings. Appointments can be linked to customers and jobs. Statuses: Scheduled → Confirmed → In Progress → Completed. Use the Calendar view for a visual day/week/month overview."; }

Total Appointments

@Model.TotalCount

Today

@Model.Items.Count(a => a.ScheduledStartTime.Date == DateTime.Today)

This Week

@Model.Items.Count(a => a.ScheduledStartTime >= DateTime.Today && a.ScheduledStartTime < DateTime.Today.AddDays(7))

Confirmed

@Model.Items.Count(a => a.StatusDisplayName == "Confirmed")

@Model.TotalCount
Total
@Model.Items.Count(a => a.ScheduledStartTime.Date == DateTime.Today)
Today
@Model.Items.Count(a => a.ScheduledStartTime >= DateTime.Today && a.ScheduledStartTime < DateTime.Today.AddDays(7))
This Week
@Model.Items.Count(a => a.StatusDisplayName == "Confirmed")
Confirmed
@if (!string.IsNullOrEmpty(ViewBag.SearchTerm)) { }
@if (Model.Items.Any()) {
@foreach (var appointment in Model.Items) {
@appointment.Title
@appointment.ScheduledStartTime.ToString("MMM dd, yyyy")
@(!appointment.IsAllDay ? $"{appointment.ScheduledStartTime:h:mm tt} – {appointment.ScheduledEndTime:h:mm tt}" : "All Day")
Status @appointment.StatusDisplayName
Type @appointment.TypeDisplayName
@if (!string.IsNullOrEmpty(appointment.CustomerName)) {
Customer @appointment.CustomerName
} @if (!string.IsNullOrEmpty(appointment.AssignedWorkerName)) {
Worker @appointment.AssignedWorkerName
}
}
@foreach (var appointment in Model.Items) { }
Number Title Customer Type Status Scheduled Worker Actions
@appointment.AppointmentNumber @appointment.Title @if (appointment.IsAllDay) { All Day } @(appointment.CustomerName ?? "Internal") @appointment.TypeDisplayName @appointment.StatusDisplayName
@appointment.ScheduledStartTime.ToString("MMM dd, yyyy")
@if (!appointment.IsAllDay) { @appointment.ScheduledStartTime.ToString("h:mm tt") - @appointment.ScheduledEndTime.ToString("h:mm tt") }
@if (!string.IsNullOrEmpty(appointment.AssignedWorkerName)) { @appointment.AssignedWorkerName } else { Unassigned }
} else {

No appointments found.

Create First Appointment
}
@section Scripts { }