Skip to content

Commit

Permalink
get the type, the date, and the author of the last change
Browse files Browse the repository at this point in the history
  • Loading branch information
the-last-pastafarian committed Apr 11, 2024
1 parent 0a49d96 commit 89e2f5a
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions server/lib/field_hub_web/live/project_show_live.html.heex
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,19 @@
<tr>
<td>Last changes</td>
<td>
<%= for update <- last_5_updates do %>
<div>
<%= extract_change_user(update) %> (<%= extract_change_date(update) %>)
<br />
id: <%= update["doc"]["resource"]["identifier"] %>
</div>
<% end %>
<table>
<%= for update <- last_5_updates do %>
<%{type, date_time, user_name} = CouchService.extract_most_recent_change_info(update) %>
<tr>
<td>
'<%= update["doc"]["resource"]["identifier"] %>'
<br />
<%= type %> by user: <i><%= user_name %></i>
</td>
<td><%= Calendar.strftime(date_time, "%c") %></td>
</tr>
<% end %>
</table>
</td>
</tr>
</section>
Expand Down

0 comments on commit 89e2f5a

Please sign in to comment.