lesli_admin 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/lesli_admin/account/currencies_controller.rb +60 -0
  3. data/app/controllers/lesli_admin/account/details_controller.rb +60 -0
  4. data/app/controllers/lesli_admin/account/locations_controller.rb +60 -0
  5. data/app/controllers/lesli_admin/account/settings_controller.rb +60 -0
  6. data/app/controllers/lesli_admin/accounts_controller.rb +8 -5
  7. data/app/controllers/lesli_admin/settings_controller.rb +58 -0
  8. data/app/helpers/lesli_admin/account/currencies_helper.rb +4 -0
  9. data/app/helpers/lesli_admin/account/details_helper.rb +4 -0
  10. data/app/helpers/lesli_admin/account/locations_helper.rb +4 -0
  11. data/app/helpers/lesli_admin/account/settings_helper.rb +4 -0
  12. data/app/helpers/lesli_admin/{profiles_helper.rb → settings_helper.rb} +1 -1
  13. data/app/models/lesli_admin/account/currency.rb +4 -0
  14. data/app/models/lesli_admin/account/detail.rb +4 -0
  15. data/app/models/lesli_admin/account/location.rb +4 -0
  16. data/app/models/lesli_admin/account/setting.rb +4 -0
  17. data/app/models/lesli_admin/account.rb +4 -5
  18. data/app/models/lesli_admin/dashboard.rb +1 -22
  19. data/app/models/lesli_admin/setting.rb +4 -0
  20. data/app/services/lesli_admin/account_service.rb +6 -6
  21. data/app/views/lesli_admin/account/currencies/_currency.html.erb +2 -0
  22. data/app/views/lesli_admin/account/currencies/_form.html.erb +17 -0
  23. data/app/views/lesli_admin/account/currencies/edit.html.erb +12 -0
  24. data/app/views/lesli_admin/account/currencies/index.html.erb +16 -0
  25. data/app/views/lesli_admin/account/currencies/new.html.erb +11 -0
  26. data/app/views/lesli_admin/account/currencies/show.html.erb +10 -0
  27. data/app/views/lesli_admin/account/details/_detail.html.erb +2 -0
  28. data/app/views/lesli_admin/account/details/_form.html.erb +17 -0
  29. data/app/views/lesli_admin/account/details/edit.html.erb +12 -0
  30. data/app/views/lesli_admin/account/details/index.html.erb +16 -0
  31. data/app/views/lesli_admin/account/details/new.html.erb +11 -0
  32. data/app/views/lesli_admin/account/details/show.html.erb +10 -0
  33. data/app/views/lesli_admin/account/locations/_form.html.erb +17 -0
  34. data/app/views/lesli_admin/account/locations/_location.html.erb +2 -0
  35. data/app/views/lesli_admin/account/locations/edit.html.erb +12 -0
  36. data/app/views/lesli_admin/account/locations/index.html.erb +16 -0
  37. data/app/views/lesli_admin/account/locations/new.html.erb +11 -0
  38. data/app/views/lesli_admin/account/locations/show.html.erb +10 -0
  39. data/app/views/lesli_admin/account/settings/_form.html.erb +17 -0
  40. data/app/views/lesli_admin/account/settings/_setting.html.erb +2 -0
  41. data/app/views/lesli_admin/account/settings/edit.html.erb +12 -0
  42. data/app/views/lesli_admin/account/settings/index.html.erb +16 -0
  43. data/app/views/lesli_admin/account/settings/new.html.erb +11 -0
  44. data/app/views/lesli_admin/account/settings/show.html.erb +10 -0
  45. data/app/views/lesli_admin/accounts/show.html.erb +3 -4
  46. data/app/views/lesli_admin/dashboards/_component-installed-engines.html.erb +8 -0
  47. data/app/views/lesli_admin/partials/_navigation.html.erb +1 -1
  48. data/app/views/lesli_admin/settings/_defaults.html.erb +61 -0
  49. data/app/views/lesli_admin/settings/_form.html.erb +17 -0
  50. data/app/views/lesli_admin/settings/_modules.html.erb +61 -0
  51. data/app/views/lesli_admin/settings/_setting.html.erb +2 -0
  52. data/app/views/lesli_admin/settings/edit.html.erb +12 -0
  53. data/app/views/lesli_admin/settings/index.html.erb +16 -0
  54. data/app/views/lesli_admin/settings/new.html.erb +11 -0
  55. data/app/views/lesli_admin/settings/show.html.erb +17 -0
  56. data/config/routes.rb +2 -2
  57. data/db/migrate/v1/0101000210_create_lesli_admin_account_details.rb +70 -0
  58. data/db/migrate/v1/{0101003010_create_lesli_admin_dashboards.rb → 0101000313_create_lesli_admin_account_settings.rb} +11 -4
  59. data/db/migrate/v1/0101000410_create_lesli_admin_account_locations.rb +63 -0
  60. data/{app/controllers/lesli_admin/profiles_controller.rb → db/migrate/v1/0101000510_create_lesli_admin_account_currencies.rb} +15 -15
  61. data/lib/lesli_admin/version.rb +2 -2
  62. data/readme.md +62 -17
  63. metadata +59 -34
  64. data/app/controllers/lesli_admin/abouts_controller.rb +0 -54
  65. data/app/controllers/lesli_admin/dashboard/components_controller.rb +0 -60
  66. data/app/models/lesli_admin/dashboard/component.rb +0 -49
  67. data/app/views/lesli_admin/abouts/show.html.erb +0 -82
  68. data/app/views/lesli_admin/accounts/_account.html.erb +0 -2
  69. data/app/views/lesli_admin/accounts/_form.html.erb +0 -17
  70. data/app/views/lesli_admin/accounts/edit.html.erb +0 -10
  71. data/app/views/lesli_admin/accounts/index.html.erb +0 -34
  72. data/app/views/lesli_admin/accounts/new.html.erb +0 -9
  73. data/app/views/lesli_admin/accounts/update.turbo_stream.erb +0 -3
  74. data/app/views/lesli_admin/profiles/show.html.erb +0 -1
  75. data/lib/vue/application.js +0 -96
  76. data/lib/vue/apps/about/show.vue +0 -74
  77. data/lib/vue/apps/account/components/form-address.vue +0 -119
  78. data/lib/vue/apps/account/components/form-contact.vue +0 -122
  79. data/lib/vue/apps/account/components/form-information.vue +0 -89
  80. data/lib/vue/apps/account/show.vue +0 -87
  81. data/lib/vue/apps/dashboards/components/lesli-version.vue +0 -73
  82. data/lib/vue/apps/profile/show.vue +0 -129
  83. data/lib/vue/stores/account.js +0 -111
  84. data/lib/vue/stores/account_settings.js +0 -342
  85. data/lib/vue/stores/roles.js +0 -89
  86. data/lib/vue/stores/translations.json +0 -162
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d4b485d8e03b188da1dc51864188fc0e44a1cf13e9a140a73b253ba227c3049e
4
- data.tar.gz: 01fac742bc54ee5c874bddac9a2cda5cb67ca7713f4335d8d445c76ca8767798
3
+ metadata.gz: fcfea6ed96a81aab1ecb84e54a06f0d6aa14c9221074accd041cadebc7f6b788
4
+ data.tar.gz: '08f33b0478d7038a53e852824bee01326cb88522293db5dddf827a7f6028b0f7'
5
5
  SHA512:
