Skip to content

Commit

Permalink
#41 name=Unknown 인 데이터에 수정 버튼 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Ag-crane committed Aug 22, 2023
1 parent 5470a9c commit d98b74a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
11 changes: 11 additions & 0 deletions WWW/src/assets/css/shared/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions WWW/src/assets/js/datas.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function sendSearchData () {
row.innerHTML = `
<td>${index + 1}</td>
<td>${item.satelliteId}</td>
<td>${item.name}</td>
<td>${item.name === 'UNKNOWN' ? 'UNKNOWN <button type="button" id="unknown-btn" onclick="modifyRow()">수정</button>' : item.name}</td>
<td>${item.info === null ? '-' : item.info}</td>
<td><label class="badge badge-danger">${
item.classification
Expand Down Expand Up @@ -97,16 +97,20 @@ function fetchData (pageNumber) {
return res.json()
})
.then(data => {


hideSpinner()

document.getElementById('data-list-table').innerHTML = '' // Clear existing data
data.content.forEach((item, index) => {


const row = document.createElement('tr')
row.addEventListener('click', () => openModal(item))
row.innerHTML = `
<td>${index + 1}</td>
<td>${item.satelliteId}</td>
<td>${item.name}</td>
<td>${item.name === 'UNKNOWN' ? 'UNKNOWN <button type="button" id="unknown-btn" onclick="modifyRow()">수정</button>' : item.name}</td>
<td>${item.info === null ? '-' : item.info}</td>
<td><label class="badge badge-danger">${
item.classification
Expand Down

0 comments on commit d98b74a

Please sign in to comment.