feat: Add client count tracking and cleanup for custom field definitions

- Add count_clients_with_value() method to CustomFieldDefinition model to track how many clients have values for each custom field

- Display client count in custom field definitions list view

- Automatically remove custom field values from all clients when a custom field definition is deleted

- Show user-friendly confirmation message indicating how many clients were affected when deleting a field definition

- Update client view to use custom field definitions for friendly field names instead of raw field keys

- Add comprehensive test suite for custom field definitions including model creation, client count functionality, deletion cleanup, and edge cases

- Update templates to display client counts and improve delete confirmation dialogs
This commit is contained in:
Dries Peeters
2025-12-01 18:48:38 +01:00
parent c71d444756
commit 2bd48d9e60
8 changed files with 405 additions and 28 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ from setuptools import setup, find_packages
setup(
name='timetracker',
version='4.3.0',
version='4.3.1',
packages=find_packages(),
include_package_data=True,
install_requires=[