Commit Graph

73 Commits

Author SHA1 Message Date
abog854 ab5bb66c8f
Add feeding method history (#774)
* add feeding method history

* Make it a specialized breastfeeding card instead.

* Minor improvements:

 - don't print days for an empty card.
 - make the width of the bar for each day proportional to that day's total feeding time.

* Don't make bar width proportional to feeding time, actually, it's kinda ugly.

---------

Co-authored-by: ag <ag@ag.com>
Co-authored-by: Christopher C. Wells <git-2022@chris-wells.net>
2024-03-13 19:59:50 -07:00
Sebastien Stettler f30479db42
ci: add djlint to ci (#763)
* ci: add djlint to ci

* lint: all django templates
2024-02-06 05:35:36 -08:00
Jose V. Herrera Gallegos 3131aeb328 fix #699, add diaper change count to card stats 2023-12-17 05:04:14 -08:00
Christopher C. Wells 03f3197884 Reformat "days ago" string for easier translation 2023-10-14 06:53:56 -07:00
Christopher C. Wells 0d08d6174b Updtate french translation, correction, modification duration.py line 110 & 118 to ease the translation 2023-10-14 06:53:56 -07:00
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
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 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
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
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 81ecff0296 Add empty diapers support to dashboard card 2022-04-15 20:56:34 -07:00
Christopher C. Wells c850998b64 Remove deprecated `icon` base class usage 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 ed1d6b779e Show absolute last times in dashboard 2021-07-05 12:44:21 -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 d0b33c2b1b Use user first and last name, when available, in UI 2020-02-18 14:41:33 -08:00
Christopher C. Wells 8dd2aa9b3a Custom last feeding method text size 2020-02-16 13:38:20 -08:00
Christopher C. Wells 18b61581b7 Do not render carousel controls for single item 2020-02-16 13:38:20 -08:00
Christopher C. Wells 4d34a48652 Standardize card language for "no data" 2020-02-16 13:38:20 -08: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 c80ec252bc Add optional Child to Timer model 2020-01-31 09:09:01 -08:00
Christopher C. Wells 746526d4ed Add "trimmed" key to `blocktrans` tags and update formatting 2020-01-23 20:00:32 -08:00
Christopher C. Wells b3fd5378d6 Fix missing user name in Timer info string 2020-01-23 19:20:55 -08:00
Christopher C. Wells b6733650dc Use get_FOO_display for choices fields in templates 2019-11-09 16:42:51 -08:00
Philip Rosenberg-Watt e1d9b813d9 Time last feeding from start
All our lactation consultants told us to time the feedings from start-to-start.
2019-08-22 19:57:38 -07:00
Christopher C. Wells 9114a2d911 Prevent internationalization of numbers used for style parameters. 2019-04-16 19:30:50 -07:00
Christopher C. Wells 1e83fa2902 Remove functions/filters from blocktrans tags in templates. 2019-04-14 18:41:25 -07:00
Christopher C. Wells e20903c60b Add translatable strings support to dashboard app. 2019-04-14 08:40:08 -07:00
Christopher Charbonneau Wells 911cde4f95 Remove ounces references for feeding amounts. 2018-03-13 19:10:21 -07:00
Christopher Charbonneau Wells a3fe999660 Remove strong from Diaper Changes types card solid figure. 2018-02-04 19:39:28 -05:00
Christopher Charbonneau Wells e92d3f361e Misc. Django 2.0 update changes. 2017-12-03 16:52:27 -05:00
Christopher Charbonneau Wells 880d7ca19f Use floats for Diaper Change type data to prevent division issues in Python 2.7. 2017-11-19 12:32:46 -05:00
Christopher Charbonneau Wells 5a57ac7a48 Update naps card to pass timedelta directly. 2017-11-19 11:01:38 -05:00
Christopher Charbonneau Wells 770e7a69eb Refactor Averages card as Statistics carousel card. 2017-11-11 07:01:04 -05:00
Christopher Charbonneau Wells cb2c63cf8a Add nap averages data to the averages card. 2017-11-04 17:52:28 -04:00
Christopher Charbonneau Wells f6dd38a891 Make "nap" bounds configurable with a 6AM - 6PM default. 2017-11-04 09:42:18 -04:00
Christopher Charbonneau Wells 003e112d27 Clean up general card styles. 2017-10-30 19:35:51 -04:00
Christopher Charbonneau Wells e90e31cfd3 Add "Averages" dashboard card. 2017-10-30 14:26:49 -04:00
Christopher Charbonneau Wells 97dbf87e5b Refactor card templates and styling. 2017-10-28 23:01:39 -04:00
Christopher Charbonneau Wells 6ce6599b39 Clean up card content when no data is in the database. 2017-10-27 20:18:55 -04:00
Christopher Charbonneau Wells 84e96c046f Add pluralize check to naps count card. 2017-10-24 10:08:49 -04:00