Commit graph

26 commits

Author SHA1 Message Date
d98aa34e14
fix: Fix timestamp filtering inconsistency
Corrects the timestamp comparison in the status filtering logic
by using the adjusted datetime object for accurate filtering,
ensuring list results reflect intended timestamp boundaries.
2024-11-28 18:35:45 +01:00
68acfc8875
fix: Fix mood count calculation and query formatting
Improves calculation of average mood by counting valid mood
entries (moodcount) separately, ensuring division occurs only
on valid mood data. Additionally, refines queryset management
for better readability and consistency, ensuring accurate date
range filters.

This change enhances data accuracy and code maintainability.
2024-11-28 16:59:31 +01:00
5b56eef878
feat: Add date range filtering to mood status view
Enhances `StatusListView` to support filtering based on
a date range by adding 'from' and 'to' query parameters.
This enables users to view status updates within a specified
date range, improving data accessibility.

Implements click event on calendar heatmap to redirect to
filtered mood page, supporting targeted data exploration.
2024-11-28 16:15:56 +01:00
3e4b68aa19
fix: Fixes date range query issue in heatmap view
Ensures that the end date includes the entire day by setting
the time to 23:59:59 when a specific end date is provided.
This avoids excluding entries from the last day in the range.
2024-11-28 15:35:08 +01:00
9ad7fe7595
feat: Enhances heatmap with tooltips and new JSON endpoint
Adds additional scripts for tooltips and legends in the heatmap,
enhancing data visualization and usability.

Refactors dashboard logic to dynamically fetch and render mood
data, allowing for more customized color scales and average
mood calculations.

Introduces a new API endpoint to provide mood value details,
necessary for proper heatmap rendering.

Improves the handling of mood data to compute averages for each
day, allowing for richer insights into mood patterns.
2024-11-28 15:01:13 +01:00
5dba14b378
fix: Use static() for script and style paths
Updates script and style paths to use Django's static() function
for better path resolution and management. This ensures that
the paths are correctly resolved relative to the static files
configuration, enhancing maintainability and reliability.
2024-11-21 07:47:17 +01:00
b6987bee69
fix: Refactors static file import path
Updates the import path for the static method to reflect
recent changes in Django's module structure, ensuring
compatibility with newer versions.

This change helps prevent deprecation issues under
up-to-date Django setups.
2024-11-21 07:34:09 +01:00
94c4fb650b
fix: Refactors views to use static for script paths
Changes hardcoded script URL paths to use Django's static function for better resource management and maintainability.

Improves code readability by breaking lines, adopting PEP 8 style guidelines.

Simplifies model imports and uses consistent string formatting for various UI elements.
2024-11-20 21:27:56 +01:00
bc8da6b1cc
fix: Refactors data aggregation for heatmap
Replaces count annotation with custom aggregation logic to
correctly count status entries per date in heatmap data.

Improves data processing by calculating occurrences manually.
Removes previous annotation and modifies output format.

This ensures data accuracy before encoding into JSON response.
2024-11-20 07:18:40 +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
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
2d09e25df3 Basic activity statistics 2021-03-03 08:39:26 +01:00
f80b909c6e Badly implement mood pie charts 2021-03-01 18:05:14 +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
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
51dacb50e0 Fix upload paths for StatusMedia 2021-01-06 13:59:37 +01:00
4f26db7ace Fix copy-paste error 2021-01-01 16:55:45 +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
e57bd452cb Initial commit 2020-12-27 18:49:54 +01:00