testing-20250123 #6
@ -1654,8 +1654,18 @@ async function buildApprovalTableHtml(approvalTxs, getNameFunc) {
|
||||
// Format the transaction timestamp
|
||||
const dateStr = new Date(tx.timestamp).toLocaleString()
|
||||
|
||||
// Check whether this is the current user
|
||||
const isCurrentUser =
|
||||
userState &&
|
||||
userState.accountName &&
|
||||
adminName &&
|
||||
adminName.toLowerCase() === userState.accountName.toLowerCase();
|
||||
// If it's the current user, highlight the row (change to any color/style you prefer)
|
||||
const rowStyle = isCurrentUser
|
||||
? "background: rgba(178, 255, 89, 0.2);" // light green highlight
|
||||
: "";
|
||||
return `
|
||||
<tr>
|
||||
<tr style="${rowStyle}">
|
||||
<td style="border: 1px solid rgb(255, 255, 255); padding: 4px; color: dodgerblue">${displayName}</td>
|
||||
<td style="border: 1px solid rgb(255, 254, 254); padding: 4px;">${dateStr}</td>
|
||||
</tr>
|
||||
@ -1669,6 +1679,8 @@ async function buildApprovalTableHtml(approvalTxs, getNameFunc) {
|
||||
// 4) Wrap the table in a container with horizontal scroll:
|
||||
// 1) max-width: 100% makes it fit the parent (card) width
|
||||
// 2) overflow-x: auto allows scrolling if the table is too wide
|
||||
|
||||
// TODO - if "Admin Name" == userState.accountName, then table row should be highlighted
|
||||
const containerHtml = `
|
||||
<div style="max-width: 100%; overflow-x: auto;">
|
||||
<table style="border: 1px solid #ccc; border-collapse: collapse; width: 100%;">
|
||||
|
Loading…
x
Reference in New Issue
Block a user