Compare commits

..

4 Commits

Author SHA1 Message Date
Cauê Faleiros
8fa76b7819 Merge redeploy database retry (DTF-API-2..7)
All checks were successful
Build and deploy / Validate source (push) Successful in 10s
Build and deploy / Integration suite on a real stack (push) Successful in 7m0s
Build and deploy / Secret scan and release gate (push) Successful in 9s
Build and deploy / Publish images (push) Successful in 1m23s
2026-11-13 15:31:39 -03:00
Cauê Faleiros
fe224cfc9c Merge new layout phase A (Phosphor icons, shared pieces) 2026-11-13 15:31:39 -03:00
Cauê Faleiros
034f3bfbb5 feat: new layout phase A, Phosphor icons and shared pieces
Roadmap Novo Layout, phase A: every icon (IC, the stage marks, the rail
and the inline icons in kanban.html, the theme toggle and the select
chevrons) is Phosphor regular, filled at 256. Shared pieces from the
canvas for the next phases: switch, tag, data table, dialog scoping,
two- and three-column grids, tab counts in the lighter grey, and 44 px
controls on the phone. Built by Prensa.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-13 15:31:38 -03:00
Cauê Faleiros
445d686f43 fix: a redeploy's short database outage no longer takes the API down
Sentry DTF-API-2..7 (redeploy of 5a7fc0f, 13/11): the name db did not
resolve for about 12 s; the new API exited at startup and the worker and
audit() logged the error every second. The API now waits up to 90 s with
a backoff, the worker reports an outage once and backs off to 15 s, the
audit persistence error is logged at most once a minute, and api, site
and kanban update start-first so the old container serves meanwhile.

Built by Bobina.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-13 15:25:29 -03:00
10 changed files with 257 additions and 98 deletions

View File

@@ -101,7 +101,7 @@ jobs:
# the generator's geometry. The provider suites use a fake transport: they # the generator's geometry. The provider suites use a fake transport: they
# prove the documented contract, not the integration. # prove the documented contract, not the integration.
- name: Print-file geometry and provider adapters - name: Print-file geometry and provider adapters
run: $COMPOSE exec -T api python -m unittest tests.test_printfile tests.test_printpng tests.test_mercadopago tests.test_tiny tests.test_cnpj tests.test_payment_messages tests.test_jadlog tests.test_correios tests.test_quote_review tests.test_moves tests.test_large_files tests.test_grade_check tests.test_schema tests.test_customer_document tests.test_mail_html tests.test_layout_rules tests.test_proof_cut tests.test_proof_render tests.test_prumo tests.test_speed tests.test_printpng_validate tests.test_machine_log tests.test_machine_stats tests.test_label tests.test_observability tests.test_worker_drain -v run: $COMPOSE exec -T api python -m unittest tests.test_printfile tests.test_printpng tests.test_mercadopago tests.test_tiny tests.test_cnpj tests.test_payment_messages tests.test_jadlog tests.test_correios tests.test_quote_review tests.test_moves tests.test_large_files tests.test_grade_check tests.test_schema tests.test_customer_document tests.test_mail_html tests.test_layout_rules tests.test_proof_cut tests.test_proof_render tests.test_prumo tests.test_speed tests.test_printpng_validate tests.test_machine_log tests.test_machine_stats tests.test_label tests.test_observability tests.test_worker_drain tests.test_db_outage -v
- name: Runtime and retention regressions - name: Runtime and retention regressions
run: | run: |

View File

@@ -4,6 +4,9 @@ Configuration and shared helpers are in local.runtime; every route lives in a
router under local.api. This module creates the application, applies the router under local.api. This module creates the application, applies the
cross-cutting middleware, and includes them. cross-cutting middleware, and includes them.
""" """
import asyncio
import logging
import time
from contextlib import asynccontextmanager from contextlib import asynccontextmanager
from fastapi import FastAPI from fastapi import FastAPI
@@ -19,11 +22,30 @@ from .api import artwork, customer, health, machine_log, operator, orders, payme
observability.init('api') observability.init('api')
RETRY_SECONDS = (1, 2, 4, 8, 15)
STARTUP_BUDGET_SECONDS = 90
@asynccontextmanager @asynccontextmanager
async def lifespan(app): async def lifespan(app):
with db.connect() as c: # A redeploy briefly removes the database name; wait it out, warning once
c.execute('SELECT 1 FROM dtf_local.operator_sessions LIMIT 1') # per attempt (a warning, not an error: Sentry only takes errors).
storage.health() deadline = time.monotonic() + STARTUP_BUDGET_SECONDS
attempt = 0
while True:
try:
with db.connect() as c:
c.execute('SELECT 1 FROM dtf_local.operator_sessions LIMIT 1')
storage.health()
break
except Exception:
remaining = deadline - time.monotonic()
if remaining <= 0:
raise
delay = min(RETRY_SECONDS[min(attempt, len(RETRY_SECONDS) - 1)], remaining)
logging.warning('Database not reachable yet, retrying in %d s', max(1, round(delay)))
await asyncio.sleep(delay)
attempt += 1
yield yield

View File

@@ -4,6 +4,7 @@ import os
import secrets import secrets
import logging import logging
import json import json
import time
from uuid import UUID, uuid4 from uuid import UUID, uuid4
from fastapi import HTTPException, Request from fastapi import HTTPException, Request
from ..core.db import connect from ..core.db import connect
@@ -71,10 +72,14 @@ def transfer_guest(c, previous, identity):
c.execute(f'UPDATE dtf_local.{table} SET owner=%s WHERE owner=%s', (identity,previous['owner'])) c.execute(f'UPDATE dtf_local.{table} SET owner=%s WHERE owner=%s', (identity,previous['owner']))
c.execute('DELETE FROM dtf_local.sessions WHERE owner=%s', (previous['owner'],)) c.execute('DELETE FROM dtf_local.sessions WHERE owner=%s', (previous['owner'],))
_persistence_error_at = None
def audit(event, c=None, **fields): def audit(event, c=None, **fields):
"""Record a security event. `c` is the caller's open connection, when there """Record a security event. `c` is the caller's open connection, when there
is one, so the event commits with that transaction instead of opening a is one, so the event commits with that transaction instead of opening a
second connection.""" second connection."""
global _persistence_error_at
# Only explicit metadata: never cookies, passwords, signed URLs or request bodies. # Only explicit metadata: never cookies, passwords, signed URLs or request bodies.
logging.getLogger('dtf.security').warning(json.dumps({'event':event, **fields}, sort_keys=True)) logging.getLogger('dtf.security').warning(json.dumps({'event':event, **fields}, sort_keys=True))
try: try:
@@ -85,8 +90,12 @@ def audit(event, c=None, **fields):
with connect() as c: with connect() as c:
c.execute('INSERT INTO dtf_local.security_events(event,details) VALUES(%s,%s)',(event,Jsonb(fields))) c.execute('INSERT INTO dtf_local.security_events(event,details) VALUES(%s,%s)',(event,Jsonb(fields)))
except Exception: except Exception:
# Logging must still work during a DB outage without recursively auditing itself. # Logging must still work during a DB outage without recursively auditing
logging.getLogger('dtf.security').error('Security event persistence unavailable') # itself; the error is reported once per minute, not on every event.
now = time.monotonic()
if _persistence_error_at is None or now-_persistence_error_at >= 60:
_persistence_error_at = now
logging.getLogger('dtf.security').error('Security event persistence unavailable')
def rate_limit(scope, identity, limit, seconds=900): def rate_limit(scope, identity, limit, seconds=900):
key = hashlib.sha256((scope+'|'+identity).encode()).hexdigest() key = hashlib.sha256((scope+'|'+identity).encode()).hexdigest()

View File

@@ -5,6 +5,7 @@ import os
import threading import threading
import time import time
from http.server import BaseHTTPRequestHandler, HTTPServer from http.server import BaseHTTPRequestHandler, HTTPServer
import psycopg
from psycopg.types.json import Jsonb from psycopg.types.json import Jsonb
from . import mail, observability, unpaid from . import mail, observability, unpaid
from .adapters import FakeTiny, LocalS3Storage, require_runtime from .adapters import FakeTiny, LocalS3Storage, require_runtime
@@ -27,6 +28,7 @@ last_reconcile = 0.0
last_names = 0.0 last_names = 0.0
names_thread = None names_thread = None
last_tiny_keepalive = 0.0 last_tiny_keepalive = 0.0
db_down_since = None
storage = LocalS3Storage() storage = LocalS3Storage()
scan_thread = None scan_thread = None
render_thread = None render_thread = None
@@ -126,7 +128,8 @@ def resolve_names():
names_thread.start() names_thread.start()
def loop(): def loop():
global last_cleanup global last_cleanup, db_down_since
delay = 1
while True: while True:
try: try:
drain() drain()
@@ -140,8 +143,22 @@ def loop():
tiny_keepalive() tiny_keepalive()
reconcile_payments() reconcile_payments()
resolve_names() resolve_names()
except psycopg.OperationalError as exc:
if db_down_since is None:
db_down_since = time.monotonic()
logging.error('Database unavailable, retrying: %s', exc)
else:
logging.debug('Database still unavailable, retrying in %s s', delay)
time.sleep(delay)
delay = min(delay * 2, 15)
continue
except Exception: except Exception:
logging.exception('Local worker tick failed') logging.exception('Local worker tick failed')
else:
if db_down_since is not None:
logging.info('Database back after %s s', int(time.monotonic()-db_down_since))
db_down_since = None
delay = 1
time.sleep(1) time.sleep(1)
class Health(BaseHTTPRequestHandler): class Health(BaseHTTPRequestHandler):

View File

@@ -253,6 +253,7 @@ services:
start_period: 30s start_period: 30s
deploy: deploy:
replicas: 1 replicas: 1
update_config: {order: start-first, failure_action: rollback}
restart_policy: {condition: on-failure, delay: 5s} restart_policy: {condition: on-failure, delay: 5s}
worker: worker:
@@ -332,6 +333,7 @@ services:
start_period: 15s start_period: 15s
deploy: deploy:
replicas: 1 replicas: 1
update_config: {order: start-first, failure_action: rollback}
restart_policy: {condition: on-failure, delay: 5s} restart_policy: {condition: on-failure, delay: 5s}
kanban: kanban:
@@ -358,6 +360,7 @@ services:
start_period: 15s start_period: 15s
deploy: deploy:
replicas: 1 replicas: 1
update_config: {order: start-first, failure_action: rollback}
restart_policy: {condition: on-failure, delay: 5s} restart_policy: {condition: on-failure, delay: 5s}
configs: configs:

84
tests/test_db_outage.py Normal file
View File

