Skip to content
This repository has been archived by the owner on Oct 28, 2023. It is now read-only.
/ TimeLogger Public archive

My view of what a timelogger is, used for project control and invoices.

License

Notifications You must be signed in to change notification settings

iZeQure/TimeLogger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TimeLogger

My view of what a timelogger is, used for project control and invoices.

Some of the docs is found here, how I've provided a solution for the challenge. link to Diagrams!

NUnit Testing

Providing the ability to test the controllers.

Timelogger.Api.Tests
  • ProjectControllerTests

    Tests the Projects controller, if it's able to extract data from the given repository.

    • GetAll, should give an Ok Status Code 200 when tested.
    • GetById, returns 3 different codes, whether if it Fails, No Content or Ok.
Timelogger.Tests
  • ApiDatabaseTests

    Tests if it's possible to connect correctly to the database.

    • It's being validated if the connection is Closed, Connection, Open, Closing or Broken.

Api Controllers

The usage of the few controllers, to make it possible to manipulate the available data.

Projects Controller
  • POST: api/projects

    Creates a new project, with a JSON object from the body.

    {
        "ProjectName": "User 2 Project 1",
        "ProjectOwner": {
            "EntityId": 2 //Project Owner, from a valid user entity.
        },
        "ProjectCustomer": {
            "EntityId": 1 //The Customer of the project, with a valid customer entity.
        },
        "ProjectDateOfCreation": "2020-10-02",
        "ProjectDeadline": "2020-11-10"
    }
  • GET: api/projects

    Returns JSON objects with the available projects.

  • GET: api/projects/1

    Returns a JSON object of the available project.

  • GET: api/projects/user/1

    Returns JSON objects with the available projects for the specified user.

  • GET: api/projects/1/registrations

    Returns a JSON object with project if available, containing an array of time registrations.

Registrations Controller
  • POST: api/registrations

    Creates a registration for a project, with a JSON object from the body.

    {
        "ProjectID": 1,
        "Time": "1:20:48" //The Time is given in string, and converted to a TimeSpan by the system.
    }

Credits

Made with love and passion for a development challenge, provided by VISMA E-Conomic

  • .NET Core 3.1
  • Visual Studio Enterprise
  • React Front-End Framework
  • NUnit Testing

Configuration

  • Repositories is being dependency injected into the controllers from the Startup class.
  • The Database connection is currently hardcoded into the ApiDatabase class.
  • Scripts to the database, needs to be fired in MSSQL, as it's been created with T-SQL.

Nice to Know

  • Singleton Pattern
  • Repository Pattern
  • Factory Pattern
  • Dependency Injection
  • Using SOLID Principles
Made By

iZeQure, AKA Tobias Rosenvinge - Student, studying software engineering in Denmark.

About

My view of what a timelogger is, used for project control and invoices.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages