text: (window.webpackJsonp=window.webpackJsonp||[]).push([[70],{1572:function(e,t,a){"use strict";a.r(t);var n=a(25),r=a.n(n),i=a(24),l=a.n(i),o=a(26),c=a.n(o),s=a(27),p=a.n(s),u=a(28),m=a.n(u),d=a(0),h=a.n(d),E=a(33),f=a(4),g=a(682),v=a(683),b=a(685),y=a(684),P=function(e){function t(e){return r()(this,t),c()(this,p()(t).call(this,e))}return m()(t,e),l()(t,[{key:"render",value:function(){var e=this,t=this.props.project;return h.a.createElement("div",{className:"row"},h.a.createElement("div",{className:"col-sm-12"},h.a.createElement(g.a,null,h.a.createElement(v.a,{className:"panel-small"},h.a.createElement("div",{className:"col-md-2"},h.a.createElement("div",{className:"btn-group btn-group-flex  margin-small",role:"group"},h.a.createElement(b.a,{iconName:"glyphicon-arrow-left",onClickAction:f.e.goBack}),h.a.createElement(y.a,{buttonText:"Open detailformulier",onClickAction:function(){return f.f.push("/project/details/".concat(e.props.id))}}))),h.a.createElement("div",{className:"col-md-8"},h.a.createElement("h4",{className:"text-center text-success margin-small"},h.a.createElement("strong",null,"Project ",t?t.name:""))),h.a.createElement("div",{className:"col-md-2"})))))}}]),t}(d.Component),j=Object(E.b)((function(e){return{project:e.projectDetails,permissions:e.meDetails.permissions}}))(P),C=a(198),T=a(8),k=a.n(T),N=a(709),w=a(687);k.a.locale("nl");var S=Object(E.b)((function(e){return{project:e.projectDetails,projectTypes:e.systemData.projectTypes}}))((function(e){var t=e.project,a=t.name,n=t.dateStart,r=t.projectStatus,i=t.projectType,l=t.amountOfLoanNeeded,o=t.amountDefinitive,c=t.amountGranted,s=t.amountOptioned,p=t.amountInteressed,u=l-o;return h.a.createElement(g.a,null,h.a.createElement(v.a,null,h.a.createElement("div",{className:"row"},h.a.createElement(w.a,{label:"Project",value:a}),h.a.createElement(w.a,{label:"Lening interesse",value:Object(N.a)(p)})),h.a.createElement("div",{className:"row"},h.a.createElement(w.a,{label:"Type project",value:i&&i.name}),h.a.createElement(w.a,{label:"Lening ingeschreven",value:Object(N.a)(s)})),h.a.createElement("div",{className:"row"},h.a.createElement(w.a,{label:"Status",value:r&&r.name}),h.a.createElement(w.a,{label:"Lening toegekend",value:Object(N.a)(c)})),h.a.createElement("div",{className:"row"},h.a.createElement(w.a,{label:"Start project",value:n?k()(n).format("L"):""}),h.a.createElement(w.a,{label:"Lening opgehaald",value:Object(N.a)(o)})),h.a.createElement("div",{className:"row"},h.a.createElement("div",{className:"form-group col-md-6"}),h.a.createElement(w.a,{label:"Lening uit te geven",value:Object(N.a)(u)})),h.a.createElement("div",{className:"row"},h.a.createElement("div",{className:"form-group col-md-6"}),h.a.createElement(w.a,{label:"Lening nodig",value:l&&Object(N.a)(l)}))))})),I=a(10),O=a.n(I),R=a(21),A=a.n(R),F=a(6),x=a.n(F),D=a(15),L=a(721),_=a(958),M=a(847),U=a(959),J=a(723),G=a(197),V=a.n(G),B=a(144),H=a(145),q=a(199),Y=a(716),z=a(960),W=a(99),K=Object(E.b)(null,(function(e){return{setParticipantsProjectSortsFilter:function(t,a){e(Object(z.a)(t,a))}}}))((function(e){var t=e.setParticipantsProjectSortsFilter,a=e.refreshParticipantsProjectData,n=e.projectTypeRef,r=function(e,n){t(e,n),setTimeout((function(){a()}),100)};return h.a.createElement("tr",{className:"thead-title"},h.a.createElement(W.a,{title:"",width:"2%"}),h.a.createElement(Y.a,{sortColumn:"contactType",title:"Type",width:"7%",setSorts:r}),h.a.createElement(Y.a,{sortColumn:"name",title:"Naam",width:"12%",setSorts:r}),h.a.createElement(Y.a,{sortColumn:"address",title:"Adres",width:"15%",setSorts:r}),h.a.createElement(Y.a,{sortColumn:"postalCode",title:"Postcode",width:"6%",setSorts:r}),h.a.createElement(Y.a,{sortColumn:"city",title:"Plaats",width:"12%",setSorts:r}),"loan"===n?h.a.createElement(W.a,{title:"Huidig aantal lening",width:"8%"}):null,"obligation"===n?h.a.createElement(W.a,{title:"Huidig aantal obligaties",width:"8%"}):null,"capital"===n||"postalcode_link_capital"===n?h.a.createElement(W.a,{title:"Huidig aantal deelnames",width:"8%"}):null,h.a.createElement(Y.a,{sortColumn:"participantMutationStatusId",title:"Deelname status",width:"9%",setSorts:r}),h.a.createElement(Y.a,{sortColumn:"dateRegister",title:"Eerste ingangsdatum deelname",width:"10%",setSorts:r}),"postalcode_link_capital"===n?h.a.createElement(Y.a,{sortColumn:"energySupplier",title:"Energie leverancier",width:"10%",setSorts:r}):null,h.a.createElement("th",{width:"5%"}))})),Z=a(720),X=Object(E.b)((function(e){return{filters:e.participantsProject.filters,contactTypes:e.systemData.contactTypes,participantMutationStatuses:e.systemData.participantMutationStatuses,energySuppliers:e.systemData.energySuppliers}}),(function(e){return Object(D.b)({clearFilterParticipantsProject:M.a,setFilterParticipantProjectAddress:M.c,setFilterParticipantProjectCity:M.e,setFilterParticipantProjectContactType:M.f,setFilterParticipantProjectAmountDefinitive:M.d,setFilterParticipantProjectParticipationsDefinitive:M.k,setFilterParticipantProjectDateRegister:M.g,setFilterParticipantProjectEnergySupplierId:M.h,setFilterParticipantProjectId:M.i,setFilterParticipantProjectName:M.j,setFilterParticipantMutationStatusId:M.b,setFilterParticipantProjectPostalCode:M.l},e)}))((function(e){var t=[].concat(O()(e.participantMutationStatuses),[{id:"isTerminated",name:"Beëindigd"}]);return h.a.createElement("tr",{className:"thead-filter"},h.a.createElement("th",null,e.showCheckboxList&&e.checkedAll&&h.a.createElement("input",{type:"checkbox",onChange:e.toggleCheckedAll,checked:!0}),e.showCheckboxList&&!e.checkedAll&&h.a.createElement("input",{type:"checkbox",onChange:e.toggleCheckedAll})),h.a.createElement("th",null,e.showCheckboxList?null:h.a.createElement("select",{className:"form-control input-sm",value:e.filters.contactType.data,onChange:function(t){e.setFilterParticipantProjectContactType(t.target.value),setTimeout((function(){e.onSubmitFilter()}),100)}},h.a.createElement("option",null),e.contactTypes.map((function(e){return h.a.createElement("option",{key:e.id,value:e.id},e.name)})))),h.a.createElement("th",null,e.showCheckboxList?null:h.a.createElement("input",{type:"text",className:"form-control input-sm",value:e.filters.name.data,onChange:function(t){e.setFilterParticipantProjectName(t.target.value)}})),h.a.createElement("th",null,e.showCheckboxList?null:h.a.createElement("input",{type:"text",className:"form-control input-sm",value:e.filters.address.data,onChange:function(t){e.setFilterParticipantProjectAddress(t.target.value)}})),h.a.createElement("th",null,e.showCheckboxList?null:h.a.createElement("input",{type:"text",className:"form-control input-sm",value:e.filters.postalCode.data,onChange:function(t){e.setFilterParticipantProjectPostalCode(t.target.value)}})),h.a.createElement("th",null,e.showCheckboxList?null:h.a.createElement("input",{type:"text",className:"form-control input-sm",value:e.filters.city.data,onChange:function(t){e.setFilterParticipantProjectCity(t.target.value)}})),"loan"===e.projectTypeRef?h.a.createElement("th",null,e.showCheckboxList?null:h.a.createElement("input",{type:"text",className:"form-control input-sm",value:e.filters.amountDefinitive.data,onChange:function(t){e.setFilterParticipantProjectAmountDefinitive(t.target.value)}})):h.a.createElement("th",null,e.showCheckboxList?null:h.a.createElement("input",{type:"text",className:"form-control input-sm",value:e.filters.participationsDefinitive.data,onChange:function(t){e.setFilterParticipantProjectParticipationsDefinitive(t.target.value)}})),h.a.createElement("th",null,e.showCheckboxList?null:h.a.createElement("select",{className:"form-control input-sm",value:e.filters.participantMutationStatusId.data,onChange:function(t){e.setFilterParticipantMutationStatusId(t.target.value),setTimeout((function(){e.onSubmitFilter()}),100)}},h.a.createElement("option",null),t.map((function(e){return h.a.createElement("option",{key:e.id,value:e.id},e.name)})))),e.showCheckboxList?h.a.createElement("th",null):h.a.createElement(Z.a,{value:e.filters.dateRegister.data&&e.filters.dateRegister.data,onChangeAction:function(t){void 0===t?e.setFilterParticipantProjectDateRegister(""):e.setFilterParticipantProjectDateRegister(k()(t).format("Y-MM-DD"))}}),"postalcode_link_capital"===e.projectTypeRef?h.a.createElement("th",null,e.showCheckboxList?null:h.a.createElement("select",{className:"form-control input-sm",value:e.filters.energySupplierId.data,onChange:function(t){e.setFilterParticipantProjectEnergySupplierId(t.target.value),setTimeout((function(){e.onSubmitFilter()}),100)}},h.a.createElement("option",null),e.energySuppliers.map((function(e){return h.a.createElement("option",{key:e.id,value:e.id},e.name)})))):null,h.a.createElement("th",null))})),Q=a(689),$=a.n(Q);k.a.locale("nl");var ee=function(e){function t(e){var a;return r()(this,t),(a=c()(this,p()(t).call(this,e))).state={showActionButtons:!1,highlightRow:""},a}return m()(t,e),l()(t,[{key:"onRowEnter",value:function(){this.setState({showActionButtons:!0,highlightRow:"highlight-row"})}},{key:"onRowLeave",value:function(){this.setState({showActionButtons:!1,highlightRow:""})}},{key:"openItem",value:function(e){f.f.push("/project/deelnemer/".concat(e))}},{key:"render",value:function(){var e=this,t=this.props,a=t.id,n=t.contact,r=t.participationsDefinitive,i=t.amountDefinitive,l=t.uniqueMutationStatuses,o=t.dateRegister,c=n.primaryAddress,s="",p="",u="";c&&(c.street&&(s=c.street),c.number&&(p=c.number),c.addition&&(u=c.addition));var m=!(n.primaryEmailAddress&&n.primaryEmailAddress.email&&!$.a.isEmpty(n.primaryEmailAddress.email)),d=m?"Primair e-mailadres bij contact ontbreekt.":"",E=m?this.state.highlightRow+" missing-data-row":this.state.highlightRow;return h.a.createElement("tr",{title:d,className:E,onDoubleClick:function(){return e.openItem(a)},onMouseEnter:function(){return e.onRowEnter()},onMouseLeave:function(){return e.onRowLeave()}},h.a.createElement("td",null,this.props.showCheckboxList?h.a.createElement("input",{type:"checkbox",name:a,onChange:this.props.toggleParticipantCheck,checked:!!this.props.participantIds&&this.props.participantIds.includes(a)}):null),h.a.createElement("td",null,n.type?n.type.name:""),h.a.createElement("td",null,n.fullName),h.a.createElement("td",null,c?s+" "+p+u:""),h.a.createElement("td",null,n.primaryAddress?n.primaryAddress.postalCode:""),h.a.createElement("td",null,n.primaryAddress?n.primaryAddress.city:""),"loan"===this.props.projectTypeRef?h.a.createElement("td",null,i?Object(N.a)(i):""):h.a.createElement("td",null,r||""),h.a.createElement("td",null,l.map((function(e){return e.name})).join(", ")),h.a.createElement("td",null,o?k()(o).format("L"):""),"postalcode_link_capital"===this.props.projectTypeRef?h.a.createElement("td",null,n.primaryContactEnergySupplier?n.primaryContactEnergySupplier.energySupplier.name:""):null,h.a.createElement("td",null,this.state.showActionButtons?h.a.createElement("a",{role:"button",onClick:function(){return e.openItem(a)}},h.a.createElement("span",{className:"glyphicon glyphicon-pencil mybtn-success"})," "):""))}}]),t}(d.Component),te=a(707),ae=function(e){function t(e){var a;return r()(this,t),a=c()(this,p()(t).call(this,e)),x()(A()(a),"handleKeyUp",(function(e){13===e.keyCode&&a.props.onSubmitFilter()})),a}return m()(t,e),l()(t,[{key:"render",value:function(){var e=this,t=this.props.participantsProject,a=t.data,n=void 0===a?[]:a,r=t.meta,i=void 0===r?{}:r,l="",o=!0;return this.props.hasError?l="Fout bij het ophalen van deelnemers.":this.props.isLoading?l="Gegevens aan het laden.":0===n.length?l="Geen deelnemers gevonden!":o=!1,h.a.createElement("form",{onKeyUp:this.handleKeyUp},h.a.createElement(B.a,null,h.a.createElement(H.a,null,h.a.createElement(K,{refreshParticipantsProjectData:function(){return e.props.refreshParticipantsProjectData()},projectTypeRef:this.props.projectTypeRef}),h.a.createElement(X,{onSubmitFilter:this.props.onSubmitFilter,toggleCheckedAll:this.props.toggleCheckedAll,showCheckboxList:this.props.showCheckboxList,checkedAll:this.props.checkedAll,projectTypeRef:this.props.projectTypeRef})),h.a.createElement(q.a,null,o?h.a.createElement("tr",null,h.a.createElement("td",{colSpan:"postalcode_link_capital"===this.props.projectTypeRef?11:10},l)):n.map((function(t){return h.a.createElement(ee,V()({key:t.id,showCheckboxList:e.props.showCheckboxList,checkedAll:e.props.checkedAll,toggleParticipantCheck:e.props.toggleParticipantCheck,projectTypeRef:e.props.projectTypeRef,participantIds:e.props.participantIds},t))})))),h.a.createElement("div",{className:"col-md-4 col-md-offset-4"},h.a.createElement(te.a,{recordsPerPage:20,onPageChangeAction:this.props.handlePageClick,totalRecords:i.total,initialPage:this.props.participantsProjectPagination.page})))}}]),t}(d.Component),ne=Object(E.b)((function(e){return{isLoading:e.loadingData.isLoading,hasError:e.loadingData.hasError}}))(ae),re=Object(E.b)((function(e){return{participantsProject:e.participantsProject.list,project:e.projectDetails,permissions:e.meDetails.permissions}}),null)((function(e){var t=e.participantsProject.meta,a=void 0===t?{}:t;return h.a.createElement("div",{className:"row"},h.a.createElement("div",{className:"col-md-2"},h.a.createElement("div",{className:"btn-group btn-group-flex",role:"group"},h.a.createElement(b.a,{iconName:"glyphicon-refresh",onClickAction:e.resetParticipantProjectFilters}),e.permissions.manageParticipation&&h.a.createElement(b.a,{iconName:"glyphicon-plus",onClickAction:function(){return f.f.push("/project/deelnemer/nieuw/".concat(e.project.id))},disabled:"active"!==e.project.projectStatus.codeRef,title:"active"!==e.project.projectStatus.codeRef?"Deelnemer kan alleen bij status actief worden toegevoegd":"Deelnemer toevoegen"}),h.a.createElement(b.a,{iconName:"glyphicon-filter",onClickAction:e.toggleShowExtraFilters}),h.a.createElement(b.a,{iconName:"glyphicon-download-alt",onClickAction:e.getExcel}),h.a.createElement(y.a,{buttonText:"Rapportage",onClickAction:e.toggleShowCheckboxList}))),h.a.createElement("div",{className:"col-md-8"},h.a.createElement("h4",{className:"text-center table-title"},"Deelnemers project ",e.project?e.project.name:"")),h.a.createElement("div",{className:"col-md-2"},h.a.createElement("div",{className:"pull-right"},"Resultaten: ",a.total||0)))})),ie=a(717),le=a(101),oe=a(102),ce=a(98),se=a(686),pe=a(688),ue=a(206),me=a(706),de=a.n(me),he=a(981),Ee=a(2),fe=a.n(Ee),ge=a(204),ve=a(100);function be(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function ye(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?be(Object(a),!0).forEach((function(t){x()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):be(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var Pe=function(e){function t(e){var a;return r()(this,t),(a=c()(this,p()(t).call(this,e))).state={filterType:e.filterType,amountOfFilters:e.amountOfFilters,filters:e.extraFilters,yesNoOptions:[{id:1,name:"Ja"},{id:0,name:"Nee"}],projects:[],contacts:[]},a.closeModal=a.closeModal.bind(A()(a)),a.confirmAction=a.confirmAction.bind(A()(a)),a.handleFilterFieldChange=a.handleFilterFieldChange.bind(A()(a)),a.handleFilterTypeChange=a.handleFilterTypeChange.bind(A()(a)),a.handleFilterValueChange=a.handleFilterValueChange.bind(A()(a)),a.addFilterRow=a.addFilterRow.bind(A()(a)),a.deleteFilterRow=a.deleteFilterRow.bind(A()(a)),a}return m()(t,e),l()(t,[{key:"componentDidMount",value:function(){var e=this;fe.a.all([ge.a.peekProjects(),ve.a.getContactsPeek()]).then(fe.a.spread((function(t,a){e.setState({projects:t,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(e,t){var a=this.state.filters;a[t].field=e,a[t].data="",this.setState(ye({},this.state,{filters:a}))}},{key:"handleFilterTypeChange",value:function(e){this.setState(ye({},this.state,{filterType:e}))}},{key:"handleFilterValueChange",value:function(e,t,a){var n=this.state.filters;n[a][e]=t,this.setState(ye({},this.state,{filters:n}))}},{key:"addFilterRow",value:function(){var e=this,t=this.state.filters;t[this.state.amountOfFilters]={field:"name",type:"eq",data:""},setTimeout((function(){e.setState(ye({},e.state,{filters:t}))}),300),setTimeout((function(){e.setState({amountOfFilters:e.state.amountOfFilters+1})}),300)}},{key:"deleteFilterRow",value:function(e){var t=this.state.filters;t.splice(e,1),this.setState(ye({},this.state,{filters:t,amountOfFilters:t.length}))}},{key:"render",value:function(){var e=this,t={name:{name:"Naam",type:"string"},postalCode:{name:"Postcode",type:"string"},postalCodeNumber:{name:"Postcode nummer",type:"number"},contactBirthday:{name:"Contact geboortedatum",type:"date"},giftedByContactId:{name:"Geschonken door",type:"dropdown",dropDownOptions:this.state.contacts,optionName:"fullName"},didAcceptAgreement:{name:"Akkoord voorwaarden",type:"dropdown",dropDownOptions:this.state.yesNoOptions},didUnderstandInfo:{name:"Projectinfo begrepen",type:"dropdown",dropDownOptions:this.state.yesNoOptions},projectId:{name:"Project",type:"dropdownHas",dropDownOptions:this.state.projects},dateRegister:{name:"Eerste ingangsdatum deelname",type:"date"},participantMutationTypeId:{name:"Mutatie type (Mutaties)",type:"dropdown",dropDownOptions:this.props.participantMutationTypes.filter((function(t){return t.projectTypeCodeRef===e.props.projectTypeRef}))},participantMutationStatusId:{name:"Deelname status (Mutaties)",type:"dropdown",dropDownOptions:[].concat(O()(this.props.participantMutationStatuses),[{id:"isTerminated",name:"Beëindigd"}])},participantMutationDateContractRetour:{name:"Datum contract retour (Mutaties)",type:"date"},participantMutationDatePayment:{name:"Betaaldatum (Mutaties)",type:"date"}};switch(this.props.projectTypeRef){case"obligation":t.obligationsDefinitive={name:"Huidig aantal obligaties",type:"number"};break;case"capital":t.participationsDefinitive={name:"Huidig aantal participaties",type:"number"};break;case"postalcode_link_capital":t.postalcodeLinkCapitalDefinitive={name:"Huidig aantal postcoderoos",type:"number"};break;case"loan":t.payoutTypeId={name:"Uitkeren op",type:"dropdown",dropDownOptions:this.props.participantProjectPayoutTypes},t.loanDefinitive={name:"Huidig bedrag lening",type:"number"}}return h.a.createElement(ce.a,{title:"Extra filters",buttonConfirmText:"Toepassen",confirmAction:this.confirmAction,closeModal:this.closeModal,buttonCancelText:"Sluiten",extraButtonLabel:"Maak groep",extraButtonClass:"btn-success",extraButtonAction:this.props.saveAsGroup},h.a.createElement("div",{className:"row filter-row"},h.a.createElement("h5",null,h.a.createElement("div",{className:"col-xs-6"},h.a.createElement("input",{onChange:function(){return e.handleFilterTypeChange("and")},type:"radio",name:"type",value:"and",id:"and",checked:"and"===this.state.filterType}),h.a.createElement("label",{htmlFor:"and"},'Alle extra filters zijn "EN"')),h.a.createElement("div",{className:"col-xs-6"},h.a.createElement("input",{onChange:function(){return e.handleFilterTypeChange("or")},type:"radio",name:"type",value:"or",id:"or",checked:"or"===this.state.filterType}),h.a.createElement("label",{htmlFor:"or"},'Alle extra filters zijn "OF"')))),h.a.createElement("table",{className:"table"},h.a.createElement("thead",null,h.a.createElement("tr",null,h.a.createElement("th",{className:"col-md-4"},"Zoekveld"),h.a.createElement("th",{className:"col-md-3"}),h.a.createElement("th",{className:"col-md-4"},"Waarde"),h.a.createElement("th",{className:"col-md-1"}))),h.a.createElement("tbody",null,0===this.state.filters.length?h.a.createElement("tr",null,h.a.createElement("td",{colSpan:4},"Geen filters gezet.")):this.state.filters.map((function(a,n){return h.a.createElement(he.a,{key:n,filter:a,filterNumber:n,fields:t,handleFilterFieldChange:e.handleFilterFieldChange,deleteFilterRow:e.deleteFilterRow,handleFilterValueChange:e.handleFilterValueChange})})))),h.a.createElement("div",{className:"row"},h.a.createElement("div",{className:"col-xs-12 text-right"},h.a.createElement(y.a,{buttonText:"Extra filter",onClickAction:this.addFilterRow}))))}}]),t}(d.Component),je=Object(E.b)((function(e){return{participantMutationStatuses:e.systemData.participantMutationStatuses,contactStatuses:e.systemData.contactStatuses,participantMutationTypes:e.systemData.participantMutationTypes,participantProjectPayoutTypes:e.systemData.participantProjectPayoutTypes,projectTypeRef:e.projectDetails.projectType.codeRef}}))(Pe),Ce=function(e){function t(e){var a;return r()(this,t),a=c()(this,p()(t).call(this,e)),x()(A()(a),"fetchParticipantsProjectData",(function(){setTimeout((function(){var e=a.state.extraFilters,t=Object(ie.a)(a.props.participantsProjectFilters),n=a.props.participantsProjectSorts,r={limit:20,offset:a.props.participantsProjectPagination.offset},i=a.state.filterType;a.props.fetchParticipantsProject(t,e,n,r,i,!0)}),100)})),x()(A()(a),"resetParticipantProjectFilters",(function(){a.props.clearFilterParticipantsProject(),a.setState({filterType:"and",amountOfFilters:1,extraFilters:[{field:"projectId",type:"eq",data:a.props.projectId+"",readOnly:!0}]}),a.fetchParticipantsProjectData()})),x()(A()(a),"toggleShowCheckboxList",(function(){a.state.showCheckboxList?a.setState({showCheckboxList:!1,participantIds:[]}):a.setState({showCheckboxList:!0,participantIds:a.props.participantsProject.meta.participantIdsTotal,checkedAll:!0})})),x()(A()(a),"toggleModal",(function(){a.setState({showModal:!a.state.showModal})})),x()(A()(a),"toggleCheckedAll",(function(){var e=event.target.checked,t=[];e&&(t=a.props.participantsProject.meta.participantIdsTotal),a.setState({participantIds:t,checkedAll:e})})),x()(A()(a),"toggleParticipantCheck",(function(e){var t=e.target.checked,n=Number(e.target.name);t?a.setState({participantIds:[].concat(O()(a.state.participantIds),[n])},a.checkAllParticipantsAreChecked):a.setState({participantIds:a.state.participantIds.filter((function(e){return e!==n})),checkedAll:!1})})),x()(A()(a),"checkParticipantReport",(function(){var e=!1;$.a.isEmpty(a.state.templateId)?(e=!0,a.setState({templateIdError:!0})):a.setState({templateIdError:!1}),$.a.isEmpty(a.state.emailTemplateId)?(e=!0,a.setState({emailTemplateIdError:!0})):a.setState({emailTemplateIdError:!1}),a.state.participantIds.length>0&&!e?(a.props.previewParticipantReport({templateId:a.state.templateId,emailTemplateId:a.state.emailTemplateId,subject:a.state.subject,participantIds:a.state.participantIds}),f.f.push("/project/preview-rapportage")):e||a.setState({showModal:!0,modalText:"Er zijn geen deelnemers geselecteerd.",buttonConfirmText:"Voeg deelnemers toe"})})),x()(A()(a),"getExcel",(function(){a.props.blockUI();for(var e=Math.ceil(a.props.participantsProject.meta.total/1e3),t=a.props.participantsProject.meta.total>1e3,n=1,r=1;r<=e;r++){var i={limit:1e3,offset:1e3*r-1e3},l=Object(ie.a)(a.props.participantsProjectFilters),o=a.state.extraFilters,c=a.props.participantsProjectSorts;ue.a.getExcel(l,o,c,i,!0).then((function(r){if(i="Deelnemers-".concat(k()().format("YYYY-MM-DD HH:mm:ss"),".xlsx"),t)var i="Deelnemers-".concat(k()().format("YYYY-MM-DD HH:mm:ss")," (").concat(n," van ").concat(e,").xlsx");de()(r.data,i),n+=1,a.props.unblockUI()})).catch((function(e){a.props.unblockUI()}))}})),x()(A()(a),"saveAsGroup",(function(){var e=a.state.extraFilters,t=Object(ie.a)(a.props.participantsProjectFilters),n=a.state.filterType;ue.a.saveAsGroup({filters:t,extraFilters:e,filterType:n,saveFromProject:!0}).then((function(e){f.f.push("/contact-groep/".concat(e.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:1,extraFilters:[{field:"projectId",type:"eq",data:e.projectId+"",readOnly:!0}]},a.handleInputChange=a.handleInputChange.bind(A()(a)),a.handleExtraFiltersChange=a.handleExtraFiltersChange.bind(A()(a)),a.toggleParticipantCheck=a.toggleParticipantCheck.bind(A()(a)),a.handleEmailTemplateChange=a.handleEmailTemplateChange.bind(A()(a)),a.handleSubjectChange=a.handleSubjectChange.bind(A()(a)),a.handlePageClick=a.handlePageClick.bind(A()(a)),a.toggleShowExtraFilters=a.toggleShowExtraFilters.bind(A()(a)),a}return m()(t,e),l()(t,[{key:"componentDidMount",value:function(){var e=this;this.fetchParticipantsProjectData(),oe.a.fetchDocumentTemplatesPeekGeneral().then((function(t){var a=[];t.forEach((function(e){"participation"!=e.group&&"revenue"!=e.group||a.push({id:e.id,name:e.name})})),e.setState({templates:a})})),le.a.fetchEmailTemplatesPeek().then((function(t){e.setState({emailTemplates:t})}))}},{key:"componentWillUnmount",value:function(){this.props.clearParticipantsProject()}},{key:"onSubmitFilter",value:function(){var e=this;Object(ie.a)(this.props.participantsProjectFilters),this.props.participantsProjectSorts;this.props.setParticipantsProjectPagination({page:0,offset:0}),setTimeout((function(){e.fetchParticipantsProjectData()}),100)}},{key:"handlePageClick",value:function(e){var t=this,a=e.selected,n=Math.ceil(20*a);this.props.setParticipantsProjectPagination({page:a,offset:n}),setTimeout((function(){t.fetchParticipantsProjectData()}),100)}},{key:"handleInputChange",value:function(e){var t=e.target,a="checkbox"===t.type?t.checked:t.value;this.setState({templateId:a})}},{key:"handleSubjectChange",value:function(e){var t=e.target,a="checkbox"===t.type?t.checked:t.value;this.setState({subject:a})}},{key:"handleEmailTemplateChange",value:function(e){var t=this,a=e.target,n="checkbox"===a.type?a.checked:a.value;a.name;this.setState({emailTemplateId:n}),le.a.fetchEmailTemplateWithUser(n).then((function(e){t.setState({subject:e.subject?e.subject:t.state.subject})}))}},{key:"handleExtraFiltersChange",value:function(e,t,a){var n=this;this.setState({filterType:a,amountOfFilters:t,extraFilters:e}),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:"toggleShowExtraFilters",value:function(){this.setState({showExtraFilters:!this.state.showExtraFilters})}},{key:"render",value:function(){var e=this,t=0;return this.state.participantIds&&(t=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),h.a.createElement(g.a,null,h.a.createElement(v.a,null,this.state.showCheckboxList?null:h.a.createElement("div",{className:"col-md-12 margin-10-top"},h.a.createElement(re,{resetParticipantProjectFilters:function(){return e.resetParticipantProjectFilters()},toggleShowCheckboxList:this.toggleShowCheckboxList,handleExtraFiltersChange:this.handleExtraFiltersChange,toggleShowExtraFilters:this.toggleShowExtraFilters,getExcel:this.getExcel,saveAsGroup:this.saveAsGroup})),this.state.showCheckboxList?h.a.createElement(g.a,null,h.a.createElement(v.a,null,h.a.createElement("div",{className:"row"},h.a.createElement("div",{className:"col-md-12"},h.a.createElement(w.a,{label:"Documentgroep",value:"Deelname / Opbrengst"}),h.a.createElement(pe.a,{label:"Document template",name:"templateId",value:this.state.templateId,options:this.state.templates,onChangeAction:this.handleInputChange,required:"required",error:this.state.templateIdError})),h.a.createElement("div",{className:"col-md-12"},h.a.createElement(pe.a,{label:"E-mail template",name:"emailTemplateId",value:this.state.emailTemplateId,options:this.state.emailTemplates,onChangeAction:this.handleEmailTemplateChange,required:"required",error:this.state.emailTemplateIdError}),h.a.createElement(se.a,{label:"E-mail onderwerp",name:"subject",value:this.state.subject,onChangeAction:this.handleSubjectChange})),h.a.createElement("div",{className:"col-md-12"},h.a.createElement(w.a,{label:"Geselecteerde deelnemers",value:t}),h.a.createElement("div",{className:"margin-10-top pull-right btn-group",role:"group"},h.a.createElement(y.a,{buttonClassName:"btn-default",buttonText:"Annuleren",onClickAction:this.toggleShowCheckboxList}),h.a.createElement(y.a,{buttonText:"Preview rapportage",onClickAction:this.checkParticipantReport,type:"submit",value:"Submit"})))))):null,h.a.createElement("div",{className:"col-md-12 margin-10-top"},h.a.createElement(ne,{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,projectTypeRef:this.props.projectTypeRef}))),this.state.showModal&&h.a.createElement(ce.a,{title:"Deelnemer rapport maken",closeModal:this.toggleModal,buttonConfirmText:this.state.buttonConfirmText,confirmAction:this.createParticipantReport},this.state.modalText),this.state.showExtraFilters&&h.a.createElement(je,{toggleShowExtraFilters:this.toggleShowExtraFilters,handleExtraFiltersChange:this.handleExtraFiltersChange,extraFilters:this.state.extraFilters,amountOfFilters:this.state.amountOfFilters,filterType:this.state.filterType,saveAsGroup:this.saveAsGroup}))}}]),t}(d.Component),Te=Object(E.b)((function(e){return{projectId:e.projectDetails.id,projectTypeRef:e.projectDetails.projectType.codeRef,participantsProject:e.participantsProject.list,participantsProjectFilters:e.participantsProject.filters,participantsProjectSorts:e.participantsProject.sorts,participantsProjectPagination:e.participantsProject.pagination}}),(function(e){return Object(D.b)({blockUI:J.a,unblockUI:J.b,previewParticipantReport:L.l,fetchParticipantsProject:_.b,clearParticipantsProject:_.a,setParticipantsProjectPagination:U.a,clearFilterParticipantsProject:M.a},e)}))(Ce);k.a.locale("nl");var ke=Object(E.b)((function(e){return{project:e.projectDetails,projectTypes:e.systemData.projectTypes}}))((function(e){var t=e.project,a=e.projectTypes,n=t.name,r=t.dateStart,i=t.projectStatus,l=t.participationsDefinitive,o=t.participationsGranted,c=t.participationsOptioned,s=t.participationsInteressed,p=t.totalParticipations,u=t.projectTypeId,m=t.projectType,d=(a.find((function(e){return"obligation"===e.codeRef})).id,p-l);return h.a.createElement(g.a,null,h.a.createElement(v.a,null,h.a.createElement("div",{className:"row"},h.a.createElement(w.a,{label:"Project",value:n}),h.a.createElement(w.a,{label:"Obligaties interesse",value:s})),h.a.createElement("div",{className:"row"},h.a.createElement(w.a,{label:"Type project",value:m&&m.name}),h.a.createElement(w.a,{label:"Obligaties ingeschreven",value:c})),h.a.createElement("div",{className:"row"},h.a.createElement(w.a,{label:"Status",value:i&&i.name}),h.a.createElement(w.a,{label:"Obligaties toegekend",value:o})),h.a.createElement("div",{className:"row"},h.a.createElement(w.a,{label:"Start project",value:r?k()(r).format("L"):""}),h.a.createElement(w.a,{label:"Uitgegeven obligaties",value:l})),h.a.createElement("div",{className:"row"},h.a.createElement("div",{className:"form-group col-md-6"}),h.a.createElement(w.a,{label:"Uit te geven obligaties",value:d}))))}));k.a.locale("nl");var Ne=Object(E.b)((function(e){return{project:e.projectDetails}}))((function(e){var t=e.project,a=(e.projectTypes,t.name),n=t.dateStart,r=t.projectStatus,i=t.participationsDefinitive,l=t.participationsGranted,o=t.participationsOptioned,c=t.participationsInteressed,s=t.totalParticipations,p=t.projectType,u=s-i;return h.a.createElement(g.a,null,h.a.createElement(v.a,null,h.a.createElement("div",{className:"row"},h.a.createElement(w.a,{label:"Project",value:a}),h.a.createElement(w.a,{label:"Participaties interesse",value:c})),h.a.createElement("div",{className:"row"},h.a.createElement(w.a,{label:"Type project",value:p&&p.name}),h.a.createElement(w.a,{label:"Participaties ingeschreven",value:o})),h.a.createElement("div",{className:"row"},h.a.createElement(w.a,{label:"Status",value:r&&r.name}),h.a.createElement(w.a,{label:"Participaties toegekend",value:l})),h.a.createElement("div",{className:"row"},h.a.createElement(w.a,{label:"Start project",value:n?k()(n).format("L"):""}),h.a.createElement(w.a,{label:"Uitgegeven participaties",value:i})),h.a.createElement("div",{className:"row"},h.a.createElement("div",{className:"form-group col-md-6"}),h.a.createElement(w.a,{label:"Uit te geven participaties",value:u}))))}));k.a.locale("nl");var we=Object(E.b)((function(e){return{project:e.projectDetails}}))((function(e){var t=e.project,a=t.name,n=t.dateStart,r=t.projectStatus,i=t.participationsDefinitive,l=t.participationsGranted,o=t.participationsOptioned,c=t.participationsInteressed,s=t.totalParticipations,p=t.projectType,u=s-i;return h.a.createElement(g.a,null,h.a.createElement(v.a,null,h.a.createElement("div",{className:"row"},h.a.createElement(w.a,{label:"Project",value:a}),h.a.createElement(w.a,{label:"Participaties interesse",value:c})),h.a.createElement("div",{className:"row"},h.a.createElement(w.a,{label:"Type project",value:p&&p.name}),h.a.createElement(w.a,{label:"Participaties ingeschreven",value:o})),h.a.createElement("div",{className:"row"},h.a.createElement(w.a,{label:"Status",value:r&&r.name}),h.a.createElement(w.a,{label:"Participaties toegekend",value:l})),h.a.createElement("div",{className:"row"},h.a.createElement(w.a,{label:"Start project",value:n?k()(n).format("L"):""}),h.a.createElement(w.a,{label:"Uitgegeven participaties",value:i})),h.a.createElement("div",{className:"row"},h.a.createElement("div",{className:"form-group col-md-6"}),h.a.createElement(w.a,{label:"Uit te geven participaties",value:u}))))})),Se=function(e){function t(){return r()(this,t),c()(this,p()(t).apply(this,arguments))}return m()(t,e),l()(t,[{key:"renderProjectSummary",value:function(){switch(this.props.project.projectType.codeRef){case"loan":return h.a.createElement(S,null);case"obligation":return h.a.createElement(ke,null);case"capital":return h.a.createElement(Ne,null);case"postalcode_link_capital":return h.a.createElement(we,null);default:return h.a.createElement("div",null,"Geen type project gevonden.")}}},{key:"render",value:function(){return Object(C.isEmpty)(this.props.project)?h.a.createElement("div",null,"Geen gegevens gevonden."):h.a.createElement("div",null,this.renderProjectSummary(),h.a.createElement(Te,null))}}]),t}(d.Component),Ie=Object(E.b)((function(e){return{project:e.projectDetails}}))(Se),Oe=a(980),Re=function(e){function t(e){return r()(this,t),c()(this,p()(t).call(this,e))}return m()(t,e),l()(t,[{key:"componentDidMount",value:function(){this.props.fetchProject(this.props.params.id)}},{key:"componentWillUnmount",value:function(){this.props.clearProject()}},{key:"render",value:function(){return h.a.createElement("div",{className:"row"},h.a.createElement("div",{className:"col-md-9"},h.a.createElement("div",{className:"col-md-12"},h.a.createElement(j,{id:this.props.params.id})),h.a.createElement("div",{className:"col-md-12"},h.a.createElement(Ie,null))),h.a.createElement(g.a,{className:"col-md-3"},h.a.createElement(v.a,null,h.a.createElement(Oe.a,null))))}}]),t}(d.Component);t.default=Object(E.b)(null,(function(e){return{fetchProject:function(t){e(Object(L.h)(t))},clearProject:function(){e(Object(L.c)())}}}))(Re)},682:function(e,t,a){"use strict";var n=a(0),r=a.n(n),i=a(14),l=a.n(i),o=function(e){var t=e.children,a=e.className,n=e.onMouseEnter,i=e.onMouseLeave;return r.a.createElement("div",{className:"panel panel-default ".concat(a),onMouseEnter:n,onMouseLeave:i},t)};o.defaultProps={className:"",onMouseEnter:function(){},onMouseLeave:function(){}},o.propTypes={className:l.a.string,onMouseEnter:l.a.func,onMouseLeave:l.a.func},t.a=o},683:function(e,t,a){"use strict";var n=a(0),r=a.n(n),i=a(14),l=a.n(i),o=function(e){var t=e.className,a=e.children;return r.a.createElement("div",{className:"panel-body ".concat(t)},a)};o.defaultProps={className:""},o.propTypes={className:l.a.string},t.a=o},686:function(e,t,a){"use strict";var n=a(0),r=a.n(n),i=a(14),l=a.n(i),o=function(e){var t=e.label,a=e.type,n=e.className,i=e.size,l=e.id,o=e.placeholder,c=e.name,s=e.value,p=e.onClickAction,u=e.onChangeAction,m=e.onBlurAction,d=e.required,h=e.readOnly,E=e.maxLength,f=e.error,g=e.min,v=e.max,b=e.step,y=e.errorMessage,P=e.divSize,j=e.divClassName,C=e.autoComplete;return r.a.createElement("div",{className:"form-group ".concat(P," ").concat(j)},r.a.createElement("label",{htmlFor:l,className:"col-sm-6 ".concat(d)},t),r.a.createElement("div",{className:"".concat(i)},r.a.createElement("input",{type:a,className:"form-control input-sm ".concat(n)+(f?"has-error":""),id:l,placeholder:o,name:c,value:s,onClick:p,onChange:u,onBlur:m,readOnly:h,maxLength:E,min:g,max:v,autoComplete:C,step:b})),f&&r.a.createElement("div",{className:"col-sm-offset-6 col-sm-6"},r.a.createElement("span",{className:"has-error-message"}," ",y)))};o.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(){}},o.propTypes={label:l.a.oneOfType([l.a.string,l.a.object]).isRequired,type:l.a.string,className:l.a.string,divClassName:l.a.string,size:l.a.string,divSize:l.a.string,id:l.a.string,placeholder:l.a.string,name:l.a.string.isRequired,value:l.a.oneOfType([l.a.string,l.a.number]),onClickAction:l.a.func,onChangeAction:l.a.func,onBlurAction:l.a.func,required:l.a.string,readOnly:l.a.bool,maxLength:l.a.string,error:l.a.bool,min:l.a.string,max:l.a.string,step:l.a.string,errorMessage:l.a.string,autoComplete:l.a.string},t.a=o},687:function(e,t,a){"use strict";var n=a(0),r=a.n(n),i=a(4),l=a(14),o=a.n(l),c=function(e){var t=e.label,a=e.className,n=e.id,l=e.value,o=e.link,c=e.hidden;return o.length>0?r.a.createElement("div",{className:a,style:c?{display:"none"}:{}},r.a.createElement("label",{htmlFor:n,className:"col-sm-6"},t),r.a.createElement("div",{className:"col-sm-6",id:n,onClick:null},r.a.createElement(i.b,{to:o,className:"link-underline"},l))):r.a.createElement("div",{className:a,style:c?{display:"none"}:{}},r.a.createElement("label",{htmlFor:n,className:"col-sm-6"},t),r.a.createElement("div",{className:"col-sm-6",id:n},l))};c.defaultProps={className:"col-sm-6",value:"",link:"",hidden:!1},c.propTypes={label:o.a.oneOfType([o.a.string,o.a.object]).isRequired,className:o.a.string,id:o.a.string,value:o.a.oneOfType([o.a.string,o.a.number]),link:o.a.string,hidden:o.a.bool},t.a=c},709:function(e,t,a){"use strict";t.a=function(e){return e||(e=0),e=parseFloat(e),isNaN(e)?"Ongeldig bedrag":"€ ".concat(e.toLocaleString("nl",{minimumFractionDigits:2,maximumFractionDigits:2}))}},721:function(e,t,a){"use strict";a.d(t,"h",(function(){return n})),a.d(t,"e",(function(){return r})),a.d(t,"c",(function(){return i})),a.d(t,"k",(function(){return l})),a.d(t,"n",(function(){return o})),a.d(t,"g",(function(){return c})),a.d(t,"i",(function(){return s})),a.d(t,"m",(function(){return p})),a.d(t,"j",(function(){return u})),a.d(t,"b",(function(){return m})),a.d(t,"l",(function(){return d})),a.d(t,"a",(function(){return h})),a.d(t,"d",(function(){return E})),a.d(t,"f",(function(){return f}));var n=function(e){return{type:"FETCH_PROJECT",id:e}},r=function(e){return{type:"DELETE_PROJECT",id:e}},i=function(){return{type:"CLEAR_PROJECT"}},l=function(e){return{type:"NEW_VALUE_COURSE",valueCourse:e}},o=function(e){return{type:"UPDATE_VALUE_COURSE",valueCourse:e}},c=function(e){return{type:"DELETE_VALUE_COURSE",id:e}},s=function(e){return{type:"FETCH_PROJECT_REVENUE",id:e}},p=function(e){return{type:"PROJECT_REVENUE_PREVIEW_REPORT",data:e}},u=function(e){return{type:"PROJECT_REVENUE_GET_DISTRIBUTION",data:e}},m=function(){return{type:"CLEAR_PROJECT_REVENUE_PREVIEW_REPORT"}},d=function(e){return{type:"PROJECT_PARTICIPANT_PREVIEW_REPORT",data:e}},h=function(){return{type:"CLEAR_PROJECT_PARTICIPANT_PREVIEW_REPORT"}},E=function(){return{type:"CLEAR_PROJECT_REVENUE"}},f=function(e){return{type:"DELETE_REVENUE",id:e}}},847:function(e,t,a){"use strict";a.d(t,"i",(function(){return n})),a.d(t,"f",(function(){return r})),a.d(t,"j",(function(){return i})),a.d(t,"c",(function(){return l})),a.d(t,"l",(function(){return o})),a.d(t,"e",(function(){return c})),a.d(t,"d",(function(){return s})),a.d(t,"k",(function(){return p})),a.d(t,"b",(function(){return u})),a.d(t,"g",(function(){return m})),a.d(t,"h",(function(){return d})),a.d(t,"m",(function(){return h})),a.d(t,"a",(function(){return E}));var n=function(e){return{type:"SET_FILTER_PROJECT_PARTICIPANT_ID",id:e}},r=function(e){return{type:"SET_FILTER_PARTICIPANT_PROJECT_CONTACT_TYPE",contactType:e}},i=function(e){return{type:"SET_FILTER_PARTICIPANT_PROJECT_NAME",name:e}},l=function(e){return{type:"SET_FILTER_PARTICIPANT_PROJECT_ADDRESS",address:e}},o=function(e){return{type:"SET_FILTER_PARTICIPANT_PROJECT_POSTAL_CODE",postalCode:e}},c=function(e){return{type:"SET_FILTER_PARTICIPANT_PROJECT_CITY",city:e}},s=function(e){return{type:"SET_FILTER_PARTICIPANT_PROJECT_AMOUNT_DEFINITIVE",amountDefinitive:e}},p=function(e){return{type:"SET_FILTER_PARTICIPANT_PROJECT_PARTICIPATIONS_DEFINITIVE",participationsDefinitive:e}},u=function(e){return{type:"SET_FILTER_PARTICIPANT_MUTATION_STATUS_ID",participantMutationStatusId:e}},m=function(e){return{type:"SET_FILTER_PARTICIPANT_PROJECT_DATE_REGISTER",dateRegister:e}},d=function(e){return{type:"SET_FILTER_PARTICIPANT_PROJECT_ENERGY_SUPPLIER_ID",energySupplierId:e}},h=function(e){return{type:"SET_FILTER_PARTICIPANT_PROJECT_ID",projectId:e}},E=function(){return{type:"CLEAR_FILTER_PARTICIPANTS_PROJECT"}}},958:function(e,t,a){"use strict";a.d(t,"b",(function(){return n})),a.d(t,"a",(function(){return r}));var n=function(e,t,a,n,r,i){return{type:"FETCH_PARTICIPANTS_PROJECT",filters:e,extraFilters:t,sorts:a,pagination:n,filterType:r,fetchFromProject:i}},r=function(){return{type:"CLEAR_PARTICIPANTS_PROJECT"}}},959:function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));var n=function(e){return{type:"SET_PARTICIPANTS_PROJECTS_PAGINATION",pagination:e}}},960:function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));var n=function(e,t){return{type:"SET_PARTICIPANTS_PROJECT_SORTS_FILTER",field:e,order:t}}},980:function(e,t,a){"use strict";var n=a(25),r=a.n(n),i=a(24),l=a.n(i),o=a(26),c=a.n(o),s=a(27),p=a.n(s),u=a(21),m=a.n(u),d=a(28),h=a.n(d),E=a(6),f=a.n(E),g=a(0),v=a.n(g),b=a(4),y=a(33),P=a(682),j=a(683),C=a(8),T=a.n(C),k=function(e){function t(e){var a;return r()(this,t),a=c()(this,p()(t).call(this,e)),f()(m()(a),"openItem",(function(e){b.f.push("/taak/".concat(e))})),a.state={relatedTasks:""},a}return h()(t,e),l()(t,[{key:"render",value:function(){var e=this,t=this.props.relatedTasks;return v.a.createElement("div",null,""==t&&v.a.createElement("div",null,"Geen taken gevonden."),""!=t&&v.a.createElement("table",{className:"table harmonica-table"},v.a.createElement("tbody",null,t.map((function(t,a){return v.a.createElement("tr",{onClick:function(){return e.openItem(t.id)},key:a},v.a.createElement("td",{className:"col-xs-12 clickable"},T()(t.createdAt).format("L")," - ",t.noteSummary))})))))}}]),t}(g.Component),N=Object(y.b)((function(e){return{relatedTasks:e.projectDetails.relatedTasks}}))(k),w=Object(y.b)((function(e){return{permissions:e.meDetails.permissions}}),null)((function(e){var t=e.toggleShowList,a=e.showTasksList,n=e.taskCount,r=e.newTask,i=e.permissions;return v.a.createElement(P.a,{className:"harmonica-button"},v.a.createElement(j.a,null,v.a.createElement("div",{className:"col-sm-10",onClick:t,role:"button"},v.a.createElement("span",{className:""},"OPEN TAKEN ",v.a.createElement("span",{className:"badge"},n))),v.a.createElement("div",{className:"col-sm-2"},i.manageTask&&v.a.createElement("a",{role:"button",className:"pull-right",onClick:r},v.a.createElement("span",{className:"glyphicon glyphicon-plus glyphicon-white"}))),v.a.createElement("div",{className:"col-sm-12"},a&&v.a.createElement(N,null))))})),S=function(e){function t(e){var a;return r()(this,t),a=c()(this,p()(t).call(this,e)),f()(m()(a),"openItem",(function(e){b.f.push("/document/".concat(e))})),a.state={relatedDocuments:""},a}return h()(t,e),l()(t,[{key:"render",value:function(){var e=this,t=this.props.relatedDocuments;return v.a.createElement("div",null,""==t&&v.a.createElement("div",null,"Geen documenten gevonden."),""!=t&&v.a.createElement("table",{className:"table harmonica-table"},v.a.createElement("tbody",null,t.map((function(t,a){return v.a.createElement("tr",{onClick:function(){return e.openItem(t.id)},key:a},v.a.createElement("td",{className:"col-xs-5 clickable"},T()(t.createdAt).format("L")),v.a.createElement("td",{className:"col-xs-6 clickable"},t.filename))})))))}}]),t}(g.Component),I=Object(y.b)((function(e){return{relatedDocuments:e.projectDetails.relatedDocuments}}))(S),O=Object(y.b)((function(e){return{permissions:e.meDetails.permissions}}),null)((function(e){var t=e.toggleShowList,a=e.showDocumentsList,n=e.newDocument,r=e.documentCount,i=e.permissions;return v.a.createElement(P.a,{className:"harmonica-button"},v.a.createElement(j.a,null,v.a.createElement("div",{className:"col-sm-10",onClick:t,role:"button"},v.a.createElement("span",null,"DOCUMENTEN ",v.a.createElement("span",{className:"badge"},r))),v.a.createElement("div",{className:"col-sm-2"},i.createDocument&&v.a.createElement("div",{className:"pull-right"},v.a.createElement("span",{className:"glyphicon glyphicon-plus glyphicon-white","data-toggle":"dropdown",role:"button"}),v.a.createElement("ul",{className:"dropdown-menu"},v.a.createElement("li",null,v.a.createElement("a",{className:"btn",onClick:function(){return n("internal")}},"Maak document")),v.a.createElement("li",null,v.a.createElement("a",{className:"btn",onClick:function(){return n("upload")}},"Upload document"))))),v.a.createElement("div",{className:"col-sm-12"},a&&v.a.createElement(I,null))))})),R=function(e){function t(e){var a;return r()(this,t),a=c()(this,p()(t).call(this,e)),f()(m()(a),"openItem",(function(e){b.f.push("/email/".concat(e))})),a.state={relatedOpportunities:""},a}return h()(t,e),l()(t,[{key:"render",value:function(){var e=this,t=this.props.relatedEmailsInbox;return v.a.createElement("div",null,""==t&&v.a.createElement("div",null,"Geen e-mails gevonden."),""!=t&&v.a.createElement("table",{className:"table harmonica-table"},v.a.createElement("tbody",null,t.map((function(t,a){return v.a.createElement("tr",{key:a},v.a.createElement("td",{className:"col-xs-4 clickable",onClick:function(){return e.openItem(t.id)}},T()(t.date_sent).format("L")),v.a.createElement("td",{className:"col-xs-8 clickable",onClick:function(){return e.openItem(t.id)}},t.subject))})))))}}]),t}(g.Component),A=Object(y.b)((function(e){return{relatedEmailsInbox:e.projectDetails.relatedEmailsInbox}}))(R),F=function(e){var t=e.toggleShowList,a=e.showEmailsInboxList,n=e.newEmail,r=e.emailInboxCount;return v.a.createElement(P.a,{className:"harmonica-button"},v.a.createElement(j.a,null,v.a.createElement("div",{className:"col-sm-10",onClick:t,role:"button"},v.a.createElement("span",{onClick:t,role:"button",className:""},"E-MAIL INBOX ",v.a.createElement("span",{className:"badge"},r))),v.a.createElement("div",{className:"col-sm-2"},v.a.createElement("a",{role:"button",className:"pull-right",onClick:n},v.a.createElement("span",{className:"glyphicon glyphicon-plus glyphicon-white"}))),v.a.createElement("div",{className:"col-sm-12"},a&&v.a.createElement(A,null))))},x=function(e){function t(e){var a;return r()(this,t),a=c()(this,p()(t).call(this,e)),f()(m()(a),"openItem",(function(e){b.f.push("/email/".concat(e))})),a.state={relatedOpportunities:""},a}return h()(t,e),l()(t,[{key:"render",value:function(){var e=this,t=this.props.relatedEmailsSent;return v.a.createElement("div",null,""==t&&v.a.createElement("div",null,"Geen e-mails gevonden."),""!=t&&v.a.createElement("table",{className:"table harmonica-table"},v.a.createElement("tbody",null,t.map((function(t,a){return v.a.createElement("tr",{key:a},v.a.createElement("td",{className:"col-xs-4 clickable",onClick:function(){return e.openItem(t.id)}},T()(t.date_sent).format("L")),v.a.createElement("td",{className:"col-xs-8 clickable",onClick:function(){return e.openItem(t.id)}},t.subject))})))))}}]),t}(g.Component),D=Object(y.b)((function(e){return{relatedEmailsSent:e.projectDetails.relatedEmailsSent}}))(x),L=function(e){var t=e.toggleShowList,a=e.showEmailsSentList,n=e.newEmail,r=e.emailSentCount;return v.a.createElement(P.a,{className:"harmonica-button"},v.a.createElement(j.a,null,v.a.createElement("div",{className:"col-sm-10",onClick:t,role:"button"},v.a.createElement("span",{onClick:t,className:""},"E-MAIL VERZONDEN ",v.a.createElement("span",{className:"badge"},r))),v.a.createElement("div",{className:"col-sm-2"},v.a.createElement("a",{role:"button",className:"pull-right",onClick:n},v.a.createElement("span",{className:"glyphicon glyphicon-plus glyphicon-white"}))),v.a.createElement("div",{className:"col-sm-12"},a&&v.a.createElement(D,null))))};function _(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function M(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?_(Object(a),!0).forEach((function(t){f()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):_(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var U=function(e){function t(e){var a;return r()(this,t),a=c()(this,p()(t).call(this,e)),f()(m()(a),"newTask",(function(){b.f.push("/taak/nieuw/project/".concat(a.props.project.id))})),f()(m()(a),"newDocument",(function(e){b.f.push("/document/nieuw/".concat(e,"/project/").concat(a.props.project.id))})),f()(m()(a),"newEmail",(function(){b.f.push("/email/nieuw")})),a.state={toggleShowList:{tasks:!1,documents:!1,emailsInbox:!1,emailsSent:!1}},a.toggleShowList=a.toggleShowList.bind(m()(a)),a}return h()(t,e),l()(t,[{key:"toggleShowList",value:function(e){this.setState(M({},this.state,{toggleShowList:M({},this.state.toggleShowList,f()({},e,!this.state.toggleShowList[e]))}))}},{key:"render",value:function(){var e=this;return v.a.createElement("div",{className:"margin-10-top"},v.a.createElement(w,{toggleShowList:function(){return e.toggleShowList("tasks")},showTasksList:this.state.toggleShowList.tasks,taskCount:this.props.project.taskCount,newTask:this.newTask}),v.a.createElement(O,{toggleShowList:function(){return e.toggleShowList("documents")},showDocumentsList:this.state.toggleShowList.documents,newDocument:this.newDocument,documentCount:this.props.project.documentCount}),v.a.createElement(F,{toggleShowList:function(){return e.toggleShowList("emailsInbox")},showEmailsInboxList:this.state.toggleShowList.emailsInbox,newEmail:this.newEmail,emailInboxCount:this.props.project.emailInboxCount}),v.a.createElement(L,{toggleShowList:function(){return e.toggleShowList("emailsSent")},showEmailsSentList:this.state.toggleShowList.emailsSent,newEmail:this.newEmail,emailSentCount:this.props.project.emailSentCount}))}}]),t}(g.Component);t.a=Object(y.b)((function(e){return{project:e.projectDetails}}))(U)}}]);