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

@@ -58,7 +58,7 @@ export default function SeriesSettingSidebar(
async function handleDeleteSeries(): Promise<void> {
try {
const deleteData = {seriesId: seriesId};
const deleteData = {seriesId: seriesId, deletedAt: System.timeStampInSeconds()};
let success: boolean;
if (isCurrentlyOffline() || localSeries) {

View File

@@ -174,7 +174,8 @@ function SeriesBooksManager(props: object, ref: React.Ref<{ handleSave: () => Pr
try {
const removeData = {
seriesId: seriesId,
bookId: bookId
bookId: bookId,
deletedAt: System.timeStampInSeconds(),
};
let response: boolean;