Add debug logging to team loading
This commit is contained in:
parent
4fdb7fca94
commit
8de677ad9e
1 changed files with 5 additions and 2 deletions
|
|
@ -493,17 +493,20 @@ const Portal = {
|
|||
|
||||
// Load team
|
||||
async loadTeam() {
|
||||
console.log('[Portal] Loading team...');
|
||||
console.log('[Portal] Loading team for business:', this.config.businessId);
|
||||
const tbody = document.getElementById('teamTableBody');
|
||||
tbody.innerHTML = '<tr><td colspan="5" class="empty-state">Loading team...</td></tr>';
|
||||
|
||||
try {
|
||||
const response = await fetch(`${this.config.apiBaseUrl}/portal/team.cfm`, {
|
||||
const url = `${this.config.apiBaseUrl}/portal/team.cfm`;
|
||||
console.log('[Portal] Fetching team from:', url);
|
||||
const response = await fetch(url, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ BusinessID: this.config.businessId })
|
||||
});
|
||||
const data = await response.json();
|
||||
console.log('[Portal] Team response:', data);
|
||||
|
||||
if (data.OK && data.TEAM) {
|
||||
if (data.TEAM.length === 0) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue