Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions frontend/src/history.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,18 +210,19 @@ export async function loadHistory(): Promise<void> {
// Issue #344 T3: skeleton rows for the purchase-history table. 8
// rows matches the typical first-page row count so the skeleton
// doesn't shrink dramatically when real data arrives. Column count
// (11) mirrors the rendered table headers in renderHistoryList:
// (12) mirrors the rendered table headers in renderHistoryList:
// Status / Date / Provider / Service / Type / Region / Count /
// Term / Upfront Cost / Monthly Savings / Plan.
// Term / Upfront Cost / Monthly Cost / Monthly Savings / Plan.
const listEl = document.getElementById('history-list');
if (listEl) showSkeletonRows(listEl, 8, 11);
// Pending-approval queue card (issue #340 sub-task): 3 rows x 8
// cols matches the queue table shape (Date / Provider / Service /
// Count / Upfront / Monthly Savings / Created by / Actions). The
// queue is typically much shorter than the full history list, so
// 3 rows is a sensible skeleton size.
if (listEl) showSkeletonRows(listEl, 8, 12);
// Pending-approval queue card (issue #340 sub-task): 3 rows x 12
// cols matches the queue table shape (Date / Account / Provider /
// Service / Count / Term / Payment / Monthly Cost / Upfront Cost /
// Monthly Savings / Created by / Actions). The queue is typically
// much shorter than the full history list, so 3 rows is a sensible
// skeleton size.
const queueEl = document.getElementById('purchases-approval-queue');
if (queueEl) showSkeletonRows(queueEl, 3, 8);
if (queueEl) showSkeletonRows(queueEl, 3, 12);

try {
// Provider/account filters live in state.ts now (mutated by topbar chips).
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/inventory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export async function loadActiveCommitments(): Promise<void> {
// account chip is single-select; forward only when exactly one is active.
const accountID = accountIDs.length === 1 ? accountIDs[0] : undefined;

// 5 rows × 10 cols matches the rendered table shape (see
// 5 rows × 11 cols matches the rendered table shape (see
// renderActiveCommitmentsTable). The renderer wipes the container's
// children for a clean handoff from the skeleton.
showSkeletonRows(container, 5, ACTIVE_COMMITMENTS_COLS);
Expand Down
Loading