Commit graph

49 commits

Author SHA1 Message Date
ca2f3eda3a
fix: Enhances date handling for weekly summaries
Sets the end date to the current day's end time for weekly
calculations, ensuring accuracy when calculating weekly
averages and most common activities.

Improves code readability by reformatting long conditionals
and query filter conditions for better clarity.
2024-11-18 18:47:27 +01:00
5c7586bb9a
feat: Modularizes dashboard structure
Introduces DashboardSection class to encapsulate dashboard logic,
enabling easier extension and customization. Adds separate mood
and dreams dashboard templates to streamline content rendering.

Refactors main dashboard template to dynamically render content
from enabled modules using a new template tag system, improving
flexibility and maintainability.
2024-11-18 10:49:04 +01:00
3c3cfc38ba
fix: Enhances activity visibility control
Replaces conditional rendering with inline style for hidden
activities. This simplifies the template logic and maintains
consistent structure for all activities, enhancing UI flexibility.
2024-11-18 08:35:29 +01:00
d522f23b55
fix: Adds 'hidden' field to ActivityEditView form
Enables editing of the 'hidden' attribute in activity forms,
supporting the management of activity visibility in the UI.
2024-11-18 06:55:01 +01:00
4de1c966d6
feat(migration): Add hidden field to Activity model
Introduces a boolean field 'hidden' to the Activity model to
allow activities to be marked as hidden. This can be utilized
for filtering visible activities without deleting them from
the database.
2024-11-18 06:35:54 +01:00
cfc8f6eefc
feat: Add 'hidden' field to Activity model and update templates
Introduces a 'hidden' BooleanField to the Activity model to manage
visibility of activities. Updates activity_edit and status_edit
templates to support toggling this option.

Improves clarity and maintainability by formatting HTML with better
indentation and structuring. Excludes hidden activities from being
displayed in status_edit.

Enhances user interface for selective display and editing of activities.
2024-11-18 06:35:16 +01:00
8ffdeddf4a
fix: Refines data transformation in heatmap view
Simplifies data processing by removing unnecessary value extraction.
Prepares for future enhancement to return color as value with count as tooltip.
2024-11-17 20:05:40 +01:00
ff70221553 refactor: clean up unused imports and improve code quality
Removed unnecessary imports across various modules to streamline the application's dependencies and improve loading times. Specific changes include the removal of unused Django model and admin imports in several apps, simplifying view imports by eliminating unutilized components, and cleaning up static CSS for better maintainability. Corrections were made to conditional expressions for clearer logic. The removal of the django.test.TestCase import in test files reflects a shift towards a different testing strategy or the current lack of tests. Exception handling has been made more explicit to avoid catching unintended exceptions, paving the way for more robust error handling and logging in the future. Additionally, a new CSS file was added for frontend enhancements, indicating ongoing UI/UX improvements.

These changes collectively aim to make the codebase more maintainable and efficient, reducing clutter and focusing on used functionalities. It's a step towards optimizing the application's performance and ensuring a clean, manageable codebase for future development.
2024-06-02 20:27:02 +02:00
9fbfe583be feat: Enhance data security and introduce heatmap UI
Reinforced user data access rules to bolster security and reorganized distribution files into separate directories for cleaner structure. Added a new heatmap visualization for mood statistics on the dashboard, making user engagements more interactive and insightful. Implemented a JSON view to support the heatmap feature, fetching mood entries within a specified time range.

