/home/techb158/trello.abdallabala.com/public
NameSizeModeActions
assets/-0777rm
.htaccess5330644editdlrm
authorize.html10090666editdlrm
board-dashboard.html7990666editdlrm
board-dashboard.js18510666editdlrm
card-section.html5330666editdlrm
card-section.js19520666editdlrm
client-utils.js15910666editdlrm
index.html5570666editdlrm
index.php71400644editdlrm
powerup.js29410666editdlrm
risk-modal.html54550666editdlrm
risk-modal.js46560666editdlrm
settings.html11130666editdlrm
settings.js10170666editdlrm
styles.css23340666editdlrm
Edit: /home/techb158/trello.abdallabala.com/public/card-section.js (1952B)
import { escapeHtml, powerUpOptions, statusClass } from './client-utils.js'; const t = window.TrelloPowerUp.iframe(powerUpOptions()); const content = document.getElementById('content'); function renderEmpty() { content.innerHTML = `

No risk assessment yet

Use the Assess AI Risk button to calculate a COSMIC risk score for this card.

`; document.getElementById('assess').addEventListener('click', () => { t.modal({ title: 'COSMIC Risk Assessment', url: './risk-modal.html', height: 720 }); }); } function renderRisk(risk) { const highest = risk.highestRisk; const reasons = risk.gate?.blockingReasons || []; content.innerHTML = `
${risk.score}
${escapeHtml(risk.status)} ${risk.gate?.deploymentReady ? 'Deployment ready' : 'Deployment blocked'}

${escapeHtml(risk.interpretation)}

${highest ? `
Highest risk: ${escapeHtml(highest.title)}
Dimension: ${escapeHtml(highest.dimension)}. Residual score: ${Math.round(highest.residualScore)}.
` : ''} ${reasons.length ? `

Blocking criteria

` : ''}
`; document.getElementById('edit-risk').addEventListener('click', () => { t.modal({ title: 'COSMIC Risk Assessment', url: './risk-modal.html', height: 720 }); }); } async function load() { const risk = await t.get('card', 'shared', 'cosmicRisk'); if (!risk) renderEmpty(); else renderRisk(risk); t.sizeTo('#content'); } t.render(load);