@propriety/court-calendar 1.0.150 → 1.0.151

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.
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,51 @@
1
+ import { Case } from '../../../types';
2
+ import { Status } from './StatusTimeline';
3
+ export interface StageResult {
4
+ status: Status;
5
+ count?: {
6
+ done: number;
7
+ total: number;
8
+ };
9
+ date?: Date;
10
+ }
11
+ /** Most recent of a set of possibly-missing dates, or undefined when none are set. */
12
+ export declare function latestDate(dates: (Date | null | undefined)[]): Date | undefined;
13
+ /**
14
+ * What an empty base means for a stage. The two cases are deliberately NOT symmetric:
15
+ *
16
+ * - 'complete' No work is left, so the stage is finished (green check). Used by
17
+ * Reviewed/Sent Offers/Uploaded: you cannot review, offer on, or upload
18
+ * for a case that already settled, so once every case is settled those
19
+ * stages are done by definition.
20
+ * - 'notStarted' The stage cannot have begun yet (empty circle). Used by Stipulation:
21
+ * a stipulation only exists once a case settles, so "nothing settled"
22
+ * means not started, not finished.
23
+ */
24
+ type EmptyBase = 'complete' | 'notStarted';
25
+ /**
26
+ * Collapses one timeline stage into a status.
27
+ *
28
+ * `base` is the population the stage is measured against — the "X of Y" label is always
29
+ * done/base, never cases.length. `cases` is the full list on the date, used only to blank
30
+ * the timeline when the date has no cases at all, and to date the check when the base is
31
+ * empty but the stage still counts as complete.
32
+ */
33
+ export declare function stageStatus({ cases, base, isDone, dateOf, whenBaseEmpty, }: {
34
+ cases: Case[];
35
+ base: Case[];
36
+ isDone: (c: Case) => boolean;
37
+ dateOf: (done: Case[]) => Date | undefined;
38
+ whenBaseEmpty: EmptyBase;
39
+ }): StageResult;
40
+ export declare function reviewedStage(cases: Case[], isVillage: boolean): StageResult;
41
+ export declare function sentOffersStage(cases: Case[], isVillage: boolean): StageResult;
42
+ export declare function uploadedStage(cases: Case[], isVillage: boolean): StageResult;
43
+ /** Settled is the one stage measured against every case — it *is* the settlement rate. */
44
+ export declare function settledStage(cases: Case[], isVillage: boolean): StageResult;
45
+ /**
46
+ * Stipulations only exist on settled cases (~98% of stip rows in production sit on one),
47
+ * so "stips done / settled cases" is the meaningful ratio. Note the asymmetry with the
48
+ * stages above: an empty base here means not-started, not finished.
49
+ */
50
+ export declare function stipulationStage(cases: Case[], isVillage: boolean): StageResult;
51
+ export {};
@@ -1,5 +1,15 @@
1
1
  import { CalendarFilterCtx, Case, NegotiationLog } from '../types';
2
2
  export declare function isCaseSettled(c: Case, isVillage: boolean): boolean;
3
+ /**
4
+ * The raw upload fact: this case's evidence is up on NYSCEF. Says nothing about
5
+ * settlement — use this when settled cases have already been filtered out.
6
+ */
7
+ export declare function hasCaseUploadedEvidence(c: Case): boolean;
8
+ /**
9
+ * True when the case needs no upload — either it settled (mooting the upload) or the
10
+ * evidence is already up. This is the "nothing left to chase" predicate behind the
11
+ * calendar/week upload badges; it is NOT the Uploaded timeline stage.
12
+ */
3
13
  export declare function isCaseUploadedOrSettled(c: Case, isVillage: boolean): boolean;
4
14
  export declare function isCaseMissingEvidence(c: Case): boolean;
5
15
  export declare function hasCaseUnuploadedEvidence(c: Case): boolean;