@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
|
@@ -106,23 +106,23 @@ function PublicRecipeGridReportPage() {
|
|
|
106
106
|
// Step 4: Handle error state
|
|
107
107
|
if (error) {
|
|
108
108
|
return (
|
|
109
|
-
<div className="min-h-screen bg-
|
|
109
|
+
<div className="min-h-screen bg-main-50 flex items-center justify-center">
|
|
110
110
|
<div className="max-w-md mx-auto text-center px-4">
|
|
111
111
|
<div className="mb-6">
|
|
112
|
-
<div className="mx-auto flex items-center justify-center h-12 w-12 rounded-full bg-
|
|
113
|
-
<svg className="h-6 w-6 text-
|
|
112
|
+
<div className="mx-auto flex items-center justify-center h-12 w-12 rounded-full bg-acc-100 mb-4">
|
|
113
|
+
<svg className="h-6 w-6 text-acc-600" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
114
114
|
<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" />
|
|
115
115
|
</svg>
|
|
116
116
|
</div>
|
|
117
|
-
<h1 className="text-2xl font-bold text-
|
|
117
|
+
<h1 className="text-2xl font-bold text-sec-900 mb-2">
|
|
118
118
|
Recipe Grid Report Not Found
|
|
119
119
|
</h1>
|
|
120
|
-
<p className="text-
|
|
120
|
+
<p className="text-sec-600 mb-6">
|
|
121
121
|
The event code "{eventCode}" is invalid or the recipe grid report is not available for public viewing.
|
|
122
122
|
</p>
|
|
123
123
|
<button
|
|
124
124
|
onClick={refetch}
|
|
125
|
-
className="px-4 py-2 bg-
|
|
125
|
+
className="px-4 py-2 bg-main-600 text-main-50 rounded-md hover:bg-main-700 transition-colors"
|
|
126
126
|
>
|
|
127
127
|
Try Again
|
|
128
128
|
</button>
|
|
@@ -135,17 +135,17 @@ function PublicRecipeGridReportPage() {
|
|
|
135
135
|
// Step 5: Handle missing event
|
|
136
136
|
if (!event) {
|
|
137
137
|
return (
|
|
138
|
-
<div className="min-h-screen bg-
|
|
138
|
+
<div className="min-h-screen bg-main-50 flex items-center justify-center">
|
|
139
139
|
<div className="max-w-md mx-auto text-center px-4">
|
|
140
|
-
<h1 className="text-2xl font-bold text-
|
|
140
|
+
<h1 className="text-2xl font-bold text-sec-900 mb-4">
|
|
141
141
|
Recipe Grid Report Not Available
|
|
142
142
|
</h1>
|
|
143
|
-
<p className="text-
|
|
143
|
+
<p className="text-sec-600 mb-6">
|
|
144
144
|
This recipe grid report is not available for public viewing.
|
|
145
145
|
</p>
|
|
146
146
|
<button
|
|
147
147
|
onClick={refetch}
|
|
148
|
-
className="px-4 py-2 bg-
|
|
148
|
+
className="px-4 py-2 bg-main-600 text-main-50 rounded-md hover:bg-main-700 transition-colors"
|
|
149
149
|
>
|
|
150
150
|
Try Again
|
|
151
151
|
</button>
|
|
@@ -167,13 +167,13 @@ function PublicRecipeGridReportPage() {
|
|
|
167
167
|
<main className="max-w-6xl mx-auto px-4 py-8">
|
|
168
168
|
{/* Recipe Grid Report Content */}
|
|
169
169
|
<div className="mb-12">
|
|
170
|
-
<div className="bg-
|
|
171
|
-
<h3 className="font-semibold text-
|
|
172
|
-
<p className="text-
|
|
170
|
+
<div className="bg-main-50 border border-main-200 rounded-lg p-6">
|
|
171
|
+
<h3 className="font-semibold text-main-900 mb-2">Recipe Grid Report</h3>
|
|
172
|
+
<p className="text-main-800">
|
|
173
173
|
This is where your recipe grid report content would go.
|
|
174
174
|
The public page is now working correctly without authentication context conflicts.
|
|
175
175
|
</p>
|
|
176
|
-
<div className="mt-4 text-sm text-
|
|
176
|
+
<div className="mt-4 text-sm text-main-700">
|
|
177
177
|
<p><strong>Event Code:</strong> {eventCode}</p>
|
|
178
178
|
<p><strong>Event ID:</strong> {event.event_id}</p>
|
|
179
179
|
<p><strong>Event Name:</strong> {event.event_name}</p>
|
|
@@ -185,12 +185,12 @@ function PublicRecipeGridReportPage() {
|
|
|
185
185
|
<div className="grid grid-cols-1 lg:grid-cols-3 gap-8 mb-12">
|
|
186
186
|
<div className="lg:col-span-2 space-y-6">
|
|
187
187
|
<div>
|
|
188
|
-
<h2 className="text-2xl font-bold text-
|
|
189
|
-
<div className="bg-
|
|
188
|
+
<h2 className="text-2xl font-bold text-sec-900 mb-4">Event Information</h2>
|
|
189
|
+
<div className="bg-sec-50 rounded-lg p-6 space-y-4">
|
|
190
190
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
191
191
|
<div>
|
|
192
|
-
<h3 className="font-semibold text-
|
|
193
|
-
<p className="text-
|
|
192
|
+
<h3 className="font-semibold text-sec-700">Date</h3>
|
|
193
|
+
<p className="text-sec-900">
|
|
194
194
|
{event.event_date ? new Date(event.event_date).toLocaleDateString('en-AU', {
|
|
195
195
|
weekday: 'long',
|
|
196
196
|
year: 'numeric',
|
|
@@ -200,16 +200,16 @@ function PublicRecipeGridReportPage() {
|
|
|
200
200
|
</p>
|
|
201
201
|
</div>
|
|
202
202
|
<div>
|
|
203
|
-
<h3 className="font-semibold text-
|
|
204
|
-
<p className="text-
|
|
203
|
+
<h3 className="font-semibold text-sec-700">Venue</h3>
|
|
204
|
+
<p className="text-sec-900">{event.event_venue || 'TBA'}</p>
|
|
205
205
|
</div>
|
|
206
206
|
<div>
|
|
207
|
-
<h3 className="font-semibold text-
|
|
208
|
-
<p className="text-
|
|
207
|
+
<h3 className="font-semibold text-sec-700">Participants</h3>
|
|
208
|
+
<p className="text-sec-900">{event.event_participants || 'TBA'}</p>
|
|
209
209
|
</div>
|
|
210
210
|
<div>
|
|
211
|
-
<h3 className="font-semibold text-
|
|
212
|
-
<p className="text-
|
|
211
|
+
<h3 className="font-semibold text-sec-700">Event Code</h3>
|
|
212
|
+
<p className="text-sec-900 font-mono">{event.event_code}</p>
|
|
213
213
|
</div>
|
|
214
214
|
</div>
|
|
215
215
|
</div>
|
|
@@ -226,7 +226,7 @@ function PublicRecipeGridReportPage() {
|
|
|
226
226
|
size="2xl"
|
|
227
227
|
className="rounded-lg shadow-lg"
|
|
228
228
|
/>
|
|
229
|
-
<p className="mt-4 text-sm text-
|
|
229
|
+
<p className="mt-4 text-sm text-sec-600">Event Logo</p>
|
|
230
230
|
</div>
|
|
231
231
|
</div>
|
|
232
232
|
</div>
|
|
@@ -266,9 +266,9 @@ function PublicEventPage() {
|
|
|
266
266
|
size="xl"
|
|
267
267
|
className="mx-auto mb-4"
|
|
268
268
|
/>
|
|
269
|
-
<h1 className="text-2xl font-bold text-
|
|
269
|
+
<h1 className="text-2xl font-bold text-sec-900">{event.event_name}</h1>
|
|
270
270
|
{event.event_date && (
|
|
271
|
-
<p className="text-
|
|
271
|
+
<p className="text-sec-600 mt-2">
|
|
272
272
|
{new Date(event.event_date).toLocaleDateString('en-AU')}
|
|
273
273
|
</p>
|
|
274
274
|
)}
|
|
@@ -285,12 +285,12 @@ function PublicEventPage() {
|
|
|
285
285
|
*/
|
|
286
286
|
function PublicInfoPage() {
|
|
287
287
|
return (
|
|
288
|
-
<div className="min-h-screen bg-
|
|
288
|
+
<div className="min-h-screen bg-main-50 flex items-center justify-center">
|
|
289
289
|
<div className="max-w-md mx-auto text-center px-4">
|
|
290
|
-
<h1 className="text-2xl font-bold text-
|
|
290
|
+
<h1 className="text-2xl font-bold text-sec-900 mb-4">
|
|
291
291
|
Public Information Page
|
|
292
292
|
</h1>
|
|
293
|
-
<p className="text-
|
|
293
|
+
<p className="text-sec-600">
|
|
294
294
|
This is a public information page that doesn't require authentication.
|
|
295
295
|
</p>
|
|
296
296
|
</div>
|
|
@@ -65,23 +65,23 @@ export function PublicEventPage() {
|
|
|
65
65
|
// Handle error state
|
|
66
66
|
if (eventError) {
|
|
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={refetchEvent}
|
|
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 PublicEventPage() {
|
|
|
94
94
|
// 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={refetchEvent}
|
|
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>
|
|
@@ -129,12 +129,12 @@ export function PublicEventPage() {
|
|
|
129
129
|
{/* Event Information */}
|
|
130
130
|
<div className="lg:col-span-2 space-y-6">
|
|
131
131
|
<div>
|
|
132
|
-
<h2 className="text-2xl font-bold text-
|
|
133
|
-
<div className="bg-
|
|
132
|
+
<h2 className="text-2xl font-bold text-sec-900 mb-4">Event Information</h2>
|
|
133
|
+
<div className="bg-sec-50 rounded-lg p-6 space-y-4">
|
|
134
134
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
135
135
|
<div>
|
|
136
|
-
<h3 className="font-semibold text-
|
|
137
|
-
<p className="text-
|
|
136
|
+
<h3 className="font-semibold text-sec-700">Date</h3>
|
|
137
|
+
<p className="text-sec-900">
|
|
138
138
|
{event.event_date ? new Date(event.event_date).toLocaleDateString('en-AU', {
|
|
139
139
|
weekday: 'long',
|
|
140
140
|
year: 'numeric',
|
|
@@ -144,23 +144,23 @@ export function PublicEventPage() {
|
|
|
144
144
|
</p>
|
|
145
145
|
</div>
|
|
146
146
|
<div>
|
|
147
|
-
<h3 className="font-semibold text-
|
|
148
|
-
<p className="text-
|
|
147
|
+
<h3 className="font-semibold text-sec-700">Venue</h3>
|
|
148
|
+
<p className="text-sec-900">{event.event_venue || 'TBA'}</p>
|
|
149
149
|
</div>
|
|
150
150
|
<div>
|
|
151
|
-
<h3 className="font-semibold text-
|
|
152
|
-
<p className="text-
|
|
151
|
+
<h3 className="font-semibold text-sec-700">Participants</h3>
|
|
152
|
+
<p className="text-sec-900">{event.event_participants || 'TBA'}</p>
|
|
153
153
|
</div>
|
|
154
154
|
<div>
|
|
155
|
-
<h3 className="font-semibold text-
|
|
156
|
-
<p className="text-
|
|
155
|
+
<h3 className="font-semibold text-sec-700">Event Code</h3>
|
|
156
|
+
<p className="text-sec-900 font-mono">{event.event_code}</p>
|
|
157
157
|
</div>
|
|
158
158
|
</div>
|
|
159
159
|
|
|
160
160
|
{event.event_news && (
|
|
161
161
|
<div>
|
|
162
|
-
<h3 className="font-semibold text-
|
|
163
|
-
<p className="text-
|
|
162
|
+
<h3 className="font-semibold text-sec-700 mb-2">Event News</h3>
|
|
163
|
+
<p className="text-sec-900">{event.event_news}</p>
|
|
164
164
|
</div>
|
|
165
165
|
)}
|
|
166
166
|
</div>
|
|
@@ -177,18 +177,18 @@ export function PublicEventPage() {
|
|
|
177
177
|
size="2xl"
|
|
178
178
|
className="rounded-lg shadow-lg"
|
|
179
179
|
/>
|
|
180
|
-
<p className="mt-4 text-sm text-
|
|
180
|
+
<p className="mt-4 text-sm text-sec-600">Event Logo</p>
|
|
181
181
|
</div>
|
|
182
182
|
</div>
|
|
183
183
|
</div>
|
|
184
184
|
|
|
185
185
|
{/* Note about dishes */}
|
|
186
186
|
<div className="mb-12">
|
|
187
|
-
<div className="bg-
|
|
188
|
-
<h3 className="font-semibold text-
|
|
189
|
-
<p className="text-
|
|
187
|
+
<div className="bg-main-50 border border-main-200 rounded-lg p-6">
|
|
188
|
+
<h3 className="font-semibold text-main-900 mb-2">Event Dishes</h3>
|
|
189
|
+
<p className="text-main-800">
|
|
190
190
|
For CAKE applications, implement your own dishes functionality using the
|
|
191
|
-
<code className="bg-
|
|
191
|
+
<code className="bg-main-100 px-1 rounded">usePublicDishes</code> hook
|
|
192
192
|
as described in the CAKE implementation guide.
|
|
193
193
|
</p>
|
|
194
194
|
</div>
|
|
@@ -196,9 +196,9 @@ export function PublicEventPage() {
|
|
|
196
196
|
|
|
197
197
|
{/* Event Footer Information */}
|
|
198
198
|
{event.event_footer && (
|
|
199
|
-
<div className="bg-
|
|
200
|
-
<h3 className="font-semibold text-
|
|
201
|
-
<p className="text-
|
|
199
|
+
<div className="bg-sec-50 rounded-lg p-6">
|
|
200
|
+
<h3 className="font-semibold text-sec-900 mb-2">Additional Information</h3>
|
|
201
|
+
<p className="text-sec-700">{event.event_footer}</p>
|
|
202
202
|
</div>
|
|
203
203
|
)}
|
|
204
204
|
</main>
|
|
@@ -238,29 +238,29 @@ export function PublicEventPageCompact() {
|
|
|
238
238
|
size="xl"
|
|
239
239
|
className="mx-auto mb-4"
|
|
240
240
|
/>
|
|
241
|
-
<h1 className="text-2xl font-bold text-
|
|
241
|
+
<h1 className="text-2xl font-bold text-sec-900">{event.event_name}</h1>
|
|
242
242
|
{event.event_date && (
|
|
243
|
-
<p className="text-
|
|
243
|
+
<p className="text-sec-600 mt-2">
|
|
244
244
|
{new Date(event.event_date).toLocaleDateString('en-AU')}
|
|
245
245
|
</p>
|
|
246
246
|
)}
|
|
247
247
|
</div>
|
|
248
248
|
|
|
249
249
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6">
|
|
250
|
-
<div className="bg-
|
|
251
|
-
<h3 className="font-semibold text-
|
|
252
|
-
<p className="text-
|
|
250
|
+
<div className="bg-sec-50 rounded p-4">
|
|
251
|
+
<h3 className="font-semibold text-sec-700">Venue</h3>
|
|
252
|
+
<p className="text-sec-900">{event.event_venue || 'TBA'}</p>
|
|
253
253
|
</div>
|
|
254
|
-
<div className="bg-
|
|
255
|
-
<h3 className="font-semibold text-
|
|
256
|
-
<p className="text-
|
|
254
|
+
<div className="bg-sec-50 rounded p-4">
|
|
255
|
+
<h3 className="font-semibold text-sec-700">Participants</h3>
|
|
256
|
+
<p className="text-sec-900">{event.event_participants || 'TBA'}</p>
|
|
257
257
|
</div>
|
|
258
258
|
</div>
|
|
259
259
|
|
|
260
260
|
{event.event_news && (
|
|
261
|
-
<div className="bg-
|
|
262
|
-
<h3 className="font-semibold text-
|
|
263
|
-
<p className="text-
|
|
261
|
+
<div className="bg-main-50 border border-main-200 rounded p-4">
|
|
262
|
+
<h3 className="font-semibold text-main-900 mb-2">Event News</h3>
|
|
263
|
+
<p className="text-main-800">{event.event_news}</p>
|
|
264
264
|
</div>
|
|
265
265
|
)}
|
|
266
266
|
</main>
|
|
@@ -96,23 +96,23 @@ function PublicRecipeGridReportPage() {
|
|
|
96
96
|
// Step 4: Handle error state
|
|
97
97
|
if (error) {
|
|
98
98
|
return (
|
|
99
|
-
<div className="min-h-screen bg-
|
|
99
|
+
<div className="min-h-screen bg-main-50 flex items-center justify-center">
|
|
100
100
|
<div className="max-w-md mx-auto text-center px-4">
|
|
101
101
|
<div className="mb-6">
|
|
102
|
-
<div className="mx-auto flex items-center justify-center h-12 w-12 rounded-full bg-
|
|
103
|
-
<svg className="h-6 w-6 text-
|
|
102
|
+
<div className="mx-auto flex items-center justify-center h-12 w-12 rounded-full bg-acc-100 mb-4">
|
|
103
|
+
<svg className="h-6 w-6 text-acc-600" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
104
104
|
<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" />
|
|
105
105
|
</svg>
|
|
106
106
|
</div>
|
|
107
|
-
<h1 className="text-2xl font-bold text-
|
|
107
|
+
<h1 className="text-2xl font-bold text-sec-900 mb-2">
|
|
108
108
|
Recipe Grid Report Not Found
|
|
109
109
|
</h1>
|
|
110
|
-
<p className="text-
|
|
110
|
+
<p className="text-sec-600 mb-6">
|
|
111
111
|
The event code "{eventCode}" is invalid or the recipe grid report is not available for public viewing.
|
|
112
112
|
</p>
|
|
113
113
|
<button
|
|
114
114
|
onClick={refetch}
|
|
115
|
-
className="px-4 py-2 bg-
|
|
115
|
+
className="px-4 py-2 bg-main-600 text-main-50 rounded-md hover:bg-main-700 transition-colors"
|
|
116
116
|
>
|
|
117
117
|
Try Again
|
|
118
118
|
</button>
|
|
@@ -125,17 +125,17 @@ function PublicRecipeGridReportPage() {
|
|
|
125
125
|
// Step 5: Handle missing event
|
|
126
126
|
if (!event) {
|
|
127
127
|
return (
|
|
128
|
-
<div className="min-h-screen bg-
|
|
128
|
+
<div className="min-h-screen bg-main-50 flex items-center justify-center">
|
|
129
129
|
<div className="max-w-md mx-auto text-center px-4">
|
|
130
|
-
<h1 className="text-2xl font-bold text-
|
|
130
|
+
<h1 className="text-2xl font-bold text-sec-900 mb-4">
|
|
131
131
|
Recipe Grid Report Not Available
|
|
132
132
|
</h1>
|
|
133
|
-
<p className="text-
|
|
133
|
+
<p className="text-sec-600 mb-6">
|
|
134
134
|
This recipe grid report is not available for public viewing.
|
|
135
135
|
</p>
|
|
136
136
|
<button
|
|
137
137
|
onClick={refetch}
|
|
138
|
-
className="px-4 py-2 bg-
|
|
138
|
+
className="px-4 py-2 bg-main-600 text-main-50 rounded-md hover:bg-main-700 transition-colors"
|
|
139
139
|
>
|
|
140
140
|
Try Again
|
|
141
141
|
</button>
|
|
@@ -157,13 +157,13 @@ function PublicRecipeGridReportPage() {
|
|
|
157
157
|
<main className="max-w-6xl mx-auto px-4 py-8">
|
|
158
158
|
{/* Recipe Grid Report Content */}
|
|
159
159
|
<div className="mb-12">
|
|
160
|
-
<div className="bg-
|
|
161
|
-
<h3 className="font-semibold text-
|
|
162
|
-
<p className="text-
|
|
160
|
+
<div className="bg-main-50 border border-main-200 rounded-lg p-6">
|
|
161
|
+
<h3 className="font-semibold text-main-900 mb-2">Recipe Grid Report</h3>
|
|
162
|
+
<p className="text-main-800">
|
|
163
163
|
This is where your recipe grid report content would go.
|
|
164
164
|
The public page is now working correctly without authentication context conflicts.
|
|
165
165
|
</p>
|
|
166
|
-
<div className="mt-4 text-sm text-
|
|
166
|
+
<div className="mt-4 text-sm text-main-700">
|
|
167
167
|
<p><strong>Event Code:</strong> {eventCode}</p>
|
|
168
168
|
<p><strong>Event ID:</strong> {event.event_id}</p>
|
|
169
169
|
<p><strong>Event Name:</strong> {event.event_name}</p>
|
|
@@ -175,12 +175,12 @@ function PublicRecipeGridReportPage() {
|
|
|
175
175
|
<div className="grid grid-cols-1 lg:grid-cols-3 gap-8 mb-12">
|
|
176
176
|
<div className="lg:col-span-2 space-y-6">
|
|
177
177
|
<div>
|
|
178
|
-
<h2 className="text-2xl font-bold text-
|
|
179
|
-
<div className="bg-
|
|
178
|
+
<h2 className="text-2xl font-bold text-sec-900 mb-4">Event Information</h2>
|
|
179
|
+
<div className="bg-sec-50 rounded-lg p-6 space-y-4">
|
|
180
180
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
181
181
|
<div>
|
|
182
|
-
<h3 className="font-semibold text-
|
|
183
|
-
<p className="text-
|
|
182
|
+
<h3 className="font-semibold text-sec-700">Date</h3>
|
|
183
|
+
<p className="text-sec-900">
|
|
184
184
|
{event.event_date ? new Date(event.event_date).toLocaleDateString('en-AU', {
|
|
185
185
|
weekday: 'long',
|
|
186
186
|
year: 'numeric',
|
|
@@ -190,16 +190,16 @@ function PublicRecipeGridReportPage() {
|
|
|
190
190
|
</p>
|
|
191
191
|
</div>
|
|
192
192
|
<div>
|
|
193
|
-
<h3 className="font-semibold text-
|
|
194
|
-
<p className="text-
|
|
193
|
+
<h3 className="font-semibold text-sec-700">Venue</h3>
|
|
194
|
+
<p className="text-sec-900">{event.event_venue || 'TBA'}</p>
|
|
195
195
|
</div>
|
|
196
196
|
<div>
|
|
197
|
-
<h3 className="font-semibold text-
|
|
198
|
-
<p className="text-
|
|
197
|
+
<h3 className="font-semibold text-sec-700">Participants</h3>
|
|
198
|
+
<p className="text-sec-900">{event.event_participants || 'TBA'}</p>
|
|
199
199
|
</div>
|
|
200
200
|
<div>
|
|
201
|
-
<h3 className="font-semibold text-
|
|
202
|
-
<p className="text-
|
|
201
|
+
<h3 className="font-semibold text-sec-700">Event Code</h3>
|
|
202
|
+
<p className="text-sec-900 font-mono">{event.event_code}</p>
|
|
203
203
|
</div>
|
|
204
204
|
</div>
|
|
205
205
|
</div>
|
|
@@ -216,7 +216,7 @@ function PublicRecipeGridReportPage() {
|
|
|
216
216
|
size="2xl"
|
|
217
217
|
className="rounded-lg shadow-lg"
|
|
218
218
|
/>
|
|
219
|
-
<p className="mt-4 text-sm text-
|
|
219
|
+
<p className="mt-4 text-sm text-sec-600">Event Logo</p>
|
|
220
220
|
</div>
|
|
221
221
|
</div>
|
|
222
222
|
</div>
|
|
@@ -255,9 +255,9 @@ function PublicEventPage() {
|
|
|
255
255
|
size="xl"
|
|
256
256
|
className="mx-auto mb-4"
|
|
257
257
|
/>
|
|
258
|
-
<h1 className="text-2xl font-bold text-
|
|
258
|
+
<h1 className="text-2xl font-bold text-sec-900">{event.event_name}</h1>
|
|
259
259
|
{event.event_date && (
|
|
260
|
-
<p className="text-
|
|
260
|
+
<p className="text-sec-600 mt-2">
|
|
261
261
|
{new Date(event.event_date).toLocaleDateString('en-AU')}
|
|
262
262
|
</p>
|
|
263
263
|
)}
|
|
@@ -274,12 +274,12 @@ function PublicEventPage() {
|
|
|
274
274
|
*/
|
|
275
275
|
function PublicInfoPage() {
|
|
276
276
|
return (
|
|
277
|
-
<div className="min-h-screen bg-
|
|
277
|
+
<div className="min-h-screen bg-main-50 flex items-center justify-center">
|
|
278
278
|
<div className="max-w-md mx-auto text-center px-4">
|
|
279
|
-
<h1 className="text-2xl font-bold text-
|
|
279
|
+
<h1 className="text-2xl font-bold text-sec-900 mb-4">
|
|
280
280
|
Public Information Page
|
|
281
281
|
</h1>
|
|
282
|
-
<p className="text-
|
|
282
|
+
<p className="text-sec-600">
|
|
283
283
|
This is a public information page that doesn't require authentication.
|
|
284
284
|
</p>
|
|
285
285
|
</div>
|
|
@@ -292,12 +292,12 @@ function PublicInfoPage() {
|
|
|
292
292
|
*/
|
|
293
293
|
function PublicReportPage() {
|
|
294
294
|
return (
|
|
295
|
-
<div className="min-h-screen bg-
|
|
295
|
+
<div className="min-h-screen bg-main-50 flex items-center justify-center">
|
|
296
296
|
<div className="max-w-md mx-auto text-center px-4">
|
|
297
|
-
<h1 className="text-2xl font-bold text-
|
|
297
|
+
<h1 className="text-2xl font-bold text-sec-900 mb-4">
|
|
298
298
|
Public Report Page
|
|
299
299
|
</h1>
|
|
300
|
-
<p className="text-
|
|
300
|
+
<p className="text-sec-600">
|
|
301
301
|
This is a public report page that doesn't require authentication.
|
|
302
302
|
</p>
|
|
303
303
|
</div>
|
|
@@ -64,23 +64,23 @@ export function PublicPageUsageExample() {
|
|
|
64
64
|
// Step 4: Handle error state
|
|
65
65
|
if (error) {
|
|
66
66
|
return (
|
|
67
|
-
<div className="min-h-screen bg-
|
|
67
|
+
<div className="min-h-screen bg-main-50 flex items-center justify-center">
|
|
68
68
|
<div className="max-w-md mx-auto text-center px-4">
|
|
69
69
|
<div className="mb-6">
|
|
70
|
-
<div className="mx-auto flex items-center justify-center h-12 w-12 rounded-full bg-
|
|
71
|
-
<svg className="h-6 w-6 text-
|
|
70
|
+
<div className="mx-auto flex items-center justify-center h-12 w-12 rounded-full bg-acc-100 mb-4">
|
|
71
|
+
<svg className="h-6 w-6 text-acc-600" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
72
72
|
<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" />
|
|
73
73
|
</svg>
|
|
74
74
|
</div>
|
|
75
|
-
<h1 className="text-2xl font-bold text-
|
|
75
|
+
<h1 className="text-2xl font-bold text-sec-900 mb-2">
|
|
76
76
|
Event Not Found
|
|
77
77
|
</h1>
|
|
78
|
-
<p className="text-
|
|
78
|
+
<p className="text-sec-600 mb-6">
|
|
79
79
|
The event code "{eventCode}" is invalid or the event is not available for public viewing.
|
|
80
80
|
</p>
|
|
81
81
|
<button
|
|
82
82
|
onClick={refetch}
|
|
83
|
-
className="px-4 py-2 bg-
|
|
83
|
+
className="px-4 py-2 bg-main-600 text-main-50 rounded-md hover:bg-main-700 transition-colors"
|
|
84
84
|
>
|
|
85
85
|
Try Again
|
|
86
86
|
</button>
|
|
@@ -93,17 +93,17 @@ export function PublicPageUsageExample() {
|
|
|
93
93
|
// Step 5: Handle missing event
|
|
94
94
|
if (!event) {
|
|
95
95
|
return (
|
|
96
|
-
<div className="min-h-screen bg-
|
|
96
|
+
<div className="min-h-screen bg-main-50 flex items-center justify-center">
|
|
97
97
|
<div className="max-w-md mx-auto text-center px-4">
|
|
98
|
-
<h1 className="text-2xl font-bold text-
|
|
98
|
+
<h1 className="text-2xl font-bold text-sec-900 mb-4">
|
|
99
99
|
Event Not Available
|
|
100
100
|
</h1>
|
|
101
|
-
<p className="text-
|
|
101
|
+
<p className="text-sec-600 mb-6">
|
|
102
102
|
This event is not available for public viewing.
|
|
103
103
|
</p>
|
|
104
104
|
<button
|
|
105
105
|
onClick={refetch}
|
|
106
|
-
className="px-4 py-2 bg-
|
|
106
|
+
className="px-4 py-2 bg-main-600 text-main-50 rounded-md hover:bg-main-700 transition-colors"
|
|
107
107
|
>
|
|
108
108
|
Try Again
|
|
109
109
|
</button>
|
|
@@ -129,12 +129,12 @@ export function PublicPageUsageExample() {
|
|
|
129
129
|
{/* Event Information */}
|
|
130
130
|
<div className="lg:col-span-2 space-y-6">
|
|
131
131
|
<div>
|
|
132
|
-
<h2 className="text-2xl font-bold text-
|
|
133
|
-
<div className="bg-
|
|
132
|
+
<h2 className="text-2xl font-bold text-sec-900 mb-4">Event Information</h2>
|
|
133
|
+
<div className="bg-sec-50 rounded-lg p-6 space-y-4">
|
|
134
134
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
135
135
|
<div>
|
|
136
|
-
<h3 className="font-semibold text-
|
|
137
|
-
<p className="text-
|
|
136
|
+
<h3 className="font-semibold text-sec-700">Date</h3>
|
|
137
|
+
<p className="text-sec-900">
|
|
138
138
|
{event.event_date ? new Date(event.event_date).toLocaleDateString('en-AU', {
|
|
139
139
|
weekday: 'long',
|
|
140
140
|
year: 'numeric',
|
|
@@ -144,23 +144,23 @@ export function PublicPageUsageExample() {
|
|
|
144
144
|
</p>
|
|
145
145
|
</div>
|
|
146
146
|
<div>
|
|
147
|
-
<h3 className="font-semibold text-
|
|
148
|
-
<p className="text-
|
|
147
|
+
<h3 className="font-semibold text-sec-700">Venue</h3>
|
|
148
|
+
<p className="text-sec-900">{event.event_venue || 'TBA'}</p>
|
|
149
149
|
</div>
|
|
150
150
|
<div>
|
|
151
|
-
<h3 className="font-semibold text-
|
|
152
|
-
<p className="text-
|
|
151
|
+
<h3 className="font-semibold text-sec-700">Participants</h3>
|
|
152
|
+
<p className="text-sec-900">{event.event_participants || 'TBA'}</p>
|
|
153
153
|
</div>
|
|
154
154
|
<div>
|
|
155
|
-
<h3 className="font-semibold text-
|
|
156
|
-
<p className="text-
|
|
155
|
+
<h3 className="font-semibold text-sec-700">Event Code</h3>
|
|
156
|
+
<p className="text-sec-900 font-mono">{event.event_code}</p>
|
|
157
157
|
</div>
|
|
158
158
|
</div>
|
|
159
159
|
|
|
160
160
|
{event.event_news && (
|
|
161
161
|
<div>
|
|
162
|
-
<h3 className="font-semibold text-
|
|
163
|
-
<p className="text-
|
|
162
|
+
<h3 className="font-semibold text-sec-700 mb-2">Event News</h3>
|
|
163
|
+
<p className="text-sec-900">{event.event_news}</p>
|
|
164
164
|
</div>
|
|
165
165
|
)}
|
|
166
166
|
</div>
|
|
@@ -177,20 +177,20 @@ export function PublicPageUsageExample() {
|
|
|
177
177
|
size="2xl"
|
|
178
178
|
className="rounded-lg shadow-lg"
|
|
179
179
|
/>
|
|
180
|
-
<p className="mt-4 text-sm text-
|
|
180
|
+
<p className="mt-4 text-sm text-sec-600">Event Logo</p>
|
|
181
181
|
</div>
|
|
182
182
|
</div>
|
|
183
183
|
</div>
|
|
184
184
|
|
|
185
185
|
{/* Recipe Grid Report Content */}
|
|
186
186
|
<div className="mb-12">
|
|
187
|
-
<div className="bg-
|
|
188
|
-
<h3 className="font-semibold text-
|
|
189
|
-
<p className="text-
|
|
187
|
+
<div className="bg-main-50 border border-main-200 rounded-lg p-6">
|
|
188
|
+
<h3 className="font-semibold text-main-900 mb-2">Recipe Grid Report</h3>
|
|
189
|
+
<p className="text-main-800">
|
|
190
190
|
This is where your recipe grid report content would go.
|
|
191
191
|
The public page is now working correctly without authentication context conflicts.
|
|
192
192
|
</p>
|
|
193
|
-
<div className="mt-4 text-sm text-
|
|
193
|
+
<div className="mt-4 text-sm text-main-700">
|
|
194
194
|
<p><strong>Event Code:</strong> {eventCode}</p>
|
|
195
195
|
<p><strong>Event ID:</strong> {event.event_id}</p>
|
|
196
196
|
<p><strong>Event Name:</strong> {event.event_name}</p>
|
|
@@ -200,9 +200,9 @@ export function PublicPageUsageExample() {
|
|
|
200
200
|
|
|
201
201
|
{/* Event Footer Information */}
|
|
202
202
|
{event.event_footer && (
|
|
203
|
-
<div className="bg-
|
|
204
|
-
<h3 className="font-semibold text-
|
|
205
|
-
<p className="text-
|
|
203
|
+
<div className="bg-sec-50 rounded-lg p-6">
|
|
204
|
+
<h3 className="font-semibold text-sec-900 mb-2">Additional Information</h3>
|
|
205
|
+
<p className="text-sec-700">{event.event_footer}</p>
|
|
206
206
|
</div>
|
|
207
207
|
)}
|
|
208
208
|
</main>
|