@things-factory/worklist 10.1.261 → 10.1.262
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-client/components/source-link.d.ts +14 -0
- package/dist-client/components/source-link.js +32 -0
- package/dist-client/components/source-link.js.map +1 -0
- package/dist-client/pages/activity-approval/activity-approval-page.js +3 -0
- package/dist-client/pages/activity-approval/activity-approval-page.js.map +1 -1
- package/dist-client/pages/activity-thread/activity-thread-page.js +4 -12
- package/dist-client/pages/activity-thread/activity-thread-page.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/controllers/activity-instance/hand-out.d.ts +23 -0
- package/dist-server/controllers/activity-instance/hand-out.js +21 -0
- package/dist-server/controllers/activity-instance/hand-out.js.map +1 -0
- package/dist-server/controllers/activity-instance/index.d.ts +1 -0
- package/dist-server/controllers/activity-instance/index.js +1 -0
- package/dist-server/controllers/activity-instance/index.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +12 -12
- package/tests/hand-out-db.test.ts +75 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { User } from '@things-factory/auth-base';
|
|
2
|
+
import { ActivityInstance } from '../../service/activity-instance/activity-instance.js';
|
|
3
|
+
export interface HandOut {
|
|
4
|
+
/** The activity it is a case of - an application installs it. */
|
|
5
|
+
activityId: string;
|
|
6
|
+
/** 「<과정> 수강」, 「성희롱 예방교육 이수 — 2026」 - what the to-do says. */
|
|
7
|
+
name: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
input?: Record<string, any>;
|
|
10
|
+
/** The one it is for. */
|
|
11
|
+
assignee: User;
|
|
12
|
+
dueAt?: Date;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Hands one person a to-do of a module's own - a course to take, a legal training, this week's report - that nobody put
|
|
16
|
+
* up as a request. The case has no creator: it is the person's 할 일 and nobody's 상신함, the one who set it off
|
|
17
|
+
* included when they hand it to themselves (a manager assigning a course to the whole company). Issued as its own
|
|
18
|
+
* assignee, the case went to the person's 상신함 and never to their 할 일 (2026-11-08).
|
|
19
|
+
*
|
|
20
|
+
* `context.state.user` is who set it off - the manager who assigned the course, or the person whose turn came - and
|
|
21
|
+
* stands as the issuer.
|
|
22
|
+
*/
|
|
23
|
+
export declare function handOut(todo: HandOut, context: ResolverContext): Promise<ActivityInstance>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.handOut = handOut;
|
|
4
|
+
const assign_js_1 = require("./assign.js");
|
|
5
|
+
const issue_js_1 = require("./issue.js");
|
|
6
|
+
/**
|
|
7
|
+
* Hands one person a to-do of a module's own - a course to take, a legal training, this week's report - that nobody put
|
|
8
|
+
* up as a request. The case has no creator: it is the person's 할 일 and nobody's 상신함, the one who set it off
|
|
9
|
+
* included when they hand it to themselves (a manager assigning a course to the whole company). Issued as its own
|
|
10
|
+
* assignee, the case went to the person's 상신함 and never to their 할 일 (2026-11-08).
|
|
11
|
+
*
|
|
12
|
+
* `context.state.user` is who set it off - the manager who assigned the course, or the person whose turn came - and
|
|
13
|
+
* stands as the issuer.
|
|
14
|
+
*/
|
|
15
|
+
async function handOut(todo, context) {
|
|
16
|
+
const { activityId, name, description, input, assignee, dueAt } = todo;
|
|
17
|
+
const instance = await (0, issue_js_1.issue)({ name, description: description ?? name, activityId, input, assignees: [], threadsMin: 0, dueAt, creator: null }, context);
|
|
18
|
+
await (0, assign_js_1.assign)({ id: instance.id, assignees: [assignee.email], dueAt, reason: name }, context);
|
|
19
|
+
return instance;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=hand-out.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hand-out.js","sourceRoot":"","sources":["../../../server/controllers/activity-instance/hand-out.ts"],"names":[],"mappings":";;AA2BA,0BAKC;AA7BD,2CAAoC;AACpC,yCAAkC;AAclC;;;;;;;;GAQG;AACI,KAAK,UAAU,OAAO,CAAC,IAAa,EAAE,OAAwB;IACnE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,IAAI,CAAA;IACtE,MAAM,QAAQ,GAAG,MAAM,IAAA,gBAAK,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,IAAI,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAS,EAAE,OAAO,CAAC,CAAA;IAC/J,MAAM,IAAA,kBAAM,EAAC,EAAE,EAAE,EAAE,QAAQ,CAAC,EAAE,EAAE,SAAS,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;IAC5F,OAAO,QAAQ,CAAA;AACjB,CAAC","sourcesContent":["import { User } from '@things-factory/auth-base'\n\nimport { ActivityInstance } from '../../service/activity-instance/activity-instance.js'\nimport { assign } from './assign.js'\nimport { issue } from './issue.js'\n\nexport interface HandOut {\n /** The activity it is a case of - an application installs it. */\n activityId: string\n /** 「<과정> 수강」, 「성희롱 예방교육 이수 — 2026」 - what the to-do says. */\n name: string\n description?: string\n input?: Record<string, any>\n /** The one it is for. */\n assignee: User\n dueAt?: Date\n}\n\n/**\n * Hands one person a to-do of a module's own - a course to take, a legal training, this week's report - that nobody put\n * up as a request. The case has no creator: it is the person's 할 일 and nobody's 상신함, the one who set it off\n * included when they hand it to themselves (a manager assigning a course to the whole company). Issued as its own\n * assignee, the case went to the person's 상신함 and never to their 할 일 (2026-11-08).\n *\n * `context.state.user` is who set it off - the manager who assigned the course, or the person whose turn came - and\n * stands as the issuer.\n */\nexport async function handOut(todo: HandOut, context: ResolverContext): Promise<ActivityInstance> {\n const { activityId, name, description, input, assignee, dueAt } = todo\n const instance = await issue({ name, description: description ?? name, activityId, input, assignees: [], threadsMin: 0, dueAt, creator: null } as any, context)\n await assign({ id: instance.id, assignees: [assignee.email], dueAt, reason: name }, context)\n return instance\n}\n"]}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./draft.js"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./issue.js"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./hand-out.js"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./pick.js"), exports);
|
|
7
8
|
tslib_1.__exportStar(require("./assign.js"), exports);
|
|
8
9
|
tslib_1.__exportStar(require("./abort.js"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/controllers/activity-instance/index.ts"],"names":[],"mappings":";;;AAAA,qDAA0B;AAC1B,qDAA0B;AAC1B,oDAAyB;AACzB,sDAA2B;AAC3B,qDAA0B;AAC1B,mDAAwB;AACxB,wDAA6B","sourcesContent":["export * from './draft.js'\nexport * from './issue.js'\nexport * from './pick.js'\nexport * from './assign.js'\nexport * from './abort.js'\nexport * from './end.js'\nexport * from './complete.js'\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/controllers/activity-instance/index.ts"],"names":[],"mappings":";;;AAAA,qDAA0B;AAC1B,qDAA0B;AAC1B,wDAA6B;AAC7B,oDAAyB;AACzB,sDAA2B;AAC3B,qDAA0B;AAC1B,mDAAwB;AACxB,wDAA6B","sourcesContent":["export * from './draft.js'\nexport * from './issue.js'\nexport * from './hand-out.js'\nexport * from './pick.js'\nexport * from './assign.js'\nexport * from './abort.js'\nexport * from './end.js'\nexport * from './complete.js'\n"]}
|