class MedicalSafetyAlertPresenter < DocumentPresenter
  delegate(
    :alert_type,
    :medical_specialism,
    to: :"document.details"
  )

  def format_name
    "Medical safety alert"
  end

  def finder_path
    "/drug-device-alerts"
  end

private
  def filterable_metadata
    {
      alert_type: alert_type,
      medical_specialism: medical_specialism,
    }
  end
end

class MedicalSafetyAlertPresenter < DocumentPresenter
  delegate(
    :alert_type,
    :medical_specialism,
    :issued_date,
    to: :"document.details"
  )

  def format_name
    "Medical safety alert"
  end

  def finder_path
    "/drug-device-alerts"
  end

private
  def filterable_metadata
    {
      alert_type: alert_type,
      medical_specialism: medical_specialism,
    }
  end

  def extra_date_metadata
    {
      "Issued date" => issued_date,
    }
  end
end

Add issued date to medical safety alerts
Add issued date to medical safety alerts

Add the issued date attribute to the medical safety alaert date metadata
in  the presenter so that it can be shown in the frontend. This
corresponds to this commit in specialist publisher:
https://github.com/alphagov/specialist-publisher/pull/281

The trello ticket can be found here:
https://trello.com/c/QFE3nYlc/361-add-issued-date-to-medical-safety-alerts-2
