<% // Pass in a type of 'sales', 'purchases' or 'cases' %> <% var type = ob.type || 'sales' %> <% var types = ['sales', 'purchases', 'cases']; if (types.indexOf(ob.type) === -1) { throw new Error('The type must be one of ${types}'); } %> <% if (ob.isFetching) { %>
<%= ob.spinner({ className: 'spinnerMd' }) %>
<% } else if (ob.fetchFailed) { %>
<%= ob.polyT(`transactions.${ob.type}.unableToFetch`) %>
<% if (ob.fetchError) { %>
<%= ob.fetchError %>
<% } %> <%= ob.polyT(`transactions.transactionsTable.btnRetryFetch`) %>
<% } else { %> <% if (ob.transactions.length) { %> <% if (ob.type !== 'cases') { %> <% } %> <% if (ob.type === 'sales') { %> <% } else { %> <% } %> <% if (ob.type === 'cases') { %> <% } %>
<%= ob.polyT('transactions.transactionsTable.headers.orderId') %> <%= ob.polyT('transactions.transactionsTable.headers.date') %>
<%= ob.polyT('transactions.transactionsTable.headers.listing') %><%= ob.polyT('transactions.transactionsTable.headers.buyer') %><%= ob.polyT('transactions.transactionsTable.headers.vendor') %><%= ob.polyT('transactions.transactionsTable.headers.buyer') %><%= ob.polyT('transactions.transactionsTable.headers.total') %> <%= ob.polyT('transactions.transactionsTable.headers.status') %>
<% } else { %>
<%= ob.polyT(`transactions.${ob.type}.noResults`) %>
<% } %> <% } %>