From d72e20b067f345a830f54c2abf237e92726cc241 Mon Sep 17 00:00:00 2001 From: sudoer777 <78781902+sudoer777@users.noreply.github.com> Date: Thu, 2 Dec 2021 13:26:29 -0700 Subject: [PATCH] Add name column to account management interface --- public/scripts/manage.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/public/scripts/manage.js b/public/scripts/manage.js index 2ab7cbd..f6fd2fe 100644 --- a/public/scripts/manage.js +++ b/public/scripts/manage.js @@ -302,6 +302,10 @@ CATEGORIES.push(new Category( async function listAccountHeaders() { const headerRow = document.createElement('tr'); + const nameHeader = document.createElement('th'); + nameHeader.textContent = "Name"; + headerRow.appendChild(nameHeader); + const emailHeader = document.createElement('th'); emailHeader.textContent = "Email"; headerRow.appendChild(emailHeader); @@ -316,7 +320,11 @@ CATEGORIES.push(new Category( itemsListTable.appendChild(headerRow); }, - function listAccount(account, row) { + function listAccount(account, row) { + const nameCell = document.createElement('td'); + nameCell.textContent = account.name; + row.appendChild(nameCell); + const emailCell = document.createElement('td'); emailCell.textContent = account.email; row.appendChild(emailCell);