mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-20 15:51:12 -05:00
Refactor versioning utility functions
This commit is contained in:
@@ -372,8 +372,11 @@ export function useModerationQueueManager(config: ModerationQueueManagerConfig):
|
||||
|
||||
toast({
|
||||
title: `Content ${action}`,
|
||||
description: `The ${item.type} has been ${action}`,
|
||||
description: `The ${item.type} has been ${action}. Version history updated.`,
|
||||
});
|
||||
|
||||
// Refresh stats to update counts
|
||||
queue.refreshStats();
|
||||
} catch (error: any) {
|
||||
console.error("Error moderating content:", error);
|
||||
|
||||
@@ -415,10 +418,13 @@ export function useModerationQueueManager(config: ModerationQueueManagerConfig):
|
||||
|
||||
if (error) throw error;
|
||||
|
||||
toast({
|
||||
title: "Submission deleted",
|
||||
description: "The submission has been permanently deleted",
|
||||
});
|
||||
toast({
|
||||
title: "Submission deleted",
|
||||
description: "The submission has been permanently deleted",
|
||||
});
|
||||
|
||||
// Refresh stats to update counts
|
||||
queue.refreshStats();
|
||||
} catch (error: any) {
|
||||
console.error("Error deleting submission:", error);
|
||||
|
||||
@@ -454,6 +460,9 @@ export function useModerationQueueManager(config: ModerationQueueManagerConfig):
|
||||
title: "Reset Complete",
|
||||
description: "Submission and all items have been reset to pending status",
|
||||
});
|
||||
|
||||
// Refresh stats to update counts
|
||||
queue.refreshStats();
|
||||
|
||||
setItems((prev) => prev.filter((i) => i.id !== item.id));
|
||||
} catch (error: any) {
|
||||
@@ -516,6 +525,9 @@ export function useModerationQueueManager(config: ModerationQueueManagerConfig):
|
||||
title: "Retry Complete",
|
||||
description: `Processed ${failedItems.length} failed item(s)`,
|
||||
});
|
||||
|
||||
// Refresh stats to update counts
|
||||
queue.refreshStats();
|
||||
} catch (error: any) {
|
||||
console.error("Error retrying failed items:", error);
|
||||
toast({
|
||||
|
||||
Reference in New Issue
Block a user