PageSourceSearch

https://monclub.fftt.com/assets/index-BMgs3_M-.js

js fftt.com collected 2026-10-01 11:51:29 UTC 12,364 bytes, 16 lines download raw bytes

1import{_ as L,h as G,b as u,e as o,n as M,r as a,o as s,D as Q,s as W,i as $,W as z,c as p,w as n,F as g,f as O,x as f,g as i,d as m,E as V,a9 as H,aa as J,m as k,t as c}from"./index-BXzZPibv.js";import{P as K,a as X}from"./finder-BiZnfiia.js";import{s as Y}from"./index-DSgrOZQR.js";import"./referentials-EtD2Cva2.js";import"./form-Cgzmod2v.js";import"./event-bus-CGRXT3Tn.js";const Z={mixins:[G],props:{index:[String,Number]}};function _(e,t,C,D,N,S){const b=a("datetime-row");return s(),u("div",null,[o(b,M({modelValue:e.values.date,"onUpdate:modelValue":t[0]||(t[0]=w=>e.values.date=w),label:"Date session "+(C.index||"")},e.configureField("date")),null,16,["modelValue","label"])])}const x=L(Z,[["render",_]]),ee={components:{EventSessionForm:x,PersonFinder:X},mixins:[Q,W,K],props:{clubIri:String,selectedClubEvent:Object},data:()=>({currentParticipants:[]}),computed:{sessionNumber(){return z(this.selectedClubEvent,"type.sessionNumber")||0},disabledPersonsFn(){return e=>!!this.currentParticipants.find(t=>t.person.id===e.id)}},methods:{getClubEventsParticipants(){return $.createCollectionQuery("clubEvents").select("id, participations.{ id, person.{ id } }").where("id",parseInt(this.selectedClubEvent.id)),$.execute()}},watch:{values:{immediate:!0,handler(e){e&&(e.club||(e.club=this.clubIri),e.clubEvent||(e.clubEvent=this.selectedClubEvent),this.selectedClubEvent&&(this.innerLoading=!0,this.getClubEventsParticipants().then(t=>{t&&t.clubEvents&&(this.currentParticipants=t.clubEvents[0].participations)}).finally(()=>{this.innerLoading=!1})))}},sessionNumber(e){if(e&&!this.values.sessions){this.values.sessions=[];let t=0;for(t;t<e;t++)this.values.sessions.push({date:void 0})}}}};function te(e,t,C,D,N,S){const b=a("event-session-form"),w=a("person-finder"),v=a("md-button"),y=a("form-dialog");return s(),p(y,{show:e.doShow,"onUpdate:show":t[8]||(t[8]=r=>e.doShow=r),title:e.title,loading:e.loading||e.formLoading,onSubmit:t[9]||(t[9]=r=>e.$emit("submit",e.values))},{footer:n(()=>[o(v,{class:"md-primary",onClick:t[4]||(t[4]=f(r=>e.doShow=!1,["prevent"]))},{default:n(()=>[...t[10]||(t[10]=[i(" Annuler ",-1)])]),_:1}),e.personSelected?(s(),u(g,{key:1},[o(v,{class:"btnPrimaryLight",onClick:t[6]||(t[6]=f(r=>e.goBack=!e.goBack,["prevent"]))},{default:n(()=>[...t[12]||(t[12]=[i("Retour",-1)])]),_:1}),o(v,{type:"submit",class:"btnPrimary",onClick:t[7]||(t[7]=f(r=>e.$emit("submit",e.values),["prevent"]))},{default:n(()=>[...t[13]||(t[13]=[i("Enregistrer",-1)])]),_:1})],64)):(s(),p(v,{key:0,class:"btnPrimary",type:"submit",onClick:t[5]||(t[5]=f(r=>e.doSearch=!e.doSearch,["prevent"]))},{default:n(()=>[...t[11]||(t[11]=[i("Rechercher",-1)])]),_:1}))]),default:n(()=>[o(w,{modelValue:e.values,"onUpdate:modelValue":t[0]||(t[0]=r=>e.values=r),"do-search":e.doSearch,"onUpdate:doSearch":t[1]||(t[1]=r=>e.doSearch=r),"go-back":e.goBack,"onUpdate:goBack":t[2]||(t[2]=r=>e.goBack=r),"form-loading":e.formLoading,"onUpdate:formLoading":t[3]||(t[3]=r=>e.formLoading=r),mapping:e.mapping,errors:e.errors,selectPersonDisabled:S.disabledPersonsFn},{default:n(()=>[(s(!0),u(g,null,O(e.values.sessions,(r,h)=>(s(),p(b,{key:h,modelValue:e.values.sessions[h],"onUpdate:modelValue":P=>e.values.sessions[h]=P,mapping:e.getMapping("sessions"),errors:e.getErrors("sessions"),index:h+1},null,8,["modelValue","onUpdate:modelValue","mapping","errors","index"]))),128))]),_:1},8,["modelValue","do-search","go-back","form-loading","mapping","errors","selectPersonDisabled"])]),_:1},8,["show","title","loading"])}const ne=L(ee,[["render",te]]),T={components:{ParticipationsDialog:ne},data:()=>({clubEventItems:[],loading:null,participationsDialogOpened:!1,selectedClubEvent:null}),computed:{clubIri(){return"/api"+V.entrypoint+"/"+this.$route.params.clubId},clubEventsByTypes(){return this.clubEventItems?this.clubEventItems.reduce((e,t)=>{const C=e.find(D=>D.type.id===t.type.id);return C?C.items.push(t):e.push({type:t.type,items:[t]}),e},[]):[]},selectedClubEventSessionNumber(){return this.selectedClubEvent&&this.selectedClubEvent.type.number},isPPP(){return this.$route.query["type.id"]==1}},methods:{getList(){this.loading=!0,this.getClubEvents().then(({clubEvents:e})=>{this.clubEventItems=e}).finally(()=>{this.loading=!1})},getClubEvents(){return $.createCollectionQuery("clubEvents").noCache().select(`
2                        id,
3                        name,
4                        type.{
5                            id, name, identifier, sessionNumber, places.{ id }
6                        },
7                        startDate,
8                        participantNumber,
9                        placeType.{
10                            id, name,
11                        },
12                        placeLibelle,
13                        contact.{
14                            id, familyName, givenName, email, telephone,
15                        }
16                    `).where("club.id",parseInt(this.$route.params.clubId)),this.$route.query["type.id"]&&$.where("type_id",parseInt(this.$route.query["type.id"])),$.execute()},doOpenCreateParticipationDialog(e){this.selectedClubEvent=e,this.openCreateParticipationDialog()},canManage(e){return e.type.identifier==="PPP"&&(!this.clubItem||!this.clubItem.canManagePPP)||e.type.identifier==="PTO"&&(!this.clubItem||!this.clubItem.canManagePassTournoi)?!1:!(e.type.identifier==="EPP"&&(!this.clubItem||!this.clubItem.canManagePassPing))},debugCreate(e){if(!e.club){const t=this.clubItem;e.club=t?.["@id"]||this.clubIri}this.create(e)}},watch:{created(){this.getList()},updated(){this.getList()},deleted(){this.getList()},$route:{immediate:!1,handler(e,t){(e.params.clubId!==t.params.clubId||e.query["type.id"]!==t.query["type.id"])&&this.getList()}}},created(){this.getList()}};Y.links(T,[{namespace:H.namespace,operations:["create","update","show","delete"],withDialogs:!0},{namespace:J.namespace,operations:["create"],prefix:"participation",withDialogs:!0},{namespace:V.namespace,operations:["show"],prefix:"club"}]);const oe=T,ie={key:0};function se(e,t,C,D,N,S){const b=a("md-button"),w=a("router-button"),v=a("content-block"),y=a("md-table-cell"),r=a("email"),h=a("phone"),P=a("md-tooltip"),E=a("md-icon"),B=a("collapsor"),F=a("simple-list"),U=a("form-dialog"),q=a("participations-dialog"),R=a("details-dialog"),A=a("confirm-dialog");return s(),u("div",null,[!e.loading&&e.hasSpecificRight("canCreateClubEvents",1)?(s(),p(b,{key:0,class:"btnPrimary mbm",onClick:f(e.openCreateDialog,["prevent"])},{default:n(()=>[...t[6]||(t[6]=[k("i",{class:"material-icons"},"add_circle_outline",-1),k("span",null,"Nouvel évènement",-1)])]),_:1},8,["onClick"])):m("",!0),e.$route.query["type.id"]?(s(),p(w,{key:1,to:{name:"club_events_statistics",query:{"type.id":e.$route.query["type.id"]}},class:"mbm"},{default:n(()=>[...t[7]||(t[7]=[k("i",{class:"material-icons"},"insights",-1),i(" Statistiques de la saison ",-1)])]),_:1},8,["to"])):m("",!0),e.isPPP?(s(),p(b,{key:2,href:"https://www.fftt.com/ppp",class:"md-raised md-default mbm"},{default:n(()=>[...t[8]||(t[8]=[i(" Commande / Suivi de kits PPP ",-1)])]),_:1})):m("",!0),e.loading?(s(),p(v,{key:3,loading:e.loading},null,8,["loading"])):e.clubEventsByTypes.length?(s(!0),u(g,{key:5},O(e.clubEventsByTypes,(d,j)=>(s(),p(v,{key:j,title:d.type.name,"min-height":300},{default:n(()=>[o(F,{items:d.items,onRowClick:e.openShowDialog},{columns:n(({item:l})=>[o(y,{"md-label":"Nom","md-sort-by":"name"},{default:n(()=>[i(c(l.name||"--"),1)]),_:2},1024),o(y,{"md-label":"Date prévue","md-sort-by":"startDate"},{default:n(()=>[i(c(e.$dateFormat(l.startDate,"--")),1)]),_:2},1024),o(y,{"md-label":"Nb de joueurs prévus","md-sort-by":"participantNumber"},{default:n(()=>[i(c(l.participantNumber||(l.participantNumber===0?l.participantNumber:"--")),1)]),_:2},1024),o(y,{"md-label":"Lieu","md-sort-by":e.$has(l,"type.places.length")?"placeType.name":"placeLibelle"},{default:n(()=>[e.$has(l,"type.places.length")?(s(),u(g,{key:0},[i(c(e.$prop(l,"placeType.name")),1)],64)):(s(),u(g,{key:1},[i(c(l.placeLibelle||"--"),1)],64))]),_:2},1032,["md-sort-by"]),o(y,{"md-label":"Responsable","md-sort-by":"contact.familyName"},{default:n(()=>[l.contact?(s(),u(g,{key:0},[i(c(e.$fullname(l.contact)),1),t[12]||(t[12]=k("br",null,null,-1)),o(r,{value:l.contact.email},{default:n(()=>[...t[10]||(t[10]=[i("Email:",-1)])]),_:1},8,["value"]),t[13]||(t[13]=k("br",null,null,-1)),o(h,{value:l.contact.telephone},{default:n(()=>[...t[11]||(t[11]=[i("Tél:",-1)])]),_:1},8,["value"])],64)):(s(),u(g,{key:1},[i("--")],64))]),_:2},1024),o(y,{"md-label":"Actions"},{default:n(()=>[o(B,null,{default:n(()=>[o(b,{class:"md-icon-button md-mini",onClick:f(I=>e.openShowDialog(I,l),["prevent","stop"])},{default:n(()=>[o(P,{"md-direction":"top"},{default:n(()=>[...t[14]||(t[14]=[i("Voir les détails",-1)])]),_:1}),o(E,null,{default:n(()=>[...t[15]||(t[15]=[i("assignment",-1)])]),_:1})]),_:1},8,["onClick"]),e.canManage(l)?(s(),u(g,{key:0},[e.hasSpecificRight("canUpdateClubEvents",1)?(s(),p(b,{key:0,class:"md-icon-button md-mini",onClick:f(I=>e.openUpdateDialog(l),["prevent","stop"])},{default:n(()=>[o(P,{"md-direction":"top"},{default:n(()=>[...t[16]||(t[16]=[i("Modifier",-1)])]),_:1}),o(E,null,{default:n(()=>[...t[17]||(t[17]=[i("edit",-1)])]),_:1})]),_:1},8,["onClick"])):m("",!0),e.hasSpecificRight("canUpdateClubEvents",1)?(s(),p(b,{key:1,class:"md-icon-button md-mini",onClick:f(I=>e.doOpenCreateParticipationDialog(l),["prevent","stop"])},{default:n(()=>[o(P,{"md-direction":"top"},{default:n(()=>[...t[18]||(t[18]=[i("Ajouter un participant",-1)])]),_:1}),o(E,null,{default:n(()=>[...t[19]||(t[19]=[i("person_add",-1)])]),_:1})]),_:1},8,["onClick"])):m("",!0),e.hasSpecificRight("canDeleteClubEvents",1)?(s(),p(b,{key:2,class:"md-icon-button md-mini",onClick:f(I=>e.openDeleteDialog(l),["prevent","stop"])},{default:n(()=>[o(P,{"md-direction":"top"},{default:n(()=>[...t[20]||(t[20]=[i("Supprimer",-1)])]),_:1}),o(E,null,{default:n(()=>[...t[21]||(t[21]=[i("delete",-1)])]),_:1})]),_:1},8,["onClick"])):m("",!0)],64)):m("",!0)]),_:2},1024)]),_:2},1024)]),_:1},8,["items","onRowClick"])]),_:2},1032,["title"]))),128)):(s(),p(v,{key:4},{default:n(()=>[...t[9]||(t[9]=[k("div",{class:"no-data noDataCompact"},"Aucun évènement",-1)])]),_:1})),o(U,{show:e.createDialogOpened,"onUpdate:show":t[0]||(t[0]=d=>e.createDialogOpened=d),title:"Créer un évènement",formPath:"club-event",formName:"form",formProps:{club:e.clubItem,minimal:!0},mapping:e.createMapping,errors:e.createViolations,loading:e.createLoading,onSubmit:e.debugCreate},null,8,["show","formProps","mapping","errors","loading","onSubmit"]),o(U,{modelValue:e.updatableItem,"onUpdate:modelValue":t[1]||(t[1]=d=>e.updatableItem=d),show:e.updateDialogOpened,"onUpdate:show":t[2]||(t[2]=d=>e.updateDialogOpened=d),title:"Modifier un évènement",formPath:"club-event",mapping:e.updateMapping,errors:e.updateViolations,loading:e.updateGlobalLoading,onSubmit:e.update},null,8,["modelValue","show","mapping","errors","loading","onSubmit"]),e.createParticipationDialogIncluded?(s(),p(q,M({key:6,show:e.createParticipationDialogOpened,"onUpdate:show":t[3]||(t[3]=d=>e.createParticipationDialogOpened=d),title:"Ajouter un participant",mapping:e.createParticipationMapping,errors:e.createParticipationViolations,loading:e.createParticipationLoading},{clubIri:e.clubIri,selectedClubEvent:e.selectedClubEvent},{onSubmit:e.createParticipation}),null,16,["show","mapping","errors","loading","onSubmit"])):m("",!0),o(R,{show:e.showDialogOpened,"onUpdate:show":t[4]||(t[4]=d=>e.showDialogOpened=d),title:"Détails d'un évènement",componentPath:"club-event",componentName:"show-dialog",item:e.item,loading:e.showLoading},null,8,["show","item","loading"]),o(A,{show:e.deleteDialogOpened,"onUpdate:show":t[5]||
16(t[5]=d=>e.deleteDialogOpened=d),title:"Supprimer un évènement",item:e.deletedItem,loading:e.updateGlobalLoading,onConfirm:e.doDelete},{default:n(()=>[e.deletedItem?(s(),u("p",ie,[t[22]||(t[22]=i(" Êtes vous sûr de vouloir supprimer l'évènement ",-1)),e.deletedItem.date?(s(),u(g,{key:0},[i(c(e.$dateFormat(e.deletedItem.date)),1)],64)):m("",!0),e.$has(e.deletedItem,"placeType.name")?(s(),u(g,{key:1},[i(' au lieu "'+c(e.$prop(e.deletedItem,"placeType.name"))+'" ',1)],64)):m("",!0),t[23]||(t[23]=i(" ? ",-1))])):m("",!0)]),_:1},8,["show","item","loading","onConfirm"])])}const me=L(oe,[["render",se]]);export{me 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.