PageSourceSearch

https://app.bullitt.com/_nuxt/DVt054V_.js

js bullitt.com collected 2026-10-08 03:26:30 UTC 14,015 bytes, 1 lines download raw bytes

1import{d as ce,u as me,X as ue,l as ge,a8 as xe,S as pe,P as ye,a9 as _e,k as v,B as H,a0 as be,s as fe,o as x,c as p,b as r,w as i,U as he,Q as C,q as ke,f as y,t as n,e,a as s,F as h,r as Q,h as O,G as ve,n as w,T as Ce,_ as we,a7 as Se}from"./CJvsQ1-l.js";import{_ as Te}from"./H3_5psZt.js";import{_ as $e}from"./DGaGgjZM.js";import{_ as Oe}from"./CzZfHBTZ.js";import{_ as qe}from"./Cg8ha8VV.js";import{u as Me}from"./Pp_sjaed.js";import{s as De}from"./CD6XIobG.js";import{u as E}from"./CAtPZBGR.js";import{m as Ae,p as Ne,I as Ie,x as Ee,y as Le}from"./CZkBDvQi.js";import{g as Pe,S as Ve,M as Be,b as G}from"./2oSluCsf.js";import"./DvL19fpy.js";import"./BWkFWKIr.js";import"./NIehx4J_.js";import"./DgHSwrph.js";import"./C6Asperr.js";import"./P5xoMGZ_.js";import"./CxIZtCgj.js";import"./CVd4c6A3.js";import"./vZ3xezVF.js";import"./BPZOpAwv.js";import"./Bp371K-T.js";import"./CzMmsojx.js";import"./xvLR1oow.js";const Re={class:"relative"},Fe={class:"flex place-items-center justify-between px-4 sm:px-0 dark:text-gray-100"},Ue={class:"px-4 sm:px-0 dark:text-gray-100"},je={class:"text-base font-semibold leading-7 text-gray-900 dark:text-white"},ze={class:"mt-1 max-w-2xl text-sm leading-6 text-gray-500 dark:text-gray-400"},He={class:"relative"},Qe={key:0},Ge={class:"py-1"},Xe={class:"mt-6"},Ye={class:"grid grid-cols-1 sm:grid-cols-2"},Je={class:"border-t border-gray-100 dark:border-gray-700 px-4 py-6 sm:col-span-1 sm:px-0"},Ke={class:"text-sm font-medium leading-6 text-gray-900 dark:text-white"},We={class:"mt-1 text-sm leading-6 text-gray-700 dark:text-gray-300 sm:mt-2"},Ze={class:"border-t border-gray-100 dark:border-gray-700 px-4 py-6 sm:col-span-1 sm:px-0"},et={class:"text-sm font-medium leading-6 text-gray-900 dark:text-white"},tt={class:"mt-1 text-sm leading-6 text-gray-700 dark:text-gray-300 sm:mt-2"},st={class:"border-t border-gray-100 dark:border-gray-700 px-4 py-6 sm:col-span-1 sm:px-0"},at={class:"text-sm font-medium leading-6 text-gray-900 dark:text-white"},ot={class:"mt-1 text-sm leading-6 text-gray-700 dark:text-gray-300 sm:mt-2"},rt={class:"border-t border-gray-100 dark:border-gray-700 px-4 py-6 sm:col-span-1 sm:px-0"},nt={class:"text-sm font-medium leading-6 text-gray-900 dark:text-white"},lt={class:"mt-1 text-sm leading-6 text-gray-700 dark:text-gray-300 sm:mt-2"},it={class:"border-t border-gray-100 dark:border-gray-700 px-4 py-6 sm:col-span-1 sm:px-0"},dt={class:"text-sm font-medium leading-6 text-gray-900 dark:text-white"},ct={class:"mt-1 text-sm leading-6 text-gray-700 dark:text-gray-300 sm:mt-2"},mt={class:"border-t border-gray-100 dark:border-gray-700 px-4 py-6 sm:col-span-1 sm:px-0"},ut={class:"text-sm font-medium leading-6 text-gray-900 dark:text-white"},gt={class:"mt-1 text-sm leading-6 text-gray-700 dark:text-gray-300 sm:mt-2"},xt={class:"px-4 sm:px-0 dark:text-gray-100"},pt={class:"text-base font-semibold leading-7 text-gray-900 dark:text-white"},yt={class:"mt-1 max-w-2xl text-sm leading-6 text-gray-500 dark:text-gray-400"},_t={class:"border-t border-gray-100 dark:border-gray-700 px-4 my-6 sm:col-span-2 sm:px-0"},bt={class:"px-4 sm:px-0 dark:text-gray-100"},ft={class:"text-base font-semibold leading-7 text-gray-900 dark:text-white"},ht={class:"mt-1 max-w-2xl text-sm leading-6 text-gray-500 dark:text-gray-400"},kt={class:"border-t border-gray-100 dark:border-gray-700 px-4 my-6 sm:col-span-2 sm:px-0 overflow-scroll"},vt={key:0,class:"mr-2 text-xs !text-[#ff7410]"},Ct={class:"px-4 sm:px-0 dark:text-gray-100"},wt={class:"text-base font-semibold leading-7 text-gray-900 dark:text-white"},St={class:"mt-1 max-w-2xl text-sm leading-6 text-gray-500 dark:text-gray-400"},Tt={class:"border-t border-gray-100 dark:border-gray-700 px-4 my-6 sm:col-span-2 sm:px-0"},$t={key:0,class:"absolute inset-0 flex items-center justify-center !bg-opacity-75 bg-gray-100 dark:bg-gray-900"},Wt=ce({__name:"[id]",async setup(Ot){let S,L;const{translate:l}=me(),_=ue(),{apiReq:q}=ge(),M=xe(),{data:m,pending:T,refresh:X}=([S,L]=pe(async()=>he(`manage:customers:${_.params.id}`,async()=>{const t=await q(`/data/customers/${_.params.id}`);return C(t)?null:t==null?void 0:t.data},{lazy:!0,getCachedData:t=>{var o,u;return(u=(o=M==null?void 0:M.payload)==null?void 0:o.data)==null?void 0:u[t]}})),S=await S,L(),S),d=ye({mode:"none",errorTitle:"",errorMessage:""}),P=_e(),Y=async()=>{d.mode="delete-confirm";const t=await q(`/admin/user/${m.value.userId}`,{method:"DELETE"});return d.mode=C(t)?"delete-error":"delete-success",C(t)?d.errorMessage=t.status==403?t.data.message:"An error occurred while deleting the customer":await X(),C(t)?"close"
1:"confirm"},J=async()=>{var o;const t=await q("/services/user/request-app-logs",{method:"POST",query:{memberId:(o=m.value)==null?void 0:o.id}});if(C(t)){d.mode="request-logs-error",d.errorTitle="Unable to request logs",d.errorMessage=t.data.message;return}d.mode="request-logs-success"},K=v(()=>{var t,o;return[{label:"Customers",path:"/admin/customers"},{label:((t=m.value)==null?void 0:t.name)||((o=m.value)==null?void 0:o.phone)||"..."}]});H(K,t=>De(t),{immediate:!0});const b=[{key:"personal-details",name:"Personal Details",href:"#",icon:"heroicons:user",current:!1},{key:"sos-contacts",name:"SOS Contacts",href:"#",icon:"heroicons:user-group",current:!1},{key:"subscriptions",name:"Subscriptions",href:"#",icon:"solar:sim-cards-outline",current:!1},{key:"orders",name:"Orders",href:"#",icon:"heroicons:credit-card",current:!1}],D=v({get:()=>{var t,o;return((o=(t=_==null?void 0:_.query)==null?void 0:t.tab)==null?void 0:o.toString())||void 0},set:t=>{var u;const o=t===((u=b==null?void 0:b[0])==null?void 0:u.key)?void 0:t||void 0;be({query:{..._.query,tab:o}})}}),k=fe(D.value?b.findIndex(t=>t.key===D.value):0);H(k,t=>D.value=t?b[t].key:void 0);const W=t=>k.value=t,Z=v(()=>{var t;return(t=m.value)==null?void 0:t.subscriptions}),{tableComponent:ee}=E({pending:T,data:Z,columns:[{key:"idx",label:"#",hideOnMobile:!0},{key:"imsi",label:"IMSI"},{key:"product_title",label:"Product"},{key:"region_code",label:"Region",hideOnMobile:!0},{key:"status",label:"Status"},{key:"created_at",label:"Date Activated",hideOnMobile:!0},{key:"action",label:"Manage",labelHidden:!0}],labelEmpty:l("No subscriptions")}),te=v(()=>{var t;return(t=m.value)==null?void 0:t.orders}),{tableComponent:se}=E({pending:T,data:te,columns:[{key:"_row",label:"#",hideOnMobile:!0},{key:"id",label:"Order ID"},{key:"total_amount",label:"Amount",hideOnMobile:!0},{key:"status",label:"Status"},{key:"created_at",label:"Date",hideOnMobile:!0},{key:"action",label:"View",labelHidden:!0}],labelEmpty:"No orders found"}),ae=v(()=>{var t;return(t=m.value)==null?void 0:t.sos_contacts}),{tableComponent:oe}=E({pending:T,data:ae,columns:[{key:"name",label:"Name"},{key:"phone",label:"Phone"},{key:"email",label:"Email"}],labelEmpty:"No SOS contacts found"});return(t,o)=>{const u=we,A=Se,re=Te,ne=$e,le=ve,ie=Oe,$=qe,de=ke;return x(),p("div",null,[r(de,{name:"admin"},{"page-title":i(()=>[y(n(e(l)("Manage Customer")),1)]),default:i(()=>{var V,B,R;return[s("div",Re,[r(ne,null,{default:i(()=>[r(e(Ae),{"selected-index":e(k),as:"div",onChange:W},{default:i(()=>[r(e(Ne),{as:"div",class:"-mb-px flex space-x-8 border-b border-gray-300","aria-label":"Tabs"},{default:i(()=>[(x(),p(h,null,Q(b,(c,f)=>r(e(Ee),{key:c.name,as:"div",class:w(["group inline-flex items-center border-b-2 pb-2 px-1 text-sm font-medium",e(k)===f?"border-accent text-accent":"border-transparent text-gray-500 hover:border-gray-200 hover:text-gray-700"])},{default:i(()=>[s("div",null,[r(u,{name:c.icon,class:w(["-ml-0.5 mr-2 h-5 w-5",e(k)===f&&"text-icon-accent"]),"aria-hidden":"true"},null,8,["name","class"]),s("span",null,n(c.name),1)])]),_:2},1032,["class"])),64))]),_:1}),r(e(Ie),null,{default:i(()=>[(x(),p(h,null,Q(b,c=>r(e(Le),{key:c.name,as:"div",class:"pt-4"},{default:i(()=>{var f,N,F,U,j,z;return[c.key==="personal-details"?(x(),p(h,{key:0},[s("header",Fe,[s("div",Ue,[s("h3",je,n(e(l)("Customer Information")),1),s("p",ze,n(e(l)("Personal details and application"))+". ",1)]),s("div",He,[r(e(Pe),{as:"div",class:"ml-auto relative"},{default:i(()=>{var a;return[(a=e(m))!=null&&a.deletedAt?O("",!0):(x(),p("div",Qe,[r(e(Ve),{class:"inline-flex justify-center rounded-md bg-accent px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-gray-0 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 focus:ring-offset-gray-100"},{default:i(()=>[y(n(e(l)("Actions"))+" ",1),r(u,{name:"heroicons:chevron-down",class:"-mr-1 ml-2 h-5 w-5","aria-hidden":"true"})]),_:1})])),r(Ce,{"enter-active-class":"transition ease-out duration-100","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-75","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:i(()=>[r(e(Be),{class:w(["absolute right-0 z-10 mt-2 min-w-max origin-top-right","divide-y divide-gray-100 rounded-md bg-white","shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none"])},{default:i(()=>[s("div",Ge,[r(e(G),{as:"div"},{default:i(({active:g})=>[s("button",{class:w(["w-full group flex items-center px-4 py-2 text-sm disabled:opacity-50 disabled:cursor-not-allowed",g?"bg-gray-100 text-gray-900":"text-gray-700"]),onClick:o[0]||(o[0]=I=>e(P).start())},[r(u,{class:"mr-2 w-5 h-5",name:"mdi:cloud-refresh"}),y(" "+n(e(l)("Delete Customer")),1)],2)]),_:1}),r(e(G),{as:"div"},{default:i(({active:g})=>[s("button",{class:w(["w-full group flex items-center px-4 py-2 text-sm disabled:opacity-50 disabled:cursor-not-allowed",g?"bg-gray-100 text-gray-900":"text-gray-700"]),onClick:J},[r(u,{class:"mr-2 w-5 h-5",name:"mdi:text-box-multiple"}),o[9]||(o[9]=y(" Request App Logs "))],2)]),_:1})])]),_:1})]),_:1})]}),_:1})])]),s("div",Xe,[s("dl",Ye,[s("div",Je,[s("dt",Ke,n(e(l)("Full name")),1),s("dd",We,n((f=e(m))==null?void 0:f.name),1)]),s("div",Ze,[
1s("dt",et,n(e(l)("Phone")),1),s("dd",tt," +"+n((N=e(m))==null?void 0:N.phone),1)]),s("div",st,[s("dt",at,n(e(l)("Email address")),1),s("dd",ot,n((F=e(m))==null?void 0:F.email),1)]),s("div",rt,[s("dt",nt,n(e(l)("Country")),1),s("dd",lt,n((U=e(m))==null?void 0:U.country),1)]),s("div",it,[s("dt",dt,n(e(l)("Date of birth")),1),s("dd",ct,n(((j=e(m))==null?void 0:j.birthday)||"N/A"),1)]),s("div",mt,[s("dt",ut,n(e(l)("Medical Information")),1),s("dd",gt,n(((z=e(m))==null?void 0:z.medical_info)||"N/A"),1)])])])],64)):c.key==="sos-contacts"?(x(),p(h,{key:1},[s("div",xt,[s("h3",pt,n(e(l)("SOS Contacts")),1),s("p",yt,n(e(l)("View the SOS contacts of this customer"))+". ",1)]),s("div",_t,[r(e(oe))])],64)):c.key==="subscriptions"?(x(),p(h,{key:2},[s("div",bt,[s("h3",ft,n(e(l)("Subscriptions")),1),s("p",ht,n(e(l)("View the subscriptions of this customer"))+". ",1)]),s("div",kt,[r(e(ee),null,{"row-idx":i(({rowIdx:a})=>[y(n(a+1),1)]),"row-imsi":i(({row:a})=>[r(A,{class:"text-accent flex flex-col",to:`/admin/simcards/${a.imsi}`},{default:i(()=>{var g,I;return[s("p",null,[s("span",null,n(a==null?void 0:a.imsi),1),a!=null&&a.member_id&&(a!=null&&a.owner_name)&&(a==null?void 0:a.member_id)!==((I=(g=e(_))==null?void 0:g.params)==null?void 0:I.id)?(x(),p("span",vt," ("+n(e(l)("Managed by {name}",{name:a==null?void 0:a.owner_name}))+") ",1)):O("",!0)])]}),_:2},1032,["to"])]),"row-action":i(({row:a,col:g})=>[r(A,{class:"text-accent flex flex-col",to:`/admin/subscriptions/${a.id}`},{default:i(()=>[y(n(g.label),1)]),_:2},1032,["to"])]),_:1})])],64)):c.key==="orders"?(x(),p(h,{key:3},[s("div",Ct,[s("h3",wt,n(e(l)("Recent Orders")),1),s("p",St,n(e(l)("View the latest orders from this customer"))+". ",1)]),s("div",Tt,[r(e(se),null,{"row-status":i(({row:a})=>[r(re,{status:a==null?void 0:a.status},null,8,["status"])]),"row-total_amount":i(({row:a})=>[y(n(("useCurrency"in t?t.useCurrency:e(Me))({amount:a==null?void 0:a.total_amount,currency:a==null?void 0:a.currency})),1)]),"row-action":i(({row:a,col:g})=>[r(A,{class:"text-accent flex flex-col",to:`/admin/orders/${a.id}`},{default:i(()=>[y(n(g.label),1)]),_:2},1032,["to"])]),_:1})])],64)):O("",!0)]}),_:2},1024)),64))]),_:1})]),_:1},8,["selected-index"])]),_:1}),e(T)?(x(),p("div",$t,[r(le,{class:"w-10 h-10"})])):O("",!0)]),r(e(P),null,{default:i(({resolve:c,isResolving:f})=>[r(ie,{show:!0,title:e(l)("Delete Customer"),message:e(l)("Are you sure you want to proceed? This action cannot be undone"),"confirm-text":e(l)("Yes"),loading:f,onOnConfirm:()=>c(Y()),onClose:N=>c("close")},null,8,["title","message","confirm-text","loading","onOnConfirm","onClose"])]),_:1}),r($,{show:e(d).mode==="delete-success",icon:"heroicons:check","icon-class":"!bg-green-100 text-green-600",title:e(l)("Customer deleted"),message:e(l)("The customer record has been deleted successfully"),onConfirm:o[1]||(o[1]=c=>e(d).mode="none"),onClose:o[2]||(o[2]=c=>e(d).mode="none")},null,8,["show","title","message"]),r($,{show:e(d).mode==="delete-error",icon:"heroicons:exclamation-triangle","icon-class":"!bg-red-100 text-red-600",title:((V=e(d))==null?void 0:V.errorTitle)||e(l)("Something went wrong"),message:((B=e(d))==null?void 0:B.errorMessage)||e(l)("Unable to delete the customer record"),"confirm-text":e(l)("Okay"),onConfirm:o[3]||(o[3]=c=>e(d).mode="none"),onClose:o[4]||(o[4]=c=>e(d).mode="none")},null,8,["show","title","message","confirm-text"]),r($,{show:e(d).mode==="request-logs-success",icon:"heroicons:check","icon-class":"!bg-green-100 text-green-600",title:"Logs Requested Successfully",message:"The request for app logs has been sent successfully",onConfirm:o[5]||(o[5]=c=>e(d).mode="none"),onClose:o[6]||(o[6]=c=>e(d).mode="none")},null,8,["show"]),r($,{show:e(d).mode==="request-logs-error",icon:"heroicons:exclamation-triangle","icon-class":"!bg-red-100 text-red-600",title:"Log Request Failed",message:((R=e(d))==null?void 0:R.errorMessage)||"Unable to request logs","confirm-text":"Okay",onConfirm:o[7]||(o[7]=c=>e(d).mode="none"),onClose:o[8]||(o[8]=c=>e(d).mode="none")},null,8,["show","message"])]}),_:1})])}}});export{Wt 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.