- working party

- working friend
- working attendent
This commit is contained in:
2025-11-22 20:59:19 +01:00
parent e51d911bd0
commit 6b96c100a5
12 changed files with 66 additions and 22 deletions

View File

@ -5,9 +5,18 @@
<p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-md inline-block" id="notice"><%= notice %></p>
<% end %>
<h1 class="font-bold text-4xl">Showing party</h1>
<h1 class="font-bold text-4xl">Party People</h1>
<div class="mt-6 mb-6 flex w-full gap-4">
<div class="mt-4 w-1/2">
<% @friends.each do |friend| %>
<%= render 'parties/attendent',
party: @party, friend: friend,
member: @party.attendents.exists?( friend_id: friend.id ) %>
<% end %>
</div>
</div>
<%= link_to "Übersicht", parties_path, class: 'btn-show' %>
<%= link_to "Edit this party", edit_party_path(@party), class: "w-full sm:w-auto text-center rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
<%= link_to "Back to parties", parties_path, class: "w-full sm:w-auto text-center mt-2 sm:mt-0 sm:ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
<%= button_to "Destroy this party", @party, method: :delete, form_class: "sm:inline-block mt-2 sm:mt-0 sm:ml-2", class: "w-full rounded-md px-3.5 py-2.5 text-white bg-red-600 hover:bg-red-500 font-medium cursor-pointer", data: { turbo_confirm: "Are you sure?" } %>
</div>