Skrytí podniku U Motlíků
This commit is contained in:
parent
86af490e94
commit
4d2ec529bb
@ -355,7 +355,7 @@ function App() {
|
|||||||
} else {
|
} else {
|
||||||
content = <h3>Chyba načtení dat</h3>
|
content = <h3>Chyba načtení dat</h3>
|
||||||
}
|
}
|
||||||
return <Col md={12} lg={4} className='mt-3'>
|
return <Col md={12} lg={6} className='mt-3'>
|
||||||
<h3>{name}</h3>
|
<h3>{name}</h3>
|
||||||
{menu?.lastUpdate && <small>Poslední aktualizace: {getHumanDateTime(new Date(menu.lastUpdate))}</small>}
|
{menu?.lastUpdate && <small>Poslední aktualizace: {getHumanDateTime(new Date(menu.lastUpdate))}</small>}
|
||||||
{content}
|
{content}
|
||||||
@ -403,12 +403,10 @@ function App() {
|
|||||||
{data.isWeekend ? <h4>Užívejte víkend :)</h4> : <>
|
{data.isWeekend ? <h4>Užívejte víkend :)</h4> : <>
|
||||||
<Alert variant={'primary'}>
|
<Alert variant={'primary'}>
|
||||||
<img src='hat.png' style={{ position: "absolute", width: "100px", rotate: "-45deg", left: -32, top: -40 }} />
|
<img src='hat.png' style={{ position: "absolute", width: "100px", rotate: "-45deg", left: -32, top: -40 }} />
|
||||||
<img src='tree.png' style={{ position: "absolute", height: "140px", right: 0, top: 0 }} />
|
<img src='tree.png' style={{ position: "absolute", height: "90px", right: 0, top: 0 }} />
|
||||||
Poslední změny:
|
Poslední změny:
|
||||||
<ul>
|
<ul>
|
||||||
<li>Vánoční atmosféra</li>
|
<li>Odstranění podniku U Motlíků</li>
|
||||||
<li>Nově na <a href="https://react.dev/blog/2024/12/05/react-19" target='blank'>React 19</a></li>
|
|
||||||
<li>Nově sestavováno pomocí <a href="https://vite.dev" target='blank'>Vite</a> ⚡</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</Alert>
|
</Alert>
|
||||||
{dayIndex != null &&
|
{dayIndex != null &&
|
||||||
@ -420,7 +418,7 @@ function App() {
|
|||||||
}
|
}
|
||||||
<Row className='food-tables'>
|
<Row className='food-tables'>
|
||||||
{food[Restaurants.SLADOVNICKA] && renderFoodTable('Sladovnická', food[Restaurants.SLADOVNICKA])}
|
{food[Restaurants.SLADOVNICKA] && renderFoodTable('Sladovnická', food[Restaurants.SLADOVNICKA])}
|
||||||
{food[Restaurants.UMOTLIKU] && renderFoodTable('U Motlíků', food[Restaurants.UMOTLIKU])}
|
{/* {food[Restaurants.UMOTLIKU] && renderFoodTable('U Motlíků', food[Restaurants.UMOTLIKU])} */}
|
||||||
{food[Restaurants.TECHTOWER] && renderFoodTable('TechTower', food[Restaurants.TECHTOWER])}
|
{food[Restaurants.TECHTOWER] && renderFoodTable('TechTower', food[Restaurants.TECHTOWER])}
|
||||||
</Row>
|
</Row>
|
||||||
<div className='content-wrapper'>
|
<div className='content-wrapper'>
|
||||||
|
@ -59,7 +59,7 @@ export async function getData(date?: Date): Promise<ClientData> {
|
|||||||
let clientData: ClientData = { ...data };
|
let clientData: ClientData = { ...data };
|
||||||
clientData.menus = {
|
clientData.menus = {
|
||||||
[Restaurants.SLADOVNICKA]: await getRestaurantMenu(Restaurants.SLADOVNICKA, date),
|
[Restaurants.SLADOVNICKA]: await getRestaurantMenu(Restaurants.SLADOVNICKA, date),
|
||||||
[Restaurants.UMOTLIKU]: await getRestaurantMenu(Restaurants.UMOTLIKU, date),
|
// [Restaurants.UMOTLIKU]: await getRestaurantMenu(Restaurants.UMOTLIKU, date),
|
||||||
[Restaurants.TECHTOWER]: await getRestaurantMenu(Restaurants.TECHTOWER, date),
|
[Restaurants.TECHTOWER]: await getRestaurantMenu(Restaurants.TECHTOWER, date),
|
||||||
}
|
}
|
||||||
clientData = await addVolatileData(clientData);
|
clientData = await addVolatileData(clientData);
|
||||||
@ -142,19 +142,19 @@ export async function getRestaurantMenu(restaurant: Restaurants, date?: Date): P
|
|||||||
console.error("Selhalo načtení jídel pro podnik Sladovnická", e);
|
console.error("Selhalo načtení jídel pro podnik Sladovnická", e);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Restaurants.UMOTLIKU:
|
// case Restaurants.UMOTLIKU:
|
||||||
try {
|
// try {
|
||||||
const uMotlikuFood = await getMenuUMotliku(firstDay, mock);
|
// const uMotlikuFood = await getMenuUMotliku(firstDay, mock);
|
||||||
for (let i = 0; i < uMotlikuFood.length; i++) {
|
// for (let i = 0; i < uMotlikuFood.length; i++) {
|
||||||
menus[i][restaurant]!.food = uMotlikuFood[i];
|
// menus[i][restaurant]!.food = uMotlikuFood[i];
|
||||||
if (uMotlikuFood[i].length === 1 && uMotlikuFood[i][0].name.toLowerCase() === 'zavřeno') {
|
// if (uMotlikuFood[i].length === 1 && uMotlikuFood[i][0].name.toLowerCase() === 'zavřeno') {
|
||||||
menus[i][restaurant]!.closed = true;
|
// menus[i][restaurant]!.closed = true;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
} catch (e: any) {
|
// } catch (e: any) {
|
||||||
console.error("Selhalo načtení jídel pro podnik U Motlíků", e);
|
// console.error("Selhalo načtení jídel pro podnik U Motlíků", e);
|
||||||
}
|
// }
|
||||||
break;
|
// break;
|
||||||
case Restaurants.TECHTOWER:
|
case Restaurants.TECHTOWER:
|
||||||
try {
|
try {
|
||||||
const techTowerFood = await getMenuTechTower(firstDay, mock);
|
const techTowerFood = await getMenuTechTower(firstDay, mock);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** Výčtový typ pro restaurace, pro které umíme získat a parsovat obědové menu. */
|
/** Výčtový typ pro restaurace, pro které umíme získat a parsovat obědové menu. */
|
||||||
export enum Restaurants {
|
export enum Restaurants {
|
||||||
SLADOVNICKA = 'sladovnicka',
|
SLADOVNICKA = 'sladovnicka',
|
||||||
UMOTLIKU = 'uMotliku',
|
// UMOTLIKU = 'uMotliku',
|
||||||
TECHTOWER = 'techTower',
|
TECHTOWER = 'techTower',
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -110,7 +110,7 @@ export interface Food {
|
|||||||
// TODO tohle je dost špatné pojmenování, vzhledem k tomu co to obsahuje
|
// TODO tohle je dost špatné pojmenování, vzhledem k tomu co to obsahuje
|
||||||
export enum Locations {
|
export enum Locations {
|
||||||
SLADOVNICKA = 'Sladovnická',
|
SLADOVNICKA = 'Sladovnická',
|
||||||
UMOTLIKU = 'U Motlíků',
|
// UMOTLIKU = 'U Motlíků',
|
||||||
TECHTOWER = 'TechTower',
|
TECHTOWER = 'TechTower',
|
||||||
SPSE = 'SPŠE',
|
SPSE = 'SPŠE',
|
||||||
PIZZA = 'Pizza day',
|
PIZZA = 'Pizza day',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user