OfficeMomsandDads/scheduler

View on GitHub
app/views/needs/index.html.haml

Summary

Maintainability
Test Coverage
- content_for :page_header do
  .header-text Fosterful Scheduler

.grid-x
  .cell
    - if current_user.scheduler?
      .float-right
        = react_component("NeedsIndexDatePicker/index", { date: @date })
    %h5.separator-left Needs
    %table.responsive-card-table.hover.unstriped
      %thead
        %tr
          %th Office
          %th # of Children
          %th Start At
          %th Shifts
      %tbody
        - @needs.each do |need|
          %tr
            %td{data: {label: 'Office'}}= link_to need.office, need_path(need)
            %td{data: {label: 'Children'}}= link_to need.number_of_children, need_path(need)
            %td{data: {label: 'Start At'}}= link_to need.effective_start_at.strftime('%l:%M%P %A, %b %d'), need_path(need)
            %td{data: {label: 'Shifts'}}= link_to need.shifts.count, need_path(need)