hackaru-app/hackaru-api

View on GitHub
app/views/report_mailer/report.html.slim

Summary

Maintainability
Test Coverage
head
  == stylesheet_link_tag webpack_url('stylesheets/views/report-mailer/report.css')

section class="content"
  header class="header"
    h1 class="title"
      == image_tag webpack_url('images/bar-chart-icon.png'), class: 'icon'
      = @title
    p
      == l(@report.start_date, format: '%F')
      span -
      == l(@report.end_date, format: '%F')

  == render 'shared/css_bar_chart', report: @report

  section class="projects"
    ul class="projects"
      - totals = @report.totals
      - @report.projects.each do |project|
        li
          = render 'shared/dot_text', color: project.color,
              text: project.name,
              duration: totals[project.id]

section class="content"
  header class="content-header"
    h1 class="title"
      i data-feather="clock"
      = t('.timers')

  ul class="activity-groups"
    - @report.activity_groups.each do |activity_group|
      li
        - view_object = ActivityGroupViewObject.new(activity_group)
        = render 'shared/dot_text', color: view_object.color,
            text: view_object.description,
            duration: view_object.duration

== image_tag mixpanel_pixel_url('Open report mail',
      { distinct_id: @user_id, days: (@report.start_date.to_date..@report.end_date.to_date).count })