1import{d as v,L as $,x as u,b as l,i as r,e as f,h as i,u as s,f as g,t as d,c as _,a as D,g as k,A as L,ag as S,F as z}from"./app-Ct_R7I7V.js";import{_ as E}from"./DefaultPageLayout.vue_vue_type_script_setup_true_lang-D5FINC6G.js";import{_ as N}from"./Chip.vue_vue_type_script_setup_true_lang-aGiwcDzC.js";import{s as o,_ as T}from"./DataTable.vue_vue_type_script_setup_true_lang-BgXsh5XE.js";/* empty css */import"./index-DsgDd_uS.js";import"./chevron-right-xQG1Ta3T.js";import"./chevron-left-RdFi786O.js";import"./index-CCclEAo8.js";import"./index-BPh9qY3n.js";import"./index-BhMioZZ6.js";import"./index-B9GHb4CR.js";import"./index-DXqY5Jgi.js";import"./index-CfTQTT_s.js";import"./index-Ba1Ta1rv.js";import"./index-CCXB6YAz.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};a.SENTRY_RELEASE={id:"252d68b4fa88039c840f6cf67f1b9df423005c12"}}catch{}})();try{(function(){var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},c=new a.Error().stack;c&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[c]="8a613046-72d2-4c50-bb8c-9d8f2bc12c2b",a._sentryDebugIdIdentifier="sentry-dbid-8a613046-72d2-4c50-bb8c-9d8f2bc12c2b")})()}catch{}const I={class:"flex justify-between items-center"},V={class:"text-xl"},B={class:"p-8"},A={key:0},C={key:0},P={key:1,class:"text-red-500 font-semibold"},Z=v({__name:"ViewRegistrations",setup(a){const{admin:c}=$(),{data:h}=c.registrations();function y(e){if(!e)return null;const p=e.replace(/\D/g,"");return p.length!==8?e:p.replace(/(\d{2})(\d{2})(\d{2})(\d{2})/,"$1 $2 $3 $4")}return(e,p)=>{const w=S("tooltip");return l(),u(E,null,{header:r(()=>[f("div",I,[f("h1",V,d(e.$t("pages.admin.view_registrations.title")),1)])]),content:r(()=>[f("div",B,[i(T,{value:s(h),paginator:!0,rows:25,rowsPerPageOptions:[25,50],responsiveLayout:"scroll"},{default:r(()=>[i(s(o),{field:"id",header:e.$t("pages.admin.view_registrations.table.id"),sortable:""},null,8,["header"]),i(s(o),{field:"name",header:e.$t("pages.admin.view_registrations.table.name"),sortable:""},null,8,["header"]),i(s(o),{field:"email",header:e.$t("pages.admin.view_registrations.table.email"),sortable:""},null,8,["header"]),i(s(o),{field:"phone",header:e.$t("pages.admin.view_registrations.table.phone")},{body:r(({data:t})=>{var n,m,b;return[g(d(y((b=(m=(n=t==null?void 0:t.organizations)==null?void 0:n[0])==null?void 0:m.invoice_settings)==null?void 0:b.phone_number)||"-"),1)]}),_:1},8,["header"]),i(s(o),{field:"organizations",header:e.$t("pages.admin.view_registrations.table.organizations"),"body-class":"flex flex-wrap gap-2"},{body:r(({data:t})=>[t.organizations.length===0?(l(),_("div",A,d(e.$t("pages.admin.view_registrations.table.no_organizations")),1)):D("",!0),(l(!0),_(z,null,k(t.organizations,n=>L((l(),u(N,{key:n.id,label:n.name,class:"bg-surface-200 text-surface-700"},null,8,["label"])),[[w,`${n.id} -- ${Number(n.period_spent).toLocaleString()} kr`]])),128))]),_:1},8,["header"]),i(s(o),{field:"total_usage_last_30_days",header:e.$t("pages.admin.view_registrations.table.30_day_usage"),sortable:""},{body:r(({data:t})=>[g(d(Number(t.total_usage_last_30_days).toLocaleString())+" kr ",1)]),_:1},8,["header"]),i(s(o),{field:"terms_accepted_at",header:e.$t("pages.admin.view_registrations.table.terms_accepted_at"),sortable:""},{body:r(({data:t})=>[t.terms_accepted_at?(l(),_("span",C,d(new Date(t.terms_accepted_at).toLocaleDateString()),1)):(l(),_("span",P,d(e.$t("pages.admin.view_registrations.table.not_accepted")),1))]),_:1},8,["header"]),i(s(o),{field:"created_at",header:e.$t("pages.admin.view_registrations.table.created_at"),sortable:""},{body:r(({data:t})=>[g(d(new Date(t.created_at).toLocaleDateString()),1)]),_:1},8,["header"])]),_:1},8,["value"])])]),_:1})}}});
1export{Z as default}; 2//# sourceMappingURL=ViewRegistrations-DYS_a8MD.js.map
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.