Refactor customer details and form views for improved readability and consistency

This commit is contained in:
2026-08-11 18:39:23 -04:00
parent ea29990cfa
commit 75e5aeb668
2 changed files with 34 additions and 41 deletions
+6 -10
View File
@@ -36,23 +36,19 @@
<td>$<%= customer.balance %></td> <td>$<%= customer.balance %></td>
</tr> </tr>
<% if customer.notes.present? %>
<tr> <tr>
<th colspan="2"><h4><%=t(:field_notes)%></hr></th> <th colspan="2"><h4><%= t(:field_notes) %></h4></th>
</tr> </tr>
<tr> <tr>
<td colspan="2"> <td colspan="2">
<pre id="note-display" style="text-align: left; white-space: pre-wrap; font-family: inherit;"> <div class="wiki">
<%= customer.notes %> <%= textilizable(customer, :notes) %>
</pre> </div>
</td> </td>
</tr> </tr>
<% end %>
<script>
const preElement = document.getElementById('note-display');
// This takes the text, trims the edges, and puts it back
preElement.textContent = preElement.textContent.trim();
</script>
</tbody> </tbody>
</table> </table>
+4 -7
View File
@@ -36,16 +36,13 @@
<%=t(:field_notes)%>: <%=t(:field_notes)%>:
<div class="input"> <div class="input">
<p> <p>
<%= content_tag :span, id: "issue_description_and_toolbar" do %>
<%= f.text_area :notes, <%= f.text_area :notes,
cols: 60, rows: 8,
rows: 10,
accesskey: accesskey(:edit),
class: 'wiki-edit', class: 'wiki-edit',
no_label: true %> style: 'width: 95%;',
<% end %> id: 'customer_appointment_description' %>
<%= wikitoolbar_for 'customer_appointment_description' %>
</p> </p>
<%= wikitoolbar_for :issue_description %>
</div> </div>
</div> </div>