fix: report Version Status shows work state only, billing leak collapsed to approved

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Krao Hasanee
2026-06-09 23:24:37 -05:00
parent 1cbf06a6c0
commit 12c9a1a093
+5 -1
View File
@@ -33,7 +33,11 @@ function versionStateFor(task, versionNumber) {
const currentVersion = Number(task?.current_version || 0); const currentVersion = Number(task?.current_version || 0);
const version = Number(versionNumber || 0); const version = Number(versionNumber || 0);
if (version < currentVersion) return 'completed'; if (version < currentVersion) return 'completed';
return task?.status || 'not_started'; const status = task?.status || 'not_started';
// invoiced/paid are billing states (legacy leak) — collapse to the work state
// they imply. Billing is shown separately in the Billing column.
if (status === 'invoiced' || status === 'paid') return 'client_approved';
return status;
} }
function rowSort(a, b) { function rowSort(a, b) {