You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 17
Next »
مستندات اعتباربخشی
| محور |
زیرمحور |
کمیته |
عنوان سند |
نوع سند |
تاریخ ثبت اولیه |
تاریخ آخرین بازنگری |
تاریخ ویرایش |
کد ویرایش |
فایل |
async function loadArchive() {
const pageIdArchive = "85045557";
const archiveName = "archive.json";
const res = await fetch(`/rest/api/content/${pageIdArchive}/child/attachment?filename=${archiveName}`, {
credentials: 'include',
headers: { 'Accept': 'application/json' }
});
const data = await res.json();
if (!data.results || !data.results.length) return [];
const txt = await fetch(data.results[0]._links.download, {
credentials: 'include'
}).then(r => r.text());
return JSON.parse(txt);
}
async function populateArchiveTable() {
const tbody = document.getElementById('archiveBody');
tbody.innerHTML = "";
const archive = await loadArchive();
archive.forEach(r => {
const tr = document.createElement("tr");
tr.innerHTML = `
${r.mahvar || "-"} |
${r.zirmohvar || "-"} |
${r.komiteh || "-"} |
${r.document_name || "-"} |
${r.noe_sanad || "-"} |
${r.date_last_edit || "-"} |
${r.date_revision || "-"} |
${r.date_update || "-"} |
${r.revision_code || "00"} |
دانلود |
`;
tbody.appendChild(tr);
});
}
document.addEventListener("DOMContentLoaded", populateArchiveTable);