Commit Graph

379 Commits

Author SHA1 Message Date
Christopher Charbonneau Wells 8168c74034 Check and update timer active state on update. 2017-10-29 15:47:26 -04:00
Christopher Charbonneau Wells 97dbf87e5b Refactor card templates and styling. 2017-10-28 23:01:39 -04:00
Christopher Charbonneau Wells 5afc55ca31 Make Timer instance.start field editable. 2017-10-28 13:27:33 -04:00
Christopher Charbonneau Wells 03dc139b0e Explicitly set Timer.duration to None on instance save when the instance is still running.
This has to be done because the Timer.from_db() method fills in duration against the current time when the instance is still active. This issue was introduced in fd960cd.
2017-10-28 12:43:43 -04:00
Christopher Charbonneau Wells fd960cd974 Refresh from DB during timer duration test to satisfy new class method duration calculation. 2017-10-27 22:36:26 -04:00
Christopher Charbonneau Wells c339062fba Use visibilityjs and momentjs to update a running timer when it's detail page becomes visible.
This commit is intended to improve the mobile experience by updating the timer detail page with the correct, current duration when, for example, a phone is unlocked after having been locked for a while with the timer detail page open.
2017-10-27 22:28:38 -04:00
Christopher Charbonneau Wells 6e936df1bc Use a from_db class method instead of a separate method to always provider a timer's current duration. 2017-10-27 21:33:26 -04:00
Christopher Charbonneau Wells 1221367f2a Adjust duration test assertions to use exact timedeltas.
This prevents failures when timedeltas include microseconds.
2017-10-25 12:01:43 -04:00
Christopher Charbonneau Wells 3c2df12314 Add core model tests. 2017-10-25 10:20:13 -04:00
Christopher Charbonneau Wells 05e9927d74 Remove unnecessary "duration_td" Tummy Time method. 2017-10-25 09:45:53 -04:00
Christopher Charbonneau Wells e3b0fc2468 Remove unused "since" model methods.
This "to string" functionality is and should be handled in templates.
2017-10-25 09:19:14 -04:00
Christopher Charbonneau Wells b393de90dc Simplify model string names. 2017-10-25 08:58:15 -04:00
Christopher Charbonneau Wells f23ea78cef Linting fixes. 2017-10-22 15:05:58 -04:00
Christopher Charbonneau Wells e45101b75c Rename project Baby Buddy. 2017-10-22 14:00:42 -04:00
Christopher Charbonneau Wells 2ca120b83f Add core forms tests. 2017-10-21 23:00:28 -04:00
Christopher Charbonneau Wells 646ffbf093 Add tests utilities and core views tests. 2017-10-21 22:14:44 -04:00
Christopher Charbonneau Wells 5f3cadd38b Implement breadcrumbs. 2017-10-20 16:07:53 -04:00
Christopher Charbonneau Wells 201283221c Add a Child detail view. 2017-10-20 15:23:26 -04:00
Christopher Charbonneau Wells 0038a34843 Prep for adding breadcrumbs (WIP). 2017-10-20 10:32:27 -04:00
Christopher Charbonneau Wells 117ee939cf Adjust timer font size for smallest target display (iPhone SE). 2017-10-11 13:59:32 -04:00
Christopher Charbonneau Wells 43edfddd82 Move "short" duration string function to graphs and exclude seconds. 2017-09-25 11:40:15 -04:00
Christopher Charbonneau Wells 98963572ba Use form classes to set appropriate field attributes in date/time fields.
Using a custom input element in the template caused issues with default values (e.g. when set by a timer).
2017-09-17 15:48:23 -04:00
Christopher Charbonneau Wells dad1ff73ca Add custom form field settings for datetime/date fields. 2017-09-17 14:54:50 -04:00
Christopher Charbonneau Wells a89a237b5c Use a generic form template for existing forms. 2017-09-17 09:00:34 -04:00
Christopher Charbonneau Wells 36847f0bd2 Default to current time for diaper change and end field entries. 2017-09-17 08:53:11 -04:00
Christopher Charbonneau Wells 3d88235eb9 Implement generic, app-specific "icon" style names over FA. 2017-09-15 12:29:56 -04:00
Christopher Charbonneau Wells c49b8d1930 Simplify core model names. 2017-09-15 11:55:30 -04:00
Christopher Charbonneau Wells f4d94a3ca0 Add a short string duration utility function. 2017-09-13 14:07:51 -04:00
Christopher Charbonneau Wells 10ff754e67 Add a paginator to all list views. 2017-09-10 17:02:57 -04:00
Christopher Charbonneau Wells 44dd4877a6 Re-order list displays and add a boolean formatter template tag. 2017-09-10 16:24:59 -04:00
Christopher Charbonneau Wells 115ef15c48 Fix timer add form to include user. 2017-09-10 09:50:16 -04:00
Christopher Charbonneau Wells 32da7873fa Add a timer edit flow. 2017-09-10 05:11:09 -04:00
Christopher Charbonneau Wells 476b7ece70 Add a timer form template. 2017-09-10 04:56:06 -04:00
Christopher Charbonneau Wells d29e47861d Only display active timers nav menu if active timers exist. 2017-09-10 04:42:37 -04:00
Christopher Charbonneau Wells 99dcb1e7ca Fixer Timer.stop method to respect custom end argument. 2017-09-09 13:00:13 -04:00
Christopher Charbonneau Wells c38290838b Add action buttons to timer detail page. 2017-09-09 12:57:31 -04:00
Christopher Charbonneau Wells a9bc52dfff Move timer_stop to a model method and add a restart method. 2017-09-09 12:47:41 -04:00
Christopher Charbonneau Wells 4def741d37 Display all timers to any user with view_timer access. 2017-09-09 11:57:58 -04:00
Christopher Charbonneau Wells 1ae44c408f Add timers list. 2017-09-09 11:54:34 -04:00
Christopher Charbonneau Wells b317c08504 Fix Tummy Time display fields. 2017-09-08 18:03:44 -04:00
Christopher Charbonneau Wells 9767315878 Add styling to stopped timers in detail page. 2017-09-08 14:39:01 -04:00
Christopher Charbonneau Wells 7f5a40ae41 Add ability to stop a timer (WIP).
This commit handles everything except including the timer in the timers list in the UI. This may require changing the model declaration to make the "active" field more complex or add another field.
2017-09-08 14:36:22 -04:00
Christopher Charbonneau Wells c3e5a0349e Include seconds in Tummy Time entry form fields. 2017-09-07 20:14:26 -04:00
Christopher Charbonneau Wells 9d0572ba92 Move duration methods in to utils for use elsewhere in the project. 2017-08-25 16:33:14 -04:00
Christopher Charbonneau Wells d11733442d Add a diaper change types over time report. 2017-08-24 14:54:01 -04:00
Christopher Charbonneau Wells eefa00bfd3 Add a very basic prototype dashboard for multiple children. 2017-08-24 13:09:56 -04:00
Christopher Charbonneau Wells 78ebc87265 Use static_src directories to prevent collisions with Django's collectstatic. 2017-08-24 07:54:47 -04:00
Christopher Charbonneau Wells 23acc006d4 Linting fixes. 2017-08-22 13:36:49 -04:00
Christopher Charbonneau Wells 2789234a92 Linting fixes. 2017-08-22 13:16:35 -04:00
Christopher Charbonneau Wells 7bffb41718 Fix all url declarations to specifying starts with (^). 2017-08-21 19:19:48 -04:00
Christopher Charbonneau Wells d659fc26e4 Account for duration days in timers. 2017-08-21 18:44:47 -04:00
Christopher Charbonneau Wells 347b1ff11b Make the timer display smaller on small devices. 2017-08-21 11:43:46 -04:00
Christopher Charbonneau Wells f3fc219980 Add hrefs to menu links so they work on mobile. 2017-08-21 09:55:06 -04:00
Christopher Charbonneau Wells f81f763cfb Refactor JS to use BabyBlotter as primary JS namespace. 2017-08-20 11:23:32 -04:00
Christopher Charbonneau Wells 78eb20ab91 Update the timer duration in real time on the timer detail page. 2017-08-20 11:09:40 -04:00
Christopher Charbonneau Wells 21e4af6f58 Move duration tools to a separate template tag collection. 2017-08-20 10:04:20 -04:00
Christopher Charbonneau Wells 6d73cb69f6 Convert duration_string to a template tag (WIP). 2017-08-19 16:46:50 -04:00
Christopher Charbonneau Wells c5fc35b177 Add an actual duration field to relevant models. 2017-08-19 16:16:42 -04:00
Christopher Charbonneau Wells 22fbdf2868 Remove ID from model list templates. 2017-08-19 15:00:29 -04:00
Christopher Charbonneau Wells f30ef88d1b Add dashboard link to child list. 2017-08-19 14:57:21 -04:00
Christopher Charbonneau Wells 3c22a79c4a Refresh migration file. 2017-08-18 14:59:13 -04:00
Christopher Charbonneau Wells 25fbf4c4d0 Add Tummy Time day activity card. 2017-08-18 14:58:10 -04:00
Christopher Charbonneau Wells e92050cb44 Add a Last Diaper Change card. 2017-08-18 11:00:58 -04:00
Christopher Charbonneau Wells 0ed0ae1a94 Add a "since" calculated field to existing models with time data. 2017-08-18 09:43:24 -04:00
Christopher Charbonneau Wells c908ae6e2b Refactor dashboard as a separate app. 2017-08-18 09:02:31 -04:00
Christopher Charbonneau Wells fe2b704d16 Add example "Last Feeding" dashboard card. 2017-08-18 08:49:15 -04:00
Christopher Charbonneau Wells b6ba6d440f Add Child dashboard logic. 2017-08-18 08:33:54 -04:00
Christopher Charbonneau Wells 5d4beea512 Add slug-based child URLs.
Also some beginnings of the dashboard system (WIP).
2017-08-18 08:17:45 -04:00
Christopher Charbonneau Wells 37f28c3ff7 Add slug field to Child. 2017-08-18 08:12:50 -04:00
Christopher Charbonneau Wells 8772f87d8a Squash migrations. 2017-08-18 01:57:07 -04:00
Christopher Charbonneau Wells f15894fac2 Float active timers to top. 2017-08-18 01:56:23 -04:00
Christopher Charbonneau Wells f08ec94e3c Stop timer on instance save instead of form load. 2017-08-18 01:53:48 -04:00
Christopher Charbonneau Wells 9ac8432ff8 Do not update Timer.start on save(). 2017-08-18 01:01:37 -04:00
Christopher Charbonneau Wells cf1598fe2c Add permissions check for timer detail view buttons. 2017-08-18 00:59:25 -04:00
Christopher Charbonneau Wells a51d9e4c83 Add timer delete functionality and move template back in to core. 2017-08-18 00:55:57 -04:00
Christopher Charbonneau Wells 8cb2c171f2 Redirect to timer detail view instead of "next" on timer quick create. 2017-08-18 00:48:26 -04:00
Christopher Charbonneau Wells 62a1142ad6 Add ability to create instances from timer detail view. 2017-08-18 00:42:37 -04:00
Christopher Charbonneau Wells 24d797db01 Add Timer detail template (WIP). 2017-08-17 23:45:56 -04:00
Christopher Charbonneau Wells b4eefea7f9 Recreate initial migration. 2017-08-17 23:14:16 -04:00
Christopher Charbonneau Wells 68bad13e93 Add navbar-based Timer dropdown. 2017-08-17 23:10:07 -04:00
Christopher Charbonneau Wells 0f73042bfa Change Timer string format and allow null name field. 2017-08-17 22:52:41 -04:00
Christopher Charbonneau Wells f474ccb8b9 Refactor overall template structure. 2017-08-17 21:33:08 -04:00
Christopher Charbonneau Wells 0c9b953ab4 Default Child foreign keys if only instance exists. 2017-08-17 20:59:55 -04:00
Christopher Charbonneau Wells ac2cc8ec5f Assign user field during Timer instance save. 2017-08-17 20:42:47 -04:00
Christopher Charbonneau Wells 1b015d4dde Add user association to Timer (WIP - adding timer broken) 2017-08-17 14:42:44 -04:00
Christopher Charbonneau Wells d89fa9df11 Add permissions checks to frontend. 2017-08-17 13:39:23 -04:00
Christopher Charbonneau Wells 3bbfd012f4 Add permissions handling to api and core views. 2017-08-17 13:18:14 -04:00
Christopher Charbonneau Wells 55a908f546 Fix URLs configuration to prevent namespace issues between api and core apps. 2017-08-17 12:17:51 -04:00
Christopher Charbonneau Wells 60226dd9c5 Update core migrations. 2017-08-17 11:23:40 -04:00
Christopher Charbonneau Wells 72b1f3e37b Add ability to create a Timer. 2017-08-16 21:57:01 -04:00
Christopher Charbonneau Wells 387535a200 Add UI for timers. 2017-08-16 21:03:09 -04:00
Christopher Charbonneau Wells 1185addace Add a short param to the duration_string for XhXmXs formatted durations. 2017-08-16 19:08:52 -04:00
Christopher Charbonneau Wells 463dd0c1d7 Add basic template tag for timers. 2017-08-16 18:53:53 -04:00
Christopher Charbonneau Wells 6b2de93736 Add Timer model.
This will used for creating timers in the app and (eventually) applying them to entries during create operations.
2017-08-16 18:33:02 -04:00
Christopher Charbonneau Wells 79472dcdbe Add an amount field to the Feeding model. 2017-08-16 18:07:25 -04:00
Christopher Charbonneau Wells 0c03e93a72 Update initial migration. 2017-08-16 15:53:00 -04:00
Christopher Charbonneau Wells 48f8c11408 Add date/time picker to other model fields. 2017-08-16 14:57:46 -04:00
Christopher Charbonneau Wells 0209314d0f Add Tempus Dominus date/time picker library and use for Baby birth date. 2017-08-16 14:17:27 -04:00
Christopher Charbonneau Wells 72818c5ec4 Use add_class widget to prevent overwrites of existing classes. 2017-08-16 14:01:13 -04:00
Christopher Charbonneau Wells 70df49c892 Add authentication and login handling for existing views. 2017-08-16 12:46:26 -04:00
Christopher Charbonneau Wells 9841eaa563 Add basic forms for remaining models. 2017-08-16 11:16:27 -04:00
Christopher Charbonneau Wells 6a88ff0ea7 Rename foreign key relationships on models from baby to child. 2017-08-16 10:29:53 -04:00
Christopher Charbonneau Wells 35723b28c3 Remove example search form. 2017-08-16 09:53:48 -04:00
Christopher Charbonneau Wells 065e166ac1 Add a Child delete confirm template. 2017-08-16 09:43:34 -04:00
Christopher Charbonneau Wells 54f8513fcc Add a Child add button. 2017-08-16 09:37:10 -04:00
Christopher Charbonneau Wells 195f93f7d5 Update Child form for add/update differences. 2017-08-16 09:29:29 -04:00
Christopher Charbonneau Wells e0e2e91de1 Add Font Awesome support and buttons to Child list view. 2017-08-16 09:20:21 -04:00
Christopher Charbonneau Wells 8d9eef2915 Add basic Child list page example. 2017-08-16 09:12:49 -04:00
Christopher Charbonneau Wells 6e2112b6b5 Refactor model "Baby" as "Child". 2017-08-16 08:49:58 -04:00
Christopher Charbonneau Wells 12e700eb74 Implement example Bootstrap 4 styled form in Baby Add form. 2017-08-15 16:50:33 -04:00
Christopher Charbonneau Wells 9dc0821c3f Add basic Baby model forms. 2017-08-15 16:24:55 -04:00
Christopher Charbonneau Wells b66b1c5af2 Add a Bootstrap-based starter template. 2017-08-15 15:52:27 -04:00
Christopher Charbonneau Wells 5e57f9270b Implement a basic front page view. 2017-08-15 15:14:03 -04:00
Christopher Charbonneau Wells 18aa7020be Revert django-angular dependency commits. 2017-08-15 14:58:17 -04:00
Christopher Charbonneau Wells ee3b6d8988 Update django-angular dependency and improve example form (WIP). 2017-08-15 14:07:06 -04:00
Christopher Charbonneau Wells 2247d5f9e6 Add an initial New Baby form (WIP). 2017-08-13 18:25:05 -04:00
Christopher Charbonneau Wells b9a5450066 Clean up default files and add initial migration. 2017-08-13 17:06:11 -04:00
Christopher Charbonneau Wells 99c6e54cc2 Add a generic Note model. 2017-08-13 16:48:16 -04:00
Christopher Charbonneau Wells a234799418 Add a queryset param filter utility function. 2017-08-13 16:26:52 -04:00
Christopher Charbonneau Wells eaabcc6faf Add filter support. 2017-08-13 16:15:57 -04:00
Christopher Charbonneau Wells 105adec971 Add DiaperChange model. 2017-08-13 15:51:25 -04:00
Christopher Charbonneau Wells c5c3c4b030 Simplify duration string function. 2017-08-13 15:27:32 -04:00
Christopher Charbonneau Wells 9422d73421 Add a TummyTime model. 2017-08-13 15:05:44 -04:00
Christopher Charbonneau Wells 2b062050fc Change Admin list display ordering. 2017-08-13 12:51:01 -04:00
Christopher Charbonneau Wells b4208f4cac Standardize names for existing models. 2017-08-13 12:04:39 -04:00
Christopher Charbonneau Wells 481ada74f8 Add Feeding model. 2017-08-13 11:59:14 -04:00
Christopher Charbonneau Wells 7e0b81960f Add Sleep duration string. 2017-08-13 11:20:09 -04:00
Christopher Charbonneau Wells cafbe048cb Add basic Baby and Sleep models. 2017-08-13 10:48:16 -04:00
Christopher Charbonneau Wells 9261e512bc Initial commit. 2017-08-11 14:32:02 -04:00