Coder Social home page Coder Social logo

axelclark / ex338 Goto Github PK

View Code? Open in Web Editor NEW
22.0 4.0 7.0 6.13 MB

Web application to manage the 338 Challenge fantasy sports league

Home Page: https://the338challenge.com

License: MIT License

JavaScript 1.10% Elixir 96.54% CSS 0.09% HTML 2.27% Procfile 0.01%
elixir phoenix fantasy-league

ex338's Introduction

Ex338

A web application to manage the 338 Challenge Fantasy League built using Elixir and Phoenix. The 338 Challenge is a fantasy sports league where you pick teams instead of players and get points when your team wins its league championship.

The draft, waivers, and trades are accomplished through the website. The league is set up to have multiple divisions (with relegation).

Home Page

Home Page



List of Players

Players Page

Setup

To start your Phoenix server:

  • Run mix setup to install and setup dependencies
  • Start Phoenix endpoint with mix phx.server or inside IEx with iex -S mix phx.server

Now you can visit localhost:4000 from your browser.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

ex338's People

Contributors

axelclark avatar dependabot-preview[bot] avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ex338's Issues

Refactor lib/waiver_admin

  • Write tests for all 2nd level functions
  • Move repo transaction to waiver module
  • Pass errors for repo actions within multis to multi
  • get_existing_waiver_data: don't pass nil && get fantasy league id from waiver struct
  • Move three_days_from_now to CalendarAssistant
  • league_teams_count: use FantasyLeague.by_league
  • update_league_waiver_position: move query to FantasyTeam module

New waiver cannot be submitted after waiting period ends

When an owner submits a new waiver for a team that already has a pending waiver, the new waiver is not valid if it is submitted after the waiver wait period ends. Application should validate the process_at datetime is in the future when a new waiver is submitted.

def validate_wait_period_open(waiver_changeset) do
  process_at = get_change(waiver_changeset, :process_at)
  now        = Ecto.DateTime.utc

  validate_wait_period_open(waiver_changeset, process_at, now)
end

defp validate_wait_period_open(waiver_changeset, process_at, now), when process_at <= now, do: waiver_changeset

defp wait_period_open?(waiver_changeset, process_at, now), when process_at > now do
  add_error(waiver_changeset, :add_fantasy_player_id, "Existing waiver and wait period has already ended.")
end

Update seeds

Need to update the seeds and dev_seeds mix tasks for recent changes to tables.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.