6
- metadata.gz: e1abaf187d141e5a699fb7a77ae8c0e340fab9f0ca6eaf258199ded1205aee59324d3ba67b92a018cb3ae03431a5c567bfa994086a2195442a5b7d7ccb888b3f
7
- data.tar.gz: db79ad37cb601953e5e2b3af654dc0ac7e10da38756e7b55e8f6a0e9f9bc405e056a2929de46e565f6481b2bd3fbd38747e3a9d01ab0d5f841474fa54ad7242e
6
+ metadata.gz: 0fda832059c70e6cbe03ef80a1e044db64ca42528af8f771d1e9381b35844cb2aa34ef28cbcb902e84c93c5261787bee2f9a352ea351af9f2d5ef8aa5e347060
7
+ data.tar.gz: 803510d55a87e01ac38958fcb7407883e72179fcaf0556b41c287f2416fa8f6ef815e5f40598b7bec3d35155f8f8e5902415353d77812aafe0a9236eb2353960
@@ -0,0 +1,60 @@
1
+ module LesliAdmin
2
+ class Account::CurrenciesController < ApplicationController
3
+ before_action :set_account_currency, only: %i[ show edit update destroy ]
4
+
5
+ # GET /account/currencies
6
+ def index
7
+ @account_currencies = Account::Currency.all
8
+ end
9
+
10
+ # GET /account/currencies/1
11
+ def show
12
+ end
13
+
14
+ # GET /account/currencies/new
15
+ def new
16
+ @account_currency = Account::Currency.new
17
+ end
18
+
19
+ # GET /account/currencies/1/edit
20
+ def edit
21
+ end
22
+
23
+ # POST /account/currencies
24
+ def create
25
+ @account_currency = Account::Currency.new(account_currency_params)
26
+
27
+ if @account_currency.save
28
+ redirect_to @account_currency, notice: "Currency was successfully created."
29
+ else
30
+ render :new, status: :unprocessable_entity
31
+ end
32
+ end
33
+
34
+ # PATCH/PUT /account/currencies/1
35
+ def update
36
+ if @account_currency.update(account_currency_params)
37
+ redirect_to @account_currency, notice: "Currency was successfully updated.", status: :see_other
38
+ else
39
+ render :edit, status: :unprocessable_entity
40
+ end
41
+ end
42
+
43
+ # DELETE /account/currencies/1
44
+ def destroy
45
+ @account_currency.destroy!
46
+ redirect_to account_currencies_path, notice: "Currency was successfully destroyed.", status: :see_other
47
+ end
48
+
49
+ private
50
+ # Use callbacks to share common setup or constraints between actions.
51
+ def set_account_currency
52
+ @account_currency = Account::Currency.find(params.expect(:id))
53
+ end
54
+
55
+ # Only allow a list of trusted parameters through.
56
+ def account_currency_params
57
+ params.fetch(:account_currency, {})
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,60 @@
1
+ module LesliAdmin
2
+ class Account::DetailsController < ApplicationController
3
+ before_action :set_account_detail, only: %i[ show edit update destroy ]
4
+
5
+ # GET /account/details
6
+ def index
7
+ @account_details = Account::Detail.all
8
+ end
9
+
10
+ # GET /account/details/1
11
+ def show
12
+ end
13
+
14
+ # GET /account/details/new
15
+ def new
16
+ @account_detail = Account::Detail.new
17
+ end
18
+
19
+ # GET /account/details/1/edit
20
+ def edit
21
+ end
22
+
23
+ # POST /account/details
24
+ def create
25
+ @account_detail = Account::Detail.new(account_detail_params)
26
+
27
+ if @account_detail.save
28
+ redirect_to @account_detail, notice: "Detail was successfully created."
29
+ else
30
+ render :new, status: :unprocessable_entity
31
+ end
32
+ end
33
+
34
+ # PATCH/PUT /account/details/1
35
+ def update
36
+ if @account_detail.update(account_detail_params)
37
+ redirect_to @account_detail, notice: "Detail was successfully updated.", status: :see_other
38
+ else
39
+ render :edit, status: :unprocessable_entity
40
+ end
41
+ end
42
+
43
+ # DELETE /account/details/1
44
+ def destroy
45
+ @account_detail.destroy!
46
+ redirect_to account_details_path, notice: "Detail was successfully destroyed.", status: :see_other
47
+ end
48
+
49
+ private
50
+ # Use callbacks to share common setup or constraints between actions.
51
+ def set_account_detail
52
+ @account_detail = Account::Detail.find(params.expect(:id))
53
+ end
54
+
55
+ # Only allow a list of trusted parameters through.
56
+ def account_detail_params
57
+ params.fetch(:account_detail, {})
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,60 @@
1
+ module LesliAdmin
2
+ class Account::LocationsController < ApplicationController
3
+ before_action :set_account_location, only: %i[ show edit update destroy ]
4
+
5
+ # GET /account/locations
6
+ def index
7
+ @account_locations = Account::Location.all
8
+ end
9
+
10
+ # GET /account/locations/1
11
+ def show
12
+ end
13
+
14
+ # GET /account/locations/new
15
+ def new
16
+ @account_location = Account::Location.new
17
+ end
18
+
19
+ # GET /account/locations/1/edit
20
+ def edit
21
+ end
22
+
23
+ # POST /account/locations
24
+ def create
25
+ @account_location = Account::Location.new(account_location_params)
26
+
27
+ if @account_location.save
28
+ redirect_to @account_location, notice: "Location was successfully created."
29
+ else
30
+ render :new, status: :unprocessable_entity
31
+ end
32
+ end
33
+
34
+ # PATCH/PUT /account/locations/1
35
+ def update
36
+ if @account_location.update(account_location_params)
37
+ redirect_to @account_location, notice: "Location was successfully updated.", status: :see_other
38
+ else
39
+ render :edit, status: :unprocessable_entity
40
+ end
41
+ end
42
+
43
+ # DELETE /account/locations/1
44
+ def destroy
45
+ @account_location.destroy!
46
+ redirect_to account_locations_path, notice: "Location was successfully destroyed.", status: :see_other
47
+ end
48
+
49
+ private
50
+ # Use callbacks to share common setup or constraints between actions.
51
+ def set_account_location
52
+ @account_location = Account::Location.find(params.expect(:id))
53
+ end
54
+
55
+ # Only allow a list of trusted parameters through.
56
+ def account_location_params
57
+ params.fetch(:account_location, {})
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,60 @@
1
+ module LesliAdmin
2
+ class Account::SettingsController < ApplicationController
3
+ before_action :set_account_setting, only: %i[ show edit update destroy ]
4
+
5
+ # GET /account/settings
6
+ def index
7
+ @account_settings = Account::Setting.all
8
+ end
9
+
10
+ # GET /account/settings/1
11
+ def show
12
+ end
13
+
14
+ # GET /account/settings/new
15
+ def new
16
+ @account_setting = Account::Setting.new
17
+ end
18
+
19
+ # GET /account/settings/1/edit
20
+ def edit
21
+ end
22
+
23
+ # POST /account/settings
24
+ def create
25
+ @account_setting = Account::Setting.new(account_setting_params)
26
+
27
+ if @account_setting.save
28
+ redirect_to @account_setting, notice: "Setting was successfully created."
29
+ else
30
+ render :new, status: :unprocessable_entity
31
+ end
32
+ end
33
+
34
+ # PATCH/PUT /account/settings/1
35
+ def update
36
+ if @account_setting.update(account_setting_params)
37
+ redirect_to @account_setting, notice: "Setting was successfully updated.", status: :see_other
38
+ else
39
+ render :edit, status: :unprocessable_entity
40
+ end
41
+ end
42
+
43
+ # DELETE /account/settings/1
44
+ def destroy
45
+ @account_setting.destroy!
46
+ redirect_to account_settings_path, notice: "Setting was successfully destroyed.", status: :see_other
47
+ end
48
+
49
+ private
50
+ # Use callbacks to share common setup or constraints between actions.
51
+ def set_account_setting
52
+ @account_setting = Account::Setting.find(params.expect(:id))
53
+ end
54
+
55
+ # Only allow a list of trusted parameters through.
56
+ def account_setting_params
57
+ params.fetch(:account_setting, {})
58
+ end
59
+ end
60
+ end
@@ -35,12 +35,12 @@ module LesliAdmin
35
35
  before_action :set_account, only: %i[show update]
