diff --git a/app/controllers/concerns/authentication.rb b/app/controllers/concerns/authentication.rb index 8ecf72d..a819597 100644 --- a/app/controllers/concerns/authentication.rb +++ b/app/controllers/concerns/authentication.rb @@ -35,7 +35,7 @@ def request_authentication end def after_authentication_url - session.delete(:return_to_after_authenticating) || root_url + session.delete(:return_to_after_authenticating) || dashboard_url end def start_new_session_for(user) diff --git a/app/controllers/dashboards_controller.rb b/app/controllers/dashboards_controller.rb new file mode 100644 index 0000000..aed6610 --- /dev/null +++ b/app/controllers/dashboards_controller.rb @@ -0,0 +1,4 @@ +class DashboardsController < ApplicationController + def show + end +end diff --git a/app/controllers/users/stories_controller.rb b/app/controllers/users/stories_controller.rb new file mode 100644 index 0000000..11cde67 --- /dev/null +++ b/app/controllers/users/stories_controller.rb @@ -0,0 +1,28 @@ +class Users::StoriesController < ApplicationController + def show + @user = Current.user + end + + def update + @user = Current.user + + if @user.update(story_params) + respond_to do |format| + format.turbo_stream do + render turbo_stream: turbo_stream.append( + "flash", partial: "shared/toast", locals: { type: :notice, message: "Saved." } + ) + end + format.html { redirect_to users_story_path, notice: "Saved." } + end + else + render :show, status: :unprocessable_entity + end + end + + private + + def story_params + params.require(:user).permit(:background, :family, :formative_experiences) + end +end diff --git a/app/views/dashboards/show.html.erb b/app/views/dashboards/show.html.erb new file mode 100644 index 0000000..e8795ef --- /dev/null +++ b/app/views/dashboards/show.html.erb @@ -0,0 +1,29 @@ +
+

Welcome to your workspace

+

+ Take your time exploring. There's no rush to complete anything — move through it at your + own pace, and come back whenever you're ready. +

+ +

Your story

+ +
+ <%= link_to users_story_path, + class: "block rounded-2xl border border-line bg-surface p-6 shadow-sm hover:shadow-md transition" do %> +

About you

+

+ Share your background, family, and experiences that shaped who you are. This creates a + personal record for your family and provides context for your advisors. +

+ <% end %> + + <%= link_to scenarios_path, + class: "block rounded-2xl border border-line bg-surface p-6 shadow-sm hover:shadow-md transition" do %> +

Explore options

+

+ Experiment with allocations and possibilities to compare different approaches and potential + outcomes. Explore at your own pace to find what aligns with your values and goals. +

+ <% end %> +
+
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 01b44fd..b5f3f09 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -29,7 +29,7 @@