Validation_Suite/validation-suite/frontend/atlas/.next/static/chunks/2toi33zq_ydim.js

1 line
No EOL
21 KiB
JavaScript

(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,54858,e=>{"use strict";let t="/api/v1";async function r(e,t){let r=await e.text();if(!r)return t;try{let e=JSON.parse(r);return e.detail??e.message??r}catch{return r}}async function s(e,t){let r=await fetch("/api/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e,password:t}),credentials:"include"});if(!r.ok){let e=Error(await r.text()||`HTTP ${r.status}`);throw e.status=r.status,e}return r.json()}async function a(e,r){let s=await fetch(`${t}${e}`,{cache:"no-store",credentials:"include"});if(!s.ok)throw Error(`API request failed: ${s.status}`);return s.json()}async function i(e,s,a,i){let n=await fetch(`${t}${e}`,{method:a,headers:{"Content-Type":"application/json"},body:JSON.stringify(i),credentials:"include"});if(!n.ok)throw Error(await r(n,`API request failed: ${n.status}`));return n.json()}async function n(e,s){let a=await fetch(`${t}${e}`,{method:"DELETE",credentials:"include"});if(!a.ok)throw Error(await r(a,`API request failed: ${a.status}`))}async function l(e,s,a){let i=await fetch(`${t}${e}`,{...a,headers:{"Content-Type":"application/json",...a?.headers??{}},credentials:"include"});if(!i.ok)throw Error(await r(i,`API request failed: ${i.status}`));return i.json()}e.s(["API_BASE",0,t,"apiDelete",0,n,"apiFetch",0,l,"apiGet",0,a,"apiSend",0,i,"login",0,s,"normalizeValidationPayload",0,function(e){return{...e,...Object.fromEntries(["contact_id","examiner_id"].map(t=>[t,e[t]||null]))}}])},66027,e=>{"use strict";let t;var r=e.i(75555),s=e.i(73911),a=e.i(40143),i=e.i(86491),n=e.i(15823),l=e.i(93803),o=e.i(19273),u=e.i(80166),c=class extends n.Subscribable{constructor(e,t){super(),this.options=t,this.#e=e,this.#t=null,this.#r=(0,l.pendingThenable)(),this.bindMethods(),this.setOptions(t)}#e;#s=void 0;#a=void 0;#i=void 0;#n;#l;#r;#t;#o;#u;#c;#d;#h;#p;#f=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#s.addObserver(this),d(this.#s,this.options)?this.#y():this.updateResult(),this.#m())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return h(this.#s,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return h(this.#s,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#s.removeObserver(this)}setOptions(e){let t=this.options,r=this.#s;if(this.options=this.#e.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,o.resolveQueryBoolean)(this.options.enabled,this.#s))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#g(),this.#s.setOptions(this.options),t._defaulted&&!(0,o.shallowEqualObjects)(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#s,observer:this});let s=this.hasListeners();s&&p(this.#s,r,this.options,t)&&this.#y(),this.updateResult(),s&&(this.#s!==r||(0,o.resolveQueryBoolean)(this.options.enabled,this.#s)!==(0,o.resolveQueryBoolean)(t.enabled,this.#s)||(0,o.resolveStaleTime)(this.options.staleTime,this.#s)!==(0,o.resolveStaleTime)(t.staleTime,this.#s))&&this.#v();let a=this.#N();s&&(this.#s!==r||(0,o.resolveQueryBoolean)(this.options.enabled,this.#s)!==(0,o.resolveQueryBoolean)(t.enabled,this.#s)||a!==this.#p)&&this.#E(a)}getOptimisticResult(e){var t,r;let s=this.#e.getQueryCache().build(this.#e,e),a=this.createResult(s,e);return t=this,r=a,(0,o.shallowEqualObjects)(t.getCurrentResult(),r)||(this.#i=a,this.#l=this.options,this.#n=this.#s.state),a}getCurrentResult(){return this.#i}trackResult(e,t){return new Proxy(e,{get:(e,r)=>(this.trackProp(r),t?.(r),"promise"===r&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#r.status||this.#r.reject(Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,r))})}trackProp(e){this.#f.add(e)}getCurrentQuery(){return this.#s}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),r=this.#e.getQueryCache().build(this.#e,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#y({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#y(e){this.#g();let t=this.#s.fetch(this.options,e);return e?.throwOnError||(t=t.catch(o.noop)),t}#v(){this.#b();let e=(0,o.resolveStaleTime)(this.options.staleTime,this.#s);if(s.environmentManager.isServer()||this.#i.isStale||!(0,o.isValidTimeout)(e))return;let t=(0,o.timeUntilStale)(this.#i.dataUpdatedAt,e);this.#d=u.timeoutManager.setTimeout(()=>{this.#i.isStale||this.updateResult()},t+1)}#N(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#s):this.options.refetchInterval)??!1}#E(e){this.#x(),this.#p=e,!s.environmentManager.isServer()&&!1!==(0,o.resolveQueryBoolean)(this.options.enabled,this.#s)&&(0,o.isValidTimeout)(this.#p)&&0!==this.#p&&(this.#h=u.timeoutManager.setInterval(()=>{(this.options.refetchIntervalInBackground||r.focusManager.isFocused())&&this.#y()},this.#p))}#m(){this.#v(),this.#E(this.#N())}#b(){void 0!==this.#d&&(u.timeoutManager.clearTimeout(this.#d),this.#d=void 0)}#x(){void 0!==this.#h&&(u.timeoutManager.clearInterval(this.#h),this.#h=void 0)}createResult(e,t){let r,s=this.#s,a=this.options,n=this.#i,u=this.#n,c=this.#l,h=e!==s?e.state:this.#a,{state:y}=e,m={...y},b=!1;if(t._optimisticResults){let r=this.hasListeners(),n=!r&&d(e,t),l=r&&p(e,s,t,a);(n||l)&&(m={...m,...(0,i.fetchState)(y.data,e.options)}),"isRestoring"===t._optimisticResults&&(m.fetchStatus="idle")}let{error:x,errorUpdatedAt:g,status:v}=m;r=m.data;let N=!1;if(void 0!==t.placeholderData&&void 0===r&&"pending"===v){let e;n?.isPlaceholderData&&t.placeholderData===c?.placeholderData?(e=n.data,N=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#c?.state.data,this.#c):t.placeholderData,void 0!==e&&(v="success",r=(0,o.replaceData)(n?.data,e,t),b=!0)}if(t.select&&void 0!==r&&!N)if(n&&r===u?.data&&t.select===this.#o)r=this.#u;else try{this.#o=t.select,r=t.select(r),r=(0,o.replaceData)(n?.data,r,t),this.#u=r,this.#t=null}catch(e){this.#t=e}this.#t&&(x=this.#t,r=this.#u,g=Date.now(),v="error");let E="fetching"===m.fetchStatus,R="pending"===v,T="error"===v,k=R&&E,w=void 0!==r,S={status:v,fetchStatus:m.fetchStatus,isPending:R,isSuccess:"success"===v,isError:T,isInitialLoading:k,isLoading:k,data:r,dataUpdatedAt:m.dataUpdatedAt,error:x,errorUpdatedAt:g,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:m.dataUpdateCount>h.dataUpdateCount||m.errorUpdateCount>h.errorUpdateCount,isFetching:E,isRefetching:E&&!R,isLoadingError:T&&!w,isPaused:"paused"===m.fetchStatus,isPlaceholderData:b,isRefetchError:T&&w,isStale:f(e,t),refetch:this.refetch,promise:this.#r,isEnabled:!1!==(0,o.resolveQueryBoolean)(t.enabled,e)};if(this.options.experimental_prefetchInRender){let t=void 0!==S.data,r="error"===S.status&&!t,a=e=>{r?e.reject(S.error):t&&e.resolve(S.data)},i=()=>{a(this.#r=S.promise=(0,l.pendingThenable)())},n=this.#r;switch(n.status){case"pending":e.queryHash===s.queryHash&&a(n);break;case"fulfilled":(r||S.data!==n.value)&&i();break;case"rejected":r&&S.error===n.reason||i()}}return S}updateResult(){let e=this.#i,t=this.createResult(this.#s,this.options);if(this.#n=this.#s.state,this.#l=this.options,void 0!==this.#n.data&&(this.#c=this.#s),(0,o.shallowEqualObjects)(t,e))return;this.#i=t;let r=()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#f.size)return!0;let s=new Set(r??this.#f);return this.options.throwOnError&&s.add("error"),Object.keys(this.#i).some(t=>this.#i[t]!==e[t]&&s.has(t))};this.#R({listeners:r()})}#g(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#s)return;let t=this.#s;this.#s=e,this.#a=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#m()}#R(e){a.notifyManager.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#i)}),this.#e.getQueryCache().notify({query:this.#s,type:"observerResultsUpdated"})})}};function d(e,t){return!1!==(0,o.resolveQueryBoolean)(t.enabled,e)&&void 0===e.state.data&&("error"!==e.state.status||!1!==(0,o.resolveQueryBoolean)(t.retryOnMount,e))||void 0!==e.state.data&&h(e,t,t.refetchOnMount)}function h(e,t,r){if(!1!==(0,o.resolveQueryBoolean)(t.enabled,e)&&"static"!==(0,o.resolveStaleTime)(t.staleTime,e)){let s="function"==typeof r?r(e):r;return"always"===s||!1!==s&&f(e,t)}return!1}function p(e,t,r,s){return(e!==t||!1===(0,o.resolveQueryBoolean)(s.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&f(e,r)}function f(e,t){return!1!==(0,o.resolveQueryBoolean)(t.enabled,e)&&e.isStaleByTime((0,o.resolveStaleTime)(t.staleTime,e))}e.i(47167);var y=e.i(71645),m=e.i(12598);e.i(43476);var b=y.createContext((t=!1,{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t})),x=y.createContext(!1);x.Provider;var g=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});e.s(["useQuery",0,function(e,t){return function(e,t,r){let i,n=y.useContext(x),l=y.useContext(b),u=(0,m.useQueryClient)(r),c=u.defaultQueryOptions(e);u.getDefaultOptions().queries?._experimental_beforeQuery?.(c);let d=u.getQueryCache().get(c.queryHash),h=!1!==e.subscribed;if(c._optimisticResults=n?"isRestoring":h?"optimistic":void 0,c.suspense){let e=e=>"static"===e?e:Math.max(e??1e3,1e3),t=c.staleTime;c.staleTime="function"==typeof t?(...r)=>e(t(...r)):e(t),"number"==typeof c.gcTime&&(c.gcTime=Math.max(c.gcTime,1e3))}i=d?.state.error&&"function"==typeof c.throwOnError?(0,o.shouldThrowError)(c.throwOnError,[d.state.error,d]):c.throwOnError,(c.suspense||c.experimental_prefetchInRender||i)&&!l.isReset()&&(c.retryOnMount=!1),y.useEffect(()=>{l.clearReset()},[l]);let p=!u.getQueryCache().get(c.queryHash),[f]=y.useState(()=>new t(u,c)),v=f.getOptimisticResult(c),N=!n&&h;if(y.useSyncExternalStore(y.useCallback(e=>{let t=N?f.subscribe(a.notifyManager.batchCalls(e)):o.noop;return f.updateResult(),t},[f,N]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),y.useEffect(()=>{f.setOptions(c)},[c,f]),c?.suspense&&v.isPending)throw g(c,f,l);if((({result:e,errorResetBoundary:t,throwOnError:r,query:s,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(a&&void 0===e.data||(0,o.shouldThrowError)(r,[e.error,s])))({result:v,errorResetBoundary:l,throwOnError:c.throwOnError,query:d,suspense:c.suspense}))throw v.error;if(u.getDefaultOptions().queries?._experimental_afterQuery?.(c,v),c.experimental_prefetchInRender&&!s.environmentManager.isServer()&&v.isLoading&&v.isFetching&&!n){let e=p?g(c,f,l):d?.promise;e?.catch(o.noop).finally(()=>{f.updateResult()})}return c.notifyOnChangeProps?v:f.trackResult(v)}(e,c,t)}],66027)},95468,e=>{"use strict";let t=(0,e.i(75254).default)("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["CheckCircle2",0,t],95468)},63209,e=>{"use strict";let t=(0,e.i(75254).default)("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["AlertCircle",0,t],63209)},92950,e=>{"use strict";var t=e.i(43476),r=e.i(63209),s=e.i(95468),a=e.i(75254);let i=(0,a.default)("CircleDashed",[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]]),n=(0,a.default)("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]),l={OFFEN:{value:"OFFEN",label:"Noch nicht bewertet",badgeClass:"border-slate-300 bg-slate-100 text-slate-700",previewClass:"border-slate-300 bg-slate-50 text-slate-700",color:"#2E3B40",icon:i},BESTANDEN:{value:"BESTANDEN",label:"Bestanden",badgeClass:"border-success/35 bg-success/15 text-success",previewClass:"border-success/40 bg-success/10 text-success",color:"#245C36",icon:s.CheckCircle2},BESTANDEN_MIT_AUFLAGEN:{value:"BESTANDEN_MIT_AUFLAGEN",label:"Bestanden mit Auflagen",badgeClass:"border-warning/40 bg-warning/15 text-[#7A5A00]",previewClass:"border-warning/45 bg-warning/10 text-[#7A5A00]",color:"#7A5A00",icon:n},NICHT_BESTANDEN:{value:"NICHT_BESTANDEN",label:"Nicht bestanden",badgeClass:"border-danger/35 bg-danger/15 text-danger",previewClass:"border-danger/40 bg-danger/10 text-danger",color:"#7A1F26",icon:r.AlertCircle}},o={"":"OFFEN",offen:"OFFEN",OFFEN:"OFFEN",bestanden:"BESTANDEN",BESTANDEN:"BESTANDEN",mit_auflagen:"BESTANDEN_MIT_AUFLAGEN",bestanden_mit_auflagen:"BESTANDEN_MIT_AUFLAGEN","bestanden mit auflagen":"BESTANDEN_MIT_AUFLAGEN",BESTANDEN_MIT_AUFLAGEN:"BESTANDEN_MIT_AUFLAGEN",nicht_bestanden:"NICHT_BESTANDEN","nicht bestanden":"NICHT_BESTANDEN",NICHT_BESTANDEN:"NICHT_BESTANDEN"};function u(e){return o[String(e??"").trim()]??"OFFEN"}function c(e){return l[u(e)]}e.s(["ValidationResultBadge",0,function({value:e,className:r=""}){let s=c(e),a=s.icon;return(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 rounded-full border px-3 py-1 text-xs font-semibold ${s.badgeClass} ${r}`,children:[(0,t.jsx)(a,{className:"h-3.5 w-3.5"}),s.label]})},"getValidationResultPresentation",0,c,"normalizeValidationResult",0,u,"validationResultValues",0,["OFFEN","BESTANDEN","BESTANDEN_MIT_AUFLAGEN","NICHT_BESTANDEN"]],92950)},7233,e=>{"use strict";let t=(0,e.i(75254).default)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,t],7233)},45388,e=>{"use strict";var t=e.i(43476),r=e.i(66027),s=e.i(75254);let a=(0,s.default)("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);var i=e.i(95468);let n=(0,s.default)("ClipboardList",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]),l=(0,s.default)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]),o=(0,s.default)("FilePenLine",[["path",{d:"m18 5-2.414-2.414A2 2 0 0 0 14.172 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2",key:"142zxg"}],["path",{d:"M21.378 12.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"2t3380"}],["path",{d:"M8 18h1",key:"13wk12"}]]);var u=e.i(94827),c=e.i(7233),d=e.i(20286);let h=(0,s.default)("TestTubeDiagonal",[["path",{d:"M21 7 6.82 21.18a2.83 2.83 0 0 1-3.99-.01a2.83 2.83 0 0 1 0-4L17 3",key:"1ub6xw"}],["path",{d:"m16 2 6 6",key:"1gw87d"}],["path",{d:"M12 16H4",key:"1cjfip"}]]),p=(0,s.default)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);var f=e.i(22016),y=e.i(28779),m=e.i(54858),b=e.i(82649),x=e.i(92950);let g=[{label:"Neue Validierung starten",value:"Schnellstart",href:"/validations/quick-start",icon:c.Plus},{label:"Validierungen",key:"validations",href:"/validations",icon:n},{label:"Kunden",key:"customers",href:"/customers",icon:p},{label:"Geraete",key:"devices",href:"/devices",icon:d.Stethoscope},{label:"Pruefmittel",key:"equipment",href:"/equipment",icon:h}],v=[{label:"Entwuerfe",key:"validation_drafts",href:"/validations?status=ENTWURF",icon:o},{label:"Bereit zur Pruefung",key:"validation_ready",href:"/validations?status=BEREIT_ZUR_PRUEFUNG",icon:n},{label:"In Pruefung",key:"validation_in_review",href:"/validations?status=IN_PRUEFUNG",icon:l},{label:"Freigegeben",key:"validation_approved",href:"/validations?status=FREIGEGEBEN",icon:i.CheckCircle2},{label:"Ueberfaellige Revalidierungen",key:"validation_overdue",href:"/validations?overdue_only=true",icon:a}];e.s(["default",0,function(){let{token:e}=(0,y.useAuth)(),s=(0,r.useQuery)({queryKey:["dashboard",e],queryFn:()=>(0,m.apiGet)("/dashboard",e??""),enabled:!!e});return(0,t.jsxs)("div",{className:"space-y-8",children:[(0,t.jsxs)("header",{className:"rounded-lg border border-border bg-surface p-6 shadow-soft",children:[(0,t.jsxs)("div",{className:"flex flex-col justify-between gap-4 md:flex-row md:items-center",children:[(0,t.jsx)(b.BrandLogo,{}),(0,t.jsxs)("div",{className:"text-sm text-text-light",children:[(0,t.jsx)("p",{children:"Benutzer: angemeldet"}),(0,t.jsx)("p",{children:"Speicherstatus: synchronisiert"})]})]}),(0,t.jsx)("h1",{className:"mt-6 text-3xl font-semibold text-text",children:"Dashboard"}),(0,t.jsx)("p",{className:"mt-2 text-text-light",children:"Validierungsworkflow und faellige Revalidierungen."})]}),(0,t.jsx)("section",{className:"grid gap-4 sm:grid-cols-2 xl:grid-cols-5",children:g.map(e=>{let r=e.icon,a="key"in e?s.data?.[e.key]??0:e.value;return(0,t.jsxs)(f.default,{href:e.href,className:"rounded-lg border border-border bg-surface p-6 shadow-soft transition hover:-translate-y-0.5 hover:border-primary/40 hover:shadow-lg",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("p",{className:"text-sm text-text-light",children:e.label}),(0,t.jsx)(r,{className:"h-5 w-5 text-primary"})]}),(0,t.jsx)("p",{className:"mt-6 text-4xl font-semibold text-text",children:a})]},e.label)})}),(0,t.jsx)("section",{className:"grid gap-4 sm:grid-cols-2 xl:grid-cols-5",children:v.map(e=>{let r=e.icon;return(0,t.jsxs)(f.default,{href:e.href,className:"rounded-lg border border-border bg-surface p-5 shadow-soft transition hover:border-primary/40 hover:bg-background",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("p",{className:"text-sm text-text-light",children:e.label}),(0,t.jsx)(r,{className:"h-5 w-5 text-primary"})]}),(0,t.jsx)("p",{className:"mt-4 text-3xl font-semibold text-text",children:s.data?.[e.key]??0})]},e.key)})}),(0,t.jsxs)("section",{className:"grid gap-4 xl:grid-cols-4",children:[(0,t.jsxs)(f.default,{href:"/validations?sort_by=updated_at&sort_order=desc",className:"rounded-lg border border-border bg-surface p-6 shadow-soft transition hover:border-primary/40 hover:bg-background",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold",children:"Zuletzt bearbeitet"}),(0,t.jsx)("p",{className:"mt-3 text-sm leading-6 text-text-light",children:"Aktuelle Validierungen nach Bearbeitungsdatum oeffnen."})]}),(0,t.jsxs)(f.default,{href:"/validations?overdue_only=true",className:"rounded-lg border border-border bg-surface p-6 shadow-soft transition hover:border-danger/40 hover:bg-background",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold",children:"Ueberfaellige Revalidierungen"}),(0,t.jsx)(a,{className:"h-5 w-5 text-danger"})]}),(0,t.jsx)("p",{className:"mt-4 text-3xl font-semibold text-text",children:s.data?.validation_overdue??0})]}),(0,t.jsxs)(f.default,{href:"/equipment",className:"rounded-lg border border-border bg-surface p-6 shadow-soft transition hover:border-primary/40 hover:bg-background",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold",children:"Kalibrierstatus"}),(0,t.jsx)(u.Gauge,{className:"h-5 w-5 text-primary"})]}),(0,t.jsxs)("p",{className:"mt-4 text-sm text-text-light",children:["Gruen ",s.data?.equipment_green??0," · Gelb ",s.data?.equipment_yellow??0," · Rot ",s.data?.equipment_red??0]})]}),(0,t.jsxs)(f.default,{href:"/validations?status=ABGESCHLOSSEN",className:"rounded-lg border border-border bg-surface p-6 shadow-soft transition hover:border-primary/40 hover:bg-background",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold",children:"Letzte Berichte"}),(0,t.jsx)("p",{className:"mt-4 text-3xl font-semibold text-text",children:s.data?.validation_completed??0}),(0,t.jsxs)("div",{className:"mt-4 flex flex-wrap gap-2",children:[(0,t.jsx)(x.ValidationResultBadge,{value:"BESTANDEN",className:"text-[11px]"}),(0,t.jsx)("span",{className:"text-sm font-semibold text-text",children:s.data?.validation_result_passed??0}),(0,t.jsx)(x.ValidationResultBadge,{value:"BESTANDEN_MIT_AUFLAGEN",className:"text-[11px]"}),(0,t.jsx)("span",{className:"text-sm font-semibold text-text",children:s.data?.validation_result_conditional??0}),(0,t.jsx)(x.ValidationResultBadge,{value:"NICHT_BESTANDEN",className:"text-[11px]"}),(0,t.jsx)("span",{className:"text-sm font-semibold text-text",children:s.data?.validation_result_failed??0}),(0,t.jsx)(x.ValidationResultBadge,{value:"OFFEN",className:"text-[11px]"}),(0,t.jsx)("span",{className:"text-sm font-semibold text-text",children:s.data?.validation_result_open??0})]})]})]})]})}],45388)}]);