36
36
 
37
37
  def show
38
+ @account = AccountService.new(current_user, query).show
38
39
  respond_to do |format|
39
- format.html do
40
- @account = AccountService.new(current_user, query).show
41
- end
40
+ format.html
41
+ format.turbo_stream
42
42
  format.json do
43
- respond_with_successful(AccountService.new(current_user, query).show)
43
+ respond_with_successful(@account)
44
44
  end
45
45
  end
46
46
  end
@@ -49,7 +49,10 @@ module LesliAdmin
49
49
 
50
50
  # check saved
51
51
  if @account.update(account_params)
52
- success("Account updated successfully!")
52
+ log(:description => 'Updated the account details')
53
+ respond_with_lesli(
54
+ :turbo => stream_notification_success('Account updated')
55
+ )
53
56
  else
54
57
  #respond_with_error(@account.errors)
55
58
  end
@@ -0,0 +1,58 @@
1
+ module LesliAdmin
2
+ class SettingsController < ApplicationController
3
+ before_action :set_setting, only: %i[ show edit update destroy ]
4
+
5
+ # GET /settings
6
+ def index
7
+ end
8
+
9
+ # GET /settings/1
10
+ def show
11
+ end
12
+
13
+ # GET /settings/new
14
+ def new
15
+ @setting = Setting.new
16
+ end
17
+
18
+ # GET /settings/1/edit
19
+ def edit
20
+ end
21
+
22
+ # POST /settings
23
+ def create
24
+ @setting = Setting.new(setting_params)
25
+
26
+ if @setting.save
27
+ redirect_to @setting, notice: "Setting was successfully created."
28
+ else
29
+ render :new, status: :unprocessable_entity
30
+ end
31
+ end
32
+
33
+ # PATCH/PUT /settings/1
34
+ def update
35
+ if @setting.update(setting_params)
36
+ redirect_to @setting, notice: "Setting was successfully updated.", status: :see_other
37
+ else
38
+ render :edit, status: :unprocessable_entity
39
+ end
40
+ end
41
+
42
+ # DELETE /settings/1
43
+ def destroy
44
+ @setting.destroy!
45
+ redirect_to settings_path, notice: "Setting was successfully destroyed.", status: :see_other
46
+ end
47
+
48
+ private
49
+ # Use callbacks to share common setup or constraints between actions.
50
+ def set_setting
51
+ end
52
+
53
+ # Only allow a list of trusted parameters through.
54
+ def setting_params
55
+ params.fetch(:setting, {})
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,4 @@
1
+ module LesliAdmin
2
+ module Account::CurrenciesHelper
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module LesliAdmin
2
+ module Account::DetailsHelper
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module LesliAdmin
2
+ module Account::LocationsHelper
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module LesliAdmin
2
+ module Account::SettingsHelper
3
+ end
4
+ end
@@ -1,4 +1,4 @@
1
1
  module LesliAdmin
