Coder Social home page Coder Social logo

ymhr / mas-league Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 5.95 MB

A fun, competitive league for Mini American Shepherd owners

Home Page: https://masleague.run

HTML 2.18% CSS 0.19% JavaScript 20.10% Dockerfile 0.11% HCL 1.14% TypeScript 76.27%
dogs firebase react redux

mas-league's People

Contributors

dependabot[bot] avatar depfu[bot] avatar ymhr avatar

Stargazers

 avatar

Watchers

 avatar  avatar

mas-league's Issues

Add a11y

React a11y should be added for a11y checking

Add extra league tables

There should be 1 'table page' with 3 sub tabs for the different league brackets.

  • Beginner (1-2)
  • Novice (3-5)
  • Senior (6-7)

No need to add filtering or ordering.

Changes to dog grade picker

This should be a dropdown of
1, 2, 3, 4, 5, 6 ,7 ,8, 9, 10, 10+, UPC (unplaced clear)

UPC should provide 2 points.

Allow admin to create multiple leagues

The admin should be able to create a new league, and they should be able to pick a name for it.

This will help to add support for multiple leagues (#69) as there can be a league for obedience, agility, showing, etc.

Currently we just use the current year, so that will need to be replaced. We should also add an option to close a league so that it doesn't show as an option for users to add points to anymore.

New home page

Lucy will provide the text for the homepage.

Also means putting the leagues on a separate page.

Dynamic fields when adding a run

When the league the current run is being added for is changed, some of the fields need to change with it, for example the 'type' field is relevant only for agility.

More importantly the points selector may also have to change, since different sports may record results differently. This is TBD.

Extra fields

KC name should be on field on dog

Runs need:

  • graded/combined
  • special or normal
  • grade (1-6 etc)
  • maybe more, check agility notebook

Update to support multiple league "types"

tl;dr support 'agility', 'showing' and 'other' leagues.

  • Put a types array on the league record in the leagues collection. This array represents the supported types.
  • When a user is adding a dog, they can tick the types that they compete in. Only agility will have a grade option.
  • When the admin puts a dog in a league, it will insert them into the sub-types they have ticked. (see note 1)
  • When a user adds a 'run' (should that word change?) that needs the same checkboxes so that the user can specify what they competed in. The cloud function should then update the correct type in the dogs data.

Notes:

  1. When a dog is added to a league, the map representing that needs to be broken down into their types, e.g.
{
  "leagues": {
    "2019": {
      "agility": {
        "grade": 2,
        "points": 20
      },
      "showing": {
        "points": 12
      }
    }
  }
}

Add data validation to firestore queries

Some firestore queries could benefit from data validation, for example someone could technically update their own 'points' value and therefore hack the league. Ideally some fields should not be editable.

Tyler also recommended validating the data types, e.g. 'this field should be text' otherwise someone could change 'name' to be an object, etc.

Make it so that the 'new profile' code doesn't delete data

Currently, when the user signs up, if they enter their data before the function has run, it will do set and replace all of their data, when what we actually want it to do it update, assuming of course the user has put any text in.

Allow users to add a dog

A user should be able to see a form where they can add a new dog, and edit their existing dogs.

NOTE: The user should be able to set the grade of their dog when they register, but after that they should not be able to change the grade of the dog (OR we need to record the initial grade of the dog and not have that update).

Fields:

  • Name
  • Age
  • Grade
  • Grade for league (set at the start of the year, or when the user adds their dog).
  • Breed (always MAS though?)

Allow users to export/delete all of their data

Should probably implement this at some point, I don't want to have to do it manually every time.

For delete, write a firebase function - when a users account is deleted, go through all dogs, and delete all of their runs, remove the dogs from any current or past leagues, then delete the dog themselves. Delete the users profile data.

Adding points should use an HTTP endpoint

Currently using standard firestore functions, but I think this should use an endpoint instead.
Allowing the user to do this clientside would mean we would constantly need to check whether the league was open or not. If we push it to server side, then we only need to check when they update a league.

If the data is stored in the same format, then the live updating and everything will still work the same.

The endpoint needs to take a run object, check whether that league is still open, and if it is, then add the points to the dog.

Refactor shows and runs

Remove shows completely and have show name on each run instead.

Remove league picker, and make it so there is only one active league. Others are 'archives'.

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.