@elaraai/e3-ui 1.0.93 → 1.0.95
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/src/allocation/adapters.d.ts +159 -0
- package/dist/src/allocation/adapters.d.ts.map +1 -0
- package/dist/src/allocation/adapters.js +241 -0
- package/dist/src/allocation/adapters.js.map +1 -0
- package/dist/src/allocation/functions.d.ts +664 -0
- package/dist/src/allocation/functions.d.ts.map +1 -0
- package/dist/src/allocation/functions.js +782 -0
- package/dist/src/allocation/functions.js.map +1 -0
- package/dist/src/allocation/index.d.ts +2985 -0
- package/dist/src/allocation/index.d.ts.map +1 -0
- package/dist/src/allocation/index.js +499 -0
- package/dist/src/allocation/index.js.map +1 -0
- package/dist/src/allocation/types.d.ts +832 -0
- package/dist/src/allocation/types.d.ts.map +1 -0
- package/dist/src/allocation/types.js +360 -0
- package/dist/src/allocation/types.js.map +1 -0
- package/dist/src/bind/func.d.ts +14 -0
- package/dist/src/bind/func.d.ts.map +1 -1
- package/dist/src/bind/func.js +22 -1
- package/dist/src/bind/func.js.map +1 -1
- package/dist/src/calendar/index.d.ts +510 -1639
- package/dist/src/calendar/index.d.ts.map +1 -1
- package/dist/src/calendar/index.js +56 -29
- package/dist/src/calendar/index.js.map +1 -1
- package/dist/src/flowchart/canvas.d.ts +9 -21
- package/dist/src/flowchart/canvas.d.ts.map +1 -1
- package/dist/src/flowchart/canvas.js +10 -22
- package/dist/src/flowchart/canvas.js.map +1 -1
- package/dist/src/flowchart/flowchart.d.ts +19 -13
- package/dist/src/flowchart/flowchart.d.ts.map +1 -1
- package/dist/src/flowchart/flowchart.js.map +1 -1
- package/dist/src/flowchart/index.d.ts +44 -21
- package/dist/src/flowchart/index.d.ts.map +1 -1
- package/dist/src/flowchart/index.js +43 -20
- package/dist/src/flowchart/index.js.map +1 -1
- package/dist/src/flowchart/library.d.ts +166 -81
- package/dist/src/flowchart/library.d.ts.map +1 -1
- package/dist/src/flowchart/library.js +232 -105
- package/dist/src/flowchart/library.js.map +1 -1
- package/dist/src/flowchart/over.d.ts +9 -16
- package/dist/src/flowchart/over.d.ts.map +1 -1
- package/dist/src/flowchart/over.js +9 -16
- package/dist/src/flowchart/over.js.map +1 -1
- package/dist/src/flowchart/payload.d.ts +710 -508
- package/dist/src/flowchart/payload.d.ts.map +1 -1
- package/dist/src/flowchart/payload.js +128 -74
- package/dist/src/flowchart/payload.js.map +1 -1
- package/dist/src/flowchart/window.d.ts +132 -347
- package/dist/src/flowchart/window.d.ts.map +1 -1
- package/dist/src/flowchart/window.js +48 -55
- package/dist/src/flowchart/window.js.map +1 -1
- package/dist/src/index.d.ts +11 -7
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +14 -6
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal.d.ts +18 -7
- package/dist/src/internal.d.ts.map +1 -1
- package/dist/src/internal.js +28 -9
- package/dist/src/internal.js.map +1 -1
- package/dist/src/plan/event-rows.d.ts +26 -10
- package/dist/src/plan/event-rows.d.ts.map +1 -1
- package/dist/src/plan/event-rows.js +39 -13
- package/dist/src/plan/event-rows.js.map +1 -1
- package/dist/src/plan/ir.d.ts +244 -815
- package/dist/src/plan/ir.d.ts.map +1 -1
- package/dist/src/plan/ir.js +8 -6
- package/dist/src/plan/ir.js.map +1 -1
- package/dist/src/plan/library.d.ts +3 -0
- package/dist/src/plan/library.d.ts.map +1 -1
- package/dist/src/plan/library.js +1 -1
- package/dist/src/plan/library.js.map +1 -1
- package/dist/src/plan/ordered-source.d.ts +1 -0
- package/dist/src/plan/ordered-source.d.ts.map +1 -1
- package/dist/src/plan/plan.d.ts +559 -1667
- package/dist/src/plan/plan.d.ts.map +1 -1
- package/dist/src/plan/plan.js +123 -45
- package/dist/src/plan/plan.js.map +1 -1
- package/dist/src/plan/root.d.ts +16 -20
- package/dist/src/plan/root.d.ts.map +1 -1
- package/dist/src/plan/root.js +23 -33
- package/dist/src/plan/root.js.map +1 -1
- package/dist/src/roster/coverage.d.ts +17 -231
- package/dist/src/roster/coverage.d.ts.map +1 -1
- package/dist/src/roster/coverage.js +94 -90
- package/dist/src/roster/coverage.js.map +1 -1
- package/dist/src/roster/fit.d.ts +59 -0
- package/dist/src/roster/fit.d.ts.map +1 -0
- package/dist/src/roster/fit.js +155 -0
- package/dist/src/roster/fit.js.map +1 -0
- package/dist/src/roster/index.d.ts +2862 -3662
- package/dist/src/roster/index.d.ts.map +1 -1
- package/dist/src/roster/index.js +383 -81
- package/dist/src/roster/index.js.map +1 -1
- package/dist/src/roster/library.d.ts +37 -92
- package/dist/src/roster/library.d.ts.map +1 -1
- package/dist/src/roster/library.js +25 -64
- package/dist/src/roster/library.js.map +1 -1
- package/dist/src/roster/lists.d.ts +195 -0
- package/dist/src/roster/lists.d.ts.map +1 -0
- package/dist/src/roster/lists.js +233 -0
- package/dist/src/roster/lists.js.map +1 -0
- package/dist/src/roster/rules.d.ts +17 -260
- package/dist/src/roster/rules.d.ts.map +1 -1
- package/dist/src/roster/rules.js +135 -132
- package/dist/src/roster/rules.js.map +1 -1
- package/dist/src/roster/targets.d.ts +115 -0
- package/dist/src/roster/targets.d.ts.map +1 -0
- package/dist/src/roster/targets.js +213 -0
- package/dist/src/roster/targets.js.map +1 -0
- package/dist/src/roster/times.d.ts +251 -0
- package/dist/src/roster/times.d.ts.map +1 -0
- package/dist/src/roster/times.js +174 -0
- package/dist/src/roster/times.js.map +1 -0
- package/dist/src/roster/types.d.ts +828 -183
- package/dist/src/roster/types.d.ts.map +1 -1
- package/dist/src/roster/types.js +224 -97
- package/dist/src/roster/types.js.map +1 -1
- package/dist/src/schedule/accessor.d.ts +28 -0
- package/dist/src/schedule/accessor.d.ts.map +1 -0
- package/dist/src/schedule/accessor.js +39 -0
- package/dist/src/schedule/accessor.js.map +1 -0
- package/dist/src/schedule/events.d.ts +170 -42
- package/dist/src/schedule/events.d.ts.map +1 -1
- package/dist/src/schedule/events.js +431 -171
- package/dist/src/schedule/events.js.map +1 -1
- package/dist/src/schedule/index.d.ts +41 -4
- package/dist/src/schedule/index.d.ts.map +1 -1
- package/dist/src/schedule/index.js +35 -3
- package/dist/src/schedule/index.js.map +1 -1
- package/dist/src/schedule/library.d.ts +13 -3
- package/dist/src/schedule/library.d.ts.map +1 -1
- package/dist/src/schedule/library.js +11 -4
- package/dist/src/schedule/library.js.map +1 -1
- package/dist/src/schedule/periods.d.ts +115 -0
- package/dist/src/schedule/periods.d.ts.map +1 -0
- package/dist/src/schedule/periods.js +215 -0
- package/dist/src/schedule/periods.js.map +1 -0
- package/dist/src/schedule/record-window.d.ts +25 -3
- package/dist/src/schedule/record-window.d.ts.map +1 -1
- package/dist/src/schedule/record-window.js +31 -18
- package/dist/src/schedule/record-window.js.map +1 -1
- package/dist/src/schedule/resources.d.ts +82 -4
- package/dist/src/schedule/resources.d.ts.map +1 -1
- package/dist/src/schedule/resources.js +44 -14
- package/dist/src/schedule/resources.js.map +1 -1
- package/dist/src/schedule/session.d.ts +69 -0
- package/dist/src/schedule/session.d.ts.map +1 -0
- package/dist/src/schedule/session.js +121 -0
- package/dist/src/schedule/session.js.map +1 -0
- package/dist/src/schedule/templates.d.ts +14 -2
- package/dist/src/schedule/templates.d.ts.map +1 -1
- package/dist/src/schedule/templates.js +5 -3
- package/dist/src/schedule/templates.js.map +1 -1
- package/dist/src/schedule/types.d.ts +1671 -37
- package/dist/src/schedule/types.d.ts.map +1 -1
- package/dist/src/schedule/types.js +196 -5
- package/dist/src/schedule/types.js.map +1 -1
- package/dist/src/schedule/window.d.ts +14 -0
- package/dist/src/schedule/window.d.ts.map +1 -1
- package/dist/src/schedule/window.js +14 -4
- package/dist/src/schedule/window.js.map +1 -1
- package/dist/src/schedule/words.d.ts +22 -0
- package/dist/src/schedule/words.d.ts.map +1 -0
- package/dist/src/schedule/words.js +25 -0
- package/dist/src/schedule/words.js.map +1 -0
- package/dist/src/sheet/index.d.ts +61 -27
- package/dist/src/sheet/index.d.ts.map +1 -1
- package/dist/src/sheet/index.js +59 -25
- package/dist/src/sheet/index.js.map +1 -1
- package/dist/src/sheet/library.d.ts +21 -3
- package/dist/src/sheet/library.d.ts.map +1 -1
- package/dist/src/sheet/library.js +23 -6
- package/dist/src/sheet/library.js.map +1 -1
- package/dist/src/sheet/registers.d.ts +100 -85
- package/dist/src/sheet/registers.d.ts.map +1 -1
- package/dist/src/sheet/registers.js +100 -85
- package/dist/src/sheet/registers.js.map +1 -1
- package/dist/src/sheet/root.d.ts +8 -12
- package/dist/src/sheet/root.d.ts.map +1 -1
- package/dist/src/sheet/root.js +6 -40
- package/dist/src/sheet/root.js.map +1 -1
- package/dist/src/sheet/sheet.d.ts +598 -2349
- package/dist/src/sheet/sheet.d.ts.map +1 -1
- package/dist/src/sheet/sheet.js +124 -37
- package/dist/src/sheet/sheet.js.map +1 -1
- package/dist/src/sheet/sub-rows.d.ts +74 -28
- package/dist/src/sheet/sub-rows.d.ts.map +1 -1
- package/dist/src/sheet/sub-rows.js +74 -28
- package/dist/src/sheet/sub-rows.js.map +1 -1
- package/dist/src/sheet/templates.d.ts +98 -34
- package/dist/src/sheet/templates.d.ts.map +1 -1
- package/dist/src/sheet/templates.js +102 -58
- package/dist/src/sheet/templates.js.map +1 -1
- package/dist/src/sheet/types.d.ts +289 -1359
- package/dist/src/sheet/types.d.ts.map +1 -1
- package/dist/src/sheet/types.js +20 -26
- package/dist/src/sheet/types.js.map +1 -1
- package/dist/src/sheet/views.d.ts +10 -11
- package/dist/src/sheet/views.d.ts.map +1 -1
- package/dist/src/sheet/views.js +15 -20
- package/dist/src/sheet/views.js.map +1 -1
- package/dist/src/{roster/visibility.d.ts → utils/key-visibility.d.ts} +42 -7
- package/dist/src/utils/key-visibility.d.ts.map +1 -0
- package/dist/src/utils/key-visibility.js +36 -0
- package/dist/src/utils/key-visibility.js.map +1 -0
- package/dist/src/utils/ordered-source.d.ts +1 -0
- package/dist/src/utils/ordered-source.d.ts.map +1 -1
- package/dist/src/utils/ordered-source.js +8 -3
- package/dist/src/utils/ordered-source.js.map +1 -1
- package/dist/src/utils/record-sources.d.ts +107 -0
- package/dist/src/utils/record-sources.d.ts.map +1 -0
- package/dist/src/utils/record-sources.js +132 -0
- package/dist/src/utils/record-sources.js.map +1 -0
- package/dist/test/allocation/allocation.examples.d.ts +2902 -0
- package/dist/test/allocation/allocation.examples.d.ts.map +1 -0
- package/dist/test/allocation/allocation.examples.js +643 -0
- package/dist/test/allocation/allocation.examples.js.map +1 -0
- package/dist/test/allocation/fit.examples.d.ts +546 -0
- package/dist/test/allocation/fit.examples.d.ts.map +1 -0
- package/dist/test/allocation/fit.examples.js +171 -0
- package/dist/test/allocation/fit.examples.js.map +1 -0
- package/dist/test/allocation/kiln-yard.d.ts +181 -0
- package/dist/test/allocation/kiln-yard.d.ts.map +1 -0
- package/dist/test/allocation/kiln-yard.js +228 -0
- package/dist/test/allocation/kiln-yard.js.map +1 -0
- package/dist/test/bind/data/data.examples.d.ts +651 -1
- package/dist/test/bind/data/data.examples.d.ts.map +1 -1
- package/dist/test/bind/data/data.examples.js +140 -2
- package/dist/test/bind/data/data.examples.js.map +1 -1
- package/dist/test/bind/func/func.examples.d.ts +10 -1
- package/dist/test/bind/func/func.examples.d.ts.map +1 -1
- package/dist/test/bind/func/func.examples.js +8 -1
- package/dist/test/bind/func/func.examples.js.map +1 -1
- package/dist/test/bind/record/record.examples.d.ts +633 -1
- package/dist/test/bind/record/record.examples.d.ts.map +1 -1
- package/dist/test/bind/record/record.examples.js +26 -2
- package/dist/test/bind/record/record.examples.js.map +1 -1
- package/dist/test/calendar/calendar-records.examples.d.ts.map +1 -1
- package/dist/test/calendar/calendar-records.examples.js +18 -14
- package/dist/test/calendar/calendar-records.examples.js.map +1 -1
- package/dist/test/calendar/calendar.examples.d.ts +521 -16
- package/dist/test/calendar/calendar.examples.d.ts.map +1 -1
- package/dist/test/calendar/calendar.examples.js +182 -135
- package/dist/test/calendar/calendar.examples.js.map +1 -1
- package/dist/test/examples-package.d.ts +75 -0
- package/dist/test/examples-package.d.ts.map +1 -0
- package/dist/test/examples-package.js +263 -0
- package/dist/test/examples-package.js.map +1 -0
- package/dist/test/flowchart/flowchart.examples.d.ts +211 -19
- package/dist/test/flowchart/flowchart.examples.d.ts.map +1 -1
- package/dist/test/flowchart/flowchart.examples.js +102 -75
- package/dist/test/flowchart/flowchart.examples.js.map +1 -1
- package/dist/test/plan/plan-events.examples.d.ts +1439 -209
- package/dist/test/plan/plan-events.examples.d.ts.map +1 -1
- package/dist/test/plan/plan-events.examples.js +199 -59
- package/dist/test/plan/plan-events.examples.js.map +1 -1
- package/dist/test/plan/plan-records.examples.d.ts +420 -0
- package/dist/test/plan/plan-records.examples.d.ts.map +1 -1
- package/dist/test/plan/plan-records.examples.js +70 -19
- package/dist/test/plan/plan-records.examples.js.map +1 -1
- package/dist/test/plan/plan-windows.examples.d.ts +636 -55
- package/dist/test/plan/plan-windows.examples.d.ts.map +1 -1
- package/dist/test/plan/plan-windows.examples.js +69 -33
- package/dist/test/plan/plan-windows.examples.js.map +1 -1
- package/dist/test/plan/plan.examples.d.ts +153 -31
- package/dist/test/plan/plan.examples.d.ts.map +1 -1
- package/dist/test/plan/plan.examples.js +178 -101
- package/dist/test/plan/plan.examples.js.map +1 -1
- package/dist/test/roster/domain.examples.d.ts +467 -250
- package/dist/test/roster/domain.examples.d.ts.map +1 -1
- package/dist/test/roster/domain.examples.js +92 -29
- package/dist/test/roster/domain.examples.js.map +1 -1
- package/dist/test/roster/roster-records.examples.d.ts +430 -586
- package/dist/test/roster/roster-records.examples.d.ts.map +1 -1
- package/dist/test/roster/roster-records.examples.js +102 -43
- package/dist/test/roster/roster-records.examples.js.map +1 -1
- package/dist/test/roster/roster.examples.d.ts +2319 -606
- package/dist/test/roster/roster.examples.d.ts.map +1 -1
- package/dist/test/roster/roster.examples.js +456 -148
- package/dist/test/roster/roster.examples.js.map +1 -1
- package/dist/test/roster/warehouse.d.ts +172 -63
- package/dist/test/roster/warehouse.d.ts.map +1 -1
- package/dist/test/roster/warehouse.js +172 -39
- package/dist/test/roster/warehouse.js.map +1 -1
- package/dist/test/schedule/schedule.examples.d.ts +3499 -0
- package/dist/test/schedule/schedule.examples.d.ts.map +1 -0
- package/dist/test/schedule/schedule.examples.js +192 -0
- package/dist/test/schedule/schedule.examples.js.map +1 -0
- package/dist/test/sheet/sheet-records.examples.d.ts.map +1 -1
- package/dist/test/sheet/sheet-records.examples.js +22 -18
- package/dist/test/sheet/sheet-records.examples.js.map +1 -1
- package/dist/test/sheet/sheet.examples.d.ts +715 -26
- package/dist/test/sheet/sheet.examples.d.ts.map +1 -1
- package/dist/test/sheet/sheet.examples.js +204 -130
- package/dist/test/sheet/sheet.examples.js.map +1 -1
- package/package.json +17 -10
- package/dist/src/roster/people.d.ts +0 -50
- package/dist/src/roster/people.d.ts.map +0 -1
- package/dist/src/roster/people.js +0 -32
- package/dist/src/roster/people.js.map +0 -1
- package/dist/src/roster/visibility.d.ts.map +0 -1
- package/dist/src/roster/visibility.js +0 -25
- package/dist/src/roster/visibility.js.map +0 -1
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
+
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* The lists the Roster reads over the app's own rows (#1368, `Builder
|
|
7
|
+
* Interfaces Spec.md` §5.2): its shifts, groups, positions, activities and
|
|
8
|
+
* proposals, each from a keyed record of the app's — usually its `read()` —
|
|
9
|
+
* through accessors, none of which writes the record. Each accessor is
|
|
10
|
+
* reified once and called per row (`shared/reify.ts`' rule), held to the type
|
|
11
|
+
* it returns; one returning another type is refused, naming the accessor and
|
|
12
|
+
* what it returns. The rows come in their `order`, lowest first, then in key
|
|
13
|
+
* order; with no `order`, in key order. Each row's key is its record's key.
|
|
14
|
+
*
|
|
15
|
+
* `Roster.shifts`, `groups`, `positions` and `proposals` are declarations the
|
|
16
|
+
* Roster's props take, which say what they are; `Roster.activities` is the
|
|
17
|
+
* activities themselves, which the app's own tasks may read too.
|
|
18
|
+
*
|
|
19
|
+
* @packageDocumentation
|
|
20
|
+
*/
|
|
21
|
+
import { ArrayType, BooleanType, DateTimeType, East, Expr, FloatType, IntegerType, OptionType, StringType, StructType, none, } from "@elaraai/east";
|
|
22
|
+
import { scheduleAccessor } from "../schedule/accessor.js";
|
|
23
|
+
import { ScheduleClockType } from "../schedule/types.js";
|
|
24
|
+
import { typeText } from "../schedule/window.js";
|
|
25
|
+
import { RosterGroupType, RosterPositionType, RosterProposalType, RosterShiftType, RosterSkillType } from "./types.js";
|
|
26
|
+
/** The key a Roster list's declaration carries what it is under. */
|
|
27
|
+
export const ROSTER_LIST = Symbol("Roster.list");
|
|
28
|
+
/**
|
|
29
|
+
* The app's rows a list reads, checked: a `Dict` keyed by String.
|
|
30
|
+
*
|
|
31
|
+
* @param where - The list, as its refusals name it (`Roster.shifts`)
|
|
32
|
+
* @param what - What its rows are (`shifts`)
|
|
33
|
+
* @param rows - The rows, as the app gave them
|
|
34
|
+
* @returns The rows and their row type
|
|
35
|
+
* @throws {Error} When they are not a Dict keyed by String
|
|
36
|
+
*/
|
|
37
|
+
function keyedRows(where, what, rows) {
|
|
38
|
+
const type = rows instanceof Expr ? Expr.type(rows) : undefined;
|
|
39
|
+
if (type === undefined || type.type !== "Dict" || type.key.type !== "String") {
|
|
40
|
+
throw new Error(`${where}: ${what} are a Dict keyed by String — a record's read() — and these are ${type === undefined ? "no East expression" : typeText(type)}`);
|
|
41
|
+
}
|
|
42
|
+
return { rows: rows, rowType: type.value };
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* A list's rows, each made by one reified East function, in their order: by
|
|
46
|
+
* `order`, lowest first, then by key — or, with no `order`, by key.
|
|
47
|
+
*
|
|
48
|
+
* @param rows - The app's rows, by key
|
|
49
|
+
* @param rowType - Their row type
|
|
50
|
+
* @param itemType - The list's row type
|
|
51
|
+
* @param item - Makes one of the list's rows from one of the app's and its key
|
|
52
|
+
* @param order - Where one shows, lowest first; `undefined` for none
|
|
53
|
+
* @returns The list
|
|
54
|
+
*/
|
|
55
|
+
function ordered(rows, rowType, itemType, item, order) {
|
|
56
|
+
if (order === undefined) {
|
|
57
|
+
return rows.toArray(($, row, key) => {
|
|
58
|
+
const make = $.const(item);
|
|
59
|
+
return make(row, key);
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
// Each row beside its rank, sorted by it: its order, then its key, so rows of one order keep the record's.
|
|
63
|
+
const Ranked = StructType({ rank: StructType({ order: IntegerType, key: StringType }), item: itemType });
|
|
64
|
+
const rank = East.function([rowType, StringType], Ranked, ($, row, key) => {
|
|
65
|
+
const make = $.const(item);
|
|
66
|
+
const orderOf = $.const(order);
|
|
67
|
+
return { rank: { order: orderOf(row, key), key }, item: make(row, key) };
|
|
68
|
+
});
|
|
69
|
+
const ranked = rows.toArray(($, row, key) => {
|
|
70
|
+
const ranking = $.const(rank);
|
|
71
|
+
return ranking(row, key);
|
|
72
|
+
});
|
|
73
|
+
return ranked.sort((_$, entry) => entry.rank).map((_$, entry) => entry.item);
|
|
74
|
+
}
|
|
75
|
+
/** An accessor reified over a list's rows, held to the type it returns, refused in the list's words. */
|
|
76
|
+
function accessorOf(where, rowType, prop, out, what, fn) {
|
|
77
|
+
if (fn === undefined)
|
|
78
|
+
return undefined;
|
|
79
|
+
return scheduleAccessor(rowType, StringType, out, fn, (returns) => `${where}: \`${prop}\` returns ${what} — and this one returns ${returns}`);
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Reads the app's shift rows as the Roster's shifts (see the module docs).
|
|
83
|
+
*
|
|
84
|
+
* @typeParam R - The app's shift row type
|
|
85
|
+
* @param rows - The shifts by String key, usually `Data.bind(record).read()`
|
|
86
|
+
* @param config - The label, code, start and hours accessors, and an optional order
|
|
87
|
+
* @returns The shifts, declared, for the Roster's `shifts`
|
|
88
|
+
* @throws {Error} When the rows are not a Dict keyed by String, or an accessor returns another type than it takes, naming what it returns
|
|
89
|
+
*/
|
|
90
|
+
export function rosterShifts(rows, config) {
|
|
91
|
+
const where = "Roster.shifts";
|
|
92
|
+
const { rows: held, rowType } = keyedRows(where, "shifts", rows);
|
|
93
|
+
const c = config;
|
|
94
|
+
const label = accessorOf(where, rowType, "label", StringType, "a String, a shift's name", c.label);
|
|
95
|
+
const code = accessorOf(where, rowType, "code", StringType, "a String, a shift's code", c.code);
|
|
96
|
+
const start = accessorOf(where, rowType, "start", ScheduleClockType, "a Schedule.Types.Clock, when a shift starts in UTC", c.start);
|
|
97
|
+
const hours = accessorOf(where, rowType, "hours", FloatType, "a Float, a shift's hours", c.hours);
|
|
98
|
+
const order = accessorOf(where, rowType, "order", IntegerType, "an Integer, where a shift shows", c.order);
|
|
99
|
+
const item = East.function([rowType, StringType], RosterShiftType, ($, row, key) => {
|
|
100
|
+
const labelOf = $.const(label);
|
|
101
|
+
const codeOf = $.const(code);
|
|
102
|
+
const startOf = $.const(start);
|
|
103
|
+
const hoursOf = $.const(hours);
|
|
104
|
+
return { key, label: labelOf(row, key), code: codeOf(row, key), start: startOf(row, key), hours: hoursOf(row, key) };
|
|
105
|
+
});
|
|
106
|
+
return { [ROSTER_LIST]: "shifts", rows: ordered(held, rowType, RosterShiftType, item, order) };
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Reads the app's group rows as the Roster's groups (see the module docs).
|
|
110
|
+
*
|
|
111
|
+
* @typeParam R - The app's group row type
|
|
112
|
+
* @param rows - The groups by String key, usually `Data.bind(record).read()`
|
|
113
|
+
* @param config - The label accessor, and an optional order
|
|
114
|
+
* @returns The groups, declared, for the Roster's `groups`
|
|
115
|
+
* @throws {Error} When the rows are not a Dict keyed by String, or an accessor returns another type than it takes, naming what it returns
|
|
116
|
+
*/
|
|
117
|
+
export function rosterGroups(rows, config) {
|
|
118
|
+
const where = "Roster.groups";
|
|
119
|
+
const { rows: held, rowType } = keyedRows(where, "groups", rows);
|
|
120
|
+
const c = config;
|
|
121
|
+
const label = accessorOf(where, rowType, "label", StringType, "a String, a group's name", c.label);
|
|
122
|
+
const order = accessorOf(where, rowType, "order", IntegerType, "an Integer, where a group shows", c.order);
|
|
123
|
+
const item = East.function([rowType, StringType], RosterGroupType, ($, row, key) => {
|
|
124
|
+
const labelOf = $.const(label);
|
|
125
|
+
return { key, label: labelOf(row, key) };
|
|
126
|
+
});
|
|
127
|
+
return { [ROSTER_LIST]: "groups", rows: ordered(held, rowType, RosterGroupType, item, order) };
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Reads the app's position rows as the Roster's positions (see the module
|
|
131
|
+
* docs).
|
|
132
|
+
*
|
|
133
|
+
* @typeParam R - The app's position row type
|
|
134
|
+
* @param rows - The positions by String key, usually `Data.bind(record).read()`
|
|
135
|
+
* @param config - The label, code and lead accessors, and an optional order
|
|
136
|
+
* @returns The positions, declared, for the Roster's `positions`
|
|
137
|
+
* @throws {Error} When the rows are not a Dict keyed by String, or an accessor returns another type than it takes, naming what it returns
|
|
138
|
+
*/
|
|
139
|
+
export function rosterPositions(rows, config) {
|
|
140
|
+
const where = "Roster.positions";
|
|
141
|
+
const { rows: held, rowType } = keyedRows(where, "positions", rows);
|
|
142
|
+
const c = config;
|
|
143
|
+
const label = accessorOf(where, rowType, "label", StringType, "a String, a position's name", c.label);
|
|
144
|
+
const code = accessorOf(where, rowType, "code", StringType, "a String, a position's badge", c.code);
|
|
145
|
+
const lead = accessorOf(where, rowType, "lead", BooleanType, "a Boolean, whether a position satisfies the lead rule", c.lead);
|
|
146
|
+
const order = accessorOf(where, rowType, "order", IntegerType, "an Integer, where a position shows", c.order);
|
|
147
|
+
const item = East.function([rowType, StringType], RosterPositionType, ($, row, key) => {
|
|
148
|
+
const labelOf = $.const(label);
|
|
149
|
+
const codeOf = $.const(code);
|
|
150
|
+
const leadOf = $.const(lead);
|
|
151
|
+
return { key, label: labelOf(row, key), code: codeOf(row, key), lead: leadOf(row, key) };
|
|
152
|
+
});
|
|
153
|
+
return { [ROSTER_LIST]: "positions", rows: ordered(held, rowType, RosterPositionType, item, order) };
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Reads the app's activity rows as the Roster's activities — each group's
|
|
157
|
+
* skills and the duties of none — without changing their identity or
|
|
158
|
+
* ownership (#1342, see the module docs).
|
|
159
|
+
*
|
|
160
|
+
* @typeParam A - The app's activity row type, commonly `Roster.Types.Activity`
|
|
161
|
+
* @param rows - Activities by String key, commonly `Data.bind(record).read()`
|
|
162
|
+
* @param config - The label accessor, and optional code, group and order ones
|
|
163
|
+
* @returns Resolved activities carrying their original record keys, in their order, else in the record's key order
|
|
164
|
+
* @remarks A group's skills are the activities of that group. Coverage and checks read every activity, whatever the slice shows; the Activities tab and the activity choices follow the slice's `activities` source.
|
|
165
|
+
* @throws {Error} When the rows are not a Dict keyed by String, or an accessor returns another type than it takes, naming what it returns
|
|
166
|
+
*/
|
|
167
|
+
export function rosterActivities(rows, config) {
|
|
168
|
+
const where = "Roster.activities";
|
|
169
|
+
const { rows: held, rowType } = keyedRows(where, "activities", rows);
|
|
170
|
+
const c = config;
|
|
171
|
+
const label = accessorOf(where, rowType, "label", StringType, "a String, an activity's name", c.label);
|
|
172
|
+
const code = accessorOf(where, rowType, "code", StringType, "a String, an activity's code", c.code);
|
|
173
|
+
const group = accessorOf(where, rowType, "group", OptionType(StringType), "an Option of a String, the group whose skill it is", c.group);
|
|
174
|
+
const order = accessorOf(where, rowType, "order", IntegerType, "an Integer, where an activity shows", c.order);
|
|
175
|
+
const item = East.function([rowType, StringType], RosterSkillType, ($, row, key) => {
|
|
176
|
+
const labelOf = $.const(label);
|
|
177
|
+
const codeOf = code === undefined ? undefined : $.const(code);
|
|
178
|
+
const groupOf = group === undefined ? undefined : $.const(group);
|
|
179
|
+
return {
|
|
180
|
+
key, label: labelOf(row, key),
|
|
181
|
+
code: codeOf === undefined ? "" : codeOf(row, key),
|
|
182
|
+
group: groupOf === undefined ? East.value(none, OptionType(StringType)) : groupOf(row, key),
|
|
183
|
+
};
|
|
184
|
+
});
|
|
185
|
+
return ordered(held, rowType, RosterSkillType, item, order);
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Reads the app's suggestion rows as the Roster's proposals: a person
|
|
189
|
+
* suggested for a slot, which a planner accepts as a duty or rejects (see the
|
|
190
|
+
* module docs).
|
|
191
|
+
*
|
|
192
|
+
* @typeParam R - The app's suggestion row type
|
|
193
|
+
* @param rows - The suggestions by String key, usually `Data.bind(record).read()`
|
|
194
|
+
* @param config - The person, day, group, shift and reason accessors
|
|
195
|
+
* @returns The proposals, declared, for the Roster's `proposals`, each keyed by its row's key, in key order
|
|
196
|
+
* @remarks A rejection keeps the proposal's key in its week's dismissed set (`Schedule.periods`' `dismissed`).
|
|
197
|
+
* @throws {Error} When the rows are not a Dict keyed by String, or an accessor returns another type than it takes, naming what it returns
|
|
198
|
+
*/
|
|
199
|
+
export function rosterProposals(rows, config) {
|
|
200
|
+
const where = "Roster.proposals";
|
|
201
|
+
const { rows: held, rowType } = keyedRows(where, "proposals", rows);
|
|
202
|
+
const c = config;
|
|
203
|
+
const person = accessorOf(where, rowType, "person", StringType, "a String, the key of the person suggested", c.person);
|
|
204
|
+
const day = accessorOf(where, rowType, "day", DateTimeType, "a DateTime, the day suggested", c.day);
|
|
205
|
+
const group = accessorOf(where, rowType, "group", StringType, "a String, the group suggested", c.group);
|
|
206
|
+
const shift = accessorOf(where, rowType, "shift", StringType, "a String, the shift suggested", c.shift);
|
|
207
|
+
const reason = accessorOf(where, rowType, "reason", StringType, "a String, why", c.reason);
|
|
208
|
+
const item = East.function([rowType, StringType], RosterProposalType, ($, row, key) => {
|
|
209
|
+
const personOf = $.const(person);
|
|
210
|
+
const dayOf = $.const(day);
|
|
211
|
+
const groupOf = $.const(group);
|
|
212
|
+
const shiftOf = $.const(shift);
|
|
213
|
+
const reasonOf = $.const(reason);
|
|
214
|
+
return {
|
|
215
|
+
key, day: dayOf(row, key), group: groupOf(row, key), shift: shiftOf(row, key),
|
|
216
|
+
person: personOf(row, key), reason: reasonOf(row, key),
|
|
217
|
+
};
|
|
218
|
+
});
|
|
219
|
+
return { [ROSTER_LIST]: "proposals", rows: ordered(held, rowType, RosterProposalType, item, undefined) };
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Whether a value is a Roster list of the kind given: what a Roster's prop
|
|
223
|
+
* checks before it takes one.
|
|
224
|
+
*
|
|
225
|
+
* @param value - What the app passed
|
|
226
|
+
* @param kind - The list's kind
|
|
227
|
+
* @returns Whether it is that list, declared
|
|
228
|
+
* @internal
|
|
229
|
+
*/
|
|
230
|
+
export function isRosterList(value, kind) {
|
|
231
|
+
return typeof value === "object" && value !== null && value[ROSTER_LIST] === kind;
|
|
232
|
+
}
|
|
233
|
+
//# sourceMappingURL=lists.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lists.js","sourceRoot":"","sources":["../../../src/roster/lists.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EACH,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,GAErH,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAEvH,oEAAoE;AACpE,MAAM,CAAC,MAAM,WAAW,GAAkB,MAAM,CAAC,aAAa,CAAC,CAAC;AA+GhE;;;;;;;;GAQG;AACH,SAAS,SAAS,CA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C,MAAM,CAAC,CAAC;QACjC,OAAO;YACH,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,GAAY,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,GAAY,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,GAAY,EAAE,GAAG,CAAC;YACxG,MAAM,EAAE,QAAQ,CAAC,GAAY,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,GAAY,EAAE,GAAG,CAAC;SAC3E,CAAC;IACN,CAAC,CAAkF,CAAC;IACpF,OAAO,EAAE,CAAC,WAAW,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,kBAAkB,EAAE,IAAI,EAAE,SAAS,CAAC,EAAE,CAAC;AAC7G,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,YAAY,CAA4D,KAAc,EAAE,IAAO;IAC3G,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAK,KAAoC,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;AACtH,CAAC"}
|
|
@@ -2,274 +2,31 @@
|
|
|
2
2
|
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
3
|
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
4
|
*/
|
|
5
|
-
import { ArrayType, FloatType,
|
|
6
|
-
|
|
5
|
+
import { ArrayType, FloatType, StringType, StructType, type EastType, type ExprType, type FunctionType } from "@elaraai/east";
|
|
6
|
+
import { RosterAssignmentTypeFor, RosterContextType, RosterIssueType, RosterWeekTypeFor } from "./types.js";
|
|
7
|
+
/** Rest before and after a duty, in hours. Infinity means no other duty of theirs on that side in this week. @internal */
|
|
7
8
|
export declare const RosterRestType: StructType<{
|
|
8
9
|
readonly before: FloatType;
|
|
9
10
|
readonly after: FloatType;
|
|
10
11
|
readonly minimum: FloatType;
|
|
11
12
|
}>;
|
|
12
13
|
/**
|
|
13
|
-
* Measures rest against
|
|
14
|
-
*
|
|
15
|
-
* @
|
|
16
|
-
* @param
|
|
17
|
-
* @
|
|
18
|
-
* @
|
|
19
|
-
* @remarks Start offsets move the entire shift, while overtime extends its end. This same calculation checks prospective drops and existing assignments.
|
|
14
|
+
* Measures a duty's rest against the person's other duties of the week.
|
|
15
|
+
*
|
|
16
|
+
* @typeParam R - The app's duty row type
|
|
17
|
+
* @param row - The app's duty row type
|
|
18
|
+
* @returns An East function `(assignment, id, week, context) → Rest`: the rest before it, after it, and the smaller of the two
|
|
19
|
+
* @remarks Rest is measured between the duties' own times: before, from the end of the latest of the person's duties to start before it; after, to the start of the earliest to start after it. Duties that overlap leave negative rest. An agency's request has none. This same calculation checks prospective drops and existing duties.
|
|
20
20
|
* @internal
|
|
21
21
|
*/
|
|
22
|
-
export declare
|
|
23
|
-
readonly slot: StructType<{
|
|
24
|
-
readonly day: import("@elaraai/east").IntegerType;
|
|
25
|
-
readonly group: StringType;
|
|
26
|
-
readonly shift: StringType;
|
|
27
|
-
}>;
|
|
28
|
-
readonly who: import("@elaraai/east").VariantType<{
|
|
29
|
-
readonly person: StringType;
|
|
30
|
-
readonly request: StringType;
|
|
31
|
-
}>;
|
|
32
|
-
readonly position: StringType;
|
|
33
|
-
readonly activity: OptionType<StringType>;
|
|
34
|
-
readonly offset: FloatType;
|
|
35
|
-
readonly overtime: FloatType;
|
|
36
|
-
readonly agreed: OptionType<import("@elaraai/east").BooleanType>;
|
|
37
|
-
}>, StringType, StructType<{
|
|
38
|
-
readonly status: import("@elaraai/east").VariantType<{
|
|
39
|
-
readonly draft: import("@elaraai/east").NullType;
|
|
40
|
-
readonly published: StructType<{
|
|
41
|
-
readonly at: import("@elaraai/east").DateTimeType;
|
|
42
|
-
}>;
|
|
43
|
-
}>;
|
|
44
|
-
readonly assignments: import("@elaraai/east").DictType<StringType, StructType<{
|
|
45
|
-
readonly slot: StructType<{
|
|
46
|
-
readonly day: import("@elaraai/east").IntegerType;
|
|
47
|
-
readonly group: StringType;
|
|
48
|
-
readonly shift: StringType;
|
|
49
|
-
}>;
|
|
50
|
-
readonly who: import("@elaraai/east").VariantType<{
|
|
51
|
-
readonly person: StringType;
|
|
52
|
-
readonly request: StringType;
|
|
53
|
-
}>;
|
|
54
|
-
readonly position: StringType;
|
|
55
|
-
readonly activity: OptionType<StringType>;
|
|
56
|
-
readonly offset: FloatType;
|
|
57
|
-
readonly overtime: FloatType;
|
|
58
|
-
readonly agreed: OptionType<import("@elaraai/east").BooleanType>;
|
|
59
|
-
}>>;
|
|
60
|
-
readonly requirements: import("@elaraai/east").DictType<StructType<{
|
|
61
|
-
readonly day: import("@elaraai/east").IntegerType;
|
|
62
|
-
readonly group: StringType;
|
|
63
|
-
readonly shift: StringType;
|
|
64
|
-
}>, StructType<{
|
|
65
|
-
readonly positions: import("@elaraai/east").IntegerType;
|
|
66
|
-
readonly hours: import("@elaraai/east").DictType<StringType, FloatType>;
|
|
67
|
-
}>>;
|
|
68
|
-
readonly dismissed: import("@elaraai/east").SetType<StringType>;
|
|
69
|
-
}>, StructType<{
|
|
70
|
-
readonly people: import("@elaraai/east").DictType<StringType, StructType<{
|
|
71
|
-
readonly key: StringType;
|
|
72
|
-
readonly name: StringType;
|
|
73
|
-
readonly group: StringType;
|
|
74
|
-
readonly position: StringType;
|
|
75
|
-
readonly skills: import("@elaraai/east").SetType<StringType>;
|
|
76
|
-
readonly contract: FloatType;
|
|
77
|
-
readonly agency: import("@elaraai/east").BooleanType;
|
|
78
|
-
readonly trainer: import("@elaraai/east").BooleanType;
|
|
79
|
-
readonly trainee: import("@elaraai/east").BooleanType;
|
|
80
|
-
readonly usual: OptionType<StringType>;
|
|
81
|
-
}>>;
|
|
82
|
-
readonly groups: ArrayType<StructType<{
|
|
83
|
-
readonly key: StringType;
|
|
84
|
-
readonly label: StringType;
|
|
85
|
-
readonly skills: ArrayType<StructType<{
|
|
86
|
-
readonly key: StringType;
|
|
87
|
-
readonly label: StringType;
|
|
88
|
-
readonly code: StringType;
|
|
89
|
-
}>>;
|
|
90
|
-
}>>;
|
|
91
|
-
readonly duties: ArrayType<StructType<{
|
|
92
|
-
readonly key: StringType;
|
|
93
|
-
readonly label: StringType;
|
|
94
|
-
readonly code: StringType;
|
|
95
|
-
}>>;
|
|
96
|
-
readonly shifts: ArrayType<StructType<{
|
|
97
|
-
readonly key: StringType;
|
|
98
|
-
readonly label: StringType;
|
|
99
|
-
readonly code: StringType;
|
|
100
|
-
readonly start: StructType<{
|
|
101
|
-
readonly hour: import("@elaraai/east").IntegerType;
|
|
102
|
-
readonly minute: import("@elaraai/east").IntegerType;
|
|
103
|
-
}>;
|
|
104
|
-
readonly hours: FloatType;
|
|
105
|
-
}>>;
|
|
106
|
-
readonly positions: ArrayType<StructType<{
|
|
107
|
-
readonly key: StringType;
|
|
108
|
-
readonly label: StringType;
|
|
109
|
-
readonly code: StringType;
|
|
110
|
-
readonly lead: import("@elaraai/east").BooleanType;
|
|
111
|
-
}>>;
|
|
112
|
-
readonly agencies: ArrayType<StructType<{
|
|
113
|
-
readonly key: StringType;
|
|
114
|
-
readonly name: StringType;
|
|
115
|
-
}>>;
|
|
116
|
-
readonly rules: StructType<{
|
|
117
|
-
readonly rest: FloatType;
|
|
118
|
-
readonly lead: import("@elaraai/east").BooleanType;
|
|
119
|
-
readonly trainer: import("@elaraai/east").BooleanType;
|
|
120
|
-
readonly skill: import("@elaraai/east").BooleanType;
|
|
121
|
-
readonly agree: import("@elaraai/east").BooleanType;
|
|
122
|
-
}>;
|
|
123
|
-
readonly costs: OptionType<StructType<{
|
|
124
|
-
readonly currency: StringType;
|
|
125
|
-
readonly rates: StructType<{
|
|
126
|
-
readonly permanent: FloatType;
|
|
127
|
-
readonly overtime: FloatType;
|
|
128
|
-
readonly agency: FloatType;
|
|
129
|
-
}>;
|
|
130
|
-
readonly budget: OptionType<FloatType>;
|
|
131
|
-
}>>;
|
|
132
|
-
}>], StructType<{
|
|
133
|
-
readonly before: FloatType;
|
|
134
|
-
readonly after: FloatType;
|
|
135
|
-
readonly minimum: FloatType;
|
|
136
|
-
}>>;
|
|
22
|
+
export declare function rosterRest<R extends EastType>(row: R): ExprType<FunctionType<[RosterAssignmentTypeFor<R>, StringType, RosterWeekTypeFor<R>, RosterContextType], typeof RosterRestType>>;
|
|
137
23
|
/**
|
|
138
|
-
* Checks a drafted week for staffing gaps
|
|
139
|
-
*
|
|
140
|
-
* @
|
|
141
|
-
* @
|
|
142
|
-
* @
|
|
24
|
+
* Checks a drafted week for staffing gaps and breaches.
|
|
25
|
+
*
|
|
26
|
+
* @typeParam R - The app's duty row type
|
|
27
|
+
* @param row - The app's duty row type
|
|
28
|
+
* @returns An East function `(week, context) → Array<Issue>`: issues in day, group and shift order, with actionable fixes
|
|
29
|
+
* @remarks Pure East, shared by tasks and the renderer. Rest is confined to this week. Issues explain the roster; they do not automatically block Save or Publish. The pay's codes are the app's: its own `check` reads them (`CheckContext(R)`). Its words print hours as the fit's do (`scheduleNumberText`): `6 h rest`, `7.5 h unfilled`.
|
|
143
30
|
*/
|
|
144
|
-
export declare
|
|
145
|
-
readonly status: import("@elaraai/east").VariantType<{
|
|
146
|
-
readonly draft: import("@elaraai/east").NullType;
|
|
147
|
-
readonly published: StructType<{
|
|
148
|
-
readonly at: import("@elaraai/east").DateTimeType;
|
|
149
|
-
}>;
|
|
150
|
-
}>;
|
|
151
|
-
readonly assignments: import("@elaraai/east").DictType<StringType, StructType<{
|
|
152
|
-
readonly slot: StructType<{
|
|
153
|
-
readonly day: import("@elaraai/east").IntegerType;
|
|
154
|
-
readonly group: StringType;
|
|
155
|
-
readonly shift: StringType;
|
|
156
|
-
}>;
|
|
157
|
-
readonly who: import("@elaraai/east").VariantType<{
|
|
158
|
-
readonly person: StringType;
|
|
159
|
-
readonly request: StringType;
|
|
160
|
-
}>;
|
|
161
|
-
readonly position: StringType;
|
|
162
|
-
readonly activity: OptionType<StringType>;
|
|
163
|
-
readonly offset: FloatType;
|
|
164
|
-
readonly overtime: FloatType;
|
|
165
|
-
readonly agreed: OptionType<import("@elaraai/east").BooleanType>;
|
|
166
|
-
}>>;
|
|
167
|
-
readonly requirements: import("@elaraai/east").DictType<StructType<{
|
|
168
|
-
readonly day: import("@elaraai/east").IntegerType;
|
|
169
|
-
readonly group: StringType;
|
|
170
|
-
readonly shift: StringType;
|
|
171
|
-
}>, StructType<{
|
|
172
|
-
readonly positions: import("@elaraai/east").IntegerType;
|
|
173
|
-
readonly hours: import("@elaraai/east").DictType<StringType, FloatType>;
|
|
174
|
-
}>>;
|
|
175
|
-
readonly dismissed: import("@elaraai/east").SetType<StringType>;
|
|
176
|
-
}>, StructType<{
|
|
177
|
-
readonly people: import("@elaraai/east").DictType<StringType, StructType<{
|
|
178
|
-
readonly key: StringType;
|
|
179
|
-
readonly name: StringType;
|
|
180
|
-
readonly group: StringType;
|
|
181
|
-
readonly position: StringType;
|
|
182
|
-
readonly skills: import("@elaraai/east").SetType<StringType>;
|
|
183
|
-
readonly contract: FloatType;
|
|
184
|
-
readonly agency: import("@elaraai/east").BooleanType;
|
|
185
|
-
readonly trainer: import("@elaraai/east").BooleanType;
|
|
186
|
-
readonly trainee: import("@elaraai/east").BooleanType;
|
|
187
|
-
readonly usual: OptionType<StringType>;
|
|
188
|
-
}>>;
|
|
189
|
-
readonly groups: ArrayType<StructType<{
|
|
190
|
-
readonly key: StringType;
|
|
191
|
-
readonly label: StringType;
|
|
192
|
-
readonly skills: ArrayType<StructType<{
|
|
193
|
-
readonly key: StringType;
|
|
194
|
-
readonly label: StringType;
|
|
195
|
-
readonly code: StringType;
|
|
196
|
-
}>>;
|
|
197
|
-
}>>;
|
|
198
|
-
readonly duties: ArrayType<StructType<{
|
|
199
|
-
readonly key: StringType;
|
|
200
|
-
readonly label: StringType;
|
|
201
|
-
readonly code: StringType;
|
|
202
|
-
}>>;
|
|
203
|
-
readonly shifts: ArrayType<StructType<{
|
|
204
|
-
readonly key: StringType;
|
|
205
|
-
readonly label: StringType;
|
|
206
|
-
readonly code: StringType;
|
|
207
|
-
readonly start: StructType<{
|
|
208
|
-
readonly hour: import("@elaraai/east").IntegerType;
|
|
209
|
-
readonly minute: import("@elaraai/east").IntegerType;
|
|
210
|
-
}>;
|
|
211
|
-
readonly hours: FloatType;
|
|
212
|
-
}>>;
|
|
213
|
-
readonly positions: ArrayType<StructType<{
|
|
214
|
-
readonly key: StringType;
|
|
215
|
-
readonly label: StringType;
|
|
216
|
-
readonly code: StringType;
|
|
217
|
-
readonly lead: import("@elaraai/east").BooleanType;
|
|
218
|
-
}>>;
|
|
219
|
-
readonly agencies: ArrayType<StructType<{
|
|
220
|
-
readonly key: StringType;
|
|
221
|
-
readonly name: StringType;
|
|
222
|
-
}>>;
|
|
223
|
-
readonly rules: StructType<{
|
|
224
|
-
readonly rest: FloatType;
|
|
225
|
-
readonly lead: import("@elaraai/east").BooleanType;
|
|
226
|
-
readonly trainer: import("@elaraai/east").BooleanType;
|
|
227
|
-
readonly skill: import("@elaraai/east").BooleanType;
|
|
228
|
-
readonly agree: import("@elaraai/east").BooleanType;
|
|
229
|
-
}>;
|
|
230
|
-
readonly costs: OptionType<StructType<{
|
|
231
|
-
readonly currency: StringType;
|
|
232
|
-
readonly rates: StructType<{
|
|
233
|
-
readonly permanent: FloatType;
|
|
234
|
-
readonly overtime: FloatType;
|
|
235
|
-
readonly agency: FloatType;
|
|
236
|
-
}>;
|
|
237
|
-
readonly budget: OptionType<FloatType>;
|
|
238
|
-
}>>;
|
|
239
|
-
}>], ArrayType<StructType<{
|
|
240
|
-
readonly kind: import("@elaraai/east").VariantType<{
|
|
241
|
-
readonly breach: import("@elaraai/east").NullType;
|
|
242
|
-
readonly gap: import("@elaraai/east").NullType;
|
|
243
|
-
readonly agree: import("@elaraai/east").NullType;
|
|
244
|
-
readonly proposal: import("@elaraai/east").NullType;
|
|
245
|
-
}>;
|
|
246
|
-
readonly tone: import("@elaraai/east").VariantType<{
|
|
247
|
-
readonly success: import("@elaraai/east").NullType;
|
|
248
|
-
readonly warning: import("@elaraai/east").NullType;
|
|
249
|
-
readonly danger: import("@elaraai/east").NullType;
|
|
250
|
-
readonly info: import("@elaraai/east").NullType;
|
|
251
|
-
readonly neutral: import("@elaraai/east").NullType;
|
|
252
|
-
}>;
|
|
253
|
-
readonly title: StringType;
|
|
254
|
-
readonly detail: StringType;
|
|
255
|
-
readonly slot: OptionType<StructType<{
|
|
256
|
-
readonly day: import("@elaraai/east").IntegerType;
|
|
257
|
-
readonly group: StringType;
|
|
258
|
-
readonly shift: StringType;
|
|
259
|
-
}>>;
|
|
260
|
-
readonly assignment: OptionType<StringType>;
|
|
261
|
-
readonly flag: OptionType<StringType>;
|
|
262
|
-
readonly fix: OptionType<import("@elaraai/east").VariantType<{
|
|
263
|
-
readonly request: StringType;
|
|
264
|
-
readonly agree: import("@elaraai/east").NullType;
|
|
265
|
-
readonly accept: StringType;
|
|
266
|
-
readonly move: StringType;
|
|
267
|
-
readonly start: FloatType;
|
|
268
|
-
readonly find: import("@elaraai/east").VariantType<{
|
|
269
|
-
readonly leads: import("@elaraai/east").NullType;
|
|
270
|
-
readonly trainers: import("@elaraai/east").NullType;
|
|
271
|
-
readonly skill: StringType;
|
|
272
|
-
}>;
|
|
273
|
-
}>>;
|
|
274
|
-
}>>>;
|
|
31
|
+
export declare function rosterCheck<R extends EastType>(row: R): ExprType<FunctionType<[RosterWeekTypeFor<R>, RosterContextType], ArrayType<typeof RosterIssueType>>>;
|
|
275
32
|
//# sourceMappingURL=rules.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../../src/roster/rules.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../../src/roster/rules.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,SAAS,EAAkB,SAAS,EAA2B,UAAU,EAAE,UAAU,EACrF,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAAE,KAAK,YAAY,EAClD,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,uBAAuB,EAAE,iBAAiB,EAAiB,eAAe,EAAkB,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE3I,0HAA0H;AAC1H,eAAO,MAAM,cAAc;;;;EAA0E,CAAC;AAEtG;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,QAAQ,EAAE,GAAG,EAAE,CAAC,GAgBhC,QAAQ,CAAC,YAAY,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAAE,iBAAiB,CAAC,EAAE,OAAO,cAAc,CAAC,CAAC,CACpJ;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,QAAQ,EAAE,GAAG,EAAE,CAAC,GAwHjC,QAAQ,CAAC,YAAY,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,iBAAiB,CAAC,EAAE,SAAS,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC,CACxH"}
|