Remove performerId.

This commit is contained in:
codevictory
2021-03-28 16:22:19 +03:00
parent da4ed0a6c1
commit 4a21ae7616
7 changed files with 46 additions and 28 deletions

View File

@@ -8,7 +8,6 @@ defmodule Runosaari.Registration.Performer do
field :fname, :string
field :lname, :string
field :notes, :string
field :performerId, :integer
field :tel, :string
timestamps()
@@ -17,9 +16,8 @@ defmodule Runosaari.Registration.Performer do
@doc false
def changeset(performer, attrs) do
performer
|> cast(attrs, [:performerId, :fname, :lname, :email, :tel, :confirmed, :notes])
|> validate_required([:performerId, :fname, :lname, :email, :tel, :confirmed, :notes])
|> unique_constraint(:performerId)
|> cast(attrs, [:fname, :lname, :email, :tel, :confirmed, :notes])
|> validate_required([:fname, :lname, :email, :tel, :confirmed, :notes])
|> unique_constraint(:email)
end
end

View File

@@ -5,10 +5,6 @@
</div>
<% end %>
<%= label f, :performerId %>
<%= number_input f, :performerId %>
<%= error_tag f, :performerId %>
<%= label f, :fname %>
<%= text_input f, :fname %>
<%= error_tag f, :fname %>

View File

@@ -3,7 +3,6 @@
<table>
<thead>
<tr>
<th>Performerid</th>
<th>Fname</th>
<th>Lname</th>
<th>Email</th>
@@ -17,7 +16,6 @@
<tbody>
<%= for performer <- @performers do %>
<tr>
<td><%= performer.performerId %></td>
<td><%= performer.fname %></td>
<td><%= performer.lname %></td>
<td><%= performer.email %></td>

View File

@@ -2,11 +2,6 @@
<ul>
<li>
<strong>Performerid:</strong>
<%= @performer.performerId %>
</li>
<li>
<strong>Fname:</strong>
<%= @performer.fname %>