2 lines
6.3 KiB
JavaScript
2 lines
6.3 KiB
JavaScript
import{j as e}from"./query-vendor-BLVqILA6.js";import{T as t}from"./ThemeToggle-Cryh6OOS.js";import{a as l,m as r,F as i,B as d,L as o,W as n,T as c,b as x,c as m}from"./ui-vendor-CyRvbSfR.js";import{L as a}from"./router-vendor-D4by-_6Z.js";import"./react-vendor-CqRd3GwO.js";const g=[{id:"1",nome:"Edifício Residencial Aurora",progresso:75,status:"ativa"},{id:"2",nome:"Shopping Center Plaza",progresso:45,status:"ativa"},{id:"3",nome:"Condomínio Jardim Verde",progresso:90,status:"pausada"}],b=[{id:"1",titulo:"Verificar torque dos parafusos - Setor A",obra:"Ed. Aurora",prazo:"Hoje"},{id:"2",titulo:"Aprovar RDO 15/01",obra:"Shopping Plaza",prazo:"Amanhã"}],h=s=>s>=80?"bg-green-500":s>=50?"bg-yellow-500":"bg-red-500";function N(){return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"bg-white/80 dark:bg-gray-800/80 backdrop-blur-md sticky top-0 z-10",children:e.jsxs("div",{className:"px-4 sm:px-6 py-4 flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-xl sm:text-2xl font-bold text-gray-900 dark:text-white",children:"Dashboard"}),e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300",children:"Bem-vindo, Engenheiro!"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(a,{to:"/manual",className:"flex items-center gap-2 px-3 py-2 bg-blue-100 dark:bg-blue-900/30 rounded-xl text-blue-700 dark:text-blue-300 hover:bg-blue-200 dark:hover:bg-blue-900/50 transition-colors",title:"Manual de Instruções",children:[e.jsx(l,{className:"w-4 h-4"}),e.jsx("span",{className:"hidden sm:inline text-sm font-medium",children:"Manual"})]}),e.jsx(t,{})]})]})}),e.jsxs("div",{className:"p-4 sm:p-6 space-y-6",children:[e.jsxs(r.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-800 dark:text-gray-200 mb-3",children:"Acesso Rápido"}),e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:[e.jsxs(a,{to:"/rdo/novo",className:"flex flex-col items-center justify-center p-4 bg-blue-100 dark:bg-blue-900/30 rounded-2xl text-blue-700 dark:text-blue-300 hover:bg-blue-200 dark:hover:bg-blue-900/50 transition-colors",children:[e.jsx(i,{className:"w-8 h-8 mb-2"}),e.jsx("span",{className:"text-sm font-semibold text-center",children:"Novo RDO"})]}),e.jsxs(a,{to:"/cadastros/obras",className:"flex flex-col items-center justify-center p-4 bg-purple-100 dark:bg-purple-900/30 rounded-2xl text-purple-700 dark:text-purple-300 hover:bg-purple-200 dark:hover:bg-purple-900/50 transition-colors",children:[e.jsx(d,{className:"w-8 h-8 mb-2"}),e.jsx("span",{className:"text-sm font-semibold text-center",children:"Nova Obra"})]}),e.jsxs(a,{to:"/obra/1/tarefas",className:"flex flex-col items-center justify-center p-4 bg-green-100 dark:bg-green-900/30 rounded-2xl text-green-700 dark:text-green-300 hover:bg-green-200 dark:hover:bg-green-900/50 transition-colors",children:[e.jsx(o,{className:"w-8 h-8 mb-2"}),e.jsx("span",{className:"text-sm font-semibold text-center",children:"Apontar Tarefa"})]}),e.jsxs(a,{to:"/configuracoes",className:"flex flex-col items-center justify-center p-4 bg-gray-100 dark:bg-gray-700 rounded-2xl text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors",children:[e.jsx(n,{className:"w-8 h-8 mb-2"}),e.jsx("span",{className:"text-sm font-semibold text-center",children:"Configurar"})]})]})]}),e.jsxs(r.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{delay:.1},children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-800 dark:text-gray-200 mb-3",children:"Avisos Importantes"}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center p-4 bg-red-100 dark:bg-red-900/30 rounded-2xl text-red-800 dark:text-red-200",children:[e.jsx(c,{className:"w-6 h-6 mr-3"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"font-semibold",children:"Segurança"}),e.jsx("p",{className:"text-sm",children:"EPIs da equipe de montagem precisam de inspeção."})]})]}),e.jsxs("div",{className:"flex items-center p-4 bg-yellow-100 dark:bg-yellow-900/30 rounded-2xl text-yellow-800 dark:text-yellow-200",children:[e.jsx(x,{className:"w-6 h-6 mr-3"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"font-semibold",children:"Prazo Apertado"}),e.jsx("p",{className:"text-sm",children:"Entrega da estrutura do Setor B vence em 3 dias."})]})]})]})]}),e.jsxs(r.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{delay:.2},children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-800 dark:text-gray-200 mb-3",children:"Minhas Tarefas Pendentes"}),e.jsx("div",{className:"space-y-3",children:b.map(s=>e.jsxs("div",{className:"flex items-center p-4 bg-white/70 dark:bg-gray-800/70 backdrop-blur-md rounded-2xl border border-gray-200/50 dark:border-gray-700/50",children:[e.jsx(m,{className:"w-6 h-6 mr-4 text-gray-400"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:s.titulo}),e.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:[s.obra," - ",e.jsx("span",{className:"font-semibold",children:s.prazo})]})]}),e.jsx(a,{to:"/obra/1/tarefas",className:"text-blue-600 dark:text-blue-400 font-semibold text-sm",children:"Ver"})]},s.id))})]}),e.jsxs(r.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{delay:.3},children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-800 dark:text-gray-200",children:"Obras em Andamento"}),e.jsx(a,{to:"/cadastros/obras",className:"text-blue-600 dark:text-blue-400 font-semibold text-sm",children:"Ver todas"})]}),e.jsx("div",{className:"space-y-3",children:g.filter(s=>s.status==="ativa").map(s=>e.jsxs(a,{to:`/obra/${s.id}`,className:"block p-4 bg-white/70 dark:bg-gray-800/70 backdrop-blur-md rounded-2xl border border-gray-200/50 dark:border-gray-700/50",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("p",{className:"font-semibold text-gray-900 dark:text-white",children:s.nome}),e.jsxs("p",{className:"font-bold text-gray-800 dark:text-gray-200",children:[s.progresso,"%"]})]}),e.jsx("div",{className:"w-full bg-gray-200 dark:bg-gray-700 rounded-full h-2 mt-2",children:e.jsx("div",{className:`h-2 rounded-full ${h(s.progresso)}`,style:{width:`${s.progresso}%`}})})]},s.id))})]})]})]})}export{N as default};
|