PageSourceSearch

https://dom.santanadomaranhao.ma.gov.br/build/assets/Publications-JV6hG8CY.js

js santanadomaranhao.ma.gov.br collected 2026-10-02 14:18:46 UTC 4,563 bytes, 1 lines download raw bytes

1import{d as L,f as G,bR as J,A as O,F as Q,S as X,C as Y,r as l,i as Z,D as ee,j as w,k as f,n as o,t as c,m as e,E as ae,o as _,p as C,v as y,l as a,K as M,s as k}from"./app-rHguuL5e.js";import{_ as oe}from"./Layout.vue_vue_type_script_setup_true_lang-LfRyzQeH.js";import{_ as te}from"./SearchForm.vue_vue_type_script_setup_true_lang-G_j-3ZCx.js";import{_ as se}from"./DataTable.vue_vue_type_script_setup_true_lang-PZtQgOAs.js";import{_ as le}from"./ModalCreate.vue_vue_type_script_setup_true_lang-xew0n3Cs.js";import{_ as re}from"./ModalEdit.vue_vue_type_script_setup_true_lang-b8oZAndF.js";import{_ as ie}from"./ModalDelete.vue_vue_type_script_setup_true_lang-4_sHsnUg.js";import{u as ne}from"./use-crud.composable-ivEw8127.js";import{u as de}from"./use-category-validation.composable-O3Sig-Bb.js";import"./show-error-ODmFk4VX.js";import"./index-7hMjYadJ.js";import"./index-423UCd14.js";import"./index-L_JWdKAj.js";import"./logo-VLooSubU.js";import"./Tooltip.vue_vue_type_script_setup_true_lang-7jqMbh62.js";import"./purify-sp3ffXW7.js";import"./show-success-jYkIZIbz.js";import"./index.esm-eq4vbLAy.js";import"./_commonjsHelpers-4gQjN7DL.js";const me={key:0,class:"text-red-500"},ce={key:0,class:"text-red-500"},ue={class:"flex-grow flex flex-row flex-wrap"},pe={class:"animate__animated animate__slideInUp animate__faster w-full bg-white rounded-md shadow-sm p-5 flex flex-col"},fe={class:"flex flex-col md:flex-row justify-between items-center"},_e=a("button",{class:"group bg-primary border border-dashbg hover:border-primary duration-500 rounded-full flex flex-row items-center h-9 px-6 hover:px-8 mb-2 hover:bg-primary"},[a("span",{class:"text-xs text-white/90 group-hover:text-white duration-500 font-bold"},"Adicionar novo")],-1),be={class:"mt-6 flex flex-row items-center bg-blue-50 border border-blue-200 rounded-md p-4"},he=a("div",{class:"flex flex-col"},[a("span",{class:"text-sm font-semibold text-blue-800"},"Exibição de publicações"),a("span",{class:"text-xs text-blue-700"},"Cadastre no mínimo 3 publicações para que a exibição seja feita de forma correta.")],-1),Be=L({__name:"Publications",setup(ve){G(Y,X,Q,O,J);const S=de(),{items:I,addItem:E,editItem:D,removeItem:F,fetchItems:V,fetchItemsWithSearch:$,loadMoreItems:N,errors:d,loading:r,pagination:j}=ne("portal/publications",S),b=l(!1),h=l(!1),u=l(!1),T=Z(),t=l({name:""}),i=l(),p=l(""),U=m=>{T.push("/dashboard/portal/publicacoes/"+m.slug)},A=m=>{i.value=m,u.value=!0},B=[{label:"Título",field:"title",width:"w-4/12"},{label:"Categoria",field:"category",width:"w-4/12"},{label:"Cadastrado em",field:"created_at",width:"w-3/12"}],R=[{icon:"fa-regular-edit",handler:U},{icon:"la-trash-alt-solid",handler:A}],v=()=>{b.value=!1},q=async()=>{await E(t.value),v()},x=()=>{h.value=!1},P=async()=>{i.value&&(await D(i.value.id.toString(),t.value),x())},g=()=>{u.value=!1},W=async()=>{i.value&&(await F(i.value.id.toString()),g())},z=async()=>{await $(p.value)};return ee(V),(m,s)=>{const H=w("router-link"),K=w("v-icon");return _(),f(ae,null,[o(le,{show:b.value,title:"Cadastrar novo",onClose:v,onSubmit:q,loading:e(r)},{default:c(()=>[C(a("input",{"onUpdate:modelValue":s[0]||(s[0]=n=>t.value.name=n),placeholder:"Nome",class:"p-2 h-9 rounded-md bg-black/5 mt-2 text-xs text-black outline-0 border border-black/10 group-hover:border-primary duration-500 w-full"},null,512),[[y,t.value.name]]),e(d).name?(_(),f("span",me,M(e(d).name),1)):k("",!0)]),_:1},8,["show","loading"]),o(re,{show:h.value,title:"Editar item",onClose:x,onSubmit:P,loading:e(r)},{default:c(()=>[C(a("input",{"onUpdate:modelValue":s[1]||(s[1]=n=>t.value.name=n),placeholder:"Nome",class:"p-2 h-9 rounded-md bg-black/5 mt-2 text-xs text-black outline-0 border border-black/10 group-hover:border-primary duration-500 w-full"},null,512),[[y,t.value.name]]),e(d).name?(_(),f("span",ce,M(e(d).name),1)):k("",!0)]),_:1},8,["show","loading"]),o(ie,{show:u.value,message:"Tem certeza que deseja deletar este item?",onClose:g,onConfirm:W,loading:e(r)},null,8,["show","loading"]),o(oe,{title:"Publicações"},{default:c(()=>[a("div",ue,[a("div",pe,[a("div",fe,[o(te,{search:p.value,"onUpdate:search":s[2]||(s[2]=n=>p.value=n),loading:e(r),onSubmit:z},null,8,["search","loading"]),o(H,{to:"/dashboard/portal/publicacoes/novo"},{default:c(()=>[_e]),_:1})]),o(se,{items:e(I),columns:B,actions:R,pagination:e(j),loading:e(r),loadMore:e(N)},null,8,["items","pagination","loading","loadMore"]),a("div",be,[o(K,{name:"hi-information-circle",class:"text-blue-500 mr-3",scale:"1.2"}),he])])])]),_:1})],64)}}});
1export{Be 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.