This change responds to the need for improved data security and a more engaging user interface, directly addressing user feedback for clearer insights into their mood patterns over time.
2024-05-17 15:03:20 +02:00
6521204608 feat: Add initial migrations for GPS and Mood modules
Introduced initial database migrations for GPS logging and Mood tracking functionality, setting the foundation for data model structures in these modules. The migrations define essential entities such as GPSTrack, GPSToken, GPSPoint for the GPS logging module, and Mood, Activity, Aspect among others for the Mood tracking module. This pivotal change enables storing and managing user-generated GPS and mood data efficiently, paving the way for the implementation of core features related to GPS tracking and mood analysis. By removing 'migrations/' from .gitignore, we ensure future migrations are tracked and version-controlled, facilitating smoother database schema updates and deployments.
2024-05-17 13:27:49 +02:00
acc8cf5208 fix: update legend label in moodpies chart
Updated the property for setting the chart legend's label from `legend`
to `legend_label` in the `moodpies` function to align with the latest
library syntax. This change ensures compatibility with newer versions of
the visualization library, preventing potential issues with legend
rendering in mood statistics charts.
2024-03-24 16:29:27 +01:00
8032375bb5 refactor(mood/stats): streamline and optimize visualizations
This commit streamlines mood and activity visualization code in
mood/statistics.py for better readability and maintainability. By
consolidating similar code blocks, replacing ' extension calls with
consistent double quotes, and reformatting large data structures for
clarity, we ensure the code is more Pythonic and easier to follow.
Additionally, the alterations in how pie charts and mood statistics are
generated not only maintain functionality but also reduce cognitive load
when navigating the codebase. These changes pave the way for future
enhancements and debugging efforts by making the codebase more
approachable.
2024-03-24 16:28:10 +01:00
37035aad01 refactor(statistics.py): standardize chart height param
Standardized the parameter name for setting chart height across all
chart creation functions in statistics.py. Replaced `plot_height` with
`height` to align with the latest visualization library conventions.
This change enhances code consistency and adheres to the updated library
API, ensuring future compatibility and easier maintenance.
2024-03-24 16:23:48 +01:00
2e03956f1d Move nav sections to respective apps 2021-10-24 17:45:23 +02:00
30bc1deb73 Order activities by name by default 2021-03-03 10:35:54 +01:00
2d09e25df3 Basic activity statistics 2021-03-03 08:39:26 +01:00
a8a7637a48 Colored buttons for mood selection 2021-03-01 21:04:44 +01:00
f80b909c6e Badly implement mood pie charts 2021-03-01 18:05:14 +01:00
5582f15440 Handle empty database in mood template tags 2021-03-01 07:12:15 +01:00
ca56b250f7 Replace max time parameter by current time 2021-02-28 19:58:38 +01:00
5aa667a86f Fix moodstats call 2021-02-26 18:09:13 +01:00
8d75d9b342 Fix moodstats signature
Remove unused variables
Fix time selection for CSV
2021-02-26 07:38:17 +01:00
e7f0e07a99 Fix activitystats signature 2021-02-26 07:26:52 +01:00
040ffe0fb3 Add monthly and yearly activity counters 2021-02-25 15:33:28 +01:00
51ee9cd76f Add statistics to sidebar
Fix stupid mistake
2021-02-22 07:59:51 +01:00
e1078bbd4c Add rolling average to mood statistics chart
Add ordering clause to Status objects
2021-02-22 07:51:27 +01:00
2ffe276304 Make prettier 2021-02-21 21:03:34 +01:00
c2e384cf7a Adding activity output
Bug fixing
2021-02-21 20:59:39 +01:00
7301e2a401 Reworked statistics with HoloViews/Bokeh 2021-02-21 20:13:22 +01:00
67a6be0e3c Implement statistics in Javascript only to soon replace this with HoloViews 2021-02-21 11:24:25 +01:00
9a965de742 Fix mindless copy-paste programming 2021-02-17 05:55:04 +00:00
399be9aafc Rename meds to health
Add more health related models
Add activity categories
2021-02-16 12:15:56 +00:00
e4ec8200b7 Calculate average moods from average daily moods 2021-01-17 16:49:22 +01:00
178fa098f5 Fix file name display in status view 2021-01-06 14:03:13 +01:00
51dacb50e0 Fix upload paths for StatusMedia 2021-01-06 13:59:37 +01:00
5ea3562dd1 Display status media in status view 2021-01-04 11:34:05 +01:00
a1bdcda695 Updated StatusMedia model to match form signature 2021-01-04 11:28:24 +01:00
c7c1df13bb Make activities not required for mood status 2021-01-04 07:38:28 +01:00
a1505bed44 Filter out status entries that don't have a mood associated from average_mood 2021-01-01 21:46:38 +01:00
4784185e99 Add missing enctype to form with file uploads 2021-01-01 17:48:12 +01:00
c4f2479f4c Fix something that seemed to work anyway 2021-01-01 17:01:38 +01:00
4f26db7ace Fix copy-paste error 2021-01-01 16:55:45 +01:00
958f6e2c75 Fix silly mistake 2021-01-01 13:55:19 +01:00
57a22816a2 Catch potential division by zero 2020-12-30 12:07:40 +01:00
6230523f29 Fix wrong variable use 2020-12-29 19:25:05 +01:00
64a757b2de Implement Telegram notifications
Some refactoring
2020-12-29 17:26:48 +01:00
52d86d0bc6 Fix form validation for Status changes 2020-12-28 22:32:32 +01:00
b65c1fa42b Display line breaks in status view 2020-12-27 21:19:38 +01:00
e57bd452cb Initial commit 2020-12-27 18:49:54 +01:00