2
- module ProfilesHelper
2
+ module SettingsHelper
3
3
  end
4
4
  end
@@ -0,0 +1,4 @@
1
+ module LesliAdmin
2
+ class Account::Currency < ApplicationRecord
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module LesliAdmin
2
+ class Account::Detail < ApplicationRecord
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module LesliAdmin
2
+ class Account::Location < ApplicationRecord
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module LesliAdmin
2
+ class Account::Setting < ApplicationRecord
3
+ end
4
+ end
@@ -2,7 +2,7 @@
2
2
 
3
3
  Lesli
4
4
 
5
- Copyright (c) 2023, Lesli Technologies, S. A.
5
+ Copyright (c) 2026, Lesli Technologies, S. A.
6
6
 
7
7
  This program is free software: you can redistribute it and/or modify
8
8
  it under the terms of the GNU General Public License as published by
@@ -19,11 +19,11 @@ along with this program. If not, see http://www.gnu.org/licenses/.
19
19
 
20
20
  Lesli · Ruby on Rails SaaS Development Framework.
21
21
 
22
- Made with ♥ by https://www.lesli.tech
22
+ Made with ♥ by LesliTech
23
23
  Building a better future, one line of code at a time.
24
24
 
25
25
  @contact hello@lesli.tech
26
- @website https://www.lesli.dev
26
+ @website https://www.lesli.tech
27
27
  @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
