diff --git a/app/static/assets/js/helper.js b/app/static/assets/js/helper.js index c4733b9..90f3e8d 100644 --- a/app/static/assets/js/helper.js +++ b/app/static/assets/js/helper.js @@ -70,7 +70,7 @@ async function fetchLeases(element) { ` table.appendChild(thead) let tbody = document.createElement('thead'); - x.forEach((o) => { + x.sort((a, b) => new Date(a.lease_expires) - new Date(b.lease_expires)).forEach((o) => { let row = document.createElement('tr'); row.innerHTML = `
${o.lease_ref}