@striae-org/striae 4.0.3 → 4.1.0
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/app/components/actions/confirm-export.ts +4 -2
- package/app/components/actions/generate-pdf.ts +10 -2
- package/app/components/audit/user-audit-viewer.tsx +121 -940
- package/app/components/audit/user-audit.module.css +20 -0
- package/app/components/audit/viewer/audit-activity-summary.tsx +52 -0
- package/app/components/audit/viewer/audit-entries-list.tsx +200 -0
- package/app/components/audit/viewer/audit-filters-panel.tsx +306 -0
- package/app/components/audit/viewer/audit-user-info-card.tsx +44 -0
- package/app/components/audit/viewer/audit-viewer-header.tsx +55 -0
- package/app/components/audit/viewer/audit-viewer-utils.ts +121 -0
- package/app/components/audit/viewer/types.ts +1 -0
- package/app/components/audit/viewer/use-audit-viewer-data.ts +166 -0
- package/app/components/audit/viewer/use-audit-viewer-export.ts +176 -0
- package/app/components/audit/viewer/use-audit-viewer-filters.ts +141 -0
- package/app/components/auth/mfa-enrollment.module.css +13 -5
- package/app/components/auth/mfa-verification.module.css +13 -5
- package/app/components/canvas/canvas.tsx +3 -0
- package/app/components/canvas/confirmation/confirmation.tsx +13 -37
- package/app/components/public-signing-key-modal/public-signing-key-modal.module.css +1 -0
- package/app/components/public-signing-key-modal/public-signing-key-modal.tsx +8 -37
- package/app/components/sidebar/case-export/case-export.tsx +9 -34
- package/app/components/sidebar/case-import/case-import.module.css +2 -0
- package/app/components/sidebar/case-import/case-import.tsx +10 -34
- package/app/components/sidebar/cases/cases-modal.module.css +44 -9
- package/app/components/sidebar/cases/cases-modal.tsx +16 -14
- package/app/components/sidebar/files/files-modal.module.css +45 -10
- package/app/components/sidebar/files/files-modal.tsx +16 -16
- package/app/components/sidebar/notes/notes-modal.tsx +17 -15
- package/app/components/sidebar/notes/notes.module.css +2 -0
- package/app/components/sidebar/sidebar.module.css +2 -2
- package/app/components/toast/toast.module.css +2 -1
- package/app/components/toast/toast.tsx +16 -11
- package/app/components/user/delete-account.tsx +10 -31
- package/app/components/user/inactivity-warning.module.css +8 -6
- package/app/components/user/manage-profile.module.css +2 -0
- package/app/components/user/manage-profile.tsx +85 -30
- package/app/hooks/useOverlayDismiss.ts +68 -0
- package/app/routes/auth/login.example.tsx +19 -8
- package/app/routes/auth/passwordReset.module.css +23 -13
- package/app/routes/striae/striae.tsx +8 -1
- package/app/routes.ts +7 -0
- package/app/services/audit/audit-export-csv.ts +2 -0
- package/app/services/audit/audit.service.ts +29 -5
- package/app/services/audit/builders/audit-entry-builder.ts +2 -1
- package/app/services/audit/builders/audit-event-builders-user-security.ts +4 -2
- package/app/services/audit/builders/audit-event-builders-workflow.ts +6 -0
- package/app/types/audit.ts +2 -1
- package/app/types/user.ts +1 -0
- package/app/utils/data/permissions.ts +1 -0
- package/functions/api/pdf/[[path]].ts +32 -1
- package/load-context.ts +9 -0
- package/package.json +5 -1
- package/primershear.emails.example +6 -0
- package/scripts/deploy-pages-secrets.sh +6 -0
- package/scripts/deploy-primershear-emails.sh +166 -0
- package/worker-configuration.d.ts +7493 -7491
- package/workers/audit-worker/wrangler.jsonc.example +1 -1
- package/workers/data-worker/wrangler.jsonc.example +1 -1
- package/workers/image-worker/wrangler.jsonc.example +1 -1
- package/workers/keys-worker/wrangler.jsonc.example +1 -1
- package/workers/pdf-worker/src/pdf-worker.example.ts +3 -0
- package/workers/pdf-worker/src/report-types.ts +3 -0
- package/workers/pdf-worker/wrangler.jsonc.example +1 -1
- package/workers/user-worker/src/user-worker.example.ts +6 -1
- package/workers/user-worker/wrangler.jsonc.example +1 -1
- package/wrangler.toml.example +1 -1
|
@@ -27,6 +27,9 @@ const DEFAULT_PDF_OPTIONS = {
|
|
|
27
27
|
const reportModuleLoaders: Record<string, () => Promise<ReportModule>> = {
|
|
28
28
|
// Default Striae report format module
|
|
29
29
|
striae: () => import('./formats/format-striae'),
|
|
30
|
+
// Additional formats can be added here
|
|
31
|
+
primershear: () => import('./formats/format-primer-shear'),
|
|
32
|
+
|
|
30
33
|
};
|
|
31
34
|
|
|
32
35
|
const corsHeaders: Record<string, string> = {
|
|
@@ -16,6 +16,7 @@ interface UserData {
|
|
|
16
16
|
firstName: string;
|
|
17
17
|
lastName: string;
|
|
18
18
|
company: string;
|
|
19
|
+
badgeId?: string;
|
|
19
20
|
permitted: boolean;
|
|
20
21
|
cases: CaseItem[];
|
|
21
22
|
readOnlyCases?: ReadOnlyCaseItem[];
|
|
@@ -40,6 +41,7 @@ interface UserRequestData {
|
|
|
40
41
|
firstName?: string;
|
|
41
42
|
lastName?: string;
|
|
42
43
|
company?: string;
|
|
44
|
+
badgeId?: string;
|
|
43
45
|
permitted?: boolean;
|
|
44
46
|
readOnlyCases?: ReadOnlyCaseItem[];
|
|
45
47
|
}
|
|
@@ -286,7 +288,8 @@ async function handleGetUser(env: Env, userUid: string): Promise<Response> {
|
|
|
286
288
|
async function handleAddUser(request: Request, env: Env, userUid: string): Promise<Response> {
|
|
287
289
|
try {
|
|
288
290
|
const requestData: UserRequestData = await request.json();
|
|
289
|
-
const { email, firstName, lastName, company, permitted } = requestData;
|
|
291
|
+
const { email, firstName, lastName, company, badgeId, permitted } = requestData;
|
|
292
|
+
const normalizedBadgeId = typeof badgeId === 'string' ? badgeId.trim() : undefined;
|
|
290
293
|
|
|
291
294
|
// Check for existing user
|
|
292
295
|
const value = await env.USER_DB.get(userUid);
|
|
@@ -302,6 +305,7 @@ async function handleAddUser(request: Request, env: Env, userUid: string): Promi
|
|
|
302
305
|
firstName: firstName || existing.firstName,
|
|
303
306
|
lastName: lastName || existing.lastName,
|
|
304
307
|
company: company || existing.company,
|
|
308
|
+
badgeId: normalizedBadgeId !== undefined ? normalizedBadgeId : (existing.badgeId ?? ''),
|
|
305
309
|
permitted: permitted !== undefined ? permitted : existing.permitted,
|
|
306
310
|
updatedAt: new Date().toISOString()
|
|
307
311
|
};
|
|
@@ -316,6 +320,7 @@ async function handleAddUser(request: Request, env: Env, userUid: string): Promi
|
|
|
316
320
|
firstName: firstName || '',
|
|
317
321
|
lastName: lastName || '',
|
|
318
322
|
company: company || '',
|
|
323
|
+
badgeId: normalizedBadgeId ?? '',
|
|
319
324
|
permitted: permitted !== undefined ? permitted : true,
|
|
320
325
|
cases: [],
|
|
321
326
|
createdAt: new Date().toISOString()
|
package/wrangler.toml.example
CHANGED