28
28
 
29
29
  // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
@@ -33,12 +33,11 @@ Building a better future, one line of code at a time.
33
33
  module LesliAdmin
34
34
  class Account < ApplicationRecord
35
35
  belongs_to :account, class_name: "Lesli::Account"
36
- has_many :users, class_name: "Lesli::User"
36
+ has_many :dashboards
37
37
 
38
38
  after_create :initialize_account
39
39
 
40
40
  def initialize_account
41
- #Dashboard.initialize_account(self)
42
41
  end
43
42
  end
44
43
  end
@@ -32,27 +32,6 @@ Building a better future, one line of code at a time.
32
32
 
33
33
  module LesliAdmin
34
34
  class Dashboard < Lesli::Shared::Dashboard
35
- self.table_name = "lesli_admin_dashboards"
36
- belongs_to :account
37
-
38
- has_many :components, inverse_of: :dashboard, autosave: true, dependent: :destroy
39
- accepts_nested_attributes_for :components, allow_destroy: true
40
-
41
- def self.initialize_account(account)
42
- self.create_with(
43
- default: true,
44
- main: false,
45
- components_attributes: [{
46
- name: "Lesli version",
47
- component_id: "admin-lesli-version",
48
- layout: 3,
49
- query_configuration: {},
50
- custom_configuration: {}
51
- }]
52
- ).find_or_create_by!(
53
- account: account,
54
- name: "Admin Default Dashboard"
55
- )
56
- end
35
+ COMPONENTS = %i[installed_engines]
57
36
  end
