Giter Site home page Giter Site logo

axelclark / ex338 Goto Github PK

View Code? Open in Web Editor NEW
22.0 3.0 7.0 6.15 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.26% Procfile 0.01%
elixir phoenix fantasy-league

ex338's Issues

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.

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

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.