PageSourceSearch

https://vpdive.com/_nuxt/C5ASIdu6.js

js vpdive.com collected 2026-10-01 15:38:27 UTC 3,894 bytes, 1 lines download raw bytes

1import{d as I,b as z,z as N,Y as R,o as j,c as d,l as a,h as p,v as q,t as n,e as s,g as O,p as g,R as H,n as y,Z as U,B as _,G as E,k as o,j as m}from"./CO-mOBGH.js";import{_ as F}from"./DTMsOJTh.js";import{u as G}from"./wneedS0W.js";import{u as J}from"./BaBtYTZu.js";const P={class:"px-4 sm:px-6 lg:px-8 py-10"},Y={class:"max-w-xl mx-auto bg-white rounded-lg shadow-sm p-6 sm:p-8 space-y-6"},Z={class:"flex items-start gap-4"},K={class:"w-12 h-12 rounded-full bg-orange-100 flex items-center justify-center flex-shrink-0"},Q={class:"space-y-1"},W={class:"text-2xl font-bold text-[#1b2441]"},X={class:"text-gray-600"},ee={key:0,class:"bg-red-50 text-red-600 px-4 py-3 rounded-md text-sm"},te={key:1,class:"space-y-3"},se={class:"text-sm text-gray-600"},ae={key:2,class:"bg-gray-50 border border-gray-200 rounded-md px-4 py-3 text-sm text-gray-600"},oe={class:"pt-4 border-t border-gray-100 space-y-3"},le=I({__name:"membership",setup(re){z({title:"Adhésion"});const{signOut:x}=E(),f=N(),{getUnsubscribeInfo:b,isNotMember:w,refreshMembershipStatus:k}=U(),{canRegister:C,refresh:S}=J(),{clubInfo:A}=G(),V=R(),u=_(!1),i=_(""),M=o(()=>{const e=V.getActiveClub?.name;return e?` à ${e}`:" à ce club"}),h={club:"Le club a désactivé votre accès",deleted:"Le club a supprimé votre inscription",user:"Vous vous êtes désinscrit"},c=o(()=>w()),T=o(()=>{if(c.value)return"Demandez votre adhésion pour accéder à l'espace membre du club.";const{date:e,by:t}=b(),r=e?new Date(e).toLocaleDateString("fr-FR",{day:"numeric",month:"long",year:"numeric"}):null,l=h[t??"user"]??h.user;return r?`${l} le ${r}.`:`${l}.`}),$=o(()=>A.value?.auto_registration),v=o(()=>b().by==="club"&&$.value!=="authorized_with_request"),D=o(()=>C.value&&!v.value),L=o(()=>v.value?"Votre accès a été désactivé par le club : seul un administrateur peut le rétablir.":`Ce club ne permet pas l'inscription en ligne : rapprochez-vous d'un administrateur du club pour demander votre ${c.value?"inscription":"réinscription"}.`),B=async()=>{i.value="",u.value=!0;try{const e=await H("/api/user/membership/request",{method:"POST"});if(e?.membership_status){await k();const t=e.membership_status==="active";f.add({title:t?"Inscription validée":"Demande envoyée",description:t?"Vous êtes maintenant inscrit au club.":"Votre demande d'adhésion a bien été transmise au club.",icon:"heroicons:check-circle",color:"green"}),await y("/app/dashboard");return}i.value=e?.message||"La demande n'a pas pu être envoyée."}catch(e){i.value=e?.data?.error||e?.message||"La demande n'a pas pu être envoyée."}finally{u.value=!1}};return j(()=>{S()}),(e,t)=>{const r=q;return m(),d("div",P,[a("div",Y,[a("div",Z,[a("div",K,[p(r,{name:"heroicons:user-minus",class:"w-7 h-7 text-orange-500"})]),a("div",Q,[a("h1",W,"Vous n'êtes "+n(s(c)?"pas":"plus")+" inscrit"+n(s(M)),1),a("p",X,n(s(T)),1)])]),s(i)?(m(),d("div",ee,n(s(i)),1)):O("",!0),s(D)?(m(),d("div",te,[a("p",se,"Souhaitez-vous demander à rejoindre "+n(s(c)?"":"de nouveau ")+"ce club ?",1),p(F,{text:s(c)?"Demander à rejoindre le club":"Demander à me réinscrire",color:"primary",icon:"heroicons:paper-airplane","icon-position":"left",loading:s(u),disabled:s(u),onClick:B},null,8,["text","loading","disabled"])])):(m(),d("div",ae,n(s(L)),1)),a("div",oe,[a("button",{type:"button",onClick:t[0]||(t[0]=l=>("navigateTo"in e?e.navigateTo:s(y))("/app/select-club?switch=true")),class:"flex items-center gap-2 text-sm text-gray-600 hover:text-primary transition-colors"},[p(r,{name:"heroicons:arrow-path-rounded-square",class:"w-5 h-5"}),t[2]||(t[2]=g(" Accéder à un autre club ",-1))]),a("button",{type:"button",onClick:t[1]||(t[1]=l=>s(x)()),class:"flex items-center gap-2 text-sm text-gray-600 hover:text-primary transition-colors"},[p(r,{name:"heroicons:arrow-right-on-rectangle",class:"w-5 h-5"}),t[3]||(t[3]=g(" Se déconnecter ",-1))])])])])}}});export{le 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.