-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from spree-edge/added-default-value-for-stripe-…
…connect-account-type Added default value for stripe connect account type
- Loading branch information
Showing
7 changed files
with
35 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
app/views/spree/admin/vendors/stripe_account_type.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<h4 class="pt-5"> Stripe Account Type </h4> | ||
|
||
<%= form_for([:admin, @vendor], url: admin_vendor_url, method: :put) do |f| %> | ||
<div class="form-group"> | ||
<%= f.field_container :stripe_account_type do %> | ||
<%= f.label :stripe_account_type %> | ||
<%= f.select :stripe_account_type, Spree::Vendor.stripe_account_types.keys.map{ |x| [x.titleize, x] }, {:include_blank => true}, {class: 'select2 form-control', "data-placeholder" => Spree.t(:stripe_account_type)} %> | ||
<% end %> | ||
</div> | ||
<div class="form-actions" data-hook="buttons"> | ||
<%= f.submit "Submit", class: "btn btn-primary", "data-turbo": "false"%> | ||
<span class="or"><%= Spree.t(:or) %></span> | ||
<%= button_link_to Spree.t('actions.cancel'), edit_admin_vendor_url(@vendor), icon: 'delete' %> | ||
</div> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
member do | ||
get :stripe_connect_url | ||
get :account_information | ||
get :stripe_account_type | ||
end | ||
end | ||
|
||
|
5 changes: 5 additions & 0 deletions
5
db/migrate/20220512055755_change_default_value_for_stripe_account_type.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class ChangeDefaultValueForStripeAccountType < ActiveRecord::Migration[6.1] | ||
def change | ||
change_column :spree_vendors, :stripe_account_type, :string, default: 0 | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
module SpreeStripeConnectOnboarding | ||
VERSION = '1.0.0'.freeze | ||
VERSION = '1.1.0'.freeze | ||
|
||
module_function | ||
|
||
|