lab_3(full)

This commit is contained in:
Milana Ievlewa 2023-12-11 17:02:45 +03:00
parent 81aac2f8ec
commit caa0bdea5c

View File

@ -240,11 +240,7 @@ export async function UpdateCollection() {
const data = await getAllLines();
data.forEach((item) => {
document.addEventListener("DOMContentLoaded", async (event) => {
event.preventDefault();
event.stopPropagation();
});
data.forEach((item) => {
const div0 = document.createElement("div");
div0.setAttribute("class", "col-md-3 product my-2");
@ -268,13 +264,17 @@ export async function UpdateCollection() {
div3.appendChild(h2);
const p1 = document.createElement("p");
p1.textContent = item.data;
p1.textContent = "Дата: " + item.date;
div3.appendChild(p1);
const p2 = document.createElement("p");
p1.textContent = item.price + "$";
p2.textContent = "Цена: " + item.price + "₽";
div3.appendChild(p2);
const p3 = document.createElement("p");
p3.textContent = item.places.name;
div3.appendChild(p3);
div0.appendChild(div2);
div0.appendChild(div3);