@saasicat/ui-vue 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +47 -0
- package/dist/index.cjs +3776 -0
- package/dist/index.d.cts +2395 -0
- package/dist/index.d.ts +2395 -0
- package/dist/index.js +3659 -0
- package/dist/testing-e2e/admin-pages-suite.cjs +134 -0
- package/dist/testing-e2e/admin-pages-suite.d.cts +37 -0
- package/dist/testing-e2e/admin-pages-suite.d.ts +37 -0
- package/dist/testing-e2e/admin-pages-suite.js +109 -0
- package/package.json +87 -0
- package/src/action-registry.ts +110 -0
- package/src/batch-column-fetcher.ts +152 -0
- package/src/boot-loader.ts +60 -0
- package/src/components/BundleVersionPublishDialog.vue +359 -0
- package/src/components/BusinessTypeVersionEditorDialog.vue +417 -0
- package/src/components/BusinessTypeVersionPublishDialog.vue +258 -0
- package/src/components/FeatureGate.vue +56 -0
- package/src/components/KpiCard.vue +53 -0
- package/src/components/KvBlock.vue +36 -0
- package/src/components/MarketingPromotionsTab.vue +861 -0
- package/src/components/MfaPromptDialog.vue +104 -0
- package/src/components/TenantActionConfirmDialog.vue +252 -0
- package/src/components/VersionDiffPreview.vue +150 -0
- package/src/components/bundle-editor/BundleCreatePanel.vue +681 -0
- package/src/components/bundle-editor/BundleFeaturesEditor.vue +215 -0
- package/src/components/bundle-editor/BundlePlanCompatPicker.vue +316 -0
- package/src/components/bundle-editor/BundleQuotasEditor.vue +219 -0
- package/src/components/bundle-editor/BundleStatusBanner.vue +189 -0
- package/src/components/bundle-editor/BundleVersionInlineEditor.vue +659 -0
- package/src/components/bundle-editor/BundleVersionStrip.vue +207 -0
- package/src/components/bundle-editor/bundle-version-status.ts +164 -0
- package/src/components/bundle-editor/catalog-i18n.ts +85 -0
- package/src/components/dialogs/PilotCreateDialog.vue +780 -0
- package/src/components/dialogs/PilotEditDialog.vue +548 -0
- package/src/components/dialogs/PromoCodeCreateDialog.vue +737 -0
- package/src/components/dialogs/PromoCodeEditDialog.vue +859 -0
- package/src/components/dialogs/types.ts +126 -0
- package/src/components/plan/PlanCycleToggle.vue +99 -0
- package/src/components/plan/PlanGrid.vue +211 -0
- package/src/components/plan/PriceSummary.vue +293 -0
- package/src/components/plan/PromoCodeInput.vue +192 -0
- package/src/components/plan/PublicBundleGrid.vue +287 -0
- package/src/components/plan-cockpit/PlanCockpit.vue +993 -0
- package/src/components/plan-cockpit/PlanCockpitAuditLog.vue +65 -0
- package/src/components/plan-cockpit/PlanCockpitDiffPanel.vue +91 -0
- package/src/components/plan-cockpit/PlanCockpitHeader.vue +98 -0
- package/src/components/plan-cockpit/PlanCockpitImpactPanel.vue +99 -0
- package/src/components/plan-cockpit/PlanCockpitKpis.vue +57 -0
- package/src/components/plan-cockpit/PlanCockpitVersions.vue +226 -0
- package/src/components/plan-cockpit/types.ts +72 -0
- package/src/components/plan-create-dialog/PlanCreateDialog.vue +508 -0
- package/src/components/plan-detail/PlanAuditLog.vue +59 -0
- package/src/components/plan-detail/PlanDetail.vue +1195 -0
- package/src/components/plan-detail/PlanDetailHeader.vue +185 -0
- package/src/components/plan-detail/PlanDetailKpis.vue +57 -0
- package/src/components/plan-detail/PlanTerminateDialog.vue +76 -0
- package/src/components/plan-detail/PlanVersionDiffPanel.vue +149 -0
- package/src/components/plan-detail/PlanVersionsPanel.vue +255 -0
- package/src/components/plan-detail/types.ts +59 -0
- package/src/components/plan-list/PlanList.vue +1067 -0
- package/src/components/plan-matrix/PlanMatrix.vue +1113 -0
- package/src/components/plan-review/PlanReview.vue +742 -0
- package/src/components/plan-version-editor/PlanCatalogPreview.vue +184 -0
- package/src/components/plan-version-editor/PlanComponentPool.vue +272 -0
- package/src/components/plan-version-editor/PlanVersionBasket.vue +281 -0
- package/src/components/plan-version-editor/PlanVersionDiffDialog.vue +84 -0
- package/src/components/plan-version-editor/PlanVersionEditor.vue +1728 -0
- package/src/components/plan-version-editor/PlanVersionEditorHeader.vue +94 -0
- package/src/components/plan-version-editor/types.ts +96 -0
- package/src/components/wizard-stepper/WizardStepper.vue +107 -0
- package/src/create-admin-routes.ts +68 -0
- package/src/create-super-admin-app.ts +345 -0
- package/src/entitlement-provider.ts +36 -0
- package/src/feature-router-guard.ts +77 -0
- package/src/http-json.ts +62 -0
- package/src/index.ts +98 -0
- package/src/manifest-loader.ts +139 -0
- package/src/manifest-store-factory.ts +114 -0
- package/src/nav-builder.ts +274 -0
- package/src/pages-standard/AdminLayout.vue +411 -0
- package/src/pages-standard/AdminManifestErrorPage.vue +79 -0
- package/src/pages-standard/AuditPage.vue +223 -0
- package/src/pages-standard/BundlesPage.vue +910 -0
- package/src/pages-standard/BusinessTypesPage.vue +662 -0
- package/src/pages-standard/DashboardPage.vue +595 -0
- package/src/pages-standard/DiscoveryPage.vue +663 -0
- package/src/pages-standard/EmailHistoryPage.vue +576 -0
- package/src/pages-standard/MarketingCatalogPage.vue +1771 -0
- package/src/pages-standard/PilotsPage.vue +577 -0
- package/src/pages-standard/PlanVersionsPage.vue +216 -0
- package/src/pages-standard/PlansPage.vue +1222 -0
- package/src/pages-standard/PlatformEmailPage.vue +434 -0
- package/src/pages-standard/PromoCodeDetailPage.vue +331 -0
- package/src/pages-standard/PromoCodesPage.vue +589 -0
- package/src/pages-standard/SubscriptionsPage.vue +159 -0
- package/src/pages-standard/SuperAdminLoginPage.vue +299 -0
- package/src/pages-standard/SuperAdminSetupWizard.vue +405 -0
- package/src/pages-standard/TenantDetailPage.vue +432 -0
- package/src/pages-standard/TenantsPage.vue +732 -0
- package/src/pages-standard/UsersPage.vue +504 -0
- package/src/pages-standard/bundles-page/BundleAccordionList.vue +116 -0
- package/src/pages-standard/bundles-page/BundleDetailPanel.vue +193 -0
- package/src/pages-standard/bundles-page/BundlesFilterBar.vue +48 -0
- package/src/pages-standard/bundles-page/BundlesHeader.vue +67 -0
- package/src/pages-standard/bundles-page/BundlesKpis.vue +39 -0
- package/src/pages-standard/bundles-page/types.ts +15 -0
- package/src/pages-standard/discovery-page/CatalogEntryTransPanel.vue +246 -0
- package/src/pages-standard/discovery-page/DiscoveryCapList.vue +171 -0
- package/src/pages-standard/discovery-page/DiscoveryFeatureCard.vue +410 -0
- package/src/pages-standard/discovery-page/DiscoveryHeader.vue +31 -0
- package/src/pages-standard/discovery-page/DiscoveryKpis.vue +47 -0
- package/src/pages-standard/discovery-page/DiscoveryMetaBanner.vue +26 -0
- package/src/pages-standard/discovery-page/DiscoveryQuotaCard.vue +247 -0
- package/src/pages-standard/discovery-page/DiscoveryStatusControl.vue +73 -0
- package/src/pages-standard/discovery-page/discovery-ui.ts +166 -0
- package/src/pages-standard/email-history.types.ts +48 -0
- package/src/pages-standard/marketing-catalog/MarketingCatalogAdmin.vue +448 -0
- package/src/pages-standard/marketing-catalog/MarketingCatalogHeader.vue +93 -0
- package/src/pages-standard/marketing-catalog/MarketingCatalogPreview.vue +138 -0
- package/src/pages-standard/marketing-catalog/MarketingCatalogToolbar.vue +58 -0
- package/src/pages-standard/marketing-catalog/types.ts +43 -0
- package/src/pages-standard/plan-versions/PlanDiffCard.vue +132 -0
- package/src/pages-standard/plan-versions/PlanVersionHeader.vue +293 -0
- package/src/pages-standard/plan-versions/PlanVersionStatusBadge.vue +48 -0
- package/src/pages-standard/plan-versions/PlanVersionsAudit.vue +307 -0
- package/src/pages-standard/plan-versions/PlanVersionsDiff.vue +269 -0
- package/src/pages-standard/plan-versions/PlanVersionsKpi.vue +65 -0
- package/src/pages-standard/plan-versions/PlanVersionsList.vue +292 -0
- package/src/pages-standard/plan-versions/PlanVersionsMatrix.vue +261 -0
- package/src/pages-standard/plan-versions/PlanVersionsTimeline.vue +300 -0
- package/src/pages-standard/plan-versions/VersionDiffPreview.vue +167 -0
- package/src/pages-standard/plan-versions/format.ts +53 -0
- package/src/pages-standard/plan-versions/types.ts +33 -0
- package/src/pages-standard/plans-page/PlanArchiveDialog.vue +50 -0
- package/src/pages-standard/plans-page/PlanBundleOverview.vue +147 -0
- package/src/pages-standard/plans-page/PlanDiscardDraftDialog.vue +46 -0
- package/src/pages-standard/plans-page/PlanPublishDialog.vue +106 -0
- package/src/pages-standard/plans-page/PlansPageToast.vue +69 -0
- package/src/pages-standard/plans-page/types.ts +18 -0
- package/src/pages-standard/platform-email.types.ts +41 -0
- package/src/pages-standard/sa-theme.css +223 -0
- package/src/pages-standard/tenants/StatusPill.vue +62 -0
- package/src/pages-standard/tenants/format.ts +38 -0
- package/src/pages-tenant/LimitsRow.vue +67 -0
- package/src/pages-tenant/MySubscriptionBundlesPage.vue +604 -0
- package/src/pages-tenant/OnboardingConfigurator.vue +417 -0
- package/src/pages-tenant/PackageSnapshotPanel.vue +241 -0
- package/src/pages-tenant/PendingVersionBanner.vue +126 -0
- package/src/pages-tenant/PlanChangeWizard.vue +630 -0
- package/src/pages-tenant/TenantPlanSection.vue +729 -0
- package/src/pages-tenant/UsageBar.vue +107 -0
- package/src/pages-tenant/default-i18n.ts +280 -0
- package/src/pages-tenant/tenant-plan-section/BundlePreviewDialog.vue +304 -0
- package/src/pages-tenant/tenant-plan-section/TenantBundleStore.vue +323 -0
- package/src/pages-tenant/tenant-plan-section/TenantFeatureMatrix.vue +122 -0
- package/src/pages-tenant/tenant-plan-section/TenantPlanCardHeader.vue +67 -0
- package/src/pages-tenant/tenant-plan-section/TenantUsageGrid.vue +31 -0
- package/src/plan-versions-catalog.ts +368 -0
- package/src/platform-loaders.ts +68 -0
- package/src/project-page-host.ts +108 -0
- package/src/testing-e2e/admin-pages-suite.ts +187 -0
- package/src/types.ts +58 -0
- package/src/use-actions.ts +25 -0
- package/src/use-api-list.ts +151 -0
- package/src/use-audit-entries.ts +48 -0
- package/src/use-batch-columns.ts +59 -0
- package/src/use-bulk-publish.ts +150 -0
- package/src/use-bundle-versions-map.ts +112 -0
- package/src/use-bundles.ts +297 -0
- package/src/use-business-types.ts +269 -0
- package/src/use-catalog-entries.ts +243 -0
- package/src/use-discovery.ts +158 -0
- package/src/use-entitlement.ts +87 -0
- package/src/use-live-plan-versions.ts +126 -0
- package/src/use-manifest.ts +57 -0
- package/src/use-marketing-projections.ts +160 -0
- package/src/use-nav.ts +33 -0
- package/src/use-plan-editor.ts +162 -0
- package/src/use-plan-versions.ts +83 -0
- package/src/use-plans.ts +375 -0
- package/src/use-platform-tenant-actions.ts +286 -0
- package/src/use-promotions.ts +126 -0
- package/src/use-public-boot.ts +40 -0
- package/src/use-subscription-draft.ts +355 -0
- package/src/use-super-admin-context.ts +93 -0
- package/src/use-tenant-action-flow.ts +238 -0
- package/src/use-tenant-billing-catalog.ts +160 -0
- package/src/use-tenant-billing.ts +453 -0
- package/src/use-tenant-manifest.ts +94 -0
- package/src/use-tenant-subscription-bundles.ts +148 -0
- package/src/use-tenants.ts +61 -0
- package/src/version.ts +10 -0
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="sa-audit">
|
|
3
|
+
<header class="sa-audit__head">
|
|
4
|
+
<div>
|
|
5
|
+
<h1 class="sa-audit__title">Audit-Trail</h1>
|
|
6
|
+
<p class="sa-audit__sub">{{ rows.length }} Einträge · plattformweit.</p>
|
|
7
|
+
</div>
|
|
8
|
+
<q-btn unelevated color="primary" icon="refresh" label="Filtern" @click="reload" />
|
|
9
|
+
</header>
|
|
10
|
+
|
|
11
|
+
<div class="sa-audit__body">
|
|
12
|
+
<div class="sa-audit__filter">
|
|
13
|
+
<q-input v-model="filter.actor" outlined dense label="Actor (E-Mail)" clearable />
|
|
14
|
+
<q-input v-model="filter.action" outlined dense label="Action" clearable />
|
|
15
|
+
<q-input v-model="filter.entity" outlined dense label="Entity" clearable />
|
|
16
|
+
<q-input v-model="filter.since" outlined dense type="date" label="Seit" clearable />
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<div class="sa-audit__card">
|
|
20
|
+
<q-table
|
|
21
|
+
flat
|
|
22
|
+
:rows="rows"
|
|
23
|
+
:columns="columns"
|
|
24
|
+
row-key="id"
|
|
25
|
+
:pagination="{ rowsPerPage: 0 }"
|
|
26
|
+
:loading="loading"
|
|
27
|
+
hide-pagination
|
|
28
|
+
>
|
|
29
|
+
<template #body-cell-changes="{ row }">
|
|
30
|
+
<q-td>
|
|
31
|
+
<q-btn flat dense icon="code" color="primary" @click="openDetail(row)">
|
|
32
|
+
<q-tooltip>Details</q-tooltip>
|
|
33
|
+
</q-btn>
|
|
34
|
+
</q-td>
|
|
35
|
+
</template>
|
|
36
|
+
</q-table>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<q-dialog v-model="detailOpen">
|
|
41
|
+
<q-card style="min-width: 480px; max-width: 96vw">
|
|
42
|
+
<q-card-section>
|
|
43
|
+
<div class="text-h6">{{ detail?.action }} · {{ detail?.entity }}</div>
|
|
44
|
+
<div class="text-caption text-grey-7">
|
|
45
|
+
{{ detail ? formatTs(detail.createdAt) : '' }} · Actor:
|
|
46
|
+
{{ detail ? actorEmail(detail) : '—' }}
|
|
47
|
+
</div>
|
|
48
|
+
</q-card-section>
|
|
49
|
+
<q-card-section>
|
|
50
|
+
<pre class="sa-audit__kv">{{
|
|
51
|
+
JSON.stringify(detail?.changes ?? {}, null, 2)
|
|
52
|
+
}}</pre>
|
|
53
|
+
</q-card-section>
|
|
54
|
+
<q-card-actions align="right">
|
|
55
|
+
<q-btn v-close-popup flat label="Schließen" />
|
|
56
|
+
</q-card-actions>
|
|
57
|
+
</q-card>
|
|
58
|
+
</q-dialog>
|
|
59
|
+
</div>
|
|
60
|
+
</template>
|
|
61
|
+
|
|
62
|
+
<script setup lang="ts">
|
|
63
|
+
import { onMounted, reactive, ref } from 'vue';
|
|
64
|
+
|
|
65
|
+
// Platform standard page: audit trail. Data-agnostic — the app passes
|
|
66
|
+
// `loadAudit({ actor, action, entity, since, limit })` through.
|
|
67
|
+
|
|
68
|
+
export interface AuditRow {
|
|
69
|
+
id: string;
|
|
70
|
+
createdAt: string;
|
|
71
|
+
action: string;
|
|
72
|
+
entity: string;
|
|
73
|
+
entityId: string;
|
|
74
|
+
changes: Record<string, unknown> | null;
|
|
75
|
+
user?: { email: string; firstName?: string; lastName?: string } | null;
|
|
76
|
+
userEmail?: string | null;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
interface AuditFilter {
|
|
80
|
+
actor?: string;
|
|
81
|
+
action?: string;
|
|
82
|
+
entity?: string;
|
|
83
|
+
since?: string;
|
|
84
|
+
limit?: number;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const props = defineProps<{
|
|
88
|
+
loadAudit: (filter: AuditFilter) => Promise<AuditRow[]>;
|
|
89
|
+
pageSize?: number;
|
|
90
|
+
}>();
|
|
91
|
+
|
|
92
|
+
const rows = ref<AuditRow[]>([]);
|
|
93
|
+
const loading = ref(false);
|
|
94
|
+
const filter = reactive({ actor: '', action: '', entity: '', since: '' });
|
|
95
|
+
const detailOpen = ref(false);
|
|
96
|
+
const detail = ref<AuditRow | null>(null);
|
|
97
|
+
|
|
98
|
+
const columns = [
|
|
99
|
+
{
|
|
100
|
+
name: 'createdAt',
|
|
101
|
+
label: 'Zeit',
|
|
102
|
+
field: (r: AuditRow) => formatTs(r.createdAt),
|
|
103
|
+
align: 'left' as const,
|
|
104
|
+
sortable: true,
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
name: 'actor',
|
|
108
|
+
label: 'Actor',
|
|
109
|
+
field: actorEmail,
|
|
110
|
+
align: 'left' as const,
|
|
111
|
+
},
|
|
112
|
+
{ name: 'action', label: 'Action', field: 'action', align: 'left' as const },
|
|
113
|
+
{ name: 'entity', label: 'Entity', field: 'entity', align: 'left' as const },
|
|
114
|
+
{
|
|
115
|
+
name: 'entityId',
|
|
116
|
+
label: 'ID',
|
|
117
|
+
field: (r: AuditRow) => r.entityId.slice(0, 8),
|
|
118
|
+
align: 'left' as const,
|
|
119
|
+
},
|
|
120
|
+
{ name: 'changes', label: '', field: 'id', align: 'right' as const },
|
|
121
|
+
];
|
|
122
|
+
|
|
123
|
+
async function reload() {
|
|
124
|
+
loading.value = true;
|
|
125
|
+
try {
|
|
126
|
+
rows.value = await props.loadAudit({
|
|
127
|
+
actor: filter.actor || undefined,
|
|
128
|
+
action: filter.action || undefined,
|
|
129
|
+
entity: filter.entity || undefined,
|
|
130
|
+
since: filter.since || undefined,
|
|
131
|
+
limit: props.pageSize ?? 200,
|
|
132
|
+
});
|
|
133
|
+
} catch (err) {
|
|
134
|
+
// Backend endpoint missing → empty table, no page crash.
|
|
135
|
+
rows.value = [];
|
|
136
|
+
console.warn('[AuditPage] loadAudit failed:', err);
|
|
137
|
+
} finally {
|
|
138
|
+
loading.value = false;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
onMounted(reload);
|
|
143
|
+
|
|
144
|
+
function openDetail(row: AuditRow) {
|
|
145
|
+
detail.value = row;
|
|
146
|
+
detailOpen.value = true;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
function actorEmail(r: AuditRow): string {
|
|
150
|
+
return r.user?.email ?? r.userEmail ?? '—';
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
function formatTs(iso: string | null | undefined): string {
|
|
154
|
+
if (!iso) return '—';
|
|
155
|
+
try {
|
|
156
|
+
return new Date(iso).toLocaleString('de-DE', {
|
|
157
|
+
day: '2-digit',
|
|
158
|
+
month: 'short',
|
|
159
|
+
year: 'numeric',
|
|
160
|
+
hour: '2-digit',
|
|
161
|
+
minute: '2-digit',
|
|
162
|
+
});
|
|
163
|
+
} catch {
|
|
164
|
+
return String(iso);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
</script>
|
|
168
|
+
|
|
169
|
+
<style scoped>
|
|
170
|
+
.sa-audit {
|
|
171
|
+
min-height: calc(100vh - 56px);
|
|
172
|
+
background: var(--sa-bg-app, #f1f5f9);
|
|
173
|
+
}
|
|
174
|
+
.sa-audit__head {
|
|
175
|
+
padding: 20px 28px 8px;
|
|
176
|
+
display: flex;
|
|
177
|
+
align-items: flex-start;
|
|
178
|
+
justify-content: space-between;
|
|
179
|
+
gap: 16px;
|
|
180
|
+
}
|
|
181
|
+
.sa-audit__title {
|
|
182
|
+
margin: 0;
|
|
183
|
+
font-family: var(--sa-font-head, system-ui, sans-serif);
|
|
184
|
+
font-weight: 700;
|
|
185
|
+
font-size: 22px;
|
|
186
|
+
color: var(--sa-heading, #0f172a);
|
|
187
|
+
}
|
|
188
|
+
.sa-audit__sub {
|
|
189
|
+
margin: 4px 0 0;
|
|
190
|
+
color: var(--sa-muted-dark, #475569);
|
|
191
|
+
font-size: 13.5px;
|
|
192
|
+
}
|
|
193
|
+
.sa-audit__body {
|
|
194
|
+
padding: 12px 28px 28px;
|
|
195
|
+
}
|
|
196
|
+
.sa-audit__filter {
|
|
197
|
+
display: flex;
|
|
198
|
+
gap: 10px;
|
|
199
|
+
margin-bottom: 12px;
|
|
200
|
+
flex-wrap: wrap;
|
|
201
|
+
}
|
|
202
|
+
.sa-audit__filter > * {
|
|
203
|
+
flex: 1;
|
|
204
|
+
min-width: 180px;
|
|
205
|
+
}
|
|
206
|
+
.sa-audit__card {
|
|
207
|
+
background: #fff;
|
|
208
|
+
border: 1px solid var(--sa-border, #e2e8f0);
|
|
209
|
+
border-radius: 12px;
|
|
210
|
+
overflow: hidden;
|
|
211
|
+
padding: 8px 0;
|
|
212
|
+
}
|
|
213
|
+
.sa-audit__kv {
|
|
214
|
+
background: #f8fafc;
|
|
215
|
+
border: 1px solid var(--sa-border, #e2e8f0);
|
|
216
|
+
border-radius: 8px;
|
|
217
|
+
padding: 12px;
|
|
218
|
+
font-size: 12px;
|
|
219
|
+
margin: 0;
|
|
220
|
+
overflow-x: auto;
|
|
221
|
+
max-height: 50vh;
|
|
222
|
+
}
|
|
223
|
+
</style>
|