lesli_admin 1.0.1 → 1.1.1

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 (83) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +3 -1
  3. data/app/assets/stylesheets/lesli_admin/application.tailwind.css +2 -0
  4. data/app/controllers/lesli_admin/account/currencies_controller.rb +60 -0
  5. data/app/controllers/lesli_admin/account/details_controller.rb +60 -0
  6. data/app/controllers/lesli_admin/account/locations_controller.rb +60 -0
  7. data/app/controllers/lesli_admin/account/settings_controller.rb +60 -0
  8. data/app/controllers/lesli_admin/accounts_controller.rb +5 -4
  9. data/app/helpers/lesli_admin/account/currencies_helper.rb +4 -0
  10. data/app/helpers/lesli_admin/account/details_helper.rb +4 -0
  11. data/app/helpers/lesli_admin/account/locations_helper.rb +4 -0
  12. data/app/helpers/lesli_admin/account/settings_helper.rb +4 -0
  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 +3 -4
  18. data/app/models/lesli_admin/dashboard.rb +0 -3
  19. data/app/services/lesli_admin/account_service.rb +6 -6
  20. data/app/views/lesli_admin/account/currencies/_currency.html.erb +2 -0
  21. data/app/views/lesli_admin/account/currencies/_form.html.erb +17 -0
  22. data/app/views/lesli_admin/account/currencies/edit.html.erb +12 -0
  23. data/app/views/lesli_admin/account/currencies/index.html.erb +16 -0
  24. data/app/views/lesli_admin/account/currencies/new.html.erb +11 -0
  25. data/app/views/lesli_admin/account/currencies/show.html.erb +10 -0
  26. data/app/views/lesli_admin/account/details/_detail.html.erb +2 -0
  27. data/app/views/lesli_admin/account/details/_form.html.erb +17 -0
  28. data/app/views/lesli_admin/account/details/edit.html.erb +12 -0
  29. data/app/views/lesli_admin/account/details/index.html.erb +16 -0
  30. data/app/views/lesli_admin/account/details/new.html.erb +11 -0
  31. data/app/views/lesli_admin/account/details/show.html.erb +10 -0
  32. data/app/views/lesli_admin/account/locations/_form.html.erb +17 -0
  33. data/app/views/lesli_admin/account/locations/_location.html.erb +2 -0
  34. data/app/views/lesli_admin/account/locations/edit.html.erb +12 -0
  35. data/app/views/lesli_admin/account/locations/index.html.erb +16 -0
  36. data/app/views/lesli_admin/account/locations/new.html.erb +11 -0
  37. data/app/views/lesli_admin/account/locations/show.html.erb +10 -0
  38. data/app/views/lesli_admin/account/settings/_form.html.erb +17 -0
  39. data/app/views/lesli_admin/account/settings/_setting.html.erb +2 -0
  40. data/app/views/lesli_admin/account/settings/edit.html.erb +12 -0
  41. data/app/views/lesli_admin/account/settings/index.html.erb +16 -0
  42. data/app/views/lesli_admin/account/settings/new.html.erb +11 -0
  43. data/app/views/lesli_admin/account/settings/show.html.erb +10 -0
  44. data/app/views/lesli_admin/accounts/show.html.erb +3 -3
  45. data/app/views/lesli_admin/dashboards/_component-installed-engines.html.erb +1 -5
  46. data/app/views/lesli_admin/partials/_navigation.html.erb +0 -1
  47. data/app/views/lesli_admin/settings/_defaults.html.erb +71 -0
  48. data/app/views/lesli_admin/settings/_modules.html.erb +57 -0
  49. data/app/views/lesli_admin/settings/show.html.erb +7 -1
  50. data/config/routes.rb +1 -3
  51. data/db/migrate/v1/0101000210_create_lesli_admin_account_details.rb +70 -0
  52. data/db/migrate/v1/{0101003010_create_lesli_admin_dashboards.rb → 0101000313_create_lesli_admin_account_settings.rb} +11 -4
  53. data/db/migrate/v1/0101000410_create_lesli_admin_account_locations.rb +63 -0
  54. data/{app/controllers/lesli_admin/abouts_controller.rb → db/migrate/v1/0101000510_create_lesli_admin_account_currencies.rb} +14 -14
  55. data/db/seeds.rb +1 -1
  56. data/lib/lesli_admin/version.rb +2 -2
  57. data/readme.md +146 -36
  58. metadata +50 -37
  59. data/app/controllers/lesli_admin/dashboard/components_controller.rb +0 -60
  60. data/app/controllers/lesli_admin/profiles_controller.rb +0 -48
  61. data/app/helpers/lesli_admin/profiles_helper.rb +0 -4
  62. data/app/models/lesli_admin/dashboard/component.rb +0 -49
  63. data/app/views/lesli_admin/abouts/show.html.erb +0 -73
  64. data/app/views/lesli_admin/accounts/_account.html.erb +0 -2
  65. data/app/views/lesli_admin/accounts/_form.html.erb +0 -17
  66. data/app/views/lesli_admin/accounts/edit.html.erb +0 -10
  67. data/app/views/lesli_admin/accounts/index.html.erb +0 -34
  68. data/app/views/lesli_admin/accounts/new.html.erb +0 -9
  69. data/app/views/lesli_admin/accounts/update.turbo_stream.erb +0 -3
  70. data/app/views/lesli_admin/profiles/show.html.erb +0 -1
  71. data/lib/scss/application.scss +0 -4
  72. data/lib/vue/application.js +0 -96
  73. data/lib/vue/apps/about/show.vue +0 -74
  74. data/lib/vue/apps/account/components/form-address.vue +0 -119
  75. data/lib/vue/apps/account/components/form-contact.vue +0 -122
  76. data/lib/vue/apps/account/components/form-information.vue +0 -89
  77. data/lib/vue/apps/account/show.vue +0 -87
  78. data/lib/vue/apps/dashboards/components/lesli-version.vue +0 -73
  79. data/lib/vue/apps/profile/show.vue +0 -129
  80. data/lib/vue/stores/account.js +0 -111
  81. data/lib/vue/stores/account_settings.js +0 -342
  82. data/lib/vue/stores/roles.js +0 -89
  83. 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: 4be526cc5d4c0ebe88f74ec2046f9910cba16c61199ad1691901a30c2566c878
