PageSourceSearch

https://team.swile.co/assets/EditPotInvitationPage-DCyyX2_R.js

js swile.co collected 2026-09-24 17:11:19 UTC 3,515 bytes, 1 lines download raw bytes

1import{j as o,h as v}from"./@themenu-design-system-PPvpWM1I.js";import{a as I}from"./@analytics-DNf5dJTn.js";import{V as y,at as h,b as x,cT as b,aM as w,ab as j,E as P,aD as l,cE as u,aF as S,cx as C}from"./index-DE1OpxQz.js";import{u as M}from"./@react-intl-CKI24l5Z.js";import{h as _,C as E,a as L}from"./WarningInvitedManyUsersModal-BGGj2_tk.js";import{u as D}from"./clock-CU7tYLHb.js";import{u as F}from"./useCreateInvitationMutation-aAWI9hw7.js";import{u as k}from"./usePot-BY3j8Ip1.js";import{P as T,a as A}from"./CreatePot-C4T79fC6.js";import"./@react-aria-stately-4PMgXtPH.js";import"./@libphonenumber-js-CKk4m8Ay.js";import"./@luxon-DfZoh-A_.js";import"./@utils-CrEFOnIh.js";import"./@swiper-DRyvN9l1.js";import"./activity-BoCWE1Ii.js";import"./activities-D_KeAtbe.js";import"./image-helper-D5qRy8ab.js";import"./index-B0MeWHNs.js";import"./MateInfiniteScroll-CeolrAXH.js";import"./InfiniteScroll-B0iJJxiH.js";import"./UsersListSkeleton-B5sdSVsh.js";import"./UsersSelector-CXvpuwKu.js";import"./pagination-BJ-_4Wsh.js";import"./isClosedPot-Df8BtXcY.js";import"./useDefaultProgramIdWithFeatureFlag-CQOhlNk5.js";import"./getProgramsByFeatureFlag-BOUaxppX.js";import"./ActivityPreviewLayout-ae4PpflI.js";import"./PotSidebar-D_BsRmYA.js";import"./getEngagementUser-CzFol2G8.js";try{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new e.Error().stack;i&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[i]="559e5b60-6dba-44c8-9bce-2b63993d0ca2",e._sentryDebugIdIdentifier="sentry-dbid-559e5b60-6dba-44c8-9bce-2b63993d0ca2")}catch{}const N=({initialValues:e,currentProgramId:i})=>{const{notify:t}=j(),{setLoading:a,setCurrentProgramId:n}=I.useContext(L),s=x(),r=M(),d=P(),{createInvitationMutation:c}=F();I.useEffect(()=>{i&&n(i)},[i]);const f=l().shape({invitation:l().shape({matesSelection:l().shape({teamsIncluded:u().min(0),usersExcluded:u().min(0),usersIncluded:u().min(0)}).nullable()})});return o.jsx(S,{initialValues:e,validationSchema:f,validateOnMount:!0,onSubmit:async m=>{a(!0);try{return await c({activityId:e.pot.activityId||"",programId:e.pot.programIds[0],matesSelection:m.invitation.matesSelection}),t({text:r.formatMessage({id:"pot_page.pot.event_updated"})}),s(b.toPath({id:e.pot.id}))}catch{return t({text:r.formatMessage({id:"pot_page.pot.event_creation_error"}),severity:"error"}),s(C.toPath())}finally{a(!1)}},children:o.jsxs(v,{display:"flex",flexDirection:d?"column":"row",width:"100%",children:[o.jsx("div",{className:"w-full md:w-[41.66%] lg:w-[33.33%]",children:o.jsx(T,{invitationEditionMode:!0})}),o.jsx("div",{className:"w-full md:w-[58.33%] lg:w-[66.66%] xl:w-[75%]",children:o.jsx(A,{})})]})})},lt=()=>{var p,g;const{id:e}=y(),{isLoading:i,pot:t}=k(),{isLoading:a,matesSelection:n}=D((t==null?void 0:t.activityId)||""),{isLoading:s,identity:r}=h(),d=x();if(!t||i||!n||a||!r||s)return null;const c=t!=null&&t.programIds&&t.programIds.length>0?t.programIds[0]:null;((p=t.creator)==null?void 0:p.id)!==(r==null?void 0:r.id)&&d(b.toPath({id:e}));const m={pot:{id:t.id,activityId:t.activityId,category:t.celebration,beneficiaryId:((g=t.beneficiary)==null?void 0:g.id)||"",name:t.name,description:t.description||"",endTime:t.closedAt,programIds:t.programIds,coverImageUrl:t.coverImageUrl},invitation:{matesSelection:n}};return o.jsxs(_,{children:[o.jsx(w,{}),o.jsx(E,{children:o.jsx(v,{display:"flex",flexDirection:"row",children:o.jsx(N,{initialValues:m,currentProgramId:c})})})]})};export{lt 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.