hummingbird-me/kitsu-web

View on GitHub
app/templates/components/groups/tickets/ticket-list-item.hbs

Summary

Maintainability
Test Coverage
<a href="#" class="inbox-item" {{action (toggle "isCoversationOpened" this)}}>
  <div class="inbox-item-img">
    {{lazy-image src=(image ticket.user.avatar "small")}}
  </div>
  <p class="inbox-item-author">{{ticket.user.name}}</p>
  <p class="inbox-item-text">{{ticket.firstMessage.content.content}}</p>
  <p class="inbox-item-date">
    {{format-relative ticket.createdAt interval=1000}},
    {{format-date ticket.createdAt hour="numeric" minute="numeric" timeZone="UTC"}}
  </p>
</a>

{{! modal }}
{{#if isCoversationOpened}}
  {{to-elsewhere named="modal" send=(component "groups/tickets/ticket-conversation"
    ticket=ticket
    isPersonalTicket=isPersonalTicket
    onClose=(toggle-action "isCoversationOpened" this)
  )}}
{{/if}}