aadsad
This commit is contained in:
@@ -9,6 +9,17 @@ function esc(s = '') {
|
|||||||
.replace(/'/g, ''');
|
.replace(/'/g, ''');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function formatVersionDate(value) {
|
||||||
|
if (!value) return '';
|
||||||
|
try {
|
||||||
|
const date = new Date(value);
|
||||||
|
if (Number.isNaN(date.getTime())) return value;
|
||||||
|
return date.toLocaleString('de-DE');
|
||||||
|
} catch {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function normalizeApiName(v = '') {
|
function normalizeApiName(v = '') {
|
||||||
return String(v)
|
return String(v)
|
||||||
.trim()
|
.trim()
|
||||||
@@ -225,8 +236,9 @@ export async function loadList(section) {
|
|||||||
selectEl.disabled = false;
|
selectEl.disabled = false;
|
||||||
items.forEach(item => {
|
items.forEach(item => {
|
||||||
const opt = document.createElement('option');
|
const opt = document.createElement('option');
|
||||||
|
const label = `#${item.version_no} – ${formatVersionDate(item.created_at)}` + (Number(item.is_active) === 1 ? ' (aktiv)' : '');
|
||||||
opt.value = String(item.id);
|
opt.value = String(item.id);
|
||||||
opt.textContent = `#${item.version_no}` + (Number(item.is_active) === 1 ? ' (aktiv)' : '');
|
opt.textContent = label;
|
||||||
selectEl.appendChild(opt);
|
selectEl.appendChild(opt);
|
||||||
});
|
});
|
||||||
if (activeId) selectEl.value = activeId;
|
if (activeId) selectEl.value = activeId;
|
||||||
|
|||||||
Reference in New Issue
Block a user