Code Monkey home page Code Monkey logo

task-tracker's Introduction

task-tracker

HW06/HW07 for CS 4550 Web Development

Design choices made (HW07):

  • Managers may only assign tasks to their direct underlings, not the underlings of their underlings
    • Validation performed in backend, enforced in frontend by only showing direct underlings of current user in assignee dropdown on task edit form
  • Only the manager of the user assigned to a task may change who the task is assigned to; either to one of their underlings or to no one
    • If a task is assigned to someone who is not a direct underling of the current logged in user, the current logged in user can only change fields of the task that are not the assignee.
  • A user may only have one manager, a manager may have multiple underlings
  • Users are not required to have a manager
  • Only users with the "admin" flag set to "true" are considered managers and have underlings, and only users with the admin flag set to true can be set as someone else's manager
    • Validation performed in backend, enforced in frontend by only showing managers in manager dropdown on user edit form
  • A user may be their own manager
  • A user is assigned a manager from the "edit user" screen
  • A task may have many one or more time blocks associated with it, each of which have a start and stop time
  • Time blocks have a start date, start time, end date, and end time
    • The start date and start time must occur before the end date and end time, eg: a vaid pair may have a start date/time of March 3 2019, 10:30am and an end date/time of March 3 2019, 10:45am
    • This validation is performed in the backend, and error messages are rendered as an alert in the front end with the appropriate error message
  • Users may either manually create a new time block by entering their start date, start time, end date, and end time, or use the "start working" functionality to create a time block with the current time.
    • The user clicks the "Start working" button, and the current date/time will populate the start time/date table cell in the last row. When finished, they can click the "Stop working" button, which will populate the current date/time in the stop date/time table cell, and they can either click "Clear" to clear the time block or click "Create new" to create a new time block. The user may also click "Clear" at any time in the process to clear an in-progress time block, such as after hitting start but before hitting stop.

Design choices made (HW06):

  • If users are not logged in they can select the "create account" button in the navbar to create a new user. When they are logged in the navbar instead displays "My account" which is the show page for that user, from where they can edit their user details
  • No direct link to user index page (ie: page to list all users), although enforcing users only being able to see/edit their own account details is not implemented
  • All tasks are shown on the main application index page, and "back" links on task-related pages direct to the main application index rather than a separate tasks index page
  • To assign a task to a user, there is a dropdown menu in the task form that queries all users in the database
  • Validation on time spent is done in both the front end and the back end
    • front end: number input has steps of 15 and a minimum of 4
    • back end: changeset function validates that input is at least 0 and a multiple of 15, otherwise returns an error which will be rendered as a flash in the front end
  • Tasks are not required to be assigned to a user; if there is no user assigned the "assigned" column will instead display "No user assigned"
  • Task description is not shown on index page listing all tasks, and only on show/details page for individual tasks
  • Task details including completion can only be set/edited from edit form
  • Relation b/w users and tasks is one to many where a task is assigned to a single user and a user may be assigned multiple tasks; the on-delete behavior is set to nilify, meaning if a user is deleted then any tasks assigned to them are instead set to "No user assigned".

To start your Phoenix server:

  • Install dependencies with mix deps.get
  • Create and migrate your database with mix ecto.create && mix ecto.migrate
  • Install Node.js dependencies with cd assets && npm install
  • Start Phoenix endpoint with mix phx.server

Now you can visit localhost:4000 from your browser.

Ready to run in production? Please check our deployment guides.

Learn more

task-tracker's People

Contributors

omwan avatar

Watchers

James Cloos avatar  avatar

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.