Q161: the home page measures accepted work, not sessions that merely ended
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c9117fe46d
commit
58871fbaed
15 files changed
+183
-17
No files matched your search
@@ -0,0 +1,9 @@
|
||||
import type { DatabaseSync } from "node:sqlite";
|
||||
import { createId } from "../../shared/ids";
|
||||
|
||||
/** Records a verdict on a plain task (one the system did not create for itself); internal vehicles are not work. */
|
||||
export function recordWorkVerdict(db: DatabaseSync, input: { orgId: string; taskId: string; origin: string | null; verdict: "accepted" | "returned" }): void {
|
||||
if (input.origin !== null) return;
|
||||
db.prepare("insert into work_verdicts(id, org_id, task_id, verdict, at) values (?, ?, ?, ?, ?)")
|
||||
.run(createId("wv"), input.orgId, input.taskId, input.verdict, new Date().toISOString());
|
||||
}
|
||||
Reference in new issue
Block a user