starting with events, tied to profiles (not accounts)

This commit is contained in:
2023-01-16 14:49:45 +02:00
parent 63299d4464
commit cb54951037
19 changed files with 307 additions and 11 deletions

View File

@ -1,11 +1,5 @@
= form_for @member do |f|
.flex.flex-col
- if @member.errors.any?
#error_explanation
%h2= "#{pluralize(@member.errors.count, "error")} prohibited this member from being saved:"
%ul
- @member.errors.full_messages.each do |message|
%li= message
= simple_form_for @member do |f|
= f.error_notification
.grid.grid-cols-2.m-20.gap-10
.field

View File

@ -13,7 +13,7 @@
.grid.grid-cols-2.mx-20
.first
- Profile.types.each do |kind|
.grid.grid-cols-2
.grid.grid-cols-3
- if profile = @member.profile(kind)
%div
=profile.Kind
@ -23,12 +23,17 @@
%button.bg-cyan-200.mr-3.inline-block.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400
Edit
=profile.Kind
= link_to new_event_path(profile: profile.kind) do
%button.bg-cyan-200.mr-3.inline-block.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400
New #{profile.Kind} Event
-else
%div Create new #{kind.capitalize} profile as
= link_to new_profile_path(kind: kind) do
%button.bg-cyan-200.mr-3.inline-block.rounded-lg.px-4.py-3.text-md.font-medium.border.border-gray-400
New
= kind.capitalize
%div Create profile first, then events
.grid.grid-cols-6.gap-4.mt-10.mx-10