Giter VIP home page Giter VIP logo

pomodoro's People

Contributors

jesusbotella avatar

Stargazers

 avatar  avatar  avatar

pomodoro's Issues

[Models] Create Pomodoro model

We need a Pomodoro model within our application to be able to create instances whenever we start a new pomodoro timer.

We have a very basic example to follow in src/core/models/user.js.

The model should have the following fields:

  • id: Unique ID to identify unique instances across all the application.
  • type: A field to know which pomodoro type this one belongs to. (Work, rest, etc).
  • categories: An array of custom categories to be able to categorize pomodoros.
  • description: A field to hold a brief description of the pomodoro.
  • profile: A field to link the current pomodoro to the current profile.
  • started_at: Date to know when the pomodoro started.
  • finished_at: Date to know when the pomodoro was finished.

Needs:

  • Should validate fields
  • Should implement method toJSON to be able to serialize the model

[Store] Create Pomodoro Store

Create a store namespace for our pomodoro data, and create actions and mutations as needed.

The store should have a property to hold a list of pomodoros for now.

Actions

  • Create pomodoro
  • Update pomodoro
  • Delete a specific pomodoro

Mutations

  • Add a specific pomodoro to the object
  • Update pomodoro properties
  • Delete a pomodoro

[Services] Create Pomodoro Service

Create a service to be able to create, read, update and delete pomodoros from API. There should be 4 methods at least to fulfill the needs.

PomodoroService.create(pomodoroInstance)

PomodoroService.get(pomodoroId)

PomodoroService.update(pomodoroInstance)

PomodoroService.delete(pomodoroInstance)

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.