@stacksjs/defaults 0.75.529 → 0.75.537
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/ai/skills/stacks-actions/SKILL.md +1 -1
- package/ai/skills/stacks-build/SKILL.md +1 -1
- package/ai/skills/stacks-dashboard/SKILL.md +2 -2
- package/ai/skills/stacks-database/SKILL.md +1 -1
- package/ai/skills/stacks-migrations/SKILL.md +2 -2
- package/ai/skills/stacks-native/CATALOG.md +6 -6
- package/app/Actions/Dashboard/Commerce/CommerceCouponsAction.ts +27 -15
- package/app/Actions/Dashboard/Commerce/CommerceCouponsExportAction.ts +45 -0
- package/app/Actions/Dashboard/Commerce/CommerceCustomersAction.ts +22 -12
- package/app/Actions/Dashboard/Commerce/CommerceCustomersExportAction.ts +44 -0
- package/app/Actions/Dashboard/Commerce/CommercePosCheckoutAction.ts +9 -29
- package/app/Actions/Dashboard/Commerce/CommercePrintDevicesAction.ts +7 -9
- package/app/Actions/Dashboard/Commerce/CommerceProductDetailAction.ts +9 -8
- package/app/Actions/Dashboard/Commerce/CommerceTaxesAction.ts +7 -9
- package/app/Actions/Dashboard/Commerce/ManufacturerIndexAction.ts +8 -20
- package/app/Actions/Dashboard/Commerce/commerce-coupon-list.test.ts +203 -0
- package/app/Actions/Dashboard/Commerce/commerce-coupon-list.ts +248 -0
- package/app/Actions/Dashboard/Commerce/commerce-customer-list.test.ts +183 -0
- package/app/Actions/Dashboard/Commerce/commerce-customer-list.ts +186 -0
- package/app/Actions/Dashboard/Commerce/commerce-customer-records.test.ts +1 -34
- package/app/Actions/Dashboard/Commerce/commerce-customer-records.ts +0 -11
- package/app/Actions/Dashboard/Commerce/commerce-manufacturer-list.test.ts +118 -0
- package/app/Actions/Dashboard/Commerce/commerce-manufacturer-list.ts +41 -0
- package/app/Actions/Dashboard/Commerce/commerce-pos-catalog.test.ts +17 -5
- package/app/Actions/Dashboard/Commerce/commerce-pos-catalog.ts +17 -3
- package/app/Actions/Dashboard/Commerce/commerce-print-device-list.test.ts +99 -0
- package/app/Actions/Dashboard/Commerce/commerce-print-device-list.ts +18 -0
- package/app/Actions/Dashboard/Commerce/commerce-product-list.ts +5 -5
- package/app/Actions/Dashboard/Commerce/commerce-product-options.test.ts +81 -0
- package/app/Actions/Dashboard/Commerce/commerce-tax-rate-list.test.ts +99 -0
- package/app/Actions/Dashboard/Commerce/commerce-tax-rate-list.ts +18 -0
- package/app/Actions/Dashboard/Commerce/coupon-records.test.ts +1 -16
- package/app/Actions/Dashboard/Commerce/coupon-records.ts +6 -10
- package/app/Actions/Dashboard/Commerce/manufacturer-records.test.ts +5 -17
- package/app/Actions/Dashboard/Commerce/manufacturer-records.ts +0 -29
- package/app/Actions/Dashboard/Email/captured-mail.test.ts +16 -0
- package/app/Actions/Dashboard/Email/captured-mail.ts +9 -1
- package/app/Actions/Dashboard/Models/model-write.ts +36 -3
- package/app/Actions/Dashboard/Notifications/NotificationDeliveryHistoryAction.ts +13 -58
- package/app/Actions/Dashboard/Notifications/notification-delivery-history.ts +74 -0
- package/app/Actions/SitemapAction.ts +3 -1
- package/app/Models/Notification.ts +3 -1
- package/app/Models/NotificationDelivery.ts +4 -0
- package/app/Models/User.ts +10 -1
- package/bootstrap.ts +10 -2
- package/functions/commerce/tax-types.ts +21 -0
- package/functions/dashboard-list.test.ts +16 -0
- package/functions/dashboard-list.ts +14 -6
- package/functions/dashboard-model-record.test.ts +139 -0
- package/functions/dashboard-model-record.ts +353 -0
- package/functions/monitoring/errors.ts +22 -103
- package/functions/notifications/deliveries.ts +7 -38
- package/functions/queries.ts +7 -10
- package/ide/vscode/package.json +1 -1
- package/package.json +5 -5
- package/resources/components/Dashboard/Analytics/AnalyticsHub.stx +2 -2
- package/resources/components/Dashboard/Analytics/CampaignAnalytics.stx +22 -28
- package/resources/components/Dashboard/Analytics/EventAnalytics.stx +26 -34
- package/resources/components/Dashboard/Analytics/SalesAnalytics.stx +29 -37
- package/resources/components/Dashboard/Analytics/WebAnalyticsBreakdown.stx +12 -16
- package/resources/components/Dashboard/Analytics/WebAnalyticsDashboard.stx +43 -53
- package/resources/components/Dashboard/App/RequestsOverview.stx +2 -1
- package/resources/components/Dashboard/App/SourceInventory.stx +2 -1
- package/resources/components/Dashboard/Auth/AccessTokens.stx +3 -5
- package/resources/components/Dashboard/Billing/BillingPaymentMethodsPanel.stx +9 -11
- package/resources/components/Dashboard/Billing/BillingSettings.stx +1 -1
- package/resources/components/Dashboard/Buddy/BuddyAssistant.stx +4 -6
- package/resources/components/Dashboard/Commerce/CommerceCategoriesDashboard.stx +2 -2
- package/resources/components/Dashboard/Commerce/CommerceCategoriesTable.stx +3 -3
- package/resources/components/Dashboard/Commerce/CommerceCategoryDialog.stx +2 -2
- package/resources/components/Dashboard/Commerce/CommerceCategoryHierarchy.stx +3 -5
- package/resources/components/Dashboard/Commerce/CommerceCouponBreakdown.stx +17 -13
- package/resources/components/Dashboard/Commerce/CommerceCouponDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceCouponsDashboard.stx +57 -85
- package/resources/components/Dashboard/Commerce/CommerceCouponsTable.stx +32 -9
- package/resources/components/Dashboard/Commerce/CommerceCustomerDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceCustomersDashboard.stx +49 -83
- package/resources/components/Dashboard/Commerce/CommerceCustomersTable.stx +32 -9
- package/resources/components/Dashboard/Commerce/CommerceGiftCardBreakdown.stx +9 -15
- package/resources/components/Dashboard/Commerce/CommerceGiftCardDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceGiftCardsDashboard.stx +35 -119
- package/resources/components/Dashboard/Commerce/CommerceGiftCardsTable.stx +3 -3
- package/resources/components/Dashboard/Commerce/CommerceManufacturerDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceManufacturersDashboard.stx +3 -5
- package/resources/components/Dashboard/Commerce/CommerceManufacturersTable.stx +2 -2
- package/resources/components/Dashboard/Commerce/CommerceOrderDialog.stx +4 -4
- package/resources/components/Dashboard/Commerce/CommerceOrdersDashboard.stx +42 -129
- package/resources/components/Dashboard/Commerce/CommerceOrdersTable.stx +3 -3
- package/resources/components/Dashboard/Commerce/CommerceOverviewDashboard.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceOverviewOrdersTable.stx +9 -11
- package/resources/components/Dashboard/Commerce/CommerceOverviewProductsTable.stx +5 -7
- package/resources/components/Dashboard/Commerce/CommerceOverviewStats.stx +14 -16
- package/resources/components/Dashboard/Commerce/CommercePaymentsBreakdown.stx +12 -18
- package/resources/components/Dashboard/Commerce/CommercePaymentsDashboard.stx +41 -120
- package/resources/components/Dashboard/Commerce/CommercePaymentsTable.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommercePosCart.stx +13 -15
- package/resources/components/Dashboard/Commerce/CommercePosCatalog.stx +17 -19
- package/resources/components/Dashboard/Commerce/CommercePosCheckoutDialog.stx +2 -2
- package/resources/components/Dashboard/Commerce/CommercePosDashboard.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommercePosReceiptDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceProductDetailDashboard.stx +5 -5
- package/resources/components/Dashboard/Commerce/CommerceProductDialog.stx +3 -3
- package/resources/components/Dashboard/Commerce/CommerceProductsDashboard.stx +41 -122
- package/resources/components/Dashboard/Commerce/CommerceProductsTable.stx +3 -3
- package/resources/components/Dashboard/Commerce/CommerceReviewEditDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/CommerceReviewsDashboard.stx +38 -122
- package/resources/components/Dashboard/Commerce/CommerceReviewsTable.stx +2 -2
- package/resources/components/Dashboard/Commerce/CommerceTaxDialog.stx +3 -3
- package/resources/components/Dashboard/Commerce/CommerceTaxesDashboard.stx +5 -4
- package/resources/components/Dashboard/Commerce/CommerceTaxesTable.stx +4 -3
- package/resources/components/Dashboard/Commerce/CommerceUnitDialog.stx +3 -7
- package/resources/components/Dashboard/Commerce/CommerceUnitsDashboard.stx +3 -5
- package/resources/components/Dashboard/Commerce/CommerceUnitsTable.stx +2 -2
- package/resources/components/Dashboard/Commerce/CommerceVariantDialog.stx +3 -3
- package/resources/components/Dashboard/Commerce/CommerceVariantsDashboard.stx +4 -4
- package/resources/components/Dashboard/Commerce/CommerceVariantsTable.stx +3 -5
- package/resources/components/Dashboard/Commerce/Delivery/CourierDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/Delivery/CouriersDashboard.stx +1 -1
- package/resources/components/Dashboard/Commerce/Delivery/CouriersTable.stx +2 -2
- package/resources/components/Dashboard/Commerce/Delivery/DeliveryOverviewDashboard.stx +44 -52
- package/resources/components/Dashboard/Commerce/Delivery/DeliveryPagination.stx +2 -2
- package/resources/components/Dashboard/Commerce/Delivery/DeliveryRouteDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/Delivery/DeliveryRoutesDashboard.stx +1 -1
- package/resources/components/Dashboard/Commerce/Delivery/DeliveryRoutesTable.stx +2 -2
- package/resources/components/Dashboard/Commerce/Delivery/DigitalDeliveriesDashboard.stx +1 -1
- package/resources/components/Dashboard/Commerce/Delivery/DigitalDeliveryTable.stx +2 -2
- package/resources/components/Dashboard/Commerce/Delivery/LicenseKeyDialog.stx +3 -3
- package/resources/components/Dashboard/Commerce/Delivery/LicenseKeysDashboard.stx +1 -1
- package/resources/components/Dashboard/Commerce/Delivery/LicenseKeysTable.stx +2 -2
- package/resources/components/Dashboard/Commerce/Delivery/ShippingMethodsDashboard.stx +1 -1
- package/resources/components/Dashboard/Commerce/Delivery/ShippingMethodsTable.stx +2 -2
- package/resources/components/Dashboard/Commerce/Delivery/ShippingRateDialog.stx +2 -2
- package/resources/components/Dashboard/Commerce/Delivery/ShippingRatesDashboard.stx +1 -1
- package/resources/components/Dashboard/Commerce/Delivery/ShippingRatesTable.stx +2 -2
- package/resources/components/Dashboard/Commerce/Delivery/ShippingZoneDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/Delivery/ShippingZonesDashboard.stx +1 -1
- package/resources/components/Dashboard/Commerce/Delivery/ShippingZonesTable.stx +4 -8
- package/resources/components/Dashboard/Commerce/PaymentDetailsDialog.stx +1 -3
- package/resources/components/Dashboard/Commerce/PrintDeviceBreakdown.stx +9 -15
- package/resources/components/Dashboard/Commerce/PrintDeviceDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/PrintDevicesDashboard.stx +3 -3
- package/resources/components/Dashboard/Commerce/PrintDevicesTable.stx +3 -3
- package/resources/components/Dashboard/Commerce/PrintLogBreakdown.stx +3 -9
- package/resources/components/Dashboard/Commerce/PrintLogDetailsDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/PrintLogsDashboard.stx +4 -4
- package/resources/components/Dashboard/Commerce/PrintLogsTable.stx +8 -10
- package/resources/components/Dashboard/Commerce/ProductWaitlistDashboard.stx +37 -109
- package/resources/components/Dashboard/Commerce/ProductWaitlistEntryDialog.stx +3 -3
- package/resources/components/Dashboard/Commerce/ProductWaitlistTable.stx +2 -2
- package/resources/components/Dashboard/Commerce/RestaurantWaitlistDashboard.stx +38 -112
- package/resources/components/Dashboard/Commerce/RestaurantWaitlistEntryDialog.stx +2 -2
- package/resources/components/Dashboard/Commerce/RestaurantWaitlistTable.stx +2 -2
- package/resources/components/Dashboard/Content/AuthorsDashboard.stx +4 -4
- package/resources/components/Dashboard/Content/BlogDashboard.stx +4 -4
- package/resources/components/Dashboard/Content/CommentsDashboard.stx +36 -83
- package/resources/components/Dashboard/Content/ContentDashboard.stx +12 -14
- package/resources/components/Dashboard/Content/ContentTaxonomyDashboard.stx +2 -2
- package/resources/components/Dashboard/Content/FileManagerDashboard.stx +8 -12
- package/resources/components/Dashboard/Content/FileStoragePanel.stx +6 -10
- package/resources/components/Dashboard/Content/FileUploadDialog.stx +1 -3
- package/resources/components/Dashboard/Content/PagesDashboard.stx +39 -78
- package/resources/components/Dashboard/Content/PostEditorDialog.stx +4 -8
- package/resources/components/Dashboard/Content/PostsDashboard.stx +44 -85
- package/resources/components/Dashboard/Content/SeoDashboard.stx +5 -4
- package/resources/components/Dashboard/Data/DataRecords.stx +140 -12
- package/resources/components/Dashboard/Deployments/DeploymentList.stx +4 -4
- package/resources/components/Dashboard/Deployments/DeploymentTable.stx +3 -1
- package/resources/components/Dashboard/Elements/DropdownNavigation.stx +5 -7
- package/resources/components/Dashboard/Email/CapturedMailDashboard.stx +1 -3
- package/resources/components/Dashboard/Email/CapturedMailList.stx +18 -20
- package/resources/components/Dashboard/Email/EmailActivityDashboard.stx +24 -28
- package/resources/components/Dashboard/Email/EmailSettingsList.stx +6 -8
- package/resources/components/Dashboard/Email/EmailSettingsNavigation.stx +10 -12
- package/resources/components/Dashboard/Email/EmailSidebar.stx +33 -37
- package/resources/components/Dashboard/Email/InboxMessageDetail.stx +1 -1
- package/resources/components/Dashboard/Email/InboxMessageList.stx +16 -18
- package/resources/components/Dashboard/Email/InboxSettingsDashboard.stx +1 -1
- package/resources/components/Dashboard/Environment/EnvironmentDashboard.stx +2 -2
- package/resources/components/Dashboard/GlobalSearch.stx +19 -21
- package/resources/components/Dashboard/Home/DashboardHome.stx +8 -1
- package/resources/components/Dashboard/Infrastructure/CloudDashboard.stx +1 -1
- package/resources/components/Dashboard/Infrastructure/DnsDashboard.stx +27 -13
- package/resources/components/Dashboard/Infrastructure/LogsDashboard.stx +1 -1
- package/resources/components/Dashboard/Infrastructure/MailboxesDashboard.stx +46 -8
- package/resources/components/Dashboard/Infrastructure/ServerlessDashboard.stx +1 -1
- package/resources/components/Dashboard/Infrastructure/ServersDashboard.stx +1 -1
- package/resources/components/Dashboard/Jobs/JobDetail.stx +1 -1
- package/resources/components/Dashboard/Jobs/JobHistory.stx +44 -57
- package/resources/components/Dashboard/Jobs/JobTable.stx +23 -25
- package/resources/components/Dashboard/Kanban/KanbanCardDialog.stx +1 -1
- package/resources/components/Dashboard/Library/ComponentsDashboard.stx +1 -1
- package/resources/components/Dashboard/Management/AssignmentDrawer.stx +5 -7
- package/resources/components/Dashboard/Management/PermissionsDashboard.stx +35 -43
- package/resources/components/Dashboard/Marketing/AbandonedCartsDashboard.stx +11 -13
- package/resources/components/Dashboard/Marketing/CampaignDialog.stx +1 -3
- package/resources/components/Dashboard/Marketing/CampaignsDashboard.stx +2 -2
- package/resources/components/Dashboard/Marketing/CampaignsTable.stx +2 -2
- package/resources/components/Dashboard/Marketing/MarketingListsDashboard.stx +1 -1
- package/resources/components/Dashboard/Marketing/MarketingListsTable.stx +2 -2
- package/resources/components/Dashboard/Marketing/SocialPostDialog.stx +1 -3
- package/resources/components/Dashboard/Marketing/SocialPostsDashboard.stx +2 -2
- package/resources/components/Dashboard/Marketing/SocialPostsTable.stx +2 -2
- package/resources/components/Dashboard/Models/ModelRecordActions.stx +11 -2
- package/resources/components/Dashboard/Models/ModelRecordCreate.stx +193 -0
- package/resources/components/Dashboard/Models/ModelRecordDetail.stx +144 -0
- package/resources/components/Dashboard/Models/ModelRecordEdit.stx +176 -0
- package/resources/components/Dashboard/Models/ModelRecordsDashboard.stx +52 -186
- package/resources/components/Dashboard/Models/ModelsOverview.stx +2 -4
- package/resources/components/Dashboard/Monitoring/ErrorDashboard.stx +47 -81
- package/resources/components/Dashboard/Monitoring/ErrorTable.stx +4 -2
- package/resources/components/Dashboard/NotFoundDashboard.stx +4 -4
- package/resources/components/Dashboard/Notifications/NotificationDeliveryHistory.stx +43 -77
- package/resources/components/Dashboard/Notifications/NotificationDeliveryOverview.stx +15 -17
- package/resources/components/Dashboard/Notifications/NotificationDeliveryTable.stx +1 -1
- package/resources/components/Dashboard/Operations/AuditDashboard.stx +1 -1
- package/resources/components/Dashboard/Operations/ChangeDashboard.stx +1 -1
- package/resources/components/Dashboard/Operations/IncidentDashboard.stx +1 -1
- package/resources/components/Dashboard/Operations/MigrationDashboard.stx +2 -2
- package/resources/components/Dashboard/Operations/RecoveryDashboard.stx +1 -1
- package/resources/components/Dashboard/Operations/SchedulerDashboard.stx +1 -1
- package/resources/components/Dashboard/Queries/QueryDashboard.stx +60 -86
- package/resources/components/Dashboard/Queries/QueryDetail.stx +5 -9
- package/resources/components/Dashboard/Realtime/RealtimeDashboard.stx +6 -8
- package/resources/components/Dashboard/Remote/RemoteConsole.stx +14 -20
- package/resources/components/Dashboard/Settings/AppearanceSettingsDashboard.stx +48 -54
- package/resources/components/Dashboard/Settings/MailSettingsDashboard.stx +8 -8
- package/resources/components/Dashboard/Settings/SettingsDashboard.stx +43 -47
- package/resources/components/Dashboard/Teams/TeamInvitationDashboard.stx +2 -2
- package/resources/components/Dashboard/UI/ActivityTable.stx +2 -1
- package/resources/components/Dashboard/UI/Button.stx +15 -0
- package/resources/components/Dashboard/UI/MetricCards.stx +5 -7
- package/resources/components/Dashboard/UI/Pagination.stx +3 -5
- package/resources/components/Dashboard/UI/QuickLinks.stx +2 -2
- package/resources/components/Dashboard/UI/Select.stx +1 -0
- package/resources/components/Dashboard/UI/Table.stx +139 -96
- package/resources/components/Dashboard/UI/Tabs.stx +18 -20
- package/routes/dashboard-api.ts +2 -0
- package/routes/dashboard.ts +246 -253
- package/routes/storefront.ts +31 -0
- package/stx-components-plugin.ts +12 -1
- package/views/dashboard/content/categories/index.stx +1 -1
- package/views/dashboard/content/tags/index.stx +1 -1
- package/views/dashboard/layouts/default.stx +27 -12
- package/views/dashboard/models/[model]/[id]/edit.stx +8 -0
- package/views/dashboard/models/[model]/[id].stx +8 -0
- package/views/dashboard/models/[model]/create.stx +8 -0
- package/resources/components/Dashboard/CreateRecordModal.stx +0 -138
- package/resources/components/Dashboard/Models/EditRecordModal.stx +0 -81
|
@@ -13,24 +13,6 @@ export interface GroupedError {
|
|
|
13
13
|
last_seen: string
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
/** What a page of groups asks for; every field may be left out. */
|
|
17
|
-
export interface ErrorGroupQuery {
|
|
18
|
-
page?: number
|
|
19
|
-
perPage?: number
|
|
20
|
-
search?: string
|
|
21
|
-
status?: string
|
|
22
|
-
type?: string
|
|
23
|
-
sort?: string
|
|
24
|
-
direction?: 'asc' | 'desc'
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/** The page the groups are, and what the pager and the type filter need. */
|
|
28
|
-
export interface ErrorGroupPageInfo {
|
|
29
|
-
total: number
|
|
30
|
-
page: number
|
|
31
|
-
types: string[]
|
|
32
|
-
}
|
|
33
|
-
|
|
34
16
|
export interface ErrorRecord {
|
|
35
17
|
id: number
|
|
36
18
|
type: string
|
|
@@ -56,12 +38,8 @@ export interface ErrorTimelinePoint {
|
|
|
56
38
|
count: number
|
|
57
39
|
}
|
|
58
40
|
|
|
59
|
-
//
|
|
60
|
-
|
|
61
|
-
// Only the newest page request may land: typing, paging and filtering can
|
|
62
|
-
// each start one while another is still out.
|
|
63
|
-
let groupRequestId = 0
|
|
64
|
-
const groupedErrorsPage = useStorage<ErrorGroupPageInfo>('grouped-errors-page', { total: 0, page: 1, types: [] })
|
|
41
|
+
// The Errors page lists the groups itself, through useServerList
|
|
42
|
+
// (stacksjs/stacks#3195); these are the cards and the timeline.
|
|
65
43
|
const errorStats = useStorage<ErrorStats | null>('error-stats', null)
|
|
66
44
|
const errorTimeline = useStorage<ErrorTimelinePoint[]>('error-timeline', [])
|
|
67
45
|
|
|
@@ -71,60 +49,30 @@ export function errorGroupParams(type: string, message: string): URLSearchParams
|
|
|
71
49
|
return new URLSearchParams({ type, message })
|
|
72
50
|
}
|
|
73
51
|
|
|
74
|
-
/**
|
|
75
|
-
export
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
if (query.search)
|
|
82
|
-
params.set('search', query.search)
|
|
83
|
-
if (query.status)
|
|
84
|
-
params.set('status', query.status)
|
|
85
|
-
if (query.type)
|
|
86
|
-
params.set('type', query.type)
|
|
87
|
-
if (query.sort) {
|
|
88
|
-
params.set('sort', query.sort)
|
|
89
|
-
params.set('direction', query.direction ?? 'asc')
|
|
90
|
-
}
|
|
91
|
-
return params
|
|
52
|
+
/** One page of error groups, and what the pager and the type filter need. */
|
|
53
|
+
export interface ErrorGroupPage {
|
|
54
|
+
groups: GroupedError[]
|
|
55
|
+
total: number
|
|
56
|
+
page: number
|
|
57
|
+
/** Every recorded type, for the filter: a page alone would list only its own. */
|
|
58
|
+
types: string[]
|
|
92
59
|
}
|
|
93
60
|
|
|
94
61
|
/**
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
62
|
+
* One page of grouped errors, searched, filtered, sorted and paged by the
|
|
63
|
+
* server (stacksjs/stacks#3195), for the page's useServerList. It throws
|
|
64
|
+
* when the groups cannot be read, so the page can say so: this used to log
|
|
65
|
+
* to the console and leave the last list cached in localStorage on screen.
|
|
98
66
|
*/
|
|
99
|
-
async function
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
if (requestId !== groupRequestId)
|
|
109
|
-
return groupedErrors.value
|
|
110
|
-
|
|
111
|
-
if (data && Array.isArray(data.groups)) {
|
|
112
|
-
groupedErrors.value = data.groups
|
|
113
|
-
groupedErrorsPage.value = {
|
|
114
|
-
total: Number(data.total || 0),
|
|
115
|
-
page: Number(data.page || 1),
|
|
116
|
-
types: Array.isArray(data.types) ? data.types.map(String) : [],
|
|
117
|
-
}
|
|
118
|
-
return data.groups
|
|
119
|
-
}
|
|
120
|
-
else {
|
|
121
|
-
console.error('Expected a page of error groups but received:', typeof data)
|
|
122
|
-
return []
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
catch (error) {
|
|
126
|
-
console.error('Error fetching grouped errors:', error)
|
|
127
|
-
return groupedErrors.value
|
|
67
|
+
export async function fetchErrorGroupPage(query: URLSearchParams): Promise<ErrorGroupPage> {
|
|
68
|
+
const { data } = await dashboardApi<{ data?: Partial<ErrorGroupPage> }>(`${baseURL}/errors?${query}`)
|
|
69
|
+
if (!data || !Array.isArray(data.groups))
|
|
70
|
+
throw new TypeError('Error groups were not returned in the expected shape.')
|
|
71
|
+
return {
|
|
72
|
+
groups: data.groups,
|
|
73
|
+
total: Number(data.total || 0),
|
|
74
|
+
page: Number(data.page || 1),
|
|
75
|
+
types: Array.isArray(data.types) ? data.types.map(String) : [],
|
|
128
76
|
}
|
|
129
77
|
}
|
|
130
78
|
|
|
@@ -212,13 +160,6 @@ async function resolveErrorGroup(type: string, message: string): Promise<boolean
|
|
|
212
160
|
// (stacksjs/stacks#3194).
|
|
213
161
|
await dashboardApi(`${baseURL}/errors/resolve`, { method: 'PATCH', body: { type, message } })
|
|
214
162
|
|
|
215
|
-
// Update local state
|
|
216
|
-
const group = groupedErrors.value.find(
|
|
217
|
-
e => e.type === type && e.message === message,
|
|
218
|
-
)
|
|
219
|
-
if (group)
|
|
220
|
-
group.status = 'resolved'
|
|
221
|
-
|
|
222
163
|
return true
|
|
223
164
|
}
|
|
224
165
|
catch (error) {
|
|
@@ -237,13 +178,6 @@ async function ignoreErrorGroup(type: string, message: string): Promise<boolean>
|
|
|
237
178
|
// (stacksjs/stacks#3194).
|
|
238
179
|
await dashboardApi(`${baseURL}/errors/ignore`, { method: 'PATCH', body: { type, message } })
|
|
239
180
|
|
|
240
|
-
// Update local state
|
|
241
|
-
const group = groupedErrors.value.find(
|
|
242
|
-
e => e.type === type && e.message === message,
|
|
243
|
-
)
|
|
244
|
-
if (group)
|
|
245
|
-
group.status = 'ignored'
|
|
246
|
-
|
|
247
181
|
return true
|
|
248
182
|
}
|
|
249
183
|
catch (error) {
|
|
@@ -262,13 +196,6 @@ async function unresolveErrorGroup(type: string, message: string): Promise<boole
|
|
|
262
196
|
// (stacksjs/stacks#3194).
|
|
263
197
|
await dashboardApi(`${baseURL}/errors/unresolve`, { method: 'PATCH', body: { type, message } })
|
|
264
198
|
|
|
265
|
-
// Update local state
|
|
266
|
-
const group = groupedErrors.value.find(
|
|
267
|
-
e => e.type === type && e.message === message,
|
|
268
|
-
)
|
|
269
|
-
if (group)
|
|
270
|
-
group.status = 'unresolved'
|
|
271
|
-
|
|
272
199
|
return true
|
|
273
200
|
}
|
|
274
201
|
catch (error) {
|
|
@@ -285,11 +212,6 @@ async function deleteErrorGroup(type: string, message: string): Promise<boolean>
|
|
|
285
212
|
// Through dashboardApi for the CSRF token, as the triage writes above.
|
|
286
213
|
await dashboardApi(`${baseURL}/errors?${errorGroupParams(type, message)}`, { method: 'DELETE' })
|
|
287
214
|
|
|
288
|
-
// Update local state
|
|
289
|
-
groupedErrors.value = groupedErrors.value.filter(
|
|
290
|
-
e => !(e.type === type && e.message === message),
|
|
291
|
-
)
|
|
292
|
-
|
|
293
215
|
return true
|
|
294
216
|
}
|
|
295
217
|
catch (error) {
|
|
@@ -300,11 +222,8 @@ async function deleteErrorGroup(type: string, message: string): Promise<boolean>
|
|
|
300
222
|
|
|
301
223
|
export function useErrors() {
|
|
302
224
|
return {
|
|
303
|
-
groupedErrors,
|
|
304
|
-
groupedErrorsPage,
|
|
305
225
|
errorStats,
|
|
306
226
|
errorTimeline,
|
|
307
|
-
fetchGroupedErrors,
|
|
308
227
|
fetchErrorById,
|
|
309
228
|
fetchErrorGroup,
|
|
310
229
|
fetchErrorStats,
|
|
@@ -53,17 +53,6 @@ export interface NotificationDeliveryHistory {
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
export interface NotificationDeliveryHistoryQuery {
|
|
57
|
-
page?: number
|
|
58
|
-
perPage?: number
|
|
59
|
-
channel?: NotificationDeliveryChannel | 'all'
|
|
60
|
-
status?: NotificationDeliveryStatus | 'all'
|
|
61
|
-
search?: string
|
|
62
|
-
sort?: 'sent_at' | 'recipient' | 'channel' | 'status' | 'id'
|
|
63
|
-
direction?: 'asc' | 'desc'
|
|
64
|
-
signal?: AbortSignal
|
|
65
|
-
}
|
|
66
|
-
|
|
67
56
|
export async function fetchNotificationDeliveries(channel: DashboardDeliveryChannel): Promise<NotificationDelivery[]> {
|
|
68
57
|
try {
|
|
69
58
|
const deliveries = await dashboardApi<NotificationDelivery[]>(`/api/dashboard/notification-deliveries?channel=${channel}`)
|
|
@@ -87,33 +76,13 @@ export async function fetchNotificationDeliveryOverview(): Promise<NotificationD
|
|
|
87
76
|
}
|
|
88
77
|
}
|
|
89
78
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
params.set('direction', query.direction || 'desc')
|
|
98
|
-
if (query.channel && query.channel !== 'all')
|
|
99
|
-
params.set('channel', query.channel)
|
|
100
|
-
if (query.status && query.status !== 'all')
|
|
101
|
-
params.set('status', query.status)
|
|
102
|
-
if (query.search)
|
|
103
|
-
params.set('search', query.search)
|
|
104
|
-
|
|
105
|
-
try {
|
|
106
|
-
return await dashboardApi<NotificationDeliveryHistory>(
|
|
107
|
-
`/api/dashboard/notification-deliveries/history?${params.toString()}`,
|
|
108
|
-
{ signal: query.signal },
|
|
109
|
-
)
|
|
110
|
-
}
|
|
111
|
-
catch (error) {
|
|
112
|
-
if (error instanceof DOMException && error.name === 'AbortError')
|
|
113
|
-
return null
|
|
114
|
-
pushToast('error', 'Could not load notification delivery history', { detail: String(error) })
|
|
115
|
-
return null
|
|
116
|
-
}
|
|
79
|
+
/**
|
|
80
|
+
* One page of the delivery history. `query` is what the History page's
|
|
81
|
+
* useServerList sends: the search, channel, status, sort, direction, page and
|
|
82
|
+
* per_page. Throws on a failed read so the list can say so.
|
|
83
|
+
*/
|
|
84
|
+
export async function fetchNotificationDeliveryHistory(query: URLSearchParams): Promise<NotificationDeliveryHistory> {
|
|
85
|
+
return dashboardApi<NotificationDeliveryHistory>(`/api/dashboard/notification-deliveries/history?${query}`)
|
|
117
86
|
}
|
|
118
87
|
|
|
119
88
|
export async function retryNotificationDelivery(delivery: NotificationDelivery): Promise<boolean> {
|
package/functions/queries.ts
CHANGED
|
@@ -56,16 +56,13 @@ export interface DashboardQueryShowResponse {
|
|
|
56
56
|
query: DashboardQueryLog | null
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
per_page: String(filters.perPage),
|
|
67
|
-
})
|
|
68
|
-
return dashboardApi<DashboardQueryResponse>(`/api/dashboard/queries?${params}`)
|
|
59
|
+
/**
|
|
60
|
+
* One page of the query log. `query` is what the Queries page's useServerList
|
|
61
|
+
* sends: the range, status, type and connection (each left out when it is
|
|
62
|
+
* "all", which the server reads the same), page and per_page.
|
|
63
|
+
*/
|
|
64
|
+
export async function fetchDashboardQueries(query: URLSearchParams): Promise<DashboardQueryResponse> {
|
|
65
|
+
return dashboardApi<DashboardQueryResponse>(`/api/dashboard/queries?${query}`)
|
|
69
66
|
}
|
|
70
67
|
|
|
71
68
|
export async function fetchDashboardQuery(id: string): Promise<DashboardQueryLog | null> {
|
package/ide/vscode/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"publisher": "Stacks",
|
|
3
3
|
"name": "vscode-stacks",
|
|
4
4
|
"displayName": "Stacks",
|
|
5
|
-
"version": "0.75.
|
|
5
|
+
"version": "0.75.537",
|
|
6
6
|
"description": "Stacks, built into VS Code: stx templates, pickier linting and formatting, encrypted env files, the dev server preview and every buddy command. No other extensions required.",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"funding": "https://github.com/sponsors/chrisbbreuer",
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@stacksjs/defaults",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.75.
|
|
5
|
+
"version": "0.75.537",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git+https://github.com/stacksjs/stacks.git",
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@iconify-json/f7": "^1.2.2",
|
|
47
47
|
"@iconify-json/hugeicons": "^1.2.35",
|
|
48
|
-
"@stacksjs/mobile": "0.75.
|
|
49
|
-
"@stacksjs/sanitizer": "0.2.
|
|
50
|
-
"@stacksjs/stx": "0.2.
|
|
51
|
-
"@stacksjs/strings": "0.75.
|
|
48
|
+
"@stacksjs/mobile": "0.75.537",
|
|
49
|
+
"@stacksjs/sanitizer": "0.2.842",
|
|
50
|
+
"@stacksjs/stx": "0.2.842",
|
|
51
|
+
"@stacksjs/strings": "0.75.537",
|
|
52
52
|
"@xterm/addon-fit": "^0.11.0",
|
|
53
53
|
"@xterm/xterm": "^6.0.0",
|
|
54
54
|
"ts-qr-codes": "^0.1.8"
|
|
@@ -81,7 +81,7 @@ onMount(() => {
|
|
|
81
81
|
<section>
|
|
82
82
|
<h2 class="font-semibold text-neutral-900 dark:text-white">Explore analytics</h2>
|
|
83
83
|
<div class="grid gap-4 grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 mt-4">
|
|
84
|
-
<
|
|
84
|
+
<div :for="card in analyticsCards" class="contents">
|
|
85
85
|
<StxLink :to="card.to" class="block">
|
|
86
86
|
<Card variant="default" padding="md" hoverable clickable>
|
|
87
87
|
<div class="flex gap-4 items-start">
|
|
@@ -96,7 +96,7 @@ onMount(() => {
|
|
|
96
96
|
</div>
|
|
97
97
|
</Card>
|
|
98
98
|
</StxLink>
|
|
99
|
-
</
|
|
99
|
+
</div>
|
|
100
100
|
</div>
|
|
101
101
|
</section>
|
|
102
102
|
</div>
|
|
@@ -177,18 +177,16 @@ onMount(() => {
|
|
|
177
177
|
<h2 class="font-semibold text-gray-900 dark:text-white">Spend by currency</h2>
|
|
178
178
|
</div>
|
|
179
179
|
<div class="divide-gray-200 divide-y dark:divide-neutral-700">
|
|
180
|
-
<
|
|
181
|
-
<div
|
|
182
|
-
<
|
|
183
|
-
|
|
184
|
-
<p class="text-gray-500 text-xs dark:text-neutral-400">{{ spend.campaigns }} campaigns</p>
|
|
185
|
-
</div>
|
|
186
|
-
<div class="text-right">
|
|
187
|
-
<p class="font-medium text-gray-900 text-sm dark:text-white">{{ formatMoney(spend.spent, spend.currency) }}</p>
|
|
188
|
-
<p class="text-gray-500 text-xs dark:text-neutral-400">of {{ formatMoney(spend.budget, spend.currency) }}</p>
|
|
189
|
-
</div>
|
|
180
|
+
<div :for="spend in spendByCurrency()" class="flex gap-4 items-center justify-between px-4 py-3">
|
|
181
|
+
<div>
|
|
182
|
+
<p class="font-medium text-gray-900 text-sm dark:text-white">{{ spend.currency }}</p>
|
|
183
|
+
<p class="text-gray-500 text-xs dark:text-neutral-400">{{ spend.campaigns }} campaigns</p>
|
|
190
184
|
</div>
|
|
191
|
-
|
|
185
|
+
<div class="text-right">
|
|
186
|
+
<p class="font-medium text-gray-900 text-sm dark:text-white">{{ formatMoney(spend.spent, spend.currency) }}</p>
|
|
187
|
+
<p class="text-gray-500 text-xs dark:text-neutral-400">of {{ formatMoney(spend.budget, spend.currency) }}</p>
|
|
188
|
+
</div>
|
|
189
|
+
</div>
|
|
192
190
|
</div>
|
|
193
191
|
</div>
|
|
194
192
|
|
|
@@ -197,12 +195,10 @@ onMount(() => {
|
|
|
197
195
|
<h2 class="font-semibold text-gray-900 dark:text-white">Campaign statuses</h2>
|
|
198
196
|
</div>
|
|
199
197
|
<div class="divide-gray-200 divide-y dark:divide-neutral-700">
|
|
200
|
-
<
|
|
201
|
-
<
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
</div>
|
|
205
|
-
</template>
|
|
198
|
+
<div :for="status in statuses()" class="flex items-center justify-between px-4 py-3">
|
|
199
|
+
<p class="font-medium text-gray-900 text-sm dark:text-white">{{ status.label }}</p>
|
|
200
|
+
<p class="text-gray-500 text-sm dark:text-neutral-300">{{ status.count }}</p>
|
|
201
|
+
</div>
|
|
206
202
|
</div>
|
|
207
203
|
</div>
|
|
208
204
|
</section>
|
|
@@ -225,17 +221,15 @@ onMount(() => {
|
|
|
225
221
|
</tr>
|
|
226
222
|
</thead>
|
|
227
223
|
<tbody class="divide-gray-200 divide-y dark:divide-neutral-700">
|
|
228
|
-
<
|
|
229
|
-
<
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
</tr>
|
|
238
|
-
</template>
|
|
224
|
+
<tr :for="channel in channels()">
|
|
225
|
+
<td class="px-4 py-3 font-medium text-gray-900 text-sm dark:text-white">{{ channel.name }}</td>
|
|
226
|
+
<td class="px-4 py-3 text-gray-500 text-sm dark:text-neutral-300">{{ channel.currency }}</td>
|
|
227
|
+
<td class="px-4 py-3 text-gray-500 text-right text-sm dark:text-neutral-300">{{ channel.campaigns }}</td>
|
|
228
|
+
<td class="px-4 py-3 text-gray-500 text-right text-sm dark:text-neutral-300">{{ formatNumber(channel.sent) }}</td>
|
|
229
|
+
<td class="px-4 py-3 text-gray-500 text-right text-sm dark:text-neutral-300">{{ formatMoney(channel.spent, channel.currency) }}</td>
|
|
230
|
+
<td class="px-4 py-3 text-gray-500 text-right text-sm dark:text-neutral-300">{{ formatRate(channel.clickRate) }}</td>
|
|
231
|
+
<td class="px-4 py-3 text-gray-500 text-right text-sm dark:text-neutral-300">{{ formatRate(channel.conversionRate) }}</td>
|
|
232
|
+
</tr>
|
|
239
233
|
</tbody>
|
|
240
234
|
</table>
|
|
241
235
|
</div>
|
|
@@ -171,15 +171,13 @@ onMount(() => {
|
|
|
171
171
|
</tr>
|
|
172
172
|
</thead>
|
|
173
173
|
<tbody class="divide-gray-200 divide-y dark:divide-neutral-700">
|
|
174
|
-
<
|
|
175
|
-
<
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
</tr>
|
|
182
|
-
</template>
|
|
174
|
+
<tr :for="row in events()">
|
|
175
|
+
<td class="px-4 py-3 font-medium text-gray-900 text-sm dark:text-white">{{ row.name }}</td>
|
|
176
|
+
<td class="px-4 py-3 text-gray-500 text-sm dark:text-neutral-300">{{ row.category }}</td>
|
|
177
|
+
<td class="px-4 py-3 text-gray-500 text-right text-sm dark:text-neutral-300">{{ formatNumber(row.count) }}</td>
|
|
178
|
+
<td class="px-4 py-3 text-gray-500 text-right text-sm dark:text-neutral-300">{{ formatCurrency(row.value, row.currency) }}</td>
|
|
179
|
+
<td class="px-4 py-3 text-gray-500 text-right text-sm dark:text-neutral-300">{{ formatDate(row.lastSeen) }}</td>
|
|
180
|
+
</tr>
|
|
183
181
|
</tbody>
|
|
184
182
|
</table>
|
|
185
183
|
</div>
|
|
@@ -188,7 +186,7 @@ onMount(() => {
|
|
|
188
186
|
<form class="self-start p-5 bg-white dark:bg-neutral-800 border border-gray-200 rounded-lg dark:border-neutral-700" @submit.prevent="submitEvent">
|
|
189
187
|
<h2 class="font-semibold text-gray-900 dark:text-white">Record an event</h2>
|
|
190
188
|
<p class="mt-1 text-gray-500 text-sm dark:text-neutral-400">Use this for verification or operational events. Production code can call AnalyticsEvent.create.</p>
|
|
191
|
-
<div class="
|
|
189
|
+
<div class="flex flex-col gap-4 mt-4">
|
|
192
190
|
<div>
|
|
193
191
|
<label for="event-name" class="block mb-1 font-medium text-gray-700 text-sm dark:text-neutral-300">Name</label>
|
|
194
192
|
<input id="event-name" x-model="eventName" maxlength="100" required type="text" placeholder="newsletter_signup" class="block px-3 py-2 w-full text-gray-900 text-sm dark:text-white dark:bg-neutral-700 border border-gray-300 rounded-md dark:border-neutral-600" />
|
|
@@ -234,15 +232,13 @@ onMount(() => {
|
|
|
234
232
|
</div>
|
|
235
233
|
<div :if="categories().length === 0" class="px-4 py-10 text-center text-gray-500 text-sm dark:text-neutral-400">No categories for this period.</div>
|
|
236
234
|
<div :if="categories().length > 0" class="divide-gray-200 divide-y dark:divide-neutral-700">
|
|
237
|
-
<
|
|
238
|
-
<div
|
|
239
|
-
<
|
|
240
|
-
|
|
241
|
-
<p class="text-gray-500 text-xs dark:text-neutral-400">{{ category.name }}</p>
|
|
242
|
-
</div>
|
|
243
|
-
<p class="text-gray-500 text-sm dark:text-neutral-300">{{ category.count }} · {{ category.percentage }}%</p>
|
|
235
|
+
<div :for="category in categories()" class="flex gap-4 items-center justify-between px-4 py-3">
|
|
236
|
+
<div>
|
|
237
|
+
<p class="font-medium text-gray-900 text-sm dark:text-white">{{ category.label }}</p>
|
|
238
|
+
<p class="text-gray-500 text-xs dark:text-neutral-400">{{ category.name }}</p>
|
|
244
239
|
</div>
|
|
245
|
-
|
|
240
|
+
<p class="text-gray-500 text-sm dark:text-neutral-300">{{ category.count }} · {{ category.percentage }}%</p>
|
|
241
|
+
</div>
|
|
246
242
|
</div>
|
|
247
243
|
</div>
|
|
248
244
|
|
|
@@ -253,15 +249,13 @@ onMount(() => {
|
|
|
253
249
|
</div>
|
|
254
250
|
<div :if="values().length === 0" class="px-4 py-10 text-center text-gray-500 text-sm dark:text-neutral-400">No valued events for this period.</div>
|
|
255
251
|
<div :if="values().length > 0" class="divide-gray-200 divide-y dark:divide-neutral-700">
|
|
256
|
-
<
|
|
257
|
-
<div
|
|
258
|
-
<
|
|
259
|
-
|
|
260
|
-
<p class="text-gray-500 text-xs dark:text-neutral-400">{{ entry.events }} valued events</p>
|
|
261
|
-
</div>
|
|
262
|
-
<p class="font-medium text-gray-900 text-sm dark:text-white">{{ formatCurrency(entry.value, entry.currency) }}</p>
|
|
252
|
+
<div :for="entry in values()" class="flex gap-4 items-center justify-between px-4 py-3">
|
|
253
|
+
<div>
|
|
254
|
+
<p class="font-medium text-gray-900 text-sm dark:text-white">{{ entry.currency }}</p>
|
|
255
|
+
<p class="text-gray-500 text-xs dark:text-neutral-400">{{ entry.events }} valued events</p>
|
|
263
256
|
</div>
|
|
264
|
-
|
|
257
|
+
<p class="font-medium text-gray-900 text-sm dark:text-white">{{ formatCurrency(entry.value, entry.currency) }}</p>
|
|
258
|
+
</div>
|
|
265
259
|
</div>
|
|
266
260
|
</div>
|
|
267
261
|
</section>
|
|
@@ -283,14 +277,12 @@ onMount(() => {
|
|
|
283
277
|
</tr>
|
|
284
278
|
</thead>
|
|
285
279
|
<tbody class="divide-gray-200 divide-y dark:divide-neutral-700">
|
|
286
|
-
<
|
|
287
|
-
<
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
</tr>
|
|
293
|
-
</template>
|
|
280
|
+
<tr :for="occurrence in recentEvents()">
|
|
281
|
+
<td class="px-4 py-3 text-gray-500 text-sm whitespace-nowrap dark:text-neutral-300">{{ formatDate(occurrence.createdAt) }}</td>
|
|
282
|
+
<td class="px-4 py-3 font-medium text-gray-900 text-sm dark:text-white">{{ occurrence.name }}</td>
|
|
283
|
+
<td class="px-4 py-3 text-gray-500 text-sm dark:text-neutral-300">{{ occurrence.category }}</td>
|
|
284
|
+
<td class="px-4 py-3 font-mono text-gray-500 text-xs dark:text-neutral-300">{{ occurrence.path || 'Not set' }}</td>
|
|
285
|
+
</tr>
|
|
294
286
|
</tbody>
|
|
295
287
|
</table>
|
|
296
288
|
</div>
|
|
@@ -122,16 +122,14 @@ onMount(() => {
|
|
|
122
122
|
</tr>
|
|
123
123
|
</thead>
|
|
124
124
|
<tbody class="divide-gray-200 divide-y dark:divide-neutral-700">
|
|
125
|
-
<
|
|
126
|
-
<
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
</tr>
|
|
134
|
-
</template>
|
|
125
|
+
<tr :for="total in currencyTotals()">
|
|
126
|
+
<td class="px-4 py-3 font-medium text-gray-900 text-sm dark:text-white">{{ total.currency }}</td>
|
|
127
|
+
<td class="px-4 py-3 text-gray-500 text-right text-sm dark:text-neutral-300">{{ formatNumber(total.orders) }}</td>
|
|
128
|
+
<td class="px-4 py-3 text-gray-500 text-right text-sm dark:text-neutral-300">{{ formatCurrency(total.gross, total.currency) }}</td>
|
|
129
|
+
<td class="px-4 py-3 text-gray-500 text-right text-sm dark:text-neutral-300">{{ formatCurrency(total.cancelled, total.currency) }}</td>
|
|
130
|
+
<td class="px-4 py-3 font-medium text-gray-900 text-right text-sm dark:text-white">{{ formatCurrency(total.net, total.currency) }}</td>
|
|
131
|
+
<td class="px-4 py-3 text-gray-500 text-right text-sm dark:text-neutral-300">{{ formatCurrency(total.average, total.currency) }}</td>
|
|
132
|
+
</tr>
|
|
135
133
|
</tbody>
|
|
136
134
|
</table>
|
|
137
135
|
</div>
|
|
@@ -159,17 +157,15 @@ onMount(() => {
|
|
|
159
157
|
</tr>
|
|
160
158
|
</thead>
|
|
161
159
|
<tbody class="divide-gray-200 divide-y dark:divide-neutral-700">
|
|
162
|
-
<
|
|
163
|
-
<
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
</tr>
|
|
172
|
-
</template>
|
|
160
|
+
<tr :for="method in paymentMethods()">
|
|
161
|
+
<td class="px-4 py-3 font-medium text-gray-900 text-sm dark:text-white">{{ method.method }}</td>
|
|
162
|
+
<td class="px-4 py-3 text-gray-500 text-sm dark:text-neutral-300">{{ method.currency }}</td>
|
|
163
|
+
<td class="px-4 py-3 text-gray-500 text-right text-sm dark:text-neutral-300">{{ formatNumber(method.transactions) }}</td>
|
|
164
|
+
<td class="px-4 py-3 text-gray-500 text-right text-sm dark:text-neutral-300">{{ formatCurrency(method.amount, method.currency) }}</td>
|
|
165
|
+
<td class="px-4 py-3 text-gray-500 text-right text-sm dark:text-neutral-300">{{ formatCurrency(method.refunds, method.currency) }}</td>
|
|
166
|
+
<td class="px-4 py-3 font-medium text-gray-900 text-right text-sm dark:text-white">{{ formatCurrency(method.net, method.currency) }}</td>
|
|
167
|
+
<td class="px-4 py-3 text-gray-500 text-right text-sm dark:text-neutral-300">{{ method.percentage }}%</td>
|
|
168
|
+
</tr>
|
|
173
169
|
</tbody>
|
|
174
170
|
</table>
|
|
175
171
|
</div>
|
|
@@ -192,14 +188,12 @@ onMount(() => {
|
|
|
192
188
|
</tr>
|
|
193
189
|
</thead>
|
|
194
190
|
<tbody class="divide-gray-200 divide-y dark:divide-neutral-700">
|
|
195
|
-
<
|
|
196
|
-
<
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
</tr>
|
|
202
|
-
</template>
|
|
191
|
+
<tr :for="day in dailyOrders()">
|
|
192
|
+
<td class="px-4 py-3 text-gray-900 text-sm dark:text-white">{{ day.date }}</td>
|
|
193
|
+
<td class="px-4 py-3 text-gray-500 text-sm dark:text-neutral-300">{{ day.currency }}</td>
|
|
194
|
+
<td class="px-4 py-3 text-gray-500 text-right text-sm dark:text-neutral-300">{{ day.orders }}</td>
|
|
195
|
+
<td class="px-4 py-3 text-gray-500 text-right text-sm dark:text-neutral-300">{{ formatCurrency(day.value, day.currency) }}</td>
|
|
196
|
+
</tr>
|
|
203
197
|
</tbody>
|
|
204
198
|
</table>
|
|
205
199
|
</div>
|
|
@@ -214,15 +208,13 @@ onMount(() => {
|
|
|
214
208
|
<p class="mt-1 text-gray-500 text-sm dark:text-neutral-400">Product performance appears after orders contain OrderItem records.</p>
|
|
215
209
|
</div>
|
|
216
210
|
<div :if="topProducts().length > 0" class="divide-gray-200 divide-y dark:divide-neutral-700">
|
|
217
|
-
<
|
|
218
|
-
<div
|
|
219
|
-
<
|
|
220
|
-
|
|
221
|
-
<p class="text-gray-500 text-xs dark:text-neutral-400">{{ formatNumber(product.quantity) }} units</p>
|
|
222
|
-
</div>
|
|
223
|
-
<p class="font-medium text-gray-900 text-sm dark:text-white">{{ formatCurrency(product.revenue, product.currency) }}</p>
|
|
211
|
+
<div :for="product in topProducts()" class="flex gap-4 items-center justify-between px-4 py-3">
|
|
212
|
+
<div>
|
|
213
|
+
<p class="font-medium text-gray-900 text-sm dark:text-white">{{ product.name }}</p>
|
|
214
|
+
<p class="text-gray-500 text-xs dark:text-neutral-400">{{ formatNumber(product.quantity) }} units</p>
|
|
224
215
|
</div>
|
|
225
|
-
|
|
216
|
+
<p class="font-medium text-gray-900 text-sm dark:text-white">{{ formatCurrency(product.revenue, product.currency) }}</p>
|
|
217
|
+
</div>
|
|
226
218
|
</div>
|
|
227
219
|
</div>
|
|
228
220
|
</section>
|