PageSourceSearch

https://redeindica.go.gov.br/build/assets/Diversidades-9e5a1cdf.js

js redeindica.go.gov.br collected 2026-10-02 00:27:08 UTC 6,957 bytes, 1 lines download raw bytes

1import{r as D,v as Z,a,b as ee,o as d,c as f,w as o,f as e,d as l,t as v,u as p,i as u,g as m,h as N,F as S,j as te,k as oe,N as _}from"./app-5fc1912d.js";import{_ as se}from"./AdminGeralLayout-a3455019.js";import{C as $}from"./Card-511e1ef8.js";import{v as j}from"./validacaoNome-49cf0a9d.js";import"./AdminLayout-c73cece3.js";import"./ApplicationLogo-e0d31125.js";import"./Footer-af4780d1.js";import"./iconify-03d69e80.js";import"./icon-df62cc88.js";import"./_plugin-vue_export-helper-c27b6911.js";const ne={class:"tw-text-xl tw-font-bold"},ae=l("span",{class:"tw-text-base tw-leading-3 tw-font-black tw-text-gray-700"},"Nome",-1),le={class:"tw-flex tw-w-full tw-justify-end tw-gap-4"},re=["onClick"],ie=["onClick"],de={class:"tw-text-xl tw-font-bold"},ce={class:"tw-font-title tw-text-gray-600 tw-text-base"},ue={key:0},me={class:"tw-flex tw-flex-row tw-gap-4 tw-justify-end"},_e=["onClick"],we=["onClick"],pe={key:1,class:"tw-font-semibold tw-text-base tw-text-left"},fe={class:"tw-flex tw-justify-between tw-items-center"},ve=l("div",{class:"tw-flex"},[l("div",{class:"text-h6"},"Confirme sua ação")],-1),be=l("div",null," Você deseja realmente remover essa diversidade? ",-1),ge={class:"tw-my-2 tw-flex"},he=["onClick"],je={__name:"Diversidades",props:{diversidades:{type:Array}},setup(U){const y=U,q=D([]),w=D(!1),s=Z({id:"",nome:""});function E(n){s.id=n.id,s.nome=n.nome}function F(n){s.id=n.id,s.nome=n.nome,w.value=!0}function z(){w.value=!1,s.reset()}function A(){const n=s.nome;j(n)&&s.post(route("admin.geral.diversidades.store"),{preserveScroll:!0,onSuccess:r=>{s.reset(),_.create({message:"Diversidades registrada com sucesso.",color:"primary"})},onError:r=>{_.create({message:"Não foi possível registrar a Tipo de Contração.",color:"negative"})}})}function B(){s.delete(route("admin.geral.diversidades.destroy"),{preserveScroll:!0,onSuccess:n=>{s.reset(),_.create({message:"Diversidades removido com sucesso.",color:"primary"})},onError:n=>{_.create({message:"Não foi possível remover o Tipo de Contração.",color:"negative"})}})}function T(){const n=s.nome;j(n)&&s.patch(route("admin.geral.diversidades.update"),{preserveScroll:!0,onSuccess:r=>{s.reset(),_.create({message:"Diversidades atualizada com sucesso.",color:"primary"})},onError:r=>{_.create({message:"Não foi possível remover a Diversidades.",color:"negative"})}})}const I={year:"numeric",month:"numeric",day:"numeric"},L=[{name:"id",label:"",field:"id"},{name:"nome",label:"Nome",field:"nome",sortable:!0,align:"left"},{name:"created_at",label:"Data de Criação",field:"created_at",sortable:!0,format:n=>`${new Date(n).toLocaleString("pt-BR",I)}`||"Indisponível",align:"left"},{name:"user",label:"Usuário",field:"created_by",format:n=>n||"Indisponível",align:"left"},{name:"actions",label:"Ações",field:"actions",align:"right"}],M=["nome","created_at","user","actions"];return(n,r)=>{const b=a("q-separator"),R=a("q-input"),k=a("q-checkbox"),g=a("q-td"),O=a("q-th"),C=a("q-tr"),h=a("q-icon"),P=a("q-table"),V=a("q-card-section"),G=a("q-item-label"),H=a("q-item-section"),J=a("q-item"),K=a("q-btn"),Q=a("q-card-actions"),W=a("q-card"),X=a("q-dialog"),Y=ee("close-popup");return d(),f(se,null,{default:o(()=>[e($,null,{default:o(()=>[l("h4",ne,v(p(s).id?"Editar ":"Nova ")+" Diversidades ",1),e(b),ae,e(R,{outlined:"",required:"",autofocus:"",modelValue:p(s).nome,"onUpdate:modelValue":r[0]||(r[0]=c=>p(s).nome=c),placeholder:"Escreva o nome da Diversidade"},null,8,["modelValue"]),l("div",le,[l("button",{onClick:r[1]||(r[1]=u(c=>p(s).reset(),["prevent"])),class:"tw-rounded-full tw-px-10 tw-h-10 tw-border tw-border-primary tw-bg-white tw-text-primary tw-items-center tw-justify-center"}," Cancelar "),p(s).id?(d(),m("button",{key:0,onClick:u(T,["prevent"]),class:"tw-rounded-full tw-px-10 tw-h-10 tw-bg-primary tw-text-white tw-items-center tw-justify-center"}," Salvar ",8,re)):(d(),m("button",{key:1,onClick:u(A,["prevent"]),class:"tw-rounded-full tw-px-10 tw-h-10 tw-bg-primary tw-text-white tw-items-center tw-justify-center"}," Cadastrar ",8,ie))])]),_:1}),e($,null,{default:o(()=>{var c;return[l("h4",de,v((c=y.tipos)==null?void 0:c.length)+" Diversidade(s) ",1),e(b),e(P,{flat:"",rows:y.diversidades,columns:L,"visible-columns":M,"row-key":"id",selection:"multiple",selected:q.value,"onUpdate:selected":r[2]||(r[2]=t=>q.value=t),"no-data-label":"Não há informações cadastradas.","no-results-label":"Não foi possível localizar informações com o filtro inserido.","rows-per-page-label":"Registros por página","rows-per-page-options":[30,40,60],"pagination-label":(t,i,x)=>`${t} à ${i} de ${x} registros`,"selected-rows-label":t=>t+" registro(s) selecionado(s)"},{header:o(t=>[e(C,{props:t,class:"tw-h-16"},{default:o(()=>[e(g,{"auto-width":""},{default:o(()=>[e(k,{dense:"",modelValue:t.selected,"onUpdate:modelValue":i=>t.selected=i},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),(d(!0),m(S,null,N(t.cols,i=>(d(),f(O,{key:i.name,props:t},{default:o(()=>[l("span",ce,v(i.label),1)]),_:2},1032,["props"]))),128))]),_:2},1032,["props"])]),body:o(t=>[e(C,{props:t,"no-hover":""},{default:o(()=>[e(g,{"auto-width":""},{default:o(()=>[e(k,{dense:"",modelValue:t.selected,"onUpdate:modelValue":i=>t.selected=i},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),(d(!0),m(S,null,N(t.cols,i=>(d(),f(g,{key:i.name,props:t},{default:o(()=>[i.name==="actions"&&t.row.nome!="PCD"?(d(),m("div",ue,[l("div",me,[l("button",{onClick:u(x=>E(t.row),["prevent"])},[e(h,{size:"24px",class:"tw-text-gray-800",name:"mode_edit"})],8,_e),l("button",{onClick:u(x=>F(t.row),["prevent"])},[e(h,{size:"24px",class:"tw-text-red-700",name:"delete_outline"})],8,we)])])):(d(),m("div",pe,v(i.value),1))]),_:2},1032,["props"]))),128))]),_:2},1032,["props"])]),_:1},8,["rows","selected","pagination-label","selected-rows-label"])]}),_:1}),e(X,{modelValue:w.value,"onUpdate:modelValue":r[4]||(r[4]=c=>w.value=c)},{default:o(()=>[e(W,{class:"tw-rounded-3xl tw-h-56 tw-w-72 tw-overflow-hidden"},{default:o(()=>[e(V,null,{default:o(()=>[l("div",fe,[ve,l("div",null,[e(h,{name:"close",class:"tw-cursor-pointer tw-text-gray-500",size:"25px",onClick:r[3]||(r[3]=c=>w.value=!1)})])])]),_:1}),e(V,null,{default:o(()=>[be,e(b,{class:"tw-mt-2"}),e(Q,{align:"right"},{default:o(()=>[l("div",ge,[l("button",{onClick:u(z,["prevent"]),class:"tw-bg-white tw-text-[#6F797A] tw-border-[#6F797A] tw-rounded-full tw-mr
1-5 tw-items-center tw-px-4 tw-py-2 tw-border tw-font-semibold tw-text-xs tw-text-[[#6F797A] tw-tracking-widest focus:tw-outline-none tw-ease-in-out tw-duration-150"}," Cancelar ",8,he),e(K,{rounded:"",class:"tw-bg-primary tw-font-bold","no-caps":"","text-color":"white"},{default:o(()=>[te((d(),f(J,{clickable:"",onClick:u(B,["prevent"])},{default:o(()=>[e(H,null,{default:o(()=>[e(G,null,{default:o(()=>[oe("Confirmar")]),_:1})]),_:1})]),_:1},8,["onClick"])),[[Y]])]),_:1})])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})}}};export{je 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.