PageSourceSearch

https://duoglobal.us/assets/PaisDetailPage-DHyFlx4q.js

js duoglobal.us collected 2026-10-09 04:49:35 UTC 4,674 bytes, 1 lines download raw bytes

1import{j as s,B as p,ad as u,a as f,f as h}from"./index-BfLdn4Vu.js";import{P as g}from"./PageHeader-CTtXZM-S.js";import{C as o,b as n,c,a as m}from"./card-CW2Buz3p.js";import{P as N}from"./PaisStatusBadge-CzmowjPv.js";import{M as b}from"./MoedaRegraRow-dWiougiE.js";import{B as v}from"./badge-Bqd04p_5.js";import{T as P}from"./trash-2-sZlbTa1T.js";import{e as C,f as w,c as B}from"./usePaises-DqWw-J8T.js";import{S as x}from"./SetBreadcrumbs-BZlpTm-B.js";import{P as y}from"./pencil-Cbx4Nl6T.js";import"./useMutation-D7MmsIig.js";const j={texto:{label:"Texto",variant:"secondary"},numero:{label:"Número",variant:"outline"},lista:{label:"Lista",variant:"default"}};function _({campo:e,onDelete:r,readOnly:a}){const i=j[e.tipo_campo]||j.texto;return s.jsxs("tr",{className:"border-b hover:bg-muted/50",children:[s.jsx("td",{className:"p-3 font-medium",children:e.nome_campo}),s.jsx("td",{className:"p-3",children:s.jsx(v,{variant:i.variant,children:i.label})}),s.jsx("td",{className:"p-3",children:e.obrigatorio?"✓":"—"}),s.jsx("td",{className:"p-3 text-muted-foreground text-xs",children:e.placeholder||"—"}),s.jsx("td",{className:"p-3 text-muted-foreground text-xs",children:e.tipo_campo==="lista"&&e.opcoes_lista?e.opcoes_lista.join(", "):"—"}),!a&&s.jsx("td",{className:"p-3",children:s.jsx(p,{variant:"ghost",size:"icon",onClick:()=>r==null?void 0:r(e.id),children:s.jsx(P,{className:"h-4 w-4 text-destructive"})})})]})}function z(){const{id:e}=u(),r=f(),{data:a,isLoading:i}=C(e),{data:d}=w(e),{data:l}=B(e);return i?s.jsxs(s.Fragment,{children:[s.jsx(x,{items:[{label:"Países",href:"/admin/paises"},{label:"Detalhes"}]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx(h,{className:"h-10 w-48"}),s.jsx(h,{className:"h-64 w-full"})]})]}):a?s.jsxs(s.Fragment,{children:[s.jsx(x,{items:[{label:"Países",href:"/admin/paises"},{label:"Detalhes"}]}),s.jsxs("div",{className:"space-y-6",children:[s.jsx(g,{title:a.nome,icon:a.url_bandeira?s.jsx("img",{src:a.url_bandeira,alt:a.nome,className:"h-7 w-10 rounded-sm object-cover shadow-sm"}):void 0,actions:s.jsxs(p,{onClick:()=>r(`/admin/paises/${e}/editar`),children:[s.jsx(y,{className:"h-4 w-4 mr-2"})," Configurar Regras"]})}),s.jsxs(o,{children:[s.jsx(n,{children:s.jsx(c,{children:"Dados do País"})}),s.jsx(m,{children:s.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 md:grid-cols-4",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:"ISO2"}),s.jsx("p",{className:"font-mono font-semibold",children:a.iso2})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:"ISO3"}),s.jsx("p",{className:"font-mono font-semibold",children:a.iso3})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:"Código BACEN"}),s.jsx("p",{className:"font-mono",children:a.codigo_bacen||"—"})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:"Status"}),s.jsx(N,{status:a.status})]})]})})]}),s.jsxs(o,{children:[s.jsx(n,{children:s.jsx(c,{children:"Regras por Moeda"})}),s.jsx(m,{children:d&&d.length>0?s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b text-left text-muted-foreground",children:[s.jsx("th",{className:"p-3",children:"Moedas"}),s.jsx("th",{className:"p-3",children:"Tipo"}),s.jsx("th",{className:"p-3",children:"Especificações"})]})}),s.jsx("tbody",{children:d.map(t=>s.jsx(b,{regra:t,readOnly:!0},t.id))})]})}):s.jsx("p",{className:"text-sm text-muted-foreground text-center py-6",children:"Nenhuma regra configurada"})})]}),s.jsxs(o,{children:[s.jsx(n,{children:s.jsx(c,{children:"Campos de Beneficiário"})}),s.jsx(m,{children:l&&l.length>0?s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b text-left text-muted-foreground",children:[s.jsx("th",{className:"p-3",children:"Campo"}),s.jsx("th",{className:"p-3",children:"Tipo"}),s.jsx("th",{className:"p-3",children:"Obrigatório"}),s.jsx("th",{className:"p-3",children:"Placeholder"}),s.jsx("th",{className:"p-3",children:"Opções"})]})}),s.jsx("tbody",{children:l.map(t=>s.jsx(_,{campo:t,readOnly:!0},t.id))})]})}):s.jsx("p",{className:"text-sm text-muted-foreground text-center py-6",children:"Nenhum campo adicional configurado"})})]})]})]}):s.jsxs(s.Fragment,{children:[s.jsx(x,{items:[{label:"Países",href:"/admin/paises"},{label:"Detalhes"}]}),s.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"País não encontrado"})]})}
1export{z 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.