module TooltipHelper
  def tooltip_template(css_class: nil)
    tag.div class: "tooltip #{css_class}", role: "tooltip" do
      concat tag.div(class: "arrow")
      concat tag.div(class: "tooltip-inner")
    end
  end

  def get_approval_data_for_medical_release(medical_release)
    if medical_release.approved_by_user_name.present?
      "#{medical_release.approved_by_user_name} [#{medical_release.approved_by_user_email}]"
    else
      medical_release.approved_by_user_email
    end
  end
end
