MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / commitmentKind

Function commitmentKind

web/src/lib/commitment.ts:4–8  ·  view source on GitHub ↗
(roles: Pick<CommitmentRoles, 'deadline' | 'occupied_until'>)

Source from the content-addressed store, hash-verified

2import { isDateOnly, roleDay, todayIn, wallToInstant, type OccurrenceState } from '$lib/calendar/presentation';
3
4export function commitmentKind(roles: Pick<CommitmentRoles, 'deadline' | 'occupied_until'>): 'deadline_hard' | 'window' | 'check' {
5 if (roles.deadline !== null) return 'deadline_hard';
6 if (roles.occupied_until !== null) return 'window';
7 return 'check';
8}
9
10
11/** undefined is loading/unavailable; null is an authoritative not_found. */

Callers 1

schedule.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected