Commit Graph
101 Commits
Author SHA1 Message Date
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 3b753c1f35 Add appointment link on estimate pages
Listens for redmine_qbo_billing's view_qbo_estimate_contextual hook and adds
an Add appointment link with the customer, the estimate, and the vehicle
whose VIN matches the estimate's. The new appointment form uses the estimate
and vehicle only when they belong to the customer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
2026-10-30 13:49:25 -04:00
Claude 41e1a7ecf9 Add appointment link in the customer page's contextual area
Uses redmine_qbo's new :view_customers_show_contextual hook (replacing
customer_actions_top) and renders "Add appointment" as a Redmine-style
icon link alongside the customer's other actions. Needs the matching
redmine_qbo update.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
2026-10-29 23:29:46 -04:00
Claude ccc0db5d09 Fix stray carriage return at end of customer_show_hook_listener.rb
The last line ended in a lone \r with no newline (left over from
restoring the file's CRLF line endings), so Ruby warned 'encountered \r
in middle of line' at every start. It now ends with CRLF like the rest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
2026-10-29 23:29:24 -04:00
ricky 3361dfe9dd Remove redundant customer appointment history links from calendar and customer actions views 2026-10-29 22:53:19 -04:00
ricky 163b67b02a 2026.10.0 2026.10.0 2026-10-28 22:04:20 -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 21538ad95b Add action area with History link to the calendar page
Redmine core's calendars/show has no top-right action area, so override
it (copied from Redmine 7.0-stable) and add a .contextual block with
History, Appointments and New Appointment links. The block also exposes
a view_calendars_show_contextual hook for future additions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
2026-10-28 16:19:47 -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 323c83ace6 Add lambda for calculating event hours and optimize weekly total hours computation 2026-10-23 09:29:20 -04:00
ricky d3b9441f25 2026.9.2 2026.9.2 2026-09-09 21:43:55 -04:00
ricky 852d2119a0 Fix over-calculation of hours for multi-day appointments
Updates the calendar view to distribute multi-day appointment hours
across working days, capping each day at 8 hours. This prevents the
total hours from being added to every day and ensures appointments
with fewer hours than their maximum duration don't artificially
inflate daily labor totals.
2026-09-09 21:43:22 -04:00
ricky 041a6441fe 2026.9.1 2026.9.1 2026-09-09 21:14:52 -04:00
ricky 0e54316eac Refactor indentation in view_hook_listener.rb for improved readability 2026-09-08 22:39:09 -04:00
ricky 250442db9d removed trailing / 2026-09-08 08:24:00 -04:00
ricky c3a5657b7b Updated README 2026.9.0 2026-09-06 21:49:16 -04:00
ricky ee4327152d Updated README 2026-09-06 21:45:45 -04:00
ricky 39f31cfb11 Fix redirect after appointment deletion and handle missing appointment gracefully 2026-09-06 21:38:20 -04:00
ricky df788d4d97 Remove settings partial from plugin registration 2026-09-06 21:31:44 -04:00
ricky 9fac291490 removed unused permissions, moved view registration into setup 2026-09-06 21:30:19 -04:00
ricky 8448c06b10 Refactor menu registration to add top menu item for calendar and remove project menu entry for customer calendar 2026-09-06 21:21:45 -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 9a8787c3da Moved calendar JavaScript inclusion from view hook to the calendar view 2026-08-26 10:37:35 -04:00
ricky 2acbbd343a Moved javascript into javascript file 2026-08-25 14:38:24 -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 e3b2d33f8e Added session management for calendar month/year 2026-08-25 14:24:30 -04:00
ricky 40fc92b692 2026.8.1 2026.8.1 2026-08-25 14:11:28 -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 de7aba15ce Add inline customer creation modal and functionality 2026-08-24 20:17:41 -04:00
ricky 7807e5a1e7 Tweaked layout for avatar & days 2026-08-19 13:56:51 -04:00
ricky a93fdfe63b Added call out status 2026-08-19 12:50:40 -04:00
ricky edd75af01b update the favicon without java script 2026-08-19 08:20:02 -04:00
ricky bd649daa4e added js to dynamically change fav icon to a calendar 2026-08-18 22:05:42 -04:00
ricky 7dbec61c78 Added new issue link 2026-08-18 07:53:59 -04:00
ricky 3e961e2ae9 added option to hide past weeks 2026-08-17 19:31:31 -04:00
ricky e80769bf05 added border around today 2026-08-17 19:10:32 -04:00
ricky e4a51ca393 automatically scroll to today 2026-08-17 18:58:09 -04:00
ricky f99450a58b updated colors and style 2026-08-17 18:52:28 -04:00
ricky d529c99a02 Add day count calculation to appointment display in calendar 2026-08-12 08:37:28 -04:00
ricky 631afa5a6d Refactor calendar to have the date placed on the left and the total estimated hours placed on the right 2026-08-12 07:18:13 -04:00
ricky 97d2fbf5bc Implement responsive mobile view for calendar layout and tooltip positioning 2026-08-12 07:13:24 -04:00
ricky 4e4389dbb8 Remove new apointment links from non working days 2026-08-11 15:13:21 -04:00
ricky 045414e789 Redefine grid layout for calendar and optimize weekend cell display 2026-08-11 14:59:39 -04:00