Set hx-* attributes on the Kios Pupuk Subur Jaya page so it holds up to the Hari Tebus queue. 15 levels, played right in the browser with nothing to install.
What the levels ask
Mr. Tono looks up his name in the Cari petani field: he types slowly, makes a typo, then moves the cursor with the arrow keys. Mrs. Ningsih behind him pastes her NIK from WhatsApp. Decide when that field asks the dinas: once each time they pause, not for the arrow keys, and a paste must be heard too.
Now the result list is fed by two elements: the search field and the kelompok list. Mrs. Sumi types "Su" and then, before her list arrives, picks her kelompok. The answer for "Su" across every kelompok is slow and arrives last. Make the newer question always win: the old one is stopped as soon as the new one is asked.
The dinas is slow today, almost three seconds. Grandma Marni taps Tebus, and if the screen stays still for a second she taps again. At the top of the screen there is a lamp that says "Menghubungi dinas..." (class htmx-indicator). Make that lamp light up while the dinas is thinking, so Nenek waits.
Bagas is redeeming NPK for Mr. Tono, and his thumb taps Tebus twice, 0.15 seconds apart. The dinas needs almost two seconds to answer. The page is the same as before, with no extra attributes. Guess what the dinas writes down, then watch it run.
Bagas is back, and his thumb still taps twice. Mr. Kasno behind him really does want two redemptions: Urea, then NPK once its receipt is out. Make Bagas's second tap not become a second redemption, without blocking Mr. Kasno's second one.
Mr. Sastro types his NIK with one digit missing, Mrs. Asih types sixteen digits correctly, and Mr. Sabar taps Tebus with the NIK field empty. Make the browser itself object to an NIK that is not sixteen digits, before anything is sent to the dinas.
The Tebus button is now outside any form. Mr. Jarwo's card (a hidden NIK and the kiosk's note about what he owes) and the order fields (kind, sacks) are in two different sections. Send the NIK, the kind and the sacks to the dinas, and do not send the note.
The Lihat alokasi button fetches the dinas's e-RDKK page, and the dinas sends it whole: header, menu, notice, table, footer, and its own title. The kiosk's card only needs Mr. Danu's allocation table, and the dinas's notice belongs on the kiosk's notice board at the top. The kiosk window keeps the kiosk's title.
Every redemption and every cancellation changes the warehouse's stock, and the dinas announces it with the response header HX-Trigger: stokBerubah. The stock board at the top of the screen must refresh itself each time that announcement is heard: after Mr. Sabar's redemption, after Mrs. Sukinah's, and after Mr. Tono cancels his redemption from this morning.
Mr. Kasno asks for three sacks of NPK, but only two are left of his allocation. The dinas refuses with a 422 and its reason. That reason must show in the message box above the form, not where the receipt goes (the printer prints whatever lands there). The 502 error page from the dinas's broken gateway must not show anywhere.
Farmers take turns typing into the same form. After Mr. Waluyo redeems, Mrs. Sumiyati types her NIK into the field that still holds Mr. Waluyo's. Mr. Jarwo is refused for asking five sacks, reads the reason, and changes only the number. Clear the form after a successful redemption, and only then.
At noon, the redemption list has a Cetak (reprint the receipt) and a Batal button on every row, from the same template. Mr. Jaya's elbow nudges Batal on Mr. Sugeng's row; Mr. Tono asks for his receipt again; Mrs. Sumi really wants to cancel. Batal must ask first. Cetak must not ask about cancelling.