text: (window.webpackJsonp=window.webpackJsonp||[]).push([[44],{1551:function(e,t,a){"use strict";a.r(t);var n=a(24),r=a.n(n),o=a(25),s=a.n(o),i=a(22),l=a.n(i),c=a(26),u=a.n(c),m=a(27),d=a.n(m),f=a(16),p=a.n(f),h=a(6),v=a.n(h),g=a(0),y=a.n(g),b=a(4),E=a(700),k=function(e){var t=e.name;return y.a.createElement("div",{className:"row"},y.a.createElement("div",{className:"col-md-4"},y.a.createElement("div",{className:"btn-group btn-group-flex margin-small",role:"group"},y.a.createElement(E.a,{iconName:"glyphicon-arrow-left",onClickAction:b.e.goBack}))),y.a.createElement("div",{className:"col-md-4"},y.a.createElement("h4",{className:"text-center"},"Maatregel categorie: ",t)),y.a.createElement("div",{className:"col-md-4"}))},C=a(199),O=a(198),N=a.n(O),w=a(31),S=a(7),R=a.n(S),j=(a(702),a(701)),T=a(698),W=a(699),z=a(11),q={fld:["id","name","usesWfCreateOpportunity","measureIdWfCreateOpportunity","opportunityStatusIdWfCreateOpportunity","usesWfCreateQuotationRequest","organisationIdWfCreateQuotationRequest","usesWfEmailQuotationRequest","emailTemplateIdWfCreateQuotationRequest"],rlt:{measureWorkflowCreateOpportunity:[],opportunityStatusWorkflowCreateOpportunity:[],organisationWorkflowCreateQuotationRequest:[],emailTemplateWorkflowCreateQuotationRequest:[]}},P=function(e){var t="jory/measure-category/".concat(e);return z.a.get(t,{params:{jory:q}})},x=function(e){var t="".concat("measure-category","/").concat(e.id);return z.a.post(t,e,{params:{jory:q}})},D=a(14),I=a(201),L=a(710),M=a(725),Q=a(703),A=a(108),F=a(767),_=a(105),B=(a(706),a(855));function X(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 V(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?X(Object(a),!0).forEach((function(t){v()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):X(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function U(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,n=p()(e);if(t){var r=p()(this).constructor;a=Reflect.construct(n,arguments,r)}else a=n.apply(this,arguments);return d()(this,a)}}R.a.locale("nl");var G=function(e){u()(a,e);var t=U(a);function a(e){var n;return r()(this,a),n=t.call(this,e),v()(l()(n),"handleInputChange",(function(e){var t=e.target,a="checkbox"===t.type?t.checked:t.value,r=t.name;n.setState(V(V({},n.state),{},{measureCategory:V(V({},n.state.measureCategory),{},v()({},r,a))}))})),v()(l()(n),"handleSubmit",(function(e){e.preventDefault();var t=n.state.measureCategory,a={},r=!1;1==t.usesWfCreateOpportunity&&(t.measureIdWfCreateOpportunity||(a.measureIdWfCreateOpportunity=!0,r=!0),t.opportunityStatusIdWfCreateOpportunity||(a.opportunityStatusIdWfCreateOpportunity=!0,r=!0)),1==t.usesWfCreateQuotationRequest&&(t.organisationIdWfCreateQuotationRequest||(a.organisationIdWfCreateQuotationRequest=!0,r=!0)),1==t.usesWfEmailQuotationRequest&&(t.emailTemplateIdWfCreateQuotationRequest||(a.emailTemplateIdWfCreateQuotationRequest=!0,r=!0)),n.setState(V(V({},n.state),{},{errors:a})),!r&&x(t).then((function(e){n.props.updateState(e.data.data),n.props.fetchSystemData(),n.props.switchToView()})).catch((function(e){alert("Er is iets misgegaan bij opslaan. Herlaad de pagina en probeer het nogmaals.")}))})),n.state={measures:[],organisations:[],emailTemplates:[],measureCategory:V({},e.measureCategory),errors:{usesWfCreateOpportunity:!1,measureIdWfCreateOpportunity:!1,opportunityStatusIdWfCreateOpportunity:!1,usesWfCreateQuotationRequest:!1,organisationIdWfCreateQuotationRequest:!1,usesWfEmailQuotationRequest:!1,emailTemplateIdWfCreateQuotationRequest:!1},peekLoading:{measures:!0,opportunityStatusses:!0,organisations:!0,emailTemplates:!0}},n.handleReactSelectChange=n.handleReactSelectChange.bind(l()(n)),n}return s()(a,[{key:"handleReactSelectChange",value:function(e,t){this.setState(V(V({},this.state),{},{measureCategory:V(V({},this.state.measureCategory),{},v()({},t,e))}))}},{key:"componentDidMount",value:function(){var e=this;A.a.peekMeasures().then((function(t){e.setState({measures:t,peekLoading:V(V({},e.state.peekLoading),{},{measures:!1})})})),F.a.getOrganisationPeek().then((function(t){e.setState({organisations:t,peekLoading:V(V({},e.state.peekLoading),{},{organisations:!1})})})),_.a.fetchEmailTemplatesPeek().then((function(t){return e.setState({emailTemplates:t,peekLoading:V(V({},e.state.peekLoading),{},{emailTemplates:!1})})}))}},{key:"render",value:function(){var e=this.state.measureCategory,t=e.name,a=e.usesWfCreateOpportunity,n=e.measureIdWfCreateOpportunity,r=e.opportunityStatusIdWfCreateOpportunity,o=e.usesWfCreateQuotationRequest,s=e.organisationIdWfCreateQuotationRequest,i=e.usesWfEmailQuotationRequest,l=e.emailTemplateIdWfCreateQuotationRequest,c=Object(B.a)(this.state.measures,this.state.measureCategory.id);return y.a.createElement("form",{className:"form-horizontal",onSubmit:this.handleSubmit},y.a.createElement(T.a,null,y.a.createElement(W.a,null,y.a.createElement("div",{className:"row"},y.a.createElement(Q.a,{label:"Omschrijving",divSize:"col-sm-10",value:t,className:"col-sm-10 form-group"})),y.a.createElement("div",{className:"row"},y.a.createElement(L.a,{label:"Gebruikt workflow maak kans",divSize:"col-sm-10",name:"usesWfCreateOpportunity",value:a,onChangeAction:this.handleInputChange})),1==a&&y.a.createElement(y.a.Fragment,null,y.a.createElement("div",{className:"row"},y.a.createElement(Q.a,{label:"Uitleg workflow maak kans",divSize:"col-sm-10",value:this.props.explanationWfCreateOpportunity,className:"col-sm-10 form-group"})),y.a.createElement("div",{className:"row"},y.a.createElement(M.a,{label:"Voor welke maatregel kans maken?",divSize:"col-sm-10",name:"measureIdWfCreateOpportunity",options:c,value:n,onChangeAction:this.handleReactSelectChange,isLoading:this.state.peekLoading.measures,multi:!1,required:a,error:this.state.errors.measureIdWfCreateOpportunity})),y.a.createElement("div",{className:"row"},y.a.createElement(M.a,{label:"Zet kans status",divSize:"col-sm-10",name:"opportunityStatusIdWfCreateOpportunity",options:this.props.opportunityStatusses,value:r,onChangeAction:this.handleReactSelectChange,multi:!1,required:a,error:this.state.errors.opportunityStatusIdWfCreateOpportunity})),y.a.createElement("div",{className:"row"},y.a.createElement(L.a,{label:"Maak offerte verzoek",divSize:"col-sm-10",name:"usesWfCreateQuotationRequest",value:o,onChangeAction:this.handleInputChange})),1==o&&y.a.createElement(y.a.Fragment,null,y.a.createElement("div",{className:"row"},y.a.createElement(Q.a,{label:"Uitleg workflow maak offerte verzoek",divSize:"col-sm-10",value:this.props.explanationWfCreateQuotationRequest,className:"col-sm-10 form-group"})),y.a.createElement("div",{className:"row"},y.a.createElement(M.a,{label:"Offerte verzoek voor",divSize:"col-sm-10",name:"organisationIdWfCreateQuotationRequest",options:this.state.organisations,value:s,onChangeAction:this.handleReactSelectChange,isLoading:this.state.peekLoading.organisations,multi:!1,required:o,error:this.state.errors.organisationIdWfCreateQuotationRequest})),y.a.createElement("div",{className:"row"},y.a.createElement(L.a,{label:"Stuur offerte verzoek mail",divSize:"col-sm-10",name:"usesWfEmailQuotationRequest",value:i,onChangeAction:this.handleInputChange})),1==i&&y.a.createElement(y.a.Fragment,null,y.a.createElement("div",{className:"row"},y.a.createElement(Q.a,{label:"Uitleg workflow stuur offerte verzoek mail",divSize:"col-sm-10",value:this.props.explanationWfEmailQuotationRequest,className:"col-sm-10 form-group"})),y.a.createElement("div",{className:"row"},y.a.createElement(M.a,{label:"Email template Offerte verzoek",divSize:"col-sm-10",name:"emailTemplateIdWfCreateQuotationRequest",options:this.state.emailTemplates,value:l,onChangeAction:this.handleReactSelectChange,isLoading:this.state.peekLoading.emailTemplates,multi:!1,required:i,error:this.state.errors.emailTemplateIdWfCreateQuotationRequest})))))),y.a.createElement(W.a,null,y.a.createElement("div",{className:"pull-right btn-group",role:"group"},y.a.createElement(j.a,{buttonClassName:"btn-default",buttonText:"Sluiten",onClickAction:this.props.switchToView}),y.a.createElement(j.a,{buttonText:"Opslaan",type:"submit",value:"Submit"})))))}}]),a}(g.Component),J=Object(w.b)((function(e){return{opportunityStatusses:e.systemData.opportunityStatus}}),(function(e){return Object(D.b)({fetchSystemData:I.a},e)}))(G),H=function(e){var t=e.name,a=e.usesWfCreateOpportunity,n=e.measureWorkflowCreateOpportunity,r=e.opportunityStatusWorkflowCreateOpportunity,o=e.usesWfCreateQuotationRequest,s=e.organisationWorkflowCreateQuotationRequest,i=e.usesWfEmailQuotationRequest,l=e.emailTemplateWorkflowCreateQuotationRequest,c=e.switchToEdit,u=e.explanationWfCreateOpportunity,m=e.explanationWfCreateQuotationRequest,d=e.explanationWfEmailQuotationRequest;return y.a.createElement("div",{onClick:c},y.a.createElement(T.a,null,y.a.createElement(W.a,null,y.a.createElement("div",{className:"row"},y.a.createElement(Q.a,{label:"Omschrijving",divSize:"col-sm-10",value:t,className:"col-sm-10 form-group"})),y.a.createElement("div",{className:"row"},y.a.createElement(Q.a,{label:"Gebruikt workflow maak kans",divSize:"col-sm-10",value:a?"Ja":"Nee",className:"col-sm-10 form-group"})),1==a&&y.a.createElement(y.a.Fragment,null,y.a.createElement("div",{className:"row"},y.a.createElement(Q.a,{label:"Uitleg workflow maak kans",divSize:"col-sm-10",value:u,className:"col-sm-10 form-group"})),y.a.createElement("div",{className:"row"},y.a.createElement(Q.a,{label:"Voor welke maatregel kans maken?",divSize:"col-sm-10",value:n?n.name:"",className:"col-sm-10 form-group"})),y.a.createElement("div",{className:"row"},y.a.createElement(Q.a,{label:"Zet kans status",divSize:"col-sm-10",value:r?r.name:"",className:"col-sm-10 form-group"})),y.a.createElement("div",{className:"row"},y.a.createElement(Q.a,{label:"Maak offerte verzoek",divSize:"col-sm-10",value:o?"Ja":"Nee",className:"col-sm-10 form-group"})),1==o&&y.a.createElement(y.a.Fragment,null,y.a.createElement("div",{className:"row"},y.a.createElement(Q.a,{label:"Uitleg workflow maak offerte verzoek",divSize:"col-sm-10",value:m,className:"col-sm-10 form-group"})),y.a.createElement("div",{className:"row"},y.a.createElement(Q.a,{label:"Offerte verzoek voor",divSize:"col-sm-10",value:s?s.name:"",className:"col-sm-10 form-group"})),y.a.createElement("div",{className:"row"},y.a.createElement(Q.a,{label:"Stuur offerte verzoek mail",divSize:"col-sm-10",value:i?"Ja":"Nee",className:"col-sm-10 form-group"})),1==i&&y.a.createElement(y.a.Fragment,null,y.a.createElement("div",{className:"row"},y.a.createElement(Q.a,{label:"Uitleg workflow stuur offerte verzoek mail",divSize:"col-sm-10",value:d,className:"col-sm-10 form-group"})),y.a.createElement("div",{className:"row"},y.a.createElement(Q.a,{label:"Email template Offerte verzoek",divSize:"col-sm-10",value:l?l.name:"",className:"col-sm-10 form-group"}))))))))};function Y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,n=p()(e);if(t){var r=p()(this).constructor;a=Reflect.construct(n,arguments,r)}else a=n.apply(this,arguments);return d()(this,a)}}var Z=function(e){u()(a,e);var t=Y(a);function a(e){var n;return r()(this,a),n=t.call(this,e),v()(l()(n),"switchToEdit",(function(){n.setState({showEdit:!0})})),v()(l()(n),"switchToView",(function(){n.setState({showEdit:!1,activeDiv:""})})),n.state={showEdit:!1,activeDiv:""},n}return s()(a,[{key:"onDivEnter",value:function(){this.setState({activeDiv:"panel-grey"})}},{key:"onDivLeave",value:function(){this.state.showEdit||this.setState({activeDiv:""})}},{key:"render",value:function(){var e=this,t=this.props.meDetails.permissions,a=void 0===t?{}:t,n=y.a.createElement("span",null,"Er zal automatisch een kans worden aangemaakt voor een specifieke maatregel en een specifieke status."),r=y.a.createElement("span",null,"Er zal automatisch een offerte worden aangemaakt voor een specifieke organisatie."),o=y.a.createElement("span",null,"Er zal automatisch een email verstuurd worden naar de verantwoordelijke als nieuwe offerte verzoek wordt aangemaakt.");return y.a.createElement("div",{className:this.state.activeDiv,onMouseEnter:function(){return e.onDivEnter()},onMouseLeave:function(){return e.onDivLeave()}},this.state.showEdit&&a.manageFinancial?y.a.createElement(J,{measureCategory:this.props.measureCategory,switchToView:this.switchToView,updateState:this.props.updateState,explanationWfCreateOpportunity:n,explanationWfCreateQuotationRequest:r,explanationWfEmailQuotationRequest:o}):y.a.createElement(H,N()({},this.props.measureCategory,{switchToEdit:this.switchToEdit,explanationWfCreateOpportunity:n,explanationWfCreateQuotationRequest:r,explanationWfEmailQuotationRequest:o})))}}]),a}(g.Component),K=Object(w.b)((function(e){return{meDetails:e.meDetails,permissions:e.meDetails.permissions}}))(Z),$=function(e){var t=e.measureCategory,a=e.hasError,n=e.isLoading,r=e.updateState,o="",s=!0;return a?o="Fout bij het ophalen van maatregel categorie.":n?o="Gegevens aan het laden.":Object(C.isEmpty)(t)?o="Geen maatregel categorie gevonden!":s=!1,s?y.a.createElement("div",null,o):y.a.createElement("div",null,y.a.createElement(K,{measureCategory:t,updateState:r}))};function ee(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 te(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(a),!0).forEach((function(t){v()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):ee(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function ae(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,n=p()(e);if(t){var r=p()(this).constructor;a=Reflect.construct(n,arguments,r)}else a=n.apply(this,arguments);return d()(this,a)}}var ne=function(e){u()(a,e);var t=ae(a);function a(e){var n;return r()(this,a),n=t.call(this,e),v()(l()(n),"callFetchMeasureCategoryDetails",(function(){n.setState({isLoading:!0,hasError:!1}),P(n.props.params.id).then((function(e){n.setState({isLoading:!1,measureCategory:te({},e.data.data)})})).catch((function(e){n.setState({isLoading:!1,hasError:!0})}))})),v()(l()(n),"updateState",(function(e){n.setState({measureCategory:e})})),n.state={measureCategory:{},isLoading:!1,hasError:!1},n}return s()(a,[{key:"componentDidMount",value:function(){this.callFetchMeasureCategoryDetails()}},{key:"render",value:function(){return y.a.createElement("div",{className:"row"},y.a.createElement("div",{className:"col-md-9"},y.a.createElement("div",{className:"col-md-12 margin-10-top"},y.a.createElement(T.a,null,y.a.createElement(W.a,{className:"panel-small"},y.a.createElement(k,{name:this.state.measureCategory.name||""})))),y.a.createElement("div",{className:"col-md-12 margin-10-top"},y.a.createElement($,{measureCategory:this.state.measureCategory,isLoading:this.state.isLoading,hasError:this.state.hasError,updateState:this.updateState}))),y.a.createElement("div",{className:"col-md-3"}))}}]),a}(g.Component);t.default=ne},698:function(e,t,a){"use strict";var n=a(0),r=a.n(n),o=a(8),s=a.n(o),i=function(e){var t=e.children,a=e.className,n=e.onMouseEnter,o=e.onMouseLeave;return r.a.createElement("div",{className:"panel panel-default ".concat(a),onMouseEnter:n,onMouseLeave:o},t)};i.defaultProps={className:"",onMouseEnter:function(){},onMouseLeave:function(){}},i.propTypes={className:s.a.string,onMouseEnter:s.a.func,onMouseLeave:s.a.func},t.a=i},699:function(e,t,a){"use strict";var n=a(0),r=a.n(n),o=a(8),s=a.n(o),i=function(e){var t=e.className,a=e.children;return r.a.createElement("div",{className:"panel-body ".concat(t)},a)};i.defaultProps={className:""},i.propTypes={className:s.a.string},t.a=i},700:function(e,t,a){"use strict";var n=a(0),r=a.n(n),o=a(8),s=a.n(o),i=function(e){var t=e.buttonClassName,a=e.iconName,n=e.onClickAction,o=e.title,s=e.disabled;return r.a.createElement("button",{type:"button",className:"btn ".concat(t),onClick:n,disabled:s,title:o},r.a.createElement("span",{className:"glyphicon ".concat(a)}))};i.defaultProps={buttonClassName:"btn-success btn-sm",title:"",disabled:!1},i.propTypes={buttonClassName:s.a.string,iconName:s.a.string.isRequired,onClickAction:s.a.func,title:s.a.string,disabled:s.a.bool},t.a=i},701:function(e,t,a){"use strict";var n=a(0),r=a.n(n),o=a(8),s=a.n(o),i=function(e){var t=e.buttonClassName,a=e.buttonText,n=e.onClickAction,o=e.type,s=e.value,i=e.loading,l=e.loadText,c=e.disabled;return i?r.a.createElement("button",{type:o,className:"btn btn-sm btn-loading ".concat(t),value:s,disabled:i},r.a.createElement("span",{className:"glyphicon glyphicon-refresh glyphicon-refresh-animate"})," ",l):r.a.createElement("button",{type:o,className:"btn btn-sm ".concat(t),onClick:n,value:s,disabled:c},a)};i.defaultProps={buttonClassName:"btn-success",type:"button",value:"",loading:!1,loadText:"Aan het laden",disabled:!1},i.propTypes={buttonClassName:s.a.string,buttonText:s.a.string.isRequired,onClickAction:s.a.func,type:s.a.string,value:s.a.string,loading:s.a.bool,loadText:s.a.string,disabled:s.a.bool},t.a=i},702:function(e,t,a){"use strict";var n=a(0),r=a.n(n),o=a(8),s=a.n(o),i=function(e){var t=e.label,a=e.type,n=e.className,o=e.size,s=e.id,i=e.placeholder,l=e.name,c=e.value,u=e.onClickAction,m=e.onChangeAction,d=e.onBlurAction,f=e.required,p=e.readOnly,h=e.maxLength,v=e.error,g=e.min,y=e.max,b=e.step,E=e.errorMessage,k=e.divSize,C=e.divClassName,O=e.autoComplete;return r.a.createElement("div",{className:"form-group ".concat(k," ").concat(C)},r.a.createElement("label",{htmlFor:s,className:"col-sm-6 ".concat(f)},t),r.a.createElement("div",{className:"".concat(o)},r.a.createElement("input",{type:a,className:"form-control input-sm ".concat(n)+(v?"has-error":""),id:s,placeholder:i,name:l,value:c||"",onClick:u,onChange:m,onBlur:d,readOnly:p,maxLength:h,min:g,max:y,autoComplete:O,step:b})),v&&r.a.createElement("div",{className:"col-sm-offset-6 col-sm-6"},r.a.createElement("span",{className:"has-error-message"}," ",E)))};i.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(){}},i.propTypes={label:s.a.oneOfType([s.a.string,s.a.object]).isRequired,type:s.a.string,className:s.a.string,divClassName:s.a.string,size:s.a.string,divSize:s.a.string,id:s.a.string,placeholder:s.a.string,name:s.a.string.isRequired,value:s.a.oneOfType([s.a.string,s.a.number]),onClickAction:s.a.func,onChangeAction:s.a.func,onBlurAction:s.a.func,required:s.a.string,readOnly:s.a.bool,maxLength:s.a.string,error:s.a.bool,min:s.a.string,max:s.a.string,step:s.a.string,errorMessage:s.a.string,autoComplete:s.a.string},t.a=i},703:function(e,t,a){"use strict";var n=a(0),r=a.n(n),o=a(4),s=a(8),i=a.n(s),l=function(e){var t=e.label,a=e.className,n=e.id,s=e.value,i=e.link,l=e.hidden;return i.length>0?r.a.createElement("div",{className:a,style:l?{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(o.b,{to:i,className:"link-underline"},s))):r.a.createElement("div",{className:a,style:l?{display:"none"}:{}},r.a.createElement("label",{htmlFor:n,className:"col-sm-6"},t),r.a.createElement("div",{className:"col-sm-6",id:n},s))};l.defaultProps={className:"col-sm-6",value:"",link:"",hidden:!1},l.propTypes={label:i.a.oneOfType([i.a.string,i.a.object]).isRequired,className:i.a.string,id:i.a.string,value:i.a.oneOfType([i.a.string,i.a.number]),link:i.a.string,hidden:i.a.bool},t.a=l},710:function(e,t,a){"use strict";var n=a(0),r=a.n(n),o=a(8),s=a.n(o),i=a(716),l=a.n(i),c=function(e){var t=e.label,a=e.size,n=e.id,o=e.name,s=e.value,i=e.onChangeAction,c=e.required,u=e.divSize,m=e.className,d=e.disabled;return r.a.createElement("div",{className:"form-group ".concat(u," ").concat(m)},r.a.createElement("div",null,r.a.createElement("label",{htmlFor:n,className:"col-sm-6 ".concat(c)},t)),r.a.createElement("div",{className:"".concat(a)},r.a.createElement(l.a,{id:n,name:o,onChange:i,defaultChecked:s,disabled:d})))};c.defaultProps={className:"",size:"col-sm-6",divSize:"col-sm-6",required:"",disabled:!1,value:""},c.propTypes={label:s.a.string.isRequired,type:s.a.string,size:s.a.string,divSize:s.a.string,id:s.a.string,name:s.a.string.isRequired,value:s.a.bool,onChangeAction:s.a.func,required:s.a.string,disabled:s.a.bool},t.a=c},712:function(e,t,a){var n;
  /*!
    Copyright (c) 2017 Jed Watson.
    Licensed under the MIT License (MIT), see
    http://jedwatson.github.io/classnames
  */!function(){"use strict";var a={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)&&n.length){var s=r.apply(null,n);s&&e.push(s)}else if("object"===o)for(var i in n)a.call(n,i)&&n[i]&&e.push(i)}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},716:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},r=function(){function e(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,a,n){return a&&e(t.prototype,a),n&&e(t,n),t}}(),o=a(0),s=d(o),i=d(a(712)),l=d(a(8)),c=d(a(717)),u=d(a(718)),m=a(719);function d(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return a.handleClick=a.handleClick.bind(a),a.handleTouchStart=a.handleTouchStart.bind(a),a.handleTouchMove=a.handleTouchMove.bind(a),a.handleTouchEnd=a.handleTouchEnd.bind(a),a.handleFocus=a.handleFocus.bind(a),a.handleBlur=a.handleBlur.bind(a),a.previouslyChecked=!(!e.checked&&!e.defaultChecked),a.state={checked:!(!e.checked&&!e.defaultChecked),hasFocus:!1},a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"componentDidUpdate",value:function(e){e.checked!==this.props.checked&&this.setState({checked:!!this.props.checked})}},{key:"handleClick",value:function(e){var t=this.input;if(e.target!==t&&!this.moved)return this.previouslyChecked=t.checked,e.preventDefault(),t.focus(),void t.click();var a=this.props.hasOwnProperty("checked")?this.props.checked:t.checked;this.setState({checked:a})}},{key:"handleTouchStart",value:function(e){this.startX=(0,m.pointerCoord)(e).x,this.activated=!0}},{key:"handleTouchMove",value:function(e){if(this.activated&&(this.moved=!0,this.startX)){var t=(0,m.pointerCoord)(e).x;this.state.checked&&t+15<this.startX?(this.setState({checked:!1}),this.startX=t,this.activated=!0):t-15>this.startX&&(this.setState({checked:!0}),this.startX=t,this.activated=t<this.startX+5)}}},{key:"handleTouchEnd",value:function(e){if(this.moved){var t=this.input;if(e.preventDefault(),this.startX){var a=(0,m.pointerCoord)(e).x;!0===this.previouslyChecked&&this.startX+4>a?this.previouslyChecked!==this.state.checked&&(this.setState({checked:!1}),this.previouslyChecked=this.state.checked,t.click()):this.startX-4<a&&this.previouslyChecked!==this.state.checked&&(this.setState({checked:!0}),this.previouslyChecked=this.state.checked,t.click()),this.activated=!1,this.startX=null,this.moved=!1}}}},{key:"handleFocus",value:function(e){var t=this.props.onFocus;t&&t(e),this.setState({hasFocus:!0})}},{key:"handleBlur",value:function(e){var t=this.props.onBlur;t&&t(e),this.setState({hasFocus:!1})}},{key:"getIcon",value:function(e){var a=this.props.icons;return a?void 0===a[e]?t.defaultProps.icons[e]:a[e]:null}},{key:"render",value:function(){var e=this,t=this.props,a=t.className,r=(t.icons,function(e,t){var a={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(a[n]=e[n]);return a}(t,["className","icons"])),o=(0,i.default)("react-toggle",{"react-toggle--checked":this.state.checked,"react-toggle--focus":this.state.hasFocus,"react-toggle--disabled":this.props.disabled},a);return s.default.createElement("div",{className:o,onClick:this.handleClick,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd},s.default.createElement("div",{className:"react-toggle-track"},s.default.createElement("div",{className:"react-toggle-track-check"},this.getIcon("checked")),s.default.createElement("div",{className:"react-toggle-track-x"},this.getIcon("unchecked"))),s.default.createElement("div",{className:"react-toggle-thumb"}),s.default.createElement("input",n({},r,{ref:function(t){e.input=t},onFocus:this.handleFocus,onBlur:this.handleBlur,className:"react-toggle-screenreader-only",type:"checkbox"})))}}]),t}(o.PureComponent);t.default=f,f.displayName="Toggle",f.defaultProps={icons:{checked:s.default.createElement(c.default,null),unchecked:s.default.createElement(u.default,null)}},f.propTypes={checked:l.default.bool,disabled:l.default.bool,defaultChecked:l.default.bool,onChange:l.default.func,onFocus:l.default.func,onBlur:l.default.func,className:l.default.string,name:l.default.string,value:l.default.string,id:l.default.string,"aria-labelledby":l.default.string,"aria-label":l.default.string,icons:l.default.oneOfType([l.default.bool,l.default.shape({checked:l.default.node,unchecked:l.default.node})])}},717:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,r=a(0),o=(n=r)&&n.__esModule?n:{default:n};t.default=function(){return o.default.createElement("svg",{width:"14",height:"11",viewBox:"0 0 14 11"},o.default.createElement("title",null,"switch-check"),o.default.createElement("path",{d:"M11.264 0L5.26 6.004 2.103 2.847 0 4.95l5.26 5.26 8.108-8.107L11.264 0",fill:"#fff",fillRule:"evenodd"}))}},718:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,r=a(0),o=(n=r)&&n.__esModule?n:{default:n};t.default=function(){return o.default.createElement("svg",{width:"10",height:"10",viewBox:"0 0 10 10"},o.default.createElement("title",null,"switch-x"),o.default.createElement("path",{d:"M9.9 2.12L7.78 0 4.95 2.828 2.12 0 0 2.12l2.83 2.83L0 7.776 2.123 9.9 4.95 7.07 7.78 9.9 9.9 7.776 7.072 4.95 9.9 2.12",fill:"#fff",fillRule:"evenodd"}))}},719:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pointerCoord=function(e){if(e){var t=e.changedTouches;if(t&&t.length>0){var a=t[0];return{x:a.clientX,y:a.clientY}}var n=e.pageX;if(void 0!==n)return{x:n,y:e.pageY}}return{x:0,y:0}}},722:function(e,t,a){"use strict";a(734),a(198),a(709),a(12),a(6);var n=a(730),r=a(726),o=(a(22),a(733)),s=a(731),i=a(732),l=a(0),c=a.n(l),u=a(728),m=a(720),d=(a(103),a(92),a(704)),f=(a(721),a(715),a(727),a(729)),p=a(746);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,n=Object(i.a)(e);if(t){var r=Object(i.a)(this).constructor;a=Reflect.construct(n,arguments,r)}else a=n.apply(this,arguments);return Object(s.a)(this,a)}}l.Component;var v=Object(f.a)(d.a);t.a=v},725:function(e,t,a){"use strict";var n=a(6),r=a.n(n),o=a(0),s=a.n(o),i=a(8),l=a.n(i),c=a(722);function u(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?u(Object(a),!0).forEach((function(t){r()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):u(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var d=function(e){var t=e.label,a=e.divSize,n=e.size,r=e.id,o=e.name,i=e.value,l=e.options,u=e.optionId,d=e.optionName,f=e.onChangeAction,p=e.required,h=e.multi,v=e.error,g=e.errorMessage,y=e.isLoading,b=e.disabled,E=e.placeholder,k=e.clearable,C={option:function(e){return m(m({},e),{},{fontSize:"12px"})},singleValue:function(e){return m(m({},e),{},{fontSize:"12px"})},menu:function(e){return m(m({},e),{},{zIndex:20})}};return s.a.createElement("div",{className:"form-group ".concat(a)},s.a.createElement("label",{htmlFor:r,className:"col-sm-6 ".concat(p)},t),s.a.createElement("div",{className:"".concat(n)},s.a.createElement(c.a,{id:r,name:o,value:l&&i?h?l.map((function(e){if(i.includes(e[u]))return e})):l.find((function(e){return e[u]===i})):"",onChange:h?function(e){return f(e?e.map((function(e){return e[u]})).join():"")}:function(e){return f(e?e[u]:"",o)},options:l,getOptionLabel:function(e){return e[d]},getOptionValue:function(e){return e[u]},placeholder:E,noOptionsMessage:function(){return"Geen opties gevonden"},loadingMessage:function(){return"Laden"},isMulti:h,simpleValue:!0,removeSelected:!0,className:v?" has-error":"",isLoading:y,isDisabled:b,styles:C,isClearable:k,theme:function(e){return m(m({},e),{},{colors:m({},e.colors),spacing:m(m({},e.spacing),{},{baseUnit:2,controlHeight:24,menuGutter:4})})}})),v&&s.a.createElement("div",{className:"col-sm-offset-3 col-sm-8"},s.a.createElement("span",{className:"has-error-message"}," ",g)))};d.defaultProps={size:"col-sm-6",divSize:"col-sm-6",optionId:"id",optionName:"name",disabled:!1,required:"",error:!1,errorMessage:"",value:"",multi:!0,isLoading:!1,placeholder:"",clearable:!1},d.propTypes={label:l.a.string.isRequired,size:l.a.string,divSize:l.a.string,id:l.a.string,name:l.a.string.isRequired,options:l.a.array,optionId:l.a.string,optionName:l.a.string,value:l.a.oneOfType([l.a.string,l.a.number]),onChangeAction:l.a.func,onBlurAction:l.a.func,required:l.a.string,disabled:l.a.bool,error:l.a.bool,errorMessage:l.a.string,multi:l.a.bool,isLoading:l.a.bool,placeholder:l.a.string,clearable:l.a.bool},t.a=d},767:function(e,t,a){"use strict";var n=a(2),r=a.n(n),o="".concat(URL_API,"/api/organisation");t.a={newOrganisation:function(e){var t="".concat(o),a="Bearer "+localStorage.getItem("access_token");return r.a.defaults.headers.common.Authorization=a,r.a.post(t,e)},updateOrganisation:function(e){var t="".concat(o,"/").concat(e.id),a="Bearer "+localStorage.getItem("access_token");return r.a.defaults.headers.common.Authorization=a,r.a.post(t,e)},getOrganisationPeek:function(){var e="".concat(o,"/peek"),t="Bearer "+localStorage.getItem("access_token");return r.a.defaults.headers.common.Authorization=t,r.a.get(e).then((function(e){return e.data.data})).catch((function(e){console.log(e)}))}}},855:function(e,t,a){"use strict";t.a=function(e,t){return e.filter((function(e){return t?Number(e.measureCategoryId)===Number(t):e.measureCategoryId}))}}}]);