+ package enumeration

This commit is contained in:
Dominika Liberda 2020-10-05 19:31:41 +02:00
parent fc4a23c9c4
commit 3ff123a285
2 changed files with 25 additions and 2 deletions

View file

@ -40,6 +40,16 @@ window.addEventListener("load", () => {
});
request("packages", {}).then((res) => {
console.log(res);
const table = document.querySelector("tbody")!;
res.forEach((i: any) => {
let row = table.insertRow();
let id = row.insertCell(1);
let sender = row.insertCell(2);
let status = row.insertCell(3);
id.innerHTML = i.shipmentNumber;
sender.innerHTML = i.senderName;
status.innerHTML = i.status;
console.log(i);
});
});
});

View file

@ -37,6 +37,19 @@
<input type="submit">
</form>
</div>
<div class="package-list"></div>
<div class="package-list">
<table>
<thead>
<tr>
<th></th>
<th>Package number</th>
<th>Sender</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</body>
</html>