Skip to content

Commit 73316a3

Browse files
committed
feat: add company name tom preferences
1 parent 892a2bb commit 73316a3

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

app/controllers/spree/admin/avior_tax_settings_controller.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ module Spree
22
module Admin
33
class AviorTaxSettingsController < Spree::Admin::BaseController
44
def edit
5-
@preferences_api = %i[enabled service_url user_id password]
5+
@preferences_api = %i[enabled service_url company_name user_id password]
66
end
77

88
def update
99
SpreeAviorTax::Config[:enabled] = params[:enabled]
10+
SpreeAviorTax::Config[:comapny_name] = params[:comapny_name]
1011
SpreeAviorTax::Config[:service_url] = params[:service_url]
1112
SpreeAviorTax::Config[:user_id] = params[:user_id]
1213
SpreeAviorTax::Config[:password] = params[:password]

lib/spree_avior_tax/configuration.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
module SpreeAviorTax
22
class Configuration < ::Spree::Preferences::Configuration
33
preference :enabled, :boolean, default: true
4+
preference :company_name, :string
45
preference :user_id, :string
56
preference :password, :string
67
preference :service_url, :string

0 commit comments

Comments
 (0)