@antelopejs/dms-saas 0.0.1
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/LICENSE +190 -0
- package/README.md +658 -0
- package/dist/auth/index.d.ts +3 -0
- package/dist/auth/index.js +20 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/auth/oauth-entry.d.ts +5 -0
- package/dist/auth/oauth-entry.js +10 -0
- package/dist/auth/oauth-entry.js.map +1 -0
- package/dist/auth/plan-permissions-resolver.d.ts +1 -0
- package/dist/auth/plan-permissions-resolver.js +44 -0
- package/dist/auth/plan-permissions-resolver.js.map +1 -0
- package/dist/auth/subscription-access-gate.d.ts +8 -0
- package/dist/auth/subscription-access-gate.js +38 -0
- package/dist/auth/subscription-access-gate.js.map +1 -0
- package/dist/automation/index.d.ts +44 -0
- package/dist/automation/index.js +209 -0
- package/dist/automation/index.js.map +1 -0
- package/dist/billing-state/index.d.ts +5 -0
- package/dist/billing-state/index.js +58 -0
- package/dist/billing-state/index.js.map +1 -0
- package/dist/billing-state/recovery.d.ts +22 -0
- package/dist/billing-state/recovery.js +81 -0
- package/dist/billing-state/recovery.js.map +1 -0
- package/dist/config/dev-mode.d.ts +3 -0
- package/dist/config/dev-mode.js +27 -0
- package/dist/config/dev-mode.js.map +1 -0
- package/dist/config/index.d.ts +2 -0
- package/dist/config/index.js +19 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/runtime.d.ts +6 -0
- package/dist/config/runtime.js +54 -0
- package/dist/config/runtime.js.map +1 -0
- package/dist/crons/auto-suspend-past-due.d.ts +2 -0
- package/dist/crons/auto-suspend-past-due.js +43 -0
- package/dist/crons/auto-suspend-past-due.js.map +1 -0
- package/dist/crons/cleanup-stripe-webhook-events.d.ts +2 -0
- package/dist/crons/cleanup-stripe-webhook-events.js +27 -0
- package/dist/crons/cleanup-stripe-webhook-events.js.map +1 -0
- package/dist/crons/expire-free-workspaces.d.ts +2 -0
- package/dist/crons/expire-free-workspaces.js +36 -0
- package/dist/crons/expire-free-workspaces.js.map +1 -0
- package/dist/crons/hard-delete-cancelled.d.ts +2 -0
- package/dist/crons/hard-delete-cancelled.js +55 -0
- package/dist/crons/hard-delete-cancelled.js.map +1 -0
- package/dist/crons/index.d.ts +8 -0
- package/dist/crons/index.js +25 -0
- package/dist/crons/index.js.map +1 -0
- package/dist/crons/notify-free-workspaces-ending-soon.d.ts +2 -0
- package/dist/crons/notify-free-workspaces-ending-soon.js +69 -0
- package/dist/crons/notify-free-workspaces-ending-soon.js.map +1 -0
- package/dist/crons/recompute-billing-state.d.ts +2 -0
- package/dist/crons/recompute-billing-state.js +19 -0
- package/dist/crons/recompute-billing-state.js.map +1 -0
- package/dist/crons/recompute-segments.d.ts +2 -0
- package/dist/crons/recompute-segments.js +19 -0
- package/dist/crons/recompute-segments.js.map +1 -0
- package/dist/crons/reconcile-workspace-lifecycle.d.ts +2 -0
- package/dist/crons/reconcile-workspace-lifecycle.js +19 -0
- package/dist/crons/reconcile-workspace-lifecycle.js.map +1 -0
- package/dist/crons/register.d.ts +2 -0
- package/dist/crons/register.js +24 -0
- package/dist/crons/register.js.map +1 -0
- package/dist/crons/subscription-notifications.d.ts +2 -0
- package/dist/crons/subscription-notifications.js +55 -0
- package/dist/crons/subscription-notifications.js.map +1 -0
- package/dist/data-api/index.d.ts +2 -0
- package/dist/data-api/index.js +19 -0
- package/dist/data-api/index.js.map +1 -0
- package/dist/data-api/platformOwner/admin-user-invoices.d.ts +27 -0
- package/dist/data-api/platformOwner/admin-user-invoices.js +158 -0
- package/dist/data-api/platformOwner/admin-user-invoices.js.map +1 -0
- package/dist/data-api/platformOwner/admin-user-workspaces.d.ts +22 -0
- package/dist/data-api/platformOwner/admin-user-workspaces.js +97 -0
- package/dist/data-api/platformOwner/admin-user-workspaces.js.map +1 -0
- package/dist/data-api/platformOwner/credit-notes.d.ts +24 -0
- package/dist/data-api/platformOwner/credit-notes.js +133 -0
- package/dist/data-api/platformOwner/credit-notes.js.map +1 -0
- package/dist/data-api/platformOwner/features.d.ts +30 -0
- package/dist/data-api/platformOwner/features.js +141 -0
- package/dist/data-api/platformOwner/features.js.map +1 -0
- package/dist/data-api/platformOwner/hidden-filter.d.ts +1 -0
- package/dist/data-api/platformOwner/hidden-filter.js +18 -0
- package/dist/data-api/platformOwner/hidden-filter.js.map +1 -0
- package/dist/data-api/platformOwner/index.d.ts +12 -0
- package/dist/data-api/platformOwner/index.js +29 -0
- package/dist/data-api/platformOwner/index.js.map +1 -0
- package/dist/data-api/platformOwner/invoice-options.d.ts +7 -0
- package/dist/data-api/platformOwner/invoice-options.js +14 -0
- package/dist/data-api/platformOwner/invoice-options.js.map +1 -0
- package/dist/data-api/platformOwner/invoices.d.ts +26 -0
- package/dist/data-api/platformOwner/invoices.js +147 -0
- package/dist/data-api/platformOwner/invoices.js.map +1 -0
- package/dist/data-api/platformOwner/members.d.ts +24 -0
- package/dist/data-api/platformOwner/members.js +125 -0
- package/dist/data-api/platformOwner/members.js.map +1 -0
- package/dist/data-api/platformOwner/plan-migrations.d.ts +24 -0
- package/dist/data-api/platformOwner/plan-migrations.js +138 -0
- package/dist/data-api/platformOwner/plan-migrations.js.map +1 -0
- package/dist/data-api/platformOwner/plans.d.ts +30 -0
- package/dist/data-api/platformOwner/plans.js +228 -0
- package/dist/data-api/platformOwner/plans.js.map +1 -0
- package/dist/data-api/platformOwner/segments.d.ts +29 -0
- package/dist/data-api/platformOwner/segments.js +223 -0
- package/dist/data-api/platformOwner/segments.js.map +1 -0
- package/dist/data-api/platformOwner/support.d.ts +58 -0
- package/dist/data-api/platformOwner/support.js +111 -0
- package/dist/data-api/platformOwner/support.js.map +1 -0
- package/dist/data-api/platformOwner/users.d.ts +22 -0
- package/dist/data-api/platformOwner/users.js +128 -0
- package/dist/data-api/platformOwner/users.js.map +1 -0
- package/dist/data-api/platformOwner/workspaces.d.ts +22 -0
- package/dist/data-api/platformOwner/workspaces.js +153 -0
- package/dist/data-api/platformOwner/workspaces.js.map +1 -0
- package/dist/data-api/support-fields.d.ts +49 -0
- package/dist/data-api/support-fields.js +166 -0
- package/dist/data-api/support-fields.js.map +1 -0
- package/dist/data-api/support-routes.d.ts +10 -0
- package/dist/data-api/support-routes.js +71 -0
- package/dist/data-api/support-routes.js.map +1 -0
- package/dist/data-api/tenant/index.d.ts +2 -0
- package/dist/data-api/tenant/index.js +19 -0
- package/dist/data-api/tenant/index.js.map +1 -0
- package/dist/data-api/tenant/support.d.ts +39 -0
- package/dist/data-api/tenant/support.js +53 -0
- package/dist/data-api/tenant/support.js.map +1 -0
- package/dist/data-api/tenant/tenant-invoices.d.ts +37 -0
- package/dist/data-api/tenant/tenant-invoices.js +242 -0
- package/dist/data-api/tenant/tenant-invoices.js.map +1 -0
- package/dist/db/index.d.ts +1 -0
- package/dist/db/index.js +18 -0
- package/dist/db/index.js.map +1 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.js +20 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/register.d.ts +1 -0
- package/dist/hooks/register.js +57 -0
- package/dist/hooks/register.js.map +1 -0
- package/dist/hooks/tenant-export.d.ts +2 -0
- package/dist/hooks/tenant-export.js +64 -0
- package/dist/hooks/tenant-export.js.map +1 -0
- package/dist/hooks/tenant-provisioning.d.ts +3 -0
- package/dist/hooks/tenant-provisioning.js +12 -0
- package/dist/hooks/tenant-provisioning.js.map +1 -0
- package/dist/implementations/dms-saas/billing.d.ts +2 -0
- package/dist/implementations/dms-saas/billing.js +49 -0
- package/dist/implementations/dms-saas/billing.js.map +1 -0
- package/dist/implementations/dms-saas/invoice-line-items.d.ts +11 -0
- package/dist/implementations/dms-saas/invoice-line-items.js +24 -0
- package/dist/implementations/dms-saas/invoice-line-items.js.map +1 -0
- package/dist/implementations/dms-saas/pages.d.ts +3 -0
- package/dist/implementations/dms-saas/pages.js +12 -0
- package/dist/implementations/dms-saas/pages.js.map +1 -0
- package/dist/implementations/dms-saas/workspace-lifecycle.d.ts +2 -0
- package/dist/implementations/dms-saas/workspace-lifecycle.js +23 -0
- package/dist/implementations/dms-saas/workspace-lifecycle.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +107 -0
- package/dist/index.js.map +1 -0
- package/dist/invoice-line-items/billing-window.d.ts +3 -0
- package/dist/invoice-line-items/billing-window.js +19 -0
- package/dist/invoice-line-items/billing-window.js.map +1 -0
- package/dist/invoice-line-items/index.d.ts +1 -0
- package/dist/invoice-line-items/index.js +18 -0
- package/dist/invoice-line-items/index.js.map +1 -0
- package/dist/invoice-line-items/injection.d.ts +2 -0
- package/dist/invoice-line-items/injection.js +171 -0
- package/dist/invoice-line-items/injection.js.map +1 -0
- package/dist/notifications/index.d.ts +2 -0
- package/dist/notifications/index.js +19 -0
- package/dist/notifications/index.js.map +1 -0
- package/dist/notifications/recipients.d.ts +14 -0
- package/dist/notifications/recipients.js +87 -0
- package/dist/notifications/recipients.js.map +1 -0
- package/dist/notifications/subjects.d.ts +21 -0
- package/dist/notifications/subjects.js +121 -0
- package/dist/notifications/subjects.js.map +1 -0
- package/dist/operator-actions/commands.d.ts +41 -0
- package/dist/operator-actions/commands.js +233 -0
- package/dist/operator-actions/commands.js.map +1 -0
- package/dist/operator-actions/db/index.d.ts +4 -0
- package/dist/operator-actions/db/index.js +21 -0
- package/dist/operator-actions/db/index.js.map +1 -0
- package/dist/operator-actions/db/lifecycle-delivery.model.d.ts +29 -0
- package/dist/operator-actions/db/lifecycle-delivery.model.js +85 -0
- package/dist/operator-actions/db/lifecycle-delivery.model.js.map +1 -0
- package/dist/operator-actions/db/lifecycle-delivery.table.d.ts +26 -0
- package/dist/operator-actions/db/lifecycle-delivery.table.js +107 -0
- package/dist/operator-actions/db/lifecycle-delivery.table.js.map +1 -0
- package/dist/operator-actions/db/operator-action.model.d.ts +33 -0
- package/dist/operator-actions/db/operator-action.model.js +63 -0
- package/dist/operator-actions/db/operator-action.model.js.map +1 -0
- package/dist/operator-actions/db/operator-action.table.d.ts +21 -0
- package/dist/operator-actions/db/operator-action.table.js +95 -0
- package/dist/operator-actions/db/operator-action.table.js.map +1 -0
- package/dist/operator-actions/index.d.ts +3 -0
- package/dist/operator-actions/index.js +20 -0
- package/dist/operator-actions/index.js.map +1 -0
- package/dist/operator-actions/journal.d.ts +22 -0
- package/dist/operator-actions/journal.js +183 -0
- package/dist/operator-actions/journal.js.map +1 -0
- package/dist/operator-actions/lifecycle-consumers.d.ts +12 -0
- package/dist/operator-actions/lifecycle-consumers.js +28 -0
- package/dist/operator-actions/lifecycle-consumers.js.map +1 -0
- package/dist/operator-actions/lifecycle-outbox.d.ts +19 -0
- package/dist/operator-actions/lifecycle-outbox.js +229 -0
- package/dist/operator-actions/lifecycle-outbox.js.map +1 -0
- package/dist/operator-actions/types.d.ts +11 -0
- package/dist/operator-actions/types.js +3 -0
- package/dist/operator-actions/types.js.map +1 -0
- package/dist/pages/definitions.d.ts +1 -0
- package/dist/pages/definitions.js +18 -0
- package/dist/pages/definitions.js.map +1 -0
- package/dist/pages/index.d.ts +4 -0
- package/dist/pages/index.js +21 -0
- package/dist/pages/index.js.map +1 -0
- package/dist/pages/module.d.ts +5 -0
- package/dist/pages/module.js +15 -0
- package/dist/pages/module.js.map +1 -0
- package/dist/pages/platform/categories.d.ts +6 -0
- package/dist/pages/platform/categories.js +48 -0
- package/dist/pages/platform/categories.js.map +1 -0
- package/dist/pages/platform/credit-notes.d.ts +9 -0
- package/dist/pages/platform/credit-notes.js +40 -0
- package/dist/pages/platform/credit-notes.js.map +1 -0
- package/dist/pages/platform/dashboard.d.ts +10 -0
- package/dist/pages/platform/dashboard.js +95 -0
- package/dist/pages/platform/dashboard.js.map +1 -0
- package/dist/pages/platform/features.d.ts +9 -0
- package/dist/pages/platform/features.js +42 -0
- package/dist/pages/platform/features.js.map +1 -0
- package/dist/pages/platform/index.d.ts +15 -0
- package/dist/pages/platform/index.js +32 -0
- package/dist/pages/platform/index.js.map +1 -0
- package/dist/pages/platform/invoices.d.ts +9 -0
- package/dist/pages/platform/invoices.js +63 -0
- package/dist/pages/platform/invoices.js.map +1 -0
- package/dist/pages/platform/plans/edit.d.ts +17 -0
- package/dist/pages/platform/plans/edit.js +213 -0
- package/dist/pages/platform/plans/edit.js.map +1 -0
- package/dist/pages/platform/plans/index.d.ts +9 -0
- package/dist/pages/platform/plans/index.js +99 -0
- package/dist/pages/platform/plans/index.js.map +1 -0
- package/dist/pages/platform/plans/migrations.d.ts +9 -0
- package/dist/pages/platform/plans/migrations.js +38 -0
- package/dist/pages/platform/plans/migrations.js.map +1 -0
- package/dist/pages/platform/segments/index.d.ts +9 -0
- package/dist/pages/platform/segments/index.js +59 -0
- package/dist/pages/platform/segments/index.js.map +1 -0
- package/dist/pages/platform/settings.d.ts +9 -0
- package/dist/pages/platform/settings.js +147 -0
- package/dist/pages/platform/settings.js.map +1 -0
- package/dist/pages/platform/support.d.ts +9 -0
- package/dist/pages/platform/support.js +29 -0
- package/dist/pages/platform/support.js.map +1 -0
- package/dist/pages/platform/users/detail.d.ts +9 -0
- package/dist/pages/platform/users/detail.js +78 -0
- package/dist/pages/platform/users/detail.js.map +1 -0
- package/dist/pages/platform/users/index.d.ts +9 -0
- package/dist/pages/platform/users/index.js +77 -0
- package/dist/pages/platform/users/index.js.map +1 -0
- package/dist/pages/platform/workspaces/detail.d.ts +9 -0
- package/dist/pages/platform/workspaces/detail.js +120 -0
- package/dist/pages/platform/workspaces/detail.js.map +1 -0
- package/dist/pages/platform/workspaces/index.d.ts +35 -0
- package/dist/pages/platform/workspaces/index.js +300 -0
- package/dist/pages/platform/workspaces/index.js.map +1 -0
- package/dist/pages/public/auth/index.d.ts +1 -0
- package/dist/pages/public/auth/index.js +18 -0
- package/dist/pages/public/auth/index.js.map +1 -0
- package/dist/pages/public/auth/no-workspace.d.ts +9 -0
- package/dist/pages/public/auth/no-workspace.js +26 -0
- package/dist/pages/public/auth/no-workspace.js.map +1 -0
- package/dist/pages/public/index.d.ts +3 -0
- package/dist/pages/public/index.js +20 -0
- package/dist/pages/public/index.js.map +1 -0
- package/dist/pages/public/legal/index.d.ts +3 -0
- package/dist/pages/public/legal/index.js +20 -0
- package/dist/pages/public/legal/index.js.map +1 -0
- package/dist/pages/public/legal/privacy-policy.d.ts +9 -0
- package/dist/pages/public/legal/privacy-policy.js +29 -0
- package/dist/pages/public/legal/privacy-policy.js.map +1 -0
- package/dist/pages/public/legal/terms-and-conditions.d.ts +9 -0
- package/dist/pages/public/legal/terms-and-conditions.js +29 -0
- package/dist/pages/public/legal/terms-and-conditions.js.map +1 -0
- package/dist/pages/public/legal/terms-of-use.d.ts +9 -0
- package/dist/pages/public/legal/terms-of-use.js +29 -0
- package/dist/pages/public/legal/terms-of-use.js.map +1 -0
- package/dist/pages/public/register.d.ts +9 -0
- package/dist/pages/public/register.js +29 -0
- package/dist/pages/public/register.js.map +1 -0
- package/dist/pages/public/screens.d.ts +3 -0
- package/dist/pages/public/screens.js +50 -0
- package/dist/pages/public/screens.js.map +1 -0
- package/dist/pages/tenant/billing.d.ts +15 -0
- package/dist/pages/tenant/billing.js +87 -0
- package/dist/pages/tenant/billing.js.map +1 -0
- package/dist/pages/tenant/data-export.d.ts +10 -0
- package/dist/pages/tenant/data-export.js +32 -0
- package/dist/pages/tenant/data-export.js.map +1 -0
- package/dist/pages/tenant/general.d.ts +10 -0
- package/dist/pages/tenant/general.js +33 -0
- package/dist/pages/tenant/general.js.map +1 -0
- package/dist/pages/tenant/index.d.ts +6 -0
- package/dist/pages/tenant/index.js +23 -0
- package/dist/pages/tenant/index.js.map +1 -0
- package/dist/pages/tenant/members-seat-quota.d.ts +3 -0
- package/dist/pages/tenant/members-seat-quota.js +25 -0
- package/dist/pages/tenant/members-seat-quota.js.map +1 -0
- package/dist/pages/tenant/support.d.ts +9 -0
- package/dist/pages/tenant/support.js +27 -0
- package/dist/pages/tenant/support.js.map +1 -0
- package/dist/pages/tenant/workspace-suspended.d.ts +9 -0
- package/dist/pages/tenant/workspace-suspended.js +26 -0
- package/dist/pages/tenant/workspace-suspended.js.map +1 -0
- package/dist/plan-changes/deferred.d.ts +18 -0
- package/dist/plan-changes/deferred.js +225 -0
- package/dist/plan-changes/deferred.js.map +1 -0
- package/dist/plan-changes/index.d.ts +1 -0
- package/dist/plan-changes/index.js +18 -0
- package/dist/plan-changes/index.js.map +1 -0
- package/dist/plans/index.d.ts +4 -0
- package/dist/plans/index.js +21 -0
- package/dist/plans/index.js.map +1 -0
- package/dist/plans/seat-capacity.d.ts +9 -0
- package/dist/plans/seat-capacity.js +38 -0
- package/dist/plans/seat-capacity.js.map +1 -0
- package/dist/plans/seat-hooks.d.ts +1 -0
- package/dist/plans/seat-hooks.js +80 -0
- package/dist/plans/seat-hooks.js.map +1 -0
- package/dist/plans/seat-sync.d.ts +10 -0
- package/dist/plans/seat-sync.js +23 -0
- package/dist/plans/seat-sync.js.map +1 -0
- package/dist/routes/index.d.ts +3 -0
- package/dist/routes/index.js +20 -0
- package/dist/routes/index.js.map +1 -0
- package/dist/routes/platformOwner/billing-settings.d.ts +20 -0
- package/dist/routes/platformOwner/billing-settings.js +98 -0
- package/dist/routes/platformOwner/billing-settings.js.map +1 -0
- package/dist/routes/platformOwner/credit-notes-issue.d.ts +16 -0
- package/dist/routes/platformOwner/credit-notes-issue.js +56 -0
- package/dist/routes/platformOwner/credit-notes-issue.js.map +1 -0
- package/dist/routes/platformOwner/dashboard.d.ts +62 -0
- package/dist/routes/platformOwner/dashboard.js +310 -0
- package/dist/routes/platformOwner/dashboard.js.map +1 -0
- package/dist/routes/platformOwner/index.d.ts +12 -0
- package/dist/routes/platformOwner/index.js +29 -0
- package/dist/routes/platformOwner/index.js.map +1 -0
- package/dist/routes/platformOwner/plan-deletion.d.ts +30 -0
- package/dist/routes/platformOwner/plan-deletion.js +156 -0
- package/dist/routes/platformOwner/plan-deletion.js.map +1 -0
- package/dist/routes/platformOwner/plans.d.ts +99 -0
- package/dist/routes/platformOwner/plans.js +376 -0
- package/dist/routes/platformOwner/plans.js.map +1 -0
- package/dist/routes/platformOwner/platform-notes.d.ts +36 -0
- package/dist/routes/platformOwner/platform-notes.js +149 -0
- package/dist/routes/platformOwner/platform-notes.js.map +1 -0
- package/dist/routes/platformOwner/platform-owners.d.ts +12 -0
- package/dist/routes/platformOwner/platform-owners.js +77 -0
- package/dist/routes/platformOwner/platform-owners.js.map +1 -0
- package/dist/routes/platformOwner/segments.d.ts +24 -0
- package/dist/routes/platformOwner/segments.js +174 -0
- package/dist/routes/platformOwner/segments.js.map +1 -0
- package/dist/routes/platformOwner/support.d.ts +21 -0
- package/dist/routes/platformOwner/support.js +180 -0
- package/dist/routes/platformOwner/support.js.map +1 -0
- package/dist/routes/platformOwner/users-detail.d.ts +26 -0
- package/dist/routes/platformOwner/users-detail.js +82 -0
- package/dist/routes/platformOwner/users-detail.js.map +1 -0
- package/dist/routes/platformOwner/workspace-operator-actions.d.ts +34 -0
- package/dist/routes/platformOwner/workspace-operator-actions.js +183 -0
- package/dist/routes/platformOwner/workspace-operator-actions.js.map +1 -0
- package/dist/routes/platformOwner/workspaces-admin.d.ts +27 -0
- package/dist/routes/platformOwner/workspaces-admin.js +140 -0
- package/dist/routes/platformOwner/workspaces-admin.js.map +1 -0
- package/dist/routes/public/index.d.ts +3 -0
- package/dist/routes/public/index.js +20 -0
- package/dist/routes/public/index.js.map +1 -0
- package/dist/routes/public/legal-documents.d.ts +15 -0
- package/dist/routes/public/legal-documents.js +72 -0
- package/dist/routes/public/legal-documents.js.map +1 -0
- package/dist/routes/public/register.d.ts +48 -0
- package/dist/routes/public/register.js +193 -0
- package/dist/routes/public/register.js.map +1 -0
- package/dist/routes/public/webhooks/index.d.ts +1 -0
- package/dist/routes/public/webhooks/index.js +18 -0
- package/dist/routes/public/webhooks/index.js.map +1 -0
- package/dist/routes/public/webhooks/stripe.d.ts +7 -0
- package/dist/routes/public/webhooks/stripe.js +41 -0
- package/dist/routes/public/webhooks/stripe.js.map +1 -0
- package/dist/routes/tenant/billing-portal.d.ts +31 -0
- package/dist/routes/tenant/billing-portal.js +117 -0
- package/dist/routes/tenant/billing-portal.js.map +1 -0
- package/dist/routes/tenant/billing-self-refund.d.ts +18 -0
- package/dist/routes/tenant/billing-self-refund.js +199 -0
- package/dist/routes/tenant/billing-self-refund.js.map +1 -0
- package/dist/routes/tenant/data-export.d.ts +16 -0
- package/dist/routes/tenant/data-export.js +102 -0
- package/dist/routes/tenant/data-export.js.map +1 -0
- package/dist/routes/tenant/index.d.ts +9 -0
- package/dist/routes/tenant/index.js +26 -0
- package/dist/routes/tenant/index.js.map +1 -0
- package/dist/routes/tenant/support.d.ts +27 -0
- package/dist/routes/tenant/support.js +185 -0
- package/dist/routes/tenant/support.js.map +1 -0
- package/dist/routes/tenant/tenant-billing.d.ts +26 -0
- package/dist/routes/tenant/tenant-billing.js +148 -0
- package/dist/routes/tenant/tenant-billing.js.map +1 -0
- package/dist/routes/tenant/tenant-plan-ops.d.ts +57 -0
- package/dist/routes/tenant/tenant-plan-ops.js +244 -0
- package/dist/routes/tenant/tenant-plan-ops.js.map +1 -0
- package/dist/routes/tenant/tenant-plan.d.ts +19 -0
- package/dist/routes/tenant/tenant-plan.js +172 -0
- package/dist/routes/tenant/tenant-plan.js.map +1 -0
- package/dist/routes/tenant/tenant-seats.d.ts +17 -0
- package/dist/routes/tenant/tenant-seats.js +58 -0
- package/dist/routes/tenant/tenant-seats.js.map +1 -0
- package/dist/routes/tenant/workspaces.d.ts +78 -0
- package/dist/routes/tenant/workspaces.js +301 -0
- package/dist/routes/tenant/workspaces.js.map +1 -0
- package/dist/stripe/client.d.ts +6 -0
- package/dist/stripe/client.js +44 -0
- package/dist/stripe/client.js.map +1 -0
- package/dist/stripe/customer-balance.d.ts +12 -0
- package/dist/stripe/customer-balance.js +16 -0
- package/dist/stripe/customer-balance.js.map +1 -0
- package/dist/stripe/customer-billing.d.ts +33 -0
- package/dist/stripe/customer-billing.js +140 -0
- package/dist/stripe/customer-billing.js.map +1 -0
- package/dist/stripe/index.d.ts +11 -0
- package/dist/stripe/index.js +28 -0
- package/dist/stripe/index.js.map +1 -0
- package/dist/stripe/plan-schedule.d.ts +9 -0
- package/dist/stripe/plan-schedule.js +83 -0
- package/dist/stripe/plan-schedule.js.map +1 -0
- package/dist/stripe/proration.d.ts +2 -0
- package/dist/stripe/proration.js +19 -0
- package/dist/stripe/proration.js.map +1 -0
- package/dist/stripe/sync-plan.d.ts +2 -0
- package/dist/stripe/sync-plan.js +66 -0
- package/dist/stripe/sync-plan.js.map +1 -0
- package/dist/stripe/webhook-checkout.d.ts +3 -0
- package/dist/stripe/webhook-checkout.js +157 -0
- package/dist/stripe/webhook-checkout.js.map +1 -0
- package/dist/stripe/webhook-credit-notes.d.ts +3 -0
- package/dist/stripe/webhook-credit-notes.js +192 -0
- package/dist/stripe/webhook-credit-notes.js.map +1 -0
- package/dist/stripe/webhook-dispatch.d.ts +2 -0
- package/dist/stripe/webhook-dispatch.js +45 -0
- package/dist/stripe/webhook-dispatch.js.map +1 -0
- package/dist/stripe/webhook-handlers.d.ts +11 -0
- package/dist/stripe/webhook-handlers.js +318 -0
- package/dist/stripe/webhook-handlers.js.map +1 -0
- package/dist/stripe/webhook-shared.d.ts +28 -0
- package/dist/stripe/webhook-shared.js +126 -0
- package/dist/stripe/webhook-shared.js.map +1 -0
- package/dist/stripe/workspace-checkout.d.ts +29 -0
- package/dist/stripe/workspace-checkout.js +106 -0
- package/dist/stripe/workspace-checkout.js.map +1 -0
- package/dist/support/admissions.d.ts +36 -0
- package/dist/support/admissions.js +136 -0
- package/dist/support/admissions.js.map +1 -0
- package/dist/support/attachments.d.ts +12 -0
- package/dist/support/attachments.js +56 -0
- package/dist/support/attachments.js.map +1 -0
- package/dist/support/config.d.ts +19 -0
- package/dist/support/config.js +75 -0
- package/dist/support/config.js.map +1 -0
- package/dist/support/index.d.ts +6 -0
- package/dist/support/index.js +23 -0
- package/dist/support/index.js.map +1 -0
- package/dist/support/operations.d.ts +51 -0
- package/dist/support/operations.js +109 -0
- package/dist/support/operations.js.map +1 -0
- package/dist/support/plans.d.ts +6 -0
- package/dist/support/plans.js +130 -0
- package/dist/support/plans.js.map +1 -0
- package/dist/support/publications.d.ts +8 -0
- package/dist/support/publications.js +106 -0
- package/dist/support/publications.js.map +1 -0
- package/dist/support/recovery.d.ts +7 -0
- package/dist/support/recovery.js +43 -0
- package/dist/support/recovery.js.map +1 -0
- package/dist/support/service.d.ts +51 -0
- package/dist/support/service.js +143 -0
- package/dist/support/service.js.map +1 -0
- package/dist/support/transitions.d.ts +4 -0
- package/dist/support/transitions.js +29 -0
- package/dist/support/transitions.js.map +1 -0
- package/dist/support/uploads.d.ts +39 -0
- package/dist/support/uploads.js +115 -0
- package/dist/support/uploads.js.map +1 -0
- package/dist/support/validation.d.ts +15 -0
- package/dist/support/validation.js +54 -0
- package/dist/support/validation.js.map +1 -0
- package/dist/types/config.d.ts +16 -0
- package/dist/types/config.js +3 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +18 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/billing-document-type.d.ts +3 -0
- package/dist/utils/billing-document-type.js +18 -0
- package/dist/utils/billing-document-type.js.map +1 -0
- package/dist/utils/billing-period-type.d.ts +3 -0
- package/dist/utils/billing-period-type.js +18 -0
- package/dist/utils/billing-period-type.js.map +1 -0
- package/dist/utils/email-hash.d.ts +1 -0
- package/dist/utils/email-hash.js +8 -0
- package/dist/utils/email-hash.js.map +1 -0
- package/dist/utils/export-dataset-stream.d.ts +19 -0
- package/dist/utils/export-dataset-stream.js +40 -0
- package/dist/utils/export-dataset-stream.js.map +1 -0
- package/dist/utils/index.d.ts +15 -0
- package/dist/utils/index.js +32 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/invoice-lines-type.d.ts +27 -0
- package/dist/utils/invoice-lines-type.js +34 -0
- package/dist/utils/invoice-lines-type.js.map +1 -0
- package/dist/utils/money-cents-type.d.ts +3 -0
- package/dist/utils/money-cents-type.js +18 -0
- package/dist/utils/money-cents-type.js.map +1 -0
- package/dist/utils/pagination.d.ts +22 -0
- package/dist/utils/pagination.js +35 -0
- package/dist/utils/pagination.js.map +1 -0
- package/dist/utils/parse-future-date.d.ts +1 -0
- package/dist/utils/parse-future-date.js +15 -0
- package/dist/utils/parse-future-date.js.map +1 -0
- package/dist/utils/row-instance.d.ts +1 -0
- package/dist/utils/row-instance.js +8 -0
- package/dist/utils/row-instance.js.map +1 -0
- package/dist/utils/segment-conditions-type.d.ts +33 -0
- package/dist/utils/segment-conditions-type.js +86 -0
- package/dist/utils/segment-conditions-type.js.map +1 -0
- package/dist/utils/segment-evaluator.d.ts +3 -0
- package/dist/utils/segment-evaluator.js +117 -0
- package/dist/utils/segment-evaluator.js.map +1 -0
- package/dist/utils/segment-fields.d.ts +19 -0
- package/dist/utils/segment-fields.js +212 -0
- package/dist/utils/segment-fields.js.map +1 -0
- package/dist/utils/segment-matching.d.ts +56 -0
- package/dist/utils/segment-matching.js +200 -0
- package/dist/utils/segment-matching.js.map +1 -0
- package/dist/utils/segment-name-cache.d.ts +2 -0
- package/dist/utils/segment-name-cache.js +22 -0
- package/dist/utils/segment-name-cache.js.map +1 -0
- package/dist/utils/time.d.ts +3 -0
- package/dist/utils/time.js +10 -0
- package/dist/utils/time.js.map +1 -0
- package/dist/workers/index.d.ts +1 -0
- package/dist/workers/index.js +18 -0
- package/dist/workers/index.js.map +1 -0
- package/dist/workers/plan-migration.d.ts +4 -0
- package/dist/workers/plan-migration.js +206 -0
- package/dist/workers/plan-migration.js.map +1 -0
- package/dist/workspaces/billing-profile.d.ts +3 -0
- package/dist/workspaces/billing-profile.js +55 -0
- package/dist/workspaces/billing-profile.js.map +1 -0
- package/dist/workspaces/complimentary.d.ts +7 -0
- package/dist/workspaces/complimentary.js +47 -0
- package/dist/workspaces/complimentary.js.map +1 -0
- package/dist/workspaces/db/card-capacity.model.d.ts +30 -0
- package/dist/workspaces/db/card-capacity.model.js +98 -0
- package/dist/workspaces/db/card-capacity.model.js.map +1 -0
- package/dist/workspaces/db/card-capacity.table.d.ts +11 -0
- package/dist/workspaces/db/card-capacity.table.js +34 -0
- package/dist/workspaces/db/card-capacity.table.js.map +1 -0
- package/dist/workspaces/db/provisioning-attempt.model.d.ts +24 -0
- package/dist/workspaces/db/provisioning-attempt.model.js +33 -0
- package/dist/workspaces/db/provisioning-attempt.model.js.map +1 -0
- package/dist/workspaces/db/provisioning-attempt.table.d.ts +18 -0
- package/dist/workspaces/db/provisioning-attempt.table.js +77 -0
- package/dist/workspaces/db/provisioning-attempt.table.js.map +1 -0
- package/dist/workspaces/db/trial-identity.model.d.ts +25 -0
- package/dist/workspaces/db/trial-identity.model.js +62 -0
- package/dist/workspaces/db/trial-identity.model.js.map +1 -0
- package/dist/workspaces/db/trial-identity.table.d.ts +7 -0
- package/dist/workspaces/db/trial-identity.table.js +34 -0
- package/dist/workspaces/db/trial-identity.table.js.map +1 -0
- package/dist/workspaces/deletion.d.ts +8 -0
- package/dist/workspaces/deletion.js +75 -0
- package/dist/workspaces/deletion.js.map +1 -0
- package/dist/workspaces/free-workspace-guard.d.ts +11 -0
- package/dist/workspaces/free-workspace-guard.js +96 -0
- package/dist/workspaces/free-workspace-guard.js.map +1 -0
- package/dist/workspaces/index.d.ts +6 -0
- package/dist/workspaces/index.js +23 -0
- package/dist/workspaces/index.js.map +1 -0
- package/dist/workspaces/provisioning-rollback.d.ts +2 -0
- package/dist/workspaces/provisioning-rollback.js +78 -0
- package/dist/workspaces/provisioning-rollback.js.map +1 -0
- package/dist/workspaces/provisioning-state.d.ts +6 -0
- package/dist/workspaces/provisioning-state.js +91 -0
- package/dist/workspaces/provisioning-state.js.map +1 -0
- package/dist/workspaces/provisioning.d.ts +49 -0
- package/dist/workspaces/provisioning.js +263 -0
- package/dist/workspaces/provisioning.js.map +1 -0
- package/dist/workspaces/registration-extras.d.ts +1 -0
- package/dist/workspaces/registration-extras.js +50 -0
- package/dist/workspaces/registration-extras.js.map +1 -0
- package/dist/workspaces/suspension.d.ts +13 -0
- package/dist/workspaces/suspension.js +124 -0
- package/dist/workspaces/suspension.js.map +1 -0
- package/frontend-vue/.editorconfig +12 -0
- package/frontend-vue/.prettierrc +11 -0
- package/frontend-vue/app/build/.gitkeep +0 -0
- package/frontend-vue/app/components/CardGrid.vue +77 -0
- package/frontend-vue/app/components/CustomerPortalButton.vue +45 -0
- package/frontend-vue/app/components/DataExport.vue +300 -0
- package/frontend-vue/app/components/DeletePlanModal.vue +223 -0
- package/frontend-vue/app/components/FreeAccessBanner.vue +70 -0
- package/frontend-vue/app/components/InvoiceLines.vue +57 -0
- package/frontend-vue/app/components/IssueCreditNoteModal.vue +128 -0
- package/frontend-vue/app/components/LegalLayout.vue +63 -0
- package/frontend-vue/app/components/LoadFailure.vue +25 -0
- package/frontend-vue/app/components/PastDueAlert.vue +96 -0
- package/frontend-vue/app/components/PaymentMethodCard.vue +86 -0
- package/frontend-vue/app/components/PlanCard.vue +294 -0
- package/frontend-vue/app/components/PlanCardPublic.vue +59 -0
- package/frontend-vue/app/components/PlanCardsDisplay.vue +127 -0
- package/frontend-vue/app/components/PlanComparisonModal.vue +213 -0
- package/frontend-vue/app/components/PlanInheritancePicker.vue +329 -0
- package/frontend-vue/app/components/PlatformNotes.vue +281 -0
- package/frontend-vue/app/components/PlatformSupport.vue +461 -0
- package/frontend-vue/app/components/RecentActivity.vue +72 -0
- package/frontend-vue/app/components/RefundButton.vue +126 -0
- package/frontend-vue/app/components/Register.vue +174 -0
- package/frontend-vue/app/components/RegistrationClosed.vue +15 -0
- package/frontend-vue/app/components/SeatQuotaBanner.vue +78 -0
- package/frontend-vue/app/components/SegmentConditionsBuilder.vue +176 -0
- package/frontend-vue/app/components/SegmentConditionsGroup.vue +494 -0
- package/frontend-vue/app/components/SupportAttachmentUpload.vue +140 -0
- package/frontend-vue/app/components/SupportThreadHistory.vue +139 -0
- package/frontend-vue/app/components/TenantBillingForm.vue +208 -0
- package/frontend-vue/app/components/TenantPlanCard.vue +223 -0
- package/frontend-vue/app/components/TenantSupport.vue +415 -0
- package/frontend-vue/app/components/UserSummaryCard.vue +166 -0
- package/frontend-vue/app/components/WorkspaceBillingInfo.vue +68 -0
- package/frontend-vue/app/components/WorkspaceCompAccessButton.vue +198 -0
- package/frontend-vue/app/components/WorkspaceCreateModal.vue +256 -0
- package/frontend-vue/app/components/WorkspaceDangerZone.vue +146 -0
- package/frontend-vue/app/components/WorkspaceDetailHeader.vue +24 -0
- package/frontend-vue/app/components/WorkspaceIdentity.vue +99 -0
- package/frontend-vue/app/components/WorkspaceJoinButton.vue +50 -0
- package/frontend-vue/app/components/WorkspaceOperatorActions.vue +340 -0
- package/frontend-vue/app/components/WorkspaceSummaryCard.vue +161 -0
- package/frontend-vue/app/components/WorkspaceSuspendButton.vue +167 -0
- package/frontend-vue/app/components/WorkspaceSuspended.vue +164 -0
- package/frontend-vue/app/components/WorkspaceSwitcherWidget.vue +247 -0
- package/frontend-vue/app/composables/useApiErrorMessage.ts +35 -0
- package/frontend-vue/app/composables/useBillingCountries.ts +54 -0
- package/frontend-vue/app/composables/useBillingDocumentType.ts +7 -0
- package/frontend-vue/app/composables/useBillingStatus.ts +39 -0
- package/frontend-vue/app/composables/useCurrentWorkspace.ts +43 -0
- package/frontend-vue/app/composables/useDetailRefresh.ts +17 -0
- package/frontend-vue/app/composables/useExportHistory.ts +143 -0
- package/frontend-vue/app/composables/useInvoiceLines.ts +22 -0
- package/frontend-vue/app/composables/useMoneyFormat.ts +49 -0
- package/frontend-vue/app/composables/useMyWorkspaces.ts +47 -0
- package/frontend-vue/app/composables/usePlanFeatureFormat.ts +60 -0
- package/frontend-vue/app/composables/usePlanIntervalLabel.ts +30 -0
- package/frontend-vue/app/composables/useSaasRegistration.ts +522 -0
- package/frontend-vue/app/composables/useSeatQuota.ts +18 -0
- package/frontend-vue/app/composables/useSharedRequest.ts +54 -0
- package/frontend-vue/app/composables/useStripePaymentElement.ts +74 -0
- package/frontend-vue/app/composables/useSubscriptionAccess.ts +12 -0
- package/frontend-vue/app/composables/useSupportRequest.ts +74 -0
- package/frontend-vue/app/composables/useTenantPlan.ts +95 -0
- package/frontend-vue/app/composables/useTenantSwitch.ts +22 -0
- package/frontend-vue/app/composables/useWorkspaceAccessCache.ts +25 -0
- package/frontend-vue/app/custom-pages/auth/no-workspace.vue +495 -0
- package/frontend-vue/app/middleware/workspace-suspended.global.ts +56 -0
- package/frontend-vue/app/plugins/auth-links.ts +24 -0
- package/frontend-vue/app/plugins/billing-data-types.ts +62 -0
- package/frontend-vue/app/plugins/footer-links.ts +36 -0
- package/frontend-vue/app/plugins/plan-cards-display.client.ts +16 -0
- package/frontend-vue/app/plugins/segment-conditions-data-type.client.ts +122 -0
- package/frontend-vue/app/plugins/sidebar-widgets.ts +13 -0
- package/frontend-vue/app/types/support.ts +123 -0
- package/frontend-vue/dms.frontend.ts +68 -0
- package/frontend-vue/eslint.config.mjs +13 -0
- package/frontend-vue/i18n/locales/saas-en-GB.json +1285 -0
- package/frontend-vue/i18n/locales/saas-fr-FR.json +1285 -0
- package/frontend-vue/package.json +27 -0
- package/frontend-vue/pnpm-lock.yaml +4948 -0
- package/frontend-vue/pnpm-workspace.yaml +2 -0
- package/frontend-vue/server/routes/auth/finalize-workspace.post.ts +61 -0
- package/package.json +91 -0
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, onMounted, ref } from "vue";
|
|
3
|
+
|
|
4
|
+
interface AdminState {
|
|
5
|
+
status: string | null;
|
|
6
|
+
planId: string | null;
|
|
7
|
+
hasStripeSubscription: boolean;
|
|
8
|
+
freeUntil: string | null;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const SUSPENDED_STATUS = "suspended";
|
|
12
|
+
|
|
13
|
+
interface PlanOption {
|
|
14
|
+
_id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
audience: string;
|
|
17
|
+
isActive: boolean;
|
|
18
|
+
isDeleted: boolean;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const STATE_ENDPOINT_PREFIX = "/api/saas/workspaces";
|
|
22
|
+
const PLANS_ENDPOINT = "/api/saas/plans";
|
|
23
|
+
|
|
24
|
+
const props = defineProps<{
|
|
25
|
+
routeParams?: Record<string, string>;
|
|
26
|
+
}>();
|
|
27
|
+
|
|
28
|
+
const { $authFetch } = useAuthFetch();
|
|
29
|
+
const nuxtApp = useDmsApp();
|
|
30
|
+
const toast = useToast();
|
|
31
|
+
const { resolveApiError } = useApiErrorMessage();
|
|
32
|
+
|
|
33
|
+
const tenantId = computed(() => props.routeParams?.id ?? "");
|
|
34
|
+
const { trigger } = useDetailRefresh(tenantId.value);
|
|
35
|
+
|
|
36
|
+
const state = ref<AdminState | null>(null);
|
|
37
|
+
const plans = ref<PlanOption[]>([]);
|
|
38
|
+
const isLoading = ref(true);
|
|
39
|
+
const isModalOpen = ref(false);
|
|
40
|
+
const isSubmitting = ref(false);
|
|
41
|
+
|
|
42
|
+
const selectedPlanId = ref<string | undefined>(undefined);
|
|
43
|
+
const freeUntil = ref<string>("");
|
|
44
|
+
|
|
45
|
+
const planItems = computed(() =>
|
|
46
|
+
plans.value
|
|
47
|
+
.filter((plan) => plan.isActive && !plan.isDeleted)
|
|
48
|
+
.map((plan) => ({ value: plan._id, label: plan.name })),
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
const isComplimentary = computed(
|
|
52
|
+
() =>
|
|
53
|
+
!!state.value &&
|
|
54
|
+
!!state.value.planId &&
|
|
55
|
+
!state.value.hasStripeSubscription,
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
const isSuspended = computed(() => state.value?.status === SUSPENDED_STATUS);
|
|
59
|
+
|
|
60
|
+
const buttonLabel = computed(() =>
|
|
61
|
+
nuxtApp.$i18n.t(
|
|
62
|
+
isComplimentary.value
|
|
63
|
+
? "saas.workspaces.admin.comp.update"
|
|
64
|
+
: "saas.workspaces.admin.comp.grant",
|
|
65
|
+
),
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
async function loadAll(): Promise<void> {
|
|
69
|
+
if (!tenantId.value) return;
|
|
70
|
+
isLoading.value = true;
|
|
71
|
+
try {
|
|
72
|
+
const [adminState, planList] = await Promise.all([
|
|
73
|
+
$authFetch<AdminState>(
|
|
74
|
+
`${STATE_ENDPOINT_PREFIX}/${tenantId.value}/admin-state`,
|
|
75
|
+
),
|
|
76
|
+
$authFetch<PlanOption[]>(PLANS_ENDPOINT),
|
|
77
|
+
]);
|
|
78
|
+
state.value = adminState;
|
|
79
|
+
plans.value = planList;
|
|
80
|
+
selectedPlanId.value = adminState.planId ?? undefined;
|
|
81
|
+
freeUntil.value = adminState.freeUntil
|
|
82
|
+
? adminState.freeUntil.slice(0, 10)
|
|
83
|
+
: "";
|
|
84
|
+
} catch {
|
|
85
|
+
state.value = null;
|
|
86
|
+
} finally {
|
|
87
|
+
isLoading.value = false;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function openModal(): void {
|
|
92
|
+
selectedPlanId.value = state.value?.planId ?? undefined;
|
|
93
|
+
freeUntil.value = state.value?.freeUntil
|
|
94
|
+
? state.value.freeUntil.slice(0, 10)
|
|
95
|
+
: "";
|
|
96
|
+
isModalOpen.value = true;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
async function submit(): Promise<void> {
|
|
100
|
+
if (!selectedPlanId.value) return;
|
|
101
|
+
isSubmitting.value = true;
|
|
102
|
+
try {
|
|
103
|
+
await $authFetch(
|
|
104
|
+
`${STATE_ENDPOINT_PREFIX}/${tenantId.value}/grant-free-access`,
|
|
105
|
+
{
|
|
106
|
+
method: "POST",
|
|
107
|
+
body: {
|
|
108
|
+
planId: selectedPlanId.value,
|
|
109
|
+
freeUntil: freeUntil.value || null,
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
);
|
|
113
|
+
toast.add({
|
|
114
|
+
title: nuxtApp.$i18n.t("saas.workspaces.admin.comp.success"),
|
|
115
|
+
color: "success",
|
|
116
|
+
icon: "i-ph-check-circle",
|
|
117
|
+
});
|
|
118
|
+
isModalOpen.value = false;
|
|
119
|
+
await loadAll();
|
|
120
|
+
trigger();
|
|
121
|
+
} catch (error) {
|
|
122
|
+
toast.add({
|
|
123
|
+
title: resolveApiError(error, "saas.workspaces.admin.comp.error"),
|
|
124
|
+
color: "error",
|
|
125
|
+
icon: "i-ph-warning-circle",
|
|
126
|
+
});
|
|
127
|
+
} finally {
|
|
128
|
+
isSubmitting.value = false;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
onMounted(loadAll);
|
|
133
|
+
</script>
|
|
134
|
+
|
|
135
|
+
<template>
|
|
136
|
+
<div v-if="!isLoading && state" class="flex justify-end">
|
|
137
|
+
<UButton color="primary" variant="soft" icon="i-ph-gift" @click="openModal">
|
|
138
|
+
{{ buttonLabel }}
|
|
139
|
+
</UButton>
|
|
140
|
+
|
|
141
|
+
<UModal
|
|
142
|
+
:open="isModalOpen"
|
|
143
|
+
:title="$t('saas.workspaces.admin.comp.modal_title')"
|
|
144
|
+
@update:open="isModalOpen = $event"
|
|
145
|
+
>
|
|
146
|
+
<template #body>
|
|
147
|
+
<form class="flex flex-col gap-4" @submit.prevent="submit">
|
|
148
|
+
<p class="text-muted text-sm">
|
|
149
|
+
{{ $t("saas.workspaces.admin.comp.modal_description") }}
|
|
150
|
+
</p>
|
|
151
|
+
<UFormField :label="$t('saas.workspaces.admin.comp.plan')">
|
|
152
|
+
<USelect
|
|
153
|
+
v-model="selectedPlanId"
|
|
154
|
+
:items="planItems"
|
|
155
|
+
class="w-full"
|
|
156
|
+
/>
|
|
157
|
+
</UFormField>
|
|
158
|
+
<UFormField :label="$t('saas.workspaces.admin.comp.free_until')">
|
|
159
|
+
<UInput v-model="freeUntil" type="date" class="w-full" />
|
|
160
|
+
</UFormField>
|
|
161
|
+
<p class="text-muted text-xs">
|
|
162
|
+
{{ $t("saas.workspaces.admin.comp.free_until_hint") }}
|
|
163
|
+
</p>
|
|
164
|
+
<UAlert
|
|
165
|
+
color="info"
|
|
166
|
+
variant="subtle"
|
|
167
|
+
icon="i-ph-info"
|
|
168
|
+
:description="
|
|
169
|
+
$t('saas.workspaces.admin.comp.hint_members_preserved')
|
|
170
|
+
"
|
|
171
|
+
/>
|
|
172
|
+
<UAlert
|
|
173
|
+
v-if="isSuspended"
|
|
174
|
+
color="warning"
|
|
175
|
+
variant="subtle"
|
|
176
|
+
icon="i-ph-warning"
|
|
177
|
+
:description="$t('saas.workspaces.admin.comp.hint_will_unsuspend')"
|
|
178
|
+
/>
|
|
179
|
+
</form>
|
|
180
|
+
</template>
|
|
181
|
+
<template #footer>
|
|
182
|
+
<div class="flex justify-end gap-2">
|
|
183
|
+
<UButton variant="ghost" @click="isModalOpen = false">
|
|
184
|
+
{{ $t("common.cancel") }}
|
|
185
|
+
</UButton>
|
|
186
|
+
<UButton
|
|
187
|
+
color="primary"
|
|
188
|
+
:loading="isSubmitting"
|
|
189
|
+
:disabled="!selectedPlanId"
|
|
190
|
+
@click="submit"
|
|
191
|
+
>
|
|
192
|
+
{{ $t("saas.workspaces.admin.comp.submit") }}
|
|
193
|
+
</UButton>
|
|
194
|
+
</div>
|
|
195
|
+
</template>
|
|
196
|
+
</UModal>
|
|
197
|
+
</div>
|
|
198
|
+
</template>
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, onMounted, ref } from "vue";
|
|
3
|
+
|
|
4
|
+
interface PlanOption {
|
|
5
|
+
_id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
price: number;
|
|
9
|
+
currency: string;
|
|
10
|
+
interval: "month" | "year";
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface FreePlanAvailability {
|
|
14
|
+
isAvailable: boolean;
|
|
15
|
+
blockingWorkspaceName: string | null;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
interface CreateOptions {
|
|
19
|
+
freePlan: FreePlanAvailability;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const props = defineProps<{
|
|
23
|
+
onSuccessCallback?: (tenantId: string) => void;
|
|
24
|
+
}>();
|
|
25
|
+
|
|
26
|
+
const PLANS_ENDPOINT = "/api/saas/plans/public";
|
|
27
|
+
const OPTIONS_ENDPOINT = "/api/saas/workspaces/create-options";
|
|
28
|
+
const SETUP_INTENT_ENDPOINT = "/api/saas/workspaces/setup-intent";
|
|
29
|
+
const CREATE_ENDPOINT = "/api/saas/workspaces";
|
|
30
|
+
const PAYMENT_ELEMENT_ID = "dms-saas-workspace-create-payment-element";
|
|
31
|
+
const FREE_PLAN_PRICE = 0;
|
|
32
|
+
|
|
33
|
+
const { $authFetch } = useAuthFetch();
|
|
34
|
+
const { t, locale } = useI18n();
|
|
35
|
+
const { resolveApiError } = useApiErrorMessage();
|
|
36
|
+
const planIntervalLabel = usePlanIntervalLabel(
|
|
37
|
+
"saas.workspaces.create.self_serve.interval",
|
|
38
|
+
);
|
|
39
|
+
const config = useDmsRuntimeConfig();
|
|
40
|
+
|
|
41
|
+
const stripePublishableKey = computed<string>(
|
|
42
|
+
() => (config.public.dmsSaas as any)?.stripePublishableKey ?? "",
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
const workspaceName = ref("");
|
|
46
|
+
const plans = ref<PlanOption[]>([]);
|
|
47
|
+
const selectedPlanId = ref<string | null>(null);
|
|
48
|
+
const freePlan = ref<FreePlanAvailability>({
|
|
49
|
+
isAvailable: true,
|
|
50
|
+
blockingWorkspaceName: null,
|
|
51
|
+
});
|
|
52
|
+
const isLoading = ref(true);
|
|
53
|
+
const isSubmitting = ref(false);
|
|
54
|
+
const errorMessage = ref<string | null>(null);
|
|
55
|
+
const cardError = ref<string | null>(null);
|
|
56
|
+
const stripeHandle = ref<ReturnType<typeof useStripePaymentElement> | null>(
|
|
57
|
+
null,
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
function isFreePlan(plan: PlanOption): boolean {
|
|
61
|
+
return plan.price <= FREE_PLAN_PRICE;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function isPlanDisabled(plan: PlanOption): boolean {
|
|
65
|
+
return isFreePlan(plan) && !freePlan.value.isAvailable;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function formatPrice(plan: PlanOption): string {
|
|
69
|
+
return new Intl.NumberFormat(locale.value, {
|
|
70
|
+
style: "currency",
|
|
71
|
+
currency: plan.currency.toUpperCase(),
|
|
72
|
+
}).format(plan.price);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function planPriceLabel(plan: PlanOption): string {
|
|
76
|
+
// A free plan has no billing cycle to mention, so it stops at the amount.
|
|
77
|
+
if (isFreePlan(plan)) return formatPrice(plan);
|
|
78
|
+
return t("saas.workspaces.create.self_serve.price", {
|
|
79
|
+
price: formatPrice(plan),
|
|
80
|
+
interval: planIntervalLabel(plan.interval),
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function planHint(plan: PlanOption): string {
|
|
85
|
+
if (!isPlanDisabled(plan)) return plan.description;
|
|
86
|
+
const workspace = freePlan.value.blockingWorkspaceName;
|
|
87
|
+
if (!workspace) {
|
|
88
|
+
return t("saas.workspaces.create.self_serve.free_unavailable");
|
|
89
|
+
}
|
|
90
|
+
return t("saas.workspaces.create.self_serve.free_taken", { workspace });
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const selectablePlans = computed(() =>
|
|
94
|
+
plans.value.filter((plan) => !isPlanDisabled(plan)),
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
function selectPlan(plan: PlanOption): void {
|
|
98
|
+
if (isPlanDisabled(plan)) return;
|
|
99
|
+
selectedPlanId.value = plan._id;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
async function initStripeElement(): Promise<void> {
|
|
103
|
+
if (!stripePublishableKey.value) {
|
|
104
|
+
// A missing key otherwise renders an empty card box and fails every
|
|
105
|
+
// submit with a generic payment error, reading as the user's fault.
|
|
106
|
+
cardError.value = t("saas.workspaces.create.self_serve.error.card");
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
const setup = await $authFetch<{ clientSecret: string }>(
|
|
110
|
+
SETUP_INTENT_ENDPOINT,
|
|
111
|
+
);
|
|
112
|
+
stripeHandle.value = useStripePaymentElement({
|
|
113
|
+
publishableKey: stripePublishableKey.value,
|
|
114
|
+
clientSecret: setup.clientSecret,
|
|
115
|
+
containerId: PAYMENT_ELEMENT_ID,
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
async function load(): Promise<void> {
|
|
120
|
+
try {
|
|
121
|
+
const [loadedPlans, options] = await Promise.all([
|
|
122
|
+
$authFetch<PlanOption[]>(PLANS_ENDPOINT),
|
|
123
|
+
$authFetch<CreateOptions>(OPTIONS_ENDPOINT),
|
|
124
|
+
]);
|
|
125
|
+
plans.value = loadedPlans;
|
|
126
|
+
freePlan.value = options.freePlan;
|
|
127
|
+
selectedPlanId.value = selectablePlans.value[0]?._id ?? null;
|
|
128
|
+
} catch (error) {
|
|
129
|
+
errorMessage.value = resolveApiError(
|
|
130
|
+
error,
|
|
131
|
+
"saas.workspaces.create.self_serve.error.load",
|
|
132
|
+
);
|
|
133
|
+
return;
|
|
134
|
+
} finally {
|
|
135
|
+
isLoading.value = false;
|
|
136
|
+
}
|
|
137
|
+
// Kept out of the block above so a card-setup outage reports itself as such
|
|
138
|
+
// instead of hiding behind "could not load the creation options".
|
|
139
|
+
try {
|
|
140
|
+
await initStripeElement();
|
|
141
|
+
} catch (error) {
|
|
142
|
+
cardError.value = resolveApiError(
|
|
143
|
+
error,
|
|
144
|
+
"saas.workspaces.create.self_serve.error.card",
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
function validate(): boolean {
|
|
150
|
+
if (!workspaceName.value.trim()) {
|
|
151
|
+
errorMessage.value = t("saas.workspaces.create.error.name");
|
|
152
|
+
return false;
|
|
153
|
+
}
|
|
154
|
+
if (!selectedPlanId.value) {
|
|
155
|
+
errorMessage.value = t("saas.workspaces.create.error.plan");
|
|
156
|
+
return false;
|
|
157
|
+
}
|
|
158
|
+
if (!stripeHandle.value) {
|
|
159
|
+
errorMessage.value = t("saas.register.error.no_payment");
|
|
160
|
+
return false;
|
|
161
|
+
}
|
|
162
|
+
return true;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
async function submit(): Promise<void> {
|
|
166
|
+
if (isSubmitting.value || !validate()) return;
|
|
167
|
+
errorMessage.value = null;
|
|
168
|
+
isSubmitting.value = true;
|
|
169
|
+
try {
|
|
170
|
+
const confirmed = await stripeHandle.value?.confirmAndGetPaymentMethod();
|
|
171
|
+
if (!confirmed?.paymentMethodId) {
|
|
172
|
+
errorMessage.value =
|
|
173
|
+
confirmed?.error?.message ?? t("saas.register.error.no_payment");
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
const created = await $authFetch<{ tenantId: string }>(CREATE_ENDPOINT, {
|
|
177
|
+
method: "POST",
|
|
178
|
+
body: {
|
|
179
|
+
workspaceName: workspaceName.value.trim(),
|
|
180
|
+
planId: selectedPlanId.value,
|
|
181
|
+
paymentMethodId: confirmed.paymentMethodId,
|
|
182
|
+
},
|
|
183
|
+
});
|
|
184
|
+
props.onSuccessCallback?.(created.tenantId);
|
|
185
|
+
} catch (error) {
|
|
186
|
+
errorMessage.value = resolveApiError(
|
|
187
|
+
error,
|
|
188
|
+
"saas.workspaces.create.self_serve.error.failed",
|
|
189
|
+
);
|
|
190
|
+
} finally {
|
|
191
|
+
isSubmitting.value = false;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
onMounted(load);
|
|
196
|
+
</script>
|
|
197
|
+
|
|
198
|
+
<template>
|
|
199
|
+
<div v-if="isLoading" class="flex flex-col gap-3">
|
|
200
|
+
<USkeleton class="h-10 w-full" />
|
|
201
|
+
<USkeleton class="h-24 w-full" />
|
|
202
|
+
</div>
|
|
203
|
+
<form v-else class="flex flex-col gap-4" @submit.prevent="submit">
|
|
204
|
+
<UFormField :label="$t('saas.workspaces.create.field.name')">
|
|
205
|
+
<UInput
|
|
206
|
+
v-model="workspaceName"
|
|
207
|
+
:placeholder="$t('saas.workspaces.create.placeholder.name')"
|
|
208
|
+
class="w-full"
|
|
209
|
+
autofocus
|
|
210
|
+
required
|
|
211
|
+
/>
|
|
212
|
+
</UFormField>
|
|
213
|
+
|
|
214
|
+
<div class="flex flex-col gap-2">
|
|
215
|
+
<span class="text-sm font-medium">
|
|
216
|
+
{{ $t("saas.workspaces.create.field.plan") }}
|
|
217
|
+
<span class="text-muted font-normal">
|
|
218
|
+
{{ $t("saas.workspaces.create.self_serve.plan_hint") }}
|
|
219
|
+
</span>
|
|
220
|
+
</span>
|
|
221
|
+
<button
|
|
222
|
+
v-for="plan in plans"
|
|
223
|
+
:key="plan._id"
|
|
224
|
+
type="button"
|
|
225
|
+
class="border-default flex flex-col gap-1 rounded-md border px-3 py-2.5 text-left transition-colors"
|
|
226
|
+
:class="[
|
|
227
|
+
selectedPlanId === plan._id ? 'border-primary bg-primary/5' : '',
|
|
228
|
+
isPlanDisabled(plan)
|
|
229
|
+
? 'cursor-not-allowed opacity-60'
|
|
230
|
+
: 'hover:border-accented cursor-pointer',
|
|
231
|
+
]"
|
|
232
|
+
:disabled="isPlanDisabled(plan)"
|
|
233
|
+
:aria-pressed="selectedPlanId === plan._id"
|
|
234
|
+
@click="selectPlan(plan)"
|
|
235
|
+
>
|
|
236
|
+
<span class="text-highlighted text-sm font-medium">
|
|
237
|
+
{{ plan.name }} — {{ planPriceLabel(plan) }}
|
|
238
|
+
</span>
|
|
239
|
+
<span class="text-muted text-xs">{{ planHint(plan) }}</span>
|
|
240
|
+
</button>
|
|
241
|
+
</div>
|
|
242
|
+
|
|
243
|
+
<UFormField :label="$t('saas.workspaces.create.self_serve.card')">
|
|
244
|
+
<div :id="PAYMENT_ELEMENT_ID" class="border-default rounded-md border p-4" />
|
|
245
|
+
<p v-if="cardError" class="text-error mt-1 text-sm">{{ cardError }}</p>
|
|
246
|
+
</UFormField>
|
|
247
|
+
|
|
248
|
+
<p v-if="errorMessage" class="text-error text-sm">{{ errorMessage }}</p>
|
|
249
|
+
|
|
250
|
+
<div class="flex justify-end gap-2">
|
|
251
|
+
<UButton type="submit" color="primary" :loading="isSubmitting">
|
|
252
|
+
{{ $t("saas.workspaces.create.self_serve.submit") }}
|
|
253
|
+
</UButton>
|
|
254
|
+
</div>
|
|
255
|
+
</form>
|
|
256
|
+
</template>
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, onMounted, ref } from "vue";
|
|
3
|
+
|
|
4
|
+
const CURRENT_ENDPOINT = "/api/saas/workspaces/current";
|
|
5
|
+
const AFTER_DELETE_ROUTE = "/";
|
|
6
|
+
|
|
7
|
+
const { $authFetch } = useAuthFetch();
|
|
8
|
+
const { resolveApiError } = useApiErrorMessage();
|
|
9
|
+
const toast = useToast();
|
|
10
|
+
const { workspace, load } = useCurrentWorkspace();
|
|
11
|
+
const { workspaces, refresh: refreshMyWorkspaces } = useMyWorkspaces();
|
|
12
|
+
|
|
13
|
+
const isLoading = ref(true);
|
|
14
|
+
const isConfirmOpen = ref(false);
|
|
15
|
+
const isDeleting = ref(false);
|
|
16
|
+
const confirmation = ref("");
|
|
17
|
+
|
|
18
|
+
const workspaceName = computed(() => workspace.value?.name ?? "");
|
|
19
|
+
const retentionDays = computed(() => workspace.value?.retentionDays ?? 0);
|
|
20
|
+
// The name gate collapses to "" === "" when the workspace never loaded, which
|
|
21
|
+
// would arm the delete button with the input untouched.
|
|
22
|
+
const canDelete = computed(
|
|
23
|
+
() =>
|
|
24
|
+
workspaceName.value.length > 0 &&
|
|
25
|
+
confirmation.value.trim() === workspaceName.value &&
|
|
26
|
+
!isDeleting.value,
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
async function initialize(): Promise<void> {
|
|
30
|
+
try {
|
|
31
|
+
if (!workspace.value) await load();
|
|
32
|
+
} catch (error) {
|
|
33
|
+
toast.add({
|
|
34
|
+
title: resolveApiError(error, "saas.workspace.general.error.load"),
|
|
35
|
+
color: "error",
|
|
36
|
+
icon: "i-ph-warning-circle",
|
|
37
|
+
});
|
|
38
|
+
} finally {
|
|
39
|
+
isLoading.value = false;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function openConfirm(): void {
|
|
44
|
+
confirmation.value = "";
|
|
45
|
+
isConfirmOpen.value = true;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
async function leaveDeletedWorkspace(): Promise<void> {
|
|
49
|
+
// Staying would land on the suspended screen: the gate refuses a cancelled
|
|
50
|
+
// workspace. Move to another one of the user's when there is any.
|
|
51
|
+
const fallback = await resolveFallbackWorkspaceId();
|
|
52
|
+
if (fallback) {
|
|
53
|
+
await useTenantSwitch(fallback, AFTER_DELETE_ROUTE);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
if (typeof window !== "undefined") {
|
|
57
|
+
window.location.href = AFTER_DELETE_ROUTE;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
async function resolveFallbackWorkspaceId(): Promise<string | null> {
|
|
62
|
+
await refreshMyWorkspaces().catch(() => undefined);
|
|
63
|
+
const other = workspaces.value.find(
|
|
64
|
+
(candidate) => candidate._id !== workspace.value?._id,
|
|
65
|
+
);
|
|
66
|
+
return other?._id ?? null;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
async function confirmDelete(): Promise<void> {
|
|
70
|
+
if (!canDelete.value) return;
|
|
71
|
+
isDeleting.value = true;
|
|
72
|
+
try {
|
|
73
|
+
await $authFetch(CURRENT_ENDPOINT, { method: "DELETE" });
|
|
74
|
+
await leaveDeletedWorkspace();
|
|
75
|
+
} catch (error) {
|
|
76
|
+
isDeleting.value = false;
|
|
77
|
+
toast.add({
|
|
78
|
+
title: resolveApiError(error, "saas.workspace.general.error.delete"),
|
|
79
|
+
color: "error",
|
|
80
|
+
icon: "i-ph-warning-circle",
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
onMounted(initialize);
|
|
86
|
+
</script>
|
|
87
|
+
|
|
88
|
+
<template>
|
|
89
|
+
<div
|
|
90
|
+
class="border-error/40 flex flex-col gap-3 rounded-md border p-4"
|
|
91
|
+
>
|
|
92
|
+
<h3 class="text-error text-sm font-semibold">
|
|
93
|
+
{{ $t("saas.workspace.general.danger_zone_title") }}
|
|
94
|
+
</h3>
|
|
95
|
+
<USkeleton v-if="isLoading" class="h-10 w-full" />
|
|
96
|
+
<div v-else class="flex flex-wrap items-center justify-between gap-3">
|
|
97
|
+
<p class="text-muted max-w-xl text-sm">
|
|
98
|
+
{{ $t("saas.workspace.general.delete_intro", { days: retentionDays }) }}
|
|
99
|
+
</p>
|
|
100
|
+
<UButton color="error" variant="outline" @click="openConfirm">
|
|
101
|
+
{{ $t("saas.workspace.general.delete_action") }}
|
|
102
|
+
</UButton>
|
|
103
|
+
</div>
|
|
104
|
+
|
|
105
|
+
<UModal
|
|
106
|
+
v-model:open="isConfirmOpen"
|
|
107
|
+
:title="$t('saas.workspace.general.delete_action')"
|
|
108
|
+
>
|
|
109
|
+
<template #body>
|
|
110
|
+
<div class="flex flex-col gap-4">
|
|
111
|
+
<p class="text-sm">
|
|
112
|
+
{{
|
|
113
|
+
$t("saas.workspace.general.delete_warning", {
|
|
114
|
+
name: workspaceName,
|
|
115
|
+
days: retentionDays,
|
|
116
|
+
})
|
|
117
|
+
}}
|
|
118
|
+
</p>
|
|
119
|
+
<UFormField
|
|
120
|
+
:label="$t('saas.workspace.general.delete_confirm_label')"
|
|
121
|
+
>
|
|
122
|
+
<UInput v-model="confirmation" :placeholder="workspaceName" />
|
|
123
|
+
</UFormField>
|
|
124
|
+
<div class="flex justify-end gap-2">
|
|
125
|
+
<UButton
|
|
126
|
+
color="neutral"
|
|
127
|
+
variant="outline"
|
|
128
|
+
:disabled="isDeleting"
|
|
129
|
+
@click="isConfirmOpen = false"
|
|
130
|
+
>
|
|
131
|
+
{{ $t("saas.workspace.general.cancel") }}
|
|
132
|
+
</UButton>
|
|
133
|
+
<UButton
|
|
134
|
+
color="error"
|
|
135
|
+
:disabled="!canDelete"
|
|
136
|
+
:loading="isDeleting"
|
|
137
|
+
@click="confirmDelete"
|
|
138
|
+
>
|
|
139
|
+
{{ $t("saas.workspace.general.delete_submit") }}
|
|
140
|
+
</UButton>
|
|
141
|
+
</div>
|
|
142
|
+
</div>
|
|
143
|
+
</template>
|
|
144
|
+
</UModal>
|
|
145
|
+
</div>
|
|
146
|
+
</template>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
defineProps<{
|
|
3
|
+
routeParams?: Record<string, string>;
|
|
4
|
+
}>();
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<section class="flex grow gap-4">
|
|
9
|
+
<div
|
|
10
|
+
class="flex size-12 shrink-0 items-center justify-center rounded-lg bg-default shadow-sm ring ring-default"
|
|
11
|
+
>
|
|
12
|
+
<UIcon name="i-ph-building" class="text-primary" size="1.75rem" />
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
<div class="flex-1">
|
|
16
|
+
<h1 class="font-semibold text-highlighted">
|
|
17
|
+
{{ $t("saas.workspaces.detail") }}
|
|
18
|
+
</h1>
|
|
19
|
+
<p class="text-sm text-muted">
|
|
20
|
+
{{ $t("saas.workspaces.detail_description") }}
|
|
21
|
+
</p>
|
|
22
|
+
</div>
|
|
23
|
+
</section>
|
|
24
|
+
</template>
|