← back to Interiordesignershowroom
IDS admin: record CJ account identifiers on Affiliates tab (TK-10171)
8fb23cd25df56f54f411a323d5facb271cef4416 · 2026-08-03 09:17:20 -0700 · Steve
Adds a CJ Account reference bar to /admin/affiliates from data/cj-account.json:
login steve@designerwallcoverings.com, CID 7896980, live-link PID 101848244
(all evidence-confirmed). 1062321 shown as 'unverified' — it matches neither the
CID nor the PID in the live click-[PID]-[AID] tracking links, so it is NOT wired
into anything pending confirmation under CJ Account > Websites.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Files touched
Diff
commit 8fb23cd25df56f54f411a323d5facb271cef4416
Author: Steve <steve@designerwallcoverings.com>
Date: Mon Aug 3 09:17:20 2026 -0700
IDS admin: record CJ account identifiers on Affiliates tab (TK-10171)
Adds a CJ Account reference bar to /admin/affiliates from data/cj-account.json:
login steve@designerwallcoverings.com, CID 7896980, live-link PID 101848244
(all evidence-confirmed). 1062321 shown as 'unverified' — it matches neither the
CID nor the PID in the live click-[PID]-[AID] tracking links, so it is NOT wired
into anything pending confirmation under CJ Account > Websites.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
routes/admin.js | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/routes/admin.js b/routes/admin.js
index d498601..117a0a2 100644
--- a/routes/admin.js
+++ b/routes/admin.js
@@ -32,6 +32,24 @@ function loadSuggestions() {
} catch (_) { return []; }
}
+// Confirmed CJ account identifiers (data/cj-account.json), shown on the Affiliates
+// admin as a reference bar. Read live; absent/broken file just hides the bar.
+function loadCjAccount() {
+ try { return JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'data', 'cj-account.json'), 'utf8')); }
+ catch (_) { return null; }
+}
+function cjAccountBar() {
+ const a = loadCjAccount();
+ if (!a) return '';
+ const cell = (k, v, unverified) => v
+ ? `<span style="margin-right:18px"><span class="net">${esc(k)}</span> <b>${esc(v)}</b>${unverified ? ' <span class="pill off" title="Provided but not yet confirmed under CJ Account > Websites — matches neither the CID nor the live-link PID">unverified</span>' : ''}</span>`
+ : '';
+ return `<div style="background:#fff;border:1px solid var(--line);border-radius:6px;padding:10px 14px;margin:0 0 16px;font-size:.85rem">
+ <b style="font-size:.72rem;text-transform:uppercase;letter-spacing:.05em;color:#6b6259;margin-right:14px">CJ Account</b>
+ ${cell('Login', a.login_email)}${cell('CID', a.cid)}${cell('Link PID', a.link_pid)}${cell('PID (given)', a.unverified_pid, true)}
+ </div>`;
+}
+
// Sub-nav for the Affiliates section: two tabs, current one highlighted.
function affiliateTabs(active) {
const tab = (href, label, on) =>
@@ -527,6 +545,7 @@ router.get('/admin/affiliates', async (_req, res, next) => {
res.send(shell(`
<h1 style="font-size:1.15rem;margin:0 0 4px">Affiliates</h1>
${affiliateTabs('active')}
+ ${cjAccountBar()}
${intro}
<h2>Networks — master switch per program</h2>
<table>
@@ -607,6 +626,7 @@ router.get('/admin/affiliates/suggested', async (req, res, next) => {
res.send(shell(`
<h1 style="font-size:1.15rem;margin:0 0 4px">Affiliates</h1>
${affiliateTabs('suggested')}
+ ${cjAccountBar()}
${intro}
${chips}
<table>
← 770915b admin: keyword line-hider with preview — catch a line across
·
back to Interiordesignershowroom
·
IDS admin: confirm CJ PID 101848244, drop bogus 1062321 (TK- 33bf504 →