JuanVqz/doctors

View on GitHub
app/views/patients/show.html.haml

Summary

Maintainability
Test Coverage
= render 'shared/section' do
  .flex.flex-col.md:flex-row.space-y-2.md:space-y-0.md:space-x-2
    = link_to :back, class: secondary_button do
      %span.fa.fa-arrow-left
      %span= t('.back')
    = link_to edit_patient_path(@patient), 'data-tooltip': t('tooltips.defaults.edit'), class: "#{secondary_button} tooltip tooltip-top" do
      %span.fa.fa-edit.text-yellow-600
      %span= t('tooltips.defaults.edit')
    = link_to new_appointment_path(patient_id: @patient.id), 'data-tooltip': t('tooltips.appointments.new'), class: "#{secondary_button} tooltip tooltip-top" do
      %span.fa.fa-book
      %span= t('tooltips.appointments.new')
    = link_to new_hospitalization_path(patient_id: @patient.id), 'data-tooltip': t('tooltips.hospitalizations.new'), class: "#{secondary_button} tooltip tooltip-top" do
      %span.fa.fa-ambulance
      %span= t('tooltips.hospitalizations.new')
    = link_to patient_appointments_path(patient_id: @patient.id), 'data-tooltip': t('tooltips.appointments.previous'), class: "#{secondary_button} tooltip tooltip-top" do
      %span.fa.fa-folder-open
      %span= t('tooltips.appointments.previous')
    = button_to patient_path(@patient), method: :delete, data: { turbo_confirm: t('shared.confirm.delete'), tooltip: t('tooltips.defaults.delete') }, class: "#{delete_button} tooltip tooltip-top" do
      %span.fa.fa-trash
      %span= t('tooltips.defaults.delete')

= render 'shared/section' do
  = render 'patients/general', patient: @patient
= render 'shared/section' do
  = render 'patients/clinic_history', patient: @patient
= render 'shared/section' do
  = render 'patients/address', address: @patient.address