From caa0bdea5cf8b32ccabcb336f09b8456f64beca6 Mon Sep 17 00:00:00 2001 From: K Date: Mon, 11 Dec 2023 17:02:45 +0300 Subject: [PATCH] lab_3(full) --- js/lines.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/js/lines.js b/js/lines.js index 25a163c..af23499 100644 --- a/js/lines.js +++ b/js/lines.js @@ -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);