Příprava Pizza Day
This commit is contained in:
@@ -67,11 +67,9 @@ const downloadPizzy = async () => {
|
||||
const sizes: PizzaSize[] = [];
|
||||
const a = $('.varianty > li > a', pizzaHtml);
|
||||
a.each((i, elm) => {
|
||||
// TODO nedoděláno
|
||||
// const size = $('span', elm).text();
|
||||
// const priceKc = $(elm).text().split(size).pop().trim();
|
||||
// const price = Number.parseInt(priceKc.split(" Kč")[0]);
|
||||
// sizes.push({ size: size, pizzaPrice: price, boxPrice: boxPrices[size], price: price + boxPrices[size] });
|
||||
const size = $($(elm).contents().get(0)).text().trim();
|
||||
const price = Number.parseInt($($(elm).contents().get(1)).text().trim().split(" Kč")[0]);
|
||||
sizes.push({ size: size, pizzaPrice: price, boxPrice: boxPrices[size], price: price + boxPrices[size] });
|
||||
})
|
||||
result.push({
|
||||
name: name,
|
||||
|
||||
Reference in New Issue
Block a user