Inputs.table(
reportdb.sql`
SELECT DISTINCT cup AS CUP,
finanziamento_pnrr AS "Valore PNRR (€)",
sintesi_progetto AS "Descrizione",
cup_codice_natura
FROM report
ORDER BY finanziamento_pnrr DESC
LIMIT 5;
`,
{
locale: "it-IT",
height: "100%",
width: {
CUP: "15%",
"Valore PNRR (€)": "15%",
Descrizione: "50%",
cup_codice_natura: "20%"
},
format: {
CUP: (CUP, i, data) => {
return data[i].cup_codice_natura === "03"
? htl.html`<a href="http://miosito.it/${CUP}" target="_blank">${CUP}</a>`
: CUP;
},
Descrizione: (d) => htl.html`<span style="white-space:normal">${d}`
}
}
)