@jmruthers/pace-core 0.5.121 → 0.5.123
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/dist/{AuthService-D4646R4b.d.ts → AuthService-DYuQPJj6.d.ts} +0 -9
- package/dist/{DataTable-DGZDJUYM.js → DataTable-WTS4IRF2.js} +7 -8
- package/dist/{PublicLoadingSpinner-DgDWTFqn.d.ts → PublicLoadingSpinner-CaoRbHvJ.d.ts} +30 -4
- package/dist/{UnifiedAuthProvider-UACKFATV.js → UnifiedAuthProvider-6C47WIML.js} +3 -4
- package/dist/{chunk-D6BOFXYR.js → chunk-35ZDPMBM.js} +3 -3
- package/dist/{chunk-CGURJ27Z.js → chunk-4MXVZVNS.js} +2 -2
- package/dist/{chunk-ZYJ6O5CA.js → chunk-C43QIDN3.js} +2 -2
- package/dist/{chunk-VKOCWWVY.js → chunk-CX5M4ZAG.js} +1 -6
- package/dist/{chunk-VKOCWWVY.js 3.map → chunk-CX5M4ZAG.js.map} +1 -1
- package/dist/{chunk-HFBOFZ3Z.js → chunk-DHMFMXFV.js} +258 -243
- package/dist/chunk-DHMFMXFV.js.map +1 -0
- package/dist/{chunk-RIEJGKD3.js → chunk-ESJTIADP.js} +15 -6
- package/dist/{chunk-RIEJGKD3.js.map → chunk-ESJTIADP.js.map} +1 -1
- package/dist/{chunk-SMJZMKYN.js → chunk-GEVIB2UB.js} +43 -10
- package/dist/chunk-GEVIB2UB.js.map +1 -0
- package/dist/{chunk-TDNI6ZWL.js → chunk-IJOZZOGT.js} +7 -7
- package/dist/chunk-IJOZZOGT.js.map +1 -0
- package/dist/{chunk-GZRXOUBE.js → chunk-M6DDYFUD.js} +2 -2
- package/dist/chunk-M6DDYFUD.js.map +1 -0
- package/dist/{chunk-B4GZ2BXO.js → chunk-NZGLXZGP.js} +3 -3
- package/dist/{chunk-NZ32EONV.js → chunk-QWNJCQXZ.js} +2 -2
- package/dist/{chunk-FKFHZUGF.js → chunk-XN6GWKMV.js} +43 -56
- package/dist/chunk-XN6GWKMV.js.map +1 -0
- package/dist/{chunk-BHWIUEYH.js → chunk-ZBLK676C.js} +1 -61
- package/dist/chunk-ZBLK676C.js.map +1 -0
- package/dist/{chunk-QPI2CCBA.js → chunk-ZPJMYGEP.js} +149 -96
- package/dist/chunk-ZPJMYGEP.js.map +1 -0
- package/dist/components.d.ts +1 -1
- package/dist/components.js +11 -11
- package/dist/{formatting-B1jSqgl-.d.ts → formatting-DFcCxUEk.d.ts} +1 -1
- package/dist/hooks.d.ts +1 -1
- package/dist/hooks.js +9 -8
- package/dist/hooks.js.map +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.js +19 -17
- package/dist/index.js.map +1 -1
- package/dist/providers.d.ts +2 -2
- package/dist/providers.js +2 -3
- package/dist/rbac/index.js +7 -8
- package/dist/styles/index.d.ts +1 -1
- package/dist/styles/index.js +5 -3
- package/dist/theming/runtime.d.ts +73 -1
- package/dist/theming/runtime.js +5 -5
- package/dist/{usePublicRouteParams-BdF8bZgs.d.ts → usePublicRouteParams-Dyt1tzI9.d.ts} +60 -8
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +5 -5
- package/docs/api/classes/ColumnFactory.md +1 -1
- package/docs/api/classes/ErrorBoundary.md +1 -1
- package/docs/api/classes/InvalidScopeError.md +1 -1
- package/docs/api/classes/MissingUserContextError.md +1 -1
- package/docs/api/classes/OrganisationContextRequiredError.md +1 -1
- package/docs/api/classes/PermissionDeniedError.md +1 -1
- package/docs/api/classes/PublicErrorBoundary.md +6 -6
- package/docs/api/classes/RBACAuditManager.md +1 -1
- package/docs/api/classes/RBACCache.md +1 -1
- package/docs/api/classes/RBACEngine.md +1 -1
- package/docs/api/classes/RBACError.md +1 -1
- package/docs/api/classes/RBACNotInitializedError.md +1 -1
- package/docs/api/classes/SecureSupabaseClient.md +6 -6
- package/docs/api/classes/StorageUtils.md +1 -1
- package/docs/api/enums/FileCategory.md +1 -1
- package/docs/api/interfaces/AggregateConfig.md +1 -1
- package/docs/api/interfaces/ButtonProps.md +1 -1
- package/docs/api/interfaces/CardProps.md +1 -1
- package/docs/api/interfaces/ColorPalette.md +1 -1
- package/docs/api/interfaces/ColorShade.md +1 -1
- package/docs/api/interfaces/DataAccessRecord.md +1 -1
- package/docs/api/interfaces/DataRecord.md +1 -1
- package/docs/api/interfaces/DataTableAction.md +1 -1
- package/docs/api/interfaces/DataTableColumn.md +1 -1
- package/docs/api/interfaces/DataTableProps.md +1 -1
- package/docs/api/interfaces/DataTableToolbarButton.md +1 -1
- package/docs/api/interfaces/EmptyStateConfig.md +1 -1
- package/docs/api/interfaces/EnhancedNavigationMenuProps.md +1 -1
- package/docs/api/interfaces/EventAppRoleData.md +1 -1
- package/docs/api/interfaces/FileDisplayProps.md +1 -1
- package/docs/api/interfaces/FileMetadata.md +1 -1
- package/docs/api/interfaces/FileReference.md +1 -1
- package/docs/api/interfaces/FileSizeLimits.md +1 -1
- package/docs/api/interfaces/FileUploadOptions.md +1 -1
- package/docs/api/interfaces/FileUploadProps.md +1 -1
- package/docs/api/interfaces/FooterProps.md +1 -1
- package/docs/api/interfaces/GrantEventAppRoleParams.md +1 -1
- package/docs/api/interfaces/InactivityWarningModalProps.md +1 -1
- package/docs/api/interfaces/InputProps.md +1 -1
- package/docs/api/interfaces/LabelProps.md +1 -1
- package/docs/api/interfaces/LoginFormProps.md +1 -1
- package/docs/api/interfaces/NavigationAccessRecord.md +1 -1
- package/docs/api/interfaces/NavigationContextType.md +1 -1
- package/docs/api/interfaces/NavigationGuardProps.md +1 -1
- package/docs/api/interfaces/NavigationItem.md +1 -1
- package/docs/api/interfaces/NavigationMenuProps.md +1 -1
- package/docs/api/interfaces/NavigationProviderProps.md +1 -1
- package/docs/api/interfaces/Organisation.md +1 -1
- package/docs/api/interfaces/OrganisationContextType.md +1 -1
- package/docs/api/interfaces/OrganisationMembership.md +1 -1
- package/docs/api/interfaces/OrganisationProviderProps.md +1 -1
- package/docs/api/interfaces/OrganisationSecurityError.md +1 -1
- package/docs/api/interfaces/PaceAppLayoutProps.md +1 -1
- package/docs/api/interfaces/PaceLoginPageProps.md +1 -1
- package/docs/api/interfaces/PageAccessRecord.md +1 -1
- package/docs/api/interfaces/PagePermissionContextType.md +1 -1
- package/docs/api/interfaces/PagePermissionGuardProps.md +1 -1
- package/docs/api/interfaces/PagePermissionProviderProps.md +1 -1
- package/docs/api/interfaces/PaletteData.md +1 -1
- package/docs/api/interfaces/PermissionEnforcerProps.md +1 -1
- package/docs/api/interfaces/ProtectedRouteProps.md +1 -1
- package/docs/api/interfaces/PublicErrorBoundaryProps.md +7 -7
- package/docs/api/interfaces/PublicErrorBoundaryState.md +5 -5
- package/docs/api/interfaces/PublicLoadingSpinnerProps.md +7 -7
- package/docs/api/interfaces/PublicPageFooterProps.md +1 -1
- package/docs/api/interfaces/PublicPageHeaderProps.md +51 -12
- package/docs/api/interfaces/PublicPageLayoutProps.md +72 -12
- package/docs/api/interfaces/RBACConfig.md +1 -1
- package/docs/api/interfaces/RBACLogger.md +1 -1
- package/docs/api/interfaces/RevokeEventAppRoleParams.md +1 -1
- package/docs/api/interfaces/RoleBasedRouterContextType.md +1 -1
- package/docs/api/interfaces/RoleBasedRouterProps.md +1 -1
- package/docs/api/interfaces/RoleManagementResult.md +1 -1
- package/docs/api/interfaces/RouteAccessRecord.md +1 -1
- package/docs/api/interfaces/RouteConfig.md +1 -1
- package/docs/api/interfaces/SecureDataContextType.md +1 -1
- package/docs/api/interfaces/SecureDataProviderProps.md +1 -1
- package/docs/api/interfaces/StorageConfig.md +1 -1
- package/docs/api/interfaces/StorageFileInfo.md +1 -1
- package/docs/api/interfaces/StorageFileMetadata.md +1 -1
- package/docs/api/interfaces/StorageListOptions.md +1 -1
- package/docs/api/interfaces/StorageListResult.md +1 -1
- package/docs/api/interfaces/StorageUploadOptions.md +1 -1
- package/docs/api/interfaces/StorageUploadResult.md +1 -1
- package/docs/api/interfaces/StorageUrlOptions.md +1 -1
- package/docs/api/interfaces/StyleImport.md +1 -1
- package/docs/api/interfaces/SwitchProps.md +1 -1
- package/docs/api/interfaces/ToastActionElement.md +1 -1
- package/docs/api/interfaces/ToastProps.md +1 -1
- package/docs/api/interfaces/UnifiedAuthContextType.md +1 -1
- package/docs/api/interfaces/UnifiedAuthProviderProps.md +1 -1
- package/docs/api/interfaces/UseInactivityTrackerOptions.md +1 -1
- package/docs/api/interfaces/UseInactivityTrackerReturn.md +1 -1
- package/docs/api/interfaces/UsePublicEventOptions.md +1 -1
- package/docs/api/interfaces/UsePublicEventReturn.md +1 -1
- package/docs/api/interfaces/UsePublicFileDisplayOptions.md +1 -1
- package/docs/api/interfaces/UsePublicFileDisplayReturn.md +1 -1
- package/docs/api/interfaces/UsePublicRouteParamsReturn.md +1 -1
- package/docs/api/interfaces/UseResolvedScopeOptions.md +1 -1
- package/docs/api/interfaces/UseResolvedScopeReturn.md +1 -1
- package/docs/api/interfaces/UserEventAccess.md +1 -1
- package/docs/api/interfaces/UserMenuProps.md +1 -1
- package/docs/api/interfaces/UserProfile.md +1 -1
- package/docs/api/modules.md +140 -30
- package/docs/best-practices/README.md +1 -1
- package/docs/implementation-guides/datatable-filtering.md +313 -0
- package/docs/implementation-guides/datatable-rbac-usage.md +317 -0
- package/docs/implementation-guides/hierarchical-datatable.md +850 -0
- package/docs/implementation-guides/large-datasets.md +281 -0
- package/docs/implementation-guides/performance.md +403 -0
- package/docs/implementation-guides/public-pages.md +4 -4
- package/docs/migration/quick-migration-guide.md +320 -0
- package/docs/rbac/quick-start.md +16 -16
- package/docs/troubleshooting/README.md +4 -4
- package/docs/troubleshooting/cake-page-permission-guard-issue-summary.md +1 -1
- package/docs/troubleshooting/debugging.md +1117 -0
- package/docs/troubleshooting/migration.md +918 -0
- package/examples/public-pages/CorrectPublicPageImplementation.tsx +30 -30
- package/examples/public-pages/PublicEventPage.tsx +41 -41
- package/examples/public-pages/PublicPageApp.tsx +33 -33
- package/examples/public-pages/PublicPageUsageExample.tsx +30 -30
- package/package.json +4 -4
- package/src/__tests__/hooks/usePermissions.test.ts +265 -0
- package/src/components/DataTable/DataTable.test.tsx +9 -38
- package/src/components/DataTable/DataTable.tsx +0 -7
- package/src/components/DataTable/components/DataTableCore.tsx +66 -136
- package/src/components/DataTable/components/DataTableModals.tsx +25 -22
- package/src/components/DataTable/components/EditableRow.tsx +118 -42
- package/src/components/DataTable/components/UnifiedTableBody.tsx +129 -76
- package/src/components/DataTable/components/__tests__/DataTableModals.test.tsx +33 -14
- package/src/components/DataTable/utils/__tests__/exportUtils.test.ts +17 -5
- package/src/components/DataTable/utils/exportUtils.ts +3 -2
- package/src/components/Dialog/Dialog.tsx +1 -1
- package/src/components/Dialog/README.md +24 -24
- package/src/components/Dialog/examples/BasicHtmlTest.tsx +2 -2
- package/src/components/Dialog/examples/DebugHtmlExample.tsx +6 -6
- package/src/components/Dialog/examples/HtmlDialogExample.tsx +2 -2
- package/src/components/Dialog/examples/SimpleHtmlTest.tsx +3 -3
- package/src/components/Dialog/examples/__tests__/SimpleHtmlTest.test.tsx +4 -4
- package/src/components/PaceAppLayout/PaceAppLayout.tsx +12 -1
- package/src/components/PublicLayout/EventLogo.tsx +175 -0
- package/src/components/PublicLayout/PublicErrorBoundary.tsx +22 -18
- package/src/components/PublicLayout/PublicLoadingSpinner.tsx +22 -14
- package/src/components/PublicLayout/PublicPageHeader.tsx +133 -40
- package/src/components/PublicLayout/PublicPageLayout.tsx +75 -72
- package/src/components/PublicLayout/__tests__/PublicErrorBoundary.test.tsx +1 -1
- package/src/components/PublicLayout/__tests__/PublicLoadingSpinner.test.tsx +8 -8
- package/src/components/PublicLayout/__tests__/PublicPageHeader.test.tsx +23 -16
- package/src/components/PublicLayout/__tests__/PublicPageLayout.test.tsx +86 -14
- package/src/examples/CorrectPublicPageImplementation.tsx +30 -30
- package/src/examples/PublicEventPage.tsx +41 -41
- package/src/examples/PublicPageApp.tsx +33 -33
- package/src/examples/PublicPageUsageExample.tsx +30 -30
- package/src/hooks/__tests__/usePublicEvent.unit.test.ts +583 -0
- package/src/hooks/__tests__/usePublicRouteParams.unit.test.ts +10 -3
- package/src/hooks/index.ts +1 -1
- package/src/hooks/public/usePublicEventLogo.ts +285 -0
- package/src/hooks/public/usePublicRouteParams.ts +21 -4
- package/src/hooks/useEventTheme.test.ts +119 -43
- package/src/hooks/useEventTheme.ts +84 -55
- package/src/index.ts +3 -1
- package/src/rbac/components/__tests__/EnhancedNavigationMenu.test.tsx +630 -0
- package/src/rbac/components/__tests__/NavigationProvider.test.tsx +667 -0
- package/src/rbac/components/__tests__/PagePermissionProvider.test.tsx +647 -0
- package/src/rbac/components/__tests__/SecureDataProvider.fixed.test.tsx +496 -0
- package/src/rbac/components/__tests__/SecureDataProvider.test.tsx +496 -0
- package/src/rbac/secureClient.ts +4 -2
- package/src/services/EventService.ts +0 -66
- package/src/services/__tests__/EventService.eventColours.test.ts +44 -40
- package/src/styles/index.ts +1 -1
- package/src/theming/__tests__/parseEventColours.test.ts +209 -0
- package/src/theming/parseEventColours.ts +123 -0
- package/src/theming/runtime.ts +3 -0
- package/src/types/__tests__/file-reference.test.ts +447 -0
- package/src/utils/formatDate.test.ts +11 -11
- package/src/utils/formatting.ts +3 -2
- package/dist/chunk-BDZUMRBD.js 3.map +0 -1
- package/dist/chunk-BHWIUEYH.js.map +0 -1
- package/dist/chunk-CGURJ27Z.js.map +0 -1
- package/dist/chunk-FKFHZUGF.js.map +0 -1
- package/dist/chunk-GKHF54DI 2.js +0 -619
- package/dist/chunk-GKHF54DI.js 2.map +0 -1
- package/dist/chunk-GZRXOUBE.js.map +0 -1
- package/dist/chunk-HFBOFZ3Z.js.map +0 -1
- package/dist/chunk-NZ32EONV.js.map +0 -1
- package/dist/chunk-O3NWNXDY 2.js +0 -76
- package/dist/chunk-QPI2CCBA.js.map +0 -1
- package/dist/chunk-SMJZMKYN.js.map +0 -1
- package/dist/chunk-TDNI6ZWL.js 2.map +0 -1
- package/dist/chunk-TDNI6ZWL.js.map +0 -1
- package/dist/chunk-VKOCWWVY.js.map +0 -1
- package/dist/chunk-WP5I5GLN 2.js +0 -1564
- package/dist/index 3.js +0 -856
- package/dist/providers 3.js +0 -38
- package/dist/providers.js 3.map +0 -1
- package/dist/types 3.js +0 -128
- package/dist/types.js 3.map +0 -1
- package/dist/useInactivityTracker-MRUU55XI.js 3.map +0 -1
- package/dist/utils.js 3.map +0 -1
- package/dist/validation 3.js +0 -479
- package/src/styles/semantic.css +0 -24
- /package/dist/{DataTable-DGZDJUYM.js.map → DataTable-WTS4IRF2.js.map} +0 -0
- /package/dist/{UnifiedAuthProvider-UACKFATV.js.map → UnifiedAuthProvider-6C47WIML.js.map} +0 -0
- /package/dist/{chunk-D6BOFXYR.js.map → chunk-35ZDPMBM.js.map} +0 -0
- /package/dist/{chunk-CGURJ27Z.js 2.map → chunk-4MXVZVNS.js.map} +0 -0
- /package/dist/{chunk-ZYJ6O5CA.js.map → chunk-C43QIDN3.js.map} +0 -0
- /package/dist/{chunk-B4GZ2BXO.js.map → chunk-NZGLXZGP.js.map} +0 -0
- /package/dist/{chunk-NZ32EONV.js 2.map → chunk-QWNJCQXZ.js.map} +0 -0
|
@@ -97,23 +97,23 @@ function PublicRecipeGridReportPage() {
|
|
|
97
97
|
// Step 4: Handle error state
|
|
98
98
|
if (error) {
|
|
99
99
|
return (
|
|
100
|
-
<div className="min-h-screen bg-
|
|
100
|
+
<div className="min-h-screen bg-main-50 flex items-center justify-center">
|
|
101
101
|
<div className="max-w-md mx-auto text-center px-4">
|
|
102
102
|
<div className="mb-6">
|
|
103
|
-
<div className="mx-auto flex items-center justify-center h-12 w-12 rounded-full bg-
|
|
104
|
-
<svg className="h-6 w-6 text-
|
|
103
|
+
<div className="mx-auto flex items-center justify-center h-12 w-12 rounded-full bg-acc-100 mb-4">
|
|
104
|
+
<svg className="h-6 w-6 text-acc-600" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
105
105
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z" />
|
|
106
106
|
</svg>
|
|
107
107
|
</div>
|
|
108
|
-
<h1 className="text-2xl font-bold text-
|
|
108
|
+
<h1 className="text-2xl font-bold text-sec-900 mb-2">
|
|
109
109
|
Recipe Grid Report Not Found
|
|
110
110
|
</h1>
|
|
111
|
-
<p className="text-
|
|
111
|
+
<p className="text-sec-600 mb-6">
|
|
112
112
|
The event code "{eventCode}" is invalid or the recipe grid report is not available for public viewing.
|
|
113
113
|
</p>
|
|
114
114
|
<button
|
|
115
115
|
onClick={refetch}
|
|
116
|
-
className="px-4 py-2 bg-
|
|
116
|
+
className="px-4 py-2 bg-main-600 text-main-50 rounded-md hover:bg-main-700 transition-colors"
|
|
117
117
|
>
|
|
118
118
|
Try Again
|
|
119
119
|
</button>
|
|
@@ -126,17 +126,17 @@ function PublicRecipeGridReportPage() {
|
|
|
126
126
|
// Step 5: Handle missing event
|
|
127
127
|
if (!event) {
|
|
128
128
|
return (
|
|
129
|
-
<div className="min-h-screen bg-
|
|
129
|
+
<div className="min-h-screen bg-main-50 flex items-center justify-center">
|
|
130
130
|
<div className="max-w-md mx-auto text-center px-4">
|
|
131
|
-
<h1 className="text-2xl font-bold text-
|
|
131
|
+
<h1 className="text-2xl font-bold text-sec-900 mb-4">
|
|
132
132
|
Recipe Grid Report Not Available
|
|
133
133
|
</h1>
|
|
134
|
-
<p className="text-
|
|
134
|
+
<p className="text-sec-600 mb-6">
|
|
135
135
|
This recipe grid report is not available for public viewing.
|
|
136
136
|
</p>
|
|
137
137
|
<button
|
|
138
138
|
onClick={refetch}
|
|
139
|
-
className="px-4 py-2 bg-
|
|
139
|
+
className="px-4 py-2 bg-main-600 text-main-50 rounded-md hover:bg-main-700 transition-colors"
|
|
140
140
|
>
|
|
141
141
|
Try Again
|
|
142
142
|
</button>
|
|
@@ -158,13 +158,13 @@ function PublicRecipeGridReportPage() {
|
|
|
158
158
|
<main className="max-w-6xl mx-auto px-4 py-8">
|
|
159
159
|
{/* Recipe Grid Report Content */}
|
|
160
160
|
<div className="mb-12">
|
|
161
|
-
<div className="bg-
|
|
162
|
-
<h3 className="font-semibold text-
|
|
163
|
-
<p className="text-
|
|
161
|
+
<div className="bg-main-50 border border-main-200 rounded-lg p-6">
|
|
162
|
+
<h3 className="font-semibold text-main-900 mb-2">Recipe Grid Report</h3>
|
|
163
|
+
<p className="text-main-800">
|
|
164
164
|
This is where your recipe grid report content would go.
|
|
165
165
|
The public page is now working correctly without authentication context conflicts.
|
|
166
166
|
</p>
|
|
167
|
-
<div className="mt-4 text-sm text-
|
|
167
|
+
<div className="mt-4 text-sm text-main-700">
|
|
168
168
|
<p><strong>Event Code:</strong> {eventCode}</p>
|
|
169
169
|
<p><strong>Event ID:</strong> {event.event_id}</p>
|
|
170
170
|
<p><strong>Event Name:</strong> {event.event_name}</p>
|
|
@@ -176,12 +176,12 @@ function PublicRecipeGridReportPage() {
|
|
|
176
176
|
<div className="grid grid-cols-1 lg:grid-cols-3 gap-8 mb-12">
|
|
177
177
|
<div className="lg:col-span-2 space-y-6">
|
|
178
178
|
<div>
|
|
179
|
-
<h2 className="text-2xl font-bold text-
|
|
180
|
-
<div className="bg-
|
|
179
|
+
<h2 className="text-2xl font-bold text-sec-900 mb-4">Event Information</h2>
|
|
180
|
+
<div className="bg-sec-50 rounded-lg p-6 space-y-4">
|
|
181
181
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
182
182
|
<div>
|
|
183
|
-
<h3 className="font-semibold text-
|
|
184
|
-
<p className="text-
|
|
183
|
+
<h3 className="font-semibold text-sec-700">Date</h3>
|
|
184
|
+
<p className="text-sec-900">
|
|
185
185
|
{event.event_date ? new Date(event.event_date).toLocaleDateString('en-AU', {
|
|
186
186
|
weekday: 'long',
|
|
187
187
|
year: 'numeric',
|
|
@@ -191,16 +191,16 @@ function PublicRecipeGridReportPage() {
|
|
|
191
191
|
</p>
|
|
192
192
|
</div>
|
|
193
193
|
<div>
|
|
194
|
-
<h3 className="font-semibold text-
|
|
195
|
-
<p className="text-
|
|
194
|
+
<h3 className="font-semibold text-sec-700">Venue</h3>
|
|
195
|
+
<p className="text-sec-900">{event.event_venue || 'TBA'}</p>
|
|
196
196
|
</div>
|
|
197
197
|
<div>
|
|
198
|
-
<h3 className="font-semibold text-
|
|
199
|
-
<p className="text-
|
|
198
|
+
<h3 className="font-semibold text-sec-700">Participants</h3>
|
|
199
|
+
<p className="text-sec-900">{event.event_participants || 'TBA'}</p>
|
|
200
200
|
</div>
|
|
201
201
|
<div>
|
|
202
|
-
<h3 className="font-semibold text-
|
|
203
|
-
<p className="text-
|
|
202
|
+
<h3 className="font-semibold text-sec-700">Event Code</h3>
|
|
203
|
+
<p className="text-sec-900 font-mono">{event.event_code}</p>
|
|
204
204
|
</div>
|
|
205
205
|
</div>
|
|
206
206
|
</div>
|
|
@@ -218,7 +218,7 @@ function PublicRecipeGridReportPage() {
|
|
|
218
218
|
showDelete={false}
|
|
219
219
|
className="rounded-lg shadow-lg [&_img]:h-20 [&_img]:w-20 [&_img]:object-contain"
|
|
220
220
|
/>
|
|
221
|
-
<p className="mt-4 text-sm text-
|
|
221
|
+
<p className="mt-4 text-sm text-sec-600">Event Logo</p>
|
|
222
222
|
</div>
|
|
223
223
|
</div>
|
|
224
224
|
</div>
|
|
@@ -268,9 +268,9 @@ function PublicEventPage() {
|
|
|
268
268
|
.substring(0, 3);
|
|
269
269
|
}}
|
|
270
270
|
/>
|
|
271
|
-
<h1 className="text-2xl font-bold text-
|
|
271
|
+
<h1 className="text-2xl font-bold text-sec-900">{event.event_name}</h1>
|
|
272
272
|
{event.event_date && (
|
|
273
|
-
<p className="text-
|
|
273
|
+
<p className="text-sec-600 mt-2">
|
|
274
274
|
{new Date(event.event_date).toLocaleDateString('en-AU')}
|
|
275
275
|
</p>
|
|
276
276
|
)}
|
|
@@ -287,12 +287,12 @@ function PublicEventPage() {
|
|
|
287
287
|
*/
|
|
288
288
|
function PublicInfoPage() {
|
|
289
289
|
return (
|
|
290
|
-
<div className="min-h-screen bg-
|
|
290
|
+
<div className="min-h-screen bg-main-50 flex items-center justify-center">
|
|
291
291
|
<div className="max-w-md mx-auto text-center px-4">
|
|
292
|
-
<h1 className="text-2xl font-bold text-
|
|
292
|
+
<h1 className="text-2xl font-bold text-sec-900 mb-4">
|
|
293
293
|
Public Information Page
|
|
294
294
|
</h1>
|
|
295
|
-
<p className="text-
|
|
295
|
+
<p className="text-sec-600">
|
|
296
296
|
This is a public information page that doesn't require authentication.
|
|
297
297
|
</p>
|
|
298
298
|
</div>
|
|
@@ -305,12 +305,12 @@ function PublicInfoPage() {
|
|
|
305
305
|
*/
|
|
306
306
|
function PublicReportPage() {
|
|
307
307
|
return (
|
|
308
|
-
<div className="min-h-screen bg-
|
|
308
|
+
<div className="min-h-screen bg-main-50 flex items-center justify-center">
|
|
309
309
|
<div className="max-w-md mx-auto text-center px-4">
|
|
310
|
-
<h1 className="text-2xl font-bold text-
|
|
310
|
+
<h1 className="text-2xl font-bold text-sec-900 mb-4">
|
|
311
311
|
Public Report Page
|
|
312
312
|
</h1>
|
|
313
|
-
<p className="text-
|
|
313
|
+
<p className="text-sec-600">
|
|
314
314
|
This is a public report page that doesn't require authentication.
|
|
315
315
|
</p>
|
|
316
316
|
</div>
|
|
@@ -65,23 +65,23 @@ export function PublicPageUsageExample() {
|
|
|
65
65
|
// Step 4: Handle error state
|
|
66
66
|
if (error) {
|
|
67
67
|
return (
|
|
68
|
-
<div className="min-h-screen bg-
|
|
68
|
+
<div className="min-h-screen bg-main-50 flex items-center justify-center">
|
|
69
69
|
<div className="max-w-md mx-auto text-center px-4">
|
|
70
70
|
<div className="mb-6">
|
|
71
|
-
<div className="mx-auto flex items-center justify-center h-12 w-12 rounded-full bg-
|
|
72
|
-
<svg className="h-6 w-6 text-
|
|
71
|
+
<div className="mx-auto flex items-center justify-center h-12 w-12 rounded-full bg-acc-100 mb-4">
|
|
72
|
+
<svg className="h-6 w-6 text-acc-600" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
73
73
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z" />
|
|
74
74
|
</svg>
|
|
75
75
|
</div>
|
|
76
|
-
<h1 className="text-2xl font-bold text-
|
|
76
|
+
<h1 className="text-2xl font-bold text-sec-900 mb-2">
|
|
77
77
|
Event Not Found
|
|
78
78
|
</h1>
|
|
79
|
-
<p className="text-
|
|
79
|
+
<p className="text-sec-600 mb-6">
|
|
80
80
|
The event code "{eventCode}" is invalid or the event is not available for public viewing.
|
|
81
81
|
</p>
|
|
82
82
|
<button
|
|
83
83
|
onClick={refetch}
|
|
84
|
-
className="px-4 py-2 bg-
|
|
84
|
+
className="px-4 py-2 bg-main-600 text-main-50 rounded-md hover:bg-main-700 transition-colors"
|
|
85
85
|
>
|
|
86
86
|
Try Again
|
|
87
87
|
</button>
|
|
@@ -94,17 +94,17 @@ export function PublicPageUsageExample() {
|
|
|
94
94
|
// Step 5: Handle missing event
|
|
95
95
|
if (!event) {
|
|
96
96
|
return (
|
|
97
|
-
<div className="min-h-screen bg-
|
|
97
|
+
<div className="min-h-screen bg-main-50 flex items-center justify-center">
|
|
98
98
|
<div className="max-w-md mx-auto text-center px-4">
|
|
99
|
-
<h1 className="text-2xl font-bold text-
|
|
99
|
+
<h1 className="text-2xl font-bold text-sec-900 mb-4">
|
|
100
100
|
Event Not Available
|
|
101
101
|
</h1>
|
|
102
|
-
<p className="text-
|
|
102
|
+
<p className="text-sec-600 mb-6">
|
|
103
103
|
This event is not available for public viewing.
|
|
104
104
|
</p>
|
|
105
105
|
<button
|
|
106
106
|
onClick={refetch}
|
|
107
|
-
className="px-4 py-2 bg-
|
|
107
|
+
className="px-4 py-2 bg-main-600 text-main-50 rounded-md hover:bg-main-700 transition-colors"
|
|
108
108
|
>
|
|
109
109
|
Try Again
|
|
110
110
|
</button>
|
|
@@ -130,12 +130,12 @@ export function PublicPageUsageExample() {
|
|
|
130
130
|
{/* Event Information */}
|
|
131
131
|
<div className="lg:col-span-2 space-y-6">
|
|
132
132
|
<div>
|
|
133
|
-
<h2 className="text-2xl font-bold text-
|
|
134
|
-
<div className="bg-
|
|
133
|
+
<h2 className="text-2xl font-bold text-sec-900 mb-4">Event Information</h2>
|
|
134
|
+
<div className="bg-sec-50 rounded-lg p-6 space-y-4">
|
|
135
135
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
136
136
|
<div>
|
|
137
|
-
<h3 className="font-semibold text-
|
|
138
|
-
<p className="text-
|
|
137
|
+
<h3 className="font-semibold text-sec-700">Date</h3>
|
|
138
|
+
<p className="text-sec-900">
|
|
139
139
|
{event.event_date ? new Date(event.event_date).toLocaleDateString('en-AU', {
|
|
140
140
|
weekday: 'long',
|
|
141
141
|
year: 'numeric',
|
|
@@ -145,23 +145,23 @@ export function PublicPageUsageExample() {
|
|
|
145
145
|
</p>
|
|
146
146
|
</div>
|
|
147
147
|
<div>
|
|
148
|
-
<h3 className="font-semibold text-
|
|
149
|
-
<p className="text-
|
|
148
|
+
<h3 className="font-semibold text-sec-700">Venue</h3>
|
|
149
|
+
<p className="text-sec-900">{event.event_venue || 'TBA'}</p>
|
|
150
150
|
</div>
|
|
151
151
|
<div>
|
|
152
|
-
<h3 className="font-semibold text-
|
|
153
|
-
<p className="text-
|
|
152
|
+
<h3 className="font-semibold text-sec-700">Participants</h3>
|
|
153
|
+
<p className="text-sec-900">{event.event_participants || 'TBA'}</p>
|
|
154
154
|
</div>
|
|
155
155
|
<div>
|
|
156
|
-
<h3 className="font-semibold text-
|
|
157
|
-
<p className="text-
|
|
156
|
+
<h3 className="font-semibold text-sec-700">Event Code</h3>
|
|
157
|
+
<p className="text-sec-900 font-mono">{event.event_code}</p>
|
|
158
158
|
</div>
|
|
159
159
|
</div>
|
|
160
160
|
|
|
161
161
|
{event.event_news && (
|
|
162
162
|
<div>
|
|
163
|
-
<h3 className="font-semibold text-
|
|
164
|
-
<p className="text-
|
|
163
|
+
<h3 className="font-semibold text-sec-700 mb-2">Event News</h3>
|
|
164
|
+
<p className="text-sec-900">{event.event_news}</p>
|
|
165
165
|
</div>
|
|
166
166
|
)}
|
|
167
167
|
</div>
|
|
@@ -179,20 +179,20 @@ export function PublicPageUsageExample() {
|
|
|
179
179
|
showDelete={false}
|
|
180
180
|
className="rounded-lg shadow-lg [&_img]:h-20 [&_img]:w-20 [&_img]:object-contain"
|
|
181
181
|
/>
|
|
182
|
-
<p className="mt-4 text-sm text-
|
|
182
|
+
<p className="mt-4 text-sm text-sec-600">Event Logo</p>
|
|
183
183
|
</div>
|
|
184
184
|
</div>
|
|
185
185
|
</div>
|
|
186
186
|
|
|
187
187
|
{/* Recipe Grid Report Content */}
|
|
188
188
|
<div className="mb-12">
|
|
189
|
-
<div className="bg-
|
|
190
|
-
<h3 className="font-semibold text-
|
|
191
|
-
<p className="text-
|
|
189
|
+
<div className="bg-main-50 border border-main-200 rounded-lg p-6">
|
|
190
|
+
<h3 className="font-semibold text-main-900 mb-2">Recipe Grid Report</h3>
|
|
191
|
+
<p className="text-main-800">
|
|
192
192
|
This is where your recipe grid report content would go.
|
|
193
193
|
The public page is now working correctly without authentication context conflicts.
|
|
194
194
|
</p>
|
|
195
|
-
<div className="mt-4 text-sm text-
|
|
195
|
+
<div className="mt-4 text-sm text-main-700">
|
|
196
196
|
<p><strong>Event Code:</strong> {eventCode}</p>
|
|
197
197
|
<p><strong>Event ID:</strong> {event.event_id}</p>
|
|
198
198
|
<p><strong>Event Name:</strong> {event.event_name}</p>
|
|
@@ -202,9 +202,9 @@ export function PublicPageUsageExample() {
|
|
|
202
202
|
|
|
203
203
|
{/* Event Footer Information */}
|
|
204
204
|
{event.event_footer && (
|
|
205
|
-
<div className="bg-
|
|
206
|
-
<h3 className="font-semibold text-
|
|
207
|
-
<p className="text-
|
|
205
|
+
<div className="bg-sec-50 rounded-lg p-6">
|
|
206
|
+
<h3 className="font-semibold text-sec-900 mb-2">Additional Information</h3>
|
|
207
|
+
<p className="text-sec-700">{event.event_footer}</p>
|
|
208
208
|
</div>
|
|
209
209
|
)}
|
|
210
210
|
</main>
|