mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
add enterprise producers_to_edit_orders setting
This commit is contained in:
@@ -39,6 +39,7 @@ module PermittedAttributes
|
||||
:preferred_product_low_stock_display,
|
||||
:hide_ofn_navigation, :white_label_logo, :white_label_logo_link,
|
||||
:hide_groups_tab, :external_billing_id,
|
||||
:enable_producers_to_edit_orders
|
||||
]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -123,3 +123,17 @@
|
||||
.five.columns.omega
|
||||
= f.radio_button :show_customer_contacts_to_suppliers, false
|
||||
= f.label :show_customer_contacts_to_suppliers, t('.customer_contacts_false'), value: :false
|
||||
= radio_button :enterprise, :show_customer_names_to_suppliers, false
|
||||
= label :enterprise_show_customer_names_to_suppliers, t('.customer_names_false'), value: :false
|
||||
|
||||
.row
|
||||
.three.columns.alpha
|
||||
%label= t('.producers_to_edit_orders')
|
||||
%div{'ofn-with-tip' => t('.producers_to_edit_orders_tip')}
|
||||
%a= t 'admin.whats_this'
|
||||
.three.columns
|
||||
= radio_button :enterprise, :enable_producers_to_edit_orders, true
|
||||
= label :enterprise_enable_producers_to_edit_orders, t('.producers_edit_orders_true'), value: :true
|
||||
.five.columns.omega
|
||||
= radio_button :enterprise, :enable_producers_to_edit_orders, false
|
||||
= label :enterprise_enable_producers_to_edit_orders, t('.producers_edit_orders_false'), value: :false
|
||||
|
||||
@@ -1348,12 +1348,16 @@ en:
|
||||
enable_subscriptions_true: "Enabled"
|
||||
customer_names_in_reports: "Customer Names in Reports"
|
||||
customer_names_tip: "Enable your suppliers to see your customers names in reports"
|
||||
producers_to_edit_orders: "Ability for producers to edit orders"
|
||||
producers_to_edit_orders_tip: "Enable your suppliers to see orders containing their products, and edit quantity and weight for their own products only."
|
||||
customer_names_false: "Disabled"
|
||||
customer_names_true: "Enabled"
|
||||
customer_contacts_in_reports: "Customer contact details in reports"
|
||||
customer_contacts_tip: "Enable your suppliers to see your customer email and phone numbers in reports"
|
||||
customer_contacts_false: "Disabled"
|
||||
customer_contacts_true: "Enabled"
|
||||
producers_edit_orders_false: "Disabled"
|
||||
producers_edit_orders_true: "Enabled"
|
||||
shopfront_message: "Shopfront Message"
|
||||
shopfront_message_placeholder: >
|
||||
An optional message to welcome customers and explain how to shop with you. If text is entered here it will be displayed in a home tab when customers first arrive at your shopfront.
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class AddEnableProducersToEditOrdersToEnterprises < ActiveRecord::Migration[7.0]
|
||||
def change
|
||||
add_column :enterprises, :enable_producers_to_edit_orders, :boolean, default: false, null: false
|
||||
end
|
||||
end
|
||||
@@ -230,7 +230,6 @@ ActiveRecord::Schema[7.0].define(version: 2025_03_04_234657) do
|
||||
t.text "white_label_logo_link"
|
||||
t.boolean "hide_groups_tab", default: false
|
||||
t.string "external_billing_id", limit: 128
|
||||
t.boolean "show_customer_contacts_to_suppliers", default: false, null: false
|
||||
t.index ["address_id"], name: "index_enterprises_on_address_id"
|
||||
t.index ["is_primary_producer", "sells"], name: "index_enterprises_on_is_primary_producer_and_sells"
|
||||
t.index ["name"], name: "index_enterprises_on_name", unique: true
|
||||
|
||||
Reference in New Issue
Block a user