%p= cpd_audit_summary_text(cpd_audit) %table.table.table-striped %thead %tr %th Status %th Date Reached %th Details %th %tbody %tr %td Opened %td= cpd_audit.opened_at.strftime('%F') || '-' %td #{icon('check', class: 'small-1')} Done %td %tr %td Started %td= cpd_audit.started_at&.strftime('%F') || '-' %td - if cpd_audit.was_submitted? = icon('check', class: 'small-1') Done - elsif cpd_audit.was_started? = icon('check', class: 'small-1') In Progress %td - if cpd_audit.cpd_audit_level.conflict_of_interest? %tr %td Conflict of Interest %td= cpd_audit.conflicted_at&.strftime('%F') || '-' %td - if cpd_audit.conflicted? = icon('x', class: 'small-1') Auditee has indicated conflict of interest - elsif cpd_audit.was_conflicted_resolved? = icon('check', class: 'small-1') Resolved - elsif cpd_audit.was_submitted? = icon('check', class: 'small-1') No Conflict %td - if cpd_audit.conflicted? = link_to 'Process Conflict of Interest', '#process-conflict-of-interest', 'data-click-tab': true, class: 'btn btn-sm btn-primary' - if cpd_audit.cpd_audit_level.can_request_exemption? %tr %td Exemption Request %td= cpd_audit.exemption_requested_at&.strftime('%F') || '-' %td - if cpd_audit.exemption_requested? = icon('x', class: 'small-1') Auditee has requested an exemption - elsif cpd_audit.was_exemption_granted? = icon('check', class: 'small-1') Exemption Granted - elsif cpd_audit.was_exemption_denied? = icon('check', class: 'small-1') Exemption Denied - elsif cpd_audit.was_submitted? = icon('check', class: 'small-1') No Exemption %td - if cpd_audit.exemption_requested? = link_to 'Process Exemption Request', '#process-exemption-request', 'data-click-tab': true, class: 'btn btn-sm btn-primary' - if cpd_audit.cpd_audit_level.can_request_extension? %tr %td Extension Request %td= cpd_audit.extension_requested_at&.strftime('%F') || '-' %td - if cpd_audit.extension_requested? = icon('x', class: 'small-1') Auditee has requested an extension - elsif cpd_audit.was_extension_granted? = icon('check', class: 'small-1') Extension Granted - elsif cpd_audit.was_extension_denied? = icon('check', class: 'small-1') Extension Denied - elsif cpd_audit.was_submitted? = icon('check', class: 'small-1') No Extension %td - if cpd_audit.extension_requested? = link_to 'Process Extension Request', '#process-extension-request', 'data-click-tab': true, class: 'btn btn-sm btn-primary' %tr %td Submitted %td= cpd_audit.submitted_at&.strftime('%F') || '-' %td - if cpd_audit.was_submitted? = icon('check', class: 'small-1') Done %td %tr %td Reviewed %td= cpd_audit.reviewed_at&.strftime('%F') || '-' %td = cpd_audit.cpd_audit_reviews.count { |review| review.completed? } = '/' = cpd_audit.cpd_audit_reviews.count Reviews Completed %td - if cpd_audit.was_submitted? && !cpd_audit.was_reviewed? = link_to 'Audit Reviews', '#audit-reviews', 'data-click-tab': true, class: 'btn btn-sm btn-primary' %tr %td Closed %td= cpd_audit.closed_at&.strftime('%F') || '-' %td - if cpd_audit.completed? = cpd_audit.determination %td - if cpd_audit.reviewed? && !cpd_audit.completed? = link_to 'Determination', '#determination', 'data-click-tab': true, class: 'btn btn-sm btn-primary'