Skip to content

Commit

Permalink
frame out the general settings and billing settings
Browse files Browse the repository at this point in the history
  • Loading branch information
fermion committed Jan 14, 2024
1 parent cdc6e45 commit 01271c8
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 3 deletions.
10 changes: 10 additions & 0 deletions app/controllers/settings/billing_information_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
class Settings::BillingInformationController < ApplicationController
def show
end

def edit
end

def update
end
end
4 changes: 4 additions & 0 deletions app/controllers/settings_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class SettingsController < ApplicationController
def show
end
end
4 changes: 2 additions & 2 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<a href="#" class="text-gray-300 hover:bg-gray-700 hover:text-white rounded-md px-3 py-2 text-sm font-medium">Projects</a>
<a href="#" class="text-gray-300 hover:bg-gray-700 hover:text-white rounded-md px-3 py-2 text-sm font-medium">People</a>
<% if current_user.owner? %>
<a href="#" class="text-gray-300 hover:bg-gray-700 hover:text-white rounded-md px-3 py-2 text-sm font-medium">Settings</a>
<%= header_link_to "Settings", settings_path %>
<% end %>
</div>
</div>
Expand Down Expand Up @@ -100,7 +100,7 @@
<a href="#" class="text-gray-300 hover:bg-gray-700 hover:text-white block rounded-md px-3 py-2 text-base font-medium">Projects</a>
<a href="#" class="text-gray-300 hover:bg-gray-700 hover:text-white block rounded-md px-3 py-2 text-base font-medium">People</a>
<% if current_user.owner? %>
<a href="#" class="text-gray-300 hover:bg-gray-700 hover:text-white block rounded-md px-3 py-2 text-base font-medium">Settings</a>
<%= mobile_header_link_to "Settings", settings_path %>
<% end %>
</div>
<div class="border-t border-gray-700 pb-3 pt-4">
Expand Down
4 changes: 4 additions & 0 deletions app/views/settings/billing_information/edit.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<div>
<h1 class="font-bold text-4xl">Settings::BillingInformation#edit</h1>
<p>Find me in app/views/settings/billing_information/edit.html.erb</p>
</div>
1 change: 1 addition & 0 deletions app/views/settings/billing_information/show.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<%= render(Settings::TabsComponent.new) %>
1 change: 1 addition & 0 deletions app/views/settings/show.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<%= render(Settings::TabsComponent.new) %>
5 changes: 4 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Rails.application.routes.draw do

mount GraphiQL::Rails::Engine, at: "/graphiql", graphql_path: "/graphql", constraints: lambda { |request|
# only allow authenticated users, otherwise 404
Passwordless::Session.exists?(id: request.session[:"passwordless_session_id--user"])
Expand All @@ -24,5 +23,9 @@

resource :dashboard, only: [:show], controller: "dashboard"

resource :settings, only: [:show], controller: "settings" do
resource :billing_information, only: [:show, :edit, :update], controller: "settings/billing_information"
end

root "dashboard#show"
end

0 comments on commit 01271c8

Please sign in to comment.