PageSourceSearch

https://craibas.al.gov.br/build/assets/Form-VCIDG8_t.js

js craibas.al.gov.br collected 2026-10-02 23:54:46 UTC 7,706 bytes, 1 lines download raw bytes

1import{c as xe,a as _e,j as s}from"./app-CTaY8UJf.js";import{B as le}from"./button-DXCKLHtj.js";import{C as ne,a as me,b as de,c as ue}from"./card-UxP9oPxk.js";import{I as L}from"./input-7aHhCeCr.js";import{L as B}from"./label-CxCrcTSv.js";import he from"./file-text-jraIksbC.js";import ve from"./x-DmP7A1Bz.js";import je from"./upload-C5_Iw0PV.js";import"./app-CNmQMdEi.js";import"./index-fQ3brVpV.js";import"./createLucideIcon-CmjF8lT1.js";function Ee(pe){const e=xe.c(103),{item:i,isEdit:ce}=pe,l=ce===void 0?!1:ce,Y=i?.casos_confirmados??"",Z=i?.casos_suspeitos??"",ee=i?.pessoas_recuperadas??"",se=i?.obitos??"",te=i?.nome_arquivo??"",ae=l?"put":"post";let T;e[0]!==Y||e[1]!==Z||e[2]!==ee||e[3]!==se||e[4]!==te||e[5]!==ae?(T={casos_confirmados:Y,casos_suspeitos:Z,pessoas_recuperadas:ee,obitos:se,nome_arquivo:te,arquivo:null,_method:ae},e[0]=Y,e[1]=Z,e[2]=ee,e[3]=se,e[4]=te,e[5]=ae,e[6]=T):T=e[6];const{data:a,setData:o,post:oe,processing:V,errors:t}=_e(T);let $;e[7]!==l||e[8]!==i||e[9]!==oe?($=r=>{r.preventDefault();const fe=l&&i?.id?`/portal/admin/covid19/${i.id}`:"/portal/admin/covid19";oe(fe,{forceFormData:!0})},e[7]=l,e[8]=i,e[9]=oe,e[10]=$):$=e[10];const re=$;let H;e[11]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(ne,{children:s.jsx(me,{children:"Dados da COVID-19"})}),e[11]=H):H=e[11];let M;e[12]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsx(B,{htmlFor:"casos_confirmados",children:"Casos Confirmados"}),e[12]=M):M=e[12];let c;e[13]!==o?(c=r=>o("casos_confirmados",r.target.value?parseInt(r.target.value):""),e[13]=o,e[14]=c):c=e[14];let n;e[15]!==a.casos_confirmados||e[16]!==c?(n=s.jsx(L,{id:"casos_confirmados",type:"number",min:"0",value:a.casos_confirmados,onChange:c}),e[15]=a.casos_confirmados,e[16]=c,e[17]=n):n=e[17];let m;e[18]!==t.casos_confirmados?(m=t.casos_confirmados&&s.jsx("p",{className:"text-sm text-red-600",children:t.casos_confirmados}),e[18]=t.casos_confirmados,e[19]=m):m=e[19];let d;e[20]!==n||e[21]!==m?(d=s.jsxs("div",{className:"space-y-2",children:[M,n,m]}),e[20]=n,e[21]=m,e[22]=d):d=e[22];let O;e[23]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(B,{htmlFor:"casos_suspeitos",children:"Casos Suspeitos"}),e[23]=O):O=e[23];let u;e[24]!==o?(u=r=>o("casos_suspeitos",r.target.value?parseInt(r.target.value):""),e[24]=o,e[25]=u):u=e[25];let p;e[26]!==a.casos_suspeitos||e[27]!==u?(p=s.jsx(L,{id:"casos_suspeitos",type:"number",min:"0",value:a.casos_suspeitos,onChange:u}),e[26]=a.casos_suspeitos,e[27]=u,e[28]=p):p=e[28];let f;e[29]!==t.casos_suspeitos?(f=t.casos_suspeitos&&s.jsx("p",{className:"text-sm text-red-600",children:t.casos_suspeitos}),e[29]=t.casos_suspeitos,e[30]=f):f=e[30];let x;e[31]!==p||e[32]!==f?(x=s.jsxs("div",{className:"space-y-2",children:[O,p,f]}),e[31]=p,e[32]=f,e[33]=x):x=e[33];let P;e[34]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx(B,{htmlFor:"pessoas_recuperadas",children:"Pessoas Recuperadas"}),e[34]=P):P=e[34];let _;e[35]!==o?(_=r=>o("pessoas_recuperadas",r.target.value?parseInt(r.target.value):""),e[35]=o,e[36]=_):_=e[36];let h;e[37]!==a.pessoas_recuperadas||e[38]!==_?(h=s.jsx(L,{id:"pessoas_recuperadas",type:"number",min:"0",value:a.pessoas_recuperadas,onChange:_}),e[37]=a.pessoas_recuperadas,e[38]=_,e[39]=h):h=e[39];let v;e[40]!==t.pessoas_recuperadas?(v=t.pessoas_recuperadas&&s.jsx("p",{className:"text-sm text-red-600",children:t.pessoas_recuperadas}),e[40]=t.pessoas_recuperadas,e[41]=v):v=e[41];let j;e[42]!==h||e[43]!==v?(j=s.jsxs("div",{className:"space-y-2",children:[P,h,v]}),e[42]=h,e[43]=v,e[44]=j):j=e[44];let U;e[45]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(B,{htmlFor:"obitos",children:"Óbitos"}),e[45]=U):U=e[45];let b;e[46]!==o?(b=r=>o("obitos",r.target.value?parseInt(r.target.value):""),e[46]=o,e[47]=b):b=e[47];let q;e[48]!==a.obitos||e[49]!==b?(q=s.jsx(L,{id:"obitos",type:"number",min:"0",value:a.obitos,onChange:b}),e[48]=a.obitos,e[49]=b,e[50]=q):q=e[50];let y;e[51]!==t.obitos?(y=t.obitos&&s.jsx("p",{className:"text-sm text-red-600",children:t.obitos}),e[51]=t.obitos,e[52]=y):y=e[52];let g;e[53]!==q||e[54]!==y?(g=s.jsxs("div",{className:"space-y-2",children:[U,q,y]}),e[53]=q,e[54]=y,e[55]=g):g=e[55];let X;e[56]===Symbol.for("react.memo_cache_sentinel")?(X=s.jsx(B,{htmlFor:"nome_arquivo",children:"Nome do Arquivo/Relatório"}),e[56]=X):X=e[56];let N;e[57]!==o?(N=r=>o("nome_arquivo",r.target.value),e[57]=o,e[58]=N):N=e[58];let C;e[59]!==a.nome_arquivo||e[60]!==N?(C=s.jsx(L,{id:"nome_arquivo",type:"text",value:a.nome_arquivo,onChange:N,placeholder:"Ex: Relatório de Casos - Março 2026"}
1),e[59]=a.nome_arquivo,e[60]=N,e[61]=C):C=e[61];let S;e[62]!==t.nome_arquivo?(S=t.nome_arquivo&&s.jsx("p",{className:"text-sm text-red-600",children:t.nome_arquivo}),e[62]=t.nome_arquivo,e[63]=S):S=e[63];let F;e[64]!==C||e[65]!==S?(F=s.jsxs("div",{className:"space-y-2 md:col-span-2",children:[X,C,S]}),e[64]=C,e[65]=S,e[66]=F):F=e[66];let w;e[67]!==d||e[68]!==x||e[69]!==j||e[70]!==g||e[71]!==F?(w=s.jsxs(de,{children:[H,s.jsxs(ue,{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[d,x,j,g,F]})]}),e[67]=d,e[68]=x,e[69]=j,e[70]=g,e[71]=F,e[72]=w):w=e[72];let G;e[73]===Symbol.for("react.memo_cache_sentinel")?(G=s.jsx(ne,{children:s.jsx(me,{children:"Arquivo de Dados"})}),e[73]=G):G=e[73];let J;e[74]===Symbol.for("react.memo_cache_sentinel")?(J=s.jsx(B,{htmlFor:"arquivo",children:"Arquivo"}),e[74]=J):J=e[74];let K;e[75]===Symbol.for("react.memo_cache_sentinel")?(K=s.jsx(je,{className:"h-4 w-4 text-gray-500 shrink-0"}),e[75]=K):K=e[75];let I;e[76]!==o?(I=s.jsxs("div",{className:"mt-2 flex items-center gap-2 rounded-md border border-dashed p-3",children:[K,s.jsx("input",{id:"arquivo",type:"file",className:"block w-full text-sm file:mr-3 file:rounded-md file:border-0 file:bg-primary file:px-3 file:py-1.5 file:text-primary-foreground file:text-sm cursor-pointer",onChange:r=>o("arquivo",r.target.files?.[0]??null)})]}),e[76]=o,e[77]=I):I=e[77];let k;e[78]!==t.arquivo?(k=t.arquivo&&s.jsx("p",{className:"text-sm text-red-600",children:t.arquivo}),e[78]=t.arquivo,e[79]=k):k=e[79];let D;e[80]!==a.arquivo||e[81]!==l||e[82]!==i?(D=l&&i?.arquivo_url&&!a.arquivo&&s.jsxs("a",{href:i.arquivo_url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-2 text-sm text-blue-600 hover:underline",children:[s.jsx(he,{className:"h-4 w-4"}),"Visualizar arquivo atual"]}),e[80]=a.arquivo,e[81]=l,e[82]=i,e[83]=D):D=e[83];let E;e[84]!==a.arquivo||e[85]!==o?(E=a.arquivo&&s.jsxs("div",{className:"flex items-center justify-between rounded-md bg-muted px-3 py-2 text-sm",children:[s.jsx("span",{className:"truncate",children:a.arquivo.name}),s.jsx(le,{type:"button",variant:"ghost",size:"icon",onClick:()=>o("arquivo",null),children:s.jsx(ve,{className:"h-4 w-4"})})]}),e[84]=a.arquivo,e[85]=o,e[86]=E):E=e[86];let R;e[87]!==I||e[88]!==k||e[89]!==D||e[90]!==E?(R=s.jsxs(de,{children:[G,s.jsx(ue,{className:"space-y-4",children:s.jsxs("div",{className:"rounded-lg border p-4 space-y-3",children:[J,I,k,D,E]})})]}),e[87]=I,e[88]=k,e[89]=D,e[90]=E,e[91]=R):R=e[91];const ie=V?"Salvando...":l?"Atualizar":"Cadastrar";let A;e[92]!==V||e[93]!==ie?(A=s.jsx(le,{type:"submit",disabled:V,children:ie}),e[92]=V,e[93]=ie,e[94]=A):A=e[94];let Q;e[95]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx(le,{type:"button",variant:"outline",onClick:be,children:"Cancelar"}),e[95]=Q):Q=e[95];let z;e[96]!==A?(z=s.jsxs("div",{className:"flex flex-wrap gap-3",children:[A,Q]}),e[96]=A,e[97]=z):z=e[97];let W;return e[98]!==re||e[99]!==w||e[100]!==R||e[101]!==z?(W=s.jsxs("form",{onSubmit:re,className:"space-y-6",children:[w,R,z]}),e[98]=re,e[99]=w,e[100]=R,e[101]=z,e[102]=W):W=e[102],W}function be(){return window.history.back()}export{Ee as default};

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.