FIX_salesTracker14

This commit is contained in:
sanjeev.p 2026-03-07 11:04:28 +05:30
parent 3fc8509ccc
commit 5515499403

View File

@ -110,8 +110,8 @@ body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-
.table-wrap tbody tr:last-child td { border-bottom: none; } .table-wrap tbody tr:last-child td { border-bottom: none; }
.table-wrap tbody tr:hover td { background: #fafafa; } .table-wrap tbody tr:hover td { background: #fafafa; }
/* Empty row fix for modal table */ /* Empty row fix for modal table */
.table-wrap tbody tr.empty-row { display: table-row; } /* .table-wrap tbody tr.empty-row { display: table-row; }
.table-wrap tbody tr.empty-row td { padding: 0 !important; border: none !important; text-align: center;} .table-wrap tbody tr.empty-row td { padding: 0 !important; border: none !important; text-align: center;} */
/* ═══════════════════════════════════════════ /* ═══════════════════════════════════════════
BUTTONS BUTTONS
@ -298,7 +298,14 @@ body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-
</tr> </tr>
</thead> </thead>
<tbody id="detailTableBody"> <tbody id="detailTableBody">
<tr class="empty-row"><td colspan="3">No targets added yet.</td></tr> <tr class="empty-row">
<td colspan="3">
<div class="empty-state">
<div class="empty-icon">🎯</div>
<p>No targets added yet.</p>
</div>
</td>
</tr>
</tbody> </tbody>
</table> </table>
</div> </div>
@ -445,7 +452,7 @@ body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-
────────────────────────────────────────── */ ────────────────────────────────────────── */
async function renderDetailTable(userId) { async function renderDetailTable(userId) {
const tbody = document.getElementById('detailTableBody'); const tbody = document.getElementById('detailTableBody');
tbody.innerHTML = '<tr><td colspan="3">Loading...</td></tr>'; tbody.innerHTML = `<tr><td colspan="3" style="text-align:center; padding:20px;">⏳ Loading targets...</td></tr>`;
try { try {
const res = await fetch(`${API}/targets/user/${userId}`); const res = await fetch(`${API}/targets/user/${userId}`);
@ -453,7 +460,7 @@ body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-
const records = json.data || []; const records = json.data || [];
if (records.length === 0) { if (records.length === 0) {
tbody.innerHTML = '<tr class="empty-row"><td colspan="3">No targets added yet.</td></tr>'; tbody.innerHTML = '<tr class="empty-row"><td colspan="3"><div class="empty-state"><div class="empty-icon">🎯</div><p>No targets added yet.</p></div></td></tr>';
return; return;
} }
// records.sort((a, b) => b.id - a.id); // records.sort((a, b) => b.id - a.id);