fixes and patches n stuff
This commit is contained in:
parent
7c7ae8e051
commit
1af973d001
14 changed files with 571 additions and 268 deletions
|
|
@ -59,8 +59,13 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
const data = await res.json();
|
||||
|
||||
if (data.success && data.units && data.units.length > 0) {
|
||||
selectUnit.innerHTML = '<option value="">Seçiniz...</option>' +
|
||||
data.units.map(u => `<option value="${u.id}">${u.name}</option>`).join('');
|
||||
selectUnit.innerHTML = '<option value="">Seçiniz...</option>';
|
||||
data.units.forEach(u => {
|
||||
const opt = document.createElement('option');
|
||||
opt.value = u.id;
|
||||
opt.textContent = u.name;
|
||||
selectUnit.appendChild(opt);
|
||||
});
|
||||
selectUnit.disabled = false;
|
||||
} else {
|
||||
selectUnit.innerHTML = '<option value="">Ünite bulunamadı</option>';
|
||||
|
|
@ -93,8 +98,13 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
const data = await res.json();
|
||||
|
||||
if (data.success && data.topics && data.topics.length > 0) {
|
||||
selectTopic.innerHTML = '<option value="">Seçiniz...</option>' +
|
||||
data.topics.map(t => `<option value="${t.id}">${t.name}</option>`).join('');
|
||||
selectTopic.innerHTML = '<option value="">Seçiniz...</option>';
|
||||
data.topics.forEach(t => {
|
||||
const opt = document.createElement('option');
|
||||
opt.value = t.id;
|
||||
opt.textContent = t.name;
|
||||
selectTopic.appendChild(opt);
|
||||
});
|
||||
selectTopic.disabled = false;
|
||||
} else {
|
||||
selectTopic.innerHTML = '<option value="">Konu bulunamadı</option>';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue