mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 20:14:08 +00:00
Add ability to delete invite codes (#153)
* Add ability to delete invite codes Implemented destroy action in InviteCodesController and updated routes to support invite code deletion. Updated invite code partial to include a delete button and improved styling. Also refactored the generate tokens button in invite code settings to use DS::Button. * Show advanced settings only to admin users Updated the settings navigation to display the advanced section only for admin users. Also improved handling of hidden elements in the invite code CSS.
This commit is contained in:
@@ -33,11 +33,12 @@
|
||||
<span class="text-primary text-base font-medium"><%= t(".generated_tokens") %></span>
|
||||
</div>
|
||||
<div>
|
||||
<%= button_to invite_codes_path,
|
||||
method: :post,
|
||||
class: "flex gap-1 bg-gray-50 text-primary text-sm rounded-lg px-3 py-2" do %>
|
||||
<span><%= t(".generate_tokens") %></span>
|
||||
<% end %>
|
||||
<%= render DS::Button.new(
|
||||
text: t(".generate_tokens"),
|
||||
variant: "primary",
|
||||
href: invite_codes_path,
|
||||
method: :post
|
||||
) %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user