lesli_admin 1.0.1 → 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 (79) 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 +5 -4
  7. data/app/helpers/lesli_admin/account/currencies_helper.rb +4 -0
  8. data/app/helpers/lesli_admin/account/details_helper.rb +4 -0
  9. data/app/helpers/lesli_admin/account/locations_helper.rb +4 -0
  10. data/app/helpers/lesli_admin/account/settings_helper.rb +4 -0
  11. data/app/models/lesli_admin/account/currency.rb +4 -0
  12. data/app/models/lesli_admin/account/detail.rb +4 -0
  13. data/app/models/lesli_admin/account/location.rb +4 -0
  14. data/app/models/lesli_admin/account/setting.rb +4 -0
  15. data/app/models/lesli_admin/account.rb +3 -4
  16. data/app/models/lesli_admin/dashboard.rb +0 -3
  17. data/app/services/lesli_admin/account_service.rb +6 -6
  18. data/app/views/lesli_admin/account/currencies/_currency.html.erb +2 -0
  19. data/app/views/lesli_admin/account/currencies/_form.html.erb +17 -0
  20. data/app/views/lesli_admin/account/currencies/edit.html.erb +12 -0
  21. data/app/views/lesli_admin/account/currencies/index.html.erb +16 -0
  22. data/app/views/lesli_admin/account/currencies/new.html.erb +11 -0
  23. data/app/views/lesli_admin/account/currencies/show.html.erb +10 -0
  24. data/app/views/lesli_admin/account/details/_detail.html.erb +2 -0
  25. data/app/views/lesli_admin/account/details/_form.html.erb +17 -0
  26. data/app/views/lesli_admin/account/details/edit.html.erb +12 -0
  27. data/app/views/lesli_admin/account/details/index.html.erb +16 -0
  28. data/app/views/lesli_admin/account/details/new.html.erb +11 -0
  29. data/app/views/lesli_admin/account/details/show.html.erb +10 -0
  30. data/app/views/lesli_admin/account/locations/_form.html.erb +17 -0
  31. data/app/views/lesli_admin/account/locations/_location.html.erb +2 -0
  32. data/app/views/lesli_admin/account/locations/edit.html.erb +12 -0
  33. data/app/views/lesli_admin/account/locations/index.html.erb +16 -0
  34. data/app/views/lesli_admin/account/locations/new.html.erb +11 -0
  35. data/app/views/lesli_admin/account/locations/show.html.erb +10 -0
  36. data/app/views/lesli_admin/account/settings/_form.html.erb +17 -0
  37. data/app/views/lesli_admin/account/settings/_setting.html.erb +2 -0
  38. data/app/views/lesli_admin/account/settings/edit.html.erb +12 -0
  39. data/app/views/lesli_admin/account/settings/index.html.erb +16 -0
  40. data/app/views/lesli_admin/account/settings/new.html.erb +11 -0
  41. data/app/views/lesli_admin/account/settings/show.html.erb +10 -0
  42. data/app/views/lesli_admin/accounts/show.html.erb +3 -3
  43. data/app/views/lesli_admin/dashboards/_component-installed-engines.html.erb +7 -4
  44. data/app/views/lesli_admin/partials/_navigation.html.erb +0 -1
  45. data/app/views/lesli_admin/settings/_defaults.html.erb +61 -0
  46. data/app/views/lesli_admin/settings/_modules.html.erb +61 -0
  47. data/app/views/lesli_admin/settings/show.html.erb +7 -1
  48. data/config/routes.rb +1 -3
  49. data/db/migrate/v1/0101000210_create_lesli_admin_account_details.rb +70 -0
  50. data/db/migrate/v1/{0101003010_create_lesli_admin_dashboards.rb → 0101000313_create_lesli_admin_account_settings.rb} +11 -4
  51. data/db/migrate/v1/0101000410_create_lesli_admin_account_locations.rb +63 -0
  52. data/{app/controllers/lesli_admin/abouts_controller.rb → db/migrate/v1/0101000510_create_lesli_admin_account_currencies.rb} +14 -14
  53. data/lib/lesli_admin/version.rb +2 -2
  54. data/readme.md +59 -20
  55. metadata +47 -34
  56. data/app/controllers/lesli_admin/dashboard/components_controller.rb +0 -60
  57. data/app/controllers/lesli_admin/profiles_controller.rb +0 -48
  58. data/app/helpers/lesli_admin/profiles_helper.rb +0 -4
  59. data/app/models/lesli_admin/dashboard/component.rb +0 -49
  60. data/app/views/lesli_admin/abouts/show.html.erb +0 -73
  61. data/app/views/lesli_admin/accounts/_account.html.erb +0 -2
  62. data/app/views/lesli_admin/accounts/_form.html.erb +0 -17
  63. data/app/views/lesli_admin/accounts/edit.html.erb +0 -10
  64. data/app/views/lesli_admin/accounts/index.html.erb +0 -34
  65. data/app/views/lesli_admin/accounts/new.html.erb +0 -9
  66. data/app/views/lesli_admin/accounts/update.turbo_stream.erb +0 -3
  67. data/app/views/lesli_admin/profiles/show.html.erb +0 -1
  68. data/lib/vue/application.js +0 -96
  69. data/lib/vue/apps/about/show.vue +0 -74
  70. data/lib/vue/apps/account/components/form-address.vue +0 -119
  71. data/lib/vue/apps/account/components/form-contact.vue +0 -122
  72. data/lib/vue/apps/account/components/form-information.vue +0 -89
  73. data/lib/vue/apps/account/show.vue +0 -87
  74. data/lib/vue/apps/dashboards/components/lesli-version.vue +0 -73
  75. data/lib/vue/apps/profile/show.vue +0 -129
  76. data/lib/vue/stores/account.js +0 -111
  77. data/lib/vue/stores/account_settings.js +0 -342
  78. data/lib/vue/stores/roles.js +0 -89
  79. data/lib/vue/stores/translations.json +0 -162
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0fe2fa40b79cedac9232755c2b3f928e6836d802b5e379e97d645bd776fef41e
4
- data.tar.gz: f1c5398d9f4201c73c055635c0ed905def1be93a9876da2e7c22db94b22cb317
3
+ metadata.gz: fcfea6ed96a81aab1ecb84e54a06f0d6aa14c9221074accd041cadebc7f6b788
4
+ data.tar.gz: '08f33b0478d7038a53e852824bee01326cb88522293db5dddf827a7f6028b0f7'
5
5
  SHA512:
