PageSourceSearch

https://www.bikely.com/assets/CustomerModuleRecert-0QCIuwyY.js

js bikely.com collected 2026-10-02 10:00:55 UTC 3,085 bytes, 1 lines download raw bytes

1import{u,aa as x,m as p,v as j,w as h,j as e,B as b,L as _,i as g}from"./index-DTL302P6.js";import{u as f}from"./useCustomerAuth-BPgz8Jrh.js";import{C as v,a as k,b as y,d as R}from"./card-Bn2w8S0a.js";import{T}from"./TestReportForm-DM0SlmX-.js";import{A as N}from"./arrow-left-CH7HL-Mn.js";import{T as q}from"./triangle-alert-t4_eNW52.js";import"./label-D672ps04.js";import"./textarea-pTCLOTM4.js";import"./upload-DID01TbM.js";function K(){var a,i;const{t:s}=u(),{id:t}=x(),c=p(),d=j(),{user:o}=f(),{data:r,refetch:m}=h({queryKey:["customer-module-recert",t],queryFn:async()=>{const{data:l,error:n}=await g.from("order_modules").select("id, serial_number, production_status, location_id, variant_key, recert_due, recert_reason, recert_requested_at, locations(location_name, address)").eq("id",t).maybeSingle();if(n)throw n;return l},enabled:!!t});return r?e.jsxs("div",{className:"max-w-3xl mx-auto p-6 space-y-4",children:[e.jsx(b,{variant:"ghost",size:"sm",asChild:!0,children:e.jsxs(_,{to:"/customer/locations",children:[e.jsx(N,{className:"w-4 h-4 mr-1"})," ",s("portal.customer.misc2.moduleRecert.backToLocations","Tilbake til lokasjoner")]})}),e.jsxs(v,{children:[e.jsx(k,{children:e.jsxs(y,{className:"flex items-center gap-2",children:[r.serial_number,r.recert_due&&e.jsxs("span",{className:"text-xs bg-amber-100 text-amber-900 border border-amber-300 rounded px-2 py-1 inline-flex items-center gap-1",children:[e.jsx(q,{className:"w-3 h-3"})," ",s("portal.customer.misc2.moduleRecert.resitRequired","Re-SIT påkrevd")]})]})}),e.jsxs(R,{className:"text-sm space-y-1",children:[e.jsxs("div",{children:[e.jsxs("strong",{children:[s("portal.customer.misc2.moduleRecert.location","Lokasjon"),":"]})," ",((a=r.locations)==null?void 0:a.location_name)??"—"]}),e.jsxs("div",{children:[e.jsxs("strong",{children:[s("portal.customer.misc2.moduleRecert.address","Adresse"),":"]})," ",((i=r.locations)==null?void 0:i.address)??"—"]}),r.recert_reason&&e.jsxs("div",{children:[e.jsxs("strong",{children:[s("portal.customer.misc2.moduleRecert.reason","Årsak"),":"]})," ",r.recert_reason]}),r.recert_requested_at&&e.jsxs("div",{children:[e.jsxs("strong",{children:[s("portal.customer.misc2.moduleRecert.requested","Etterspurt"),":"]})," ",new Date(r.recert_requested_at).toLocaleString()]})]})]}),r.recert_due?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"rounded-md border border-amber-200 bg-amber-50 text-amber-900 p-3 text-sm",children:s("portal.customer.misc2.moduleRecert.recertNotice","Denne modulen krever ny SIT-test (selvbetjening). Gå gjennom sjekklisten og last opp bilder som dokumentasjon.")}),e.jsx(T,{moduleId:r.id,kind:"sit",reportKind:"sit_recert",locationId:r.location_id,defaultTesterEmail:(o==null?void 0:o.email)??void 0,onSubmitted:()=>{m(),d.invalidateQueries({queryKey:["customer-locations"]}),c("/customer/locations")}})]}):e.jsx("div",{className:"rounded-md border p-6 text-sm text-muted-foreground",children:s("portal.customer.misc2.moduleRecert.noRecertNeeded","Denne modulen har ikke behov for re-SIT akkurat nå.")})]}):null}export{K 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.