@propriety/court-calendar 1.0.147 → 1.0.149
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/README.md +1 -1
- package/dist/_components/List/CalendarList.d.ts +1 -1
- package/dist/helpers/courtDates.d.ts +13 -1
- package/dist/index.mjs +5358 -5338
- package/package.json +2 -2
- package/src/__tests__/helpers/courtDates.test.ts +39 -1
- package/src/__tests__/hooks/UseModalActions.test.ts +32 -0
- package/src/__tests__/setup.ts +1 -1
- package/src/_components/List/CalendarList.tsx +93 -113
- package/src/_components/Modal/DateDetails/DateDetails.tsx +2 -1
- package/src/_components/Modal/DateEdit/CreateEditCase.tsx +52 -24
- package/src/_components/WeekWidget/WeekWidget.tsx +16 -11
- package/src/context/ReferenceDataContext.tsx +16 -1
- package/src/helpers/courtDates.ts +22 -1
- package/src/hooks/UseCalendarEvents.ts +141 -186
- package/src/hooks/UseModalActions.ts +10 -7
- package/vitest.config.ts +5 -1
package/README.md
CHANGED
|
@@ -425,7 +425,7 @@ ESLint with TypeScript plugin. Biome is configured for formatting (4-space inden
|
|
|
425
425
|
npm run test
|
|
426
426
|
```
|
|
427
427
|
|
|
428
|
-
Vitest + `@testing-library/react` +
|
|
428
|
+
Vitest + `@testing-library/react` + happy-dom. Test files live in `src/__tests__/` mirroring the source tree:
|
|
429
429
|
|
|
430
430
|
| Test file | Covers |
|
|
431
431
|
|-----------|--------|
|
|
@@ -3,6 +3,6 @@ export default function CalendarList({ filteredDates, onSelectCalEvent, currentD
|
|
|
3
3
|
filteredDates: CalEvent[];
|
|
4
4
|
onSelectCalEvent: (calEvent: CalEvent) => void;
|
|
5
5
|
currentDate: Date;
|
|
6
|
-
onUpdateChair?: (courtDateId: number, position:
|
|
6
|
+
onUpdateChair?: (courtDateId: number, position: 'first' | 'second', userId: number | null) => void;
|
|
7
7
|
isPrinting?: boolean;
|
|
8
8
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,17 @@
|
|
|
1
|
-
import { CourtDate } from '../types';
|
|
1
|
+
import { Case, CourtDate } from '../types';
|
|
2
2
|
export declare function isVillageDate(muniCode: string): boolean;
|
|
3
|
+
/**
|
|
4
|
+
* Parenthetical muni-code suffix for event labels, e.g. " (3100)". Collections may
|
|
5
|
+
* have no municipality; for a blank code this returns "" so a label reads as
|
|
6
|
+
* "No municipality" rather than "No municipality ()".
|
|
7
|
+
*/
|
|
8
|
+
export declare function muniCodeSuffix(muniCode: string): string;
|
|
9
|
+
/**
|
|
10
|
+
* The index number that identifies a case for a court date in the given muni.
|
|
11
|
+
* Village dates use VillageSCARIndexNumber; we fall back to the town SCARIndexNumber
|
|
12
|
+
* when the village index is blank so we never display, send, or link an empty index.
|
|
13
|
+
*/
|
|
14
|
+
export declare function caseIndexForMuni(muniCode: string, c: Pick<Case, 'SCARIndexNumber' | 'VillageSCARIndexNumber'>): string;
|
|
3
15
|
/**
|
|
4
16
|
* Returns a unique string key for a court date suitable for use in the allCases map.
|
|
5
17
|
* Negotiation IDs and SCAR IDs come from separate auto-increment sequences and can
|