Scouts-Victoria-Program / RadioActiv8

Django App for Radio Active Scout game management
GNU Affero General Public License v3.0
1 stars 1 forks source link

Time since last change to base, particularly empty bases #21

Open Jess-Hay opened 5 months ago

Jess-Hay commented 5 months ago

It would be useful to extend the functionality that lists the when the patrol last checked in/out to information on when the base last had a change to it - particularly if the base is empty. I noticed that on the Saturday afternoon of STS2024 that some bases were left empty for an extended period of time - particularly Stellar Cartography which only saw two patrols that afternoon - and it would have been good to be able to see how long a base had been open for to prioritise that base over more newly emptied bases.

mattcen commented 5 months ago

So would this be some rule like “time since a Patrol checked in/out of this base?’

Jess-Hay commented 5 months ago

I think so. Or even if it was just on the empty bases a rule like "time this base has been empty".

mattcen commented 5 months ago

Cool. Well that would go into this part of the template for the dashboard page:

https://github.com/Scouts-Victoria-Program/RadioActiv8/blob/b3b19a481be39f49c3b627bd4ef3653eeecc7c99/django/RadioActiv8/templates/RadioActiv8/master/dashboard.html#L63

And I’d probably add a helper method to the Base model to easily query the most recent event mentioning that base:

https://github.com/Scouts-Victoria-Program/RadioActiv8/blob/b3b19a481be39f49c3b627bd4ef3653eeecc7c99/django/RadioActiv8/models.py#L85