text: (window.webpackJsonp=window.webpackJsonp||[]).push([[82],{1597:function(t,e,a){"use strict";a.r(e);var n=a(10),r=a.n(n),i=a(25),o=a.n(i),s=a(24),l=a.n(s),c=a(26),p=a.n(c),u=a(27),m=a.n(u),d=a(21),h=a.n(d),f=a(28),E=a.n(f),g=a(6),P=a.n(g),C=a(0),T=a.n(C),y=a(33),v=a(15),b=a(720),k=a(957),I=a(843),j=a(958),F=a(722),S=a(197),A=a.n(S),R=a(143),N=a(144),x=a(198),w=a(716),O=a(959),_=a(99),D=Object(y.b)(null,(function(t){return{setParticipantsProjectSortsFilter:function(e,a){t(Object(O.a)(e,a))}}}))((function(t){var e=function(e,a){t.setParticipantsProjectSortsFilter(e,a),setTimeout((function(){t.refreshParticipantsProjectData()}),100)};return T.a.createElement("tr",{className:"thead-title"},T.a.createElement(_.a,{title:"",width:"2%"}),T.a.createElement(w.a,{sortColumn:"contactType",title:"Type",width:"9%",setSorts:e}),T.a.createElement(w.a,{sortColumn:"name",title:"Naam",width:"9%",setSorts:e}),T.a.createElement(w.a,{sortColumn:"address",title:"Adres",width:"9%",setSorts:e}),T.a.createElement(w.a,{sortColumn:"postalCode",title:"Postcode",width:"8%",setSorts:e}),T.a.createElement(w.a,{sortColumn:"city",title:"Plaats",width:"9%",setSorts:e}),T.a.createElement(_.a,{title:"Project",width:"8%"}),T.a.createElement(_.a,{title:"Huidig aantal deelnames",width:"9%"}),T.a.createElement(w.a,{sortColumn:"participantMutationStatusId",title:"Deelname status",width:"8%",setSorts:e}),T.a.createElement(w.a,{sortColumn:"dateRegister",title:"Eerste ingangsdatum",width:"9%",setSorts:e}),T.a.createElement(w.a,{sortColumn:"energySupplier",title:"Energie leverancier",width:"9%",setSorts:e}),T.a.createElement("th",{width:"5%"}))})),L=a(8),M=a.n(L),J=a(719),U=Object(y.b)((function(t){return{filters:t.participantsProject.filters,contactTypes:t.systemData.contactTypes,contactStatuses:t.systemData.contactStatuses,participantMutationStatuses:t.systemData.participantMutationStatuses,energySuppliers:t.systemData.energySuppliers}}),(function(t){return Object(v.b)({clearFilterParticipantsProject:I.a,setFilterParticipantProjectAddress:I.c,setFilterParticipantProjectCity:I.e,setFilterParticipantProjectContactType:I.f,setFilterParticipantProjectParticipationsDefinitive:I.k,setFilterParticipantProjectDateRegister:I.g,setFilterParticipantProjectEnergySupplierId:I.h,setFilterParticipantProjectName:I.j,setFilterParticipantMutationStatusId:I.b,setFilterParticipantProjectPostalCode:I.l,setFilterProjectId:I.m},t)}))((function(t){return T.a.createElement("tr",{className:"thead-filter"},T.a.createElement("th",null,t.showCheckboxList&&t.checkedAll&&T.a.createElement("input",{type:"checkbox",onChange:t.toggleCheckedAll,checked:!0}),t.showCheckboxList&&!t.checkedAll&&T.a.createElement("input",{type:"checkbox",onChange:t.toggleCheckedAll})),T.a.createElement("th",null,t.showCheckboxList?null:T.a.createElement("select",{className:"form-control input-sm",value:t.filters.contactType.data,onChange:function(e){t.setFilterParticipantProjectContactType(e.target.value),setTimeout((function(){t.onSubmitFilter()}),100)}},T.a.createElement("option",null),t.contactTypes.map((function(t){return T.a.createElement("option",{key:t.id,value:t.id},t.name)})))),T.a.createElement("th",null,t.showCheckboxList?null:T.a.createElement("input",{type:"text",className:"form-control input-sm",value:t.filters.name.data,onChange:function(e){t.setFilterParticipantProjectName(e.target.value)}})),T.a.createElement("th",null,t.showCheckboxList?null:T.a.createElement("input",{type:"text",className:"form-control input-sm",value:t.filters.address.data,onChange:function(e){t.setFilterParticipantProjectAddress(e.target.value)}})),T.a.createElement("th",null,t.showCheckboxList?null:T.a.createElement("input",{type:"text",className:"form-control input-sm",value:t.filters.postalCode.data,onChange:function(e){t.setFilterParticipantProjectPostalCode(e.target.value)}})),T.a.createElement("th",null,t.showCheckboxList?null:T.a.createElement("input",{type:"text",className:"form-control input-sm",value:t.filters.city.data,onChange:function(e){t.setFilterParticipantProjectCity(e.target.value)}})),T.a.createElement("th",null,t.showCheckboxList?null:T.a.createElement("select",{className:"form-control input-sm",value:t.filters.projectId.data,onChange:function(e){t.setFilterProjectId(e.target.value),setTimeout((function(){t.onSubmitFilter()}),100)}},T.a.createElement("option",null),t.projects.map((function(t){return T.a.createElement("option",{key:t.id,value:t.id},t.name)})))),T.a.createElement("th",null,t.showCheckboxList?null:T.a.createElement("input",{type:"text",className:"form-control input-sm",value:t.filters.participationsDefinitive.data,onChange:function(e){t.setFilterParticipantProjectParticipationsDefinitive(e.target.value)}})),T.a.createElement("th",null,t.showCheckboxList?null:T.a.createElement("select",{className:"form-control input-sm",value:t.filters.participantMutationStatusId.data,onChange:function(e){t.setFilterParticipantMutationStatusId(e.target.value),setTimeout((function(){t.onSubmitFilter()}),100)}},T.a.createElement("option",null),t.participantMutationStatuses.map((function(t){return T.a.createElement("option",{key:t.id,value:t.id},t.name)})))),t.showCheckboxList?T.a.createElement("th",null):T.a.createElement(J.a,{value:t.filters.dateRegister.data&&t.filters.dateRegister.data,onChangeAction:function(e){void 0===e?t.setFilterParticipantProjectDateRegister(""):t.setFilterParticipantProjectDateRegister(M()(e).format("Y-MM-DD"))}}),T.a.createElement("th",null,t.showCheckboxList?null:T.a.createElement("select",{className:"form-control input-sm",value:t.filters.energySupplierId.data,onChange:function(e){t.setFilterParticipantProjectEnergySupplierId(e.target.value),setTimeout((function(){t.onSubmitFilter()}),100)}},T.a.createElement("option",null),t.energySuppliers.map((function(t){return T.a.createElement("option",{key:t.id,value:t.id},t.name)})))),T.a.createElement("th",null))})),V=a(4),G=a(688),q=a.n(G);M.a.locale("nl");var B=function(t){function e(t){var a;return o()(this,e),(a=p()(this,m()(e).call(this,t))).state={showActionButtons:!1,highlightRow:""},a}return E()(e,t),l()(e,[{key:"onRowEnter",value:function(){this.setState({showActionButtons:!0,highlightRow:"highlight-row"})}},{key:"onRowLeave",value:function(){this.setState({showActionButtons:!1,highlightRow:""})}},{key:"openItem",value:function(t){V.f.push("/project/deelnemer/".concat(t))}},{key:"render",value:function(){var t=this,e=this.props,a=e.id,n=e.contact,r=e.participationsDefinitive,i=e.uniqueMutationStatuses,o=e.dateRegister,s=e.project,l=n.primaryAddress,c="",p="",u="";l&&(l.street&&(c=l.street),l.number&&(p=l.number),l.addition&&(u=l.addition));var m=!(n.primaryEmailAddress&&n.primaryEmailAddress.email&&!q.a.isEmpty(n.primaryEmailAddress.email)),d=m?"Primair e-mailadres bij contact ontbreekt.":"",h=m?this.state.highlightRow+" missing-data-row":this.state.highlightRow;return T.a.createElement("tr",{title:d,className:h,onDoubleClick:function(){return t.openItem(a)},onMouseEnter:function(){return t.onRowEnter()},onMouseLeave:function(){return t.onRowLeave()}},T.a.createElement("td",null,this.props.showCheckboxList?T.a.createElement("input",{type:"checkbox",name:a,onChange:this.props.toggleParticipantCheck,checked:!!this.props.participantIds&&this.props.participantIds.includes(a)}):null),T.a.createElement("td",null,n.type?n.type.name:""),T.a.createElement("td",null,n.fullName),T.a.createElement("td",null,l?c+" "+p+u:""),T.a.createElement("td",null,n.primaryAddress?n.primaryAddress.postalCode:""),T.a.createElement("td",null,n.primaryAddress?n.primaryAddress.city:""),T.a.createElement("td",null,s?s.name:""),T.a.createElement("td",null,r||""),T.a.createElement("td",null,i.map((function(t){return t.name})).join(", ")),T.a.createElement("td",null,o?M()(o).format("L"):""),T.a.createElement("td",null,n.primaryContactEnergySupplier?n.primaryContactEnergySupplier.energySupplier.name:""),T.a.createElement("td",null,this.state.showActionButtons?T.a.createElement("a",{role:"button",onClick:function(){return t.openItem(a)}},T.a.createElement("span",{className:"glyphicon glyphicon-pencil mybtn-success"})," "):""))}}]),e}(C.Component),Y=a(706),z=function(t){function e(t){var a;return o()(this,e),a=p()(this,m()(e).call(this,t)),P()(h()(a),"handleKeyUp",(function(t){13===t.keyCode&&a.props.onSubmitFilter()})),a}return E()(e,t),l()(e,[{key:"render",value:function(){var t=this,e=this.props.participantsProject,a=e.data,n=void 0===a?[]:a,r=e.meta,i=void 0===r?{}:r,o="",s=!0;return this.props.hasError?o="Fout bij het ophalen van deelnemers.":this.props.isLoading?o="Gegevens aan het laden.":0===n.length?o="Geen deelnemers gevonden!":s=!1,T.a.createElement("form",{onKeyUp:this.handleKeyUp},T.a.createElement(R.a,null,T.a.createElement(N.a,null,T.a.createElement(D,{refreshParticipantsProjectData:function(){return t.props.refreshParticipantsProjectData()}}),T.a.createElement(U,{onSubmitFilter:this.props.onSubmitFilter,toggleCheckedAll:this.props.toggleCheckedAll,showCheckboxList:this.props.showCheckboxList,checkedAll:this.props.checkedAll,projects:this.props.projects})),T.a.createElement(x.a,null,s?T.a.createElement("tr",null,T.a.createElement("td",{colSpan:11},o)):n.map((function(e){return T.a.createElement(B,A()({key:e.id,showCheckboxList:t.props.showCheckboxList,checkedAll:t.props.checkedAll,toggleParticipantCheck:t.props.toggleParticipantCheck,participantIds:t.props.participantIds},e))})))),T.a.createElement("div",{className:"col-md-4 col-md-offset-4"},T.a.createElement(Y.a,{recordsPerPage:20,onPageChangeAction:this.props.handlePageClick,totalRecords:i.total,initialPage:this.props.participantsProjectPagination.page})))}}]),e}(C.Component),H=Object(y.b)((function(t){return{isLoading:t.loadingData.isLoading,hasError:t.loadingData.hasError}}))(z),W=a(684),K=a(683),Z=Object(y.b)((function(t){return{participantsProject:t.participantsProject.list,permissions:t.meDetails.permissions}}),null)((function(t){var e=t.participantsProject.meta,a=void 0===e?{}:e;return T.a.createElement("div",{className:"row"},T.a.createElement("div",{className:"col-md-2"},T.a.createElement("div",{className:"btn-group btn-group-flex",role:"group"},T.a.createElement(W.a,{iconName:"glyphicon-refresh",onClickAction:t.resetParticipantProjectFilters}),T.a.createElement(W.a,{iconName:"glyphicon-download-alt",onClickAction:t.getExcel}),T.a.createElement(K.a,{buttonText:"Rapportage",onClickAction:t.toggleShowCheckboxList}))),T.a.createElement("div",{className:"col-md-8"},T.a.createElement("h4",{className:"text-center table-title"},"Deelnemers project")),T.a.createElement("div",{className:"col-md-2"},T.a.createElement("div",{className:"pull-right"},"Resultaten: ",a.total||0)))})),Q=a(715),X=a(681),$=a(682),tt=a(101),et=a(102),at=a(98),nt=a(685),rt=a(687),it=a(686),ot=a(205),st=a(705),lt=a.n(st),ct=a(2),pt=a.n(ct),ut=a(980),mt=a(203),dt=a(100);function ht(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function ft(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?ht(Object(a),!0).forEach((function(e){P()(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):ht(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}var Et=function(t){function e(t){var a;return o()(this,e),(a=p()(this,m()(e).call(this,t))).state={filterType:t.filterType,amountOfFilters:t.amountOfFilters,filters:t.extraFilters,yesNoOptions:[{id:1,name:"Ja"},{id:0,name:"Nee"}],projects:[],contacts:[]},a.closeModal=a.closeModal.bind(h()(a)),a.confirmAction=a.confirmAction.bind(h()(a)),a.handleFilterFieldChange=a.handleFilterFieldChange.bind(h()(a)),a.handleFilterTypeChange=a.handleFilterTypeChange.bind(h()(a)),a.handleFilterValueChange=a.handleFilterValueChange.bind(h()(a)),a.addFilterRow=a.addFilterRow.bind(h()(a)),a.deleteFilterRow=a.deleteFilterRow.bind(h()(a)),a}return E()(e,t),l()(e,[{key:"componentDidMount",value:function(){var t=this;pt.a.all([mt.a.peekProjects(),dt.a.getContactsPeek()]).then(pt.a.spread((function(e,a){t.setState({projects:e,contacts:a})})))}},{key:"closeModal",value:function(){this.props.toggleShowExtraFilters()}},{key:"confirmAction",value:function(){this.props.handleExtraFiltersChange(this.state.filters,this.state.amountOfFilters,this.state.filterType)}},{key:"handleFilterFieldChange",value:function(t,e){var a=this.state.filters;a[e].field=t,a[e].data="",this.setState(ft({},this.state,{filters:a}))}},{key:"handleFilterTypeChange",value:function(t){this.setState(ft({},this.state,{filterType:t}))}},{key:"handleFilterValueChange",value:function(t,e,a){var n=this.state.filters;n[a][t]=e,this.setState(ft({},this.state,{filters:n}))}},{key:"addFilterRow",value:function(){var t=this,e=this.state.filters;e[this.state.amountOfFilters]={field:"name",type:"eq",data:""},setTimeout((function(){t.setState(ft({},t.state,{filters:e}))}),300),setTimeout((function(){t.setState({amountOfFilters:t.state.amountOfFilters+1})}),300)}},{key:"deleteFilterRow",value:function(t){var e=this.state.filters;e.splice(t,1),this.setState(ft({},this.state,{filters:e,amountOfFilters:e.length}))}},{key:"render",value:function(){var t=this,e={name:{name:"Naam",type:"string"},postalCode:{name:"Postcode",type:"string"},postalCodeNumber:{name:"Postcode nummer",type:"number"},amountDefinitive:{name:"Huidig aantal lening",type:"number"},participationsDefinitive:{name:"Huidig aantal deelnames",type:"number"},dateRegister:{name:"Datum inschrijving",type:"date"},datePayed:{name:"Datum betaald",type:"date"},participationStatusId:{name:"Deelnames status",type:"dropdown",dropDownOptions:this.props.participantMutationStatuses},contactBirthday:{name:"Contact geboortedatum",type:"date"},projectId:{name:"Project",type:"dropdownHas",dropDownOptions:this.state.projects},dateContractSend:{name:"Datum contract verzonden",type:"date"},dateContractRetour:{name:"Datum contract retour",type:"date"},dateEnd:{name:"Einddatum",type:"date"},giftedByContactId:{name:"Geschonken door",type:"dropdown",dropDownOptions:this.state.contacts,optionName:"fullName"},participationsSold:{name:"Deelnames overgedragen",type:"number"},didAcceptAgreement:{name:"Akkoord voorwaarden",type:"dropdown",dropDownOptions:this.state.yesNoOptions},didUnderstandInfo:{name:"Projectinfo begrepen",type:"dropdown",dropDownOptions:this.state.yesNoOptions},participationsRequested:{name:"Deelnames aangevraagd",type:"number"}};return T.a.createElement(at.a,{title:"Extra filters",buttonConfirmText:"Toepassen",confirmAction:this.confirmAction,closeModal:this.closeModal,buttonCancelText:"Sluiten",extraButtonLabel:"Maak groep",extraButtonClass:"btn-success",extraButtonAction:this.props.saveAsGroup},T.a.createElement("div",{className:"row filter-row"},T.a.createElement("h5",null,T.a.createElement("div",{className:"col-xs-6"},T.a.createElement("input",{onChange:function(){return t.handleFilterTypeChange("and")},type:"radio",name:"type",value:"and",id:"and",checked:"and"===this.state.filterType}),T.a.createElement("label",{htmlFor:"and"},'Alle extra filters zijn "EN"')),T.a.createElement("div",{className:"col-xs-6"},T.a.createElement("input",{onChange:function(){return t.handleFilterTypeChange("or")},type:"radio",name:"type",value:"or",id:"or",checked:"or"===this.state.filterType}),T.a.createElement("label",{htmlFor:"or"},'Alle extra filters zijn "OF"')))),T.a.createElement("table",{className:"table"},T.a.createElement("thead",null,T.a.createElement("tr",null,T.a.createElement("th",{className:"col-md-4"},"Zoekveld"),T.a.createElement("th",{className:"col-md-3"}),T.a.createElement("th",{className:"col-md-4"},"Waarde"),T.a.createElement("th",{className:"col-md-1"}))),T.a.createElement("tbody",null,0===this.state.filters.length?T.a.createElement("tr",null,T.a.createElement("td",{colSpan:4},"Geen filters gezet.")):this.state.filters.map((function(a,n){return T.a.createElement(ut.a,{key:n,filter:a,filterNumber:n,fields:e,handleFilterFieldChange:t.handleFilterFieldChange,deleteFilterRow:t.deleteFilterRow,handleFilterValueChange:t.handleFilterValueChange})})))),T.a.createElement("div",{className:"row"},T.a.createElement("div",{className:"col-xs-12 text-right"},T.a.createElement(K.a,{buttonText:"Extra filter",onClickAction:this.addFilterRow}))))}}]),e}(C.Component),gt=Object(y.b)((function(t){return{participantMutationStatuses:t.systemData.participantMutationStatuses,contactStatuses:t.systemData.contactStatuses}}))(Et),Pt=function(t){function e(t){var a;return o()(this,e),a=p()(this,m()(e).call(this,t)),P()(h()(a),"fetchParticipantsProjectData",(function(){setTimeout((function(){var t=a.state.extraFilters,e=Object(Q.a)(a.props.participantsProjectFilters),n=a.props.participantsProjectSorts,r={limit:20,offset:a.props.participantsProjectPagination.offset},i=a.state.filterType;a.props.fetchParticipantsProject(e,t,n,r,i,!1)}),100)})),P()(h()(a),"resetParticipantProjectFilters",(function(){a.props.clearFilterParticipantsProject(),a.setState({filterType:"and",amountOfFilters:0,extraFilters:[]}),a.fetchParticipantsProjectData()})),P()(h()(a),"toggleShowCheckboxList",(function(){a.state.showCheckboxList?a.setState({showCheckboxList:!1,participantIds:[]}):a.setState({showCheckboxList:!0,participantIds:a.props.participantsProject.meta.participantIdsTotal,checkedAll:!0})})),P()(h()(a),"toggleModal",(function(){a.setState({showModal:!a.state.showModal})})),P()(h()(a),"toggleCheckedAll",(function(){var t=event.target.checked,e=[];t&&(e=a.props.participantsProject.meta.participantIdsTotal),a.setState({participantIds:e,checkedAll:t})})),P()(h()(a),"toggleParticipantCheck",(function(t){var e=t.target.checked,n=Number(t.target.name);e?a.setState({participantIds:[].concat(r()(a.state.participantIds),[n])},a.checkAllParticipantsAreChecked):a.setState({participantIds:a.state.participantIds.filter((function(t){return t!==n})),checkedAll:!1})})),P()(h()(a),"checkParticipantReport",(function(){var t=!1;q.a.isEmpty(a.state.templateId)?(t=!0,a.setState({templateIdError:!0})):a.setState({templateIdError:!1}),q.a.isEmpty(a.state.emailTemplateId)?(t=!0,a.setState({emailTemplateIdError:!0})):a.setState({emailTemplateIdError:!1}),a.state.participantIds.length>0&&!t?(a.props.previewParticipantReport({templateId:a.state.templateId,emailTemplateId:a.state.emailTemplateId,subject:a.state.subject,participantIds:a.state.participantIds}),V.f.push("/project/preview-rapportage")):t||a.setState({showModal:!0,modalText:"Er zijn geen deelnemers geselecteerd.",buttonConfirmText:"Voeg deelnemers toe"})})),P()(h()(a),"getExcel",(function(){a.props.blockUI();for(var t=Math.ceil(a.props.participantsProject.meta.total/1e3),e=a.props.participantsProject.meta.total>1e3,n=1,r=1;r<=t;r++){var i={limit:1e3,offset:1e3*r-1e3},o=Object(Q.a)(a.props.participantsProjectFilters),s=a.state.extraFilters,l=a.props.participantsProjectSorts;ot.a.getExcel(o,s,l,i).then((function(r){if(i="Deelnemers-".concat(M()().format("YYYY-MM-DD HH:mm:ss"),".xlsx"),e)var i="Deelnemers-".concat(M()().format("YYYY-MM-DD HH:mm:ss")," (").concat(n," van ").concat(t,").xlsx");lt()(r.data,i),n+=1,a.props.unblockUI()})).catch((function(t){a.props.unblockUI()}))}})),P()(h()(a),"saveAsGroup",(function(){var t=a.state.extraFilters,e=Object(Q.a)(a.props.participantsProjectFilters),n=a.state.filterType;ot.a.saveAsGroup({filters:e,extraFilters:t,filterType:n,saveFromProject:!1}).then((function(t){V.f.push("/contact-groep/".concat(t.data.data.id,"/edit"))}))})),a.state={participantIds:[],templateId:"",templateIdError:!1,templates:[],emailTemplateId:"",emailTemplateIdError:!1,emailTemplates:[],subject:[],documentGroup:"",checkedAll:!1,showCheckboxList:!1,showModal:!1,modalText:"",buttonConfirmText:"",readyForCreation:!1,showExtraFilters:!1,filterType:"and",amountOfFilters:0,extraFilters:[],projects:[]},a.handleInputChange=a.handleInputChange.bind(h()(a)),a.handleExtraFiltersChange=a.handleExtraFiltersChange.bind(h()(a)),a.toggleParticipantCheck=a.toggleParticipantCheck.bind(h()(a)),a.handleEmailTemplateChange=a.handleEmailTemplateChange.bind(h()(a)),a.handleSubjectChange=a.handleSubjectChange.bind(h()(a)),a.handlePageClick=a.handlePageClick.bind(h()(a)),a.toggleShowExtraFilters=a.toggleShowExtraFilters.bind(h()(a)),a}return E()(e,t),l()(e,[{key:"componentDidMount",value:function(){var t=this;this.fetchParticipantsProjectData(),et.a.fetchDocumentTemplatesPeekGeneral().then((function(e){var a=[];e.forEach((function(t){"participation"!=t.group&&"revenue"!=t.group||a.push({id:t.id,name:t.name})})),t.setState({templates:a})})),tt.a.fetchEmailTemplatesPeek().then((function(e){t.setState({emailTemplates:e})})),pt.a.all([mt.a.peekProjects(),dt.a.getContactsPeek()]).then(pt.a.spread((function(e,a){t.setState({projects:e,contacts:a})})))}},{key:"componentWillUnmount",value:function(){this.props.clearParticipantsProject()}},{key:"onSubmitFilter",value:function(){var t=this;this.props.setParticipantsProjectPagination({page:0,offset:0}),setTimeout((function(){t.fetchParticipantsProjectData()}),100)}},{key:"handlePageClick",value:function(t){var e=this,a=t.selected,n=Math.ceil(20*a);this.props.setParticipantsProjectPagination({page:a,offset:n}),setTimeout((function(){e.fetchParticipantsProjectData()}),100)}},{key:"handleInputChange",value:function(t){var e=t.target,a="checkbox"===e.type?e.checked:e.value;this.setState({templateId:a})}},{key:"handleSubjectChange",value:function(t){var e=t.target,a="checkbox"===e.type?e.checked:e.value;this.setState({subject:a})}},{key:"handleEmailTemplateChange",value:function(t){var e=this,a=t.target,n="checkbox"===a.type?a.checked:a.value;a.name;this.setState({emailTemplateId:n}),tt.a.fetchEmailTemplateWithUser(n).then((function(t){e.setState({subject:t.subject?t.subject:e.state.subject})}))}},{key:"handleExtraFiltersChange",value:function(t,e,a){var n=this;this.setState({filterType:a,amountOfFilters:e,extraFilters:t}),this.props.setParticipantsProjectPagination({page:0,offset:0}),setTimeout((function(){n.fetchParticipantsProjectData()}),100)}},{key:"checkAllParticipantsAreChecked",value:function(){this.setState({checkedAll:this.state.participantIds.length===this.props.participantsProject.meta.participantIdsTotal.length})}},{key:"prefillExtraFilter",value:function(){this.setState({filterType:"and",amountOfFilters:1,extraFilters:[{field:"name",type:"eq",data:""}]})}},{key:"toggleShowExtraFilters",value:function(){0===this.state.extraFilters.length&&!this.state.showExtraFilters&&this.prefillExtraFilter(),this.setState({showExtraFilters:!this.state.showExtraFilters})}},{key:"render",value:function(){var t,e=this,a=0;return this.state.participantIds&&(a=this.props&&this.props.participantsProject&&this.props.participantsProject.meta&&this.props.participantsProject.meta.participantIdsTotal?this.state.participantIds.length+"/"+this.props.participantsProject.meta.participantIdsTotal.length:this.state.participantIds.length),T.a.createElement(X.a,null,T.a.createElement($.a,null,this.state.showCheckboxList?null:T.a.createElement("div",{className:"col-md-12 margin-10-top"},T.a.createElement(Z,{resetParticipantProjectFilters:function(){return e.resetParticipantProjectFilters()},toggleShowCheckboxList:this.toggleShowCheckboxList,handleExtraFiltersChange:this.handleExtraFiltersChange,toggleShowExtraFilters:this.toggleShowExtraFilters,getExcel:this.getExcel,saveAsGroup:this.saveAsGroup})),this.state.showCheckboxList?T.a.createElement(X.a,null,T.a.createElement($.a,null,T.a.createElement("div",{className:"row"},T.a.createElement("div",{className:"col-md-12"},T.a.createElement(it.a,{label:"Documentgroep",value:"Deelname / Opbrengst"}),T.a.createElement(rt.a,{label:"Document template",name:"templateId",value:this.state.templateId,options:this.state.templates,onChangeAction:this.handleInputChange,required:"required",error:this.state.templateIdError})),T.a.createElement("div",{className:"col-md-12"},T.a.createElement(rt.a,{label:"E-mail template",name:"emailTemplateId",value:this.state.emailTemplateId,options:this.state.emailTemplates,onChangeAction:this.handleEmailTemplateChange,required:"required",error:this.state.emailTemplateIdError}),T.a.createElement(nt.a,{label:"E-mail onderwerp",name:"subject",value:this.state.subject,onChangeAction:this.handleSubjectChange})),T.a.createElement("div",{className:"col-md-12"},T.a.createElement(it.a,{label:"Geselecteerde deelnemers",value:a}),T.a.createElement("div",{className:"margin-10-top pull-right btn-group",role:"group"},T.a.createElement(K.a,{buttonClassName:"btn-default",buttonText:"Annuleren",onClickAction:this.toggleShowCheckboxList}),T.a.createElement(K.a,{buttonText:"Preview rapportage",onClickAction:this.checkParticipantReport,type:"submit",value:"Submit"})))))):null,T.a.createElement("div",{className:"col-md-12 margin-10-top"},T.a.createElement(H,(t={participantsProject:this.props.participantsProject,participantsProjectPagination:this.props.participantsProjectPagination,onSubmitFilter:function(){return e.onSubmitFilter()},refreshParticipantsProjectData:function(){return e.fetchParticipantsProjectData()},handlePageClick:this.handlePageClick,showCheckboxList:this.state.showCheckboxList,toggleCheckedAll:this.toggleCheckedAll,checkedAll:this.state.checkedAll,toggleParticipantCheck:this.toggleParticipantCheck,participantIds:this.state.participantIds},P()(t,"toggleCheckedAll",this.toggleCheckedAll),P()(t,"projects",this.state.projects),t)))),this.state.showModal&&T.a.createElement(at.a,{title:"Deelnemer rapport maken",closeModal:this.toggleModal,buttonConfirmText:this.state.buttonConfirmText,confirmAction:this.createParticipantReport},this.state.modalText),this.state.showExtraFilters&&T.a.createElement(gt,{toggleShowExtraFilters:this.toggleShowExtraFilters,handleExtraFiltersChange:this.handleExtraFiltersChange,extraFilters:this.state.extraFilters,amountOfFilters:this.state.amountOfFilters,filterType:this.state.filterType,saveAsGroup:this.saveAsGroup}))}}]),e}(C.Component);e.default=Object(y.b)((function(t){return{participantsProject:t.participantsProject.list,participantsProjectFilters:t.participantsProject.filters,participantsProjectSorts:t.participantsProject.sorts,participantsProjectPagination:t.participantsProject.pagination}}),(function(t){return Object(v.b)({blockUI:F.a,unblockUI:F.b,previewParticipantReport:b.l,fetchParticipantsProject:k.b,clearParticipantsProject:k.a,setParticipantsProjectPagination:j.a,clearFilterParticipantsProject:I.a},t)}))(Pt)},681:function(t,e,a){"use strict";var n=a(0),r=a.n(n),i=a(14),o=a.n(i),s=function(t){var e=t.children,a=t.className,n=t.onMouseEnter,i=t.onMouseLeave;return r.a.createElement("div",{className:"panel panel-default ".concat(a),onMouseEnter:n,onMouseLeave:i},e)};s.defaultProps={className:"",onMouseEnter:function(){},onMouseLeave:function(){}},s.propTypes={className:o.a.string,onMouseEnter:o.a.func,onMouseLeave:o.a.func},e.a=s},682:function(t,e,a){"use strict";var n=a(0),r=a.n(n),i=a(14),o=a.n(i),s=function(t){var e=t.className,a=t.children;return r.a.createElement("div",{className:"panel-body ".concat(e)},a)};s.defaultProps={className:""},s.propTypes={className:o.a.string},e.a=s},685:function(t,e,a){"use strict";var n=a(0),r=a.n(n),i=a(14),o=a.n(i),s=function(t){var e=t.label,a=t.type,n=t.className,i=t.size,o=t.id,s=t.placeholder,l=t.name,c=t.value,p=t.onClickAction,u=t.onChangeAction,m=t.onBlurAction,d=t.required,h=t.readOnly,f=t.maxLength,E=t.error,g=t.min,P=t.max,C=t.step,T=t.errorMessage,y=t.divSize,v=t.divClassName,b=t.autoComplete;return r.a.createElement("div",{className:"form-group ".concat(y," ").concat(v)},r.a.createElement("label",{htmlFor:o,className:"col-sm-6 ".concat(d)},e),r.a.createElement("div",{className:"".concat(i)},r.a.createElement("input",{type:a,className:"form-control input-sm ".concat(n)+(E?"has-error":""),id:o,placeholder:s,name:l,value:c,onClick:p,onChange:u,onBlur:m,readOnly:h,maxLength:f,min:g,max:P,autoComplete:b,step:C})),E&&r.a.createElement("div",{className:"col-sm-offset-6 col-sm-6"},r.a.createElement("span",{className:"has-error-message"}," ",T)))};s.defaultProps={divClassName:"",className:"",size:"col-sm-6",divSize:"col-sm-6",name:"",type:"text",value:"",required:"",readOnly:!1,maxLength:null,error:!1,min:"",max:"",step:"",errorMessage:"",autoComplete:"off",onBlurAction:function(){},onClickAction:function(){},onChangeAction:function(){}},s.propTypes={label:o.a.oneOfType([o.a.string,o.a.object]).isRequired,type:o.a.string,className:o.a.string,divClassName:o.a.string,size:o.a.string,divSize:o.a.string,id:o.a.string,placeholder:o.a.string,name:o.a.string.isRequired,value:o.a.oneOfType([o.a.string,o.a.number]),onClickAction:o.a.func,onChangeAction:o.a.func,onBlurAction:o.a.func,required:o.a.string,readOnly:o.a.bool,maxLength:o.a.string,error:o.a.bool,min:o.a.string,max:o.a.string,step:o.a.string,errorMessage:o.a.string,autoComplete:o.a.string},e.a=s},686:function(t,e,a){"use strict";var n=a(0),r=a.n(n),i=a(4),o=a(14),s=a.n(o),l=function(t){var e=t.label,a=t.className,n=t.id,o=t.value,s=t.link;return s.length>0?r.a.createElement("div",{className:a},r.a.createElement("label",{htmlFor:n,className:"col-sm-6"},e),r.a.createElement("div",{className:"col-sm-6",id:n,onClick:null},r.a.createElement(i.b,{to:s,className:"link-underline"},o))):r.a.createElement("div",{className:a},r.a.createElement("label",{htmlFor:n,className:"col-sm-6"},e),r.a.createElement("div",{className:"col-sm-6",id:n},o))};l.defaultProps={className:"col-sm-6",value:"",link:""},l.propTypes={label:s.a.oneOfType([s.a.string,s.a.object]).isRequired,className:s.a.string,id:s.a.string,value:s.a.oneOfType([s.a.string,s.a.number]),link:s.a.string},e.a=l},720:function(t,e,a){"use strict";a.d(e,"h",(function(){return n})),a.d(e,"e",(function(){return r})),a.d(e,"c",(function(){return i})),a.d(e,"k",(function(){return o})),a.d(e,"n",(function(){return s})),a.d(e,"g",(function(){return l})),a.d(e,"i",(function(){return c})),a.d(e,"m",(function(){return p})),a.d(e,"j",(function(){return u})),a.d(e,"b",(function(){return m})),a.d(e,"l",(function(){return d})),a.d(e,"a",(function(){return h})),a.d(e,"d",(function(){return f})),a.d(e,"f",(function(){return E}));var n=function(t){return{type:"FETCH_PROJECT",id:t}},r=function(t){return{type:"DELETE_PROJECT",id:t}},i=function(){return{type:"CLEAR_PROJECT"}},o=function(t){return{type:"NEW_VALUE_COURSE",valueCourse:t}},s=function(t){return{type:"UPDATE_VALUE_COURSE",valueCourse:t}},l=function(t){return{type:"DELETE_VALUE_COURSE",id:t}},c=function(t){return{type:"FETCH_PROJECT_REVENUE",id:t}},p=function(t){return{type:"PROJECT_REVENUE_PREVIEW_REPORT",data:t}},u=function(t){return{type:"PROJECT_REVENUE_GET_DISTRIBUTION",data:t}},m=function(){return{type:"CLEAR_PROJECT_REVENUE_PREVIEW_REPORT"}},d=function(t){return{type:"PROJECT_PARTICIPANT_PREVIEW_REPORT",data:t}},h=function(){return{type:"CLEAR_PROJECT_PARTICIPANT_PREVIEW_REPORT"}},f=function(){return{type:"CLEAR_PROJECT_REVENUE"}},E=function(t){return{type:"DELETE_REVENUE",id:t}}},843:function(t,e,a){"use strict";a.d(e,"i",(function(){return n})),a.d(e,"f",(function(){return r})),a.d(e,"j",(function(){return i})),a.d(e,"c",(function(){return o})),a.d(e,"l",(function(){return s})),a.d(e,"e",(function(){return l})),a.d(e,"d",(function(){return c})),a.d(e,"k",(function(){return p})),a.d(e,"b",(function(){return u})),a.d(e,"g",(function(){return m})),a.d(e,"h",(function(){return d})),a.d(e,"m",(function(){return h})),a.d(e,"a",(function(){return f}));var n=function(t){return{type:"SET_FILTER_PROJECT_PARTICIPANT_ID",id:t}},r=function(t){return{type:"SET_FILTER_PARTICIPANT_PROJECT_CONTACT_TYPE",contactType:t}},i=function(t){return{type:"SET_FILTER_PARTICIPANT_PROJECT_NAME",name:t}},o=function(t){return{type:"SET_FILTER_PARTICIPANT_PROJECT_ADDRESS",address:t}},s=function(t){return{type:"SET_FILTER_PARTICIPANT_PROJECT_POSTAL_CODE",postalCode:t}},l=function(t){return{type:"SET_FILTER_PARTICIPANT_PROJECT_CITY",city:t}},c=function(t){return{type:"SET_FILTER_PARTICIPANT_PROJECT_AMOUNT_DEFINITIVE",amountDefinitive:t}},p=function(t){return{type:"SET_FILTER_PARTICIPANT_PROJECT_PARTICIPATIONS_DEFINITIVE",participationsDefinitive:t}},u=function(t){return{type:"SET_FILTER_PARTICIPANT_MUTATION_STATUS_ID",participantMutationStatusId:t}},m=function(t){return{type:"SET_FILTER_PARTICIPANT_PROJECT_DATE_REGISTER",dateRegister:t}},d=function(t){return{type:"SET_FILTER_PARTICIPANT_PROJECT_ENERGY_SUPPLIER_ID",energySupplierId:t}},h=function(t){return{type:"SET_FILTER_PARTICIPANT_PROJECT_ID",projectId:t}},f=function(){return{type:"CLEAR_FILTER_PARTICIPANTS_PROJECT"}}},957:function(t,e,a){"use strict";a.d(e,"b",(function(){return n})),a.d(e,"a",(function(){return r}));var n=function(t,e,a,n,r,i){return{type:"FETCH_PARTICIPANTS_PROJECT",filters:t,extraFilters:e,sorts:a,pagination:n,filterType:r,fetchFromProject:i}},r=function(){return{type:"CLEAR_PARTICIPANTS_PROJECT"}}},958:function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));var n=function(t){return{type:"SET_PARTICIPANTS_PROJECTS_PAGINATION",pagination:t}}},959:function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));var n=function(t,e){return{type:"SET_PARTICIPANTS_PROJECT_SORTS_FILTER",field:t,order:e}}}}]);