payfrit-works/kds/debug.html
John Mizerek 0765dc1e27 Add business portal, Stripe Connect, beacon APIs, and task system
Portal:
- New business portal UI (portal/index.html, portal.css, portal.js)
- Dashboard with real-time stats (orders today, revenue, pending, menu items)
- Business info endpoint (api/businesses/get.cfm)
- Portal stats endpoint (api/portal/stats.cfm)
- Menu page links to existing full-featured menu editor

Stripe Connect:
- Onboarding endpoint (api/stripe/onboard.cfm)
- Status check endpoint (api/stripe/status.cfm)
- Payment intent creation (api/stripe/createPaymentIntent.cfm)
- Webhook handler (api/stripe/webhook.cfm)

Beacon APIs:
- List all beacons (api/beacons/list_all.cfm)
- Get business from beacon (api/beacons/getBusinessFromBeacon.cfm)

Task System:
- List pending tasks (api/tasks/listPending.cfm)
- Accept task (api/tasks/accept.cfm)

Other:
- HUD interface for quick order status display
- KDS debug/test pages
- Updated Application.cfm with public endpoint allowlist
- Order status check improvements

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 23:38:26 -08:00

51 lines
1.7 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>KDS Debug</title>
<style>
body { font-family: monospace; padding: 20px; background: #1a1a1a; color: #fff; }
pre { background: #2a2a2a; padding: 15px; border-radius: 8px; overflow: auto; }
button { padding: 10px 20px; margin: 10px 0; }
</style>
</head>
<body>
<h1>KDS Debug - Raw Data Viewer</h1>
<label>Business ID: <input type="number" id="businessId" value="1" /></label><br>
<label>Service Point ID: <input type="number" id="servicePointId" value="" placeholder="Optional" /></label><br>
<button onclick="fetchData()">Fetch Orders</button>
<h2>Raw Response:</h2>
<pre id="output">Click "Fetch Orders" to load data...</pre>
<script>
async function fetchData() {
const businessId = parseInt(document.getElementById('businessId').value) || 0;
const servicePointId = parseInt(document.getElementById('servicePointId').value) || 0;
try {
const response = await fetch('/biz.payfrit.com/api/orders/listForKDS.cfm', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
BusinessID: businessId,
ServicePointID: servicePointId
})
});
const data = await response.json();
document.getElementById('output').textContent = JSON.stringify(data, null, 2);
// Also log to console
console.log('Orders data:', data);
if (data.ORDERS && data.ORDERS.length > 0) {
console.log('First order line items:', data.ORDERS[0].LineItems);
}
} catch (error) {
document.getElementById('output').textContent = 'Error: ' + error.message;
console.error('Fetch error:', error);
}
}
</script>
</body>
</html>