Skip to content

Commit

Permalink
feat: add company name tom preferences
Browse files Browse the repository at this point in the history
  • Loading branch information
collins-lagat committed Feb 22, 2023
1 parent 892a2bb commit 73316a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/controllers/spree/admin/avior_tax_settings_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ module Spree
module Admin
class AviorTaxSettingsController < Spree::Admin::BaseController
def edit
@preferences_api = %i[enabled service_url user_id password]
@preferences_api = %i[enabled service_url company_name user_id password]
end

def update
SpreeAviorTax::Config[:enabled] = params[:enabled]
SpreeAviorTax::Config[:comapny_name] = params[:comapny_name]
SpreeAviorTax::Config[:service_url] = params[:service_url]
SpreeAviorTax::Config[:user_id] = params[:user_id]
SpreeAviorTax::Config[:password] = params[:password]
Expand Down
1 change: 1 addition & 0 deletions lib/spree_avior_tax/configuration.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module SpreeAviorTax
class Configuration < ::Spree::Preferences::Configuration
preference :enabled, :boolean, default: true
preference :company_name, :string
preference :user_id, :string
preference :password, :string
preference :service_url, :string
Expand Down

0 comments on commit 73316a3

Please sign in to comment.