Git Product home page Git Product logo

7shifts-challenge's Introduction

7shifts - 7Shifts

At 7shifts we talk a lot about locations, users and time punches. This defines a user and their settings, where a user works (location) and what hours they worked (time punches).

The different data sets for locations, users and time punches can be found at the following addresses, no authentication is required.

https://shiftstestapi.firebaseio.com/locations.json

https://shiftstestapi.firebaseio.com/users.json

https://shiftstestapi.firebaseio.com/timePunches.json

Your job is to make a request to these end points and calculate the hours a user worked over all, and broken down by location. You must calculate the regular hours, as well as daily and weekly overtime hours. Overtime rules come from a location’s setting. Overtime is triggered one of two ways. If an employee works more than X hours a day (daily overtime), or more than Y hours a week (weekly overtime). Overtime is paid for whichever overtime number is greater.

Using the given data set in JSON format calculate an employee’s worked hours and their overtime.

Overtime Examples

Location settings have overtime starting at 8 hours daily, or 40 hours weekly. (In the locations data these are specified in minutes, so 480 and 2,400 minutes respectively.

Ryan works 5 days, 8 hours each (40 hours a week) he is not paid overtime.

Evan works 40 hours for the whole week, but on Monday he works 12 hours and on Tuesday only 4 (and 8 hours Wednesday - Friday) then Ryan is paid 36 hours of normal pay and 4 hours of overtime pay.

If Martina works 48 hours in a week (8 hours Monday - Saturday) she is paid 40 hours normal rate and 8 hours overtime pay rate.

Bonus 1

When the data has been processed, list the users in a sortable JavaScript table by user, and show their worked hours, and overtime hours, profile picture

Bonus 2

Use the following end point (link here) to pull in sales information for a given location

Calculate the sales for a given location by adding all the sales receipts together

Using a graphing library (like high charts), graph the cost of labour against the sales for the location

7shifts-challenge's People

Contributors

marciovmartins avatar

Watchers

James Cloos 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.