github.com/benoitkugler/goacve@v0.0.0-20201217100549-151ce6e55dc8/server/static/bv/js/vote_admin.61360317.js (about) 1 (function(t){function e(e){for(var n,s,o=e[0],c=e[1],u=e[2],p=0,d=[];p<o.length;p++)s=o[p],Object.prototype.hasOwnProperty.call(i,s)&&i[s]&&d.push(i[s][0]),i[s]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(t[n]=c[n]);l&&l(e);while(d.length)d.shift()();return a.push.apply(a,u||[]),r()}function r(){for(var t,e=0;e<a.length;e++){for(var r=a[e],n=!0,o=1;o<r.length;o++){var c=r[o];0!==i[c]&&(n=!1)}n&&(a.splice(e--,1),t=s(s.s=r[0]))}return t}var n={},i={vote_admin:0},a=[];function s(e){if(n[e])return n[e].exports;var r=n[e]={i:e,l:!1,exports:{}};return t[e].call(r.exports,r,r.exports,s),r.l=!0,r.exports}s.m=t,s.c=n,s.d=function(t,e,r){s.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},s.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},s.t=function(t,e){if(1&e&&(t=s(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(s.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)s.d(r,n,function(e){return t[e]}.bind(null,n));return r},s.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return s.d(e,"a",e),e},s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},s.p="/static/bv/";var o=window["webpackJsonp"]=window["webpackJsonp"]||[],c=o.push.bind(o);o.push=e,o=o.slice();for(var u=0;u<o.length;u++)e(o[u]);var l=c;a.push([8,"chunk-vendors","chunk-common"]),r()})({"7f86":function(t,e,r){"use strict";r.r(e);r("e260"),r("e6cf"),r("cca6"),r("a79d"),r("0cdd");var n=r("2b0e"),i=(r("135e"),function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("base-app",{attrs:{title:"Vote - Administration"}},[t.output?r("success",{attrs:{output:t.output}}):t._e(),t.output?r("error",{attrs:{output:t.output}}):t._e(),r("b-container",{staticClass:"my-2 mb-3 mx-auto"},[r("b-tabs",{attrs:{fill:"",pills:""}},[r("b-tab",{staticClass:"my-1 px-3",attrs:{title:"Votes"}},[r("votes")],1),r("b-tab",{staticClass:"my-1 px-3",attrs:{title:"Membres"}},[r("membres")],1)],1)],1)],1)}),a=[],s=r("d4ec"),o=r("262e"),c=r("2caf"),u=r("9ab4"),l=r("2fe1"),p=r("3b54"),d=r("c658"),v=r("9dc9"),f=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("b-card",[r("b-card-title",[r("b-row",{staticClass:"w-100",attrs:{"no-gutters":""}},[r("b-col",[t._v("Liste des membres")]),r("b-col",{staticClass:"text-right"},[r("b-button",{attrs:{variant:"accent"},on:{click:t.inviteAll}},[r("b-icon-envelope"),t._v(" Inviter tous les membres ")],1),r("b-button",{staticClass:"ml-2",attrs:{variant:"light",title:"Rafraichir les données"},on:{click:t.refresh}},[r("b-icon-arrow-repeat")],1)],1)],1)],1),r("b-overlay",{staticClass:"overflow-auto",staticStyle:{height:"60vh"},attrs:{show:t.loading}},[r("b-table-lite",{attrs:{items:t.membres,fields:t.fields,small:"",striped:""},scopedSlots:t._u([{key:"cell(lien)",fn:function(e){var n=e.item;return[r("a",{attrs:{href:n.lien,target:"_blank"}},[t._v(t._s(n.lien))])]}},{key:"cell(participation)",fn:function(e){var n=e.item;return[r("span",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.html",modifiers:{html:!0}}],attrs:{title:t.participation(n)}},[t._v(t._s(n.participation.actuels)+" / "+t._s(n.participation.total)+" ")])]}},{key:"cell(invite)",fn:function(e){var n=e.item;return[r("b-button",{attrs:{size:"sm",variant:"accent"},on:{click:function(e){return t.inviteOne(n)}}},[r("b-icon-envelope")],1)]}}])})],1)],1)},b=[],m=(r("96cf"),r("1da1")),h=r("bee2"),g=r("bc3a"),k=r.n(g),x=r("fc87"),y=Object(x["c"])()+"/api",w=function(t){Object(o["a"])(r,t);var e=Object(c["a"])(r);function r(){var t;return Object(s["a"])(this,r),t=e.apply(this,arguments),t.membres=[],t}return Object(h["a"])(r,[{key:"getMembres",value:function(){var t=Object(m["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,k.a.get(y+"/membres");case 3:return e=t.sent,this.membres=e.data,t.abrupt("return",!0);case 8:t.prev=8,t.t0=t["catch"](0),this.notifications.onAxiosError(t.t0);case 11:case"end":return t.stop()}}),t,this,[[0,8]])})));function e(){return t.apply(this,arguments)}return e}()},{key:"inviteOne",value:function(){var t=Object(m["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,k.a.put(y+"/membres",e);case 3:return t.abrupt("return",!0);case 6:t.prev=6,t.t0=t["catch"](0),this.notifications.onAxiosError(t.t0);case 9:case"end":return t.stop()}}),t,this,[[0,6]])})));function e(e){return t.apply(this,arguments)}return e}()},{key:"inviteAll",value:function(){var t=Object(m["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,k.a.post(y+"/membres");case 3:return t.abrupt("return",!0);case 6:t.prev=6,t.t0=t["catch"](0),this.notifications.onAxiosError(t.t0);case 9:case"end":return t.stop()}}),t,this,[[0,6]])})));function e(){return t.apply(this,arguments)}return e}()},{key:"getVotes",value:function(){var t=Object(m["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,k.a.get(y+"/votes");case 3:return e=t.sent,t.abrupt("return",e.data);case 7:t.prev=7,t.t0=t["catch"](0),this.notifications.onAxiosError(t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])})));function e(){return t.apply(this,arguments)}return e}()},{key:"createVote",value:function(){var t=Object(m["a"])(regeneratorRuntime.mark((function t(e){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,k.a.put(y+"/votes",e);case 3:return r=t.sent,t.abrupt("return",r.data);case 7:t.prev=7,t.t0=t["catch"](0),this.notifications.onAxiosError(t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])})));function e(e){return t.apply(this,arguments)}return e}()},{key:"updateVote",value:function(){var t=Object(m["a"])(regeneratorRuntime.mark((function t(e){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,k.a.post(y+"/votes",e);case 3:return r=t.sent,t.abrupt("return",r.data);case 7:t.prev=7,t.t0=t["catch"](0),this.notifications.onAxiosError(t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])})));function e(e){return t.apply(this,arguments)}return e}()},{key:"lockVote",value:function(){var t=Object(m["a"])(regeneratorRuntime.mark((function t(e){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,k.a.post(y+"/votes/lock",e);case 3:return r=t.sent,t.abrupt("return",r.data);case 7:t.prev=7,t.t0=t["catch"](0),this.notifications.onAxiosError(t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])})));function e(e){return t.apply(this,arguments)}return e}()},{key:"clearVote",value:function(){var t=Object(m["a"])(regeneratorRuntime.mark((function t(e){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,k.a.get(y+"/votes/clear",{params:{id:e}});case 3:return r=t.sent,t.abrupt("return",r.data);case 7:t.prev=7,t.t0=t["catch"](0),this.notifications.onAxiosError(t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])})));function e(e){return t.apply(this,arguments)}return e}()},{key:"deleteVote",value:function(){var t=Object(m["a"])(regeneratorRuntime.mark((function t(e){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,k.a.delete(y+"/votes",{params:{id:e}});case 3:return r=t.sent,t.abrupt("return",r.data);case 7:t.prev=7,t.t0=t["catch"](0),this.notifications.onAxiosError(t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])})));function e(e){return t.apply(this,arguments)}return e}()},{key:"exportVotes",value:function(){var t=Object(m["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,k.a.get(y+"/votes/export");case 3:return e=t.sent,t.abrupt("return",e.data);case 7:t.prev=7,t.t0=t["catch"](0),this.notifications.onAxiosError(t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])})));function e(){return t.apply(this,arguments)}return e}()}]),r}(x["a"]),_=new w,O=r("da10"),j=n["default"].extend({props:{}}),C=function(t){Object(o["a"])(r,t);var e=Object(c["a"])(r);function r(){var t;return Object(s["a"])(this,r),t=e.apply(this,arguments),t.loading=!1,t.fields=[{key:"nom_prenom",label:"Membre"},{key:"mail",label:"Adresse mail"},{key:"lien",label:"Lien de vote"},{key:"participation",label:"Participation",tdClass:"text-center"},{key:"invite",label:"Inviter"}],t.C=_,t}return Object(h["a"])(r,[{key:"created",value:function(){this.refresh()}},{key:"refresh",value:function(){var t=Object(m["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.loading=!0,t.next=3,_.getMembres();case 3:if(e=t.sent,this.loading=!1,void 0!=e){t.next=7;break}return t.abrupt("return");case 7:_.notifications.success={title:"Membres",message:"Liste des membres chargées."};case 8:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"participation",value:function(t){return Object(O["o"])(t.participation.last)?"":"dernier vote le <b>".concat(Object(O["h"])(t.participation.last),"</b>")}},{key:"inviteOne",value:function(){var t=Object(m["a"])(regeneratorRuntime.mark((function t(e){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.loading=!0,t.next=3,_.inviteOne(e);case 3:if(r=t.sent,this.loading=!1,void 0!==r){t.next=7;break}return t.abrupt("return");case 7:_.notifications.success={title:"Mail",message:"Mail d'invitation envoyé avec succés."};case 8:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"inviteAll",value:function(){var t=this;this.$bvModal.msgBoxConfirm("Confirmez-vous l'envoi des mails ?",{title:"Envois",cancelTitle:"Retour"}).then((function(e){e&&t.doInviteAll()}))}},{key:"doInviteAll",value:function(){var t=Object(m["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.loading=!0,t.next=3,_.inviteAll();case 3:if(e=t.sent,this.loading=!1,void 0!==e){t.next=7;break}return t.abrupt("return");case 7:_.notifications.success={title:"Mails",message:"Tous les mails ont étés envoyés."};case 8:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"membres",get:function(){return _.membres}}]),r}(j);C=u["a"]([Object(l["b"])({})],C);var R=C,V=R,M=r("2877"),A=Object(M["a"])(V,f,b,!1,null,"11993210",null),E=A.exports,S=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("b-overlay",{attrs:{show:t.loading}},[r("b-card",[r("b-card-title",[r("b-row",[r("b-col",[t._v(" Votes en cours")]),r("b-col",{staticClass:"text-right"},[r("b-button",{attrs:{variant:"success"},on:{click:t.createVote}},[r("b-icon-plus"),t._v(" Ajouter un vote")],1),r("b-button",{staticClass:"ml-2",attrs:{href:t.urlExportVotes,target:"_blank",variant:"info",title:"Télécharger les votes clôturés au format PDF",disabled:t.exportDisabled}},[r("b-icon-download"),t._v(" Bilan des votes ")],1),r("b-button",{staticClass:"ml-2",attrs:{variant:"light",title:"Rafraichir les données"},on:{click:t.refresh}},[r("b-icon-arrow-repeat")],1)],1)],1)],1),t._l(t.votes,(function(e,n){return r("b-card",{key:n,staticClass:"my-1 border-secondary"},[r("b-card-text",[r("b-form",[r("b-row",[r("b-col",{attrs:{cols:"8"}},[r("b-form-group",{attrs:{label:"Nom","label-cols":"3"}},[r("b-form-input",{attrs:{required:"",disabled:!t.editModes[e.id]},model:{value:e.nom,callback:function(r){t.$set(e,"nom",r)},expression:"vote.nom"}})],1)],1),r("b-col",{staticClass:"text-right",attrs:{cols:"4"}},[!t.editModes[e.id]&&t.isVoteEditable(e)?r("b-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{size:"sm",title:"Modifier les paramètres du vote..."},on:{click:function(r){return t.editVote(e)}}},[r("b-icon-pencil"),t._v(" Editer ")],1):t.isVoteEditable(e)?r("b-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{size:"sm",title:"Enregistrer les modifications"},on:{click:function(r){return t.save(e)}}},[r("b-icon-check"),t._v(" Enregistrer ")],1):t._e(),e.participation>0&&!e.is_locked?r("b-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"ml-2",attrs:{size:"sm",variant:"danger",title:"Supprimer les suffrages déjà exprimés"},on:{click:function(r){return t.clear(e)}}},[t._v(" Remettre à zéro ")]):t._e(),r("b-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"ml-2",attrs:{size:"sm",variant:"outline-warning",title:e.is_locked?"Ré-ouvrir ce vote":"Cloturer ce vote",disabled:t.editModes[e.id]},on:{click:function(r){return t.lockVote(e)}}},[e.is_locked?r("b-icon-unlock"):r("b-icon-lock"),e.is_locked?r("b-badge",{staticClass:"ml-2",attrs:{variant:"warning"}},[t._v("Vote cloturé")]):t._e()],1),r("b-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"ml-2",attrs:{size:"sm",variant:"danger",title:"Supprimer ce vote"},on:{click:function(r){return t.deleteVote(e)}}},[r("b-icon-trash")],1)],1)],1),r("b-form-group",{attrs:{label:"Choix multiples","label-cols":"2"}},[r("b-form-checkbox",{attrs:{disabled:!t.editModes[e.id]},model:{value:e.is_qcm,callback:function(r){t.$set(e,"is_qcm",r)},expression:"vote.is_qcm"}},[t._v("Permet plusieurs choix par personne.")])],1),r("b-form-group",{attrs:{label:"Description","label-cols":"2"}},[r("b-form-textarea",{attrs:{placeholder:"Optionnel",disabled:!t.editModes[e.id]},model:{value:e.description,callback:function(r){t.$set(e,"description",r)},expression:"vote.description"}})],1),t.editModes[e.id]?r("b-form-group",{attrs:{label:"Choix possibles","label-cols":"2"}},[r("edit-candidats",{attrs:{vote:e,completion:t.completion}})],1):r("b-form-group",{attrs:{"label-cols":"2",label:"Choix possibles"}},[r("b-list-group",{staticClass:"flex-wrap",attrs:{horizontal:""}},[t._l(e.candidats||[],(function(n){return r("b-list-group-item",{key:n.id,staticClass:"border rounded py-2 px-3",staticStyle:{width:"33%"}},[r("b-row",{attrs:{"no-gutters":""}},[r("b-col",[t._v(t._s(n.label))]),r("b-col",{staticClass:"text-right",attrs:{cols:"3"}},[r("b-badge",{attrs:{variant:"info"}},[t._v(" "+t._s((e.voix||{})[n.id])+" voix ")])],1)],1)],1)})),0==(e.candidats||[]).length?r("b-list-group-item",[t._v(" Aucun choix possible. ")]):t._e()],2)],1)],1)],1)],1)}))],2)],1)},T=[],$=(r("4de4"),r("d81d"),function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("b-form-tags",{staticClass:"mb-2",attrs:{value:t.candidatsToChoix(t.vote.candidats),"duplicate-tag-text":"Ce choix est déjà présent","no-outer-focus":""},on:{input:function(e){t.vote.candidats=t.choixToCandidats(e)}},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.tags,i=e.inputAttrs,a=e.inputHandlers,s=e.tagVariant,o=e.addTag,c=e.removeTag;return[r("b-input-group",{staticClass:"mb-2"},[r("b-form-input",t._g(t._b({staticClass:"form-control",attrs:{placeholder:"Ajouter un choix...",list:t.datalistId}},"b-form-input",i,!1),a)),r("b-form-datalist",{attrs:{id:t.datalistId,options:t.completion}}),r("b-input-group-append",[r("b-button",{attrs:{variant:"primary"},on:{click:function(t){return o()}}},[t._v("Ajouter un choix")])],1)],1),r("div",{staticClass:"d-inline-block",staticStyle:{"font-size":"1.5rem"}},t._l(n,(function(e){return r("b-form-tag",{key:e,staticClass:"mr-1",attrs:{title:e,variant:s},on:{remove:function(t){return c(e)}}},[t._v(t._s(e)+" ")])})),1)]}}])})}),z=[],P=n["default"].extend({props:{vote:Object,completion:Array}}),N=function(t){Object(o["a"])(r,t);var e=Object(c["a"])(r);function r(){return Object(s["a"])(this,r),e.apply(this,arguments)}return Object(h["a"])(r,[{key:"choixToCandidats",value:function(t){return(t||[]).map((function(t){var e={id:-1,id_vote:-1,label:t};return e}))}},{key:"candidatsToChoix",value:function(t){return(t||[]).map((function(t){return t.label}))}},{key:"datalistId",get:function(){return"data-list-vote-"+this.vote.id}}]),r}(P);N=u["a"]([Object(l["b"])({})],N);var I=N,D=I,q=Object(M["a"])(D,$,z,!1,null,"411670a6",null),B=q.exports,L=n["default"].extend({props:{}}),J=function(t){Object(o["a"])(r,t);var e=Object(c["a"])(r);function r(){var t;return Object(s["a"])(this,r),t=e.apply(this,arguments),t.loading=!1,t.votes=[],t.editModes={},t.C=_,t.urlExportVotes=y+"/votes/export",t}return Object(h["a"])(r,[{key:"created",value:function(){this.refresh()}},{key:"refresh",value:function(){var t=Object(m["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.loading=!0,t.next=3,_.getVotes();case 3:if(e=t.sent,this.loading=!1,void 0!=e){t.next=7;break}return t.abrupt("return");case 7:this.votes=e||[],this.editModes={},_.notifications.success={title:"Votes",message:"Liste des votes en cours chargées."};case 10:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"createVote",value:function(){var t=Object(m["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.loading=!0,t.next=3,_.createVote({id:-1,nom:"",description:"",is_qcm:!0,is_locked:!1,candidats:[]});case 3:if(e=t.sent,this.loading=!1,void 0!=e){t.next=7;break}return t.abrupt("return");case 7:this.votes=e||[],this.editModes={},_.notifications.success={title:"Nouveau vote",message:"Vote ajouté avec succés."};case 10:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"isVoteEditable",value:function(t){return!t.is_locked&&0==t.participation}},{key:"editVote",value:function(t){this.$set(this.editModes,t.id,!0)}},{key:"save",value:function(){var t=Object(m["a"])(regeneratorRuntime.mark((function t(e){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.loading=!0,t.next=3,_.updateVote(e);case 3:if(r=t.sent,this.loading=!1,this.editModes[e.id]=!1,void 0!=r){t.next=8;break}return t.abrupt("return");case 8:this.votes=r||[],this.editModes={},_.notifications.success={title:"Vote",message:"Vote modifié avec succés."};case 11:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"lockVote",value:function(){var t=Object(m["a"])(regeneratorRuntime.mark((function t(e){var r,n,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.loading=!0,r={id_vote:e.id,is_locked:!e.is_locked},t.next=4,_.lockVote(r);case 4:if(n=t.sent,this.loading=!1,void 0!=n){t.next=8;break}return t.abrupt("return");case 8:this.votes=n||[],this.editModes={},i="Vote cloturé avec succès.",e.is_locked&&(i="Vote ouvert à nouveau."),_.notifications.success={title:"Verrou",message:i};case 13:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"doDeleteVote",value:function(){var t=Object(m["a"])(regeneratorRuntime.mark((function t(e){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.loading=!0,t.next=3,_.deleteVote(e.id);case 3:if(r=t.sent,this.loading=!1,this.editModes={},void 0!==r){t.next=8;break}return t.abrupt("return");case 8:this.votes=r||[],_.notifications.success={title:"Suppression",message:"Vote supprimé avec succés."};case 10:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"deleteVote",value:function(t){var e=this;this.$bvModal.msgBoxConfirm("Confirmer la suppression du vote",{title:"Suppression",okVariant:"danger",cancelTitle:"Retour"}).then((function(r){r&&e.doDeleteVote(t)}))}},{key:"doClear",value:function(){var t=Object(m["a"])(regeneratorRuntime.mark((function t(e){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return this.loading=!0,t.next=3,_.clearVote(e.id);case 3:if(r=t.sent,this.loading=!1,this.editModes={},void 0!==r){t.next=8;break}return t.abrupt("return");case 8:this.votes=r||[],_.notifications.success={title:"Suppression",message:"Voix supprimées avec succés."};case 10:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"clear",value:function(t){var e=this;this.$bvModal.msgBoxConfirm("Confirmer la suppression des suffrages",{title:"Suppression",okVariant:"danger",cancelTitle:"Retour"}).then((function(r){r&&e.doClear(t)}))}},{key:"completion",get:function(){return _.membres.map((function(t){return t.nom_prenom}))}},{key:"exportDisabled",get:function(){return 0==this.votes.filter((function(t){return t.is_locked})).length}}]),r}(L);J=u["a"]([Object(l["b"])({components:{EditCandidats:B}})],J);var F=J,H=F,G=Object(M["a"])(H,S,T,!1,null,"7a4813f0",null),K=G.exports,Q=function(t){Object(o["a"])(r,t);var e=Object(c["a"])(r);function r(){var t;return Object(s["a"])(this,r),t=e.apply(this,arguments),t.output=_.notifications,t}return r}(n["default"]);Q=u["a"]([Object(l["b"])({components:{BaseApp:p["a"],Success:d["a"],Error:v["a"],Membres:E,Votes:K}})],Q);var U=Q,W=U,X=Object(M["a"])(W,i,a,!1,null,null,null),Y=X.exports;n["default"].config.productionTip=!1,new n["default"]({render:function(t){return t(Y)}}).$mount("#app")},8:function(t,e,r){t.exports=r("7f86")}}); 2 //# sourceMappingURL=vote_admin.61360317.js.map