Add deletedAt timestamps to delete operations for better audit tracking

- Updated delete methods across hooks and components to include `deletedAt: System.timeStampInSeconds()`.
- Refactored synchronized delete logic to pass `deletedAt` for both offline and online states.
- Improved synchronization workflows to include `deletedAt` in server and IPC requests.
- Enhanced destructuring patterns for cleaner and more consistent request data.
This commit is contained in:
natreex
2026-02-09 17:12:03 -05:00
parent 209dc6f85a
commit 49bb6e06f5
14 changed files with 146 additions and 92 deletions

View File

@@ -275,10 +275,12 @@ export default function useSyncSeries() {
}
}
/**
* Refreshes the sync status of all series by comparing local and server data.
* Updates the context with the latest sync information.
*/
async function syncAllFromServer(): Promise<void> {
for (const diff of seriesToSyncFromServer) {
await syncFromServer(diff.id);
}
}
async function refreshSeries(): Promise<void> {
try {
let localSeriesResponse: SyncedSeries[] = [];
@@ -343,6 +345,7 @@ export default function useSyncSeries() {
syncFromServer,
syncToServer,
syncAllToServer,
syncAllFromServer,
refreshSeries,
localOnlySeries,
serverOnlySeries,