PageSourceSearch

https://redeindica.go.gov.br/build/assets/VagaModalidade-ff188c5a.js

js redeindica.go.gov.br collected 2026-10-02 00:28:05 UTC 8,751 bytes, 1 lines download raw bytes

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