Commit Graph

31 Commits

Author SHA1 Message Date
Christopher Charbonneau Wells 49d8f2b340
Update to Django 5.x (#746) 2024-01-13 20:22:08 -08:00
Jose V. Herrera Gallegos 1ef0bb9287 update diaperchange card test 2023-12-17 05:04:14 -08:00
Christopher C. Wells 154d794507 Rename "Today's Feedings" as "Recent Feedings" 2023-07-17 06:50:36 -07:00
Christopher Charbonneau Wells 31a0aa4741
513: Make nap user toggleable (#641)
* Add `nap` field, remove `napping` field.

* Default `nap` property to NULL

* Update existing tests

* Format the code!!

* Allow `Sleep.nap` to be blank

* Migrate settings from `NAP_START_MIN` AND `NAP_START_MAX`

* Remove `active` class from boolean fields

* Correct test method name and user config

* Add forms test

* Use settings for Sleep nap model tests
2023-05-07 15:10:50 -07:00
Christopher C. Wells 7b7f17fde6 Remove "inactive" timer concept -- delete on complete
Closes #109
2023-03-25 13:23:05 -07:00
Christopher Charbonneau Wells 08ba1a32a8
Add a last pumping dashboard card (#604)
* Add a last pumping dashboard card

* Update static assets

* Add domain during dokku CI pre-deploy
2023-02-15 20:22:27 -08:00
Christopher C. Wells 90e16431b8 Format code 2023-02-10 06:14:37 -08:00
Christopher C. Wells cd44a473cf Replace references to Django core `User` model with `get_user_model` 2023-02-10 06:14:37 -08:00
Daniel Beard 834e7636fc
Sleep history (#485)
* Fix dayssince sometimes being off by 1 day depending on timezone

* Add sleep stats carousel for last 7 days

* Renamed sleep_day to sleep_recent

* Rename Today's Sleep to Recent Sleep in dashboard
2022-06-27 19:39:45 -07:00
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