PageSourceSearch

https://thep.uk/build/assets/Index-DQdBk9ze.js

js thep.uk collected 2026-10-09 23:27:49 UTC 3,138 bytes, 1 lines download raw bytes

1import{_ as v}from"./AuthenticatedLayout-DhWx8XJp.js";import{C as y}from"./Card-DEmuujeE.js";import{_ as f}from"./PrimaryButton-DY7kaUJg.js";import{_ as h}from"./Search-_0vzCUEr.js";import{T as C,f as k,a as s,u as n,w as t,F as V,o as $,Z as D,b as i,i as c,e as d,t as p,j as L,z as S,k as b}from"./app-bY5Kob2C.js";import{T as z}from"./TableLite-Oha_V9fL.js";import{_ as A}from"./Modal-BWGExrg-.js";import{_ as F}from"./SecondaryButton-BAHNqY2s.js";import"./SidebarNavigation-C_s55Q5R.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./TextInput-CPFH3luo.js";const N={class:"flex justify-between items-center"},T={class:"text-sm text-gray-700"},j=["onclick"],B={class:"p-6"},I={class:"text-lg font-medium text-gray-900"},R={class:"flex justify-end mt-6"},Q={__name:"Index",props:{audiences:{type:Array,required:!0}},setup(w){const _=w,u=L(""),r=S({isLoading:!1,columns:[{label:"Name",field:"name",sortable:!0,width:"35%"},{label:"Description",field:"description",sortable:!1,width:"50%"},{label:"View",field:"id",sortable:!0,isKey:!0,width:"7.5%"},{label:"Delete",field:"delete",sortable:!1,width:"7.5%"}],rows:b(()=>_.audiences.filter(o=>o.name.toLowerCase().includes(u.value.toLowerCase()))),totalRecordCount:b(()=>r.rows.length),pageSize:"30",sortable:{order:"name",sort:"asc"}}),l=C({id:null,name:null}),g=o=>{l.id=o.id,l.name=o.name},m=()=>{l.reset()},x=o=>{l.delete(route("audiences.destroy",o),{preserveScroll:!0,onSuccess:()=>{l.id=null,l.name=null}}),m()};return(o,e)=>($(),k(V,null,[s(n(D),{title:"View Audiences"}),s(v,null,{header:t(()=>[i("div",N,[e[4]||(e[4]=i("h2",{class:"text-xl font-semibold leading-tight text-green-500"}," Audiences ",-1)),s(n(c),{href:o.route("audiences.create")},{default:t(()=>[s(f,null,{default:t(()=>[...e[3]||(e[3]=[d("New Audience",-1)])]),_:1})]),_:1},8,["href"])])]),default:t(()=>[s(h,{modelValue:u.value,"onUpdate:modelValue":e[0]||(e[0]=a=>u.value=a),placeholder:"Search by audience name..."},null,8,["modelValue"]),s(y,null,{default:t(()=>[s(n(z),{"is-static-mode":!0,"is-slot-mode":!0,"is-loading":r.isLoading,columns:r.columns,rows:r.rows,total:r.totalRecordCount,sortable:r.sortable,"page-size":r.pageSize,onIsFinished:e[1]||(e[1]=a=>r.isLoading=!1)},{description:t(a=>[i("span",T,p(a.value.description||"—"),1)]),id:t(a=>[s(n(c),{href:o.route("audiences.edit",a.value.id),class:"block text-right text-blue-500"},{default:t(()=>[...e[5]||(e[5]=[d("View ",-1),i("i",{class:"fa-solid fa-arrow-right"},null,-1)])]),_:1},8,["href"])]),delete:t(a=>[i("span",{class:"block text-center cursor-pointer",style:{color:"red"},onclick:()=>g(a.value)},[...e[6]||(e[6]=[i("i",{class:"fa-solid fa-trash"},null,-1)])],8,j)]),_:1},8,["is-loading","columns","rows","total","sortable","page-size"])]),_:1}),s(A,{show:!!n(l).id,onClose:m},{default:t(()=>[i("div",B,[i("h2",I," Are you sure you want to delete "+p(n(l).name)+"? ",1),i("div",R,[s(F,{onClick:m},{default:t(()=>[...e[7]||(e[7]=[d(" Cancel ",-1)])]),_:1}),s(f,{onClick:e[2]||(e[2]=a=>x(n(l).id)),class:"ms-3"},{default:t(()=>[...e[8]||(e[8]=[d("Delete",-1)])]),_:1})])])]),_:1},8,["show"])]),_:1})],64))}};export{Q 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.