PageSourceSearch

https://www.ahrcm-srmo.org/build/assets/List.14052443.js

js ahrcm-srmo.org collected 2026-10-06 18:24:48 UTC 5,055 bytes, 1 lines download raw bytes

1import{d as u,j as $,q as F,z as B,I as h,c as k,w as l,k as E,o as n,a as t,b as c,g as d,h as e,n as A,L as m,l as D,C as M,x as P,f as v,e as f,i as z,t as I,p as g,T as U,F as q}from"./app.1c75f29f.js";import{_ as K}from"./AppLayout.78e80e3b.js";import{_ as O}from"./Pagination.96910016.js";import{r as s}from"./index.970b99d8.js";import{_ as G}from"./EmptyState.32308625.js";import"./Banner.7925d127.js";import"./ApplicationMark.85c52153.js";const H={class:"mt-8 mb-7 flex items-center justify-between"},J={class:"mt-8 mb-7 flex items-center justify-between"},Q={class:"tab flex items-center gap-8"},W={class:"flex gap-3 flex-grow justify-end"},X={class:"w-2/5 relative flex items-center"},Y=t("i",{class:"icon-search text-gray-50 absolute text-2xl left-3 flex"},null,-1),Z=t("i",{class:"icon-plus-1 text-lg"},null,-1),ee={class:"grid lg:grid-cols-3 gap-5"},te={class:"py-6 px-7 flex-grow flex flex-col justify-between"},se={class:"flex items-center justify-between"},re={class:"text-xs text-gray-90"},ie=t("span",{class:"text-gray-60"},"Visibility: ",-1),ae={class:"relative"},oe=["onClick"],ne=t("i",{class:"icon-arrow---down-2 text-xs"},null,-1),le={key:0,class:"absolute bg-white p-1 text-14-regular border border-gray-10 w-36 rounded-md top-10 right-0"},de=["onClick"],ce=["onClick"],pe=["onClick"],ue={class:"my-5"},be={__name:"List",setup(me){const w=u("text-indigo-60 border-indigo-60 text-16-medium border-b-2"),C=u("text-16-regular border-transparent text-gray-60"),y=$(()=>E().props.value.report_types);let o=u(null),p=u("");const T=u(null),L=r=>o.value===r?o.value=null:o.value=r;F(()=>{document.addEventListener("click",R),s().params.filter&&s().params.filter.name&&(p.value=s().params.filter.name,T.value.focus())}),B(()=>{document.removeEventListener("click",R)});const R=r=>{r.target.closest(".reportTypes-actions")||(o.value=null)},V=_.debounce(r=>{let a="/admin/report-types";s().current("admin.report-types.archived")&&(a="/admin/report-types/archived"),h.Inertia.get(a,{filter:{name:r.target.value}},{preserveState:!0,preserveScroll:!0,replace:!0})},500),j=r=>{h.Inertia.put(s("admin.report-types.archive",r),{},{onFinish:()=>{o.value=null}})},N=r=>{h.Inertia.put(s("admin.report-types.archive",r),{},{onFinish:()=>{o.value=null}})},S=r=>{h.Inertia.delete(s("admin.report-types.delete",r),{},{onFinish:()=>{o.value=null}})};return(r,a)=>(n(),k(K,{title:"Report Types"},{default:l(()=>[t("div",null,[t("div",H,[t("div",J,[t("div",Q,[c(e(m),{href:e(s)("admin.report-types.index"),class:A([e(s)().current("admin.report-types.index")?e(w):e(C),"pb-2.5"])},{default:l(()=>[d("Published ")]),_:1},8,["href","class"]),c(e(m),{href:e(s)("admin.report-types.archived"),class:A([e(s)().current("admin.report-types.archived")?e(w):e(C),"pb-2.5"])},{default:l(()=>[d("Archived ")]),_:1},8,["href","class"])])]),t("div",W,[t("div",X,[Y,D(t("input",{type:"text",class:"bg-white placeholder:text-gray-50 border-0 rounded-lg block w-full h-full pl-14 py-3",placeholder:"Search report types","onUpdate:modelValue":a[0]||(a[0]=i=>P(p)?p.value=i:p=i),ref_key:"searchInput",ref:T,onKeyup:a[1]||(a[1]=i=>e(V)(i))},null,544),[[M,e(p)]])]),e(s)().current("admin.report-types.index")?(n(),k(e(m),{key:0,href:e(s)("admin.report-types.create"),class:"btn btn-primary py-3 flex items-center gap-2"},{default:l(()=>[d(" Add new report type "),Z]),_:1},8,["href"])):v("",!0)])]),t("div",ee,[e(y).data&&e(y).data.length>0?(n(!0),f(q,{key:0},z(e(y).data,(i,x)=>(n(),f("div",{class:"bg-white rounded-lg flex flex-col",key:x},[t("div",te,[c(e(m),{href:e(s)("admin.report-types.show",i.id),class:"text-20-medium mt-1 mb-5 block"},{default:l(()=>[d(I(i.name),1)]),_:2},1032,["href"]),t("div",se,[t("div",re,[ie,d(" "+I(i.is_active?"Visible":"Not visible"),1)]),t("div",ae,[t("div",{onClick:b=>L(x),class:"border border-gray-30 rounded-3 bg-gray-10 text-12-regular text-gray-80 flex items-center px-2 py-1 cursor-pointer reportTypes-actions"},[d(" Actions "),ne],8,oe),c(U,{name:"fade"},{default:l(()=>[e(o)===x?(n(),f("ul",le,[c(e(m),{href:e(s)("admin.report-types.edit",i.id),onClick:a[2]||(a[2]=g(()=>{},["stop"])),class:"px-2 py-1.5 hover:bg-gray-10 rounded-md transition-all duration-200 cursor-pointer block"},{default:l(()=>[d(" Edit ")]),_:2},1032,["href"]),e(s)().current("admin.report-types.index")?(n(),f("li",{key:0,onClick:g(b=>j(i.id),["stop"]),class:"px-2 py-1.5 hover:bg-gray-10 rounded-md transition-all duration-200 cursor-pointer"}," Archive ",8,de)):v("",!0),e(s)().current("admin.report-types.archived")?(n(),f("li",{key:1,onClick:g(b=>N(i.id),["stop"]),class:"px-2 py-1.5 hover:bg-gray-10 rounded-md transition-all duration-200 cursor-pointer"}," Publish ",8,ce)):v("",!0),t("li",{onClick:g(b=>S(i.id),["stop"]),class:"px-2 py-1.5 hover:bg-gray-10 rounded-md transition-all duration-200 cursor-pointer"}," Delete ",8,pe)])):v("",!0)]),_:2},1024)])])])]))),128)):(n(),k(G,{key:1,show:!0,message:r.__("No report type found.")},null,8,["message"]))])]),t("div",ue,[c(O,{links:e(y).meta.links},null,8,["links"])])]),_:1}))}};export{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.