Commit Graph

394 Commits

Author SHA1 Message Date
Christopher C. Wells 774504bce2 Prevent potential sleep entry intersection errors in tests 2021-10-26 19:55:16 -07:00
Christopher C. Wells 0e6a5cb08a Prevent caching of pages requiring authentication 2021-09-16 19:34:33 -07:00
Nicholas Trecina fc8b230928 Selecting one of the breast feeding methods will auto select breast milk as the type 2021-09-09 04:45:32 -07:00
Christopher C. Wells 0a74061a7a Remove readonly state from datetime picker fields (#284) 2021-09-03 20:38:15 -07:00
Christopher C. Wells 83b9177dbe Add basic timeline page load test 2021-08-31 08:08:13 -07:00
Christopher C. Wells e1f20db2cb Update back/forward arrow icon classes 2021-08-31 08:08:13 -07:00
Christopher C. Wells 8fd9680284 Update existing test for icon class changes 2021-08-31 08:08:13 -07:00
Christopher C. Wells c850998b64 Remove deprecated `icon` base class usage 2021-08-31 08:08:13 -07:00
Christopher C. Wells 10af931279 Populate the all-children timeline 2021-08-31 08:08:13 -07:00
Christopher C. Wells 0990678325 Add basic timeline view (WIP) 2021-08-31 08:08:13 -07:00
Christopher C. Wells fad8f1500e Make entry intersection check exclusive
Closes #263
2021-08-17 05:59:08 -07:00
Ohad Lutzky 3922966815 Add date-nav to bottom
Only if date has any events (otherwise no scrolling is necessary)

Fixes #229
2021-08-11 14:27:26 -07:00
Ohad Lutzky 5bc98bd7f0 Show notes in timeline
For Tummy Time, show milestone instead

Fixes #272
2021-08-11 06:11:42 -07:00
Ohad Lutzky 508292317f Add "time since previous" to feedings in timeline
Fixes #266
2021-08-07 20:24:29 -07:00
Ohad Lutzky ce507761cd Split get_objects to short functions 2021-08-07 20:24:29 -07:00
Christopher C. Wells 858436e840 Convert passed datetime object to localetime
Closes #274
2021-08-06 08:33:41 -07:00
Christopher C. Wells 1aad600f6c Only use `SHORT_MONTH_DAY_FORMAT` with supported locales
Closes #276
2021-08-06 08:24:07 -07:00
Ohad Lutzky 207a5bc236 Move Actions column to far left
This allows the columns to be ordered in a descending order of
importance from left to right, reducing scrolling.

Also un-center the column, as it is now flush to the left.

Fixes #236
2021-08-04 14:59:28 -07:00
Ohad Lutzky e2779c006f Hide child column if only one child is shown
Fixes #233
2021-08-04 08:47:56 -07:00
Ohad Lutzky 20538ce59d Unify "wet" and "solid" columns
Note that change is always at least either wet or solid.

Fixes #235
2021-08-03 19:17:51 -07:00
Christopher C. Wells 51c70c1746 Fix linting issue 2021-08-01 04:42:38 -07:00
Christopher C. Wells 273c365bef Add test for short datetime template tag 2021-08-01 04:42:38 -07:00
Christopher C. Wells 94cb7d771a Use short datetime string for lists 2021-08-01 04:42:38 -07:00
Christopher C. Wells 58acccfddb Use short datetime string for lists (WIP) 2021-08-01 04:42:38 -07:00
Christopher C. Wells c1dab44596 Use POST for timer quick add functionality 2021-07-31 13:56:48 -07:00
Christopher C. Wells 824d2af0da Correct method names 2021-07-31 13:16:50 -07:00
Christopher C. Wells c873f84a2c Return to timer detail on delete cancel 2021-07-31 13:15:23 -07:00
Christopher C. Wells c2513ff843 Use POST for timer stop and restart operations 2021-07-31 13:11:21 -07:00
Ohad Lutzky 411641903f
Move Time column to be first in list view (#250)
Fixes #232
2021-07-09 19:32:53 -07:00
Ohad Lutzky beaf366079
Show duration in timeline (#247) 2021-07-09 13:45:07 -07:00
Ohad Lutzky 73a04af9b2
Timeline: Add edit links (#246)
* Timeline: Show diaper change details

* Timeline: Add edit links

Suggested in #229

Co-authored-by: Christopher Charbonneau Wells <10456740+cdubz@users.noreply.github.com>
2021-07-07 20:09:22 -07:00
Ohad Lutzky 8861933738 Timeline: Show diaper change details 2021-07-07 19:54:43 -07:00
Ohad Lutzky 2a7402283c Clarify "no events" on timeline
Suggested in #229
2021-07-06 20:38:31 -07:00
Ohad Lutzky e3b6f79c09 Show feeding amount on timeline 2021-07-05 12:51:05 -07:00
Christopher C. Wells a2da7e32f9 Disable autocomplete on datetime form fields (#224)
The actual issue here is that the readonly property is no longer working. This
should be fixed in a separate commit.
2021-06-19 15:20:03 -07:00
jcgoette a33b0cadff default feeding start to now 2021-06-19 14:17:34 -07:00
jcgoette 0001281d66 default last feed method if not left/right breast 2021-06-19 14:17:34 -07:00
Christopher C. Wells 71da84a47b Add missed migration from #206 2021-06-07 20:26:15 -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
Beni Cherniavsky-Paskin f58571bf17 child slugs: require non-blank
Currently it is easy for a child with non-ascii name to get empty slug:
'Мааян' 'Паскин-Чернявский' => '-'
'Мааян' 'Паскин' => ''

Once any child has an empty slug, many pages break with NoReverseMatch
errors.  This commit at least prevents setting such names;
slug computation to be fixed later.
2021-04-30 14:47:08 -07:00
Christopher C. Wells dadb84ec6a Add migrations 2021-04-15 05:45:25 -07:00
0x4161726f6e f4b9053c00 Add solid food option to feeding types
I would find this helpful as I coordinate with day care
2021-04-15 05:45:25 -07:00
Christopher C. Wells e27f7b76a0 Use Django 3.2 timesince depth parameter for child age 2021-04-11 13:35:07 -07:00
Christopher C. Wells b009a0bebc Revert timesince chunks after monkey patch (fixes #181) 2021-01-03 19:08:11 -08:00
Christopher C. Wells 95a2cdf06d Use day precision for child age (#167) 2020-10-25 20:06:21 -07:00
Christopher C. Wells 3f0694dc9d Make datetime editable for Note model
Closes #151
2020-08-12 19:47:58 -07:00
Christopher C. Wells 7abe7b2a5f Add test for USE_24_HOUR_TIME_FORMAT (#148)
Note: this new test has been tagged "isolate" and excluded from regular tests
because the locale behavior being tested involves Django internals that must
be handled at initialization and cannot be changed during runtime (i.e. this
new test with PASS when run alone, but FAIL when run with other tests).

A future commit or set of commits should come up with a way to execute all
tests tagged "isolate" in isolated test environments as part of the full test
suite. For now, this test simply does not run until it is run manually.
2020-07-22 21:56:29 -07:00
Christopher C. Wells 8f3f8e5104 Add tests for template tag (#148) 2020-07-22 20:16:23 -07:00
Christopher C. Wells 4d71f9c5ec Add 24 hour time format override support to input fields (#148) 2020-07-21 22:03:08 -07:00
Christopher Charbonneau Wells cbf6f0ce1e
Fix minor linting issues 2020-03-30 05:25:57 -07:00
Peter Hardy dfd89ae339 Tests for initial feeding methods (#127) 2020-03-28 21:54:07 +11:00
Peter Hardy 4581722e0b Actually check for FBM as well (#127). 2020-03-26 22:28:27 +11:00
Peter Hardy dce0cd1e10 Update method select for when formula types selected (#127) 2020-03-26 22:16:07 +11:00
Peter Hardy 4978208d7f Prepopulate method for formula types (#127). 2020-03-26 22:15:08 +11: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 2346995cb3 Remove bottle-formula validation test
This is not really necessary and only serves as validation that will need to updated if model choices ever change.
2020-02-18 14:41:33 -08:00
Christopher C. Wells 959649f5f7 Add data import tests 2020-02-18 14:41:33 -08:00
Christopher C. Wells 8c64dd8cae Configure support for imports 2020-02-18 14:41:33 -08:00
Christopher C. Wells e81d3c100c Fix linting issues 2020-02-18 14:41:33 -08:00
Christopher C. Wells 796ba1ae7f Exclude duration (calculated) from model exports 2020-02-18 14:41:33 -08:00
Christopher C. Wells c9f39437c2 Add child name data to exports 2020-02-18 14:41:33 -08:00
Christopher C. Wells 014b373a78 Add initial basic admin import/export support 2020-02-18 14:41:33 -08:00
Christopher C. Wells 37fc8aa5a8 Update list templates to include notes 2020-02-16 15:09:57 -08:00
Christopher C. Wells f681c579e5 Add missing `form_class` value to core model update forms 2020-02-16 15:09:57 -08:00
Christopher C. Wells 11164f0cd0 Set notes textarea to 5 rows 2020-02-16 15:09:57 -08:00
Christopher C. Wells e3c2f0c0b9 Implement example notes handling in Diaper Change list 2020-02-16 15:09:57 -08:00
Christopher C. Wells 48a0093700 Add general notes to most models 2020-02-16 15:09:57 -08:00
Christopher C. Wells 60cd90ca80 Use `last()` instead of `latest()`
With `latest()`, an exception is thrown if there is one child in the database and no feeding entries.
2020-02-08 14:02:47 -08:00
Christopher C. Wells af710b977a Add tests for inactive Timer delete functionality 2020-02-06 21:50:22 -08:00
Christopher C. Wells 127c3d5cb0 Add ability to delete all inactive Timers (#108) 2020-02-06 21:15:36 -08:00
Christopher C. Wells 005a4f180e Correct timer urls to use plural form 2020-02-06 20:14:01 -08:00
Christopher C. Wells 6333b0b1ea Move add button to header in list views 2020-02-06 20:09:24 -08:00
Christopher C. Wells 703782b21c Use provided `end` in Timer.stop() (#111) 2020-02-06 19:56:26 -08:00
Christopher C. Wells 17ed16bc8b Hide Child from Timer detail in one child use cases 2020-01-31 12:01:17 -08:00
Christopher C. Wells 05266d4b76 Mute child name on timer detail 2020-01-31 09:09:01 -08:00
Christopher C. Wells 8c28e8941e Update admin fields for core Timer model 2020-01-31 09:09:01 -08:00
Christopher C. Wells 6ba6e429cd Add core Timer tests 2020-01-31 09:09:01 -08:00
Christopher C. Wells f7d9f6b361 Refactor core forms test base class
The extra child added in the base classes caused failures with the `test_child_with_one_child` test.
2020-01-31 09:09:01 -08:00
Christopher C. Wells 385d833247 Add test for `instance_add_url` template tag 2020-01-31 09:09:01 -08:00
Christopher C. Wells 2b0e15d8ec Add tests for initial values settings on core models 2020-01-31 09:09:01 -08:00
Christopher C. Wells bd79a3f2d1 Do not use generated fake data in form tests
This could cause unpredictable errors during tests so each test case should set up it's own environment.
2020-01-31 09:09:01 -08:00
Christopher C. Wells 1d492e4163 Refactor core form tests for better organization and coverage 2020-01-31 09:09:01 -08:00
Christopher C. Wells 39b0df534b Correct success message for Child delete form 2020-01-31 09:09:01 -08:00
Christopher C. Wells 107257cc34 Update model tests for timer-child relationship changes 2020-01-31 09:09:01 -08:00
Christopher C. Wells 3eb0e336c6 Refactor core forms on a base class to handle initial values 2020-01-31 09:09:01 -08:00
Christopher C. Wells 4e01365e85 Set Child from an argument instead of the timer 2020-01-31 09:09:01 -08:00
Christopher C. Wells 5e9946ecd6 Respect child if set when setting feeding defaults 2020-01-31 09:09:01 -08:00
Christopher C. Wells b31d9194d9 Include child when setting defaults from timer 2020-01-31 09:09:01 -08:00
Christopher C. Wells e5a5e330b9 Obscure timer-child relations for one child use case 2020-01-31 09:09:01 -08:00
Christopher C. Wells fd6bcfe9a5 Maintain a cached count of Child instances 2020-01-31 09:09:01 -08:00
Christopher C. Wells c80ec252bc Add optional Child to Timer model 2020-01-31 09:09:01 -08:00
Christopher C. Wells 475b7abf78 Apply custom style to `.datetimepicker-input` 2020-01-31 08:47:03 -08:00
Christopher C. Wells b8e2416cd1 Set all datetime fields to `readonly` 2020-01-31 08:47:03 -08:00
Christopher C. Wells 387bc36956 Fix incorrect element ID for timer start field 2020-01-27 15:09:16 -08:00
Christopher C. Wells 26b54b114e Add wrapper for datetime picker widget 2020-01-27 14:56:37 -08:00
Christopher C. Wells a8abfb725f Add generic "Amount" field to Diaper Change model (#77) 2020-01-26 13:22:20 -08:00
Christopher C. Wells 69798ff490 Add YYYY-MM-DD support to frontend library 2020-01-23 20:33:36 -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 d9280d4887 Use `LOCALE` in Timer form 2020-01-20 15:50:35 -08:00
Christopher C. Wells a93070c5ba Add locale support for datetime picker 2020-01-20 15:50:35 -08:00
Christopher C. Wells 1a31a27974 Remove hardcoded time formats in list views (#93) 2020-01-19 13:29:49 -08:00
Christopher C. Wells eceece0db2 Update tests for Diaper Change attribute verbose names 2019-11-09 16:42:51 -08:00
Christopher C. Wells d5509bdb52 Fix linting issues 2019-11-09 16:42:51 -08:00
Christopher C. Wells b6733650dc Use get_FOO_display for choices fields in templates 2019-11-09 16:42:51 -08:00
Christopher C. Wells cce4855b52 Add translation support to CoreDeleteView 2019-11-09 16:42:51 -08:00
Christopher C. Wells 4f84482803 Add translation support to `duration_string` utility 2019-11-09 16:42:51 -08:00
Christopher C. Wells 74f089fcec Refactor usee of removd Visibility API library. 2019-08-22 20:35:52 -07:00
Christopher C. Wells f270af8cd4 Add "Fortified brest milk" feeding type option (#71). 2019-06-07 07:24:03 -07:00
Christopher C. Wells 4397d4a406 Add temperature tracking. 2019-05-16 21:33:26 -07:00
Christopher C. Wells 0261f39864 Add "both breasts" option for Feeding method (#52). 2019-05-02 10:19:56 -07:00
Christopher C. Wells 185f52b01f Fix linting issues. 2019-04-18 19:55:55 -07:00
Christopher C. Wells 383fa0b74f Add no-op migrations related to translation changes. 2019-04-16 21:42:31 -07:00
Christopher C. Wells 485b8fb2ae Add translation support to Child timeline elements. 2019-04-16 20:33:49 -07:00
Christopher C. Wells 1c3dacf96c Fix missed translation strings for template headers. 2019-04-16 20:03:34 -07:00
Christopher C. Wells b4c417ac3d Add translatable verbose names to all Model fields. 2019-04-14 18:59:16 -07:00
Christopher C. Wells ee82286da5 Add translatable strings support to formatted strings (WIP). 2019-04-14 14:42:58 -07:00
Christopher C. Wells bd4705b77f Add translateable strings support in core app. 2019-04-13 22:51:44 -07:00
Christopher C. Wells efc613c637 Fix minor linting issues. 2019-02-02 19:17:25 -08:00
Christopher Charbonneau Wells 4b7bb69218 Add support for Django 2.1 and Django Filters 2.0.0. 2018-08-04 13:00:51 -07:00
Christopher Charbonneau Wells 08488af718 Raise permission denied instead of redirecting to login (#49). 2018-05-20 14:40:09 -07:00
Christopher Charbonneau Wells 7c980150a4 Make sure there is at least one Feeding object before attempting to preset the type for a new entry. 2018-04-07 06:35:35 -07:00
Christopher Charbonneau Wells cdaef446a0 Automatically fill in the type field for a new Feeding entry with the value used for the latest entry. 2018-03-13 19:49:21 -07:00
Christopher Charbonneau Wells b10944b030 Fix datetime picker class name for time form fields. 2018-03-13 19:17:30 -07:00
Christopher Charbonneau Wells 911cde4f95 Remove ounces references for feeding amounts. 2018-03-13 19:10:21 -07:00
Christopher Charbonneau Wells 5dc372281b Remove all unicode_literals imports. 2018-02-17 17:09:40 -05:00
Christopher Charbonneau Wells b972482cb1 Don't require color for solid diaper change entries. 2018-02-16 09:33:30 -05:00
Christopher Charbonneau Wells 5ad656060f Fix bug keeping datetime input open after losing focus. 2018-01-14 09:39:06 -05:00
Christopher Charbonneau Wells 2b279fd175 Remove timer start messages.
These are not needed as the Timer model, unlink other models, redirects to the newly added instance (instead of the instances list).
2017-12-25 11:55:12 -05:00
Christopher Charbonneau Wells f2a8cdec2d Update URL definitions to Django 2.0 style. 2017-12-13 18:12:32 -05:00
Christopher Charbonneau Wells ca2a5c6ee8 Use reverse/reverse_lazy instead of strings for core views URLs. 2017-12-06 17:16:47 -05:00
Christopher Charbonneau Wells b6516c6b48 Add status messages for core app views. 2017-12-06 16:58:19 -05:00
Christopher Charbonneau Wells d86c91aeab Update HTML id targets for namespace views. 2017-12-03 17:11:13 -05:00
Christopher Charbonneau Wells e92d3f361e Misc. Django 2.0 update changes. 2017-12-03 16:52:27 -05:00
Isaac Bythewood 969958df09 Move ALLOW_UPLOADS to BABY_BUDDY dict 2017-12-03 04:39:43 -05:00
Christopher Charbonneau Wells c0f17dd273 Reformat user menu and add external links to source and chat. 2017-11-30 11:34:07 -05:00
Christopher Charbonneau Wells 58c1cc4cbc
Merge pull request #20 from overshard/master
Make ALLOW_UPLOADS a setting dependent on user preference and platform
2017-11-19 08:40:27 -05:00
Isaac Bythewood f8d028563a Fix linting issue in admin with no space after comma. 2017-11-18 21:06:37 -05:00
Isaac Bythewood a503d346ae Make ALLOW_UPLOADS a setting dependent on user preference and platform 2017-11-18 20:59:51 -05:00
Christopher Charbonneau Wells b5d2a0b7f4 SASS linting fix. 2017-11-18 07:34:57 -05:00
Christopher Charbonneau Wells eff1320a5e Tweak Child list table styles. 2017-11-18 06:48:59 -05:00
Isaac Bythewood 7479cc932f Placeholder child list picture 2017-11-18 04:32:24 -05:00
Isaac Bythewood bf62a4e252 Add ability to upload picture of child with thumbnailing capabilities. 2017-11-18 04:22:12 -05:00
Christopher Charbonneau Wells 067be4bf07 Add weight tracking. 2017-11-09 21:15:09 -05:00
Christopher Charbonneau Wells f947d37285 Add default Child to Note add form. 2017-11-09 19:50:54 -05:00
Christopher Charbonneau Wells 162f117cef Move timeline code to core and integrate with Child detail view. 2017-11-07 13:15:48 -05:00
Christopher Charbonneau Wells 1c5278cebf Verify necessary fields before running model validation tests. 2017-11-07 07:07:51 -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 7955cd04a7 Fix linting error. 2017-11-05 15:02:22 -05:00
Christopher Charbonneau Wells e6acfe4e75 Add date intersection validation for models with start and end dates. 2017-11-05 14:18:30 -05:00