1import{a as v,db as T,j as n,jF as _,_ as u,$ as E,w as s,A as d,jG as r,G as D,B as j,aR as k,d as I,z as A,au as L,t as w,bz as O}from"./index-DEpx10yq.js";import{r as V}from"./vendor-BuXdE1tY.js";import{b as z,c as C,d as l}from"./credentialVerification-Bweyi-Up.js";import{S as R}from"./Section-sxHNObk1.js";import{C as y}from"./credentials-8Ke6aybn.js";import{f as K}from"./Timestamp-B0vioKD7.js";import"./app-4WdNMoJ4.js";import"./dayjs-timezone-iana-plugin-BLhLpZHa.js";try{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="96d837cb-e61a-4ae2-854f-1c2b28474c57",e._sentryDebugIdIdentifier="sentry-dbid-96d837cb-e61a-4ae2-854f-1c2b28474c57")}catch{}const N={en:"Asked by %{name} on %{date}",nl:"Gevraagd door %{name} op %{date}"},F={en:"With you: %{applications} accepted applications, %{reports} activity reports.",nl:"Bij jullie: %{applications} geaccepteerde aanmeldingen, %{reports} activiteitenrapporten."},P={en:"Confirm",nl:"Bevestigen"},G={en:"Cannot confirm",nl:"Kan niet bevestigen"},H={en:"Nothing has been answered yet.",nl:"Er is nog niets beantwoord."},Q={en:"Nothing is waiting for an answer.",nl:"Er wacht niets op een antwoord."},Y={en:"Volunteers can ask you to confirm a training, check or qualification they have listed on their profile. Confirming says you have seen evidence for it.",nl:"Vrijwilligers kunnen jullie vragen om een training, controle of kwalificatie op hun profiel te bevestigen. Bevestigen betekent dat je er bewijs van hebt gezien."},U={en:"Completed %{date}",nl:"Behaald %{date}"},M={en:"Check",nl:"Controle"},$={en:"Qualification",nl:"Kwalificatie"},W={en:"Training",nl:"Training"},J={en:"Their note: â%{message}â",nl:"Hun bericht: â%{message}â"},X={en:"Credential confirmations",nl:"Bevestigingen van kwalificaties"},Z={en:"By confirming, you're saying %{organization} has seen evidence that %{name} holds this training, check or qualification as described. Your name, your role and today's date will be shown next to it on their profile.",nl:"Door te bevestigen zeg je dat %{organization} bewijs heeft gezien dat %{name} deze training, controle of kwalificatie heeft zoals beschreven. Je naam, je rol en de datum van vandaag komen ernaast te staan op hun profiel."},q={en:"administrator",nl:"beheerder"},ee={en:"coordinator",nl:"coördinator"},ne={en:"moderator",nl:"moderator"},ie={en:"Confirmed by %{name} (%{role}) on %{date}",nl:"Bevestigd door %{name} (%{role}) op %{date}"},ae={en:"Declined by %{name} (%{role}) on %{date}",nl:"Afgewezen door %{name} (%{role}) op %{date}"},te={en:"Answered",nl:"Beantwoord"},oe={en:"Waiting",nl:"In afwachting"},se={en:"Valid until %{date}",nl:"Geldig tot %{date}"},S={askedBy:N,askerHistory:F,confirm:P,decline:G,emptyDecided:H,emptyPending:Q,explanation:Y,issuedOn:U,kindCheck:M,kindQualification:$,kindTraining:W,note:J,pageHeading:X,responsibility:Z,roleAdmin:q,roleCoordinator:ee,roleModerator:ne,statusConfirmed:ie,statusDeclined:ae,tabDecided:te,tabPending:oe,validUntil:se},de={[y.training]:"kindTraining",[y.check]:"kindCheck",[y.qualification]:"kindQualification"},re={[k.admin]:"roleAdmin",[k.moderator]:"roleModerator"},ce={[C.confirmed]:"statusConfirmed",[C.declined]:"statusDeclined"},le=({request:e,organizationName:t,deciding:f,onDecide:m})=>{const i=v(S),b=T(),c=o=>K(o,b,{skipFromNow:!0}),{credential:a}=e,g=[i(de[a.kind]),a.provider_name,a.issued_on&&i("issuedOn",{date:c(a.issued_on)}),a.valid_until&&i("validUntil",{date:c(a.valid_until)})].filter(Boolean).join(" · "),p=ce[e.status];return n.jsx(_,{withBorder:!0,padding:"md",...d(r.card(e.id)),children:n.jsxs(u,{gap:"xs",children:[n.jsxs(E,{children:[n.jsx(s,{fw:"bold",children:a.title}),n.jsx(s,{size:"sm",c:"textSecondary",children:g})]}),n.jsx(s,{size:"sm",children:i("askedBy",{name:e.asker.name,date:c(new Date(e.created_at).toISOString())})}),n.jsx(s,{size:"sm",c:"textSecondary",children:i("askerHistory",{applications:`${e.asker.acceptedApplications}`,reports:`${e.asker.impactReports}`})}),e.message&&n.jsx(s,{size:"sm",fs:"italic",children:i("note",{message:e.message})}),m?n.jsxs(u,{gap:"xs",children:[n.jsx(s,{size:"sm",...d(r.responsibility(e.id)),children:i("responsibility",{organization:t,name:e.asker.name})}),n.jsxs(D,{gap:"xs",children:[n.jsx(j,{size:"compact-sm",loading:f,onClick:()=>m(z.confirm),...d(r.confirm(e.id)),children:i("confirm")}),n.jsx(j,{size:"compact-sm",variant:"subtle",loading:f,onClick:()=>m(z.decline),...d(r.decline(e.id)),children:i("decline")})]})]}):p&&n.jsx(s,{size:"sm",c:"textSecondary",children:i(p,{name:e.decidedBy?.name??"",role:i((e.decidedBy&&re[e.decidedBy.role])??"roleCoordinator"),date:e.decided_at?c(new Date(e.decided_at).toISOString()):""})})]})})},x=[l.pending,l.decided],me={[l.pending]:"tabPending",[l.decided]:"tabDecided"},je=()=>{const{organizationSlug:e}=I();if(!e)throw new Error("organizationSlug not found in route");const t=v(S),f=A(),m=L(),[i,b]=V.useState(l.pending),c=m?.id,a=w.organizations.credentialVerifications.useQuery({organizationId:c??0,tab:i},{enabled:!!c}),g=w.organizations.decideCredentialVerification.useMutation({onSuccess:()=>a.refetch(),onError:f()}),p=a.data?.requests??[];return n.jsx(R,{heading:t("pageHeading"),...d(r.page),children:n.jsxs(u,{gap:"md",children:[n.jsx(s,{size:"sm",c:"textSecondary",...d(r.explanation),children:t("explanation")}),n.jsx(O,{active:x.indexOf(i),tabs:x.map(o=>({type:"BUTTON",onClick:()=>b(o),text:n.jsx("span",{...d(r.tab(o)),children:t(me[o])})})),children:x.map(o=>n.jsxs(u,{gap:"sm",children:[p.length===0&&!a.isFetching&&n.jsx(s,{size:"sm",c:"textSecondary",...d(r.empty),children:o===l.pending?t("emptyPending"):t("emptyDecided")}),p.map(h=>n.jsx(le,{request:h,organizationName:m?.name??"",deciding:g.isPending&&g.variables?.requestId===h.id,onDecide:o===l.pending?B=>g.mutate({requestId:h.id,decision:B}):void 0}
1,h.id))]},o))})]})})};export{je as default}; 2//# sourceMappingURL=index-C6pBPLSd.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.