Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Barmen statistics #389

Open
corentingiraud opened this issue Oct 28, 2019 · 2 comments
Open

Barmen statistics #389

corentingiraud opened this issue Oct 28, 2019 · 2 comments
Assignees

Comments

@corentingiraud
Copy link
Member

Is your feature request related to a problem? Please describe.
Application doesn't provide any stats on barmen services

Describe the solution you'd like
A simple endpoint GET /api/v1/barmen/:id/statistics with the following response body:

{
  hoursOfService: number;
  barmenWhichSpendTheMostTimeWith: {
    barman: Barman;
    nbHours: number;
  }[];
  barmenWhichSpendTheLessTimeWith: {
    barman: Barman;
    nbHours: number;
  }[];
}
@corentingiraud
Copy link
Member Author

@Embraser01 What do you think ?

@Embraser01
Copy link
Member

I started to migrate a big part of the K-App to moleculer this weekend, including barmen objects.

There is still a lot of work to do (specially in the front...) as I changed the data model: Barman is in user.account and will contain it's roles and kommissions but not its services. Services will contains the list of barmen.

Anyway, depending on the priority:

  • If it's not urgent, I'd recommend waiting the migration to moleculer in order to make a good base for statistics (I made some research for members statistics last week).
  • Otherwise, you could implement a fast (and maybe dirty) stats endpoint with these two stats

I'm looking to finish my work (here) soon but I don't think I'll have time before next week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants