@processfocus/runtime-local 0.1.0-next.2 → 0.1.0-next.4
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 +51 -253
- package/dist/authentication-server.mjs +52 -84
- package/dist/chunk-3wzp2sax.js +4806 -0
- package/dist/chunk-5kjvzbwr.js +512 -0
- package/dist/chunk-egeb4821.js +156 -0
- package/dist/chunk-q5v72erd.js +241 -0
- package/dist/{chunk-yhzbn4vx.js → chunk-wvbz0nmd.js} +19485 -34180
- package/dist/{chunk-352j1ayk.js → chunk-y8fnwbx0.js} +51781 -36259
- package/dist/dashboard-source/apps/frontend/app/(protected)/act-on-behalf/actions.ts +12 -12
- package/dist/dashboard-source/apps/frontend/app/(protected)/act-on-behalf/delegations-client.tsx +31 -21
- package/dist/dashboard-source/apps/frontend/app/(protected)/act-on-behalf/page.tsx +3 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/client-index.tsx +1 -12
- package/dist/dashboard-source/apps/frontend/app/(protected)/connected-apps/disconnect-form.tsx +57 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/connected-apps/page.tsx +97 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/executions/@modal/(.)[executionId]/client.tsx +1 -1
- package/dist/dashboard-source/apps/frontend/app/(protected)/executions/@modal/(.)[executionId]/page.tsx +2 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/executions/@modal/(.)[executionId]/process-state/page.tsx +2 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/executions/@modal/default.tsx +3 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/executions/[executionId]/page.tsx +3 -1
- package/dist/dashboard-source/apps/frontend/app/(protected)/executions/[executionId]/process-state/page.tsx +2 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/executions/client-layout.tsx +19 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/executions/default.tsx +6 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/executions/executions-client.tsx +1637 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/executions/layout.tsx +5 -7
- package/dist/dashboard-source/apps/frontend/app/(protected)/executions/page.tsx +4 -1589
- package/dist/dashboard-source/apps/frontend/app/(protected)/executions/process-state-page-client.tsx +1 -1
- package/dist/dashboard-source/apps/frontend/app/(protected)/layout.tsx +41 -33
- package/dist/dashboard-source/apps/frontend/app/(protected)/lists/@modal/(.)item/[id]/client.tsx +11 -17
- package/dist/dashboard-source/apps/frontend/app/(protected)/lists/@modal/(.)item/[id]/page.tsx +2 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/lists/@modal/default.tsx +3 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/lists/[...listPath]/list-page-client.tsx +169 -18
- package/dist/dashboard-source/apps/frontend/app/(protected)/lists/[...listPath]/page.tsx +21 -14
- package/dist/dashboard-source/apps/frontend/app/(protected)/lists/components/list-create-form.tsx +36 -18
- package/dist/dashboard-source/apps/frontend/app/(protected)/lists/components/list-item-edit-form.tsx +22 -28
- package/dist/dashboard-source/apps/frontend/app/(protected)/lists/components/list-item-load-error.tsx +49 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/lists/components/list-schema-form.tsx +28 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/lists/default.tsx +6 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/lists/hooks/metric-control-url-state.ts +7 -16
- package/dist/dashboard-source/apps/frontend/app/(protected)/lists/hooks/use-list-deleted-callback.ts +4 -6
- package/dist/dashboard-source/apps/frontend/app/(protected)/lists/hooks/use-list-item-detail.ts +45 -142
- package/dist/dashboard-source/apps/frontend/app/(protected)/lists/item/[id]/client.tsx +10 -20
- package/dist/dashboard-source/apps/frontend/app/(protected)/lists/item/[id]/page.tsx +2 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/lists/layout.tsx +3 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/lists/lib/list-process-dialog.tsx +72 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/lists/lib/list-refresh-provider.tsx +65 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/lists/lib/list-refresh.ts +162 -16
- package/dist/dashboard-source/apps/frontend/app/(protected)/lists/utils.tsx +19 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/org-chart/page.tsx +4 -9
- package/dist/dashboard-source/apps/frontend/app/(protected)/page.tsx +4 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/passkeys/actions.ts +15 -18
- package/dist/dashboard-source/apps/frontend/app/(protected)/passkeys/page.tsx +12 -6
- package/dist/dashboard-source/apps/frontend/app/(protected)/passkeys/passkeys-client.tsx +7 -16
- package/dist/dashboard-source/apps/frontend/app/(protected)/processes/@modal/(.)start/[...startStepPath]/client.tsx +26 -48
- package/dist/dashboard-source/apps/frontend/app/(protected)/processes/@modal/(.)start/[...startStepPath]/page.tsx +4 -7
- package/dist/dashboard-source/apps/frontend/app/(protected)/processes/@modal/default.tsx +3 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/processes/client-layout.tsx +28 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/processes/client.tsx +1 -3
- package/dist/dashboard-source/apps/frontend/app/(protected)/processes/components/start-process-form.tsx +193 -117
- package/dist/dashboard-source/apps/frontend/app/(protected)/processes/default.tsx +6 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/processes/layout.tsx +7 -9
- package/dist/dashboard-source/apps/frontend/app/(protected)/processes/page.tsx +3 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/processes/processes-client.tsx +60 -204
- package/dist/dashboard-source/apps/frontend/app/(protected)/processes/start/[...startStepPath]/client.tsx +12 -51
- package/dist/dashboard-source/apps/frontend/app/(protected)/processes/start/[...startStepPath]/page.tsx +27 -4
- package/dist/dashboard-source/apps/frontend/app/(protected)/processes/workflow/[...processPath]/page.tsx +5 -4
- package/dist/dashboard-source/apps/frontend/app/(protected)/processes/workflow/[...processPath]/workflow-flow.tsx +0 -5
- package/dist/dashboard-source/apps/frontend/app/(protected)/processes/workflow/[...processPath]/workflow-form-preview-sheet.tsx +26 -19
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/cedar/[[...tab]]/page.tsx +5 -2
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/cedar/cedar-authorize.ts +85 -9
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/cedar/cedar-types.ts +12 -1
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/cedar/explorer.tsx +66 -4
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/cedar/layout.tsx +3 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/cedar/load-handbook.ts +41 -13
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/invitations/[invitationId]/page.tsx +2 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/invitations/invitation-detail-client.tsx +442 -365
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/invitations/new/page.tsx +8 -2
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/invitations/page.tsx +7 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/invitations-table.tsx +61 -43
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/page.tsx +6 -67
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/providers/page.tsx +7 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/roles/page.tsx +7 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/settings-client.tsx +111 -189
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/settings-page.tsx +86 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/users/[userId]/client.tsx +141 -256
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/users/[userId]/page.tsx +2 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/users/[userId]/tokens/page.tsx +2 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/users/page.tsx +7 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/settings/users-table.tsx +6 -4
- package/dist/dashboard-source/apps/frontend/app/(protected)/stats/[...statsPath]/page.tsx +3 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/to-dos/@modal/(.)complete/[...stepPath]/client.tsx +30 -9
- package/dist/dashboard-source/apps/frontend/app/(protected)/to-dos/@modal/(.)complete/[...stepPath]/page.tsx +3 -1
- package/dist/dashboard-source/apps/frontend/app/(protected)/to-dos/@modal/default.tsx +3 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/to-dos/complete/[...stepPath]/client.tsx +2 -4
- package/dist/dashboard-source/apps/frontend/app/(protected)/to-dos/complete/[...stepPath]/page.tsx +3 -1
- package/dist/dashboard-source/apps/frontend/app/(protected)/to-dos/components/complete-todo-form.tsx +47 -54
- package/dist/dashboard-source/apps/frontend/app/(protected)/to-dos/components/public-completion-correction-form.tsx +37 -54
- package/dist/dashboard-source/apps/frontend/app/(protected)/to-dos/components/todo-form-actions.tsx +1 -1
- package/dist/dashboard-source/apps/frontend/app/(protected)/to-dos/correct/[...stepPath]/page.tsx +3 -1
- package/dist/dashboard-source/apps/frontend/app/(protected)/to-dos/default.tsx +6 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/to-dos/layout.tsx +3 -0
- package/dist/dashboard-source/apps/frontend/app/(protected)/to-dos/lib/mobile-todo-list.ts +4 -25
- package/dist/dashboard-source/apps/frontend/app/(protected)/to-dos/page.tsx +4 -1315
- package/dist/dashboard-source/apps/frontend/app/(protected)/to-dos/to-dos-client.tsx +1282 -0
- package/dist/dashboard-source/apps/frontend/app/api/auth/callback/route.ts +81 -65
- package/dist/dashboard-source/apps/frontend/app/api/auth/delegation/route.ts +8 -2
- package/dist/dashboard-source/apps/frontend/app/api/auth/login/route.ts +0 -1
- package/dist/dashboard-source/apps/frontend/app/api/auth/logout/route.ts +10 -5
- package/dist/dashboard-source/apps/frontend/app/api/auth/passkey/start/route.ts +1 -3
- package/dist/dashboard-source/apps/frontend/app/api/auth/refresh/route.ts +0 -1
- package/dist/dashboard-source/apps/frontend/app/api/auth/revalidate-google/route.ts +68 -0
- package/dist/dashboard-source/apps/frontend/app/api/auth/switch-role/route.ts +1 -3
- package/dist/dashboard-source/apps/frontend/app/api/dev/import-events/route.ts +69 -1
- package/dist/dashboard-source/apps/frontend/app/api/embed/lookup/route.ts +25 -7
- package/dist/dashboard-source/apps/frontend/app/api/embed/submit/route.ts +1 -2
- package/dist/dashboard-source/apps/frontend/app/api/public/start/[address]/route.ts +49 -0
- package/dist/dashboard-source/apps/frontend/app/api/public/to-dos/lookup/route.ts +4 -3
- package/dist/dashboard-source/apps/frontend/app/api/revalidate/route.ts +15 -4
- package/dist/dashboard-source/apps/frontend/app/app-shell.tsx +14 -6
- package/dist/dashboard-source/apps/frontend/app/cli-auth/route.ts +2 -1
- package/dist/dashboard-source/apps/frontend/app/embed/[...startStepPath]/embed-client.tsx +31 -18
- package/dist/dashboard-source/apps/frontend/app/embed/[...startStepPath]/page.tsx +5 -1
- package/dist/dashboard-source/apps/frontend/app/login/page.tsx +4 -4
- package/dist/dashboard-source/apps/frontend/app/login/passkey-button.tsx +11 -6
- package/dist/dashboard-source/apps/frontend/app/login/passkey-help/page.tsx +67 -0
- package/dist/dashboard-source/apps/frontend/app/mcp/[[...endpoint]]/route.ts +44 -0
- package/dist/dashboard-source/apps/frontend/app/public/form/[token]/public-todo-client.tsx +44 -25
- package/dist/dashboard-source/apps/frontend/app/public/start/[address]/form/page.tsx +10 -0
- package/dist/dashboard-source/apps/frontend/app/public/start/[address]/layout.tsx +32 -0
- package/dist/dashboard-source/apps/frontend/app/public/start/[address]/page-client.tsx +319 -0
- package/dist/dashboard-source/apps/frontend/app/public/start/[address]/page-content.tsx +41 -0
- package/dist/dashboard-source/apps/frontend/app/public/start/[address]/page.tsx +10 -0
- package/dist/dashboard-source/apps/frontend/app/public.css +1 -1
- package/dist/dashboard-source/apps/frontend/app/register/passkey/register-passkey-client.tsx +17 -0
- package/dist/dashboard-source/apps/frontend/components/DashboardSection.tsx +9 -15
- package/dist/dashboard-source/apps/frontend/components/Header.tsx +14 -8
- package/dist/dashboard-source/apps/frontend/components/anonymous-page-link.tsx +57 -0
- package/dist/dashboard-source/apps/frontend/components/anonymous-start-form.tsx +24 -0
- package/dist/dashboard-source/apps/frontend/components/app-sidebar.tsx +21 -7
- package/dist/dashboard-source/apps/frontend/components/auth-provider.tsx +12 -7
- package/dist/dashboard-source/apps/frontend/components/browser-only.tsx +19 -0
- package/dist/dashboard-source/apps/frontend/components/config-provider.tsx +0 -1
- package/dist/dashboard-source/apps/frontend/components/delegation-expiry.tsx +24 -13
- package/dist/dashboard-source/apps/frontend/components/form-dialog-content.tsx +22 -2
- package/dist/dashboard-source/apps/frontend/components/journey-timeline.tsx +52 -45
- package/dist/dashboard-source/apps/frontend/components/notification-bell.tsx +0 -1
- package/dist/dashboard-source/apps/frontend/components/sidebar-lists.tsx +0 -1
- package/dist/dashboard-source/apps/frontend/components/token-refresh-scheduler.tsx +38 -11
- package/dist/dashboard-source/apps/frontend/components/ui/sidebar.tsx +0 -1
- package/dist/dashboard-source/apps/frontend/components/ui/tab-pill.tsx +26 -15
- package/dist/dashboard-source/apps/frontend/components/workflow/step-node.tsx +0 -1
- package/dist/dashboard-source/apps/frontend/components/workflow/workflow-edge.tsx +5 -0
- package/dist/dashboard-source/apps/frontend/hooks/use-form-metadata.ts +21 -10
- package/dist/dashboard-source/apps/frontend/hooks/use-process-draft.ts +173 -0
- package/dist/dashboard-source/apps/frontend/hooks/use-weekly-execution-stats.ts +1 -3
- package/dist/dashboard-source/apps/frontend/lib/anonymous-page-form-values.ts +6 -0
- package/dist/dashboard-source/apps/frontend/lib/anonymous-page-server.ts +65 -0
- package/dist/dashboard-source/apps/frontend/lib/appsync-events/adapter.ts +9 -3
- package/dist/dashboard-source/apps/frontend/lib/appsync-events/client.ts +7 -340
- package/dist/dashboard-source/apps/frontend/lib/auth/client-session.ts +2 -0
- package/dist/dashboard-source/apps/frontend/lib/auth/delegations.ts +9 -7
- package/dist/dashboard-source/apps/frontend/lib/auth/google-revalidation.ts +111 -0
- package/dist/dashboard-source/apps/frontend/lib/auth/logout.ts +1 -1
- package/dist/dashboard-source/apps/frontend/lib/auth/passkeys.ts +28 -30
- package/dist/dashboard-source/apps/frontend/lib/auth/providers.ts +10 -0
- package/dist/dashboard-source/apps/frontend/lib/auth/realtime-session-token.ts +1 -0
- package/dist/dashboard-source/apps/frontend/lib/auth/reauthentication-state.ts +4 -4
- package/dist/dashboard-source/apps/frontend/lib/auth/session-admission.ts +11 -7
- package/dist/dashboard-source/apps/frontend/lib/auth/session.ts +27 -10
- package/dist/dashboard-source/apps/frontend/lib/auth/ssr-session.ts +76 -9
- package/dist/dashboard-source/apps/frontend/lib/auth/verify-passkey.ts +25 -3
- package/dist/dashboard-source/apps/frontend/lib/collections/collection-provider-factory.tsx +115 -23
- package/dist/dashboard-source/apps/frontend/lib/collections/draft-process-execution.ts +1 -8
- package/dist/dashboard-source/apps/frontend/lib/collections/execution.ts +6 -2
- package/dist/dashboard-source/apps/frontend/lib/collections/graphql-stream.ts +21 -1
- package/dist/dashboard-source/apps/frontend/lib/collections/process-collection-provider.tsx +3 -0
- package/dist/dashboard-source/apps/frontend/lib/collections/process.ts +8 -2
- package/dist/dashboard-source/apps/frontend/lib/collections/replication-factory.ts +16 -4
- package/dist/dashboard-source/apps/frontend/lib/collections/todo.ts +1 -1
- package/dist/dashboard-source/apps/frontend/lib/dev/import-completed-query-invalidation.tsx +66 -9
- package/dist/dashboard-source/apps/frontend/lib/dev/import-completed-refresh.ts +10 -6
- package/dist/dashboard-source/apps/frontend/lib/effect/navigation.ts +4 -0
- package/dist/dashboard-source/apps/frontend/lib/effect/page-runtime.ts +29 -0
- package/dist/dashboard-source/apps/frontend/lib/effect/params.ts +18 -12
- package/dist/dashboard-source/apps/frontend/lib/effect/run-effect.ts +1 -1
- package/dist/dashboard-source/apps/frontend/lib/effect/runtime.ts +19 -23
- package/dist/dashboard-source/apps/frontend/lib/effect/services/access-token.ts +9 -12
- package/dist/dashboard-source/apps/frontend/lib/effect/services/authorization.ts +12 -12
- package/dist/dashboard-source/apps/frontend/lib/effect/services/form-validation.ts +20 -18
- package/dist/dashboard-source/apps/frontend/lib/effect/services/graphql.ts +32 -16
- package/dist/dashboard-source/apps/frontend/lib/embed-form-server.ts +35 -0
- package/dist/dashboard-source/apps/frontend/lib/embed-manifest.ts +10 -103
- package/dist/dashboard-source/apps/frontend/lib/forms/invitation.ts +43 -0
- package/dist/dashboard-source/apps/frontend/lib/forms/provider-user.ts +64 -0
- package/dist/dashboard-source/apps/frontend/lib/frontend-form-loaders.ts +40 -0
- package/dist/dashboard-source/apps/frontend/lib/frontend-manifest.ts +1 -33
- package/dist/dashboard-source/apps/frontend/lib/generated/gql/gql.ts +123 -33
- package/dist/dashboard-source/apps/frontend/lib/generated/gql/graphql.ts +168 -30
- package/dist/dashboard-source/apps/frontend/lib/generated/gql/index.ts +1 -0
- package/dist/dashboard-source/apps/frontend/lib/graphql/anonymous-page.ts +27 -0
- package/dist/dashboard-source/apps/frontend/lib/graphql/dependent-lookup-query.ts +1 -0
- package/dist/dashboard-source/apps/frontend/lib/graphql/list-queries.ts +34 -29
- package/dist/dashboard-source/apps/frontend/lib/graphql/lookup-provider.tsx +82 -10
- package/dist/dashboard-source/apps/frontend/lib/graphql/org-chart-operations.ts +2 -5
- package/dist/dashboard-source/apps/frontend/lib/graphql/queries.ts +25 -4
- package/dist/dashboard-source/apps/frontend/lib/graphql/server-client.ts +11 -0
- package/dist/dashboard-source/apps/frontend/lib/graphql/settings-queries.ts +13 -104
- package/dist/dashboard-source/apps/frontend/lib/graphql/user-queries.ts +11 -4
- package/dist/dashboard-source/apps/frontend/lib/graphql/workflow-operations.ts +1 -3
- package/dist/dashboard-source/apps/frontend/lib/graphql/workflow-queries.ts +1 -0
- package/dist/dashboard-source/apps/frontend/lib/list-detail-selection.ts +54 -0
- package/dist/dashboard-source/apps/frontend/lib/mcp/executions.ts +110 -0
- package/dist/dashboard-source/apps/frontend/lib/mcp/list-writes.ts +395 -0
- package/dist/dashboard-source/apps/frontend/lib/mcp/lists.ts +263 -0
- package/dist/dashboard-source/apps/frontend/lib/mcp/oauth.ts +889 -0
- package/dist/dashboard-source/apps/frontend/lib/mcp/origin.ts +50 -0
- package/dist/dashboard-source/apps/frontend/lib/mcp/processes.ts +436 -0
- package/dist/dashboard-source/apps/frontend/lib/mcp/read-tool.ts +72 -0
- package/dist/dashboard-source/apps/frontend/lib/mcp/result.ts +4 -0
- package/dist/dashboard-source/apps/frontend/lib/mcp/server.ts +71 -0
- package/dist/dashboard-source/apps/frontend/lib/mcp/store.ts +107 -0
- package/dist/dashboard-source/apps/frontend/lib/mcp/todos.ts +260 -0
- package/dist/dashboard-source/apps/frontend/lib/notifications/notification-preference.ts +0 -1
- package/dist/dashboard-source/apps/frontend/lib/notifications/todo-notification-observer.ts +0 -5
- package/dist/dashboard-source/apps/frontend/lib/org-chart-data.ts +0 -2
- package/dist/dashboard-source/apps/frontend/lib/org-identity.ts +6 -4
- package/dist/dashboard-source/apps/frontend/lib/organisation-form-loaders.ts +4 -0
- package/dist/dashboard-source/apps/frontend/lib/public-todo-form-runtime.ts +0 -1
- package/dist/dashboard-source/apps/frontend/lib/public-todo-model.ts +39 -139
- package/dist/dashboard-source/apps/frontend/lib/public-todo-server.ts +17 -16
- package/dist/dashboard-source/apps/frontend/lib/query-client.ts +0 -1
- package/dist/dashboard-source/apps/frontend/lib/todo-utils.ts +1 -77
- package/dist/dashboard-source/apps/frontend/lib/workflow/layout.ts +3 -7
- package/dist/dashboard-source/apps/frontend/next.config.ts +33 -13
- package/dist/dashboard-source/apps/frontend/package.json +47 -47
- package/dist/dashboard-source/apps/frontend/proxy.ts +72 -14
- package/dist/dashboard-source/modules/auth-local-cedar/src/index.ts +0 -3
- package/dist/dashboard-source/modules/auth-local-cedar/src/lib/auth-local-cedar.ts +165 -233
- package/dist/dashboard-source/modules/auth-local-cedar/src/lib/cedar-reload-notifier.ts +4 -3
- package/dist/dashboard-source/modules/auth-local-cedar/src/lib/config-base.ts +111 -75
- package/dist/dashboard-source/modules/auth-local-cedar/src/lib/policy-watcher.ts +14 -18
- package/dist/dashboard-source/modules/auth-policy/src/index.ts +1 -0
- package/dist/dashboard-source/modules/auth-policy/src/lib/auth-policy.ts +19 -37
- package/dist/dashboard-source/modules/auth-policy/src/lib/current-principal.ts +33 -29
- package/dist/dashboard-source/modules/auth-policy/src/lib/policy-revision.ts +23 -0
- package/dist/dashboard-source/modules/auth-policy/src/lib/types.ts +24 -49
- package/dist/dashboard-source/modules/auth-session/src/index.ts +4 -0
- package/dist/dashboard-source/modules/auth-session/src/lib/project-subscription.ts +13 -0
- package/dist/dashboard-source/modules/auth-session/src/lib/realtime-recipient.ts +10 -2
- package/dist/dashboard-source/modules/auth-session/src/lib/subjects.ts +82 -8
- package/dist/dashboard-source/modules/auth-session/src/lib/workload-access.ts +48 -0
- package/dist/dashboard-source/modules/auth-session/src/lib/workload-audit.ts +52 -0
- package/dist/dashboard-source/modules/aws-common/src/index.ts +0 -1
- package/dist/dashboard-source/modules/effect-json-logger/src/lib/effect-json-logger.ts +6 -9
- package/dist/dashboard-source/modules/form/src/hooks/use-local-storage.ts +5 -3
- package/dist/dashboard-source/modules/form/src/index.ts +1 -10
- package/dist/dashboard-source/modules/form/src/lib/effect-schema-form.tsx +1271 -0
- package/dist/dashboard-source/modules/form/src/lib/form-actions.ts +26 -0
- package/dist/dashboard-source/modules/form/src/lib/form-prefill.tsx +79 -0
- package/dist/dashboard-source/modules/form/src/lib/initial-focus.ts +31 -0
- package/dist/dashboard-source/modules/form/src/lib/lookup-context.tsx +18 -0
- package/dist/dashboard-source/modules/form/src/lib/plugin-registry.ts +4 -0
- package/dist/dashboard-source/modules/form/src/lib/plugin-scripts.ts +26 -0
- package/dist/dashboard-source/modules/form/src/lib/registered-plugin-field.tsx +57 -0
- package/dist/dashboard-source/modules/form/src/lib/schema-lookup.tsx +124 -0
- package/dist/dashboard-source/modules/form/src/lib/schema-typeahead.tsx +522 -0
- package/dist/dashboard-source/modules/form/src/lib/validation-logic.ts +172 -0
- package/dist/dashboard-source/modules/form-schema/src/index.ts +4 -1
- package/dist/dashboard-source/modules/form-schema/src/lib/annotation-helpers.ts +19 -14
- package/dist/dashboard-source/modules/form-schema/src/lib/email.ts +13 -11
- package/dist/dashboard-source/modules/form-schema/src/lib/field-count.ts +15 -13
- package/dist/dashboard-source/modules/form-schema/src/lib/form-annotations.ts +14 -0
- package/dist/dashboard-source/modules/form-schema/src/lib/form-presentation.ts +33 -0
- package/dist/dashboard-source/modules/form-schema/src/lib/form-schema.ts +186 -80
- package/dist/dashboard-source/modules/form-schema/src/lib/number-from-string.ts +26 -0
- package/dist/dashboard-source/modules/form-schema/src/lib/phone.ts +8 -7
- package/dist/dashboard-source/modules/form-schema/src/lib/public-completion-correction.ts +7 -0
- package/dist/dashboard-source/modules/form-schema/src/lib/search-lookup-items.ts +27 -0
- package/dist/dashboard-source/modules/form-submission-schema/src/index.ts +5 -0
- package/dist/dashboard-source/modules/form-submission-schema/src/lib/executable-rules.ts +379 -0
- package/dist/dashboard-source/modules/form-submission-schema/src/lib/form-submission-schema.ts +475 -0
- package/dist/dashboard-source/modules/form-submission-schema/src/lib/json-schema.ts +58 -0
- package/dist/dashboard-source/modules/form-submission-schema/src/lib/schema-defaults.ts +158 -0
- package/dist/dashboard-source/modules/form-submission-schema/src/lib/submission-utils.ts +75 -0
- package/dist/dashboard-source/modules/frontend-manifest/src/lib/browser-plugin-artifact.ts +46 -0
- package/dist/dashboard-source/modules/frontend-manifest/src/lib/frontend-manifest.ts +37 -30
- package/dist/dashboard-source/modules/frontend-plugin-host/src/lib/frontend-plugin-host.ts +9 -1
- package/dist/dashboard-source/modules/openauth/src/client.ts +25 -17
- package/dist/dashboard-source/modules/openauth/src/util.ts +16 -0
- package/dist/dashboard-source/modules/{aws-common/src/lib/project-balance-admission.ts → project-accounting/src/admission.ts} +4 -8
- package/dist/dashboard-source/modules/realtime-client/src/appsync-client.ts +377 -0
- package/dist/dashboard-source/modules/realtime-client/src/index.ts +5 -0
- package/dist/dashboard-source/modules/realtime-client/src/subscription-presence.ts +163 -0
- package/dist/dashboard-source/modules/request-time/src/lib/request-time.ts +6 -24
- package/dist/dashboard-source/modules/rxdb-collections/generated/execution-schema.json +28 -21
- package/dist/dashboard-source/modules/rxdb-collections/src/lib/rxdb-collections.ts +25 -18
- package/dist/dashboard-source/modules/rxdb-collections/src/lib/to-rxdb-schema.ts +60 -10
- package/dist/dashboard-source/modules/shadcn-components/src/index.ts +18 -2
- package/dist/dashboard-source/modules/shadcn-components/src/lib/date-calendar.tsx +93 -0
- package/dist/dashboard-source/modules/shadcn-components/src/lib/date-field.tsx +147 -48
- package/dist/dashboard-source/modules/shadcn-components/src/lib/date-time-display.tsx +273 -0
- package/dist/dashboard-source/modules/shadcn-components/src/lib/local-date-time-input.tsx +108 -0
- package/dist/dashboard-source/modules/shadcn-components/src/lib/lookup-field.tsx +237 -351
- package/dist/dashboard-source/modules/shadcn-components/src/lib/ui/popover.tsx +2 -1
- package/dist/dashboard-source.json +47 -47
- package/dist/graphql-server.mjs +272 -200
- package/dist/job-worker-supervisor.mjs +262 -0
- package/dist/job-worker.mjs +234 -133
- package/dist/main.mjs +30 -6
- package/dist/prepare-dashboard.mjs +8 -8
- package/dist/resources/cedar/policies.cedar +80 -38
- package/dist/resources/cedar/schema.cedarschema +39 -21
- package/dist/resources/graphql-schema/rxdb.graphql +2 -0
- package/dist/resources/graphql-schema/system.graphql +191 -51
- package/package.json +63 -62
- package/dist/chunk-6ntmymmx.js +0 -85
- package/dist/dashboard-source/apps/frontend/app/(protected)/lists/utils.ts +0 -20
- package/dist/dashboard-source/apps/frontend/app/(protected)/processes/components/process-form-actions.tsx +0 -105
- package/dist/dashboard-source/apps/frontend/hooks/use-draft-process-save.ts +0 -189
- package/dist/dashboard-source/apps/frontend/hooks/use-draft-state.ts +0 -79
- package/dist/dashboard-source/apps/frontend/hooks/use-processes-query.ts +0 -56
- package/dist/dashboard-source/modules/form/src/lib/ajv-standard-schema.ts +0 -152
- package/dist/dashboard-source/modules/form/src/lib/client-components-to-form.tsx +0 -1421
- package/dist/dashboard-source/modules/form/src/lib/friendly-validation-message.ts +0 -85
- package/dist/dashboard-source/modules/form/src/lib/walker.tsx +0 -1549
- package/dist/dashboard-source/modules/form-client-representation/src/lib/client-form-definition.ts +0 -440
- package/dist/dashboard-source/modules/form-client-representation/src/lib/plugin-registry.ts +0 -13
- package/dist/dashboard-source/modules/form-client-representation/src/lib/types.ts +0 -336
- package/dist/dashboard-source/modules/form-rule/src/index.ts +0 -21
- package/dist/dashboard-source/modules/form-rule/src/lib/evaluator.ts +0 -531
- package/dist/dashboard-source/modules/form-rule/src/lib/paths.ts +0 -102
- package/dist/dashboard-source/modules/form-rule/src/lib/types.ts +0 -121
- package/dist/dashboard-source/modules/form-schema/src/lib/property-signature.ts +0 -45
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
"use client"
|
|
2
|
-
|
|
3
2
|
import { useQuery } from "@tanstack/react-query"
|
|
3
|
+
import { Schema } from "effect"
|
|
4
4
|
import Link from "next/link"
|
|
5
5
|
import { useRouter } from "next/navigation"
|
|
6
|
-
import {
|
|
6
|
+
import { QRCodeSVG } from "qrcode.react"
|
|
7
|
+
import { useEffect, useRef, useState } from "react"
|
|
8
|
+
import { EffectSchemaForm } from "../../../../../../modules/form/src/lib/effect-schema-form.tsx"
|
|
7
9
|
import { Button } from "../../../../../../modules/shadcn-components/src/index.ts"
|
|
10
|
+
import { DateTimeDisplay } from "../../../../../../modules/shadcn-components/src/lib/date-time-display.tsx"
|
|
8
11
|
import { InvitationDetailSkeleton } from "./invitation-detail-skeleton.tsx"
|
|
9
|
-
import { Checkbox } from "@/components/ui/checkbox"
|
|
10
12
|
import {
|
|
11
13
|
Dialog,
|
|
12
14
|
DialogContent,
|
|
@@ -15,7 +17,8 @@ import {
|
|
|
15
17
|
DialogHeader,
|
|
16
18
|
DialogTitle,
|
|
17
19
|
} from "@/components/ui/dialog"
|
|
18
|
-
import {
|
|
20
|
+
import type { LoginAuthProviders } from "@/lib/auth/providers"
|
|
21
|
+
import { invitationForm } from "@/lib/forms/invitation"
|
|
19
22
|
import { useGraphqlClient } from "@/lib/graphql/client-provider"
|
|
20
23
|
import {
|
|
21
24
|
createInvitation,
|
|
@@ -31,25 +34,37 @@ import {
|
|
|
31
34
|
|
|
32
35
|
interface InvitationDetailClientProps {
|
|
33
36
|
invitationId?: string
|
|
37
|
+
invitationMethods?: LoginAuthProviders["invitationMethods"]
|
|
34
38
|
}
|
|
35
39
|
|
|
36
|
-
|
|
40
|
+
export function InvitationDetailClient(props: InvitationDetailClientProps) {
|
|
41
|
+
return <InvitationEditor key={props.invitationId ?? "new"} {...props} />
|
|
42
|
+
}
|
|
37
43
|
|
|
38
|
-
|
|
44
|
+
function InvitationEditor({
|
|
39
45
|
invitationId,
|
|
46
|
+
invitationMethods,
|
|
40
47
|
}: InvitationDetailClientProps) {
|
|
41
48
|
const router = useRouter()
|
|
42
49
|
const client = useGraphqlClient()
|
|
43
|
-
const [
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
const [saving, setSaving] = useState(false)
|
|
50
|
+
const [formReady, setFormReady] = useState(false)
|
|
51
|
+
const operationBusy = useRef(false)
|
|
52
|
+
const visibilityGeneration = useRef(0)
|
|
47
53
|
const [deleting, setDeleting] = useState(false)
|
|
48
54
|
const [linkBusy, setLinkBusy] = useState(false)
|
|
49
55
|
const [error, setError] = useState<string | null>(null)
|
|
50
56
|
const [revealedLink, setRevealedLink] = useState<string | null>(null)
|
|
51
57
|
const [deleteDialogOpen, setDeleteDialogOpen] = useState(false)
|
|
52
58
|
|
|
59
|
+
useEffect(() => {
|
|
60
|
+
// Next.js can retain route state in Activity; hiding the page must discard
|
|
61
|
+
// the revealed bearer URL as well as its QR code.
|
|
62
|
+
return () => {
|
|
63
|
+
visibilityGeneration.current++
|
|
64
|
+
setRevealedLink(null)
|
|
65
|
+
}
|
|
66
|
+
}, [])
|
|
67
|
+
|
|
53
68
|
const {
|
|
54
69
|
data: invitationDetail,
|
|
55
70
|
isLoading: invitationLoading,
|
|
@@ -62,26 +77,37 @@ export function InvitationDetailClient({
|
|
|
62
77
|
})
|
|
63
78
|
|
|
64
79
|
const {
|
|
65
|
-
data:
|
|
80
|
+
data: loadedRoles,
|
|
66
81
|
isLoading: rolesLoading,
|
|
67
82
|
error: rolesError,
|
|
83
|
+
refetch: refetchRoles,
|
|
68
84
|
} = useQuery({
|
|
69
85
|
queryKey: ["settings", "invitation-roles"],
|
|
70
86
|
queryFn: () => fetchAllInvitationRoles(client),
|
|
71
87
|
})
|
|
72
88
|
|
|
89
|
+
const roles = loadedRoles ?? []
|
|
90
|
+
|
|
73
91
|
useEffect(() => {
|
|
74
|
-
|
|
75
|
-
|
|
92
|
+
let active = true
|
|
93
|
+
setFormReady(false)
|
|
94
|
+
setDeleteDialogOpen(false)
|
|
95
|
+
setError(null)
|
|
96
|
+
void Promise.all([
|
|
97
|
+
refetchRoles(),
|
|
98
|
+
...(invitationId === undefined ? [] : [refetchInvitation()]),
|
|
99
|
+
]).then(() => {
|
|
100
|
+
if (active) setFormReady(true)
|
|
101
|
+
})
|
|
102
|
+
return () => {
|
|
103
|
+
active = false
|
|
76
104
|
}
|
|
77
|
-
|
|
78
|
-
setEmail(invitationDetail.email)
|
|
79
|
-
setSelectedRoleIds(invitationDetail.roles.map((role) => role.id))
|
|
80
|
-
setFormInitialized(true)
|
|
81
|
-
}, [formInitialized, invitationDetail])
|
|
105
|
+
}, [invitationId, refetchInvitation, refetchRoles])
|
|
82
106
|
|
|
83
107
|
const loading =
|
|
84
|
-
|
|
108
|
+
!formReady ||
|
|
109
|
+
rolesLoading ||
|
|
110
|
+
(invitationId !== undefined && invitationLoading)
|
|
85
111
|
const queryError = invitationError || rolesError
|
|
86
112
|
const isImmutable =
|
|
87
113
|
invitationDetail?.status === "ACCEPTED" ||
|
|
@@ -99,71 +125,64 @@ export function InvitationDetailClient({
|
|
|
99
125
|
: "Review and update the invitation before the user signs in."
|
|
100
126
|
: "Create an invitation and assign the roles it should grant."
|
|
101
127
|
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
)
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
const handleSave = async () => {
|
|
114
|
-
if (isReadOnly) {
|
|
115
|
-
setError(
|
|
116
|
-
"This invitation can no longer be changed. Create a new invitation if you need to grant roles again.",
|
|
117
|
-
)
|
|
118
|
-
return
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
const trimmedEmail = email.trim()
|
|
122
|
-
if (!trimmedEmail) {
|
|
123
|
-
setError("Email is required")
|
|
124
|
-
return
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
if (!isValidEmail(trimmedEmail)) {
|
|
128
|
-
setError("Enter a valid email address")
|
|
129
|
-
return
|
|
130
|
-
}
|
|
128
|
+
const schema = invitationForm(
|
|
129
|
+
roles.map((role) => ({
|
|
130
|
+
value: role.id,
|
|
131
|
+
label: role.name,
|
|
132
|
+
description: role.path,
|
|
133
|
+
})),
|
|
134
|
+
isReadOnly,
|
|
135
|
+
)
|
|
131
136
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
return
|
|
137
|
+
const handleSave = async (values: Record<string, unknown>) => {
|
|
138
|
+
if (isReadOnly || operationBusy.current) {
|
|
139
|
+
return [
|
|
140
|
+
{
|
|
141
|
+
field: "",
|
|
142
|
+
message: "Wait for the current action to finish before saving.",
|
|
143
|
+
},
|
|
144
|
+
]
|
|
135
145
|
}
|
|
136
|
-
|
|
137
|
-
setSaving(true)
|
|
146
|
+
operationBusy.current = true
|
|
138
147
|
setError(null)
|
|
139
|
-
const saveInvitation = invitationId
|
|
140
|
-
? () =>
|
|
141
|
-
updateInvitation(client, invitationId, trimmedEmail, selectedRoleIds)
|
|
142
|
-
: () => createInvitation(client, trimmedEmail, selectedRoleIds)
|
|
143
|
-
|
|
144
148
|
try {
|
|
145
|
-
const
|
|
149
|
+
const submitted = Schema.decodeUnknownSync(
|
|
150
|
+
Schema.Struct({
|
|
151
|
+
...schema.fields.invitation.fields,
|
|
152
|
+
...schema.fields.assignments.fields,
|
|
153
|
+
}),
|
|
154
|
+
)(values)
|
|
155
|
+
const result = invitationId
|
|
156
|
+
? await updateInvitation(client, invitationId, submitted.email, [
|
|
157
|
+
...submitted.roleIds,
|
|
158
|
+
])
|
|
159
|
+
: await createInvitation(client, submitted.email, [
|
|
160
|
+
...submitted.roleIds,
|
|
161
|
+
])
|
|
146
162
|
if (result.__typename === "SaveInvitationFailure") {
|
|
147
|
-
|
|
163
|
+
return [{ field: "", message: result.error }]
|
|
148
164
|
} else {
|
|
149
|
-
router.push("/settings")
|
|
165
|
+
router.push("/settings/invitations")
|
|
150
166
|
router.refresh()
|
|
167
|
+
return undefined
|
|
151
168
|
}
|
|
152
169
|
} catch (saveError) {
|
|
153
170
|
let message = "Failed to save invitation"
|
|
154
171
|
if (saveError instanceof Error) {
|
|
155
172
|
message = saveError.message
|
|
156
173
|
}
|
|
157
|
-
|
|
174
|
+
return [{ field: "", message }]
|
|
175
|
+
} finally {
|
|
176
|
+
operationBusy.current = false
|
|
158
177
|
}
|
|
159
|
-
setSaving(false)
|
|
160
178
|
}
|
|
161
179
|
|
|
162
180
|
const handleDelete = async () => {
|
|
163
|
-
if (!invitationId || isReadOnly) {
|
|
181
|
+
if (!invitationId || isReadOnly || operationBusy.current) {
|
|
164
182
|
return
|
|
165
183
|
}
|
|
166
184
|
|
|
185
|
+
operationBusy.current = true
|
|
167
186
|
try {
|
|
168
187
|
setDeleting(true)
|
|
169
188
|
setError(null)
|
|
@@ -177,7 +196,7 @@ export function InvitationDetailClient({
|
|
|
177
196
|
setError(message)
|
|
178
197
|
} else {
|
|
179
198
|
setDeleteDialogOpen(false)
|
|
180
|
-
router.push("/settings")
|
|
199
|
+
router.push("/settings/invitations")
|
|
181
200
|
router.refresh()
|
|
182
201
|
}
|
|
183
202
|
} catch (deleteError) {
|
|
@@ -188,17 +207,7 @@ export function InvitationDetailClient({
|
|
|
188
207
|
setError(message)
|
|
189
208
|
}
|
|
190
209
|
setDeleting(false)
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
const formatWhen = (value: string | null | undefined) => {
|
|
194
|
-
if (!value) {
|
|
195
|
-
return null
|
|
196
|
-
}
|
|
197
|
-
const date = new Date(value)
|
|
198
|
-
if (Number.isNaN(date.getTime())) {
|
|
199
|
-
return value
|
|
200
|
-
}
|
|
201
|
-
return date.toLocaleString()
|
|
210
|
+
operationBusy.current = false
|
|
202
211
|
}
|
|
203
212
|
|
|
204
213
|
const registrationLinkStatusLabel = (
|
|
@@ -221,11 +230,13 @@ export function InvitationDetailClient({
|
|
|
221
230
|
const handleRegistrationLinkAction = async (
|
|
222
231
|
action: "generate" | "reveal" | "rotate" | "revoke",
|
|
223
232
|
) => {
|
|
224
|
-
if (!invitationId || isReadOnly) {
|
|
233
|
+
if (!invitationId || isReadOnly || operationBusy.current) {
|
|
225
234
|
return
|
|
226
235
|
}
|
|
227
236
|
|
|
237
|
+
operationBusy.current = true
|
|
228
238
|
setLinkBusy(true)
|
|
239
|
+
const generation = visibilityGeneration.current
|
|
229
240
|
setError(null)
|
|
230
241
|
|
|
231
242
|
try {
|
|
@@ -250,8 +261,10 @@ export function InvitationDetailClient({
|
|
|
250
261
|
if (result.__typename === "RegistrationLinkActionFailure") {
|
|
251
262
|
setError(result.error)
|
|
252
263
|
} else {
|
|
253
|
-
|
|
254
|
-
|
|
264
|
+
if (generation === visibilityGeneration.current) {
|
|
265
|
+
setRevealedLink(result.registrationLinkUrl)
|
|
266
|
+
await copyLinkToClipboard(result.registrationLinkUrl)
|
|
267
|
+
}
|
|
255
268
|
await refetchInvitation()
|
|
256
269
|
}
|
|
257
270
|
} catch (linkError) {
|
|
@@ -262,6 +275,7 @@ export function InvitationDetailClient({
|
|
|
262
275
|
setError(message)
|
|
263
276
|
} finally {
|
|
264
277
|
setLinkBusy(false)
|
|
278
|
+
operationBusy.current = false
|
|
265
279
|
}
|
|
266
280
|
}
|
|
267
281
|
|
|
@@ -269,18 +283,26 @@ export function InvitationDetailClient({
|
|
|
269
283
|
return <InvitationDetailSkeleton />
|
|
270
284
|
}
|
|
271
285
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
</
|
|
283
|
-
|
|
286
|
+
const queryErrorBanner = queryError ? (
|
|
287
|
+
<div
|
|
288
|
+
role="alert"
|
|
289
|
+
className="rounded-md border border-red-200 bg-red-50 p-4 text-red-700"
|
|
290
|
+
>
|
|
291
|
+
<p className="font-medium">Error</p>
|
|
292
|
+
<p className="text-sm">
|
|
293
|
+
{queryError instanceof Error
|
|
294
|
+
? queryError.message
|
|
295
|
+
: "Failed to load invitation data"}
|
|
296
|
+
</p>
|
|
297
|
+
</div>
|
|
298
|
+
) : null
|
|
299
|
+
|
|
300
|
+
if (
|
|
301
|
+
queryError &&
|
|
302
|
+
((invitationDetail === undefined && invitationId !== undefined) ||
|
|
303
|
+
loadedRoles === undefined)
|
|
304
|
+
) {
|
|
305
|
+
return queryErrorBanner
|
|
284
306
|
}
|
|
285
307
|
|
|
286
308
|
if (invitationId && !invitationDetail) {
|
|
@@ -302,10 +324,39 @@ export function InvitationDetailClient({
|
|
|
302
324
|
</div>
|
|
303
325
|
|
|
304
326
|
<Button asChild variant="outline">
|
|
305
|
-
<Link href="/settings">Back to
|
|
327
|
+
<Link href="/settings/invitations">Back to Invited Users</Link>
|
|
306
328
|
</Button>
|
|
307
329
|
</div>
|
|
308
330
|
|
|
331
|
+
{!invitationId ? (
|
|
332
|
+
<div className="space-y-2 text-sm text-slate-600 dark:text-slate-400">
|
|
333
|
+
<p>
|
|
334
|
+
<strong>Invitations are not sent automatically.</strong>
|
|
335
|
+
{invitationMethods?.sso || invitationMethods?.passkey
|
|
336
|
+
? " After creating the invitation:"
|
|
337
|
+
: null}
|
|
338
|
+
</p>
|
|
339
|
+
{invitationMethods?.sso || invitationMethods?.passkey ? (
|
|
340
|
+
<ul className="list-disc space-y-1 pl-5">
|
|
341
|
+
{invitationMethods.sso ? (
|
|
342
|
+
<li>
|
|
343
|
+
<strong>SSO:</strong> Ask the person to visit the login page
|
|
344
|
+
and sign in using the invited email address.
|
|
345
|
+
</li>
|
|
346
|
+
) : null}
|
|
347
|
+
{invitationMethods.passkey ? (
|
|
348
|
+
<li>
|
|
349
|
+
<strong>Passkey:</strong> Generate a registration link and
|
|
350
|
+
send it to the person yourself.
|
|
351
|
+
</li>
|
|
352
|
+
) : null}
|
|
353
|
+
</ul>
|
|
354
|
+
) : null}
|
|
355
|
+
</div>
|
|
356
|
+
) : null}
|
|
357
|
+
|
|
358
|
+
{queryErrorBanner}
|
|
359
|
+
|
|
309
360
|
{error && (
|
|
310
361
|
<div className="rounded-md border border-red-200 bg-red-50 p-4 text-red-700">
|
|
311
362
|
<p className="font-medium">Error</p>
|
|
@@ -313,282 +364,308 @@ export function InvitationDetailClient({
|
|
|
313
364
|
</div>
|
|
314
365
|
)}
|
|
315
366
|
|
|
316
|
-
<
|
|
317
|
-
<
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
367
|
+
<fieldset disabled={deleting || linkBusy} className="space-y-6">
|
|
368
|
+
<EffectSchemaForm
|
|
369
|
+
schema={schema}
|
|
370
|
+
defaultValues={{
|
|
371
|
+
email: invitationDetail?.email ?? "",
|
|
372
|
+
roleIds: [
|
|
373
|
+
...new Set(invitationDetail?.roles.map((role) => role.id) ?? []),
|
|
374
|
+
],
|
|
375
|
+
}}
|
|
376
|
+
onSubmit={handleSave}
|
|
377
|
+
>
|
|
378
|
+
{({ formState: { isSubmitting: saving } }) => (
|
|
379
|
+
<>
|
|
380
|
+
{invitationDetail ? (
|
|
381
|
+
<div className="space-y-1 text-sm text-slate-600 dark:text-slate-400">
|
|
382
|
+
<p>
|
|
383
|
+
Status:{" "}
|
|
384
|
+
<span className="font-medium text-slate-900 dark:text-slate-100">
|
|
385
|
+
{invitationDetail.status === "PENDING"
|
|
386
|
+
? "Pending"
|
|
387
|
+
: invitationDetail.status === "ACCEPTED"
|
|
388
|
+
? "Accepted"
|
|
389
|
+
: "Legacy closed"}
|
|
390
|
+
</span>
|
|
391
|
+
</p>
|
|
392
|
+
{invitationDetail.status === "ACCEPTED" ? (
|
|
393
|
+
<p>
|
|
394
|
+
Accepted by{" "}
|
|
395
|
+
{[
|
|
396
|
+
invitationDetail.acceptedByProvider,
|
|
397
|
+
invitationDetail.acceptedBySubject,
|
|
398
|
+
]
|
|
399
|
+
.filter(Boolean)
|
|
400
|
+
.join(" / ") || "unknown identity"}
|
|
401
|
+
{invitationDetail.acceptedAt && (
|
|
402
|
+
<>
|
|
403
|
+
{" "}
|
|
404
|
+
·{" "}
|
|
405
|
+
<DateTimeDisplay
|
|
406
|
+
kind="timestamp"
|
|
407
|
+
value={invitationDetail.acceptedAt}
|
|
408
|
+
/>
|
|
409
|
+
</>
|
|
410
|
+
)}
|
|
411
|
+
</p>
|
|
412
|
+
) : null}
|
|
413
|
+
{invitationDetail.status === "LEGACY_CLOSED" ? (
|
|
414
|
+
<p>
|
|
415
|
+
Closed during migration
|
|
416
|
+
{invitationDetail.legacyClosureReason
|
|
417
|
+
? ` (${invitationDetail.legacyClosureReason})`
|
|
418
|
+
: ""}
|
|
419
|
+
{invitationDetail.legacyClosedAt && (
|
|
420
|
+
<>
|
|
421
|
+
{" "}
|
|
422
|
+
·{" "}
|
|
423
|
+
<DateTimeDisplay
|
|
424
|
+
kind="timestamp"
|
|
425
|
+
value={invitationDetail.legacyClosedAt}
|
|
426
|
+
/>
|
|
427
|
+
</>
|
|
428
|
+
)}
|
|
429
|
+
. This does not claim that this invitation created the
|
|
430
|
+
user or assigned roles.
|
|
431
|
+
</p>
|
|
432
|
+
) : null}
|
|
433
|
+
</div>
|
|
434
|
+
) : null}
|
|
435
|
+
{invitationDetail && invitationDetail.status === "PENDING" ? (
|
|
436
|
+
<div className="space-y-4 rounded-lg border border-slate-200 bg-white p-6 dark:border-slate-700 dark:bg-slate-900">
|
|
437
|
+
<h2 className="text-lg font-semibold">Registration Link</h2>
|
|
438
|
+
<p className="text-sm text-slate-600 dark:text-slate-400">
|
|
439
|
+
Passkey Invitation registration requires a seven-day
|
|
440
|
+
Registration Link. The bulk list never includes the bearer
|
|
441
|
+
token; generate or reveal it explicitly when you need to
|
|
442
|
+
share it outside Process Focus.
|
|
443
|
+
</p>
|
|
444
|
+
|
|
445
|
+
<div className="space-y-1 text-sm text-slate-600 dark:text-slate-400">
|
|
446
|
+
<p>
|
|
447
|
+
Status:{" "}
|
|
448
|
+
<span className="font-medium text-slate-900 dark:text-slate-100">
|
|
449
|
+
{registrationLinkStatusLabel(
|
|
450
|
+
invitationDetail.registrationLinkStatus,
|
|
451
|
+
)}
|
|
452
|
+
</span>
|
|
453
|
+
</p>
|
|
454
|
+
{invitationDetail.registrationLinkExpiresAt ? (
|
|
455
|
+
<p>
|
|
456
|
+
Expires:{" "}
|
|
457
|
+
<DateTimeDisplay
|
|
458
|
+
kind="timestamp"
|
|
459
|
+
value={invitationDetail.registrationLinkExpiresAt}
|
|
460
|
+
initialMode="browser-local"
|
|
461
|
+
/>
|
|
462
|
+
</p>
|
|
463
|
+
) : null}
|
|
464
|
+
{invitationDetail.registrationLinkGeneratedAt ? (
|
|
465
|
+
<p>
|
|
466
|
+
Last generated
|
|
467
|
+
{invitationDetail.registrationLinkGeneratedBy
|
|
468
|
+
? ` by ${invitationDetail.registrationLinkGeneratedBy}`
|
|
469
|
+
: ""}
|
|
470
|
+
{" · "}
|
|
471
|
+
<DateTimeDisplay
|
|
472
|
+
kind="timestamp"
|
|
473
|
+
value={invitationDetail.registrationLinkGeneratedAt}
|
|
474
|
+
/>
|
|
475
|
+
</p>
|
|
476
|
+
) : null}
|
|
477
|
+
{invitationDetail.registrationLinkRevealedAt ? (
|
|
478
|
+
<p>
|
|
479
|
+
Last revealed
|
|
480
|
+
{invitationDetail.registrationLinkRevealedBy
|
|
481
|
+
? ` by ${invitationDetail.registrationLinkRevealedBy}`
|
|
482
|
+
: ""}
|
|
483
|
+
{" · "}
|
|
484
|
+
<DateTimeDisplay
|
|
485
|
+
kind="timestamp"
|
|
486
|
+
value={invitationDetail.registrationLinkRevealedAt}
|
|
487
|
+
/>
|
|
488
|
+
</p>
|
|
489
|
+
) : null}
|
|
490
|
+
{invitationDetail.registrationLinkRevokedAt ? (
|
|
491
|
+
<p>
|
|
492
|
+
Last revoked
|
|
493
|
+
{invitationDetail.registrationLinkRevokedBy
|
|
494
|
+
? ` by ${invitationDetail.registrationLinkRevokedBy}`
|
|
495
|
+
: ""}
|
|
496
|
+
{" · "}
|
|
497
|
+
<DateTimeDisplay
|
|
498
|
+
kind="timestamp"
|
|
499
|
+
value={invitationDetail.registrationLinkRevokedAt}
|
|
500
|
+
/>
|
|
501
|
+
</p>
|
|
502
|
+
) : null}
|
|
503
|
+
</div>
|
|
504
|
+
|
|
505
|
+
{revealedLink ? (
|
|
506
|
+
<div className="space-y-2 rounded-md border border-slate-200 bg-slate-50 p-3 dark:border-slate-700 dark:bg-slate-950">
|
|
507
|
+
<p className="text-xs font-medium uppercase tracking-wide text-slate-500">
|
|
508
|
+
Registration link (copy now; it is not stored in this
|
|
509
|
+
page after you leave)
|
|
510
|
+
</p>
|
|
511
|
+
<code className="block break-all text-sm text-slate-900 dark:text-slate-100">
|
|
512
|
+
{revealedLink}
|
|
513
|
+
</code>
|
|
514
|
+
<Button
|
|
515
|
+
type="button"
|
|
516
|
+
size="sm"
|
|
517
|
+
variant="outline"
|
|
518
|
+
onClick={() => copyLinkToClipboard(revealedLink)}
|
|
519
|
+
>
|
|
520
|
+
Copy to clipboard
|
|
521
|
+
</Button>
|
|
522
|
+
<figure className="space-y-2 pt-2">
|
|
523
|
+
<QRCodeSVG
|
|
524
|
+
value={revealedLink}
|
|
525
|
+
size={256}
|
|
526
|
+
level="M"
|
|
527
|
+
marginSize={4}
|
|
528
|
+
bgColor="#ffffff"
|
|
529
|
+
fgColor="#000000"
|
|
530
|
+
role="img"
|
|
531
|
+
title="Registration link QR code"
|
|
532
|
+
aria-label="Registration link QR code"
|
|
533
|
+
className="h-auto max-w-full"
|
|
534
|
+
/>
|
|
535
|
+
<figcaption className="text-sm text-slate-600 dark:text-slate-400">
|
|
536
|
+
Scan to register on your phone.
|
|
537
|
+
</figcaption>
|
|
538
|
+
</figure>
|
|
539
|
+
</div>
|
|
540
|
+
) : null}
|
|
541
|
+
|
|
542
|
+
<div className="flex flex-wrap gap-2">
|
|
543
|
+
{invitationDetail.registrationLinkStatus ===
|
|
544
|
+
"NOT_GENERATED" ||
|
|
545
|
+
invitationDetail.registrationLinkStatus === "EXPIRED" ||
|
|
546
|
+
invitationDetail.registrationLinkStatus === "REVOKED" ? (
|
|
547
|
+
<Button
|
|
548
|
+
type="button"
|
|
549
|
+
onClick={() => handleRegistrationLinkAction("generate")}
|
|
550
|
+
disabled={saving || deleting || linkBusy}
|
|
551
|
+
>
|
|
552
|
+
{invitationDetail.registrationLinkStatus ===
|
|
553
|
+
"NOT_GENERATED"
|
|
554
|
+
? "Generate registration link"
|
|
555
|
+
: "Generate new registration link"}
|
|
556
|
+
</Button>
|
|
557
|
+
) : null}
|
|
558
|
+
{invitationDetail.registrationLinkStatus === "ACTIVE" ? (
|
|
559
|
+
<>
|
|
560
|
+
<Button
|
|
561
|
+
type="button"
|
|
562
|
+
onClick={() => handleRegistrationLinkAction("reveal")}
|
|
563
|
+
disabled={saving || deleting || linkBusy}
|
|
564
|
+
>
|
|
565
|
+
Copy / reveal link
|
|
566
|
+
</Button>
|
|
567
|
+
<Button
|
|
568
|
+
type="button"
|
|
569
|
+
variant="outline"
|
|
570
|
+
onClick={() => handleRegistrationLinkAction("rotate")}
|
|
571
|
+
disabled={saving || deleting || linkBusy}
|
|
572
|
+
>
|
|
573
|
+
Rotate link
|
|
574
|
+
</Button>
|
|
575
|
+
<Button
|
|
576
|
+
type="button"
|
|
577
|
+
variant="destructive"
|
|
578
|
+
onClick={() => handleRegistrationLinkAction("revoke")}
|
|
579
|
+
disabled={saving || deleting || linkBusy}
|
|
580
|
+
>
|
|
581
|
+
Revoke link
|
|
582
|
+
</Button>
|
|
583
|
+
</>
|
|
584
|
+
) : null}
|
|
585
|
+
</div>
|
|
586
|
+
</div>
|
|
587
|
+
) : null}
|
|
588
|
+
|
|
589
|
+
{roles.length === 0 ? (
|
|
590
|
+
<div className="rounded-md border border-amber-200 bg-amber-50 p-4 text-sm text-amber-700">
|
|
591
|
+
No roles are available.
|
|
592
|
+
</div>
|
|
593
|
+
) : null}
|
|
594
|
+
|
|
595
|
+
<div className="flex flex-wrap items-center justify-between gap-3">
|
|
596
|
+
{invitationId && !isReadOnly ? (
|
|
597
|
+
<Button
|
|
598
|
+
type="button"
|
|
599
|
+
variant="destructive"
|
|
600
|
+
onClick={() => setDeleteDialogOpen(true)}
|
|
601
|
+
disabled={saving || deleting || linkBusy}
|
|
602
|
+
>
|
|
603
|
+
Delete Invitation
|
|
604
|
+
</Button>
|
|
605
|
+
) : null}
|
|
606
|
+
|
|
607
|
+
{!isReadOnly ? (
|
|
608
|
+
<Button
|
|
609
|
+
type="submit"
|
|
610
|
+
// The schema preserves the invitation email contract; the
|
|
611
|
+
// browser's email constraint accepts a narrower set.
|
|
612
|
+
formNoValidate
|
|
613
|
+
className="ml-auto"
|
|
614
|
+
disabled={
|
|
615
|
+
saving || deleting || linkBusy || roles.length === 0
|
|
616
|
+
}
|
|
617
|
+
>
|
|
618
|
+
{saving
|
|
619
|
+
? "Saving..."
|
|
620
|
+
: invitationId
|
|
621
|
+
? "Save"
|
|
622
|
+
: "Create Invitation"}
|
|
623
|
+
</Button>
|
|
624
|
+
) : (
|
|
625
|
+
<p className="ml-auto text-sm text-slate-500 dark:text-slate-400">
|
|
626
|
+
No bootstrap or edit actions are available for this
|
|
627
|
+
invitation.
|
|
628
|
+
</p>
|
|
393
629
|
)}
|
|
394
|
-
</span>
|
|
395
|
-
</p>
|
|
396
|
-
{invitationDetail.registrationLinkExpiresAt ? (
|
|
397
|
-
<p>
|
|
398
|
-
Expires:{" "}
|
|
399
|
-
{formatWhen(invitationDetail.registrationLinkExpiresAt) ?? "—"}
|
|
400
|
-
</p>
|
|
401
|
-
) : null}
|
|
402
|
-
{invitationDetail.registrationLinkGeneratedAt ? (
|
|
403
|
-
<p>
|
|
404
|
-
Last generated
|
|
405
|
-
{invitationDetail.registrationLinkGeneratedBy
|
|
406
|
-
? ` by ${invitationDetail.registrationLinkGeneratedBy}`
|
|
407
|
-
: ""}
|
|
408
|
-
{formatWhen(invitationDetail.registrationLinkGeneratedAt)
|
|
409
|
-
? ` at ${formatWhen(invitationDetail.registrationLinkGeneratedAt)}`
|
|
410
|
-
: ""}
|
|
411
|
-
</p>
|
|
412
|
-
) : null}
|
|
413
|
-
{invitationDetail.registrationLinkRevealedAt ? (
|
|
414
|
-
<p>
|
|
415
|
-
Last revealed
|
|
416
|
-
{invitationDetail.registrationLinkRevealedBy
|
|
417
|
-
? ` by ${invitationDetail.registrationLinkRevealedBy}`
|
|
418
|
-
: ""}
|
|
419
|
-
{formatWhen(invitationDetail.registrationLinkRevealedAt)
|
|
420
|
-
? ` at ${formatWhen(invitationDetail.registrationLinkRevealedAt)}`
|
|
421
|
-
: ""}
|
|
422
|
-
</p>
|
|
423
|
-
) : null}
|
|
424
|
-
{invitationDetail.registrationLinkRevokedAt ? (
|
|
425
|
-
<p>
|
|
426
|
-
Last revoked
|
|
427
|
-
{invitationDetail.registrationLinkRevokedBy
|
|
428
|
-
? ` by ${invitationDetail.registrationLinkRevokedBy}`
|
|
429
|
-
: ""}
|
|
430
|
-
{formatWhen(invitationDetail.registrationLinkRevokedAt)
|
|
431
|
-
? ` at ${formatWhen(invitationDetail.registrationLinkRevokedAt)}`
|
|
432
|
-
: ""}
|
|
433
|
-
</p>
|
|
434
|
-
) : null}
|
|
435
|
-
</div>
|
|
436
|
-
|
|
437
|
-
{revealedLink ? (
|
|
438
|
-
<div className="space-y-2 rounded-md border border-slate-200 bg-slate-50 p-3 dark:border-slate-700 dark:bg-slate-950">
|
|
439
|
-
<p className="text-xs font-medium uppercase tracking-wide text-slate-500">
|
|
440
|
-
Registration link (copy now; it is not stored in this page after
|
|
441
|
-
you leave)
|
|
442
|
-
</p>
|
|
443
|
-
<code className="block break-all text-sm text-slate-900 dark:text-slate-100">
|
|
444
|
-
{revealedLink}
|
|
445
|
-
</code>
|
|
446
|
-
<Button
|
|
447
|
-
type="button"
|
|
448
|
-
size="sm"
|
|
449
|
-
variant="outline"
|
|
450
|
-
onClick={() => copyLinkToClipboard(revealedLink)}
|
|
451
|
-
>
|
|
452
|
-
Copy to clipboard
|
|
453
|
-
</Button>
|
|
454
|
-
</div>
|
|
455
|
-
) : null}
|
|
456
|
-
|
|
457
|
-
<div className="flex flex-wrap gap-2">
|
|
458
|
-
{invitationDetail.registrationLinkStatus === "NOT_GENERATED" ||
|
|
459
|
-
invitationDetail.registrationLinkStatus === "EXPIRED" ||
|
|
460
|
-
invitationDetail.registrationLinkStatus === "REVOKED" ? (
|
|
461
|
-
<Button
|
|
462
|
-
type="button"
|
|
463
|
-
onClick={() => handleRegistrationLinkAction("generate")}
|
|
464
|
-
disabled={saving || deleting || linkBusy}
|
|
465
|
-
>
|
|
466
|
-
{invitationDetail.registrationLinkStatus === "NOT_GENERATED"
|
|
467
|
-
? "Generate registration link"
|
|
468
|
-
: "Generate new registration link"}
|
|
469
|
-
</Button>
|
|
470
|
-
) : null}
|
|
471
|
-
{invitationDetail.registrationLinkStatus === "ACTIVE" ? (
|
|
472
|
-
<>
|
|
473
|
-
<Button
|
|
474
|
-
type="button"
|
|
475
|
-
onClick={() => handleRegistrationLinkAction("reveal")}
|
|
476
|
-
disabled={saving || deleting || linkBusy}
|
|
477
|
-
>
|
|
478
|
-
Copy / reveal link
|
|
479
|
-
</Button>
|
|
480
|
-
<Button
|
|
481
|
-
type="button"
|
|
482
|
-
variant="outline"
|
|
483
|
-
onClick={() => handleRegistrationLinkAction("rotate")}
|
|
484
|
-
disabled={saving || deleting || linkBusy}
|
|
485
|
-
>
|
|
486
|
-
Rotate link
|
|
487
|
-
</Button>
|
|
488
|
-
<Button
|
|
489
|
-
type="button"
|
|
490
|
-
variant="destructive"
|
|
491
|
-
onClick={() => handleRegistrationLinkAction("revoke")}
|
|
492
|
-
disabled={saving || deleting || linkBusy}
|
|
493
|
-
>
|
|
494
|
-
Revoke link
|
|
495
|
-
</Button>
|
|
496
|
-
</>
|
|
497
|
-
) : null}
|
|
498
|
-
</div>
|
|
499
|
-
</div>
|
|
500
|
-
) : null}
|
|
501
|
-
|
|
502
|
-
<div className="space-y-4 rounded-lg border border-slate-200 bg-white p-6 dark:border-slate-700 dark:bg-slate-900">
|
|
503
|
-
<h2 className="text-lg font-semibold">Role Assignments</h2>
|
|
504
|
-
|
|
505
|
-
{roles.length === 0 ? (
|
|
506
|
-
<div className="rounded-md border border-amber-200 bg-amber-50 p-4 text-sm text-amber-700">
|
|
507
|
-
No roles are available.
|
|
508
|
-
</div>
|
|
509
|
-
) : (
|
|
510
|
-
<div className="space-y-3">
|
|
511
|
-
{roles.map((role) => (
|
|
512
|
-
<div key={role.id} className="flex items-center gap-3">
|
|
513
|
-
<Checkbox
|
|
514
|
-
id={`role-${role.id}`}
|
|
515
|
-
checked={selectedRoleIds.includes(role.id)}
|
|
516
|
-
onCheckedChange={() => handleRoleToggle(role.id)}
|
|
517
|
-
disabled={saving || deleting || isReadOnly}
|
|
518
|
-
/>
|
|
519
|
-
<label
|
|
520
|
-
htmlFor={`role-${role.id}`}
|
|
521
|
-
className="flex cursor-pointer flex-col"
|
|
522
|
-
>
|
|
523
|
-
<span className="font-medium">{role.name}</span>
|
|
524
|
-
<span className="text-sm text-slate-500 dark:text-slate-400">
|
|
525
|
-
{role.path}
|
|
526
|
-
</span>
|
|
527
|
-
</label>
|
|
528
630
|
</div>
|
|
529
|
-
))}
|
|
530
|
-
</div>
|
|
531
|
-
)}
|
|
532
|
-
</div>
|
|
533
631
|
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
<DialogFooter>
|
|
573
|
-
<Button
|
|
574
|
-
type="button"
|
|
575
|
-
variant="outline"
|
|
576
|
-
onClick={() => setDeleteDialogOpen(false)}
|
|
577
|
-
disabled={deleting}
|
|
578
|
-
>
|
|
579
|
-
Cancel
|
|
580
|
-
</Button>
|
|
581
|
-
<Button
|
|
582
|
-
type="button"
|
|
583
|
-
variant="destructive"
|
|
584
|
-
onClick={handleDelete}
|
|
585
|
-
disabled={deleting}
|
|
586
|
-
>
|
|
587
|
-
{deleting ? "Deleting..." : "Delete Invitation"}
|
|
588
|
-
</Button>
|
|
589
|
-
</DialogFooter>
|
|
590
|
-
</DialogContent>
|
|
591
|
-
</Dialog>
|
|
632
|
+
<Dialog
|
|
633
|
+
open={deleteDialogOpen}
|
|
634
|
+
onOpenChange={setDeleteDialogOpen}
|
|
635
|
+
>
|
|
636
|
+
<DialogContent>
|
|
637
|
+
<DialogHeader>
|
|
638
|
+
<DialogTitle>Delete Invitation</DialogTitle>
|
|
639
|
+
<DialogDescription>
|
|
640
|
+
This removes the invitation for{" "}
|
|
641
|
+
{invitationDetail?.email ?? "this user"}.
|
|
642
|
+
</DialogDescription>
|
|
643
|
+
</DialogHeader>
|
|
644
|
+
|
|
645
|
+
<DialogFooter>
|
|
646
|
+
<Button
|
|
647
|
+
type="button"
|
|
648
|
+
variant="outline"
|
|
649
|
+
onClick={() => setDeleteDialogOpen(false)}
|
|
650
|
+
disabled={saving || deleting || linkBusy}
|
|
651
|
+
>
|
|
652
|
+
Cancel
|
|
653
|
+
</Button>
|
|
654
|
+
<Button
|
|
655
|
+
type="button"
|
|
656
|
+
variant="destructive"
|
|
657
|
+
onClick={handleDelete}
|
|
658
|
+
disabled={saving || deleting || linkBusy}
|
|
659
|
+
>
|
|
660
|
+
{deleting ? "Deleting..." : "Delete Invitation"}
|
|
661
|
+
</Button>
|
|
662
|
+
</DialogFooter>
|
|
663
|
+
</DialogContent>
|
|
664
|
+
</Dialog>
|
|
665
|
+
</>
|
|
666
|
+
)}
|
|
667
|
+
</EffectSchemaForm>
|
|
668
|
+
</fieldset>
|
|
592
669
|
</div>
|
|
593
670
|
)
|
|
594
671
|
}
|