refactor: the production board and the order panel in files of their own

Plan 007e (Critical Corrections 7, last step; layout Phase D step 1):
web/kanban-board.js holds the board and the phone screens, and
web/kanban-order.js the order panel, its dialogs, the final files and
Abrir e conferir, moved verbatim from kanban.js (now 952 lines). The
browser test also walks the phone board. Built by Prensa.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-11-16 09:46:36 -03:00
parent 00c7fa3dfa
commit ee772a43ff
5 changed files with 1737 additions and 1709 deletions

View File

@@ -369,6 +369,19 @@ try{
await waitFor(()=>kanban.eval(`document.querySelector('#payments').children.length>0`),'Pagamentos tab');
await kanban.click('[data-tab="integrations"]');
await waitFor(()=>kanban.eval(`document.querySelector('#integrations').children.length>0`),'Integrações tab');
// The phone board lives in its own file now: open its Mais and filters.
await kanban.call('Emulation.setDeviceMetricsOverride',{width:390,height:844,deviceScaleFactor:1,mobile:true});
await waitFor(()=>kanban.eval('PHONE.matches'),'phone board');
await kanban.click('#more-nav');
await waitFor(()=>kanban.eval('!!document.querySelector(".msheet")'),'phone menu');
await kanban.eval('document.querySelector(".mscrim").click()');
await waitFor(()=>kanban.eval('!document.querySelector(".msheet")'),'phone menu closed');
await kanban.click('#filter-open');
await waitFor(()=>kanban.eval('!!document.querySelector(".msheet")'),'phone filters');
await kanban.eval('document.querySelector(".mscrim").click()');
await waitFor(()=>kanban.eval('!document.querySelector(".msheet")'),'phone filters closed');
await kanban.call('Emulation.setDeviceMetricsOverride',{width:1440,height:1000,deviceScaleFactor:1,mobile:false});
await waitFor(()=>kanban.eval('!PHONE.matches'),'desktop board again');
// A guest sees the order paid in this browser; creating an account keeps it.
const portal=await page(siteOrigin+'/conta/pedidos?order='+oid);
await waitFor(async()=> (await portal.text()).includes('Finalizado'),'customer order tracking');