Closed allthesignals closed 1 week ago
Looks good. I find it a bit weird that the component can conditionally decide not to render itself, but I suppose it does make sense not to render an empty table, so that's fine.
Yeah. I wasn't totally sure. There is a situation where if you use the table component and maybe roll your own rows, nothing will appear:
<%= render(TableComponent.new) do |table| %>
<tr><td>This won't appear</td></tr>
<% end %>
And that might be surprising to someone.
But then I found myself having a bunch of weird conditionals that made less sense:
<% if is_caseworker or current_site?(:ma) # in order to show the table wrapper %>
<%= render(TableComponent.new) do |table| %>
<!-- stuff -->
<% end %>
And I really didn't want to do that. This way, we have one less dimension to the logic, the table header just renders if it has stuff to render...
Ticket
Resolves 1146
Changes
Adds MA-specific fields to the MA PDF.
Adds a helper, current_site?(site_id).
caseworker_ma.pdf client_ma.pdf