Commit Graph

167 Commits

Author SHA1 Message Date
Christopher C. Wells 154d794507 Rename "Today's Feedings" as "Recent Feedings" 2023-07-17 06:50:36 -07:00
Christopher C. Wells 253d417eef Add bs namespace to card controls
Fixes #680
2023-07-17 06:50:09 -07:00
Christopher C. Wells ad5f81d84a Adopt new Bootstrap 5 dark mode support 2023-07-09 09:26:13 -07:00
John Merlie c3648ee7c9 update pumping_last template with start field 2023-07-09 08:48:54 -07:00
John Merlie 6adef3ebb9 update last-pump card for start/end/duration 2023-07-09 08:48:54 -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 4d1d915478 Adjust for changes from main rebase 2023-03-25 13:54:25 -07:00
Christopher C. Wells 7b7f17fde6 Remove "inactive" timer concept -- delete on complete
Closes #109
2023-03-25 13:23:05 -07:00
Christopher C. Wells 34fe811a54 Upgrade to Bootstrap 5 (#479)
* Update Tempus Dominus to v6 (WIP)

* Re-add calendar input prepend container

* Normalize setting of default date values

* Migrate to Bootstrap 5 (WIP)

* Remove deprecated card columns implementation from dashboard

* Update BS5 data props

* Use Masonry layout for dashboard cards (for now)

This doesn't seem particularly ideal so may need a more involved refactor

* Update styles for Bootstrap 5 deprecations

* Remove resolutions crap

* Refactor deprecated BS4 classes

* Update list table styles

* Refactor deprecated jumbotron class usages

* Update close button structure

* Add `v2` branch to standard CI workflows
2023-03-25 12:57:12 -07:00
Christopher C. Wells 4f2b9c9871 Pass data age keyword for Pumping card
Fixes #613
2023-03-18 10:57:23 -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
Brian O'Connor c1f788bb49 Use Django's floatformat on today's feeding total 2023-02-07 14:15:40 -08:00
jmunoz94 25add00e26 Update *_last.html to use deltasince + duration_string 2022-10-11 19:13:22 -07:00
matthieu-kr 2690ab4876 Data mismatch - Issue #520
Updates cards.py to use feeding end time to calculate total food for a given day. Ensures consitency between the dashboard and reporting.
2022-09-08 15:03:09 -07:00
Jean-Louis Jouannic 0cd989ff96 🚸 adds a child quick switch in breadcrumb
This quick switch is available in dashboard, timeline and reports breadcrumbs
and allows to quickly switch to the "same" page but for another child
2022-08-03 10:45:22 -07: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
Xuesong 5ab2fce0d0
Handle plurals with `count` tag (#473) 2022-06-05 06:34:52 -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
Marco H 9e86f08430 Add diaper change stats for 3 days and 2 weeks 2022-04-02 06:32:53 -07:00
Christopher C. Wells 20d9cab158 Change reports list to a page
Fixes #379
2022-02-26 13:23:43 -08:00
Christopher C. Wells cd946280cb Format code with black 2022-02-09 16:00:30 -08:00
Benjamin Häublein f22bfcfedd hide feeding_day card when no amount is stored with feedings 2022-02-07 17:07:48 -08:00
adamaze 8ac6130291 Rearrange dashboard cards to set timer card first 2022-01-27 12:36:41 -08:00
Christopher C. Wells 81f0fb94e7 Replace easy-thumbnails with imagekit
Closes #373
2022-01-16 15:49:09 -08:00
Yulian Kuncheff 0af4521005 Linting and faker changes 2021-12-31 09:19:53 -05: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
Christopher C. Wells 9371b1a100 Do not extend standard CSS classes 2021-11-13 05:38:25 -08:00
Ohad Lutzky a5ec2d85c8
Add tummy time duration report (#316) 2021-10-04 12:37:11 -07:00
Christopher C. Wells 0e6a5cb08a Prevent caching of pages requiring authentication 2021-09-16 19:34:33 -07:00
Christopher C. Wells 0b0efc6b8d Hide child edit and delete buttons on small screens
Prevents weird spacing issues and line breaks between buttons on small phones.

Closes #298
2021-09-03 20:51:17 -07:00
Christopher C. Wells c850998b64 Remove deprecated `icon` base class usage 2021-08-31 08:08:13 -07:00
Christopher C. Wells f474a47008 Add "timeline" button to child button group 2021-08-31 08:08:13 -07:00
Ohad Lutzky 36c44484b4 Add links from dashboard
Fixes #234
2021-08-04 14:23:08 -07:00
Ohad Lutzky 9d2e539fc4 Consider last-feeding-method as empty if never-changing
If the feeding method is always the same, the last-feeding-method card
is unhelpful. Consider it "empty" so it can be hidden by user setting.

This is an alternative solution to https://github.com/babybuddy/babybuddy/issues/139.
2021-08-03 19:23:48 -07:00
Ohad Lutzky 798d7663fd Dashboard: Auto-refresh even if focus is supported
* No change if unsupported
* If supported, still auto-refresh at the selected frequency (if any),
  but only if not hidden.

This is useful for always-on displays (e.g. a "baby clock"). Fixes #253
2021-07-19 19:52:19 -07:00
Ohad Lutzky dd3aa3bdb8
Dashboard: Move all "last" cards to top (#248)
Fixes #230
2021-07-09 07:50:02 -07:00
Ohad Lutzky ed1d6b779e Show absolute last times in dashboard 2021-07-05 12:44:21 -07: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
Beni Cherniavsky-Paskin 29ef9f4f75 child slugs: allow unicode
This results in %-encoded URLs, but modern browsers display the unicode
chars (e.g. https://babybuddy.../children/мааян-паскин-чернявский).
2021-04-30 14:47:08 -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 a09ceadc40 Ensure naps are captured for both start and end time 2020-06-09 07:02:28 -07:00
Peter Hardy 120cbf35b6 Ensure date passed to filter is localtime. 2020-05-18 23:07:11 +10:00
Christopher C. Wells 4915f809e6 Update tests for feeding frequency changes (#135) 2020-03-17 05:03:09 -07:00
Benjamin Häublein aeba14f714 linting 2020-03-16 18:53:36 +01:00