app/views/hospitalizations/index.html.haml
= render 'shared/section' do
%div.flex.flex-col.md:flex-row.md:justify-between
= render 'shared/actions', model: :hospitalization, search_path: hospitalizations_path
= render 'shared/section' do
= render 'shared/table' do
%thead.border-b.border-gray-300.dark:border-gray-700.text-gray-400
%tr
%th.py-2{scope: :col}= t('.patient')
%th.py-2{scope: :col}= t('.days_of_stay')
%th.py-2{scope: :col}= t('.created_at')
%th.py-2.text-center{scope: :col}= t('.actions')
%tbody
- @hospitalizations.each do |hospitalization|
%tr.hover:bg-gray-200.dark:hover:bg-gray-700
%td.py-2.whitespace-nowrap= hospitalization.patient
%td.py-2.whitespace-nowrap= hospitalization.days_of_stay
%td.py-2.whitespace-nowrap= hospitalization.created_at.to_date
%td.py-2.whitespace-nowrap
.flex.flex-row.justify-center.gap-2
= link_to hospitalization_path(hospitalization, format: :pdf), 'data-tooltip': t('tooltips.defaults.print'), class: "#{secondary_button} tooltip tooltip-top", target: "_blank" do
%span.fa.fa-print.text-red-600
= link_to edit_hospitalization_path(hospitalization), 'data-tooltip': t('tooltips.defaults.edit'), class: "#{secondary_button} tooltip tooltip-top" do
%span.fa.fa-edit.text-yellow-600
= link_to hospitalization, 'data-tooltip': t('tooltips.defaults.details'), class: "#{secondary_button} tooltip tooltip-top" do
%span.fa.fa-eye.text-sky-600
= render 'shared/pagination', pagy: @pagy