Added tasks, reminders, and role-specific dashboards

This commit is contained in:
Oleksandr Prokhorenko
2026-09-24 22:18:41 +03:00
parent 1f8721e742
commit 9ccbac4aca
33 changed files with 2583 additions and 511 deletions
+8 -5
View File
@@ -125,7 +125,7 @@ for (const [account, total] of [
merchantId: { in: ids },
...(account === 'compliance'
? { kind: 'COMPLIANCE', assigneeId: 'user-compliance' }
: {}),
: { kind: 'COMMERCIAL' }),
},
}),
);
@@ -151,7 +151,7 @@ for (const [account, total] of [
merchantId: { in: ids },
...(account === 'compliance'
? { kind: 'COMPLIANCE', assigneeId: 'user-compliance' }
: {}),
: { kind: 'COMMERCIAL' }),
status: 'OPEN',
dueAt: { lt: new Date() },
},
@@ -775,7 +775,7 @@ test('reassignment transfers open commercial tasks; concurrent writes and former
);
const before = await get();
assert.equal((await get(comp)).tasks.length, 1);
const personal = before.tasks.find((t) => t.kind === 'COMPLIANCE');
const personal = (await get(comp)).tasks.find((t) => t.kind === 'COMPLIANCE');
assert.equal(
(
await mutate(`/merchants/${id}/tasks/${personal.id}`, head, {
@@ -783,7 +783,7 @@ test('reassignment transfers open commercial tasks; concurrent writes and former
version: before.version,
})
).status,
403,
404,
);
const commercial = before.tasks.find((t) => t.kind === 'COMMERCIAL');
assert.equal(
@@ -828,7 +828,10 @@ test('reassignment transfers open commercial tasks; concurrent writes and former
.filter((t) => t.status === 'DONE')
.every((t) => t.assignee.id === 'user-manager1'),
);
assert.equal(after.tasks.find((t) => t.kind === 'COMPLIANCE').assignee.id, 'user-compliance');
assert.equal(
(await get(comp)).tasks.find((t) => t.kind === 'COMPLIANCE').assignee.id,
'user-compliance',
);
assert.equal((await request(`/merchants/${id}`, alex)).status, 404);
assert.equal(
(