Implement all phases sequentially

This commit is contained in:
gpt-engineer-app[bot]
2025-10-21 12:18:38 +00:00
parent a05c1017d3
commit 1138eea024
10 changed files with 77 additions and 54 deletions

View File

@@ -105,7 +105,7 @@ export async function resolveConflicts(
async function linkToExistingEntity(itemId: string, entityId: string): Promise<void> {
await updateSubmissionItem(itemId, {
approved_entity_id: entityId,
status: 'approved',
status: 'approved' as const,
});
}
@@ -135,7 +135,7 @@ async function cascadeRejectDependents(
// Reject all collected dependents
for (const depId of toReject) {
await updateSubmissionItem(depId, {
status: 'rejected',
status: 'rejected' as const,
rejection_reason: 'Parent dependency was rejected',
});
}
@@ -152,7 +152,7 @@ async function escalateForAdminReview(
const { error } = await supabase
.from('content_submissions')
.update({
status: 'pending',
status: 'pending' as const,
escalation_reason: reason,
escalated_by: userId,
updated_at: new Date().toISOString(),