PageSourceSearch

https://redeindica.go.gov.br/build/assets/Interesses-6b26c5be.js

js redeindica.go.gov.br collected 2026-10-02 00:27:33 UTC 9,265 bytes, 1 lines download raw bytes

1import{_ as N}from"./AuthenticatedLayout-aebca31e.js";import{v as S,p as w,N as r,a as l,b as U,o as d,g as u,f as s,w as a,d as o,k as E,t as f,e as q,F as V,h as F,c as T,j as z}from"./app-5fc1912d.js";import{I as B}from"./iconify-03d69e80.js";import{_ as P}from"./InputLabel-cab2995d.js";import{_ as H}from"./_plugin-vue_export-helper-c27b6911.js";import"./ApplicationLogo-e0d31125.js";import"./icon-df62cc88.js";import"./validacaoNome-49cf0a9d.js";const G={name:"interesses",components:{Icon:B,AuthenticatedLayout:N,InputLabel:P},props:{interesses:{type:Array,default:""}},data(){return{selectedOptions:{status:""},acaoTomada:!0,columns:[{name:"nome",align:"center",label:"Nome",field:"nome",sortable:!0},{name:"status",align:"right",label:"Status",field:"status",sortable:!0},{name:"actions",align:"center",label:"Ações",field:"actions",sortable:!0}],filter:"",selected:[],showInscritosDialog:!1,selectedVaga:null,showDialog:!1,showDialogCandidato:!1,interessesArray:[],showForm:!1,openModal:!1,isEditing:!1,labelEditing:!1,form:S({id:"",nome:"",status:""}),typeModal:null,openModalDelete:!1,statusOption:[{label:"Ativo",value:"Ativo"},{label:"Inativo",value:"Inativo"}]}},methods:{openModalForm(n,t=[]){this.openModal=!0,n===1?(this.typeModal=1,this.form.reset()):t&&(this.typeModal=2,this.form.id=t.id,this.form.nome=t.nome,this.form.status=t.status)},openDialog(n){this.selectedVaga=n,this.showDialog=!0},enviarAcao(n){w.post(route("vagas.changeStatus"),n).then(t=>{n.status==="Ativo"?r.create({type:"positive",position:"top-right",message:"Vaga ativada com sucesso."}):r.create({type:"positive",position:"top-right",message:"Vaga desativada com sucesso."})}).catch(t=>{r.create({type:"negative",color:"negative",position:"top-right",message:`${t.response.data.error}`})})},openModalDeleteAction(n){this.openModalDelete=!0,this.form.id=n.id},getStatusColor(n){if(n==="Em andamento")return"primary";if(n==="Aprovada")return"positive";if(n==="Inativo")return"negative"},destroyinteresses(){w.delete(route("interesses.destroy",this.form.id)).then(()=>{r.create({type:"positive",position:"top-right",message:"Vaga removida com sucesso."}),this.openModalDelete=!1,setTimeout(()=>{window.location.href=window.location.href},1e3)}).catch(n=>{r.create({type:"negative",color:"negative",position:"top-right",message:`${n.response.data.error}`})})},adicionarinteresse(){if(!this.form.nome||!this.selectedOptions.status){r.create({type:"warning",position:"top-right",message:"Preencha todos os campos antes de adicionar uma interesse."});return}this.interessesArray.push({nome:this.form.nome,status:this.selectedOptions.status.value}),this.interessesArray,this.form.reset()},storeinteresses(){this.form.status=this.selectedOptions.status.value,w.post(route("interesses.store"),this.interessesArray).then(()=>{this.openModal=!1,r.create({type:"positive",position:"top-right",message:"Dados adicionados com sucesso."}),setTimeout(()=>{window.location.href=window.location.href},2e3)}).catch(n=>{r.create({type:"negative",color:"negative",position:"top-right",message:`${n.response.data.error}`})})},paginationLabel(){return`Total de registro(s) encontrado(s): ${this.interesses.length}`},saveinteresses(){this.form.status=this.selectedOptions.status,w.patch(route("interesses.update",this.form.id),this.form).then(()=>{this.openModal=!1,r.create({type:"positive",position:"top-right",message:"Dados atualizados com sucesso."}),this.showForm=!1,setTimeout(()=>{window.location.href=window.location.href},2e3)}).catch(n=>{r.create({type:"negative",color:"negative",position:"top-right",message:`${n.response.data.error}`})})}}},J=o("title",null,"Minhas Vagas",-1),K={class:"tw-py-12"},Q={class:"tw-max-w-7xl tw-mx-auto sm:tw-px-6 lg:tw-px-8"},R={class:"tw-bg-white tw-overflow-hidden tw-shadow-sm sm:tw-rounded-lg"},W=o("span",{class:"tw-mr-1"},"Adicionar",-1),X={key:0},Y={class:"tw-inline-flex tw-items-center tw-rounded-md tw-shadow-sm"},Z=["onClick"],$={key:1},ee={key:2},te={class:"tw-w-full tw-flex tw-justify-center tw-items-center"},se={key:0,class:"text-h6"},oe={class:"tw-grid tw-grid-cols-2 md:tw-grid-cols-1 tw-gap-5"}
1,ne={class:"tw-grid tw-grid-cols-3 md:tw-grid-cols-2 tw-gap-5"},ie={class:"tw-mt-9 tw-grid-cols-2 md:tw-grid-cols-6 tw-gap-5"},ae=o("div",{class:"text-h6"},"Excluir obra",-1),le=o("div",null," Você tem certeza que deseja deletar esse registro? ",-1),re={class:"tw-mt-5 tw-flex"},de=o("span",{class:"tw-mr-1"},"Excluir",-1),ce={class:"tw-flex tw-items-center tw-justify-center tw-bg-cyan-500 tw-px-3 tw-py-2 tw-rounded-md tw-text-white"},ue=o("span",{class:"tw-mr-1"},"Cancelar",-1);function me(n,t,k,pe,i,c){const M=l("Head"),m=l("Icon"),h=l("q-icon"),g=l("q-input"),A=l("q-badge"),D=l("q-td"),C=l("q-table"),p=l("q-card-section"),_=l("InputLabel"),I=l("q-select"),v=l("q-btn"),L=l("q-form"),y=l("q-card"),b=l("q-dialog"),O=l("AuthenticatedLayout"),j=U("close-popup");return d(),u(V,null,[s(M,null,{default:a(()=>[J]),_:1}),s(O,null,{default:a(()=>[o("div",K,[o("div",Q,[o("div",R,[s(C,{flat:"",bordered:"",rows:k.interesses,columns:i.columns,filter:i.filter,"row-key":"id",selected:i.selected,"onUpdate:selected":t[2]||(t[2]=e=>i.selected=e),"no-data-label":"Sem dados cadastrados","no-results-label":"A sua pesquisa não retornou dados","rows-per-page-options":[0],"pagination-label":c.paginationLabel},{"top-left":a(()=>[o("button",{onClick:t[0]||(t[0]=e=>c.openModalForm(1)),class:"tw-flex tw-items-center tw-justify-center tw-bg-green-500 tw-px-3 tw-py-2 tw-rounded-md tw-text-black"},[W,s(m,{icon:"material-symbols:add-circle"})])]),"top-right":a(()=>[s(g,{borderless:"",dense:"",modelValue:i.filter,"onUpdate:modelValue":t[1]||(t[1]=e=>i.filter=e),placeholder:"Pesquisar",class:"tw-border tw-border-gray-400 tw-rounded-md tw-px-2"},{append:a(()=>[s(h,{name:"search"})]),_:1},8,["modelValue"])]),"body-cell":a(e=>[s(D,{props:e},{default:a(()=>[e.col.name==="actions"?(d(),u("div",X,[o("div",Y,[o("button",{onClick:x=>c.openModalDeleteAction(e.row),class:"tw-text-slate-800 hover:tw-text-red-500 tw-text-sm tw-bg-white hover:tw-bg-slate-100 tw-border tw-border-slate-200 tw-rounded-l-lg tw-rounded-r-lg tw-font-medium tw-px-4 tw-py-2 tw-inline-flex tw-space-x-1 tw-items-center",title:"Excluir interesse"},[s(m,{icon:"uil:trash"})],8,Z)])])):e.col.name==="status"?(d(),u("div",$,[s(A,{color:c.getStatusColor(e.value)},{default:a(()=>[E(f(e.value),1)]),_:2},1032,["color"])])):(d(),u("div",ee,f(e.value),1))]),_:2},1032,["props"])]),"no-data":a(({icon:e,message:x,filter:we})=>[o("div",te,[o("span",null,f(x),1),s(h,{size:"2em",name:"sentiment_dissatisfied"})])]),_:1},8,["rows","columns","filter","selected","pagination-label"])])])]),s(b,{modelValue:i.openModal,"onUpdate:modelValue":t[7]||(t[7]=e=>i.openModal=e),"content-class":"dialog-content"},{default:a(()=>[s(y,{style:{width:"900px","max-width":"80vw"}},{default:a(()=>[s(p,null,{default:a(()=>[i.typeModal===1?(d(),u("div",se,"Adicionar interesse")):q("",!0)]),_:1}),s(p,null,{default:a(()=>[s(L,{class:"tw-space-y-6"},{default:a(()=>[o("div",oe,[o("div",null,[s(_,{for:"name",required:"",value:"Nome"}),s(g,{outlined:"",clearable:"",id:"nome",type:"text",class:"tw-mt-1 tw-block tw-w-full",modelValue:i.form.nome,"onUpdate:modelValue":t[3]||(t[3]=e=>i.form.nome=e),autofocus:"",autocomplete:"name","lazy-rules":"",rules:[e=>!!e||"Por favor, insira o nome desejado"]},null,8,["modelValue","rules"])])]),o("div",ne,[o("div",null,[s(_,{for:"status",required:"",value:"Status"}),s(I,{outlined:"",clearable:"",id:"estado_civil",class:"tw-mt-1 tw-block tw-w-full",modelValue:i.selectedOptions.status,"onUpdate:modelValue":t[4]||(t[4]=e=>i.selectedOptions.status=e),options:i.statusOption,rules:[e=>!!e||"Por favor, selecione o Status"]},null,8,["modelValue","options","rules"])]),o("div",ie,[o("button",{onClick:t[5]||(t[5]=(...e)=>c.adicionarinteresse&&c.adicionarinteresse(...e)),class:"tw-bg-white hover:tw-bg-slate-100 tw-border tw-border-slate-200 tw tw-px-4 tw-py-2 tw-items-center",title:"Adicionar interesse"},[s(m,{class:"tw-mt-1 tw-block tw-w-full",icon:"foundation:plus"})])])]),o("div",null,[s(_,{for:"interesses",value:"interesses Listadas:"}),o("ul",null,[(d(!0),u(V,null,F(i.interessesArray,e=>(d(),u("li",{key:e.id},f(e.nome),1))),128))])]),o("div",null,[i.typeModal===1?(d(),T(v,{key:0,label:"Cadastrar interesses",onClick:c.storeinteresses,color:"cyan"},null,8,["onClick"])):q("",!0),s(v,{class:"tw-items-center tw-ml-7 tw-justify-center tw-bg-red-500 tw-px-3 tw-py-2 tw-rounded-md tw-text-white",label:"Fechar",color:"danger",onClick:t[6]||(t[6]=e=>
1i.openModal=!1)})])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"]),s(b,{modelValue:i.openModalDelete,"onUpdate:modelValue":t[9]||(t[9]=e=>i.openModalDelete=e)},{default:a(()=>[s(y,{style:{width:"700px","max-width":"80vw"}},{default:a(()=>[s(p,null,{default:a(()=>[ae]),_:1}),s(p,null,{default:a(()=>[le,o("div",re,[o("button",{onClick:t[8]||(t[8]=e=>c.destroyinteresses()),class:"tw-mr-5 tw-flex tw-items-center tw-justify-center tw-bg-red-500 tw-px-3 tw-py-2 tw-rounded-md tw-text-white"},[de,s(m,{icon:"uil:trash"})]),z((d(),u("button",ce,[ue,s(m,{icon:"material-symbols:cancel-outline"})])),[[j]])])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})],64)}const qe=H(G,[["render",me]]);export{qe 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.