4
+ data.tar.gz: 68889417b39b041632c52da972e946311115b676e0008211c0b68e7b7cb4c0d7
5
5
  SHA512:
6
- metadata.gz: 60051ae8b957b7702313ce4c71b08d572a483f528d40723eb1ce4d890787863e40a963e5e2d52b78b6d629c5f6f65b7dbf8ade4a65389147daeb7bdefd976d22
7
- data.tar.gz: 2ee2f8246bb3c3476b4f3f991ad9984753eb2812281be34d0f3173f8c60f0b332e9d8cf675898057f3c7e0a28be719bce425dade9d940cb5bcc41fd8793d8ac6
6
+ metadata.gz: a15c772978ba4fd4ed72c7f94790ce50c849314f89b9d80679ccb999f55c42a43ee3c3d72d55179652b1e5f39f77cb4cfc05819342459690f6d9e2d93f8dbd00
7
+ data.tar.gz: 27da84af4ac7c6b58fe44115aa750c14c90102d995e9caa1a4c7d9c818f5251451779557e1bd978c0c7161fc0e8dd64a0f598cfd6d6e0ae70b2aaf180bc0d28a
data/Rakefile CHANGED
@@ -1,5 +1,7 @@
1
1
  require "bundler/setup"
2
2
 
3
- load "rails/tasks/statistics.rake"
3
+ APP_RAKEFILE = File.expand_path("test/dummy/Rakefile", __dir__)
4
+
5
+ load "rails/tasks/engine.rake"
4
6
 
