PageSourceSearch

https://www.eyedock.com/build/assets/GpLensAdminIndex-DP6gDrxZ.js

js eyedock.com collected 2026-09-25 08:00:10 UTC 6,781 bytes, 1 lines download raw bytes

1import{m as b,z as j,j as A,e as o,a as n,b as r,h as H,d as e,l as c,x,f as y,_ as F,o as a,c as l,F as w,r as L,t as i,n as k,g as S,y as B}from"./app-C8sttQnK.js";import{_ as M}from"./AdminLayout-dWxOW1V_.js";import{_ as V}from"./SelectInput-BdSXWLGT.js";import"./SidebarLayout-DtMnoaVb.js";const O={class:"mx-auto max-w-7xl px-4 py-6 sm:px-6 lg:px-8"},U={class:"mb-6 flex items-end justify-between gap-4"},$={class:"flex gap-2"},z={class:"mb-4 grid gap-3 rounded-lg border border-gray-200 bg-white p-4 sm:grid-cols-2 lg:grid-cols-5"},D={class:"overflow-hidden rounded-lg border border-gray-200 bg-white shadow-sm"},G={class:"min-w-full divide-y divide-gray-200"},P={class:"divide-y divide-gray-200 bg-white"},E={class:"px-4 py-3 text-sm font-medium text-gray-900"},I={class:"px-4 py-3 text-sm text-gray-700"},K={class:"px-4 py-3 text-sm"},q={key:0,class:"rounded bg-blue-100 px-2 py-1 text-xs text-blue-700"},J={key:1,class:"rounded bg-purple-100 px-2 py-1 text-xs text-purple-700"},Q={key:2,class:"rounded bg-teal-100 px-2 py-1 text-xs text-teal-700"},R={key:3,class:"rounded bg-gray-100 px-2 py-1 text-xs text-gray-700"},W={class:"px-4 py-3 text-sm"},X={key:0,class:"rounded bg-red-100 px-2 py-1 text-xs text-red-700"},Y={key:1,class:"rounded bg-yellow-100 px-2 py-1 text-xs text-yellow-700"},Z={key:2,class:"rounded bg-green-100 px-2 py-1 text-xs text-green-700"},ee={class:"px-4 py-3 text-sm"},te={key:1,class:"text-xs text-gray-400"},se={class:"px-4 py-3 text-right text-sm"},ae={class:"flex justify-end gap-1"},le={key:0},ne={key:0,class:"flex items-center justify-between border-t px-4 py-3"},oe={class:"text-sm text-gray-700"},de={class:"flex gap-1"},ie=["innerHTML"],re=["innerHTML"],ye=Object.assign({layout:null},{__name:"GpLensAdminIndex",props:{lenses:{type:Object,required:!0},companies:{type:Array,default:()=>[]},filters:{type:Object,default:()=>({})}},setup(d){const m=d,u=b(m.filters.search||""),g=b(m.filters.company_id||null),f=b(m.filters.type||null),h=b(m.filters.status||null),_={guide:{label:"Fitting calc",class:"bg-emerald-100 text-emerald-700"},hybrid:{label:"Hybrid",class:"bg-indigo-100 text-indigo-700"}},p=()=>{B.get(route("admin.gp.lenses.index"),{search:u.value||void 0,company_id:g.value||void 0,type:f.value||void 0,status:h.value||void 0},{preserveState:!0,preserveScroll:!0,replace:!0})},N=()=>{u.value="",g.value=null,f.value=null,h.value=null,p()};let C;return j(u,()=>{clearTimeout(C),C=setTimeout(()=>{p()},300)}),(v,s)=>(a(),A(M,null,{default:o(()=>[n(r(H),{title:"GP Lenses Admin"}),e("div",O,[e("div",U,[s[7]||(s[7]=e("div",null,[e("h1",{class:"text-2xl font-semibold text-gray-900"}," GP Lenses "),e("p",{class:"text-sm text-gray-600"}," Manage gas permeable lens listings ")],-1)),e("div",$,[n(r(c),{href:v.route("admin.gp.lenses.create")},{default:o(()=>[n(x,{icon:"mdi-plus"},{default:o(()=>[...s[4]||(s[4]=[y("New Lens",-1)])]),_:1})]),_:1},8,["href"]),n(r(c),{href:v.route("admin.gp.clear-cache"),method:"post",as:"button"},{default:o(()=>[n(x,{variant:"warning",icon:"mdi-cached"},{default:o(()=>[...s[5]||(s[5]=[y("Clear Cache",-1)])]),_:1})]),_:1},8,["href"]),n(r(c),{href:"/rgps/lenses"},{default:o(()=>[n(x,{variant:"secondary",icon:"mdi-open-in-new"},{default:o(()=>[...s[6]||(s[6]=[y("Public View",-1)])]),_:1})]),_:1})])]),e("div",z,[n(F,{modelValue:u.value,"onUpdate:modelValue":s[0]||(s[0]=t=>u.value=t),placeholder:"Search lenses",clearable:!0},null,8,["modelValue"]),n(V,{modelValue:g.value,"onUpdate:modelValue":s[1]||(s[1]=t=>g.value=t),options:d.companies,"value-key":"id","label-key":"name",placeholder:"All Companies",onChange:p},null,8,["modelValue","options"]),n(V,{modelValue:f.value,"onUpdate:modelValue":s[2]||(s[2]=t=>f.value=t),options:[{value:"corneal",label:"Corneal"},{value:"scleral",label:"Scleral"},{value:"ortho-k",label:"Ortho-K"}],placeholder:"All Types",onChange:p},null,8,["modelValue"]),n(V,{modelValue:h.value,"onUpdate:modelValue":s[3]||(s[3]=t=>h.value=t),options:[{value:"active",label:"Active"},{value:"hidden",label:"Hidden"},{value:"discontinued",label:"Discontinued"}],placeholder:"All Statuses",onChange:p},null,8,["modelValue"]),n(x,{variant:"secondary",icon:"mdi-filter-remove",onClick:N},{default:o(()=>[...s[8]||(s[8]=[y("Clear",-1)])]),_:1})]),e("div",D,[e("table",G,[s[11]||(s[11]=e("thead",{class:"bg-gray-50"},[e("tr",null,[e("th",{class:"px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500"}," Name "),e("th",{class:"px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500"}," Company "),e("th",{class:"px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500"}," Type "),e("th",{class:"px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500"}," Status "),e("th",{class:"px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500"}," Fitting Calc "),e("th",{class:"px-4 py-3 text-right text-xs font-medium uppercase tracking-wider text-gray-500"}," Actions ")])],-1)),e("tbody",P,[(a(!0),l(w,null,L(d.lenses.data,t=>{var T;return a(),l("tr",{key:t.id},[e("td",E,i(t.name),1),e("td",I,i(((T=t.company)==null?void 0:T.name)||"None"),1),e("td",K,[t.lens_type==="corneal"?(a(),l("span",q,"Corneal")):t.lens_type==="scleral"?(a(),l("span",J,"Scleral")):t.lens_type==="ortho-k"?(a(),l("span",Q,"Ortho-K")):(a(),l("span",R,i(t.lens_type||"Unknown"),1))]),e("td",W,[t.discontinued?(a(),l("span",X,"Discontinued")):t.display?(a(),l("span",Z,"Active")):(a(),l("span",Y,"Hidden"))]),e("td",ee,[_[t.fitting_source]?(a(),l("span",{key:0,class:k(["rounded px-2 py-1 text-xs",_[t.fitting_source].class])},i(_[t.fitting_source].label),3)):(a(),l("span",te,"—"))]),e("td",se,[e("div",ae,[n(r(c),{href:v.route("admin.gp.lenses.edit",t.id)},{default:o(()=>[n(x,{size:"sm",variant:"secondary",icon:"mdi-pencil"},{default:o(()=>[...s[9]||(s[9]=[y("Edit",-1)])]),_:1})]),_:1},8,["href"])])])])}),128)),d.lenses.data.length?S("",!0):(a(),l("tr",le,[...s[10]||(s[10]=[e("td",{colspan:"6",class:"px-4 py-8 text-center text-sm text-gray-500"}," No lenses found. ",-1)])]))])]),d.lenses.links.length>3?(a(),l("div",ne,[e("div",oe," Showing "+i(d.lenses.from)+" to "+i(d.lenses.to)+" of "+i(d.lenses.total)+" results ",1),e("div",de,[(a(!0),l(w,null,L(d.lenses.links,t=>(a(),l(w,{key:t.label},[t.url?(a(),A(r(c),{key:0,href:t.url,class:k(["rounded px-3 py-1",t.active?"bg-indigo-600 text-white":"bg-white text-gray-700 hover:bg-gray-50"])},{default:o(()=>[e("span",{innerHTML:t.label}
1,null,8,ie)]),_:2},1032,["href","class"])):(a(),l("span",{key:1,class:k(["cursor-not-allowed rounded px-3 py-1 opacity-50",t.active?"bg-indigo-600 text-white":"bg-white text-gray-700"])},[e("span",{innerHTML:t.label},null,8,re)],2))],64))),128))])])):S("",!0)])])]),_:1}))}});export{ye 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.