flexmeasures icon indicating copy to clipboard operation
flexmeasures copied to clipboard

account details on /logged-in-user

Open nhoening opened this issue 2 years ago • 1 comments

This simple view should show updated information about the user's account, and remove the old model asset count.

In particular:

  • Show account name & roles
  • Count assets in account with a simple query, link to their (new) list

From a discussion in #309

Note that our complete stack can be run via Docker-Compose. The tutorial also helps you to load some test data.

nhoening avatar Jan 12 '22 20:01 nhoening

The asset count has been fixed here.

nhoening avatar Aug 29 '22 08:08 nhoening

My hunch would be that some small refactoring would be useful, so both the UI and CLI can use the same functions to query the database. The (or, some relevant) queries are currently written in the CLI function. A potentially good spot to move these to would be data/queries/accounts.py (a new module).

Btw, the data/queries module currently contains two types of functions. Roughly speaking, the newer functions (i.e. those we wrote there more recently) return Query objects. The older functions return objects that are returned by calling some query execution method on the Query object, like .all() , .first() or .one_or_none(). In my opinion, we should move the latter functions to data/services at some point. @nhoening should I open a separate issue for that?

Flix6x avatar Mar 06 '23 11:03 Flix6x

Yes that is both a good idea and a new issue.

nhoening avatar Mar 06 '23 11:03 nhoening