Commit Graph
33 Commits
Author SHA1 Message Date
rickyandClaude Opus 5.5 3ebe3505ca Weekday in appointment header; monthly totals on the calendar
- Appointment view: show the day of the week on the start and end dates, and lay
  the header out as a flex row so it no longer wraps under the action links
- Calendar: month total of estimated hours and appointments in the toolbar,
  counting only the shown month's days (hidden past weeks included)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 19:54:44 -05:00
rickyandClaude Opus 5.5 c3aab4a532 Partial estimates
Picking an estimate still fills in its labor hours; ticking Partial estimate lets the hours be lowered below them. Saved with the appointment and shown next to its hours. Adds migration 006.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 10:44:25 -05:00
rickyandClaude Opus 5.5 9a07c16731 No-new-work weeks on the calendar
A checkbox under each week number flags the week "no new work" and circles
it in red. New appointments in a flagged week (or ones moved or lengthened
into it) warn on the form and are stopped on save; users with "Override
no-new-work weeks" can tick "Schedule anyway". Flagging needs "Flag
no-new-work weeks". Call-outs aren't affected. Adds migration 005.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 10:16:10 -05:00
rickyandClaude Opus 5.5 3a5d83aa69 Calendar review fixes; working day hours setting
- Issues' estimated hours are spread over their working days from start to due date, instead of
  counted in full on both the start and due dates
- Tooltips in the two rightmost columns open leftward again (the rule targeted the old table layout)
- Today scrolls when today is on the page (the check read calendar values that don't exist)
- "Day N of M" on calendar cards and My Page skips holidays; My Page uses the user's date
- Each appointment's working days are worked out once per page (CustomerAppointment#working_days),
  and shared by placement, hours, day numbers and the end date
- The calendar toggles are kept in the session, so changing month loads the page once
- Clicking inside an open tooltip keeps it open; estimates load with the appointments
- Hours in a working day is a plugin setting (default 8)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 21:12:31 -05:00
rickyandClaude Opus 5.5 31356ac3fb 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>
2026-11-02 20:22:52 -05:00
Claude 1502a939c9 Drop the leftover settings page
The labor products/services and the issues-from-estimates defaults are set in redmine_qbo only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
2026-10-31 08:21:19 -04:00
Claude 13e8c07c0d Depend on redmine_qbo for estimate issues and labor hours
Billing has been folded into redmine_qbo 2026.11.0; the settings link now opens redmine_qbo's settings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
2026-10-30 23:49:17 -04:00
Claude fc503fca68 Estimate hours rule, linked issues, issue creation via redmine_qbo_billing
- An appointment's hours can't be less than its estimate's labor hours
  (checked when the estimate or hours change, so the quick status buttons
  still work on older appointments). Picking an estimate on the form, or
  arriving from an estimate page, raises the hours to match.
- The appointment page lists the issues linked to its estimate.
- Creating issues from an estimate moved to redmine_qbo_billing (now
  required): Create Issues from Estimate opens its page with this
  appointment's dates, technician, vehicle and project (via
  qbo_billing_issue_defaults). The builder, preview page, settings and rake
  task are removed here; the old settings stay registered so billing can
  read them until its own are saved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
2026-10-30 23:11:33 -04:00
Claude 91caa51ab7 Add a default project setting for issues created from estimates
Redmine has no default-project setting for new issues, so the preview
page used the first project the user could add issues to whenever an
appointment had no project. The plugin settings now have a Default
project; the order is: project chosen on the page, the appointment's
project, the default project, then the first allowed project.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
2026-10-28 21:08:58 -04:00
Claude 37d98dbe3d Relate all issues created from the same estimate, across batches
- New issues from the estimate preview are now related to each other
  and to every issue created earlier from the same estimate; older
  batches that weren't related to each other are linked too
- Pairs that already have any relation are skipped
- New rake task redmine_qbo_calendar:relate_estimate_issues relates
  issues created before this change (safe to re-run)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
2026-10-28 20:59:18 -04:00
Claude 4c8b4d01e2 Relate issues created together from an estimate
Every issue created in one batch from the estimate preview is now
related ("Related to") to every other issue in that batch. Relations
are added without journals, so no history entries or update emails
are generated; a relation that fails is logged and doesn't block
issue creation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
2026-10-28 20:56:54 -04:00
Claude b6cebd5b6b Ask for tracker custom fields on the estimate issues preview
- New "Issue fields" section on the Create Issues from Estimate page
  lists the custom fields the selected trackers use; values are entered
  once and applied to every created issue whose tracker uses the field
- Required fields (the field's Required flag or a workflow rule for the
  tracker and the user's role) are starred; the list updates as lines
  are ticked or trackers change
- Values go through Issue#safe_attributes=, so fields that are hidden or
  read-only for the user, or unused by a tracker, are ignored
- Entered values are kept when creation fails validation

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
2026-10-28 20:45:31 -04:00
Claude 184c1e2464 Add preview page for creating issues from an estimate
- "Create Issues from Estimate" now opens a preview listing each
  matching estimate line: include checkbox, subject (from the line
  description), tracker dropdown, template dropdown and estimated
  hours (from the line quantity)
- Admins set which QBO item codes to look for (e.g. Labor, Alignments)
  and a default tracker in the plugin settings
- Optional redmine_issue_templates support: templates supply the issue
  description; titles still come from the line description
- New appointment_estimate_issues table records which issue came from
  which estimate line, so a line can't be turned into an issue twice;
  deleting the issue frees the line again
- Creation is all-or-nothing; errors are shown on the preview page
- Removes the old Labor-only create_issues_from_labor_lines code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
2026-10-28 20:34:06 -04:00
Claude 73115da2b9 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
2026-10-28 17:14:13 -04:00
Claude 78fe22f004 Link appointment history from customer page and calendar
- Customer page list now shows a History link and a 'View all N past
  appointments' link; it also renders when a customer has history but
  nothing upcoming
- Calendar toolbar gets an Appointment History button
- Calendar tooltip gets a history icon next to the customer

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
2026-10-28 15:43:25 -04:00
Claude a4095b947f Add customer appointment history page
Adds a history page listing past customer appointments with customer,
status and date-range filters and pagination, linked from the customer
page, the appointments index and each appointment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
2026-10-28 15:20:40 -04:00
ricky 97ed852068 Implement global permissions for customer appointments and update views to check permissions before displaying actions 2026-09-06 21:11:18 -04:00
ricky 167e956457 Add holiday management functionality with CRUD operations
- Implement HolidaysController for managing holidays
- Create Holiday model with validation for recurrence types
- Add holiday form and views for creating, editing, and listing holidays
- Integrate holiday checks into customer appointment scheduling
- Update locale file for holiday-related labels and error messages
- Add migration for holidays table
- Update plugin version and add holidays to admin menu
2026-09-05 22:08:36 -04:00
ricky 46784cff44 Added a today button to bring the calendar to the current day 2026-08-25 14:30:06 -04:00
ricky 8427c26532 Refactor appointment labels to use localization for edit and new appointment headers; add missing localization keys. 2026-08-24 20:30:13 -04:00
ricky 62985e9ca2 Added header for simple appointments partial 2026-08-10 19:51:58 -04:00
ricky c3064c75f9 Update appointment duration and estimated hours labels for localization 2026-08-10 16:33:01 -04:00
ricky 71bd6c787e Add toggle for displaying only customer appointments and update localization 2026-08-10 15:06:44 -04:00
ricky c7d8486e00 Add appointment time display in tooltip and show view 2026-08-09 22:06:44 -04:00
ricky 68425e690a Add create_issues action and route for customer appointments 2026-08-09 21:45:11 -04:00
ricky 9961ae9b03 Add customer actions hook and appointment creation functionality
- Implement customer ID assignment in the appointment creation process.
- Create a new partial for customer actions to render appointment links.
- Add localization for the "Add Appointment" label.
- Introduce CustomerActionsHookListener to manage customer actions rendering.
2026-08-09 21:31:28 -04:00
ricky d33e430c75 Enhance customer appointments view with localization, improved links, and additional actions 2026-08-08 11:11:34 -04:00
ricky 94e5b95257 Refactor upcoming appointments view for improved accessibility and styling; add status badge styles and localization labels 2026-08-07 22:25:31 -04:00
ricky 88a40b356c Added my page upcoming appointment block 2026-08-07 12:38:50 -04:00
ricky c481879dd8 Add duration field to appointments and enhance calendar tooltip functionality 2026-08-06 21:24:54 -04:00
ricky d17f58fb62 Fixed various issues with the new appointment form 2026-08-06 20:36:35 -04:00
ricky c31a8c7ce6 added translation for duration 2026-08-06 16:39:47 -04:00
ricky 790cefdcfe Initial Commit with basic functionality 2026-08-06 13:12:19 -04:00