6
- metadata.gz: 60051ae8b957b7702313ce4c71b08d572a483f528d40723eb1ce4d890787863e40a963e5e2d52b78b6d629c5f6f65b7dbf8ade4a65389147daeb7bdefd976d22
7
- data.tar.gz: 2ee2f8246bb3c3476b4f3f991ad9984753eb2812281be34d0f3173f8c60f0b332e9d8cf675898057f3c7e0a28be719bce425dade9d940cb5bcc41fd8793d8ac6
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
@@ -38,9 +38,7 @@ module LesliAdmin
38
38
  @account = AccountService.new(current_user, query).show
39
39
  respond_to do |format|
40
40
  format.html
41
- format.turbo_stream do
42
- render(turbo_stream: turbo_stream.replace("application-lesli-notifications", partial: "lesli/partials/application-lesli-notifications"))
43
- end
41
+ format.turbo_stream
44
42
  format.json do
45
43
  respond_with_successful(@account)
46
44
  end
@@ -51,7 +49,10 @@ module LesliAdmin
51
49
 
52
50
  # check saved
53
51
  if @account.update(account_params)
54
- success("Account updated successfully!")
52
+ log(:description => 'Updated the account details')
53
+ respond_with_lesli(
54
+ :turbo => stream_notification_success('Account updated')
55
+ )
55
56
  else
56
57
  #respond_with_error(@account.errors)
57
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
@@ -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
  // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
@@ -38,7 +38,6 @@ module LesliAdmin
38
38
  after_create :initialize_account
39
39
 
40
40
  def initialize_account
41
- Dashboard.initialize_dashboard(self)
42
41
  end
43
42
  end
44
43
  end
@@ -32,9 +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
35
  COMPONENTS = %i[installed_engines]
39
36
  end
40
37
  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>
@@ -0,0 +1,17 @@
1
+ <%= form_with(model: account_location) do |form| %>
2
+ <% if account_location.errors.any? %>
3
+ <div style="color: red">
4
+ <h2><%= pluralize(account_location.errors.count, "error") %> prohibited this account_location from being saved:</h2>
5
+
6
+ <ul>
7
+ <% account_location.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,2 @@
1
+ <div id="<%= dom_id location %>">
2
+ </div>
@@ -0,0 +1,12 @@
1
+ <% content_for :title, "Editing location" %>
2
+
3
+ <h1>Editing location</h1>
4
+
5
+ <%= render "form", account_location: @account_location %>
6
+
7
+ <br>
8
+
9
+ <div>
10
+ <%= link_to "Show this location", @account_location %> |
11
+ <%= link_to "Back to locations", account_locations_path %>
12
+ </div>
@@ -0,0 +1,16 @@
1
+ <p style="color: green"><%= notice %></p>
2
+
3
+ <% content_for :title, "Locations" %>
4
+
5
+ <h1>Locations</h1>
6
+
7
+ <div id="account_locations">
8
+ <% @account_locations.each do |account_location| %>
9
+ <%= render account_location %>
10
+ <p>
11
+ <%= link_to "Show this location", account_location %>
12
+ </p>
13
+ <% end %>
14
+ </div>
15
+
16
+ <%= link_to "New location", new_account_location_path %>
@@ -0,0 +1,11 @@
1
+ <% content_for :title, "New location" %>
2
+
3
+ <h1>New location</h1>
4
+
5
+ <%= render "form", account_location: @account_location %>
6
+
7
+ <br>
8
+
9
+ <div>
10
+ <%= link_to "Back to locations", account_locations_path %>
11
+ </div>
@@ -0,0 +1,10 @@
1
+ <p style="color: green"><%= notice %></p>
2
+
3
+ <%= render @account_location %>
4
+
5
+ <div>
6
+ <%= link_to "Edit this location", edit_account_location_path(@account_location) %> |
7
+ <%= link_to "Back to locations", account_locations_path %>
8
+
9
+ <%= button_to "Destroy this location", @account_location, method: :delete %>
10
+ </div>
@@ -0,0 +1,17 @@
1
+ <%= form_with(model: account_setting) do |form| %>
2
+ <% if account_setting.errors.any? %>
3
+ <div style="color: red">
4
+ <h2><%= pluralize(account_setting.errors.count, "error") %> prohibited this account_setting from being saved:</h2>
5
+
6
+ <ul>
7
+ <% account_setting.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,2 @@
1
+ <div id="<%= dom_id setting %>">
2
+ </div>