@elaraai/e3-ui 1.0.94 → 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,174 @@
|
|
|
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
|
+
* What the Roster reads from a duty's times (#1368, `Builder Interfaces
|
|
7
|
+
* Spec.md` §5.5): pure East functions, compiled once by the renderer, so a
|
|
8
|
+
* task and the screen use the same arithmetic.
|
|
9
|
+
*
|
|
10
|
+
* - **Day.** A duty's day is the UTC day whose shift start is nearest the
|
|
11
|
+
* duty's start ({@link rosterDayOf}); its week is the week holding that day.
|
|
12
|
+
* - **A duty**, as the Roster reads it, is its kind's roles and its row
|
|
13
|
+
* ({@link rosterPlacement}): its slot, from its day, its group and its
|
|
14
|
+
* shift; who it is, from its resource; its position, its activity, its own
|
|
15
|
+
* times and its hours. A duty whose shift or group isn't configured, or that
|
|
16
|
+
* names no one, is placed nowhere: the Roster lists it in Issues and keeps
|
|
17
|
+
* it as stored.
|
|
18
|
+
* - **A move** to another slot ({@link rosterMove}) moves the duty's start
|
|
19
|
+
* and end with it, kept where they stood against its shift's start, and
|
|
20
|
+
* writes its shift and group: a move and back leaves its times as they were.
|
|
21
|
+
* - **A new duty** ({@link rosterNewDuty}) runs its slot's shift: from the
|
|
22
|
+
* shift's start on its day ({@link rosterShiftStart}), for the shift's
|
|
23
|
+
* hours. Copying the week before copies each duty so, its other fields as
|
|
24
|
+
* they were.
|
|
25
|
+
*
|
|
26
|
+
* @packageDocumentation
|
|
27
|
+
*/
|
|
28
|
+
import { DateTimeType, East, IntegerType, OptionType, StringType, none, some, variant, } from "@elaraai/east";
|
|
29
|
+
import { ScheduleClockType, ScheduleResourceRefType, ScheduleRosterRolesType } from "../schedule/types.js";
|
|
30
|
+
import { RosterContextType, RosterIssueType, RosterPlacementTypeFor, RosterShiftType, RosterSlotType, RosterWhoType } from "./types.js";
|
|
31
|
+
/**
|
|
32
|
+
* A duty's day (§5.5, rule 1): the UTC midnight of the day whose shift start is
|
|
33
|
+
* nearest the duty's start.
|
|
34
|
+
*
|
|
35
|
+
* @param start - The duty's start
|
|
36
|
+
* @param clock - Its shift's start, a time of day
|
|
37
|
+
* @returns Its day, a UTC midnight
|
|
38
|
+
* @remarks The shift starts on the duty's day within 12 hours of the duty's start, so the day is the one `start` falls in once moved back by the shift's start and on by 12 hours: an early start (`05:00` on the `06:00` shift) is the shift's day, and a night shift's duty past midnight (`00:30` on the `22:00` shift) the night before's.
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
export const rosterDayOf = East.function([DateTimeType, ScheduleClockType], DateTimeType, ($, start, clock) => {
|
|
42
|
+
const minutes = $.const(clock.hour.multiply(60n).add(clock.minute));
|
|
43
|
+
return East.DateTime.roundDownDay(start.subtractMinutes(minutes).addHours(12n), 1n);
|
|
44
|
+
});
|
|
45
|
+
/**
|
|
46
|
+
* A shift's start on a day (§5.5, rule 5): where a new duty of the shift
|
|
47
|
+
* starts, and what a duty's own times are drawn against.
|
|
48
|
+
*
|
|
49
|
+
* @param day - The day, a UTC midnight
|
|
50
|
+
* @param shift - The shift
|
|
51
|
+
* @returns Its start on that day
|
|
52
|
+
* @internal
|
|
53
|
+
*/
|
|
54
|
+
export const rosterShiftStart = East.function([DateTimeType, RosterShiftType], DateTimeType, (_$, day, shift) => day.addMinutes(shift.start.hour.multiply(60n).add(shift.start.minute)));
|
|
55
|
+
/**
|
|
56
|
+
* Reads one duty as the Roster does: its kind's roles and its row, in the week
|
|
57
|
+
* of `start`.
|
|
58
|
+
*
|
|
59
|
+
* @typeParam R - The app's duty row type
|
|
60
|
+
* @param row - The app's duty row type
|
|
61
|
+
* @returns An East function `(roles, row, key, start, context) → Placement(R)`: the duty placed in the week of
|
|
62
|
+
* `start`; `elsewhere` for a duty whose day falls in another week; `unplaced`, with the issue that lists it, for a
|
|
63
|
+
* duty of this week whose shift or group isn't configured, or that names no person and no agency
|
|
64
|
+
* @remarks The duty kind's resource names the `people` slot for a person and the `agencies` slot for an agency's request; a kind with no `position` role holds none, `""`. A duty of a shift not configured has no shift start to be nearest: its day is the UTC day it starts.
|
|
65
|
+
* @internal
|
|
66
|
+
*/
|
|
67
|
+
export function rosterPlacement(row) {
|
|
68
|
+
// The row's type erased inside, as the Allocation's functions over their row type are: East checks it as it builds.
|
|
69
|
+
const Placement = RosterPlacementTypeFor(row);
|
|
70
|
+
return East.function([ScheduleRosterRolesType, row, StringType, DateTimeType, RosterContextType], Placement, ($, roles, value, key, start, context) => {
|
|
71
|
+
const dayOf = $.const(rosterDayOf);
|
|
72
|
+
const shifts = $.const(context.shifts.filter((_$2, shift) => East.equal(shift.key, roles.shift)));
|
|
73
|
+
const groups = $.const(context.groups.filter((_$2, group) => East.equal(group.key, roles.group)));
|
|
74
|
+
const known = $.const(East.greater(shifts.size(), 0n));
|
|
75
|
+
// Its day: its shift's start nearest its own — or, for a shift not configured, the UTC day it starts.
|
|
76
|
+
const day = $.const(known.ifElse(() => dayOf(roles.start, shifts.get(0n).start), () => East.DateTime.roundDownDay(roles.start, 1n)));
|
|
77
|
+
$.if(East.less(day, start).or(() => East.greaterEqual(day, start.addDays(7n))), ($2) => { $2.return(variant("elsewhere", null)); });
|
|
78
|
+
// Where it is rostered, as far as the Roster knows: what its issue says.
|
|
79
|
+
const groupText = $.const(East.greater(groups.size(), 0n).ifElse(() => groups.get(0n).label, () => roles.group));
|
|
80
|
+
const shiftText = $.const(known.ifElse(() => shifts.get(0n).label, () => roles.shift));
|
|
81
|
+
// The issue that lists a duty the Roster cannot place: its title, its detail and its flag.
|
|
82
|
+
const unplaced = $.const(East.function([StringType, StringType, StringType], RosterIssueType, (_$2, title, detail, flag) => ({
|
|
83
|
+
kind: variant("breach", null), tone: variant("danger", null), title, detail,
|
|
84
|
+
slot: none, assignment: some(key), flag: some(flag), fix: none,
|
|
85
|
+
})));
|
|
86
|
+
$.if(known.not(), ($2) => {
|
|
87
|
+
$2.return(variant("unplaced", unplaced(East.str `Unknown shift · ${roles.shift}`, East.str `${groupText} · this shift isn't configured: the duty is kept as stored`, "unknown shift")));
|
|
88
|
+
});
|
|
89
|
+
$.if(East.equal(groups.size(), 0n), ($2) => {
|
|
90
|
+
$2.return(variant("unplaced", unplaced(East.str `Unknown group · ${roles.group}`, East.str `${shiftText} · this group isn't configured: the duty is kept as stored`, "unknown group")));
|
|
91
|
+
});
|
|
92
|
+
const who = $.let(none, OptionType(RosterWhoType));
|
|
93
|
+
$.match(roles.resource, {
|
|
94
|
+
some: ($2, ref) => {
|
|
95
|
+
$2.if(East.equal(ref.kind, "people"), ($3) => { $3.assign(who, some(variant("person", ref.key))); });
|
|
96
|
+
$2.if(East.equal(ref.kind, "agencies"), ($3) => { $3.assign(who, some(variant("request", ref.key))); });
|
|
97
|
+
},
|
|
98
|
+
});
|
|
99
|
+
$.if(who.hasTag("none"), ($2) => {
|
|
100
|
+
$2.return(variant("unplaced", unplaced(East.str `No one rostered · ${key}`, East.str `${groupText} · ${shiftText} · the duty names no person and no agency`, "no one")));
|
|
101
|
+
});
|
|
102
|
+
// Both are UTC midnights: a whole number of days apart.
|
|
103
|
+
const index = $.const(East.Float.roundHalf(start.durationDays(day)), IntegerType);
|
|
104
|
+
const position = $.const(roles.position.match({ some: (_$2, held) => held, none: (_$2) => East.value("", StringType) }));
|
|
105
|
+
return variant("placed", {
|
|
106
|
+
slot: { day: index, group: roles.group, shift: roles.shift }, who: who.unwrap("some"), position, activity: roles.activity,
|
|
107
|
+
start: roles.start, end: roles.end, hours: roles.hours, row: value,
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* A duty moved to a slot (§5.5, rule 3): its start and end moved with it,
|
|
113
|
+
* kept where they stood against its shift's start, and its shift and group
|
|
114
|
+
* written.
|
|
115
|
+
*
|
|
116
|
+
* @param roles - The duty's roles
|
|
117
|
+
* @param start - The week's first day, a UTC midnight
|
|
118
|
+
* @param slot - The slot it moves to
|
|
119
|
+
* @param context - The configuration
|
|
120
|
+
* @returns Its roles, moved; `none` for a slot whose shift or group isn't configured
|
|
121
|
+
* @remarks Its length is kept, and its start stands as far from the slot's shift's start as it stood from its own: a move and back leaves its times as they were. A duty of a shift not configured has no start to stand against, and starts the slot's shift.
|
|
122
|
+
* @internal
|
|
123
|
+
*/
|
|
124
|
+
export const rosterMove = East.function([ScheduleRosterRolesType, DateTimeType, RosterSlotType, RosterContextType], OptionType(ScheduleRosterRolesType), ($, roles, start, slot, context) => {
|
|
125
|
+
const dayOf = $.const(rosterDayOf);
|
|
126
|
+
const shiftStart = $.const(rosterShiftStart);
|
|
127
|
+
const targets = $.const(context.shifts.filter((_$2, shift) => East.equal(shift.key, slot.shift)));
|
|
128
|
+
const grouped = $.const(context.groups.some((_$2, group) => East.equal(group.key, slot.group)));
|
|
129
|
+
$.if(East.equal(targets.size(), 0n).or(() => grouped.not()), ($2) => { $2.return(none); });
|
|
130
|
+
// How far its start stood from its own shift's start on its day.
|
|
131
|
+
const own = $.const(context.shifts.filter((_$2, shift) => East.equal(shift.key, roles.shift)));
|
|
132
|
+
const offset = $.let(0n, IntegerType);
|
|
133
|
+
$.if(East.greater(own.size(), 0n), ($2) => {
|
|
134
|
+
const from = $2.const(own.get(0n));
|
|
135
|
+
const anchor = $2.const(shiftStart(dayOf(roles.start, from.start), from));
|
|
136
|
+
$2.assign(offset, anchor.durationMilliseconds(roles.start));
|
|
137
|
+
});
|
|
138
|
+
const moved = $.const(shiftStart(start.addDays(slot.day), targets.get(0n)).addMilliseconds(offset));
|
|
139
|
+
return some({
|
|
140
|
+
start: moved, end: moved.addMilliseconds(roles.start.durationMilliseconds(roles.end)), resource: roles.resource,
|
|
141
|
+
shift: slot.shift, group: slot.group, position: roles.position, activity: roles.activity, hours: roles.hours,
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
/**
|
|
145
|
+
* A new duty (§5.5, rule 5): it runs its slot's shift, from the shift's start
|
|
146
|
+
* on its day, for the shift's hours.
|
|
147
|
+
*
|
|
148
|
+
* @param who - Who it is: a person, or an agency asked to send someone
|
|
149
|
+
* @param slot - Its slot
|
|
150
|
+
* @param start - The week's first day, a UTC midnight
|
|
151
|
+
* @param position - The position it holds; `none` for a kind with no `position` role
|
|
152
|
+
* @param activity - Its activity, if any
|
|
153
|
+
* @param context - The configuration
|
|
154
|
+
* @returns Its roles; `none` for a slot whose shift or group isn't configured
|
|
155
|
+
* @remarks A person is a key of the `people` resource kind, an agency of the `agencies` one. Its hours are the shift's, until its row says otherwise. Copying the week before runs each of its duties so, written over its own row.
|
|
156
|
+
* @internal
|
|
157
|
+
*/
|
|
158
|
+
export const rosterNewDuty = East.function([RosterWhoType, RosterSlotType, DateTimeType, OptionType(StringType), OptionType(StringType), RosterContextType], OptionType(ScheduleRosterRolesType), ($, who, slot, start, position, activity, context) => {
|
|
159
|
+
const shiftStart = $.const(rosterShiftStart);
|
|
160
|
+
const shifts = $.const(context.shifts.filter((_$2, shift) => East.equal(shift.key, slot.shift)));
|
|
161
|
+
const grouped = $.const(context.groups.some((_$2, group) => East.equal(group.key, slot.group)));
|
|
162
|
+
$.if(East.equal(shifts.size(), 0n).or(() => grouped.not()), ($2) => { $2.return(none); });
|
|
163
|
+
const shift = $.const(shifts.get(0n));
|
|
164
|
+
const from = $.const(shiftStart(start.addDays(slot.day), shift));
|
|
165
|
+
const resource = $.const(who.match({
|
|
166
|
+
person: (_$2, key) => East.value({ kind: "people", key }, ScheduleResourceRefType),
|
|
167
|
+
request: (_$2, key) => East.value({ kind: "agencies", key }, ScheduleResourceRefType),
|
|
168
|
+
}));
|
|
169
|
+
return some({
|
|
170
|
+
start: from, end: from.addHours(shift.hours), resource: some(resource), shift: slot.shift, group: slot.group,
|
|
171
|
+
position, activity, hours: shift.hours,
|
|
172
|
+
});
|
|
173
|
+
});
|
|
174
|
+
//# sourceMappingURL=times.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"times.js","sourceRoot":"","sources":["../../../src/roster/times.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EACH,YAAY,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,GAE/E,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC3G,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,sBAAsB,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAExI;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,YAAY,EAAE,iBAAiB,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK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