-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into GO-246/site_admin_cleanup
- Loading branch information
Showing
49 changed files
with
309 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 5 additions & 3 deletions
8
app/components/admin/groups/members_list_row_component.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
<div class="w-16 h-16 justify-center items-center flex"> | ||
<img class="w-16 h-16 rounded-full" src="https://via.placeholder.com/64x64" /> | ||
<img class="w-16 h-16 rounded-full" src="https://via.placeholder.com/64x64"> | ||
</div> | ||
<div class="grow shrink basis-0 flex-col justify-start items-start gap-1 inline-flex"> | ||
<div class="text-center text-gray-900 text-lg font-medium leading-loose"><%= @user.name %></div> | ||
<div class="text-center text-gray-500 text-base font-normal leading-normal"><%= @user.email %></div> | ||
</div> | ||
<%= button_to admin_tenant_group_group_membership_path(Current.tenant, @group_membership.group, @group_membership), method: :delete do %> | ||
<%= render Common::DeleteButtonComponent.new %> | ||
<% if Pundit.policy(Current.user, [:admin, @group_membership]).destroy? %> | ||
<%= button_to admin_tenant_group_group_membership_path(Current.tenant, @group_membership.group, @group_membership), method: :delete do %> | ||
<%= render Common::DeleteButtonComponent.new %> | ||
<% end %> | ||
<% end %> |
19 changes: 0 additions & 19 deletions
19
app/components/admin/tags/external_tags_component.html.erb
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
class Admin::Tags::TagFormComponent < ViewComponent::Base | ||
def initialize(tag:, action:) | ||
def initialize(tag:) | ||
@tag = tag | ||
@actio = action | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
class Admin::Tags::TagsListComponent < ViewComponent::Base | ||
def initialize(external_tags:, internal_tags:) | ||
@external_tags = external_tags | ||
@internal_tags = internal_tags | ||
def initialize(simple_tags:) | ||
@simple_tags = simple_tags | ||
end | ||
end |
18 changes: 12 additions & 6 deletions
18
app/components/admin/tags/tags_list_row_component.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
app/components/admin/tags/visibility_toggle_component.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<%= tag.turbo_frame id:"@tag-form-visible-#{tag.id}" do %> | ||
<%= form_with model: [:admin, Current.tenant, @tag], method: :patch do |form| %> | ||
<%= form.hidden_field :visible, value:[email protected] %> | ||
<%= form.button class: "#{@tag.visible ? "bg-indigo-600" : "bg-gray-200"} relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-indigo-600 focus:ring-offset-2", role: :switch, aria: { checked: :false}, data: @dialog do %> | ||
<%= tag.turbo_frame id: "tag-form-visible-#{@tag.id}" do %> | ||
<%= form_with model: @tag, url: admin_tenant_tag_path(Current.tenant, @tag), method: :patch do |form| %> | ||
<%= form.hidden_field :visible, value: [email protected] %> | ||
<%= form.button class: "#{@tag.visible ? "bg-indigo-600" : "bg-gray-200"} relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-indigo-600 focus:ring-offset-2", role: :switch, aria: { checked: @tag.visible.to_s } do %> | ||
<span class="sr-only">Use setting</span> | ||
<span aria-hidden="true" class="<%= @tag.visible ? "translate-x-5" : "translate-x-0" %> pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out"></span> | ||
<% end %> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
class Admin::Tags::VisibilityToggleComponent < ViewComponent::Base | ||
def initialize(tag) | ||
@tag = tag | ||
@dialog = { | ||
turbo_confirm: 'Naozaj zrušiť viditeľnosť štítku? Používateľom nebude zobrazovaný v zozname štítkov, a nedostanú sa k príslušným správam', | ||
} if @tag.visible | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.