diff --git a/priv/repo/seeds.exs b/priv/repo/seeds.exs index 8d3cb6f..ffad80f 100644 --- a/priv/repo/seeds.exs +++ b/priv/repo/seeds.exs @@ -249,15 +249,12 @@ find_member = fn email -> Enum.find(all_members, &(&1.email == email)) end # Add custom field values for Hans Müller if hans = find_member.("hans.mueller@example.de") do [ - {find_field.("Membership Number"), - %{"_union_type" => "string", "_union_value" => "M-2023-001"}}, + {find_field.("Membership Number"), %{"_union_type" => "string", "_union_value" => "M-2023-001"}}, {find_field.("T-Shirt Size"), %{"_union_type" => "string", "_union_value" => "L"}}, - {find_field.("Newsletter Subscription"), - %{"_union_type" => "boolean", "_union_value" => true}}, + {find_field.("Newsletter Subscription"), %{"_union_type" => "boolean", "_union_value" => true}}, {find_field.("Membership Type"), %{"_union_type" => "string", "_union_value" => "Regular"}}, {find_field.("Parking Permit"), %{"_union_type" => "boolean", "_union_value" => true}}, - {find_field.("Secondary Email"), - %{"_union_type" => "email", "_union_value" => "hans.m@private.de"}} + {find_field.("Secondary Email"), %{"_union_type" => "email", "_union_value" => "hans.m@private.de"}} ] |> Enum.each(fn {field, value} -> if field do @@ -275,14 +272,11 @@ end # Add custom field values for Greta Schmidt if greta = find_member.("greta.schmidt@example.de") do [ - {find_field.("Membership Number"), - %{"_union_type" => "string", "_union_value" => "M-2023-015"}}, + {find_field.("Membership Number"), %{"_union_type" => "string", "_union_value" => "M-2023-015"}}, {find_field.("T-Shirt Size"), %{"_union_type" => "string", "_union_value" => "M"}}, - {find_field.("Newsletter Subscription"), - %{"_union_type" => "boolean", "_union_value" => true}}, + {find_field.("Newsletter Subscription"), %{"_union_type" => "boolean", "_union_value" => true}}, {find_field.("Membership Type"), %{"_union_type" => "string", "_union_value" => "Student"}}, - {find_field.("Emergency Contact"), - %{"_union_type" => "string", "_union_value" => "Anna Schmidt, +49301234567"}} + {find_field.("Emergency Contact"), %{"_union_type" => "string", "_union_value" => "Anna Schmidt, +49301234567"}} ] |> Enum.each(fn {field, value} -> if field do @@ -300,15 +294,12 @@ end # Add custom field values for Friedrich Wagner if friedrich = find_member.("friedrich.wagner@example.de") do [ - {find_field.("Membership Number"), - %{"_union_type" => "string", "_union_value" => "M-2022-042"}}, + {find_field.("Membership Number"), %{"_union_type" => "string", "_union_value" => "M-2022-042"}}, {find_field.("T-Shirt Size"), %{"_union_type" => "string", "_union_value" => "XL"}}, - {find_field.("Newsletter Subscription"), - %{"_union_type" => "boolean", "_union_value" => false}}, + {find_field.("Newsletter Subscription"), %{"_union_type" => "boolean", "_union_value" => false}}, {find_field.("Membership Type"), %{"_union_type" => "string", "_union_value" => "Senior"}}, {find_field.("Parking Permit"), %{"_union_type" => "boolean", "_union_value" => false}}, - {find_field.("Date of Last Medical Check"), - %{"_union_type" => "date", "_union_value" => ~D[2024-03-15]}} + {find_field.("Date of Last Medical Check"), %{"_union_type" => "date", "_union_value" => ~D[2024-03-15]}} ] |> Enum.each(fn {field, value} -> if field do @@ -337,8 +328,5 @@ IO.puts( " - Linked members: Maria Weber ↔ maria.weber@example.de, Thomas Klein ↔ thomas.klein@example.de" ) -IO.puts( - " - Custom field values: Sample data for Hans (6 fields), Greta (5 fields), Friedrich (6 fields)" -) - +IO.puts(" - Custom field values: Sample data for Hans (6 fields), Greta (5 fields), Friedrich (6 fields)") IO.puts("🔗 Visit the application to see user-member relationships and custom fields in action!")