1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[75777],{49581:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>c});var n=t(37876),s=t(14232),a=t(48230),o=t.n(a),d=t(62842),l=t(53403);function i(e){return[e.firstName||e.name||"",e.surname].filter(Boolean).join(" ").trim()||e.id}let u=[{key:"customer",header:"Customer",render:e=>{var r;return(0,n.jsx)(o(),{href:"/admin/customers/".concat(null!=(r=e.customerId)?r:e.id),className:"text-blue-600 hover:underline font-medium",children:i(e)})},sortBy:e=>i(e)},{key:"email",header:"Email",render:e=>(0,n.jsx)("span",{className:"text-gray-700",children:e.email||"â"})},{key:"id",header:"Customer ID",render:e=>{var r;return(0,n.jsx)("span",{className:"font-mono text-xs",children:null!=(r=e.customerId)?r:e.id})}},{key:"phone",header:"Phone",render:e=>{var r;return(0,n.jsx)("span",{className:"font-mono",children:null!=(r=e.mobileNumber)?r:"â"})}},{key:"status",header:"Status",render:e=>e.isLockedOut?(0,n.jsx)(d.qs,{tone:"danger",children:"Locked"}):e.isFrozen?(0,n.jsx)(d.qs,{tone:"warning",children:"Frozen"}):(0,n.jsx)(d.qs,{tone:"success",children:e.status||"Active"})}];
1function c(){let[e,r]=(0,s.useState)(""),[t,a]=(0,s.useState)(""),[o,i]=(0,s.useState)([]),[c,h]=(0,s.useState)(!1),[m,b]=(0,s.useState)(null),[x,p]=(0,s.useState)(!1);async function y(){if(!e.trim()){i([]),p(!1);return}h(!0),b(null),p(!0);try{let r=await l.KD.searchCustomersByPhone(e.trim(),t.trim()||void 0);r.success&&Array.isArray(r.data)?i(r.data):(b(r.error||"Search failed"),i([]))}catch(e){b((null==e?void 0:e.message)||"Search failed"),i([])}finally{h(!1)}}return(0,n.jsxs)(d.Ay,{title:"Search by phone",owner:"Customer Support",backend:"live-saasport",workflowRef:"GET /v1/customers/search/by-phone",description:"Live customer lookup by phone number (full or partial match) via CustomerSearchController.SearchByPhone.",children:[(0,n.jsxs)(d.Qn,{children:[(0,n.jsx)(d.Te,{value:e,onChange:r,placeholder:"+27 82 123 4567 or 0821234567",width:300}),(0,n.jsx)(d.Te,{value:t,onChange:a,placeholder:"Country code (e.g. ZA, AE)",width:200}),(0,n.jsx)("button",{onClick:y,disabled:c||!e.trim(),className:"bg-blue-600 hover:bg-blue-700 disabled:bg-gray-300 text-white text-sm font-semibold px-4 py-2 rounded-md self-end",children:c?"Searchingâ¦":"Search"})]}),m&&(0,n.jsx)("div",{className:"mb-4 bg-red-50 border border-red-200 rounded-lg p-3 text-sm text-red-700",children:m}),x?c?(0,n.jsx)("div",{className:"bg-white border border-gray-200 rounded-lg p-12 text-center text-gray-500 text-sm",children:"Searchingâ¦"}):(0,n.jsx)(d.bQ,{rows:o,columns:u,rowKey:e=>{var r;return null!=(r=e.customerId)?r:e.id},emptyLabel:"No customers found with that phone number."}):(0,n.jsx)("div",{className:"bg-white border border-gray-200 rounded-lg p-12 text-center text-gray-500 text-sm",children:"Enter a phone number above and click Search."})]})}},96303:(e,r,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/search-by-phone",function(){return t(49581)}])}},e=>{e.O(0,[37497,62842,90636,46593,38792],()=>e(e.s=96303)),_N_E=e.O()}]);
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.