GithubHelp home page GithubHelp logo

domzem / calendar-summary-task Goto Github PK

View Code? Open in Web Editor NEW

This project forked from megaronsa/calendar-summary-task

0.0 0.0 0.0 183 KB

Home Page: https://calendar-summary-task.vercel.app

JavaScript 50.74% TypeScript 33.02% CSS 3.35% HTML 12.88%

calendar-summary-task's Introduction

Megaron S.A. — take-home recruitment task

Hello and thank you for your interest in joining our team!

We've prepared a very brief development challenge designed to test your proficiency in the basics of JavaScript, TypeScript and React.

The task shouldn't take more than an hour to complete.

Context

There's an event scheduling service that exposes an API. The API lists all events scheduled for a given day. The job of this app is to gather the event data and present a summary to the user.

You don't need to access the service via HTTP. We've provided an API client stub — details below.

The API

getCalendarEvents is the only function in the API. You specify the day by passing a date and it returns a promise that resolves to an array of CalendarEvent objects.

interface CalendarEvent {
  uuid: string;
  title: string;
  durationInMinutes: number;
}

function getCalendarEvents(day: Date): Promise<CalendarEvent[]>;

The API client is located under src/api-client. Please do not modify it.

Your task

Implement the CalendarSummary view. Its purpose is to display a table summarizing all the events scheduled for the next 7 days (including the current date). The summary should consist of:

  • The number of events on a given day.
  • Total duration of all events on a given day (in minutes).
  • Title of the longest event of the day.

The last row should show the same kind of summary for the entire week.

The table may look something like this:

Date Number of events Total duration [min] Longest event
2023-11-10 7 321 Lorem ipsum
2023-11-11 3 123 dolor sit
... ... ... ...
Total 26 1230 Lorem ipsum

Setup

This repository already contains all the boilerplate you need. Use npm install to install the dependencies and npm start to run the application.

You may install additional npm packages if you deem it necessary.

Requirements

  • The app needs to run without any unhandled exceptions.
  • The app needs to display the summary table, as described above.
  • Make the code as clean and as readable as you can.

Good luck!

calendar-summary-task's People

Contributors

domzem avatar kornelzaziemski 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.