File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ export async function load({ params, locals }) {
88 const { data : userRecord } = await supabase . auth . getUser ( ) ;
99 const user = userRecord ? userRecord . user : null ;
1010
11+ console . log ( Date . now ( ) , 'Loading org layout' , params . orgid ) ;
12+
1113 // Find the org corresponding to the orgid or the path string
1214 let { data : org } = isValidUUID ( params . orgid )
1315 ? await supabase . from ( 'orgs' ) . select ( '*' ) . eq ( 'id' , params . orgid ) . single ( )
@@ -20,6 +22,8 @@ export async function load({ params, locals }) {
2022 } ) ;
2123 }
2224
25+ console . log ( Date . now ( ) , 'Loading org data' ) ;
26+
2327 const profileQuery = supabase
2428 . from ( 'profiles' )
2529 . select ( '*' )
@@ -74,6 +78,8 @@ export async function load({ params, locals }) {
7478 processesQuery
7579 ] ) ;
7680
81+ console . log ( Date . now ( ) , 'Returning org data' ) ;
82+
7783 return {
7884 org,
7985 uid : user ? user . id : null ,
Original file line number Diff line number Diff line change @@ -2,8 +2,12 @@ import Organization from '$database/Organization.js';
22import { error } from '@sveltejs/kit' ;
33
44export async function load ( { parent, params } ) {
5+ console . log ( Date . now ( ) , 'Awaiting change parent data.' ) ;
6+
57 const { supabase, org } = await parent ( ) ;
68
9+ console . log ( Date . now ( ) , 'Loading change data' ) ;
10+
711 const [
812 { data : change , error : changeError } ,
913 { data : roles } ,
@@ -21,6 +25,8 @@ export async function load({ parent, params }) {
2125 message : 'Unable to retrieve this change.' + changeError ?. message || ''
2226 } ) ;
2327
28+ console . log ( Date . now ( ) , 'Returning change data' ) ;
29+
2430 return {
2531 change,
2632 roles,
You can’t perform that action at this time.
0 commit comments