Keep calendar toggles per user; bring back New Customer on appointments

- Hide Past Weeks and Show Customer Appointments Only are saved in each user's
  preferences instead of the session, so they stick across logins and devices.
  Show Customer Appointments Only is on by default.
- The new appointment form's New Customer button had no icon since Redmine 6's SVG
  icons, so it didn't show. It has its icon and label again, for users who may add
  customers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-04 12:48:41 -05:00
1 parent be9bd1bac6
commit f09c4caf9a
3 files changed
+40 -10

No files matched your search

@@ -24,8 +24,12 @@
<p>
<%= f.text_field :customer, label: :label_customer, class: "customer-name", autocomplete: "off", data: { autocomplete_url: "/customers/autocomplete" } %>
<%= f.hidden_field :customer_id, id: "customer_id" %>
<!-- Add Quick Create Button -->
<a href="#" id="inline-create-customer-btn" class="icon-only icon-add" title="<%=l(:label_new_customer)%>"></a>
<%# Creates the customer in a dialog without leaving the appointment (customer-modal.js), for users who
may add customers %>
<% if User.current.allowed_to?(:add_customers, nil, global: true) %>
<%= link_to sprite_icon('add', l(:label_new_customer)), '#', id: 'inline-create-customer-btn',
class: 'icon icon-add', title: l(:label_new_customer) %>
<% end %>
</p>
<p>