PageSourceSearch

https://app.stoqui.com.br/assets/FiscalConfigPage-DWCqHunq.js

js stoqui.com.br collected 2026-09-24 11:58:21 UTC 4,092 bytes, 1 lines download raw bytes

1import{j as a,a7 as m,a6 as _,Q as O,T as g}from"./mui-CRsYZxVY.js";import{b as I}from"./vendor-Dwao9eNC.js";import{b as k,e as F,bd as H,T as z,s as x,bq as A,br as s,bs as B,bt as P,bu as $,bv as V,bw as q}from"./index-TALscxEc.js";import{H as r}from"./HubRow-DdcKuFLd.js";import{C as J}from"./CertificadoReenvioAlert-4LpNdURr.js";import{u as K}from"./useFiscalConfig-CQEKyhOW.js";import{u as M}from"./useFiscalRegras-D5dYwavN.js";import{i as Q,C as Y}from"./fiscalOptions-BZ76yhnP.js";import"./query-8ViTdhdk.js";import"./datePickers-BIJXYOKG.js";import"./icons-D8aatgQ4.js";import"./lab-DSem1Osk.js";import"./StatusDotLine-CR-EBrxL.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};i.SENTRY_RELEASE={id:"2ad85febf9735404429b0670d4acf56a0af5a0a2"}}catch{}})();try{(function(){var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new i.Error().stack;o&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[o]="98bd368b-a609-4b98-9053-cdb568d32a9f",i._sentryDebugIdIdentifier="sentry-dbid-98bd368b-a609-4b98-9053-cdb568d32a9f")})()}catch{}const ce=()=>{var j,N,y,v;const i=k(),{data:o,isLoading:c}=F(),{data:e,isLoading:w}=K(),l=Q(e==null?void 0:e.formData.crt),{data:t,isLoading:C,isError:D}=M(l),d=H(o);if(I.useEffect(()=>{!c&&!d&&i("/",{replace:!0})},[c,d,i]),c||!d)return null;if(w)return a.jsx(m,{sx:{height:"70vh",display:"flex",alignItems:"center",justifyContent:"center"},children:a.jsx(_,{})});const u=!!e,f=!!((j=e==null?void 0:e.certificado)!=null&&j.validade||(N=e==null?void 0:e.certificado)!=null&&N.serial),h=(y=e==null?void 0:e.certificado)!=null&&y.validade?new Date(e.certificado.validade)<new Date:!1,p=f&&!!(e!=null&&e.precisaEnviarCertificado),E=Y[e==null?void 0:e.formData.crt]??"Simples Nacional",S=C?{label:"Carregando",tone:"neutral"}:D?{label:"Não foi possível carregar",tone:"error"}:!t||t.length===0?{label:"Configure com seu contador",tone:"warning"}:t.some(n=>n.padrao)?t.length===1?{label:`Regra padrão: ${t[0].nome}`,tone:"success"}:{label:`${t.length} regras`,tone:"success"}:{label:"Nenhuma regra marcada como padrão",tone:"warning"},b=(v=e==null?void 0:e.certificado)!=null&&v.validade?new Date(e.certificado.validade).toLocaleDateString("pt-BR"):null,L=f?p?{label:"Reenvie seu certificado A1",tone:"warning"}:h?{label:`Expirado em ${b}`,tone:"warning"}:{label:"Válido",tone:"success"}:{label:"Não configurado",tone:"neutral"},R=f&&!p&&!h&&b?`até ${b}`:void 0,T=()=>{const n=[(e==null?void 0:e.formData.nfe_habilitado)&&"NF-e",(e==null?void 0:e.formData.nfce_habilitado)&&"NFC-e"].filter(Boolean);return n.length===0?"Nenhum tipo habilitado":n.join(" e ")};return a.jsxs(m,{children:[a.jsx(z,{title:"Nota fiscal",navigateBack:!0}),a.jsxs(m,{sx:{mt:1,mx:2},children:[p&&a.jsx(J,{sx:{mb:1},onClick:()=>i("/profile/fiscal/certificado")}),a.jsxs(O,{component:"nav",children:[a.jsx(g,{sx:x,children:"Empresa"}),a.jsx(r,{icon:a.jsx(A,{size:s}),label:u?e.formData.nome_razao_social:"Cadastrar empresa",description:u?`${e.formData.cpf_cnpj} · ${E}`:"CNPJ, razão social, endereço e regime tributário",onClick:()=>i("/profile/fiscal/empresa")}),u&&a.jsxs(a.Fragment,{children:[a.jsx(g,{sx:{...x,mt:3},children:"Configurações"}),a.jsx(r,{icon:a.jsx(B,{size:s}),label:"Certificado digital",status:L,description:R,onClick:()=>i("/profile/fiscal/certificado")}),a.jsx(r,{icon:a.jsx(P,{size:s}),label:"Padrões fiscais",description:l?"CFOP e NCM padrão":"CFOP, CSOSN, PIS, COFINS",onClick:()=>i("/profile/fiscal/defaults")}),l&&a.jsx(r,{icon:a.jsx($,{size:s}),label:"Regras de tributação",status:S,onClick:()=>i("/profile/fiscal/regras")}),a.jsx(r,{icon:a.jsx(V,{size:s}),label:"Configuração NF",description:T(),onClick:()=>i("/profile/fiscal/configuracao")}),a.jsx(g,{sx:{...x,mt:3},children:"Notas fiscais"}),a.jsx(r,{icon:a.jsx(q,{size:s}),label:"Histórico de notas",description:"Notas emitidas, canceladas e rejeitadas",onClick:()=>i("/profile/fiscal/notas")})]})]})]})]})};export{ce 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.