58
37
  end
@@ -0,0 +1,4 @@
1
+ module LesliAdmin
2
+ class Setting < ApplicationRecord
3
+ end
4
+ end
@@ -33,9 +33,9 @@ Building a better future, one line of code at a time.
33
33
  module LesliAdmin
34
34
  class AccountService < Lesli::ApplicationLesliService
35
35
  def show
36
- account = Lesli::Account.left_joins(:detail)
36
+ account = Lesli::Account #.left_joins(:detail)
37
37
  .where(:id => current_user.account.id)
38
- .select(:id, :email, :name, :status, :company_name_legal, :company_tagline)
38
+ .select(:id, :email, :name, :status) #, :company_name_legal, :company_tagline)
39
39
  .first
40
40
 
41
41
  {
@@ -43,10 +43,10 @@ module LesliAdmin
43
43
  name: account.name,
44
44
  email: account.email,
45
45
  status: account.status,
46
- detail_attributes: {
47
- company_name_legal: account.company_name_legal,
48
- company_tagline: account.company_tagline
49
- }
46
+ # detail_attributes: {
47
+ # company_name_legal: account.company_name_legal,
48
+ # company_tagline: account.company_tagline
49
+ # }
50
50
  }
51
51
 
52
52
  #current_user.account.joins(:detail)
