3 Commits

Author SHA1 Message Date
dwindown
d0d824a661 Simplify calendar cleanup: handle in SQL function, remove HTTP dependency
Due to Docker networking limitations between supabase-db and supabase-edge-functions
containers, automatic HTTP triggering of the edge function is not possible.

Changes:
- Updated cancel_expired_consulting_orders_sql() to also clear calendar_event_id
- This prevents stale references in the database
- Removed Task 2 dependency documentation (not workable without HTTP access)
- Edge function trigger-calendar-cleanup still available for manual triggering

To manually clean up Google Calendar events:
curl -X POST https://your-project.supabase.co/functions/v1/trigger-calendar-cleanup

Coolify Tasks:
- Task 1: Keep (works fine with psql)
- Task 2: DELETE (HTTP between containers doesn't work)
- Task 3: DELETE (deprecated duplicate)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-11 23:27:18 +07:00
dwindown
e268ef7756 Update calendar cleanup task documentation
Clarify that Task 2 must run on supabase-db service which has curl/wget.
The supabase-edge-functions service doesn't have curl, wget, or deno CLI available.

Command for Task 2 (run on supabase-db):
curl -X POST http://supabase-edge-functions:8000/functions/v1/trigger-calendar-cleanup

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-11 23:23:33 +07:00
dwindown
ac88e17856 Improve cancelled order display and add notes to order detail
- Add "Catatan" field display in consulting order detail page
- Add dedicated "Cancelled Order" section with rebooking option
- Update status alert to show proper message for cancelled orders
- Refactor edge function to focus on calendar cleanup only
- Set payment_status to 'failed' when auto-cancelling expired orders

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 21:36:01 +07:00