@@ -0,0 +1,84 @@
"""A short database outage during a redeploy: bounded retries, one report.
Run from the repository root: python3 -m unittest tests.test_db_outage -v.
The worker imports psycopg and boto3, so a host without the API image's
dependencies cannot import it; CI runs this in the api container.
"""
import unittest
from unittest import mock
import psycopg
from app import worker
from app.core import auth
class WorkerDatabaseOutageTest(unittest.TestCase):
class StopLoop(Exception):
pass
class Connection:
def __enter__(self):
return self
def __exit__(self, *exc_info):
return False
def execute(self, *args, **kwargs):
return self
def fetchone(self):
return None
def setUp(self):
worker.db_down_since = None
self.addCleanup(setattr, worker, 'db_down_since', None)
def test_one_error_and_one_info_with_growing_sleeps(self):
outage = psycopg.OperationalError('connection refused')
with mock.patch.object(worker, 'connect',
side_effect=[outage, outage, outage, self.Connection()]), \
mock.patch.object(worker, 'last_cleanup', worker.time.monotonic()), \
mock.patch.object(worker, 'cleanup'), \
mock.patch.object(worker, 'tiny_keepalive'), \
mock.patch.object(worker, 'reconcile_payments'), \
mock.patch.object(worker, 'resolve_names'), \
mock.patch.object(worker.mail, 'send_pending'), \
mock.patch.object(worker.time, 'sleep',
side_effect=[None, None, None, self.StopLoop]) as sleep, \
mock.patch.object(worker.logging, 'error') as error, \
mock.patch.object(worker.logging, 'info') as info, \
mock.patch.object(worker.logging, 'debug') as debug:
with self.assertRaises(self.StopLoop):
worker.loop()
self.assertEqual(error.call_count, 1)
self.assertIn('Database unavailable', error.call_args[0][0])
self.assertEqual(info.call_count, 1)
self.assertIn('Database back after', info.call_args[0][0])
self.assertEqual(debug.call_count, 2)
self.assertEqual([call.args[0] for call in sleep.call_args_list[:3]],
[1, 2, 4])
class AuditPersistenceOutageTest(unittest.TestCase):
def setUp(self):
auth._persistence_error_at = None
self.addCleanup(setattr, auth, '_persistence_error_at', None)
def test_persistence_error_is_logged_at_most_once_per_minute(self):
logger = auth.logging.getLogger('dtf.security')
outage = psycopg.OperationalError('database is down')
with mock.patch.object(auth, 'connect', side_effect=outage), \
mock.patch.object(auth.time, 'monotonic',
side_effect=[100.0, 130.0, 161.0]), \
mock.patch.object(logger, 'error') as error, \
mock.patch.object(logger, 'warning') as warning:
auth.audit('first')
auth.audit('second')
auth.audit('third')
self.assertEqual(error.call_count, 2)
self.assertEqual(warning.call_count, 3)
if __name__ == '__main__':
unittest.main()

View File

