Write the village hall’s court booking app in Solid with Mas Taufik: JSX, events, routes, tests. 16 levels, played right in the browser with nothing to install.
What the levels ask
Monday afternoon at GOR Desa Sukamaju. Mr. Taufik’s paper booking book has double-booked twice, so this week he writes his first GOR app, in Solid. The visitor board comes first: whenever someone walks in he taps Ada yang masuk (someone came in), and the number must go up, 1 orang, 2 orang, 3 orang. Pick what fills the number on the visitor line.
Monday night. The court card’s code is done. Guess first: when Mr. Taufik taps Mulai main (start playing) for the first time, which lines on the card change? Tap those parts on the screen, then watch the night play out.
Tuesday afternoon. The Lapangan 2 card has to be honest: while nobody has booked, it reads Kosong, bisa dipesan (free to book). When Mrs. Sari books, it reads Dipakai Bu Sari (in use), and when she is done playing, the card is free again. Pick the opening <Show>.
Tuesday night. Every booking gets a full hour: as soon as the booking changes, the rental clock must start again from 60 menit for the new booker. PB Garuda train for fifty minutes, leave early, and the PKK mothers come in. Pick how the rental clock is put up.
Wednesday afternoon, heavy rain. PB Rajawali have booked Lapangan 2 for 19.00, but the roof above it leaks. During the repair the status must be Ditutup: lantai basah (closed: wet floor), whatever the booking. Once the floor is dry, back to Dipesan PB Rajawali (booked by PB Rajawali). Pick how the <Match> blocks are arranged.
Wednesday night. Dina’s plate dance practice has moved to the GOR, and she wants Lapangan 1 at 19.00. Every hour button must carry its own hour to the pesan function, and no hour may be booked before it is tapped. Pick how onClick goes on the hour buttons.
Thursday afternoon. Rara has a fever, so Bagas cancels their booking. The Batalkan (cancel) button only cancels. The price details open only when the card itself is tapped, as the neighbourhood head will do later. Pick how the click goes on the Batalkan button.
Thursday night. Rara picks 20.00 for the Neighbourhood 03 team, and her button lights up orange. Then Mr. Piksel books the same hour from another phone. That button must still show Rara’s pick and be marked full, in dark red, so Rara sees the clash at once. Pick the hour button’s class attributes.
Friday afternoon. Grandma Marni sits in the stand and can hardly read the score. The Perbesar angka (bigger numbers) button adds 8 pixels per tap: 16px, then 24px, then 32px. Pick the style attribute on the score.
Friday night. The app has pages now. The neighbourhood head taps Lapangan 2 on his phone and must land on the Lapangan 2 page, then get back to the schedule with his phone’s Back. Pick the court page’s route path.
Saturday morning. Every court page shares the same menu on top, so Mr. Taufik nests his routes: TataLapangan at /lapangan, and each court’s page inside it. Mr. Jaya opens Lapangan 1, then moves to Lapangan 2: the menu stays, the page inside changes. Pick where the route’s content goes in the layout.
Saturday afternoon. The schedule comes from the GOR server, and the server is slow, over half a second. Mr. Taufik wants Lapangan 2’s schedule asked for while his pointer rests on the link, so that the moment he clicks, the free hours are there. Pick the court route’s preload.