Commit Graph

22 Commits

Author SHA1 Message Date
Daniel Beard 21b8a737c0
Add carousel of last 7 days of feedings to the todays feeding card (#450)
Add list of last 7 days of feedings to the todays feeding card

Co-authored-by: Daniel Beard <daniel@medcrypt.co>
2022-05-30 19:43:42 -07:00
Christopher C. Wells 838020ceff Update Faker API usage 2022-05-28 07:02:13 -07:00
Christopher C. Wells 81ecff0296 Add empty diapers support to dashboard card 2022-04-15 20:56:34 -07:00
Marco H 84d2415605 Fix test 2022-04-02 06:32:53 -07:00
Christopher C. Wells cd946280cb Format code with black 2022-02-09 16:00:30 -08:00
Yulian Kuncheff 9b604627a1 Add Height, Head Circumference, and BMI, corresponding reports, and move to separate menu with Weight and Temperature. 2021-12-31 09:19:53 -05:00
Benjamin Häublein e8696a8b00
Dashboard: Hide old data (#215)
* filter card data by age

* add setting for hide_age

* add option to settings form

* fix name to consistently use hide_age

* rename filter, use setting for filter

* add test for old hiding old data

* fix migration to contain correct imports, remove month from timedelta

* remove months from timedelta, allow blank

* fix with block

* add settings test

* add test for filter

* mock localtime

* fix timezone issues with tests

* linting

* linting

* Adjust migration

Co-authored-by: Benjamin Häublein <benjaminh@debian.vm.hp>
Co-authored-by: Christopher C. Wells <git@chris-wells.net>
2021-06-19 14:09:05 -07:00
Benjamin Häublein 1dca1cc050
Add option for hiding empty dashboard cards (#213)
* add option for hiding empty dashboard cards

* rework add option for hiding empty dashboard cards

missed statistics.html

* don't exit early in cards

* add forms test for dashboard_hide_empty

* add tests for cards

* fix early exit in card_diaperchange_latest

* change dependency of migration

* rename migration

* introduce hiding of cards in templates

* linting

* add context to test_card_diaperchange_last

* setup MockUserRequest

* add context to all cards test cases

* add test for settings_dashboard_hide_empty_on

* change dashboard_hide_test, but it doesn't work

* add test for _user_wants_hide

* fix test_user_wants_hide user object, simpliy check for data['empty']

* add test for user_wants_hide to every card

* linting

* fix trailing whitespace

* rename user_wants_hide to hide_empty

* fix hidden statistics

* add user.refresh_from_db to test case, add test case for dashboard_refresh_rate

* Follow redirect and correct assertion

Co-authored-by: jcgoette <jcgoette@gmail.com>
Co-authored-by: Benjamin Häublein <benjaminh@debian.vm.hp>
Co-authored-by: Christopher C. Wells <git@chris-wells.net>
2021-05-13 20:28:39 -07:00
Jean-Frederic Berthelot f29515a04d Add a "Today's Feeding" card
It is useful to know today's cumulated Feeding amount.

Right now, this can be inferred from the "Feeding Amount" report,
but is not made readily available in the dashboard, where the
Feeding-related cards are the last Feeding and its method.

This adds a new card `Today's Feeding`, heavily based on "Today's Sleep".
2020-07-21 00:48:07 +02:00
Christopher C. Wells 4915f809e6 Update tests for feeding frequency changes (#135) 2020-03-17 05:03:09 -07:00
Christopher C. Wells cb1712377b Include past three methods is Last Feeding Method card (#117) 2020-02-16 13:38:20 -08:00
Christopher C. Wells a0ec0591e4 Remove timezone overrides from tests
Tests will now use the timezone from a Settings model instance.
2020-02-14 10:56:13 -08:00
Christopher C. Wells 1b536ff6ed Update tests for timers list template tag 2020-01-31 09:09:01 -08:00
Christopher Charbonneau Wells 5dc372281b Remove all unicode_literals imports. 2018-02-17 17:09:40 -05:00
Christopher Charbonneau Wells 23185f413f Move test data fixtures file to babybuddy app. 2017-12-07 13:45:48 -05:00
Christopher Charbonneau Wells 238d0d40a1 Remove Python 2.7 support. 2017-12-03 16:58:53 -05:00
Christopher Charbonneau Wells 1798a493a6 Update fixtures test data to use correct time zone (default is now UTC). 2017-11-29 19:36:47 -05:00
Christopher Charbonneau Wells 9f7d84013e Add Python 2.7 workaround for Dashboard tests and add missing `__init__.py` file. 2017-11-19 12:39:59 -05:00
Christopher Charbonneau Wells 452ce190ae Add specific, fixtures-based tests for Dashboard cards. 2017-11-19 11:13:35 -05:00
Christopher Charbonneau Wells 00d3cf65f5 Add a basic Welcome page. 2017-11-09 14:37:06 -05:00
Christopher Charbonneau Wells e2733e6b1e Improve Dashboard view.
This commit adds a placeholder image for Child objects (in the future, hopefully, photo uploads will be added) and reworks the Dashboard view to look better when more than one child is in the database. There are also some minor tweaks to the Child detail view and one new Gulp requirement to improve the flow of copying static image assets from apps.
2017-11-06 16:24:21 -05:00
Christopher Charbonneau Wells 905c7a8690 Add dashboard tests. 2017-10-25 11:05:45 -04:00