PageSourceSearch

https://alinhafood.com.br/_next/static/chunks/93732.4deade83ae23aa29.js

js alinhafood.com.br collected 2026-10-02 01:21:00 UTC 24,426 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[93732],{21190:(e,a,t)=>{t.d(a,{A:()=>s});let s=(0,t(71847).A)("pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]])},67840:(e,a,t)=>{t.d(a,{A:()=>s});let s=(0,t(71847).A)("arrow-down-right",[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]])},93732:(e,a,t)=>{t.r(a),t.d(a,{default:()=>y});var s=t(95155),l=t(12115),r=t(14272),n=t(67592),o=t(78384),i=t(28394),c=t(35637),d=t(38971),x=t(89559),m=t(6191),u=t(86651),p=t(89715),b=t(7013),h=t(67840),g=t(21190),f=t(71360);let j=(0,t(71847).A)("lock-keyhole",[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]]);var v=t(65229);async function N(){var e,a;let{data:t}=await (0,r.U)("admin").auth.getSession();return null!=(a=null==(e=t.session)?void 0:e.access_token)?a:""}let w=e=>e.toLocaleString("pt-BR",{style:"currency",currency:"BRL"}),k=[{label:"Este m\xeas",value:"mes"},{label:"\xdaltimos 30",value:"30d"},{label:"\xdaltimos 90",value:"90d"},{label:"Este ano",value:"ano"}];function y(){let{showToast:e}=(0,n.d)(),{restaurantId:a}=(0,o.p)(),[t,r]=(0,l.useState)([]),[y,S]=(0,l.useState)([]),[_,C]=(0,l.useState)([]),[z,D]=(0,l.useState)(!0),[A,L]=(0,l.useState)({receitas:0,despesas:0,resultado:0}),[E,T]=(0,l.useState)("mes"),[R,B]=(0,l.useState)(""),[P,q]=(0,l.useState)("all"),[O,F]=(0,l.useState)("all"),[H,I]=(0,l.useState)(!1),[V,M]=(0,l.useState)(null),[U,Y]=(0,l.useState)(!1),[J,X]=(0,l.useState)(null),$=()=>({descricao:"",valor:"",tipo:"debito",data_competencia:new Date().toISOString().split("T")[0],status:"pago",plano_conta_id:"",conta_bancaria_id:"",observacao:""}),[G,K]=(0,l.useState)($()),Q=async()=>{if(!a){r([]),S([]),C([]),L({receitas:0,despesas:0,resultado:0}),D(!1);return}D(!0);let e=await N(),{de:t,ate:s}=function(e){let a=new Date,t=a.toISOString().split("T")[0];if("mes"===e)return{de:new Date(a.getFullYear(),a.getMonth(),1).toISOString().split("T")[0],ate:t};if("30d"===e){let e=new Date(a);return e.setDate(e.getDate()-30),{de:e.toISOString().split("T")[0],ate:t}}if("90d"===e){let e=new Date(a);return e.setDate(e.getDate()-90),{de:e.toISOString().split("T")[0],ate:t}}return"ano"===e?{de:"".concat(a.getFullYear(),"-01-01"),ate:t}:{de:t,ate:t}}(E),l=(0,i.H)("/api/admin/financeiro/lancamentos",a,{de:t,ate:s,limit:500}),n=(0,i.H)("/api/admin/financeiro/lancamentos/resumo",a,{de:t,ate:s}),o=(0,i.H)("/api/admin/financeiro/plano-contas",a),c=(0,i.H)("/api/admin/financeiro/contas-bancarias",a);if(!l||!n||!o||!c)return void D(!1);let[d,x,m,u]=await Promise.all([fetch(l,{headers:{authorization:"Bearer ".concat(e)}}),fetch(n,{headers:{authorization:"Bearer ".concat(e)}}),fetch(o,{headers:{authorization:"Bearer ".concat(e)}}),fetch(c,{headers:{authorization:"Bearer ".concat(e)}})]);d.ok&&r(await d.json()),x.ok?L(await x.json()):L({receitas:0,despesas:0,resultado:0}),m.ok&&S(await m.json()),u.ok&&C(await u.json()),D(!1)};(0,l.useEffect)(()=>{Q()},[E,a]);let W=t.filter(e=>{var a;let t=R.toLowerCase(),s=!t||String(null!=(a=e.descricao)?a:"").toLowerCase().includes(t),l="all"===P||e.tipo===P,r="all"===O||e.status===O;return s&&l&&r}),Z=async()=>{if(!G.descricao.trim()||!G.valor||!G.tipo)return e("Preencha os campos obrigat\xf3rios.","error");if("pago"===G.status&&!G.conta_bancaria_id)return e("Selecione de qual conta/cofre o dinheiro sai/entra.","error");if(!a)return e("Selecione um restaurante.","error");Y(!0);let t=await N(),s={...G,valor:parseFloat(G.valor.replace(",",".")),plano_conta_id:G.plano_conta_id||null,conta_bancaria_id:G.conta_bancaria_id||null,observacao:G.observacao||null,origem_tipo:"manual"},l=!!V,r=l?"/api/admin/financeiro/lancamentos/".concat(String(V.id)):"/api/admin/financeiro/lancamentos",n=(0,i.H)(r,a);if(!n)return Y(!1),e("Selecione um restaurante.","error");let o=await fetch(n,{method:l?"PUT":"POST",headers:{authorization:"Bearer ".concat(t),"content-type":"application/json"}
1,body:JSON.stringify((0,i.o)(a,s))});if(Y(!1),o.ok)e(l?"Lan\xe7amento atualizado!":"Lan\xe7amento criado!","success"),I(!1),Q();else{var c;e(null!=(c=(await o.json()).error)?c:"Erro ao salvar","error")}},ee=async()=>{if(!J)return;if(!a)return e("Selecione um restaurante.","error");let t=await N(),s=(0,i.H)("/api/admin/financeiro/lancamentos/".concat(String(J.id)),a);if(!s)return e("Selecione um restaurante.","error");(await fetch(s,{method:"DELETE",headers:{authorization:"Bearer ".concat(t)}})).ok?(e("Lan\xe7amento exclu\xeddo.","success"),X(null),Q()):e("Erro ao excluir.","error")},ea=e=>{var a,t,s,l,r,n,o,i;M(e),K({descricao:String(null!=(a=e.descricao)?a:""),valor:String(null!=(t=e.valor)?t:""),tipo:String(null!=(s=e.tipo)?s:"debito"),data_competencia:String(null!=(l=e.data_competencia)?l:""),status:String(null!=(r=e.status)?r:"pago"),plano_conta_id:String(null!=(n=e.plano_conta_id)?n:""),conta_bancaria_id:String(null!=(o=e.conta_bancaria_id)?o:""),observacao:String(null!=(i=e.observacao)?i:"")}),I(!0)},et=e=>{var a;let t={pago:"bg-emerald-100 text-emerald-700",pendente:"bg-amber-100 text-amber-700",cancelado:"bg-slate-100 text-slate-500",estornado:"bg-slate-100 text-slate-500"};return"inline-flex items-center px-2 py-0.5 rounded-full text-[10px] font-black uppercase tracking-widest ".concat(null!=(a=t[e])?a:t.pendente)};return(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("h2",{className:"text-xl font-black text-slate-900 inline-flex items-center gap-2",children:["Lan\xe7amentos Financeiros",(0,s.jsx)(d.V,{title:"Lan\xe7amentos Financeiros",size:"sm",children:"Toda receita e despesa do restaurante (aluguel, folha, fornecedor, taxa de cart\xe3o) entra aqui. \xc9 a fonte que alimenta o DRE e o Fluxo de Caixa — sem lan\xe7amento bem categorizado, os relat\xf3rios ficam vazios ou errados."})]}),(0,s.jsxs)("p",{className:"text-xs text-slate-400 mt-0.5",children:[W.length," registros no per\xedodo"]})]}),(0,s.jsxs)("div",{className:"flex gap-2 flex-wrap",children:[(0,s.jsxs)("button",{onClick:Q,className:"flex items-center gap-2 px-4 py-2 bg-white border border-slate-200 rounded-xl text-sm font-bold text-slate-600 hover:bg-slate-50 cursor-pointer transition-colors",children:[(0,s.jsx)(x.A,{size:14})," Atualizar"]}),(0,s.jsxs)("button",{onClick:()=>{M(null),K($()),I(!0)},className:"flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-xl text-sm font-black cursor-pointer hover:bg-blue-700 transition-colors shadow-md",children:[(0,s.jsx)(m.A,{size:14})," Novo Lan\xe7amento"]})]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3 max-md:grid-cols-3 max-md:gap-2",children:[(0,s.jsxs)("div",{className:"rounded-2xl border border-emerald-200 bg-emerald-50 p-4 max-md:p-2.5",children:[(0,s.jsx)("p",{className:"text-[10px] font-black uppercase tracking-widest text-slate-500 mb-1 max-md:text-[0.72rem] max-md:normal-case max-md:tracking-normal max-md:leading-tight",children:"Receitas efetivadas"}),(0,s.jsx)("p",{className:"text-xl font-black text-emerald-700 tabular-nums max-md:text-[0.95rem]",children:w(A.receitas)})]}),(0,s.jsxs)("div",{className:"rounded-2xl border border-red-200 bg-red-50 p-4 max-md:p-2.5",children:[(0,s.jsx)("p",{className:"text-[10px] font-black uppercase tracking-widest text-slate-500 mb-1 max-md:text-[0.72rem] max-md:normal-case max-md:tracking-normal max-md:leading-tight",children:"Despesas efetivadas"}),(0,s.jsx)("p",{className:"text-xl font-black text-red-600 tabular-nums max-md:text-[0.95rem]",children:w(A.despesas)})]}),(0,s.jsxs)("div",{className:"rounded-2xl border p-4 max-md:p-2.5 ".concat(A.resultado>=0?"border-blue-200 bg-blue-50":"border-red-200 bg-red-50"),children:[(0,s.jsx)("p",{className:"text-[10px] font-black uppercase tracking-widest text-slate-500 mb-1 max-md:text-[0.72rem] max-md:normal-case max-md:tracking-normal max-md:leading-tight",children:"Resultado efetivado"}),(0,s.jsx)("p",{className:"text-xl font-black tabular-nums max-md:text-[0.95rem] ".concat(A.resultado>
1=0?"text-blue-700":"text-red-700"),children:w(A.resultado)})]})]}),(0,s.jsx)("p",{className:"-mt-4 text-[11px] text-slate-500",children:"Totais cont\xe1beis pagos/recebidos. Consolida\xe7\xf5es de fechamento de caixa e aquisi\xe7\xf5es de estoque ainda n\xe3o consumidas n\xe3o s\xe3o somadas novamente."}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)("select",{value:E,onChange:e=>T(e.target.value),className:"px-3 py-2.5 border border-slate-200 rounded-xl text-sm bg-white focus:outline-none focus:border-blue-400 cursor-pointer",children:k.map(e=>(0,s.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,s.jsxs)("div",{className:"relative flex-1 min-w-[180px]",children:[(0,s.jsx)(u.A,{size:13,className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-400"}),(0,s.jsx)("input",{value:R,onChange:e=>B(e.target.value),placeholder:"Buscar descri\xe7\xe3o...",className:"w-full pl-8 pr-4 py-2.5 border border-slate-200 rounded-xl text-sm focus:outline-none focus:border-blue-400 bg-white"})]}),(0,s.jsxs)("select",{value:P,onChange:e=>q(e.target.value),className:"px-3 py-2.5 border border-slate-200 rounded-xl text-sm bg-white focus:outline-none focus:border-blue-400 cursor-pointer",children:[(0,s.jsx)("option",{value:"all",children:"Todos os tipos"}),(0,s.jsx)("option",{value:"credito",children:"Receita"}),(0,s.jsx)("option",{value:"debito",children:"Despesa"})]}),(0,s.jsxs)("select",{value:O,onChange:e=>F(e.target.value),className:"px-3 py-2.5 border border-slate-200 rounded-xl text-sm bg-white focus:outline-none focus:border-blue-400 cursor-pointer",children:[(0,s.jsx)("option",{value:"all",children:"Todos os status"}),(0,s.jsx)("option",{value:"pago",children:"Pago"}),(0,s.jsx)("option",{value:"pendente",children:"Pendente"}),(0,s.jsx)("option",{value:"cancelado",children:"Cancelado"})]})]}),z?(0,s.jsx)("div",{className:"flex justify-center py-14",children:(0,s.jsx)("div",{className:"w-8 h-8 border-4 border-blue-200 border-t-blue-600 rounded-full animate-spin"})}):0===W.length?(0,s.jsxs)("div",{className:"bg-white rounded-2xl border border-slate-100 p-12 text-center",children:[(0,s.jsx)(p.A,{size:32,className:"mx-auto text-slate-200 mb-3"}),(0,s.jsx)("p",{className:"text-slate-400 font-bold",children:"Nenhum lan\xe7amento no per\xedodo"}),(0,s.jsx)("p",{className:"text-sm text-slate-400 mt-1",children:'Clique em "Novo Lan\xe7amento" para registrar'})]}):(0,s.jsxs)("div",{className:"bg-white rounded-2xl border border-slate-200 shadow-sm overflow-hidden",children:[(0,s.jsxs)("ul",{className:"hidden divide-y divide-slate-100 max-md:block",children:[W.map(e=>{var a,t,l,r,n,o;let i=e.plano_contas,c="credito"===e.tipo,d=String(null!=(a=e.origem_tipo)?a:"").toLowerCase();return(0,s.jsxs)("li",{className:"px-3.5 py-3",children:[(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("p",{className:"font-semibold leading-snug text-slate-800",children:String(null!=(t=e.descricao)?t:"—")}),e.observacao?(0,s.jsx)("p",{className:"text-xs text-slate-400",children:String(e.observacao)}):null,"caixa_fechamento"===d&&(0,s.jsx)("p",{className:"text-xs font-bold text-blue-600",children:"Consolida\xe7\xe3o de caixa \xb7 n\xe3o soma como nova receita"})]}),(0,s.jsxs)("p",{className:"shrink-0 whitespace-nowrap font-black font-mono tabular-nums ".concat(c?"text-emerald-600":"text-red-500"),children:[c?"+":"-",w(Number(null!=(l=e.valor)?l:0))]})]}),(0,s.jsxs)("div",{className:"mt-1.5 flex flex-wrap items-center gap-x-2 gap-y-1 text-xs text-slate-500",children:[(0,s.jsx)("span",{className:"font-mono",children:String(null!=(r=e.data_competencia)?r:"—")}),(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[10px] font-black ".concat(c?"bg-emerald-100 text-emerald-700":"bg-red-100 text-red-600"),children:[c?(0,s.jsx)(b.A,{size:9}):(0,s.jsx)(h.A,{size:9}),c?"Receita":"Despesa"]}),(0,s.jsx)("span",{className:et(String(null!=(n=e.status)?n:"")),children:String(null!=(o=e.status)?o:"—")}),(null==i?void 0:i.nome)&&(0,s.jsx)("span",{className:"text-slate-400",children:i.nome})]}),d&&"manual"!==d?(0,s.jsxs)("p",{className:"mt-1.5 inline-flex items-center gap-1 text-xs text-slate-400",children:[(0,s.jsx)(j,{size:12})," Autom\xe1tico — n\xe3o se edita aqui"]}):(0,s.jsxs)("div",{className:"mt-2 flex gap-2",children:[(0,s.jsxs)("button",{onClick:()=>ea(e),className:"flex h-9 flex-1 items-center justify-center gap-1.5 rounded border border-slate-300 text-[0.85rem] font-semibold text-slate-700 active:bg-slate-50",children:[(0,s.jsx)(g.A,{size:13})," Editar"]}),(0,s.jsxs)("button",{onClick:()=>X(e),className:"flex h-9 flex-1 items-center justify-center gap-1.5 rounded border border-red-200 text-[0.85rem] font-semibold text-red-600 active:bg-red-50",children:[(0,s.jsx)(f.A,{size:13})," Estornar"]})]})]},String(e.id))}),(0,s.jsxs)("li",{className:"bg-slate-900 px-3.5 py-3 text-[11px] font-bold text-slate-300",children:[W.length," registros exibid
1os \xb7 os indicadores acima consideram somente valores efetivados e sem duplicidades"]})]}),(0,s.jsx)("div",{className:"overflow-x-auto max-h-[600px] overflow-y-auto max-md:hidden",children:(0,s.jsxs)("table",{className:"w-full text-left text-sm border-collapse",children:[(0,s.jsx)("thead",{className:"sticky top-0 z-10",children:(0,s.jsxs)("tr",{className:"bg-slate-50 text-[10px] uppercase tracking-widest text-slate-400 font-black",children:[(0,s.jsx)("th",{className:"px-4 py-3 border-b border-slate-200",children:"Data"}),(0,s.jsx)("th",{className:"px-4 py-3 border-b border-slate-200",children:"Descri\xe7\xe3o"}),(0,s.jsx)("th",{className:"px-4 py-3 border-b border-slate-200",children:"Categoria"}),(0,s.jsx)("th",{className:"px-4 py-3 border-b border-slate-200",children:"Tipo"}),(0,s.jsx)("th",{className:"px-4 py-3 border-b border-slate-200 text-right",children:"Valor"}),(0,s.jsx)("th",{className:"px-4 py-3 border-b border-slate-200",children:"Status"}),(0,s.jsx)("th",{className:"px-4 py-3 border-b border-slate-200 text-center",children:"A\xe7\xf5es"})]})}),(0,s.jsx)("tbody",{children:W.map((e,a)=>{var t,l,r,n,o,i,c;let d=e.plano_contas,x="credito"===e.tipo,m=String(null!=(t=e.origem_tipo)?t:"").toLowerCase();return(0,s.jsxs)("tr",{className:"".concat(a%2==0?"bg-white":"bg-slate-50/40"," hover:bg-blue-50/20 transition-colors"),children:[(0,s.jsx)("td",{className:"px-4 py-2.5 border-b border-slate-100 font-mono text-slate-500 text-xs whitespace-nowrap",children:String(null!=(l=e.data_competencia)?l:"—")}),(0,s.jsxs)("td",{className:"px-4 py-2.5 border-b border-slate-100 font-semibold text-slate-800 max-w-[220px] truncate",children:[String(null!=(r=e.descricao)?r:"—"),e.observacao?(0,s.jsx)("p",{className:"text-[10px] text-slate-400 truncate",children:String(e.observacao)}):null,"caixa_fechamento"===m&&(0,s.jsx)("p",{className:"text-[10px] font-bold text-blue-600",children:"Consolida\xe7\xe3o de caixa \xb7 n\xe3o soma como nova receita"})]}),(0,s.jsx)("td",{className:"px-4 py-2.5 border-b border-slate-100 text-xs text-slate-400",children:null!=(n=null==d?void 0:d.nome)?n:"—"}),(0,s.jsx)("td",{className:"px-4 py-2.5 border-b border-slate-100",children:(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[10px] font-black ".concat(x?"bg-emerald-100 text-emerald-700":"bg-red-100 text-red-600"),children:[x?(0,s.jsx)(b.A,{size:9}):(0,s.jsx)(h.A,{size:9}),x?"Receita":"Despesa"]})}),(0,s.jsxs)("td",{className:"px-4 py-2.5 border-b border-slate-100 text-right font-black font-mono tabular-nums ".concat(x?"text-emerald-600":"text-red-500"),children:[x?"+":"-",w(Number(null!=(o=e.valor)?o:0))]}),(0,s.jsx)("td",{className:"px-4 py-2.5 border-b border-slate-100",children:(0,s.jsx)("span",{className:et(String(null!=(i=e.status)?i:"")),children:String(null!=(c=e.status)?c:"—")})}),(0,s.jsx)("td",{className:"px-4 py-2.5 border-b border-slate-100",children:(0,s.jsx)("div",{className:"flex items-center justify-center gap-1",children:m&&"manual"!==m?(0,s.jsx)("span",{title:"Lan\xe7amento autom\xe1tico protegido",className:"inline-flex min-h-9 min-w-9 items-center justify-center rounded-lg bg-slate-100 text-slate-400",children:(0,s.jsx)(j,{size:13,"aria-label":"Lan\xe7amento autom\xe1tico protegido"})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{"aria-label":"Editar lan\xe7amento",onClick:()=>ea(e),className:"min-h-9 min-w-9 flex items-center justify-center rounded-lg bg-slate-100 hover:bg-blue-100 hover:text-blue-600 text-slate-500 cursor-pointer transition-colors",children:(0,s.jsx)(g.A,{size:13})}),(0,s.jsx)("button",{"aria-label":"Estornar lan\xe7amento",onClick:()=>X(e),className:"min-h-9 min-w-9 flex items-center justify-center rounded-lg bg-slate-100 hover:bg-red-100 hover:text-red-600 text-slate-500 cursor-pointer transition-colors",children:(0,s.jsx)(f.A,{size:13})})]})})})]},String(e.id))})}),(0,s.jsx)("tfoot",{children:(0,s.jsx)("tr",{className:"bg-slate-900 text-white",children:(0,s.jsxs)("td",{colSpan:7,className:"px-4 py-3 text-[10px] font-black uppercase tracking-widest text-slate-400",children:[W.length," registros exibid
1os \xb7 os indicadores acima consideram somente valores efetivados e sem duplicidades"]})})})]})})]}),H&&(0,s.jsx)("div",{className:"fixed inset-0 bg-black/50 z-[200] flex items-center justify-center p-4 max-md:items-end max-md:p-0",children:(0,s.jsxs)("div",{className:"bg-white rounded-2xl w-full max-w-lg shadow-2xl max-h-[90vh] overflow-y-auto cel-folha-md max-md:max-h-[92dvh] max-md:max-w-none max-md:rounded-b-none max-md:rounded-t-lg max-md:pb-[env(safe-area-inset-bottom)]",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-slate-100 sticky top-0 bg-white z-10 max-md:px-4 max-md:py-4",children:[(0,s.jsx)("h3",{className:"text-lg font-black text-slate-800",children:V?"Editar Lan\xe7amento":"Novo Lan\xe7amento"}),(0,s.jsx)("button",{onClick:()=>I(!1),className:"text-slate-400 hover:text-slate-600 cursor-pointer",children:(0,s.jsx)(v.A,{size:20})})]}),(0,s.jsxs)("div",{className:"p-6 space-y-4 max-md:px-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-[10px] font-black text-slate-400 uppercase tracking-widest mb-1.5",children:"Descri\xe7\xe3o *"}),(0,s.jsx)("input",{value:G.descricao,onChange:e=>K(a=>({...a,descricao:e.target.value})),placeholder:"Ex: Pagamento fornecedor X",className:"w-full px-3 py-2.5 border border-slate-200 rounded-xl text-sm focus:outline-none focus:border-blue-400"})]}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-[10px] font-black text-slate-400 uppercase tracking-widest mb-1.5",children:"Valor (R$) *"}),(0,s.jsx)(c.A,{value:G.valor,onValueChange:e=>K(a=>({...a,valor:String(null!=e?e:0)})),placeholder:"0,00",className:"w-full pr-3 py-2.5 border border-slate-200 rounded-xl text-sm focus:outline-none focus:border-blue-400"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-[10px] font-black text-slate-400 uppercase tracking-widest mb-1.5",children:"Tipo *"}),(0,s.jsxs)("select",{value:G.tipo,onChange:e=>K(a=>({...a,tipo:e.target.value})),className:"w-full px-3 py-2.5 border border-slate-200 rounded-xl text-sm bg-white focus:outline-none focus:border-blue-400 cursor-pointer",children:[(0,s.jsx)("option",{value:"debito",children:"Despesa"}),(0,s.jsx)("option",{value:"credito",children:"Receita"})]})]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-[10px] font-black text-slate-400 uppercase tracking-widest mb-1.5",children:"Data"}),(0,s.jsx)("input",{type:"date",value:G.data_competencia,onChange:e=>K(a=>({...a,data_competencia:e.target.value})),className:"w-full px-3 py-2.5 border border-slate-200 rounded-xl text-sm focus:outline-none focus:border-blue-400"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-[10px] font-black text-slate-400 uppercase tracking-widest mb-1.5",children:"Status"}),(0,s.jsxs)("select",{value:G.status,onChange:e=>K(a=>({...a,status:e.target.value})),className:"w-full px-3 py-2.5 border border-slate-200 rounded-xl text-sm bg-white focus:outline-none focus:border-blue-400 cursor-pointer",children:[(0,s.jsx)("option",{value:"pago",children:"Pago / Recebido"}),(0,s.jsx)("option",{value:"pendente",children:"Pendente"}),(0,s.jsx)("option",{value:"cancelado",children:"Cancelado"})]})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-[10px] font-black text-slate-400 uppercase tracking-widest mb-1.5",children:"Categoria"}),(0,s.jsxs)("select",{value:G.plano_conta_id,onChange:e=>K(a=>({...a,plano_conta_id:e.target.value})),className:"w-full px-3 py-2.5 border border-slate-200 rounded-xl text-sm bg-white focus:outline-none focus:border-blue-400 cursor-pointer",children:[(0,s.jsx)("option",{value:"",children:"Sem categoria"}),y.filter(e=>e.aceita_lancamento&&e.ativo).map(e=>(0,s.jsxs)("option",{value:String(e.id),children:[String(e.codigo)," — ",String(e.nome)]},String(e.id)))]})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{className:"block text-[10px] font-black text-slate-400 uppercase tracking-widest mb-1.5",children:["Conta / Cofre ","pago"===G.status&&(0,s.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,s.jsxs)("select",{value:G.conta_bancaria_id,onChange:e=>K(a=>({...a,conta_bancaria_id:e.target.value})),className:"w-full px-3 py-2.5 border border-slate-200 rounded-xl text-sm bg-white focus:outline-none focus:border-blue-400 cursor-pointer",children:[(0,s.jsx)("option",{value:"",children:"pago"===G.status?"Selecione de onde o dinheiro sai/entra":"Nenhuma"}),_.filter(e=>!e.is_cofre&&!1!==e.ativa).length>0&&(0,s.jsx)("optgroup",{label:"Contas",children:_.filter(e=>!e.is_cofre&&!1!==e.ativa).map(e=>(0,s.jsx)("option",{value:String(e.id),children:String(e.nome)},String(e.id)))}),_.filter(e=>e.is_cofre&&!1!==e.ativa).length>0&&(0,s.jsx)("optgroup",{label:"Cofres",children:_.filter(e=>e.is_cofre&&!1!==e.ativa).map(e=>(0,s.jsxs)("option",{value:String(e.id),children:["\uD83D\uDD12 ",String(e.nome)]},String(e.id)))})]}),"pago"===G.status&&(0,s.jsx)("p",{className:"text-[10px] text-slate-400 mt-1",children:"Lan\xe7amentos pagos sempre saem/entram de algum lugar."})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-[10px] font-black text-slate-400 uppercase tracking-widest mb-1.5",children:"Observa\xe7\xe3o"}),(0,s.jsx)("textarea",{value:G.observacao,onChange:e=>K(a=>({...a,observacao:e.target.value})),rows:2,placeholder:"Notas adicionais...",className:"w-full px-3 py-2.5 border border-slate-200 rounded-xl text-sm focus:outline-none focus:border-blue-400 resize-none"})]}),(0,s.jsxs)("div",{className:"flex gap-3 pt-2",children:[(0,s.jsx)("button",{onClick:()=>I(!1),className:"flex-1 py-3 border border-slate-200 rounded-xl text-sm font-bold cursor-pointer hover:bg-slate-50",children:"Cancelar"}),(0,s.jsx)("button",{onClick:Z,disabled:U,className:"flex-1 py-3 bg-blue-600 text-white rounded-xl text-sm font-black cursor-pointer hover:bg-blue-700 disabled:opacity-50",children:U?"Salvando...":V?"Salvar":"Criar Lan\xe7amento"})]})]})]})}),J&&(0,s.jsx)("div",{className:"fixed inset-0 bg-black/50 z-[300] flex items-center justify-center p-4",children:(0,s.jsxs)("div",{className:"bg-white rounded-2xl w-full max-w-sm p-6 shadow-2xl",children:[(0,s.jsx)("h3",{className:"text-lg font-black text-slate-800 mb-2",children:"Excluir lan\xe7amento?"}),(0,s.jsxs)("p",{className:"text-sm text-slate-500 mb-6",children:['"',String(J.descricao),'" ser\xe1 removido permanentemente.']}),(0,s.jsxs)("div",{className:"flex gap-3",children:[(0,s.jsx)("button",{onClick:()=>X(null),className:"flex-1 py-3 border border-slate-200 rounded-xl text-sm font-bold cursor-pointer hover:bg-slate-50",children:"Cancelar"}),(0,s.jsx)("button",{onClick:ee,className:"flex-1 py-3 bg-red-600 text-white rounded-xl text-sm font-black cursor-pointer hover:bg-red-700",children:"Excluir"})]})]})})]})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.