Skip to content

devel0/worked-hours-tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

worked-hours-tracker

web tracker of worked hours

features

  • admin

    • create user
    • edit job
    • download report
  • activities

  • user

    • toggle work by specifying an associated activity
    • notes can be inserted when job toggled on and will reported in the report
  • user properties

    • cost ( hour cost )
  • job properties

    • base_cost
    • min_cost
    • cost_factor
    • minutes_round
  • work cost computed by Cost() function of Job, written into xlsx as formula, as follow

Max(base_cost + (hours * 60).MRound(minutes_round) / 60 * hourCost * cost_factor, min_cost)

roadmap (TODO)

  • pause/resume function ( to avoid a base_cost if deactivate/activate again )

install (docker)

  • tune docker/config.json for an existing db connection name ( just create an empty database in some postgres server db )
cd docker
./build.sh
  • if default docker network restricted ( 80, 443 are used to install bower and nuget packages ) run ./build --network=build where build is a network without specific outgoing restrictions
./run.sh

development

  • first run generate follow error message
please configure [/home/devel0/.config/workedhourstracker/config.json] setting DBHostname, DBPort, DBName, DBUsername, DBPassword (see README.md)

file appears like follow

{
  "DBHostname": "hostname",
  "DBPort": 5432,
  "DBName": "worked_hours_tracker",
  "DBUsername": "postgres",
  "DBPassword": "pass",  
}
  • create an empty db from postgres
  • open ~/.config/workedhourstracker/config.json and set parameters accordingly to your postgres db
  • create tables using
cd WorkedHoursTrackerWebapi
dotnet ef migrations add migr1
dotnet ef database update

screenshoots

admin functions

User view

img

Activities view

img

Activities edit

User edit

img

Job list

img

Worked hours report

img

img

all users

Job list

img

Job work notes

img

how this project was created

dotnet new webapi --name=WorkedHoursTrackerWebapi
cd WorkedHoursTrackerWebapi
dotnet add package Npgsql.EntityFrameworkCore.PostgreSQL --version 2.1.2
dotnet add package Microsoft.EntityFrameworkCore.Relational --version 2.1.3
dotnet ef migrations add migr1
dotnet ef database update
cd ..

mkdir WorkedHoursTrackerClient
cd WorkedHoursTrackerClient
bower init

debugging

  • install local web server npm install -g local-web-server

  • start local web server for client and launch Visual Studio code on both projects

cd WorkedHoursTrackerClient
ws -p 8000 --spa index.html &
code .
cd ..

cd WorkedHoursTrackerWebapi
code .
  • start (F5) webapi
  • start (F5) client ( require vscode chrome debugger extension )