Fix permissions, holiday, hours, visibility and scheduling bugs

- customer_options is now covered by the add/edit permissions, so
  non-admin staff get the vehicle/estimate dropdowns
- create_issues is now a POST member route with its own permission,
  checks add_issues on the target project, no longer redirects to a
  missing route, and has a button on the appointment page
- "Last" week-of-month holidays (e.g. Memorial Day) now match every year
- Cancelled and Call Out appointments no longer count toward hours
- Calendar only shows appointments to users with View customer
  appointments, and only loads those near the displayed month
- due_date skips weekends and holidays, matching the calendar layout
- Subjects keep their casing; only the first letter is capitalized

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
This commit is contained in:
Claude committed 2026-10-28 17:14:13 -04:00
1 parent 21538ad95b
commit 73115da2b9
10 files changed
+130 -17

No files matched your search

+6
View File
@@ -21,6 +21,8 @@ en:
day_name_thursday: "Thursday"
day_name_tuesday: "Tuesday"
day_name_wednesday: "Wednesday"
button_create_issues_from_estimate: "Create Issues from Estimate"
error_no_labor_lines_found: "No Labor lines with a description were found on the estimate"
error_holiday: "Cannot be scheduled on holiday: %{name}"
error_non_working_day: "Cannot be scheduled on a non-working day"
field_customer_name: Customer
@@ -78,8 +80,12 @@ en:
label_week_3rd: "3rd"
label_week_4th: "4th"
label_week_last: "Last"
notice_appointment_issues_created:
one: "1 issue created from the estimate"
other: "%{count} issues created from the estimate"
notice_unable_delete_holiday: "Unable to delete holiday"
permission_add_customer_appointments: "Add customer appointments"
permission_create_customer_appointment_issues: "Create issues from appointment estimates"
permission_delete_customer_appointments: "Delete customer appointments"
permission_edit_customer_appointments: "Edit customer appointments"
permission_manage_customer_appointments: Manage Customer Appointments