5
7
  require "bundler/gem_tasks"
@@ -0,0 +1,2 @@
1
+ /*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
2
+ @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-space-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-leading:initial}}}@layer theme{:root,:host{--color-red-100:oklch(93.6% .032 17.717);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-900:oklch(20.8% .042 265.755);--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--font-weight-medium:500;--font-weight-semibold:600;--tracking-tight:-.025em;--radius-lg:.5rem;--radius-2xl:1rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1)}}@layer components{.module-engine-card .partial-engine-spec>div{margin-bottom:calc(var(--spacing) * 4);border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--color-slate-200);padding-bottom:calc(var(--spacing) * 4)}.module-engine-card .partial-engine-spec h5{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height));--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold);color:var(--color-slate-900)}.module-engine-card .partial-engine-spec p{margin-top:var(--spacing);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-leading:calc(var(--spacing) * 6);line-height:calc(var(--spacing) * 6);color:var(--color-slate-600)}.module-engine-card .partial-engine-spec ul{column-gap:calc(var(--spacing) * 4);row-gap:calc(var(--spacing) * 2);flex-wrap:wrap;display:flex}.module-engine-card .partial-engine-spec li{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:var(--color-slate-600);margin:0}.module-engine-card .partial-engine-spec li:last-child,.module-engine-card .partial-engine-spec .material-symbols{display:none}}@layer utilities{.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.ml-1{margin-left:var(--spacing)}.flex{display:flex}.grid{display:grid}.inline-flex{display:inline-flex}.w-fit{width:fit-content}.min-w-0{min-width:0}.flex-1{flex:1}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.gap-5{gap:calc(var(--spacing) * 5)}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-6{column-gap:calc(var(--spacing) * 6)}.gap-y-5{row-gap:calc(var(--spacing) * 5)}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-slate-200{border-color:var(--color-slate-200)}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-emerald-600{background-color:var(--color-emerald-600)}.bg-red-100{background-color:var(--color-red-100)}.bg-red-600{background-color:var(--color-red-600)}.bg-slate-100{background-color:var(--color-slate-100)}.bg-white{background-color:var(--color-white)}.p-5{padding:calc(var(--spacing) * 5)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-2{padding-block:calc(var(--spacing) * 2)}.pl-3{padding-left:calc(var(--spacing) * 3)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.break-all{word-break:break-all}.text-emerald-700{color:var(--color-emerald-700)}.text-red-700{color:var(--color-red-700)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-900{color:var(--color-slate-900)}.text-white{color:var(--color-white)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}@media (hover:hover){.hover\:bg-emerald-700:hover{background-color:var(--color-emerald-700)}.hover\:bg-red-700:hover{background-color:var(--color-red-700)}}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-emerald-500\/30:focus-visible{--tw-ring-color:#00bb7f4d}@supports (color:color-mix(in lab, red, red)){.focus-visible\:ring-emerald-500\/30:focus-visible{--tw-ring-color:color-mix(in oklab, var(--color-emerald-500) 30%, transparent)}}.focus-visible\:ring-red-500\/30:focus-visible{--tw-ring-color:#fb2c364d}@supports (color:color-mix(in lab, red, red)){.focus-visible\:ring-red-500\/30:focus-visible{--tw-ring-color:color-mix(in oklab, var(--color-red-500) 30%, transparent)}}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}@media (min-width:40rem){.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:p-6{padding:calc(var(--spacing) * 6)}}@media (min-width:64rem){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media (min-width:80rem){.xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-leading{syntax:"*";inherits:false}
@@ -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.", allow_other_host: false
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, allow_other_host: false
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.", allow_other_host: false
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, allow_other_host: false
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.", allow_other_host: false
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, allow_other_host: false
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.", allow_other_host: false
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, allow_other_host: false
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>