Oprava plnění data a času poslední aktualizace menu
All checks were successful
ci/woodpecker/push/workflow Pipeline was successful
All checks were successful
ci/woodpecker/push/workflow Pipeline was successful
This commit is contained in:
parent
d767730b19
commit
42852805e0
@ -115,6 +115,7 @@ export async function getRestaurantMenu(restaurant: Restaurant, date?: Date, for
|
||||
const sladovnickaFood = await getMenuSladovnicka(firstDay, mock);
|
||||
for (let i = 0; i < sladovnickaFood.length; i++) {
|
||||
weekMenu[i][restaurant]!.food = sladovnickaFood[i];
|
||||
weekMenu[i][restaurant]!.lastUpdate = now;
|
||||
// Velice chatrný a nespolehlivý způsob detekce uzavření...
|
||||
if (sladovnickaFood[i].length === 1 && sladovnickaFood[i][0].name.toLowerCase() === 'pro daný den nebyla nalezena denní nabídka') {
|
||||
weekMenu[i][restaurant]!.closed = true;
|
||||
@ -142,6 +143,7 @@ export async function getRestaurantMenu(restaurant: Restaurant, date?: Date, for
|
||||
const techTowerFood = await getMenuTechTower(firstDay, mock);
|
||||
for (let i = 0; i < techTowerFood.length; i++) {
|
||||
weekMenu[i][restaurant]!.food = techTowerFood[i];
|
||||
weekMenu[i][restaurant]!.lastUpdate = now;
|
||||
if (techTowerFood[i]?.length === 1 && techTowerFood[i][0].name.toLowerCase() === 'svátek') {
|
||||
weekMenu[i][restaurant]!.closed = true;
|
||||
}
|
||||
@ -155,6 +157,7 @@ export async function getRestaurantMenu(restaurant: Restaurant, date?: Date, for
|
||||
const zastavkaUmichalaFood = await getMenuZastavkaUmichala(firstDay, mock);
|
||||
for (let i = 0; i < zastavkaUmichalaFood.length; i++) {
|
||||
weekMenu[i][restaurant]!.food = zastavkaUmichalaFood[i];
|
||||
weekMenu[i][restaurant]!.lastUpdate = now;
|
||||
if (zastavkaUmichalaFood[i]?.length === 1 && zastavkaUmichalaFood[i][0].name === 'Pro tento den není uveřejněna nabídka jídel.') {
|
||||
weekMenu[i][restaurant]!.closed = true;
|
||||
}
|
||||
@ -171,6 +174,7 @@ export async function getRestaurantMenu(restaurant: Restaurant, date?: Date, for
|
||||
break;
|
||||
}
|
||||
weekMenu[i][restaurant]!.food = senkSerikovaFood[i];
|
||||
weekMenu[i][restaurant]!.lastUpdate = now;
|
||||
if (senkSerikovaFood[i]?.length === 1 && senkSerikovaFood[i][0].name === 'Pro tento den nebylo zadáno menu.') {
|
||||
weekMenu[i][restaurant]!.closed = true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user