PageSourceSearch

https://dom.santanadomaranhao.ma.gov.br/build/assets/FaqList-EEqrakWV.js

js santanadomaranhao.ma.gov.br collected 2026-10-02 14:18:24 UTC 2,691 bytes, 1 lines download raw bytes

1import{d as $,f as k,A as y,F as A,S as D,C as E,r as s,i as B,D as R,k as T,n as a,m as e,t as U,E as V,o as j,l as r}from"./app-rHguuL5e.js";import{_ as L}from"./Layout.vue_vue_type_script_setup_true_lang-LfRyzQeH.js";import{_ as N}from"./ButtonCreate.vue_vue_type_script_setup_true_lang-7sLvsETn.js";import{_ as P}from"./SearchForm.vue_vue_type_script_setup_true_lang-G_j-3ZCx.js";import{_ as W}from"./DataTable.vue_vue_type_script_setup_true_lang-sVuk_hvn.js";import{_ as z}from"./ModalDelete.vue_vue_type_script_setup_true_lang-4_sHsnUg.js";import{u as O}from"./use-crud.composable-ivEw8127.js";import{u as Q}from"./use-user-faq-validation.composable-j7BeftlM.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";import"./use-validation.composable-zlkLrkbS.js";const G={class:"flex-grow flex flex-row flex-wrap"},H={class:"animate__animated animate__slideInUp animate__faster w-full bg-white rounded-md shadow-sm p-5 flex flex-col"},J={class:"flex flex-col md:flex-row justify-between items-center"},he=$({__name:"FaqList",setup(K){k(E,D,A,y);const i=s(""),u=Q(),{items:f,removeItem:p,fetchItems:_,fetchItemsWithSearch:h,loadMoreItems:w,loading:n,pagination:g}=O("user-faqs",u),t=s(null),v=s({}),l=s(""),d=B(),x=o=>d.push("/dashboard/informacoes-institucionais/faq/"+o.id),S=o=>{t.value=o,i.value="delete"},b=[{label:"Pergunta",field:"question",width:"w-5/12"},{label:"Resposta",field:"answer",width:"w-4/12"},{label:"Ordem",field:"order",width:"w-1/12"},{label:"Cadastrado em",field:"created_at",width:"w-2/12"}],C=[{icon:"fa-regular-edit",handler:x},{icon:"la-trash-alt-solid",handler:S}],M=()=>d.push("/dashboard/informacoes-institucionais/faq/novo"),m=()=>{i.value="",t.value=null,v.value={}},q=async()=>{t.value&&(await p(t.value.id.toString()),m())},F=async()=>{await h(l.value)};return R(_),(o,c)=>(j(),T(V,null,[a(z,{show:i.value==="delete",message:"Tem certeza que deseja deletar este item?",onClose:m,onConfirm:q,loading:e(n)},null,8,["show","loading"]),a(L,{title:"Perguntas Frequentes (FAQ)"},{default:U(()=>[r("div",G,[r("div",H,[r("div",J,[a(P,{search:l.value,"onUpdate:search":c[0]||(c[0]=I=>l.value=I),loading:e(n),onSubmit:F},null,8,["search","loading"]),a(N,{title:"Adicionar nova",onClick:M})]),a(W,{items:e(f),columns:b,actions:C,pagination:e(g),loading:e(n),loadMore:e(w)},null,8,["items","pagination","loading","loadMore"])])])]),_:1})],64))}});export{he 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.