Compare commits

...

2 Commits

Author SHA1 Message Date
485a977d1a Use Safe Navigation Operator &. 2026-03-01 21:31:28 -05:00
03d5a5d148 Always show sync status 2026-03-01 21:25:07 -05:00
4 changed files with 6 additions and 6 deletions

View File

@@ -13,12 +13,12 @@
<tr>
<th><%=t(:label_primary_phone)%></th>
<td><%= number_to_phone(customer.primary_phone.gsub(/[^\d]/, '').to_i, area_code: true) if customer.primary_phone %></td>
<td><%= number_to_phone(customer&.primary_phone&.gsub(/[^\d]/, '').to_i, area_code: true) %></td>
</tr>
<tr>
<th><%=t(:label_mobile_phone)%></th>
<td><%= number_to_phone(customer.mobile_phone.gsub(/[^\d]/, '').to_i, area_code: true) if customer.mobile_phone %></td>
<td><%= number_to_phone(customer&.mobile_phone&.gsub(/[^\d]/, '').to_i, area_code: true) %></td>
</tr>
<tr>

View File

@@ -1 +1 @@
<b><%=t(:label_last_sync)%>: </b> <%= Qbo.last_sync if Qbo.exists? %>
<b><%=t(:label_last_sync)%>: </b> <%= Qbo.last_sync %>

View File

@@ -66,12 +66,12 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
<tr>
<th><%=t(:label_oauth_expires)%></th>
<td><%= if Qbo.exists? then QboConnectionService.current!.oauth2_access_token_expires_at end %>
<td><%= QboConnectionService.current!&.oauth2_access_token_expires_at %>
</tr>
<tr>
<th><%=t(:label_oauth2_refresh_token_expires_at)%></th>
<td><%= if Qbo.exists? then QboConnectionService.current!.oauth2_refresh_token_expires_at end %>
<td><%= QboConnectionService.current!&.oauth2_refresh_token_expires_at %>
</tr>
</tbody>

View File

@@ -20,7 +20,7 @@ module RedmineQbo
#Employee.update_all
# Check to see if there is a quickbooks user attached to the issue
@selected = context[:user].employee.id if context[:user].employee
@selected = context[:user]&.employee&.id
# Generate the drop down list of quickbooks contacts
return "<p>#{context[:form].select :employee_id, Employee.all.pluck(:name, :id), selected: @selected, include_blank: true}</p>"