+ package enumeration
This commit is contained in:
parent
fc4a23c9c4
commit
3ff123a285
|
@ -40,6 +40,16 @@ window.addEventListener("load", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
request("packages", {}).then((res) => {
|
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);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -37,6 +37,19 @@
|
||||||
<input type="submit">
|
<input type="submit">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</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>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue