PageSourceSearch

https://endurancepics.ai/assets/logistics-decline-BARsAWvv.js

js endurancepics.ai collected 2026-10-05 11:58:56 UTC 3,029 bytes, 1 lines download raw bytes

1import{j as e}from"./motion-YM8fB_5Z.js";import{r as n}from"./sentry-otjh_W8X.js";import{b as y,L as C}from"./react-OFElpF2u.js";import{t as p,W as L}from"./ui-BM2pkkqU.js";import{L as _}from"./language-toggle-D07YCwYk.js";import{cY as w,B as h,c_ as k}from"./index-BoOYcZhe.js";import{C as r,a as c}from"./card-DjYXCjzD.js";import{u as D}from"./i18n-BRS0AnGA.js";import"./pdf-BEE2WjVn.js";import"./supabase-BTsOnGLq.js";import"./charts-DnWBDTZK.js";function X(){const{t:s}=D("logistics"),{eventId:i,token:l}=y(),[o,f]=n.useState("schedule_conflict"),[a,j]=n.useState(""),[g,d]=n.useState(!1),[v,b]=n.useState(!0),[x,N]=n.useState(null),[m,u]=n.useState(!1);return n.useEffect(()=>{!i||!l||w(i,l).then(t=>{N(t),(t==null?void 0:t.status)==="declined"&&d(!0),b(!1)})},[i,l]),v?e.jsx("div",{className:"mx-auto max-w-3xl px-4 py-12",children:e.jsx(r,{children:e.jsx(c,{className:"p-8 text-center",children:e.jsx("p",{className:"text-gray-500",children:s("decline.loading")})})})}):!l||!i||!x?e.jsx("div",{className:"mx-auto max-w-3xl px-4 py-12",children:e.jsx(r,{children:e.jsxs(c,{className:"p-8 text-center",children:[e.jsx("h1",{className:"text-3xl font-bold",children:s("decline.notFoundTitle")}),e.jsx("p",{className:"mt-2 text-gray-500",children:s("decline.notFoundBody")})]})})}):e.jsxs("div",{className:"mx-auto max-w-3xl px-4 py-12",children:[e.jsx("div",{className:"mb-4 flex justify-end",children:e.jsx(_,{})}),e.jsx(r,{children:e.jsxs(c,{className:"space-y-4 p-8",children:[e.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:s("decline.title")}),e.jsx("p",{className:"text-sm text-gray-600",children:s("decline.subtitle",{eventName:x.eventName})}),e.jsxs("select",{className:"w-full rounded border border-gray-300 px-3 py-2 text-sm text-base",value:o,onChange:t=>f(t.target.value),children:[e.jsx("option",{value:"schedule_conflict",children:s("decline.reasons.schedule_conflict")}),e.jsx("option",{value:"travel_distance",children:s("decline.reasons.travel_distance")}),e.jsx("option",{value:"equipment_unavailable",children:s("decline.reasons.equipment_unavailable")}),e.jsx("option",{value:"other",children:s("decline.reasons.other")})]}),e.jsx("textarea",{className:"min-h-28 w-full rounded border border-gray-300 p-3 text-sm text-base",value:a,onChange:t=>j(t.target.value),placeholder:s("decline.notesPlaceholder")}),g?e.jsxs("div",{className:"inline-flex items-center gap-2 rounded-lg border border-red-200 bg-red-50 px-3 py-2 text-sm text-red-700",children:[e.jsx(L,{className:"h-4 w-4"}),s("decline.declinedBadge")]}):e.jsxs("div",{className:"flex gap-2",children:[e.jsx(h,{variant:"destructive",disabled:m,onClick:async()=>{if(u(!0),!await k(i,l,`${o}${a?`: ${a}`:""}`)){p.error(s("decline.errorDecline")),u(!1);return}d(!0),p.success(s("decline.successDecline"))},children:s(m?"decline.submitting":"decline.submitDecline")}),e.jsx(h,{variant:"outline",asChild:!0,children:e.jsx(C,{to:`/events/${i}/confirm/${l}`,children:s("decline.backToConfirm")})})]})]})})]})}export{X as LogisticsDecline};

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.