@@ -0,0 +1,2 @@
1
+ <div id="<%= dom_id currency %>">
2
+ </div>
@@ -0,0 +1,17 @@
1
+ <%= form_with(model: account_currency) do |form| %>
2
+ <% if account_currency.errors.any? %>
3
+ <div style="color: red">
4
+ <h2><%= pluralize(account_currency.errors.count, "error") %> prohibited this account_currency from being saved:</h2>
5
+
6
+ <ul>
7
+ <% account_currency.errors.each do |error| %>
8
+ <li><%= error.full_message %></li>
9
+ <% end %>
10
+ </ul>
11
+ </div>
12
+ <% end %>
13
+
14
+ <div>
15
+ <%= form.submit %>
16
+ </div>
17
+ <% end %>
@@ -0,0 +1,12 @@
1
+ <% content_for :title, "Editing currency" %>
2
+
3
+ <h1>Editing currency</h1>
4
+
5
+ <%= render "form", account_currency: @account_currency %>
6
+
7
+ <br>
8
+
9
+ <div>
10
+ <%= link_to "Show this currency", @account_currency %> |
11
+ <%= link_to "Back to currencies", account_currencies_path %>
12
+ </div>
@@ -0,0 +1,16 @@
1
+ <p style="color: green"><%= notice %></p>
2
+
3
+ <% content_for :title, "Currencies" %>
4
+
5
+ <h1>Currencies</h1>
6
+
7
+ <div id="account_currencies">
8
+ <% @account_currencies.each do |account_currency| %>
9
+ <%= render account_currency %>
10
+ <p>
11
+ <%= link_to "Show this currency", account_currency %>
12
+ </p>
13
+ <% end %>
14
+ </div>
15
+
16
+ <%= link_to "New currency", new_account_currency_path %>
@@ -0,0 +1,11 @@
1
+ <% content_for :title, "New currency" %>
2
+
3
+ <h1>New currency</h1>
4
+
5
+ <%= render "form", account_currency: @account_currency %>
6
+
7
+ <br>
8
+
9
+ <div>
10
+ <%= link_to "Back to currencies", account_currencies_path %>
11
+ </div>
@@ -0,0 +1,10 @@
1
+ <p style="color: green"><%= notice %></p>
2
+
3
+ <%= render @account_currency %>
4
+
5
+ <div>
6
+ <%= link_to "Edit this currency", edit_account_currency_path(@account_currency) %> |
7
+ <%= link_to "Back to currencies", account_currencies_path %>
8
+
9
+ <%= button_to "Destroy this currency", @account_currency, method: :delete %>
10
+ </div>
@@ -0,0 +1,2 @@
1
+ <div id="<%= dom_id detail %>">
2
+ </div>
@@ -0,0 +1,17 @@
1
+ <%= form_with(model: account_detail) do |form| %>
2
+ <% if account_detail.errors.any? %>
3
+ <div style="color: red">
4
+ <h2><%= pluralize(account_detail.errors.count, "error") %> prohibited this account_detail from being saved:</h2>
5
+
6
+ <ul>
7
+ <% account_detail.errors.each do |error| %>
8
+ <li><%= error.full_message %></li>
9
+ <% end %>
10
+ </ul>
11
+ </div>
12
+ <% end %>
13
+
14
+ <div>
15
+ <%= form.submit %>
16
+ </div>
17
+ <% end %>
@@ -0,0 +1,12 @@
1
+ <% content_for :title, "Editing detail" %>
2
+
3
+ <h1>Editing detail</h1>
4
+
5
+ <%= render "form", account_detail: @account_detail %>
6
+
7
+ <br>
8
+
9
+ <div>
10
+ <%= link_to "Show this detail", @account_detail %> |
11
+ <%= link_to "Back to details", account_details_path %>
12
+ </div>
@@ -0,0 +1,16 @@
1
+ <p style="color: green"><%= notice %></p>
2
+
3
+ <% content_for :title, "Details" %>
4
+
5
+ <h1>Details</h1>
6
+
7
+ <div id="account_details">
8
+ <% @account_details.each do |account_detail| %>
9
+ <%= render account_detail %>
10
+ <p>
11
+ <%= link_to "Show this detail", account_detail %>
12
+ </p>
13
+ <% end %>
14
+ </div>
15
+
16
+ <%= link_to "New detail", new_account_detail_path %>
@@ -0,0 +1,11 @@
1
+ <% content_for :title, "New detail" %>
2
+
3
+ <h1>New detail</h1>
4
+
5
+ <%= render "form", account_detail: @account_detail %>
6
+
7
+ <br>
8
+
9
+ <div>
10
+ <%= link_to "Back to details", account_details_path %>
11
+ </div>
@@ -0,0 +1,10 @@
1
+ <p style="color: green"><%= notice %></p>
2
+
3
+ <%= render @account_detail %>
4
+
5
+ <div>
6
+ <%= link_to "Edit this detail", edit_account_detail_path(@account_detail) %> |
7
+ <%= link_to "Back to details", account_details_path %>
8
+
9
+ <%= button_to "Destroy this detail", @account_detail, method: :delete %>
10
+ </div>