Pool Ticket Booth — Vue

Keep the Vue app on the Umbul Sukamaju ticket booth's tablet running all day, never reloaded. 14 levels, played right in the browser with nothing to install.

What the levels ask

  1. The tablet at the Umbul Sukamaju ticket booth starts at 06.00 and is never reloaded until closing at 17.00. Each time Ms. Elok opens the Kolam tab, TabKolam.vue sets an interval that fetches the pools' visitor numbers every minute, and the tab is opened dozens of times a day. Today the tablet's heap is weighed too: from morning to afternoon it may not grow more than 0.6 MB. Fill in the missing line under onMounted.
  2. The signal at the booth often drops. TabTiket.vue listens for the online event on window so the prices are fetched again as soon as the signal is back, and from noon the holiday rate applies. The Tiket tab opens and closes all day. Fill in the line that removes the listener.
  3. Today a school group, the PKK and the youth club have booked the pools. The Rombongan tab shows how many groups have not arrived though their time has passed, and that number has to change every minute with jam from jam.js. The list of groups only exists once ambil has finished. Fill in the two holes in TabRombongan.vue.
  4. Ms. Elok put in KeepAlive so the cart on the Tiket tab is not lost when she glances at the Kolam tab to answer a visitor. Every receipt shown is a screen of its own, with its number as the key, and a day brings a great many receipts. Fill in the attribute of KeepAlive in App.vue.
  5. Now the Kolam tab is kept by KeepAlive too, so its history of numbers does not start from zero every time it opens. The pools' fetching has to run while the tab is on screen, and stop while it is not. Choose the hooks for mulai and henti in TabKolam.vue.
  6. It is a holiday, and Bagas helps at the booth. The tablet's screen is split in two: one PanelKasir for Ms. Elok and one for Bagas, and each calls useKeranjang(). Each cashier must have a cart of their own, and every ticket tapped must show at once. Fill in the start of useKeranjang.js.
  7. The tablet's header and the Kolam tab both show a clock, and both call useJam(). Mrs. Sari checks the tablet's clock against her watch, and before closing the two clocks are compared. The whole tablet needs only one clock that always shows the right minute. Fill in the two holes in useJam.js.
  8. Ms. Elok and Bagas take turns at the booth every half hour, and the cart now lives in the Pinia store keranjang. When the turn changes, tickets the last cashier put in must not carry over to the next visitor. Fill in the first line of ganti in App.vue.
  9. Ms. Elok changes how the turns work: each turn gets a new kasir store, and the old one is thrown away with $dispose(). The store's setup adds two signal listeners to window, and the booth's signal drops and comes back a few times a day. Fill in the holes in stores/kasir.js and in ganti in App.vue.
  10. The Laporan tab is big and rarely opened, so its code is only downloaded over the booth's connection the first time it is asked for. Today the neighbourhood head asks for the visitors' report three times: while the signal is gone, when the signal is back but slow, and in the afternoon. Each time, the screen must show what is going on. Fill in the three holes in the defineAsyncComponent options.
  11. When the children's pool holds 40 people or more, the Kolam tab puts a notice in the middle of the screen so the cashiers hold back children's tickets. The notice is Teleported to body so nothing crops it, and the Kolam tab is kept by KeepAlive. The cashiers often glance at the Kolam tab and go back to the Tiket tab. Fill in the attribute of the notice's div in TabKolam.vue.
  12. From this morning the ticket prices come from the Pokdarwis spreadsheet, as text. Every tap on a KartuTiket sends its price to App.vue through the tambah event, and App.vue adds it to the cash. A change goes on the tablet only if vue-tsc finds no errors; if it finds one, the tablet keeps yesterday's version, which is right. Choose the emit declaration in KartuTiket.vue.

And more, 14 levels in all.