-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add nationality to player #44
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
erlang 25.0.2 | ||
elixir 1.13.4-otp-25 | ||
elixir 1.14.2-otp-25 | ||
erlang 25.1.2 | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,22 +63,34 @@ | |
<div> | ||
<div class="border-b border-gray-200"> | ||
<nav class="-mb-px flex space-x-8" aria-label="Tabs"> | ||
<%= live_redirect("Group Stage", to: "?tab=group", class: "#{if @tab == "group" do | ||
"border-quinary text-gray-900" | ||
else | ||
"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300" | ||
end} whitespace-nowrap py-4 px-1 border-b-4 font-medium text-md") %> | ||
<%= live_patch("Knockout Stage", to: "?tab=knockout_stage", class: "#{if @tab == "knockout_stage" do | ||
"border-quinary text-gray-900" | ||
else | ||
"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300" | ||
end} whitespace-nowrap py-4 px-1 border-b-4 font-medium text-md") %> | ||
<%= live_redirect("Group Stage", | ||
to: "?tab=group", | ||
class: | ||
"#{if @tab == "group" do | ||
"border-quinary text-gray-900" | ||
else | ||
"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change is out of scope |
||
end} whitespace-nowrap py-4 px-1 border-b-4 font-medium text-md" | ||
) %> | ||
<%= live_patch("Knockout Stage", | ||
to: "?tab=knockout_stage", | ||
class: | ||
"#{if @tab == "knockout_stage" do | ||
"border-quinary text-gray-900" | ||
else | ||
"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300" | ||
end} whitespace-nowrap py-4 px-1 border-b-4 font-medium text-md" | ||
) %> | ||
<%= for round <- @elimination_rounds do %> | ||
<%= live_redirect(round.name, to: "?tab=#{round.name}", class: "#{if @tab == round.name do | ||
"border-quinary text-gray-900" | ||
else | ||
"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300" | ||
end} show lg:hidden whitespace-nowrap py-4 px-1 border-b-4 font-medium text-md") %> | ||
<%= live_redirect(round.name, | ||
to: "?tab=#{round.name}", | ||
class: | ||
"#{if @tab == round.name do | ||
"border-quinary text-gray-900" | ||
else | ||
"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300" | ||
end} show lg:hidden whitespace-nowrap py-4 px-1 border-b-4 font-medium text-md" | ||
) %> | ||
<% end %> | ||
</nav> | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,8 @@ defmodule CesiumCupWeb.PlayerLive.FormComponent do | |
alias CesiumCup.Teams | ||
|
||
@extensions_whitelist ~w(.jpg .jpeg .gif .png) | ||
@nationalities File.read!("priv/fake/nationalities.txt") |> String.split("\n") | ||
@positions ~w(goalkeeper fixed wing target)a | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change is out of scope |
||
|
||
@impl true | ||
def mount(socket) do | ||
|
@@ -23,6 +25,8 @@ defmodule CesiumCupWeb.PlayerLive.FormComponent do | |
socket | ||
|> assign(assigns) | ||
|> assign(:teams, teams) | ||
|> assign(:nationalities, @nationalities) | ||
|> assign(:positions, @positions) | ||
|> assign(:changeset, changeset)} | ||
end | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,224 @@ | ||
Afghans | ||
Albanians | ||
Algerians | ||
Americans | ||
Andorrans | ||
Angolans | ||
Antiguans and Barbudans | ||
Argentines | ||
Armenians | ||
Arubans | ||
Australians | ||
Austrians | ||
Azerbaijanis | ||
Bahamians | ||
Bahrainis | ||
Bangladeshis | ||
Barbadians | ||
Basques | ||
Belarusians | ||
Belgians | ||
Belizeans | ||
Beninese | ||
Bermudians | ||
Bhutanese | ||
Bolivians | ||
Bosniaks | ||
Bosnians and Herzegovinians | ||
Botswana | ||
Brazilians | ||
Bretons | ||
British | ||
British Virgin Islanders | ||
Bruneians | ||
Bulgarians | ||
Macedonian Bulgarians | ||
Burkinabés | ||
Burmese | ||
Burundians | ||
Cambodians | ||
Cameroonians | ||
Canadians | ||
Catalans | ||
Cape Verdeans | ||
List of Caymanians | ||
Chaldeans | ||
Chadians | ||
Chileans | ||
Chinese | ||
Colombians | ||
Comorians | ||
Congolese (DRC) | ||
Congolese (RotC) | ||
Costa Ricans | ||
Croats | ||
Cubans | ||
Cypriots | ||
Czechs | ||
Danes | ||
Greenlanders | ||
Djiboutians | ||
Dominicans (Commonwealth) | ||
Dominicans (Republic) | ||
Dutch | ||
East Timorese | ||
Ecuadorians | ||
Egyptians | ||
Emiratis | ||
English | ||
Equatoguineans | ||
Eritreans | ||
Estonians | ||
Ethiopians | ||
Falkland Islanders | ||
Faroese | ||
Fijians | ||
Finns | ||
Finnish Swedish | ||
Filipinos | ||
French citizens | ||
Gabonese | ||
Gambians | ||
Georgians | ||
Germans | ||
Baltic Germans | ||
Ghanaians | ||
Gibraltarians | ||
Greeks | ||
Greek Macedonians | ||
Grenadians | ||
Guatemalans | ||
Guianese (French) | ||
Guineans | ||
Guinea-Bissau nationals | ||
Guyanese | ||
Haitians | ||
Hondurans | ||
Hong Kongers | ||
Hungarians | ||
Icelanders | ||
I-Kiribati | ||
Indians | ||
Indonesians | ||
Iranians | ||
Iraqis | ||
Irish | ||
Israelis | ||
Italians | ||
Ivoirians | ||
Jamaicans | ||
Japanese | ||
Jordanians | ||
Kazakhs | ||
Kenyans | ||
Kosovars | ||
Kuwaitis | ||
Kyrgyzs | ||
Lao | ||
Latvians | ||
Lebanese | ||
Liberians | ||
Libyans | ||
Liechtensteiners | ||
Lithuanians | ||
Luxembourgers | ||
Macao | ||
Macedonians | ||
Malagasy | ||
Malawians | ||
Malaysians | ||
Maldivians | ||
Malians | ||
Maltese | ||
Manx | ||
Marshallese | ||
Mauritanians | ||
Mauritians | ||
Mexicans | ||
Micronesians | ||
Moldovans | ||
Monégasque | ||
Mongolians | ||
Montenegrins | ||
Moroccans | ||
Mozambicans | ||
Namibians | ||
Nauruans | ||
Nepalese | ||
New Zealanders | ||
Nicaraguans | ||
Nigeriens | ||
Nigerians | ||
Norwegians | ||
Omani | ||
Pakistanis | ||
Palauans | ||
Palestinians | ||
Panamanians | ||
Papua New Guineans | ||
Paraguayans | ||
Peruvians | ||
Poles | ||
Portuguese | ||
Puerto Ricans | ||
Qatari | ||
Quebecers | ||
Réunionnais | ||
Romanians | ||
Russians | ||
Baltic Russians | ||
Rwandans | ||
Saint Kitts and Nevis | ||
Saint Lucians | ||
Salvadorans | ||
Sammarinese | ||
Samoans | ||
São Tomé and Príncipe | ||
Saudis | ||
Scots | ||
Senegalese | ||
Serbs | ||
Seychellois | ||
Sierra Leoneans | ||
Singaporeans | ||
Slovaks | ||
Slovenes | ||
Solomon Islanders | ||
Somalis | ||
Somalilanders | ||
Sotho | ||
South Africans | ||
Spaniards | ||
Sri Lankans | ||
Sudanese | ||
Surinamese | ||
Swazi | ||
Swedes | ||
Swiss | ||
Syriacs | ||
Syrians | ||
Taiwanese | ||
Tamils | ||
Tajik | ||
Tanzanians | ||
Thais | ||
Tibetans | ||
Tobagonians | ||
Togolese | ||
Tongans | ||
Trinidadians | ||
Tunisians | ||
Turks | ||
Tuvaluans | ||
Ugandans | ||
Ukrainians | ||
Uruguayans | ||
Uzbeks | ||
Vanuatuans | ||
Venezuelans | ||
Vietnamese | ||
Vincentians | ||
Welsh | ||
Yemenis | ||
Zambians | ||
Zimbabweans |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be a separate PR.
Its important to keep changes as short as possible and within the same domain