Skip to content

Commit 9035fb7

Browse files
committed
Move all department specific components into the proper module
1 parent 4ce6f76 commit 9035fb7

10 files changed

+12
-12
lines changed

app/components/admin/groups/group_detail_component.html.erb renamed to app/components/admin/departments/detail_component.html.erb

File renamed without changes.

app/components/admin/groups/group_detail_component.rb renamed to app/components/admin/departments/detail_component.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
#++
3030

3131
module Admin
32-
module Groups
33-
class GroupDetailComponent < ApplicationComponent
32+
module Departments
33+
class DetailComponent < ApplicationComponent
3434
include ApplicationHelper
3535
include OpTurbo::Streamable
3636
include OpPrimer::ComponentHelpers

app/components/admin/groups/group_hierarchy_layout_component.html.erb renamed to app/components/admin/departments/hierarchy_layout_component.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ See COPYRIGHT and LICENSE files for more details.
3434
render(Primer::Alpha::Layout.new(stacking_breakpoint: :md, overflow: :hidden, h: :full, classes: "admin-groups-tree-page")) do |content|
3535
content.with_main(overflow: :auto) do
3636
render(
37-
Admin::Groups::GroupDetailComponent.new(
37+
Admin::Departments::DetailComponent.new(
3838
group: active_group,
3939
ancestors: ancestors_for(active_group),
4040
child_groups: children_for(active_group&.id)
@@ -45,7 +45,7 @@ See COPYRIGHT and LICENSE files for more details.
4545
content.with_sidebar(row_placement: :start, col_placement: :start, border: true, border_bottom: 0, p: 3, overflow: :auto, classes: "admin-groups-tree-page--sidebar") do
4646
flex_layout do |sidebar|
4747
sidebar.with_row(mb: 3) do
48-
render(Admin::Groups::OrganizationNameComponent.new)
48+
render(Admin::Departments::OrganizationNameComponent.new)
4949
end
5050

5151
sidebar.with_row do

app/components/admin/groups/group_hierarchy_layout_component.rb renamed to app/components/admin/departments/hierarchy_layout_component.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
#++
3030

3131
module Admin
32-
module Groups
33-
class GroupHierarchyLayoutComponent < ApplicationComponent
32+
module Departments
33+
class HierarchyLayoutComponent < ApplicationComponent
3434
include ApplicationHelper
3535
include OpTurbo::Streamable
3636
include OpPrimer::ComponentHelpers

app/components/admin/groups/organization_name_component.html.erb renamed to app/components/admin/departments/organization_name_component.html.erb

File renamed without changes.

app/components/admin/groups/organization_name_component.rb renamed to app/components/admin/departments/organization_name_component.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#++
3030

3131
module Admin
32-
module Groups
32+
module Departments
3333
class OrganizationNameComponent < ApplicationComponent
3434
include ApplicationHelper
3535
include OpTurbo::Streamable

app/components/admin/groups/organization_name_form_component.html.erb renamed to app/components/admin/departments/organization_name_form_component.html.erb

File renamed without changes.

app/components/admin/groups/organization_name_form_component.rb renamed to app/components/admin/departments/organization_name_form_component.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#++
3030

3131
module Admin
32-
module Groups
32+
module Departments
3333
class OrganizationNameFormComponent < ApplicationComponent
3434
include ApplicationHelper
3535
include OpTurbo::Streamable

app/controllers/admin/departments_controller.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,12 @@ def destroy_membership
119119
end
120120

121121
def edit_organization_name
122-
replace_via_turbo_stream(component: Admin::Groups::OrganizationNameFormComponent.new)
122+
replace_via_turbo_stream(component: Admin::Departments::OrganizationNameFormComponent.new)
123123
respond_with_turbo_streams
124124
end
125125

126126
def cancel_edit_organization_name
127-
replace_via_turbo_stream(component: Admin::Groups::OrganizationNameComponent.new)
127+
replace_via_turbo_stream(component: Admin::Departments::OrganizationNameComponent.new)
128128
respond_with_turbo_streams
129129
end
130130

@@ -133,7 +133,7 @@ def update_organization_name
133133
.new(user: current_user)
134134
.call(organization_name: params[:organization_name])
135135

136-
replace_via_turbo_stream(component: Admin::Groups::OrganizationNameComponent.new)
136+
replace_via_turbo_stream(component: Admin::Departments::OrganizationNameComponent.new)
137137
respond_with_turbo_streams
138138
end
139139

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<%= render(Admin::Departments::PageHeaderComponent.new) %>
22

3-
<%= render(Admin::Groups::GroupHierarchyLayoutComponent.new(groups: @groups, active_group: @active_group)) %>
3+
<%= render(Admin::Departments::HierarchyLayoutComponent.new(groups: @groups, active_group: @active_group)) %>

0 commit comments

Comments
 (0)