Situational Judgement Test
Contribute to the research: Try a free SJT.
// 1. Initialize Supabase const { createClient } = supabase; const supabaseUrl = 'https://yrwipfthycrkvsyfjrfj.supabase.co'; const supabaseKey = 'sb_publishable_qdKCTleFF6KTQ9LyHbmokA_B0FQnrpA'; const supabaseDb = createClient(supabaseUrl, supabaseKey); // 2. Create the save function async function saveToSupabase(userData) { const { data, error } = await supabaseDb .from('sj_responses') .insert([ { scenario_id: 'SJ_30', // Or dynamically pull this if you have multiple uncoached_response: userData.step1, curiosity_notes: userData.step2, connections_notes: userData.step3, value_creation_choice: userData.step4, character_choice: userData.step5, coached_response: userData.step6 } ]); if (error) { console.error('Error saving to Supabase:', error); alert("There was an error saving your record."); } else { console.log('Successfully saved:', data); // Add logic here to show a success message or trigger the PDF download } }
Contribute to the research: Try a free SJT.