@@ -624,8 +624,8 @@ function accountForm(){
$('my-password').onclick=()=>{$('account-menu').hidden=true;accountForm();}; $('my-password').onclick=()=>{$('account-menu').hidden=true;accountForm();};
// Dark or light, per browser (web/theme.js): the rail's button and the account // Dark or light, per browser (web/theme.js): the rail's button and the account
// menu name the one a click gives. // menu name the one a click gives.
const ICON_SUN='M6.75 10a3.25 3.25 0 1 0 6.5 0a3.25 3.25 0 1 0 -6.5 0 M10 2v1.75 M10 16.25V18 M2 10h1.75 M16.25 10H18 M4.35 4.35l1.24 1.24 M14.41 14.41l1.24 1.24 M4.35 15.65l1.24-1.24 M14.41 5.59l1.24-1.24'; const ICON_SUN='M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z';
const ICON_MOON='M16.25 12.25A6.75 6.75 0 0 1 7.75 3.75a6.75 6.75 0 1 0 8.5 8.5z'; const ICON_MOON='M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z';
function paintThemeToggle(){ function paintThemeToggle(){
const light=kanbanTheme.get()==='light', label=light?'Mudar para o modo escuro':'Mudar para o modo claro'; const light=kanbanTheme.get()==='light', label=light?'Mudar para o modo escuro':'Mudar para o modo claro';
$('theme-rail').querySelector('path').setAttribute('d',light?ICON_MOON:ICON_SUN); $('theme-rail').querySelector('path').setAttribute('d',light?ICON_MOON:ICON_SUN);

View File

@@ -99,9 +99,9 @@ input:focus,textarea:focus{border-color:var(--acc)}
bar with the page's name, the search, the machine and the refresh. */ bar with the page's name, the search, the machine and the refresh. */
#app:not([hidden]){display:flex;min-height:100vh} #app:not([hidden]){display:flex;min-height:100vh}
.shell{flex:1;min-width:0;display:flex;flex-direction:column} .shell{flex:1;min-width:0;display:flex;flex-direction:column}
.i{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:square;stroke-linejoin:miter;flex:none;display:block} .i{width:20px;height:20px;fill:currentColor;flex:none;display:block}
.i.m{width:16px;height:16px;stroke-width:1.6} .i.m{width:16px;height:16px}
.i.s{width:14px;height:14px;stroke-width:1.7} .i.s{width:14px;height:14px}
.rail{width:84px;flex:none;background:var(--rail);border-right:1px solid var(--railln);display:flex;flex-direction:column;align-items:center;gap:6px;padding:18px 0 16px;position:sticky;top:0;height:100vh;z-index:6} .rail{width:84px;flex:none;background:var(--rail);border-right:1px solid var(--railln);display:flex;flex-direction:column;align-items:center;gap:6px;padding:18px 0 16px;position:sticky;top:0;height:100vh;z-index:6}
.rail .mark{width:38px;height:38px;margin-bottom:22px;flex:none;color:var(--railon)} .rail .mark{width:38px;height:38px;margin-bottom:22px;flex:none;color:var(--railon)}
.rail .mark .cut{stroke:var(--rail)} .rail .mark .cut{stroke:var(--rail)}
@@ -203,7 +203,7 @@ main{padding:0}
.tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:16px 20px 0} .tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:16px 20px 0}
.seg{display:flex;padding:3px;gap:2px;border-radius:10px;background:var(--sf3)} .seg{display:flex;padding:3px;gap:2px;border-radius:10px;background:var(--sf3)}
.seg button{height:30px;padding:0 13px;border:0;border-radius:7px;background:transparent;color:var(--tx2);font-size:13px;font-weight:550;display:flex;align-items:center;gap:7px;white-space:nowrap} .seg button{height:30px;padding:0 13px;border:0;border-radius:7px;background:transparent;color:var(--tx2);font-size:13px;font-weight:550;display:flex;align-items:center;gap:7px;white-space:nowrap}
.seg button .n{font-size:12px;color:var(--tx3);font-weight:500} .seg button .n{font-size:12px;color:var(--tx2);font-weight:500}
.seg button:hover{color:var(--tx)} .seg button:hover{color:var(--tx)}
.seg button.on{background:var(--sf);color:var(--tx);box-shadow:0 1px 2px rgba(0,0,0,.14),0 0 0 1px var(--ln)} .seg button.on{background:var(--sf);color:var(--tx);box-shadow:0 1px 2px rgba(0,0,0,.14),0 0 0 1px var(--ln)}
.filterwrap{position:relative} .filterwrap{position:relative}
@@ -249,7 +249,7 @@ main{padding:0}
.colm{font-size:12px;color:var(--tx3);white-space:nowrap} .colm{font-size:12px;color:var(--tx3);white-space:nowrap}
.colbtn{width:28px;height:28px;flex:none;border:0;border-radius:7px;background:transparent;color:var(--tx2);display:flex;align-items:center;justify-content:center;box-shadow:inset 0 0 0 1px var(--ln2)} .colbtn{width:28px;height:28px;flex:none;border:0;border-radius:7px;background:transparent;color:var(--tx2);display:flex;align-items:center;justify-content:center;box-shadow:inset 0 0 0 1px var(--ln2)}
.colbtn:hover{background:var(--sf3);color:var(--tx)} .colbtn:hover{background:var(--sf3);color:var(--tx)}
.sg{width:18px;height:18px;flex:none;color:var(--tx2);fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:square;stroke-linejoin:miter} .sg{width:18px;height:18px;flex:none;color:var(--tx2);fill:currentColor}
.sg.cor{color:var(--bad)} .sg.cor{color:var(--bad)}
.lanehead{display:flex;align-items:center;gap:7px;padding:6px 6px 0;font-size:12.5px;color:var(--tx2)} .lanehead{display:flex;align-items:center;gap:7px;padding:6px 6px 0;font-size:12.5px;color:var(--tx2)}
.lanehead b{font-weight:650;color:var(--tx);white-space:nowrap;overflow:hidden;text-overflow:ellipsis} .lanehead b{font-weight:650;color:var(--tx);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@@ -497,7 +497,14 @@ main{padding:0}
.contrrow{display:flex;align-items:center;gap:12px;flex-wrap:wrap} .contrrow{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.contrrow>.lbl{min-width:150px} .contrrow>.lbl{min-width:150px}
/* Dialogs: over the page, or over the order. */ /* Dialogs: over the page, or over the order. The canvas' .dlg/.dhead/.dbody
are scoped under .dlg: .dhead/.dbody already belong to the order drawer. */
.dlg{width:640px;background:var(--sf);border-radius:16px;box-shadow:var(--pop);display:flex;flex-direction:column}
.dlg .dhead{display:flex;align-items:flex-start;gap:16px;padding:22px 24px 18px;border-bottom:1px solid var(--ln)}
.dlg .dhead h2{margin:0;font-size:20px;font-weight:650}
.dlg .dhead p{margin:4px 0 0;font-size:13.5px;color:var(--tx2)}
.dlg .dbody{padding:20px 24px;display:flex;flex-direction:column;gap:18px}
.dlg .dfoot{display:flex;justify-content:flex-end;gap:10px;padding:14px 24px;border-top:1px solid var(--ln)}
.scrim.hi{position:fixed;inset:0;z-index:23;background:var(--scrim);-webkit-backdrop-filter:blur(3px) saturate(.6);backdrop-filter:blur(3px) saturate(.6);animation:fade .2s ease both} .scrim.hi{position:fixed;inset:0;z-index:23;background:var(--scrim);-webkit-backdrop-filter:blur(3px) saturate(.6);backdrop-filter:blur(3px) saturate(.6);animation:fade .2s ease both}
.modal{position:fixed;left:50%;top:50%;z-index:24;width:580px;max-width:calc(100% - 32px);max-height:calc(100vh - 32px);overflow:auto;transform:translate(-50%,-50%);background:var(--sf);border-radius:16px;box-shadow:var(--pop);padding:28px;display:flex;flex-direction:column;gap:18px;animation:pop .45s cubic-bezier(.16,1,.3,1) both} .modal{position:fixed;left:50%;top:50%;z-index:24;width:580px;max-width:calc(100% - 32px);max-height:calc(100vh - 32px);overflow:auto;transform:translate(-50%,-50%);background:var(--sf);border-radius:16px;box-shadow:var(--pop);padding:28px;display:flex;flex-direction:column;gap:18px;animation:pop .45s cubic-bezier(.16,1,.3,1) both}
.modal>*{flex-shrink:0} .modal>*{flex-shrink:0}
@@ -512,7 +519,7 @@ main{padding:0}
.fld input:focus,.fld select:focus,.fld textarea:focus,.fact select:focus,.decide input:focus,.inp:focus{border-color:var(--acc);box-shadow:0 0 0 3px color-mix(in srgb,var(--acc) 18%,transparent)} .fld input:focus,.fld select:focus,.fld textarea:focus,.fact select:focus,.decide input:focus,.inp:focus{border-color:var(--acc);box-shadow:0 0 0 3px color-mix(in srgb,var(--acc) 18%,transparent)}
.fld small{font-size:12.5px;font-weight:500;color:var(--tx3)} .fld small{font-size:12.5px;font-weight:500;color:var(--tx3)}
.fld select,.fact select{appearance:none;-webkit-appearance:none;padding-right:36px;cursor:pointer; .fld select,.fact select{appearance:none;-webkit-appearance:none;padding-right:36px;cursor:pointer;
background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%238A8A93' stroke-width='1.6'%3E%3Cpath d='M5.5 8l4.5 4.5L14.5 8'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center;background-size:16px} background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath fill='%238A8A93' d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center;background-size:16px}
.fld option,.fact option{background:var(--sf);color:var(--tx)} .fld option,.fact option{background:var(--sf);color:var(--tx)}
.frow{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px} .frow{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.dfoot{display:flex;align-items:center;gap:8px;padding-top:6px} .dfoot{display:flex;align-items:center;gap:8px;padding-top:6px}
@@ -693,9 +700,25 @@ label.fopt{cursor:pointer;user-select:none}
.pfilters{margin-left:auto;display:flex;align-items:center;gap:8px;flex-wrap:wrap} .pfilters{margin-left:auto;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.inp.sm{height:34px;width:auto;font-size:13px} .inp.sm{height:34px;width:auto;font-size:13px}
.inp.num{width:110px} .inp.num{width:110px}
select.inp{appearance:none;-webkit-appearance:none;padding-right:32px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%238A8A93' stroke-width='1.6'%3E%3Cpath d='M5.5 8l4.5 4.5L14.5 8'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 8px center;background-size:15px} select.inp{appearance:none;-webkit-appearance:none;padding-right:32px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath fill='%238A8A93' d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 8px center;background-size:15px}
.nowrap{white-space:nowrap}.strong{font-weight:600}.muted{color:var(--tx2)} .nowrap{white-space:nowrap}.strong{font-weight:600}.muted{color:var(--tx2)}
.table td.muted{color:var(--tx2)} .table td.muted{color:var(--tx2)}
/* Shared pieces from the new layout canvas (phase A). */
.dtable{width:100%;border-collapse:collapse}
.dtable th{text-align:left;font-size:12.5px;font-weight:500;color:var(--tx3);padding:12px 18px;border-bottom:1px solid var(--ln);white-space:nowrap}
.dtable td{padding:0 18px;height:58px;border-bottom:1px solid var(--ln);white-space:nowrap}
.dtable tr:last-child td{border-bottom:0}
.dtable .r{text-align:right}
.tag{display:inline-flex;align-items:center;height:22px;padding:0 8px;border-radius:6px;background:var(--sf3);font-size:12px;font-weight:550;color:var(--tx2)}
.sw{display:inline-flex;align-items:center;gap:10px;border:0;background:transparent;padding:0;font-size:13.5px;color:var(--tx2)}
.sw .t{width:36px;height:20px;border-radius:10px;background:var(--ln3);position:relative;flex:none}
.sw .t::after{content:"";position:absolute;top:3px;left:3px;width:14px;height:14px;border-radius:50%;background:#fff}
.sw.on{color:var(--tx)}
.sw.on .t{background:var(--tx)}
.sw.on .t::after{background:var(--sf)}
.sw.on .t::after{left:19px}
.g2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.g3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.table tr.off td{opacity:.55} .table tr.off td{opacity:.55}
.table tr.total td{font-weight:650} .table tr.total td{font-weight:650}
.table .w50{width:50%} .table .w50{width:50%}
@@ -944,6 +967,8 @@ select.inp{appearance:none;-webkit-appearance:none;padding-right:32px;background
at a time, sheets from the bottom, the order and a quote as pages. */ at a time, sheets from the bottom, the order and a quote as pages. */
.phone,.mtabs,.msum,.mdl,.mbtns,.mhead.phone,.mlist.phone,.mscrim,.msheet{display:none} .phone,.mtabs,.msum,.mdl,.mbtns,.mhead.phone,.mlist.phone,.mscrim,.msheet{display:none}
@media (max-width:700px){ @media (max-width:700px){
/* Touch targets: buttons, chips and inputs at least 44 px tall. */
.btn,.chip,.inp,.mic,.mtab,#quote-filters button,.pagetools .seg button,input:not([type=checkbox]):not([type=radio]):not(.vh),select,textarea{min-height:44px}
.phone{display:flex} .phone{display:flex}
.mlist.phone{display:flex} .mlist.phone{display:flex}
#app:not([hidden]){display:block} #app:not([hidden]){display:block}

View File

@@ -36,40 +36,40 @@
<div id="app" class="app" hidden> <div id="app" class="app" hidden>
<nav class="rail" aria-label="Seções"> <nav class="rail" aria-label="Seções">
<svg class="mark" viewBox="0 0 40 40" role="img" aria-label="Kanban DTF"><path d="M8 5h24a2 2 0 0 1 2 2v19l-9 9H8a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2z" fill="currentColor"></path><path class="cut" d="M16 9v22 M24 9v14" fill="none" stroke-width="2"></path><path d="M34 26l-9 9v-7a2 2 0 0 1 2-2z" fill="var(--acc)"></path></svg> <svg class="mark" viewBox="0 0 40 40" role="img" aria-label="Kanban DTF"><path d="M8 5h24a2 2 0 0 1 2 2v19l-9 9H8a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2z" fill="currentColor"></path><path class="cut" d="M16 9v22 M24 9v14" fill="none" stroke-width="2"></path><path d="M34 26l-9 9v-7a2 2 0 0 1 2-2z" fill="var(--acc)"></path></svg>
<button class="nav" type="button" data-tab="board" aria-selected="true"><svg class="i" viewBox="0 0 20 20" aria-hidden="true"><path d="M3 3.75h4v12.5H3z M8 3.75h4v8.5H8z M13 3.75h4v10.5h-4z"></path></svg><span>Produção</span></button> <button class="nav" type="button" data-tab="board" aria-selected="true"><svg class="i" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M216,48H40a8,8,0,0,0-8,8V208a16,16,0,0,0,16,16H88a16,16,0,0,0,16-16V160h48v16a16,16,0,0,0,16,16h40a16,16,0,0,0,16-16V56A8,8,0,0,0,216,48ZM88,208H48V128H88Zm0-96H48V64H88Zm64,32H104V64h48Zm56,32H168V128h40Zm0-64H168V64h40Z"></path></svg><span>Produção</span></button>
<button class="nav" type="button" data-tab="quotes" aria-selected="false"><svg class="i" viewBox="0 0 20 20" aria-hidden="true"><path d="M5 2.75h7l3 3v11.5H5z M12 2.75v3h3 M7.5 9.5h5 M7.5 12.5h5 M7.5 15h3"></path></svg><span>Cotações</span><span class="pip" id="badge-quotes"></span></button> <button class="nav" type="button" data-tab="quotes" aria-selected="false"><svg class="i" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Zm-32-80a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,136Zm0,32a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,168Z"></path></svg><span>Cotações</span><span class="pip" id="badge-quotes"></span></button>
<button class="nav" type="button" data-tab="montar" aria-selected="false" hidden><svg class="i" viewBox="0 0 20 20" aria-hidden="true"><path d="M10 2.75l7 3.5-7 3.5-7-3.5z M3 10l7 3.5 7-3.5 M3 13.5L10 17l7-3.5"></path></svg><span>Montar</span></button> <button class="nav" type="button" data-tab="montar" aria-selected="false" hidden><svg class="i" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M230.91,172a8,8,0,0,1-2.91,10.91l-96,56a8,8,0,0,1-8.06,0l-96-56A8,8,0,0,1,36,169.09l92,53.65,92-53.65a8,8,0,0,1,10.91,2.91ZM220,121.09l-92,53.65L36,121.09a8,8,0,0,0-8,13.82l96,56a8,8,0,0,0,8.06,0l96-56a8,8,0,1,0-8.06-13.82ZM24,80a8,8,0,0,1,4-6.91l96-56a8,8,0,0,1,8.06,0l96,56a8,8,0,0,1,0,13.82l-96,56a8,8,0,0,1-8.06,0l-96-56A8,8,0,0,1,24,80m23.88,0L128,126.74,208.12,80,128,33.26Z"></path></svg><span>Montar</span></button>
<button class="nav" type="button" data-tab="payments" aria-selected="false"><svg class="i" viewBox="0 0 20 20" aria-hidden="true"><path d="M2.75 5h14.5v10H2.75z M2.75 8.25h14.5 M5.5 12.25h3"></path></svg><span>Pagamentos</span><span class="pip" id="badge-payments"></span></button> <button class="nav" type="button" data-tab="payments" aria-selected="false"><svg class="i" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M224,48H32A16,16,0,0,0,16,64V192a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V64A16,16,0,0,0,224,48Zm0,16V88H32V64Zm0,128H32V104H224v88Zm-16-24a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h32A8,8,0,0,1,208,168Zm-64,0a8,8,0,0,1-8,8H120a8,8,0,0,1,0-16h16A8,8,0,0,1,144,168Z"></path></svg><span>Pagamentos</span><span class="pip" id="badge-payments"></span></button>
<button class="nav" type="button" data-tab="stats" aria-selected="false"><svg class="i" viewBox="0 0 20 20" aria-hidden="true"><path d="M3 16.75h14 M4.75 14V9.5 M8.5 14V4.5 M12.25 14V7.5 M16 14v-3.5"></path></svg><span>Números</span></button> <button class="nav" type="button" data-tab="stats" aria-selected="false"><svg class="i" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M224,200h-8V40a8,8,0,0,0-8-8H152a8,8,0,0,0-8,8v40H96a8,8,0,0,0-8,8v40H48a8,8,0,0,0-8,8v64H32a8,8,0,0,0,0,16H224a8,8,0,0,0,0-16ZM160,48h40V200H160Zm-56,48h40v104H104Zm-48,48h32v56H56Z"></path></svg><span>Números</span></button>
<button class="nav" type="button" data-tab="site" aria-selected="false" hidden><svg class="i" viewBox="0 0 20 20" aria-hidden="true"><path d="M2.75 10a7.25 7.25 0 1 0 14.5 0a7.25 7.25 0 1 0 -14.5 0 M2.75 10h14.5 M10 2.75c2 2 3 4.5 3 7.25s-1 5.25-3 7.25 M10 2.75c-2 2-3 4.5-3 7.25s1 5.25 3 7.25"></path></svg><span>Site</span></button> <button class="nav" type="button" data-tab="site" aria-selected="false" hidden><svg class="i" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M128,24A104,104,0,1,0,232,128,104.12,104.12,0,0,0,128,24m88,104a87.6,87.6,0,0,1-3.33,24h-38.51a157.4,157.4,0,0,0,0-48h38.51a87.6,87.6,0,0,1,3.33,24m-114,40h52a115.1,115.1,0,0,1-26,45a115.3,115.3,0,0,1-26-45m-3.9-16a140.8,140.8,0,0,1,0-48h59.88a140.8,140.8,0,0,1,0,48ZM40,128a87.6,87.6,0,0,1,3.33-24h38.51a157.4,157.4,0,0,0,0,48H43.33A87.6,87.6,0,0,1,40,128m114-40h-52a115.1,115.1,0,0,1,26-45a115.3,115.3,0,0,1,26,45m52.33,0h-35.62a135.3,135.3,0,0,0-22.3-45.6A88.29,88.29,0,0,1,206.37,88Zm-98.74-45.6A135.3,135.3,0,0,0,85.29,88H49.63a88.29,88.29,0,0,1,57.96-45.6M49.63,168h35.66a135.3,135.3,0,0,0,22.3,45.6A88.29,88.29,0,0,1,49.63,168m98.78,45.6a135.3,135.3,0,0,0,22.3-45.6h35.66a88.29,88.29,0,0,1-57.96,45.6"></path></svg><span>Site</span></button>
<button class="nav" type="button" data-tab="integrations" aria-selected="false"><svg class="i" viewBox="0 0 20 20" aria-hidden="true"><path d="M8.5 6.5H6a3.25 3.25 0 0 0 0 6.5h2.5 M11.5 6.5H14a3.25 3.25 0 0 1 0 6.5h-2.5 M7 9.75h6"></path></svg><span>Integrações</span><span class="pip" id="badge-integrations" title="A pasta da fila precisa de atenção"></span></button> <button class="nav" type="button" data-tab="integrations" aria-selected="false"><svg class="i" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M240,88.23a54.43,54.43,0,0,1-16,37L189.25,160a54.27,54.27,0,0,1-38.63,16h-.05A54.63,54.63,0,0,1,96,119.84a8,8,0,0,1,16,.45A38.62,38.62,0,0,0,150.58,160a38.4,38.4,0,0,0,27.31-11.31l34.75-34.75a38.63,38.63,0,0,0-54.63-54.63l-11,11A8,8,0,0,1,135.7,59l11-11a54.65,54.65,0,0,1,77.3,0a54.86,54.86,0,0,1,16,40.23m-131,97.43l-11,11A38.4,38.4,0,0,1,70.6,208a38.63,38.63,0,0,1-27.29-65.94L78,107.31a38.63,38.63,0,0,1,66,28.4a8,8,0,0,0,16,.45A54.86,54.86,0,0,0,144,96a54.65,54.65,0,0,0-77.27,0L32,130.75A54.62,54.62,0,0,0,70.56,224a54.28,54.28,0,0,0,38.64-16l11-11a8,8,0,0,0-11.2-11.34"></path></svg><span>Integrações</span><span class="pip" id="badge-integrations" title="A pasta da fila precisa de atenção"></span></button>
<button class="nav" type="button" data-tab="users" aria-selected="false" hidden><svg class="i" viewBox="0 0 20 20" aria-hidden="true"><path d="M6.75 6.25a3.25 3.25 0 1 0 6.5 0a3.25 3.25 0 1 0 -6.5 0 M3.75 17c.6-3.2 3.1-5 6.25-5s5.65 1.8 6.25 5"></path></svg><span>Usuários</span></button> <button class="nav" type="button" data-tab="users" aria-selected="false" hidden><svg class="i" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M230.92,212c-15.23-26.33-38.7-45.21-66.09-54.16a72,72,0,1,0-73.66,0c-27.39,8.94-50.86,27.82-66.09,54.16a8,8,0,1,0,13.85,8c18.84-32.56,52.14-52,89.07-52s70.23,19.44,89.07,52a8,8,0,1,0,13.85-8M72,96a56,56,0,1,1,56,56a56.06,56.06,0,0,1-56-56"></path></svg><span>Usuários</span></button>
<button class="nav phone" id="more-nav" type="button" aria-haspopup="menu"><svg class="i" viewBox="0 0 20 20" aria-hidden="true"><path d="M4.1 10a.9.9 0 1 0 1.8 0a.9.9 0 1 0 -1.8 0 M9.1 10a.9.9 0 1 0 1.8 0a.9.9 0 1 0 -1.8 0 M14.1 10a.9.9 0 1 0 1.8 0a.9.9 0 1 0 -1.8 0"></path></svg><span>Mais</span><span class="pip" id="badge-more"></span></button> <button class="nav phone" id="more-nav" type="button" aria-haspopup="menu"><svg class="i" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z"></path></svg><span>Mais</span><span class="pip" id="badge-more"></span></button>
<span class="grow"></span> <span class="grow"></span>
<button class="railmachine" id="rail-machine" type="button" hidden><small>Máquina</small><b></b></button> <button class="railmachine" id="rail-machine" type="button" hidden><small>Máquina</small><b></b></button>
<button class="rbtn" id="theme-rail" type="button"><svg class="i" viewBox="0 0 20 20" aria-hidden="true"><path></path></svg></button> <button class="rbtn" id="theme-rail" type="button"><svg class="i" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor"></path></svg></button>
<div class="account"> <div class="account">
<button class="avatar" id="account" type="button" aria-haspopup="menu" aria-label="Minha conta"><span id="initials">·</span></button> <button class="avatar" id="account" type="button" aria-haspopup="menu" aria-label="Minha conta"><span id="initials">·</span></button>
<div class="menu acct" id="account-menu" role="menu" hidden> <div class="menu acct" id="account-menu" role="menu" hidden>
<div class="menu-head"><span class="ava" id="who-ava"><span id="who-initials"></span><i class="pres on"></i></span><span class="who-text"><b id="who"></b><span id="who-role"></span></span></div> <div class="menu-head"><span class="ava" id="who-ava"><span id="who-initials"></span><i class="pres on"></i></span><span class="who-text"><b id="who"></b><span id="who-role"></span></span></div>
<button class="menuitem" id="my-password" type="button" role="menuitem"><svg class="i m" viewBox="0 0 20 20" aria-hidden="true"><path d="M6.75 6.25a3.25 3.25 0 1 0 6.5 0a3.25 3.25 0 1 0 -6.5 0 M3.75 17c.6-3.2 3.1-5 6.25-5s5.65 1.8 6.25 5"></path></svg>Minha conta</button> <button class="menuitem" id="my-password" type="button" role="menuitem"><svg class="i m" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M230.92,212c-15.23-26.33-38.7-45.21-66.09-54.16a72,72,0,1,0-73.66,0c-27.39,8.94-50.86,27.82-66.09,54.16a8,8,0,1,0,13.85,8c18.84-32.56,52.14-52,89.07-52s70.23,19.44,89.07,52a8,8,0,1,0,13.85-8M72,96a56,56,0,1,1,56,56a56.06,56.06,0,0,1-56-56"></path></svg>Minha conta</button>
<button class="menuitem" id="account-machine" type="button" role="menuitem" hidden><svg class="i m" viewBox="0 0 20 20" aria-hidden="true"><path d="M5.75 7.5V3h8.5v4.5 M5.75 14H3V7.5h14V14h-2.75 M5.75 11.25h8.5v5.75h-8.5z"></path></svg>Trocar de máquina<span class="lbl"></span></button> <button class="menuitem" id="account-machine" type="button" role="menuitem" hidden><svg class="i m" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M214.67,72H200V40a8,8,0,0,0-8-8H64a8,8,0,0,0-8,8V72H41.33C27.36,72,16,82.77,16,96v80a8,8,0,0,0,8,8H56v32a8,8,0,0,0,8,8H192a8,8,0,0,0,8-8V184h32a8,8,0,0,0,8-8V96C240,82.77,228.64,72,214.67,72ZM72,48H184V72H72ZM184,208H72V160H184Zm40-40H200V152a8,8,0,0,0-8-8H64a8,8,0,0,0-8,8v16H32V96c0-4.41,4.19-8,9.33-8H214.67c5.14,0,9.33,3.59,9.33,8Zm-24-52a12,12,0,1,1-12-12A12,12,0,0,1,200,116Z"></path></svg>Trocar de máquina<span class="lbl"></span></button>
<div class="menusep"></div> <div class="menusep"></div>
<button class="menuitem" id="logout" type="button" role="menuitem"><svg class="i m" viewBox="0 0 20 20" aria-hidden="true"><path d="M8 3.25H3.75v13.5H8 M12 6.5l3.5 3.5-3.5 3.5 M15.5 10H7.5"></path></svg>Sair</button> <button class="menuitem" id="logout" type="button" role="menuitem"><svg class="i m" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z"></path></svg>Sair</button>
</div> </div>
</div> </div>
</nav> </nav>
<div class="shell"> <div class="shell">
<header class="top"> <header class="top">
<div class="ptitle"><svg class="mark phone" viewBox="0 0 40 40" aria-hidden="true"><path d="M8 5h24a2 2 0 0 1 2 2v19l-9 9H8a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2z" fill="currentColor"></path><path class="cut" d="M16 9v22 M24 9v14" fill="none" stroke-width="2"></path><path d="M34 26l-9 9v-7a2 2 0 0 1 2-2z" fill="var(--acc)"></path></svg><h1 id="page-title">Produção</h1><span id="board-summary"></span></div> <div class="ptitle"><svg class="mark phone" viewBox="0 0 40 40" aria-hidden="true"><path d="M8 5h24a2 2 0 0 1 2 2v19l-9 9H8a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2z" fill="currentColor"></path><path class="cut" d="M16 9v22 M24 9v14" fill="none" stroke-width="2"></path><path d="M34 26l-9 9v-7a2 2 0 0 1 2-2z" fill="var(--acc)"></path></svg><h1 id="page-title">Produção</h1><span id="board-summary"></span></div>
<button class="mic phone" id="search-open" type="button" aria-label="Buscar" aria-expanded="false"><svg class="i" viewBox="0 0 20 20" aria-hidden="true"><path d="M3.0 8.75a5.75 5.75 0 1 0 11.5 0a5.75 5.75 0 1 0 -11.5 0 M13 13l4.25 4.25"></path></svg></button> <button class="mic phone" id="search-open" type="button" aria-label="Buscar" aria-expanded="false"><svg class="i" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"></path></svg></button>
<button class="mic phone" id="filter-open" type="button" aria-label="Filtros"><svg class="i" viewBox="0 0 20 20" aria-hidden="true"><path d="M3 5h14 M5.5 10h9 M8 15h4"></path></svg><span class="dotn" id="filter-dot" hidden></span></button> <button class="mic phone" id="filter-open" type="button" aria-label="Filtros"><svg class="i" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M200,136a8,8,0,0,1-8,8H64a8,8,0,0,1,0-16H192A8,8,0,0,1,200,136Zm32-56H24a8,8,0,0,0,0,16H232a8,8,0,0,0,0-16Zm-80,96H104a8,8,0,0,0,0,16h48a8,8,0,0,0,0-16Z"></path></svg><span class="dotn" id="filter-dot" hidden></span></button>
<div class="searchbox"> <div class="searchbox">
<button class="mic phone" id="search-back" type="button" aria-label="Voltar"><svg class="i" viewBox="0 0 20 20" aria-hidden="true"><path d="M12 5.5L7.5 10l4.5 4.5"></path></svg></button> <button class="mic phone" id="search-back" type="button" aria-label="Voltar"><svg class="i" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z"></path></svg></button>
<label class="search"> <label class="search">
<svg class="i m" viewBox="0 0 20 20" aria-hidden="true"><path d="M3.0 8.75a5.75 5.75 0 1 0 11.5 0a5.75 5.75 0 1 0 -11.5 0 M13 13l4.25 4.25"></path></svg> <svg class="i m" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"></path></svg>
<input id="search" type="search" placeholder="Buscar cliente, CPF/CNPJ ou pedido" aria-label="Buscar em pedidos e cotações" autocomplete="off" role="combobox" aria-expanded="false" aria-controls="search-results"> <input id="search" type="search" placeholder="Buscar cliente, CPF/CNPJ ou pedido" aria-label="Buscar em pedidos e cotações" autocomplete="off" role="combobox" aria-expanded="false" aria-controls="search-results">
<kbd>/</kbd> <kbd>/</kbd>
</label> </label>
@@ -83,7 +83,7 @@
<div class="menu-label">Atualizar sozinho</div> <div class="menu-label">Atualizar sozinho</div>
<div id="sync-every"></div> <div id="sync-every"></div>
<div class="menusep"></div> <div class="menusep"></div>
<button class="menuitem" id="refresh" type="button" role="menuitem"><svg class="i m" viewBox="0 0 20 20" aria-hidden="true"><path d="M16.25 10a6.25 6.25 0 1 1-1.83-4.42 M16.5 3.25V6.5h-3.25"></path></svg>Atualizar agora</button> <button class="menuitem" id="refresh" type="button" role="menuitem"><svg class="i m" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z"></path></svg>Atualizar agora</button>
</div> </div>
<select id="refresh-every" aria-label="Atualizar sozinho a cada" hidden><option value="0">Desligado</option><option value="10">A cada 10 s</option><option value="30">A cada 30 s</option><option value="60">A cada 1 min</option><option value="300">A cada 5 min</option><option value="900">A cada 15 min</option></select> <select id="refresh-every" aria-label="Atualizar sozinho a cada" hidden><option value="0">Desligado</option><option value="10">A cada 10 s</option><option value="30">A cada 30 s</option><option value="60">A cada 1 min</option><option value="300">A cada 5 min</option><option value="900">A cada 15 min</option></select>
</div> </div>
@@ -95,7 +95,7 @@
<div class="tools"> <div class="tools">
<div class="seg" id="product-seg" role="group" aria-label="Produto"></div> <div class="seg" id="product-seg" role="group" aria-label="Produto"></div>
<div class="filterwrap"> <div class="filterwrap">
<button class="btn" id="filter-btn" type="button" aria-expanded="false" aria-controls="filter-pop"><svg class="i m" viewBox="0 0 20 20" aria-hidden="true"><path d="M3 5h14 M5.5 10h9 M8 15h4"></path></svg>Filtros<span class="coln" id="filter-count" hidden></span></button> <button class="btn" id="filter-btn" type="button" aria-expanded="false" aria-controls="filter-pop"><svg class="i m" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M200,136a8,8,0,0,1-8,8H64a8,8,0,0,1,0-16H192A8,8,0,0,1,200,136Zm32-56H24a8,8,0,0,0,0,16H232a8,8,0,0,0,0-16Zm-80,96H104a8,8,0,0,0,0,16h48a8,8,0,0,0,0-16Z"></path></svg>Filtros<span class="coln" id="filter-count" hidden></span></button>
<div class="pop filterpop" id="filter-pop" role="dialog" aria-label="Filtros" hidden></div> <div class="pop filterpop" id="filter-pop" role="dialog" aria-label="Filtros" hidden></div>
</div> </div>
<div class="filtertags" id="filter-tags"></div> <div class="filtertags" id="filter-tags"></div>
@@ -221,31 +221,31 @@
<div class="panel" id="stats-kpis"></div> <div class="panel" id="stats-kpis"></div>
<section class="panel"><div class="phead"><h2>Metros por dia</h2><span class="legend right" id="stats-legend"></span></div><div id="stats-chart"></div></section> <section class="panel"><div class="phead"><h2>Metros por dia</h2><span class="legend right" id="stats-legend"></span></div><div id="stats-chart"></div></section>
<div class="g12"> <div class="g12">
<section class="panel clip s4"><div class="phead"><h2>Por máquina</h2><span class="hint tip-r" tabindex="0" data-tip="Pedidos que chegaram a Finalizado no período, na máquina em que estavam. Impresso: o filme da folha, não o metro cobrado. Por hora: sobre o tempo em Imprimindo; pedidos imprimindo juntos na mesma máquina contam esse tempo uma vez."><svg class="i s" viewBox="0 0 20 20" aria-hidden="true"><path d="M2.75 10a7.25 7.25 0 1 0 14.5 0a7.25 7.25 0 1 0 -14.5 0 M10 9v4.5 M10 6.25v.75"></path></svg></span></div> <section class="panel clip s4"><div class="phead"><h2>Por máquina</h2><span class="hint tip-r" tabindex="0" data-tip="Pedidos que chegaram a Finalizado no período, na máquina em que estavam. Impresso: o filme da folha, não o metro cobrado. Por hora: sobre o tempo em Imprimindo; pedidos imprimindo juntos na mesma máquina contam esse tempo uma vez."><svg class="i s" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"></path></svg></span></div>
<div class="fillbox short"><div class="scrollin"><table class="table"><thead><tr><th scope="col">Máquina</th><th scope="col" class="r">Impresso</th><th scope="col" class="r">Por hora</th><th scope="col">Agora</th></tr></thead><tbody id="stats-machines"></tbody></table></div></div></section> <div class="fillbox short"><div class="scrollin"><table class="table"><thead><tr><th scope="col">Máquina</th><th scope="col" class="r">Impresso</th><th scope="col" class="r">Por hora</th><th scope="col">Agora</th></tr></thead><tbody id="stats-machines"></tbody></table></div></div></section>
<section class="panel clip s4"><div class="phead"><h2>Por origem</h2><span class="hint" tabindex="0" data-tip="Por onde o pedido entrou: o Site, os lotes do Dropflow ou a equipe, em Atendimento. Até Finalizado: do pagamento ao Finalizado, mediana, sem o tempo em Aguardando contato."><svg class="i s" viewBox="0 0 20 20" aria-hidden="true"><path d="M2.75 10a7.25 7.25 0 1 0 14.5 0a7.25 7.25 0 1 0 -14.5 0 M10 9v4.5 M10 6.25v.75"></path></svg></span></div> <section class="panel clip s4"><div class="phead"><h2>Por origem</h2><span class="hint" tabindex="0" data-tip="Por onde o pedido entrou: o Site, os lotes do Dropflow ou a equipe, em Atendimento. Até Finalizado: do pagamento ao Finalizado, mediana, sem o tempo em Aguardando contato."><svg class="i s" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"></path></svg></span></div>
<table class="table"><thead><tr><th scope="col">Origem</th><th scope="col" class="r">Pedidos</th><th scope="col" class="r">Metros</th><th scope="col" class="r">Recebido</th><th scope="col" class="r">Até Finalizado</th></tr></thead><tbody id="stats-origins"></tbody></table></section> <table class="table"><thead><tr><th scope="col">Origem</th><th scope="col" class="r">Pedidos</th><th scope="col" class="r">Metros</th><th scope="col" class="r">Recebido</th><th scope="col" class="r">Até Finalizado</th></tr></thead><tbody id="stats-origins"></tbody></table></section>
<section class="panel s4"><div class="phead"><h2>Artes tratadas, por quem aprovou</h2><span class="hint tip-l" tabindex="0" data-tip="Pedidos do período em que o arquivo final aprovado não é a arte do cliente: alguém da equipe preparou."><svg class="i s" viewBox="0 0 20 20" aria-hidden="true"><path d="M2.75 10a7.25 7.25 0 1 0 14.5 0a7.25 7.25 0 1 0 -14.5 0 M10 9v4.5 M10 6.25v.75"></path></svg></span></div> <section class="panel s4"><div class="phead"><h2>Artes tratadas, por quem aprovou</h2><span class="hint tip-l" tabindex="0" data-tip="Pedidos do período em que o arquivo final aprovado não é a arte do cliente: alguém da equipe preparou."><svg class="i s" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"></path></svg></span></div>
<div class="fillbox short"><div class="scrollin bylist" id="stats-treated"></div></div></section> <div class="fillbox short"><div class="scrollin bylist" id="stats-treated"></div></div></section>
</div> </div>
<section class="panel clip"><div class="phead"><h2>Preço de tabela (não é caixa)</h2><span class="hint tip-l" tabindex="0" data-tip="Pedidos Internos e faturados do período: o preço de tabela fica registrado no pedido, mas esse valor não é dinheiro recebido."><svg class="i s" viewBox="0 0 20 20" aria-hidden="true"><path d="M2.75 10a7.25 7.25 0 1 0 14.5 0a7.25 7.25 0 1 0 -14.5 0 M10 9v4.5 M10 6.25v.75"></path></svg></span></div> <section class="panel clip"><div class="phead"><h2>Preço de tabela (não é caixa)</h2><span class="hint tip-l" tabindex="0" data-tip="Pedidos Internos e faturados do período: o preço de tabela fica registrado no pedido, mas esse valor não é dinheiro recebido."><svg class="i s" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"></path></svg></span></div>
<table class="table"><thead><tr><th scope="col">Forma</th><th scope="col" class="r">Pedidos</th><th scope="col" class="r">Metros</th><th scope="col" class="r">Valor</th></tr></thead><tbody id="stats-price-table"></tbody></table></section> <table class="table"><thead><tr><th scope="col">Forma</th><th scope="col" class="r">Pedidos</th><th scope="col" class="r">Metros</th><th scope="col" class="r">Valor</th></tr></thead><tbody id="stats-price-table"></tbody></table></section>
<div class="g12"> <div class="g12">
<section class="panel clip s6"><div class="phead"><h2>Retrabalho</h2><span class="hint" tabindex="0" data-tip="Metros refeitos sobre o filme impresso no período, só os autorizados, pela data em que foram abertos. Arte ruim aprovada pelo cliente fica fora da meta."><svg class="i s" viewBox="0 0 20 20" aria-hidden="true"><path d="M2.75 10a7.25 7.25 0 1 0 14.5 0a7.25 7.25 0 1 0 -14.5 0 M10 9v4.5 M10 6.25v.75"></path></svg></span><span class="pill warn right" id="stats-rework-pending-pill" hidden></span></div> <section class="panel clip s6"><div class="phead"><h2>Retrabalho</h2><span class="hint" tabindex="0" data-tip="Metros refeitos sobre o filme impresso no período, só os autorizados, pela data em que foram abertos. Arte ruim aprovada pelo cliente fica fora da meta."><svg class="i s" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"></path></svg></span><span class="pill warn right" id="stats-rework-pending-pill" hidden></span></div>
<table class="table"><thead><tr><th scope="col">Causa</th><th scope="col" class="r">Refeito</th><th scope="col" class="w50" id="stats-rework-film">Do impresso, contra a meta</th></tr></thead><tbody id="stats-rework"></tbody></table> <table class="table"><thead><tr><th scope="col">Causa</th><th scope="col" class="r">Refeito</th><th scope="col" class="w50" id="stats-rework-film">Do impresso, contra a meta</th></tr></thead><tbody id="stats-rework"></tbody></table>
<details class="psub"><summary>Por quem imprimiu e aguardando autorização</summary> <details class="psub"><summary>Por quem imprimiu e aguardando autorização</summary>
<h3>Da casa, por quem imprimiu</h3> <h3>Da casa, por quem imprimiu</h3>
<table class="table"><tbody id="stats-rework-printers"></tbody></table> <table class="table"><tbody id="stats-rework-printers"></tbody></table>
<h3>Aguardando autorização</h3><ul class="plainlist" id="stats-rework-pending"></ul></details></section> <h3>Aguardando autorização</h3><ul class="plainlist" id="stats-rework-pending"></ul></details></section>
<section class="panel clip s6"><div class="phead"><h2>Tempo em cada etapa</h2><span class="hint tip-l" tabindex="0" data-tip="Tempo mediano por pedido: quem voltou para a etapa soma cada passagem. O tempo em Aguardando contato não conta."><svg class="i s" viewBox="0 0 20 20" aria-hidden="true"><path d="M2.75 10a7.25 7.25 0 1 0 14.5 0a7.25 7.25 0 1 0 -14.5 0 M10 9v4.5 M10 6.25v.75"></path></svg></span><button class="btn right" id="edit-stage-limits" type="button" hidden>Editar tempos</button></div> <section class="panel clip s6"><div class="phead"><h2>Tempo em cada etapa</h2><span class="hint tip-l" tabindex="0" data-tip="Tempo mediano por pedido: quem voltou para a etapa soma cada passagem. O tempo em Aguardando contato não conta."><svg class="i s" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"></path></svg></span><button class="btn right" id="edit-stage-limits" type="button" hidden>Editar tempos</button></div>
<table class="table"><thead><tr><th scope="col">Etapa</th><th scope="col" class="r">Média</th><th scope="col" class="r">Aceitável</th><th scope="col" class="r">Estouros</th><th scope="col">Agora</th></tr></thead><tbody id="stats-stages"></tbody></table></section> <table class="table"><thead><tr><th scope="col">Etapa</th><th scope="col" class="r">Média</th><th scope="col" class="r">Aceitável</th><th scope="col" class="r">Estouros</th><th scope="col">Agora</th></tr></thead><tbody id="stats-stages"></tbody></table></section>
</div> </div>
<section class="panel clip"><div class="phead"><h2>Pedidos sem pagamento</h2><span class="hint" tabindex="0" data-tip="Cotações aprovadas no período, pela data de aprovação. Pagas viraram pedido; expiradas passaram de 24 horas sem pagamento; aguardando ainda podem ser pagas. A taxa de abandono é expiradas sobre pagas mais expiradas."><svg class="i s" viewBox="0 0 20 20" aria-hidden="true"><path d="M2.75 10a7.25 7.25 0 1 0 14.5 0a7.25 7.25 0 1 0 -14.5 0 M10 9v4.5 M10 6.25v.75"></path></svg></span></div> <section class="panel clip"><div class="phead"><h2>Pedidos sem pagamento</h2><span class="hint" tabindex="0" data-tip="Cotações aprovadas no período, pela data de aprovação. Pagas viraram pedido; expiradas passaram de 24 horas sem pagamento; aguardando ainda podem ser pagas. A taxa de abandono é expiradas sobre pagas mais expiradas."><svg class="i s" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"></path></svg></span></div>
<table class="table"><thead><tr><th scope="col">Indicador</th><th scope="col" class="r">Valor</th></tr></thead><tbody id="stats-unpaid"></tbody></table></section> <table class="table"><thead><tr><th scope="col">Indicador</th><th scope="col" class="r">Valor</th></tr></thead><tbody id="stats-unpaid"></tbody></table></section>
<section class="panel clip" id="stats-machine-panel"><div class="phead"><h2>Máquinas, mês a mês</h2><div class="mnav" id="stats-machine-nav"></div></div> <section class="panel clip" id="stats-machine-panel"><div class="phead"><h2>Máquinas, mês a mês</h2><div class="mnav" id="stats-machine-nav"></div></div>
<div class="fillbox machinebox"><div class="scrollin"><table class="table machine-month"><thead id="stats-machine-head"></thead><tbody id="stats-machine-body"></tbody></table></div></div> <div class="fillbox machinebox"><div class="scrollin"><table class="table machine-month"><thead id="stats-machine-head"></thead><tbody id="stats-machine-body"></tbody></table></div></div>
<p class="phint" id="stats-machine-note"></p></section> <p class="phint" id="stats-machine-note"></p></section>
<section class="panel clip"><div class="phead"><h2>Velocidade do site e do Prumo</h2><span class="hint tip-l" tabindex="0" data-tip="Média e p95 do que o cliente sente, por pedido pago no período: abrir a página, subir o arquivo (segundos por MB), a conferência do Prumo, a montagem das avulsas, a geração do arquivo final por 10 m e o tempo do evento de pagamento até o card. Referências: página < 3 s; conferência < 30 s; geração < 2 min por 10 m; card em até 1 min."><svg class="i s" viewBox="0 0 20 20" aria-hidden="true"><path d="M2.75 10a7.25 7.25 0 1 0 14.5 0a7.25 7.25 0 1 0 -14.5 0 M10 9v4.5 M10 6.25v.75"></path></svg></span></div> <section class="panel clip"><div class="phead"><h2>Velocidade do site e do Prumo</h2><span class="hint tip-l" tabindex="0" data-tip="Média e p95 do que o cliente sente, por pedido pago no período: abrir a página, subir o arquivo (segundos por MB), a conferência do Prumo, a montagem das avulsas, a geração do arquivo final por 10 m e o tempo do evento de pagamento até o card. Referências: página < 3 s; conferência < 30 s; geração < 2 min por 10 m; card em até 1 min."><svg class="i s" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"></path></svg></span></div>
<table class="table"><thead><tr><th scope="col">Etapa</th><th scope="col" class="r">Média</th><th scope="col" class="r">p95</th><th scope="col" class="r">Amostras</th></tr></thead><tbody id="stats-speed"></tbody></table></section> <table class="table"><thead><tr><th scope="col">Etapa</th><th scope="col" class="r">Média</th><th scope="col" class="r">p95</th><th scope="col" class="r">Amostras</th></tr></thead><tbody id="stats-speed"></tbody></table></section>
</section> </section>
<section id="tab-site" class="page" hidden> <section id="tab-site" class="page" hidden>
@@ -269,14 +269,14 @@
<section class="panel clip"> <section class="panel clip">
<div class="phead"><h2>Pessoas</h2><span class="n" id="users-count"></span> <div class="phead"><h2>Pessoas</h2><span class="n" id="users-count"></span>
<span class="plegend"><span title="Usou o sistema nos últimos 15 minutos"><i class="pres on"></i>Ativo agora</span><span><i class="pres away"></i>Inativo</span><span><i class="pres never"></i>Nunca entrou</span><span><i class="pres off"></i>Desativado</span></span> <span class="plegend"><span title="Usou o sistema nos últimos 15 minutos"><i class="pres on"></i>Ativo agora</span><span><i class="pres away"></i>Inativo</span><span><i class="pres never"></i>Nunca entrou</span><span><i class="pres off"></i>Desativado</span></span>
<button class="btn right" id="new-user" type="button"><svg class="i m" viewBox="0 0 20 20" aria-hidden="true"><path d="M10 4v12 M4 10h12"></path></svg>Novo usuário</button></div> <button class="btn right" id="new-user" type="button"><svg class="i m" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"></path></svg>Novo usuário</button></div>
<div class="mlist phone" id="users-phone"></div> <div class="mlist phone" id="users-phone"></div>
<div class="scrollbox people"><table class="table"><thead><tr><th scope="col">Nome</th><th scope="col">Perfil</th><th scope="col">Máquina agora</th><th scope="col">Último acesso</th><th scope="col"><span class="vh">Editar</span></th></tr></thead><tbody id="users-list"></tbody></table></div> <div class="scrollbox people"><table class="table"><thead><tr><th scope="col">Nome</th><th scope="col">Perfil</th><th scope="col">Máquina agora</th><th scope="col">Último acesso</th><th scope="col"><span class="vh">Editar</span></th></tr></thead><tbody id="users-list"></tbody></table></div>
</section> </section>
<div class="cols2 lean"> <div class="cols2 lean">
<section class="panel clip"><div class="phead"><h2>O que cada perfil faz</h2><span class="canlegend right"><span><i class="can"></i>faz</span><span><i class="can view"></i>só consulta</span></span></div> <section class="panel clip"><div class="phead"><h2>O que cada perfil faz</h2><span class="canlegend right"><span><i class="can"></i>faz</span><span><i class="can view"></i>só consulta</span></span></div>
<div class="scrollx"><table class="table matrix" id="roles-matrix"></table></div></section> <div class="scrollx"><table class="table matrix" id="roles-matrix"></table></div></section>
<section class="panel clip"><div class="phead"><h2>Máquinas</h2><span class="n" id="machines-count"></span><button class="btn right" id="new-machine" type="button"><svg class="i m" viewBox="0 0 20 20" aria-hidden="true"><path d="M10 4v12 M4 10h12"></path></svg>Nova máquina</button></div> <section class="panel clip"><div class="phead"><h2>Máquinas</h2><span class="n" id="machines-count"></span><button class="btn right" id="new-machine" type="button"><svg class="i m" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"></path></svg>Nova máquina</button></div>
<p class="phint">Cada pedido vai para a máquina do produto com menos metros em aberto, dentro do limite. No pedido dá para trocar.</p> <p class="phint">Cada pedido vai para a máquina do produto com menos metros em aberto, dentro do limite. No pedido dá para trocar.</p>
<div class="fillbox"><div class="mtiles" id="machines-list"></div></div></section> <div class="fillbox"><div class="mtiles" id="machines-list"></div></div></section>
</div> </div>

View File

@@ -102,56 +102,55 @@ function say(text,error=false,ms){
for(const id of ['status','login-status']){$(id).textContent=text||'';$(id).classList.toggle('error',!!error);} for(const id of ['status','login-status']){$(id).textContent=text||'';$(id).classList.toggle('error',!!error);}
if(text)sayTimer=setTimeout(()=>say(''),ms??(error?8000:4000)); if(text)sayTimer=setTimeout(()=>say(''),ms??(error?8000:4000));
} }
// The redesign's icons (the design canvas of 2026-10-30): one 20 px grid, // Phosphor icons (regular, MIT): a 256 px viewBox filled with the text
// square ends, drawn by svgIcon with the classes i (20), i m (16), i s (14). // colour. svgIcon keeps the same classes: i (20), i m (16), i s (14).
const C=(x,y,r)=>'M'+(x-r)+' '+y+'a'+r+' '+r+' 0 1 0 '+(2*r)+' 0a'+r+' '+r+' 0 1 0 '+(-2*r)+' 0';
const IC={ const IC={
search:C(8.75,8.75,5.75)+' M13 13l4.25 4.25', search:'M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z',
filter:'M3 5h14 M5.5 10h9 M8 15h4', filter:'M200,136a8,8,0,0,1-8,8H64a8,8,0,0,1,0-16H192A8,8,0,0,1,200,136Zm32-56H24a8,8,0,0,0,0,16H232a8,8,0,0,0,0-16Zm-80,96H104a8,8,0,0,0,0,16h48a8,8,0,0,0,0-16Z',
download:'M10 3v9.5 M6 8.75l4 4 4-4 M3.75 16.75h12.5', download:'M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,124.69V32a8,8,0,0,0-16,0v92.69L93.66,98.34a8,8,0,0,0-11.32,11.32Z',
upload:'M10 13V3.5 M6 7.25l4-4 4 4 M3.75 16.75h12.5', upload:'M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0ZM93.66,77.66,120,51.31V144a8,8,0,0,0,16,0V51.31l26.34,26.35a8,8,0,0,0,11.32-11.32l-40-40a8,8,0,0,0-11.32,0l-40,40A8,8,0,0,0,93.66,77.66Z',
close:'M5 5l10 10 M15 5L5 15', close:'M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z',
copy:'M7 7h9.25v9.25H7z M4 13V3.75h9', copy:'M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z',
phone:'M6.75 3h-3v1.5A12.25 12.25 0 0 0 15.5 16.25H17v-3l-3.25-1-1.5 1.5a8 8 0 0 1-4.25-4.25l1.5-1.5z', phone:'M222.37,158.46l-47.11-21.11-.13-.06a16,16,0,0,0-15.17,1.4,8.12,8.12,0,0,0-.75.56L134.87,160c-15.42-7.49-31.34-23.29-38.83-38.51l20.78-24.71c.2-.25.39-.5.57-.77a16,16,0,0,0,1.32-15.06l0-.12L97.54,33.64a16,16,0,0,0-16.62-9.52A56.26,56.26,0,0,0,32,80c0,79.4,64.6,144,144,144a56.26,56.26,0,0,0,55.88-48.92A16,16,0,0,0,222.37,158.46ZM176,208A128.14,128.14,0,0,1,48,80,40.2,40.2,0,0,1,82.87,40a.61.61,0,0,0,0,.12l21,47L83.2,111.86a6.13,6.13,0,0,0-.57.77,16,16,0,0,0-1,15.7c9.06,18.53,27.73,37.06,46.46,46.11a16,16,0,0,0,15.75-1.14,8.44,8.44,0,0,0,.74-.56L168.89,152l47,21.05h0s.08,0,.11,0A40.21,40.21,0,0,1,176,208Z',
chat:'M3.25 16.75l1-3.25a6.75 6.75 0 1 1 2.5 2.5z', chat:'M128,24A104,104,0,0,0,36.18,176.88L24.83,210.93a16,16,0,0,0,20.24,20.24l34.05-11.35A104,104,0,1,0,128,24Zm0,192a87.87,87.87,0,0,1-44.06-11.81,8,8,0,0,0-6.54-.67L40,216,52.47,178.6a8,8,0,0,0-.66-6.54A88,88,0,1,1,128,216Z',
truck:'M2.75 5h9.5v8.5h-9.5z M12.25 8h3l2 2.75v2.75h-5 '+C(5.75,15.25,1.5)+' '+C(14.5,15.25,1.5), truck:'M255.42,117l-14-35A15.93,15.93,0,0,0,226.58,72H192V64a8,8,0,0,0-8-8H32A16,16,0,0,0,16,72V184a16,16,0,0,0,16,16H49a32,32,0,0,0,62,0h50a32,32,0,0,0,62,0h17a16,16,0,0,0,16-16V120A7.94,7.94,0,0,0,255.42,117ZM192,88h34.58l9.6,24H192ZM32,72H176v64H32ZM80,208a16,16,0,1,1,16-16A16,16,0,0,1,80,208Zm81-24H111a32,32,0,0,0-62,0H32V152H176v12.31A32.11,32.11,0,0,0,161,184Zm31,24a16,16,0,1,1,16-16A16,16,0,0,1,192,208Zm48-24H223a32.06,32.06,0,0,0-31-24V128h48Z',
pin:'M10 17.5s-5.25-4.75-5.25-9a5.25 5.25 0 0 1 10.5 0c0 4.25-5.25 9-5.25 9z '+C(10,8.5,1.75), pin:'M128,64a40,40,0,1,0,40,40A40,40,0,0,0,128,64Zm0,64a24,24,0,1,1,24-24A24,24,0,0,1,128,128Zm0-112a88.1,88.1,0,0,0-88,88c0,31.4,14.51,64.68,42,96.25a254.19,254.19,0,0,0,41.45,38.3,8,8,0,0,0,9.18,0A254.19,254.19,0,0,0,174,200.25c27.45-31.57,42-64.85,42-96.25A88.1,88.1,0,0,0,128,16Zm0,206c-16.53-13-72-60.75-72-118a72,72,0,0,1,144,0C200,161.23,144.53,209,128,222Z',
check:'M4 10.5l3.75 3.75L16 6', check:'M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z',
alert:C(10,10,7.25)+' M10 6v5 M10 13.25v1', alert:'M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z',
info:C(10,10,7.25)+' M10 9v4.5 M10 6.25v.75', info:'M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z',
arrow:'M4 10h11 M11 5.5l4.5 4.5-4.5 4.5', arrow:'M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z',
left:'M12 5.5L7.5 10l4.5 4.5', left:'M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z',
right:'M8 5.5l4.5 4.5L8 14.5', right:'M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z',
first:'M10 5.5L5.5 10l4.5 4.5 M15 5.5L10.5 10l4.5 4.5', first:'M205.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L131.31,128ZM51.31,128l74.35-74.34a8,8,0,0,0-11.32-11.32l-80,80a8,8,0,0,0,0,11.32l80,80a8,8,0,0,0,11.32-11.32Z',
last:'M5 5.5l4.5 4.5L5 14.5 M10 5.5l4.5 4.5L10 14.5', last:'M141.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L124.69,128,50.34,53.66A8,8,0,0,1,61.66,42.34l80,80A8,8,0,0,1,141.66,133.66Zm80-11.32-80-80a8,8,0,0,0-11.32,11.32L204.69,128l-74.35,74.34a8,8,0,0,0,11.32,11.32l80-80A8,8,0,0,0,221.66,122.34Z',
down:'M5.5 8l4.5 4.5L14.5 8', down:'M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z',
plus:'M10 4v12 M4 10h12', plus:'M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z',
more:C(5,10,.9)+' '+C(10,10,.9)+' '+C(15,10,.9), more:'M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z',
folder:'M2.75 5h5l1.5 1.75h8v9.5H2.75z', folder:'M216,72H131.31L104,44.69A15.86,15.86,0,0,0,92.69,40H40A16,16,0,0,0,24,56V200.62A15.4,15.4,0,0,0,39.38,216H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72ZM40,56H92.69l16,16H40ZM216,200H40V88H216Z',
mail:'M2.75 4.75h14.5v10.5H2.75z M2.75 5l7.25 6 7.25-6', mail:'M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48ZM203.43,64,128,133.15,52.57,64ZM216,192H40V74.19l82.59,75.71a8,8,0,0,0,10.82,0L216,74.19V192Z',
box:'M3 6.5L10 3l7 3.5v7L10 17l-7-3.5z M3 6.5l7 3.5 7-3.5 M10 10v7', box:'M223.68,66.15,135.68,18a15.88,15.88,0,0,0-15.36,0l-88,48.17a16,16,0,0,0-8.32,14v95.64a16,16,0,0,0,8.32,14l88,48.17a15.88,15.88,0,0,0,15.36,0l88-48.17a16,16,0,0,0,8.32-14V80.18A16,16,0,0,0,223.68,66.15ZM128,32l80.34,44-29.77,16.3-80.35-44ZM128,120,47.66,76l33.9-18.56,80.34,44ZM40,90l80,43.78v85.79L40,175.82Zm176,85.78h0l-80,43.79V133.82l32-17.51V152a8,8,0,0,0,16,0V107.55L216,90v85.77Z',
file:'M5 2.75h6.5L15 6.25v11H5z M11.5 2.75v3.5H15 M7.5 10.5h5 M7.5 13.5h5', file:'M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Zm-32-80a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,136Zm0,32a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,168Z',
calendar:'M3 4.75h14v12H3z M3 8.25h14 M7 3v3 M13 3v3', calendar:'M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM72,48v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24V80H48V48ZM208,208H48V96H208V208Z',
card:'M2.75 5h14.5v10H2.75z M2.75 8.25h14.5', card:'M224,48H32A16,16,0,0,0,16,64V192a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V64A16,16,0,0,0,224,48Zm0,16V88H32V64Zm0,128H32V104H224v88Zm-16-24a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h32A8,8,0,0,1,208,168Zm-64,0a8,8,0,0,1-8,8H120a8,8,0,0,1,0-16h16A8,8,0,0,1,144,168Z',
bag:'M4 7h12l-1 10.25H5z M7.25 7V5.5a2.75 2.75 0 0 1 5.5 0V7', bag:'M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,160H40V56H216V200ZM176,88a48,48,0,0,1-96,0,8,8,0,0,1,16,0,32,32,0,0,0,64,0,8,8,0,0,1,16,0Z',
key:C(6.5,13.5,3.25)+' M8.8 11.2L16 4 M13.5 6.5l2 2', key:'M216.57,39.43A80,80,0,0,0,83.91,120.78L28.69,176A15.86,15.86,0,0,0,24,187.31V216a16,16,0,0,0,16,16H72a8,8,0,0,0,8-8V208H96a8,8,0,0,0,8-8V184h16a8,8,0,0,0,5.66-2.34l9.56-9.57A79.73,79.73,0,0,0,160,176h.1A80,80,0,0,0,216.57,39.43ZM224,98.1c-1.09,34.09-29.75,61.86-63.89,61.9H160a63.7,63.7,0,0,1-23.65-4.51,8,8,0,0,0-8.84,1.68L116.69,168H96a8,8,0,0,0-8,8v16H72a8,8,0,0,0-8,8v16H40V187.31l58.83-58.82a8,8,0,0,0,1.68-8.84A63.72,63.72,0,0,1,96,95.92c0-34.14,27.81-62.8,61.9-63.89A64,64,0,0,1,224,98.1ZM192,76a12,12,0,1,1-12-12A12,12,0,0,1,192,76Z',
database:'M3.75 5c0-1.25 2.8-2.25 6.25-2.25s6.25 1 6.25 2.25-2.8 2.25-6.25 2.25S3.75 6.25 3.75 5z M3.75 5v10c0 1.25 2.8 2.25 6.25 2.25s6.25-1 6.25-2.25V5 M3.75 10c0 1.25 2.8 2.25 6.25 2.25s6.25-1 6.25-2.25', database:'M128,24C74.17,24,32,48.6,32,80v96c0,31.4,42.17,56,96,56s96-24.6,96-56V80C224,48.6,181.83,24,128,24Zm80,104c0,9.62-7.88,19.43-21.61,26.92C170.93,163.35,150.19,168,128,168s-42.93-4.65-58.39-13.08C55.88,147.43,48,137.62,48,128V111.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64ZM69.61,53.08C85.07,44.65,105.81,40,128,40s42.93,4.65,58.39,13.08C200.12,60.57,208,70.38,208,80s-7.88,19.43-21.61,26.92C170.93,115.35,150.19,120,128,120s-42.93-4.65-58.39-13.08C55.88,99.43,48,89.62,48,80S55.88,60.57,69.61,53.08ZM186.39,202.92C170.93,211.35,150.19,216,128,216s-42.93-4.65-58.39-13.08C55.88,195.43,48,185.62,48,176V159.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64V176C208,185.62,200.12,195.43,186.39,202.92Z',
refresh:'M16.25 10a6.25 6.25 0 1 1-1.83-4.42 M16.5 3.25V6.5h-3.25', refresh:'M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z',
rework:'M15.5 7.5A6 6 0 0 0 4.25 9 M4.5 12.5A6 6 0 0 0 15.75 11 M15.75 3.75V7.5H12 M4.25 16.25V12.5H8', rework:'M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z',
back:'M8 5L4 9l4 4 M4 9h8a4 4 0 0 1 0 8h-2', back:'M232,144a64.07,64.07,0,0,1-64,64H80a8,8,0,0,1,0-16h88a48,48,0,0,0,0-96H51.31l34.35,34.34a8,8,0,0,1-11.32,11.32l-48-48a8,8,0,0,1,0-11.32l48-48A8,8,0,0,1,85.66,45.66L51.31,80H168A64.07,64.07,0,0,1,232,144Z',
ban:C(10,10,7.25)+' M5 15L15 5', ban:'M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm88,104a87.56,87.56,0,0,1-20.41,56.28L71.72,60.4A88,88,0,0,1,216,128ZM40,128A87.56,87.56,0,0,1,60.41,71.72L184.28,195.6A88,88,0,0,1,40,128Z',
logout:'M8 3.25H3.75v13.5H8 M12 6.5l3.5 3.5-3.5 3.5 M15.5 10H7.5', logout:'M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z',
printer:'M5.75 7.5V3h8.5v4.5 M5.75 14H3V7.5h14V14h-2.75 M5.75 11.25h8.5v5.75h-8.5z', printer:'M214.67,72H200V40a8,8,0,0,0-8-8H64a8,8,0,0,0-8,8V72H41.33C27.36,72,16,82.77,16,96v80a8,8,0,0,0,8,8H56v32a8,8,0,0,0,8,8H192a8,8,0,0,0,8-8V184h32a8,8,0,0,0,8-8V96C240,82.77,228.64,72,214.67,72ZM72,48H184V72H72ZM184,208H72V160H184Zm40-40H200V152a8,8,0,0,0-8-8H64a8,8,0,0,0-8,8v16H32V96c0-4.41,4.19-8,9.33-8H214.67c5.14,0,9.33,3.59,9.33,8Zm-24-52a12,12,0,1,1-12-12A12,12,0,0,1,200,116Z',
eye:'M2.5 10s2.75-5.25 7.5-5.25S17.5 10 17.5 10s-2.75 5.25-7.5 5.25S2.5 10 2.5 10z '+C(10,10,2.25), eye:'M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z',
camera:'M2.75 6.5h3.25l1.25-2.5h5.5l1.25 2.5h3.25v9.5H2.75z '+C(10,11.25,2.75), camera:'M208,56H180.28L166.65,35.56A8,8,0,0,0,160,32H96a8,8,0,0,0-6.65,3.56L75.71,56H48A24,24,0,0,0,24,80V192a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V80A24,24,0,0,0,208,56Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8H80a8,8,0,0,0,6.66-3.56L100.28,48h55.43l13.63,20.44A8,8,0,0,0,176,72h32a8,8,0,0,1,8,8ZM128,88a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,88Zm0,72a28,28,0,1,1,28-28A28,28,0,0,1,128,160Z',
edit:'M12.5 4l3.5 3.5L7.5 16H4v-3.5z M10.5 6l3.5 3.5', edit:'M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z',
user:C(10,6.25,3.25)+' M3.75 17c.6-3.2 3.1-5 6.25-5s5.65 1.8 6.25 5', user:'M230.92,212c-15.23-26.33-38.7-45.21-66.09-54.16a72,72,0,1,0-73.66,0C63.78,166.78,40.31,185.66,25.08,212a8,8,0,1,0,13.85,8c18.84-32.56,52.14-52,89.07-52s70.23,19.44,89.07,52a8,8,0,1,0,13.85-8ZM72,96a56,56,0,1,1,56,56A56.06,56.06,0,0,1,72,96Z',
link:'M8.5 6.5H6a3.25 3.25 0 0 0 0 6.5h2.5 M11.5 6.5H14a3.25 3.25 0 0 1 0 6.5h-2.5 M7 9.75h6', link:'M240,88.23a54.43,54.43,0,0,1-16,37L189.25,160a54.27,54.27,0,0,1-38.63,16h-.05A54.63,54.63,0,0,1,96,119.84a8,8,0,0,1,16,.45A38.62,38.62,0,0,0,150.58,160h0a38.39,38.39,0,0,0,27.31-11.31l34.75-34.75a38.63,38.63,0,0,0-54.63-54.63l-11,11A8,8,0,0,1,135.7,59l11-11A54.65,54.65,0,0,1,224,48,54.86,54.86,0,0,1,240,88.23ZM109,185.66l-11,11A38.41,38.41,0,0,1,70.6,208h0a38.63,38.63,0,0,1-27.29-65.94L78,107.31A38.63,38.63,0,0,1,144,135.71a8,8,0,0,0,16,.45A54.86,54.86,0,0,0,144,96a54.65,54.65,0,0,0-77.27,0L32,130.75A54.62,54.62,0,0,0,70.56,224h0a54.28,54.28,0,0,0,38.64-16l11-11A8,8,0,0,0,109,185.66Z',
}; };
function svgIcon(d,className='i'){ function svgIcon(d,className='i'){
const ns='http://www.w3.org/2000/svg',svg=document.createElementNS(ns,'svg'),path=document.createElementNS(ns,'path'); const ns='http://www.w3.org/2000/svg',svg=document.createElementNS(ns,'svg'),path=document.createElementNS(ns,'path');
svg.setAttribute('class',className);svg.setAttribute('viewBox','0 0 20 20');svg.setAttribute('aria-hidden','true'); svg.setAttribute('class',className);svg.setAttribute('viewBox','0 0 256 256');svg.setAttribute('aria-hidden','true');
path.setAttribute('d',d);svg.append(path);return svg; path.setAttribute('fill','currentColor');path.setAttribute('d',d);svg.append(path);return svg;
} }
// ---- Badges: one system on every screen (canvas "Kanban DTF — redesign", v2) -- // ---- Badges: one system on every screen (canvas "Kanban DTF — redesign", v2) --
@@ -866,12 +865,12 @@ function renderFilters(){
} }
// Each column's mark (the design canvas): what happens in that stage. // Each column's mark (the design canvas): what happens in that stage.
const GLYPH={ const GLYPH={
rec:'M10 3v8 M6.75 7.75L10 11l3.25-3.25 M3 12h4l1 2h4l1-2h4v4.5H3z', rec:'M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,16V152h-28.7A15.86,15.86,0,0,0,168,156.69L148.69,176H107.31L88,156.69A15.86,15.86,0,0,0,76.69,152H48V48Zm0,160H48V168H76.69L96,187.31A15.86,15.86,0,0,0,107.31,192h41.38A15.86,15.86,0,0,0,160,187.31L179.31,168H208v40ZM90.34,125.66a8,8,0,0,1,11.32-11.32L120,132.69V72a8,8,0,0,1,16,0v60.69l18.34-18.35a8,8,0,0,1,11.32,11.32l-32,32a8,8,0,0,1-11.32,0Z',
tra:'M3 5h9 M3 10h9 M3 15h5 M11.5 14.25l2.25 2.25 3.75-4', tra:'M224,128a8,8,0,0,1-8,8H128a8,8,0,0,1,0-16h88A8,8,0,0,1,224,128ZM128,72h88a8,8,0,0,0,0-16H128a8,8,0,0,0,0,16Zm88,112H128a8,8,0,0,0,0,16h88a8,8,0,0,0,0-16ZM82.34,42.34,56,68.69,45.66,58.34A8,8,0,0,0,34.34,69.66l16,16a8,8,0,0,0,11.32,0l32-32A8,8,0,0,0,82.34,42.34Zm0,64L56,132.69,45.66,122.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32Zm0,64L56,196.69,45.66,186.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32Z',
imp:'M5.75 7.5V3h8.5v4.5 M5.75 14H3V7.5h14V14h-2.75 M5.75 11.25h8.5v5.75h-8.5z', imp:'M214.67,72H200V40a8,8,0,0,0-8-8H64a8,8,0,0,0-8,8V72H41.33C27.36,72,16,82.77,16,96v80a8,8,0,0,0,8,8H56v32a8,8,0,0,0,8,8H192a8,8,0,0,0,8-8V184h32a8,8,0,0,0,8-8V96C240,82.77,228.64,72,214.67,72ZM72,48H184V72H72ZM184,208H72V160H184Zm40-40H200V152a8,8,0,0,0-8-8H64a8,8,0,0,0-8,8v16H32V96c0-4.41,4.19-8,9.33-8H214.67c5.14,0,9.33,3.59,9.33,8Zm-24-52a12,12,0,1,1-12-12A12,12,0,0,1,200,116Z',
cor:'M7.5 4.5L4 8l3.5 3.5 M4 8h8.25a3.75 3.75 0 0 1 0 7.5H9', cor:'M232,144a64.07,64.07,0,0,1-64,64H80a8,8,0,0,1,0-16h88a48,48,0,0,0,0-96H51.31l34.35,34.34a8,8,0,0,1-11.32,11.32l-48-48a8,8,0,0,1,0-11.32l48-48A8,8,0,0,1,85.66,45.66L51.31,80H168A64.07,64.07,0,0,1,232,144Z',
rev:'M2.5 10s2.75-5.25 7.5-5.25S17.5 10 17.5 10s-2.75 5.25-7.5 5.25S2.5 10 2.5 10z '+C(10,10,2.25), rev:'M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z',
fin:C(10,10,7.25)+' M6.5 10.25l2.5 2.5 4.75-5'}; fin:'M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z'};
const orderMetres=o=>o.snapshot.items.reduce((t,i)=>t+Number(i.billed_metres),0); const orderMetres=o=>o.snapshot.items.reduce((t,i)=>t+Number(i.billed_metres),0);
// On a phone the board shows one stage at a time, picked from the chips above it. // On a phone the board shows one stage at a time, picked from the chips above it.
let phoneCol='rec'; let phoneCol='rec';