PageSourceSearch

https://hsl.co.in/build/assets/Index-Dj1JXKlh.js

js hsl.co.in collected 2026-10-09 22:40:10 UTC 5,543 bytes, 1 lines download raw bytes

1import{X as u,r as b,j as e,S as y,x as j,A as f}from"./app-Mnt2IEGe.js";import{A as N}from"./AuthenticatedLayout-Dh41BUxo.js";import{S as w}from"./search-BeXkNHdv.js";import{M as v}from"./mail-Ce-sk81h.js";import{P as S}from"./phone-DSAsYLtt.js";import{E as C}from"./eye-D7lGIL4B.js";import{T as L}from"./trash-2-BurmGby8.js";import{M as T}from"./message-circle-D4MbkUVn.js";import"./ApplicationLogo-JvKRx6b1.js";import"./ResponsiveNavLink-xYyYAnIm.js";import"./transition-caWIvkel.js";import"./chevron-down-BlAiga6f.js";function G({enquiries:l}){var n;const{props:a}=u(),x=(n=a==null?void 0:a.auth)==null?void 0:n.user,[r,m]=b.useState(""),i=l.data.filter(t=>{var s,o,d,c;return((s=t.name)==null?void 0:s.toLowerCase().includes(r.toLowerCase()))||((o=t.email)==null?void 0:o.toLowerCase().includes(r.toLowerCase()))||((d=t.phone)==null?void 0:d.toLowerCase().includes(r.toLowerCase()))||((c=t.queryType)==null?void 0:c.toLowerCase().includes(r.toLowerCase()))}),h=t=>{const s={"prescription-upload":{bg:"bg-blue-50",text:"text-blue-700",label:"Prescription Upload"},"product-inquiry":{bg:"bg-purple-50",text:"text-purple-700",label:"Product Inquiry"},"order-status":{bg:"bg-orange-50",text:"text-orange-700",label:"Order Status"},"general-question":{bg:"bg-green-50",text:"text-green-700",label:"General Question"}}[t]||{bg:"bg-gray-50",text:"text-gray-700",label:t};return e.jsx("span",{className:`inline-flex items-center px-3 py-1 ${s.bg} ${s.text} rounded-full text-sm font-medium`,children:s.label})},p=t=>{confirm("Are you sure you want to delete this enquiry?")&&f.delete(route("admin.enquiries.destroy",t))};return e.jsxs(N,{user:x,header:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:"Customer Enquiries"}),e.jsx("p",{className:"text-gray-600 mt-1",children:"Manage and respond to customer inquiries and questions"})]}),e.jsxs("div",{className:"text-right",children:[e.jsx("p",{className:"text-2xl font-bold text-blue-600",children:l.data.length}),e.jsx("p",{className:"text-sm text-gray-600",children:"Total Enquiries"})]})]}),children:[e.jsx(y,{title:"Admin - Enquiries"}),e.jsx("div",{className:"bg-white rounded-3xl border-2 border-gray-200 p-6 mb-8 shadow-sm",children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(w,{className:"w-5 h-5 text-gray-400"}),e.jsx("input",{type:"text",placeholder:"Search by name, email, phone, or query type...",value:r,onChange:t=>m(t.target.value),className:"flex-1 border border-gray-300 rounded-lg px-4 py-2.5 focus:outline-none focus:ring-2 focus:ring-blue-500"})]})}),i.length>0?e.jsx("div",{className:"bg-white rounded-3xl border-2 border-gray-200 shadow-xl overflow-hidden",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{className:"bg-gradient-to-r from-gray-50 to-gray-100 border-b-2 border-gray-200",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-6 py-4 text-left text-xs font-semibold text-gray-700 uppercase tracking-wider",children:"Name"}),e.jsx("th",{className:"px-6 py-4 text-left text-xs font-semibold text-gray-700 uppercase tracking-wider",children:"Contact"}),e.jsx("th",{className:"px-6 py-4 text-left text-xs font-semibold text-gray-700 uppercase tracking-wider",children:"Query Type"}),e.jsx("th",{className:"px-6 py-4 text-left text-xs font-semibold text-gray-700 uppercase tracking-wider",children:"Date"}),e.jsx("th",{className:"px-6 py-4 text-left text-xs font-semibold text-gray-700 uppercase tracking-wider",children:"Actions"})]})}),e.jsx("tbody",{className:"divide-y divide-gray-200",children:i.map(t=>e.jsxs("tr",{className:"hover:bg-gray-50 transition-colors",children:[e.jsx("td",{className:"px-6 py-4",children:e.jsx("p",{className:"font-medium text-gray-900",children:t.name})}),e.jsx("td",{className:"px-6 py-4",children:e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600",children:[e.jsx(v,{className:"w-4 h-4"}),t.email]}),e.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600",children:[e.jsx(S,{className:"w-4 h-4"}),t.phone]})]})}),e.jsx("td",{className:"px-6 py-4",children:h(t.queryType)}),e.jsxs("td",{className:"px-6 py-4 text-sm text-gray-600",children:[new Date(t.created_at).toLocaleDateString(),e.jsx("br",{}),e.jsx("span",{className:"text-xs",children:new Date(t.created_at).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]}),e.jsx("td",{className:"px-6 py-4",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(j,{href:route("admin.enquiries.show",t.id),className:"inline-flex items-center gap-2 px-3 py-1.5 bg-blue-50 text-blue-600 rounded-lg hover:bg-blue-600 hover:text-white transition-colors text-sm font-medium",children:[e.jsx(C,{className:"w-4 h-4"}),"View"]}
1),e.jsx("button",{onClick:()=>p(t.id),className:"inline-flex items-center gap-2 px-3 py-1.5 bg-red-50 text-red-600 rounded-lg hover:bg-red-600 hover:text-white transition-colors text-sm font-medium",children:e.jsx(L,{className:"w-4 h-4"})})]})})]},t.id))})]})})}):e.jsxs("div",{className:"bg-white rounded-3xl border-2 border-gray-200 p-12 text-center shadow-sm",children:[e.jsx(T,{className:"w-16 h-16 text-gray-300 mx-auto mb-4"}),e.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"No enquiries found"}),e.jsx("p",{className:"text-gray-600",children:"Try adjusting your search criteria"})]})]})}export{G 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.