datestuff

This commit is contained in:
lubiana 2025-07-25 16:27:30 +02:00
parent 1a6d7291c4
commit e11dd4ed1f
Signed by: lubiana
SSH key fingerprint: SHA256:vW1EA0fRR3Fw+dD/sM0K+x3Il2gSry6YRYHqOeQwrfk
5 changed files with 326 additions and 27 deletions

View file

@ -12,6 +12,8 @@ persistence.
- Item locking mechanism to prevent conflicts
- Hierarchical items (parent-child relationships)
- **Item dependencies: Define prerequisites for completing items**
- **Date constraints: Set "not before" and "not after" times for item
completion**
- SQLite database for data persistence
- **Modern web frontend with React and TypeScript**
- **Real-time updates across multiple browser tabs/windows**
@ -295,7 +297,9 @@ All API endpoints return JSON responses with a consistent format:
"checked": false,
"parent_id": null,
"checklist_uuid": "123e4567-e89b-12d3-a456-426614174000",
"dependencies": []
"dependencies": [],
"not_before": "2025-07-25T16:20:00Z",
"not_after": "2025-07-25T18:00:00Z"
}
}
```
@ -312,7 +316,9 @@ All API endpoints return JSON responses with a consistent format:
"checked": true,
"parent_id": null,
"checklist_uuid": "123e4567-e89b-12d3-a456-426614174000",
"dependencies": [2, 3]
"dependencies": [2, 3],
"not_before": "2025-07-25T16:20:00Z",
"not_after": "2025-07-25T18:00:00Z"
}
}
```
@ -352,7 +358,9 @@ All API endpoints return JSON responses with a consistent format:
"checked": false,
"parent_id": null,
"checklist_uuid": "123e4567-e89b-12d3-a456-426614174000",
"dependencies": []
"dependencies": [],
"not_before": null,
"not_after": null
},
{
"id": 2,
@ -360,7 +368,9 @@ All API endpoints return JSON responses with a consistent format:
"checked": true,
"parent_id": null,
"checklist_uuid": "123e4567-e89b-12d3-a456-426614174000",
"dependencies": [1]
"dependencies": [1],
"not_before": "2025-07-25T16:20:00Z",
"not_after": null
}
]
}
@ -376,7 +386,8 @@ All API endpoints return JSON responses with a consistent format:
The application uses SQLite with the following schema:
- `checklist_info` table: Stores checklist metadata (uuid, name)
- `items` table: Stores checklist items with hierarchical relationships
- `items` table: Stores checklist items with hierarchical relationships and date
constraints
- `dependencies` table: Stores item dependencies (item_id, dependency_id)
## Real-time Features
@ -422,6 +433,47 @@ that must be completed before an item can be marked as done.
- **Clear Feedback**: Users see exactly which items need to be completed first
- **Error Prevention**: System prevents circular dependencies automatically
## Item Date Constraints
The application supports date constraints, allowing you to set time windows when
items can be completed.
### How Date Constraints Work
- **Not Before**: Set the earliest time an item can be completed
- **Not After**: Set the latest time an item can be completed
- **Validation**: Items cannot be completed outside their allowed time window
- **Visual Indicators**: Items show date constraint status with color-coded
indicators
- **Real-time Updates**: Constraint status updates in real-time
### Managing Date Constraints
1. **Set Constraints**: Click the clock icon (🕐) on any item to open the date
constraint manager
2. **Configure Times**: Set "not before" and/or "not after" times
3. **Visual Feedback**: Items show constraint status:
- 🟢 Green: Time constraints met (shows "Ready")
- 🔴 Red: Time constraints not met (shows "Time locked")
4. **Completion Prevention**: Items cannot be checked off outside their time
window
### Date Constraint Features
- **Flexible Scheduling**: Set any combination of start and end times
- **ISO 8601 Format**: Uses standard datetime format for precision
- **Real-time Validation**: Constraint status updates immediately
- **Clear Feedback**: Users see exactly when items can be completed
- **Error Prevention**: System prevents completion outside allowed times
### Example Use Cases
- **Meeting Preparation**: Set items to be completed before a meeting starts
- **Deadline Management**: Set items to be completed by a specific deadline
- **Time-sensitive Tasks**: Ensure tasks are completed within business hours
- **Sequential Workflows**: Use in combination with dependencies for complex
workflows
## Development
### Local Development