Mark "Inventory (on hand)" report as deprecated

Co-Authored-By: Maikel <maikel@email.org.au>, @dacook
This commit is contained in:
Jean-Baptiste Bellet
2023-07-20 15:31:38 +02:00
parent 28fe479f53
commit a094a89c09
3 changed files with 6 additions and 2 deletions

View File

@@ -2,4 +2,7 @@
- report_subtypes.each do |report_subtype|
%li
- url = main_app.admin_report_path(report_type: report_type, report_subtype: report_subtype[1])
= link_to report_subtype[0], url
- if report_subtype.dig(2, :deprecated)
%strike= link_to report_subtype[0], url, title: t('admin.reports.deprecated')
- else
= link_to report_subtype[0], url

View File

@@ -1453,6 +1453,7 @@ en:
email_confirmation: "Email confirmation is pending. We've sent a confirmation email to %{email}."
not_visible: "%{enterprise} is not visible and so cannot be found on the map or in searches"
reports:
deprecated: "This report is deprecated and will be removed in a future release."
hidden: HIDDEN
unitsize: UNITSIZE
total: TOTAL

View File

@@ -40,7 +40,7 @@ module Reporting
def products_and_inventory_report_types
[
[i18n_translate("all_products"), :all_products],
[i18n_translate("inventory"), :inventory],
[i18n_translate("inventory"), :inventory, { deprecated: true }],
[i18n_translate("lettuce_share"), :lettuce_share]
]
end