PageSourceSearch

https://geovelo.app/component---src-pages-communities-[id]-update-index-de-tsx-1363ce40f84c1fcd6c83.js

js geovelo.app collected 2026-10-01 12:10:12 UTC 7,260 bytes, 1 lines download raw bytes

1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="ace9d123-a1d0-4872-8993-63ae9c6d37aa",e._sentryDebugIdIdentifier="sentry-dbid-ace9d123-a1d0-4872-8993-63ae9c6d37aa")}()}catch(e){}!function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"22ba655516dd73aaf63ade5db113f6ae9cb56917"}}catch(e){}}(),(self.webpackChunk_geovelo_frontends_geovelo=self.webpackChunk_geovelo_frontends_geovelo||[]).push([[4294],{45882:function(e,n,t){var i=t(72998),o=t(70505),a=t(15428);n.A=function(e){let{geogroup:n,icon:t,bannerPicture:r,values:s,errors:l,touched:u,isSubmitting:d,handleChange:c,setFieldValue:m,setIcon:g,setBannerPicture:p}=e;return(0,a.jsx)(i.CommunityForm,{bannerPicture:r,Button:o.A,disableType:n&&"city"===n.type||!1,errors:l,geogroup:n,handleChange:c,icon:t,isSubmitting:d,setBannerPicture:p,setFieldValue:m,setIcon:g,touched:u,values:s})}},56956:function(e,n,t){t.r(n);var i=t(99238),o=t(15428);n.default=e=>(0,o.jsx)(i.A,e)},60341:function(e,n,t){var i=t(27026),o=t(88581),a=t(85502),r=t(96691),s=t(78373),l=t(74253),u=t(15428);n.A=function(e){let{dark:n,geogroup:t,items:d}=e;const{t:c,i18n:{language:m}}=(0,l.useTranslation)();return void 0===t?(0,u.jsx)(i.A,{flexShrink:0},(0,u.jsx)(o.A,{color:n?"inherit":"#fff",variant:"body2"},(0,u.jsx)(a.A,{variant:"text",width:200}))):(0,u.jsx)(i.A,{flexShrink:0},(0,u.jsx)(o.A,{color:n?"inherit":"#fff",variant:"body2"},(0,u.jsx)(r.N_,{style:{color:"inherit",textDecoration:"none"},to:`/${m}/communities`},c("geovelo.navigation.communities")),null==d?void 0:d.map(((e,n)=>{let{label:t,to:i}=e;return(0,u.jsx)(s.Fragment,{key:n}," ","/"," ",i?(0,u.jsx)(r.N_,{style:{color:"inherit",textDecoration:"none"},to:i},t):(0,u.jsx)("span",null,t))}))))}},99238:function(e,n,t){var i=t(54890),o=t(27026),a=t(89575),r=t(72998),s=t(36779),l=t(96691),u=t(47304),d=t(42173),c=t(78373),m=t(74253),g=t(79313),p=t(20159),f=t(70505),b=t(54938),x=t(32371),v=t(13559),y=t(65517),h=t(60341),S=t(45882),j=t(14410),k=t(15428);n.A=function(e){const{0:n}=(0,c.useState)(parseInt(e.params.id)),{0:t,1:A}=(0,c.useState)(!1),{0:_,1:w}=(0,c.useState)(),{0:I,1:C}=(0,c.useState)(),{0:P,1:E}=(0,c.useState)(void 0),{0:F,1:R}=(0,c.useState)(void 0),{user:{current:z,geogroups:D},actions:{getUserGeogroups:G}}=(0,c.useContext)(y.BR),{i18n:{language:T}}=(0,m.useTranslation)(),{enqueueSnackbar:$}=(0,d.useSnackbar)(),{isSubmitting:B,values:V,touched:L,errors:U,handleChange:N,setFieldValue:J,setValues:O,handleSubmit:q}=(0,s.useFormik)({initialValues:{type:"",title:"",sizeRangeIndex:0,address:null,description:"",linkUrl:"",linkLabel:"",automaticChallenge:!0},validationSchema:g.object().shape({title:g.string().required()}),enableReinitialize:!0,validateOnChange:!0,onSubmit:async function(e,n){let{type:t,title:i,sizeRangeIndex:o,address:a,automaticChallenge:s,description:d,linkUrl:c,linkLabel:m}=e,{setSubmitting:g}=n;if(!_||!I||_.partner||!I.isAdmin||!t)return;g(!0);try{var p;const{min:e,max:n}=o&&(null===(p=r.communityFormSizeRanges[t])||void 0===p?void 0:p[o])||{min:void 0,max:void 0},{id:g}=await r.GeogroupService.updateGeogroup(_.id,{type:t,name:i,min:"private"!==t?e:null,max:"private"!==t?n:null,address:"private"!==t?a:null,icon:P instanceof File||null===P?P:void 0,bannerPicture:F instanceof File||null===F?F:void 0,automaticChallengeStatus:s?"automaticDistance":"disabled",description:d,linkUrl:c,linkLabel:c?m:""});$((0,u.t)("commons.communities.form.success_update")),(0,l.oo)(`/${T}/communities/${g}`)}catch{$((0,u.t)("commons.communities.form.server_error_update"),{variant:"error"})}g(!1)}}),{cancellablePromise:W,cancelPromises:H}=(0,r.useCancellablePromise)();(0,c.useEffect)((()=>{A(!0)}),[]),(0,c.useEffect)((()=>(t&&z&&(!async function(){try{const e=await W(r.GeogroupService.getGeogroup({geoGroupId:n}));if("company"===e.type)throw new Error("geogroup is a company community");if(e.partner)throw new Error("geogroup has a partner");w(e)}
1catch(e){e instanceof Error&&"CancelledPromiseError"===(null==e?void 0:e.name)||(console.error(e),$((0,u.t)("geovelo.communities.server_error"),{variant:"error"}),(0,l.oo)(`/${T}/communities`))}}(),D||G()),()=>H())),[t,z]),(0,c.useEffect)((()=>{if(D){const e=D.find((e=>{let{status:t,group:{id:i}}=e;return i===n&&("automaticallyJoin"===t||"manuallyJoin"===t)}));e&&e.isAdmin?C(e):(console.error("user is not an admin of geogroup"),$((0,u.t)("geovelo.communities.server_error"),{variant:"error"}),(0,l.oo)(`/${T}/communities`))}}),[D]),(0,c.useEffect)((()=>{if(_){const{type:e,title:n,sizeRange:t,place:i,description:o,link:a,automaticChallengeStatus:s}=_;O({type:e,title:n,sizeRangeIndex:r.communityFormSizeRanges[e].findIndex((e=>e.max===(null==t?void 0:t.max)))||0,address:i||null,description:o||"",linkUrl:(null==a?void 0:a.url)||"",linkLabel:(null==a?void 0:a.label)||"",automaticChallenge:"disabled"!==s}),i&&!i.address&&async function(e){let{point:n}=e;const t=await r.GeocoderService.reverseGeocode(void 0,n);J("address",t)}(i),E(_.photo?{url:`${_.photo}`,name:_.photo.substring(_.photo.lastIndexOf("/")+1)}:void 0),R(_.bannerPicture?{url:`${_.bannerPicture}`,name:_.bannerPicture.substring(_.bannerPicture.lastIndexOf("/")+1)}:void 0)}}),[_]);const K=(0,u.t)("geovelo.pages_titles.update_community");return void 0===_||void 0===I?(0,k.jsx)(j.A,{loadingTextKey:"geovelo.communities.form_dialog.loading"}):null===_||null===I||_.partner||!I.isAdmin?(0,k.jsx)(c.Fragment,null):(0,k.jsx)(p.A,{path:e.location.pathname},(0,k.jsx)(c.Fragment,null,(0,k.jsx)(b.A,(0,a.A)({title:K},e)),(0,k.jsx)(x.A,{small:!0,data:{id:"",slice_type:"banner",primary:{fullscreen_background:!0,background_color_start:"#326AC2",dark_background:!0,baseline:{text:K}}}}),(0,k.jsx)(o.A,{component:"form",display:"flex",flexDirection:"column",gap:{xs:6,lg:8},minHeight:"calc(100svh - 272px)",onSubmit:q,paddingBottom:{xs:13,lg:15},paddingTop:{xs:6,lg:8}},(0,k.jsx)(o.A,{alignItems:"center",alignSelf:"stretch",display:"flex",flexDirection:"column",flexGrow:1},(0,k.jsx)(o.A,{display:"flex",flexDirection:"column",flexGrow:1,gap:5,maxWidth:"100%",paddingX:{xs:4,md:8,lg:16},width:v.J},(0,k.jsx)(h.A,{dark:!0,geogroup:_,items:[{label:_.title},{label:K}]}),(0,k.jsx)(S.A,{bannerPicture:F,errors:U,geogroup:_,handleChange:N,icon:P,isSubmitting:B,setBannerPicture:R,setFieldValue:J,setIcon:E,touched:L,values:V}))),V.type&&"company"!==V.type&&(0,k.jsx)(r.StickyBar,{drawerWidth:0,variant:"outlined"},(0,k.jsx)(c.Fragment,null,(0,k.jsx)(f.A,{color:"primary",component:l.N_,disabled:B,size:"medium",sx:{borderRadius:"8px !important"},to:`/${T}/communities`,type:"reset",variant:"outlined"},(0,u.t)("commons.actions.cancel")),(0,k.jsx)(f.A,{disableElevation:!0,color:"primary",disabled:B||!V.title||["company","association","school"].includes(V.type)&&!V.address,size:"medium",startIcon:B&&(0,k.jsx)(i.A,{color:"inherit",size:16,thickness:4}),sx:{borderRadius:"8px !important"},type:"submit",variant:"contained"},(0,u.t)("geovelo.communities.actions.update",{context:V.type})))))))}}}]);

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.