<%# An entry sent through the API as a draft: where it came from and what signing will do (held until every entry of the draft is signed). Locals: entry. %> <% batch = entry.draft_batch %> <% if batch %> <% effects = batch.awaiting? ? batch.held_effects_for(entry) : { squawks: [], inspections: [] } %>

<%= t(".from", name: batch.api_token&.name || t(".the_api"), person: batch.created_by&.display_name || "—", ref: batch.external_ref.presence || "—") %>

<% if effects[:squawks].any? || effects[:inspections].any? %>

<%= t(batch.entries.size > 1 ? ".when_all_signed" : ".when_signed", count: batch.entries.size) %>

<% end %>
<% end %>