feat: Kanban profiles, a Usuários page, and machines that route orders
Every operator could do everything, and accounts were made from the console. Each account now has a profile, checked by the server on every action: Administrador (everything, plus users and machines), Gestão (everything but users), Operador (moves cards and handles artwork) and Vendedor (reads orders, quotes and Números, changes nothing). The superadmin is the system's own account, set from the console and kept by the account OPERATOR_EMAIL seeds; administrators cannot change it, and nobody can delete, disable or demote themselves. The Usuários tab creates, edits, disables and deletes users with a first password (there is no e-mail yet), and registers machines with the products each prints. An order goes to the first active machine that prints its product, or to the one chosen in its panel; an operator tied to machines sees and downloads only their orders. Everyone changes their own password in the account menu, which now holds the name and Sair too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -73,9 +73,12 @@ input[type=file]{font-size:14px;color:var(--muted);max-width:100%}
|
||||
.tinydot{display:flex;align-items:center;gap:8px;font-size:14px;color:var(--muted);white-space:nowrap}
|
||||
.tinydot::before{content:"";width:8px;height:8px;border-radius:999px;background:var(--dot,#5B6168)}
|
||||
.tinydot:empty{display:none}
|
||||
.who{font-size:14px;color:var(--muted);white-space:nowrap;max-width:220px;overflow:hidden;text-overflow:ellipsis}
|
||||
/* With five tabs, the operator's e-mail is the first thing to give way; it stays on Sair's tooltip. */
|
||||
@media (max-width:1560px){.who{display:none}}
|
||||
.account{margin-left:0}
|
||||
.account .btn{min-width:38px;padding:0 10px;font-weight:800;letter-spacing:.02em}
|
||||
.account .menu{min-width:240px}
|
||||
.menu-head{display:flex;flex-direction:column;gap:2px;padding:8px 10px 10px;border-bottom:1px solid var(--line2);margin-bottom:4px}
|
||||
.menu-head b{font-size:14.5px}
|
||||
.menu-head span{font-size:12.5px;color:var(--faint);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
||||
#status{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:20;margin:0;max-width:min(640px,calc(100vw - 32px));padding:10px 16px;border-radius:10px;border:1px solid var(--line3);background:#1E2226;color:var(--tx);font-size:14px;box-shadow:0 10px 30px rgba(0,0,0,.45)}
|
||||
#status:empty,#login-status:empty{display:none}
|
||||
#status.error{border-color:var(--bad-line);color:var(--bad)}
|
||||
@@ -422,3 +425,23 @@ a.zap{display:inline-flex;align-items:center;gap:4px;vertical-align:bottom}
|
||||
.refresh .btn{border:0;border-radius:0;display:inline-flex;align-items:center;gap:6px}
|
||||
.refresh select{width:88px;height:36px;padding:0 24px 0 10px;border:0;border-left:1px solid var(--line2);background:transparent;color:var(--muted);font:inherit;font-size:13.5px;font-weight:600;cursor:pointer}
|
||||
.refresh select option{background:var(--card);color:var(--tx)}
|
||||
|
||||
/* Usuários: dialogs for users and machines, and the tables. */
|
||||
.modal{position:fixed;inset:0;z-index:50;background:rgba(0,0,0,.55);display:flex;align-items:center;justify-content:center;padding:16px}
|
||||
.modal-box{width:min(460px,100%);max-height:calc(100vh - 32px);overflow:auto;display:flex;flex-direction:column;gap:14px;padding:22px;
|
||||
border-radius:14px;border:1px solid var(--line3);background:var(--panel)}
|
||||
.modal-box h2{margin:0;font-size:18px}
|
||||
.mfield{display:flex;flex-direction:column;gap:6px;font-size:13.5px;font-weight:600;color:var(--muted)}
|
||||
.mfield input:not([type=checkbox]),.mfield select{height:40px;padding:0 12px;border-radius:8px;border:1px solid var(--line3);background:var(--bg);color:var(--tx);font:inherit;font-size:14px;font-weight:500}
|
||||
.mfield .check{font-weight:500}
|
||||
.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:4px}
|
||||
#tab-users .pagehead h2{margin:0}
|
||||
#tab-users .pagehead .btn{margin-left:auto}
|
||||
#tab-users td.actions{text-align:right;white-space:nowrap}
|
||||
#tab-users td.actions .btn+.btn{margin-left:6px}
|
||||
#tab-users tr.off td{opacity:.55}
|
||||
.faint.block{display:block;font-size:13px}
|
||||
.danger-text{color:var(--bad)}
|
||||
.machine-select{height:36px;padding:0 10px;border-radius:8px;border:1px solid var(--line3);background:var(--bg);color:var(--tx);font:inherit;font-size:14px}
|
||||
.card .machine{color:var(--accent-tx)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user