Add consulting slots display with Join Meet button
- Member OrderDetail page: Shows consulting slots with date/time and Join Meet button - Admin Orders dialog: Shows consulting slots with meet link access - Meet button only visible when payment_status is 'paid' - Both pages show slot status (confirmed/pending) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -229,18 +229,31 @@ serve(async (req: Request): Promise<Response> => {
|
||||
console.log("Creating event in calendar:", calendarId);
|
||||
console.log("Event data:", JSON.stringify(eventData, null, 2));
|
||||
|
||||
// Create event via Google Calendar API
|
||||
const calendarResponse = await fetch(
|
||||
`https://www.googleapis.com/calendar/v3/calendars/${encodeURIComponent(calendarId)}/events?conferenceDataVersion=1`,
|
||||
{
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Authorization": `Bearer ${accessToken}`,
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify(eventData),
|
||||
}
|
||||
);
|
||||
// Create event via Google Calendar API with better error handling
|
||||
let calendarResponse: Response;
|
||||
try {
|
||||
calendarResponse = await fetch(
|
||||
`https://www.googleapis.com/calendar/v3/calendars/${encodeURIComponent(calendarId)}/events?conferenceDataVersion=1`,
|
||||
{
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Authorization": `Bearer ${accessToken}`,
|
||||
"Content-Type": "application/json",
|
||||
"User-Agent": "Deno/1.0 (Supabase Edge Function)",
|
||||
},
|
||||
body: JSON.stringify(eventData),
|
||||
}
|
||||
);
|
||||
} catch (fetchError: any) {
|
||||
console.error("Network error calling Google Calendar API:", fetchError);
|
||||
return new Response(
|
||||
JSON.stringify({
|
||||
success: false,
|
||||
message: "Network error calling Google Calendar API: " + fetchError.message
|
||||
}),
|
||||
{ status: 500, headers: { ...corsHeaders, "Content-Type": "application/json" } }
|
||||
);
|
||||
}
|
||||
|
||||
console.log("Calendar API response status:", calendarResponse.status);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user