text: (window.webpackJsonp=window.webpackJsonp||[]).push([[136],{1590:function(e,t,a){"use strict";a.r(t);var n=a(24),s=a.n(n),r=a(25),l=a.n(r),o=a(22),c=a.n(o),i=a(26),u=a.n(i),m=a(27),f=a.n(m),p=a(16),d=a.n(p),h=a(6),E=a.n(h),v=a(0),y=a.n(v),k=a(702),g=a(703),T=a(11),N=function(){return T.a.get("jory/task-type",{params:{jory:{fld:["id","name","usesWfCompletedTask","emailTemplateIdWfCompletedTask","numberOfDaysToSendEmailCompletedTask","usesWfExpiredTask","emailTemplateIdWfExpiredTask","usesWfNewTask","emailTemplateIdWfNewTask"]}}})},w=a(31),b=a(704),R=Object(w.b)((function(e){return{permissions:e.meDetails.permissions}}),null)((function(e){var t=e.taskTypesCount,a=e.refreshTaskTypesData;e.permissions;return y.a.createElement("div",{className:"row"},y.a.createElement("div",{className:"col-md-4"},y.a.createElement("div",{className:"btn-group",role:"group"},y.a.createElement(b.a,{iconName:"glyphicon-refresh",onClickAction:a}))),y.a.createElement("div",{className:"col-md-4"},y.a.createElement("h3",{className:"text-center table-title"},"Workflows op Taak types")),y.a.createElement("div",{className:"col-md-4"},y.a.createElement("div",{className:"pull-right"},"Resultaten: ",t)))})),C=a(200),L=a.n(C),D=a(149),M=a(150),W=a(202),A=a(104),B=a(4);function S(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,n=d()(e);if(t){var s=d()(this).constructor;a=Reflect.construct(n,arguments,s)}else a=n.apply(this,arguments);return f()(this,a)}}var O=function(e){u()(a,e);var t=S(a);function a(e){var n;return s()(this,a),(n=t.call(this,e)).state={showActionButtons:!1,highlightRow:""},n}return l()(a,[{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){B.f.push("/taak-type/".concat(e))}},{key:"render",value:function(){var e=this,t=this.props,a=t.id,n=t.name,s=t.usesWfExpiredTask,r=t.usesWfCompletedTask,l=t.numberOfDaysToSendEmailCompletedTask,o=t.usesWfNewTask,c=t.permissions;return y.a.createElement("tr",{className:this.state.highlightRow,onDoubleClick:c.manageFinancial?function(){return e.openItem(a)}:null,onMouseEnter:function(){return e.onRowEnter()},onMouseLeave:function(){return e.onRowLeave()}},y.a.createElement("td",null,n),y.a.createElement("td",null,s?"Ja":"Nee"),y.a.createElement("td",null,r?"Ja":"Nee"),y.a.createElement("td",null,r?l:""),y.a.createElement("td",null,o?"Ja":"Nee"),y.a.createElement("td",null,this.state.showActionButtons&&c.manageFinancial?y.a.createElement("a",{role:"button",onClick:function(){return e.openItem(a)}},y.a.createElement("span",{className:"glyphicon glyphicon-pencil mybtn-success"})," "):""))}}]),a}(v.Component),j=Object(w.b)((function(e){return{permissions:e.meDetails.permissions}}))(O),x=function(e){var t=e.taskTypes,a=e.hasError,n=e.isLoading,s="",r=!0;return a?s="Fout bij het ophalen van taak types.":n?s="Gegevens aan het laden.":0===t.length?s="Geen taak types gevonden!":r=!1,y.a.createElement("div",null,y.a.createElement(D.a,null,y.a.createElement(M.a,null,y.a.createElement("tr",{className:"thead-title"},y.a.createElement(A.a,{title:"Omschrijving",width:"30%"}),y.a.createElement(A.a,{title:"Verlopen taak actief",width:"15%"}),y.a.createElement(A.a,{title:"Afgehandelde taak actief",width:"15%"}),y.a.createElement(A.a,{title:"Aantal dagen email",width:"15%"}),y.a.createElement(A.a,{title:"Nieuw taak actief",width:"15%"}),y.a.createElement(A.a,{title:"",width:"10%"}))),y.a.createElement(W.a,null,r?y.a.createElement("tr",null,y.a.createElement("td",{colSpan:6},s)):t.map((function(e){return y.a.createElement(j,L()({key:e.id},e))})))))};function F(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,n=d()(e);if(t){var s=d()(this).constructor;a=Reflect.construct(n,arguments,s)}else a=n.apply(this,arguments);return f()(this,a)}}var I=function(e){u()(a,e);var t=F(a);function a(e){var n;return s()(this,a),n=t.call(this,e),E()(c()(n),"callFetchTaskTypesData",(function(){n.setState({isLoading:!0,hasError:!1}),N().then((function(e){n.setState({isLoading:!1,taskTypes:e.data.data})})).catch((function(e){n.setState({isLoading:!1,hasError:!0})}))})),n.state={taskTypes:[],isLoading:!1,hasError:!1},n}return l()(a,[{key:"componentDidMount",value:function(){this.callFetchTaskTypesData()}},{key:"render",value:function(){return y.a.createElement(k.a,null,y.a.createElement(g.a,null,y.a.createElement("div",{className:"col-md-12 margin-10-top"},y.a.createElement(R,{taskTypesCount:this.state.taskTypes?this.state.taskTypes.length:0,refreshTaskTypesData:this.callFetchTaskTypesData})),y.a.createElement("div",{className:"col-md-12 margin-10-top"},y.a.createElement(x,{taskTypes:this.state.taskTypes,isLoading:this.state.isLoading,hasError:this.state.hasError}))))}}]),a}(v.Component);t.default=I},702:function(e,t,a){"use strict";var n=a(0),s=a.n(n),r=a(8),l=a.n(r),o=function(e){var t=e.children,a=e.className,n=e.onMouseEnter,r=e.onMouseLeave;return s.a.createElement("div",{className:"panel panel-default ".concat(a),onMouseEnter:n,onMouseLeave:r},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},703:function(e,t,a){"use strict";var n=a(0),s=a.n(n),r=a(8),l=a.n(r),o=function(e){var t=e.className,a=e.children;return s.a.createElement("div",{className:"panel-body ".concat(t)},a)};o.defaultProps={className:""},o.propTypes={className:l.a.string},t.a=o},704:function(e,t,a){"use strict";var n=a(0),s=a.n(n),r=a(8),l=a.n(r),o=function(e){var t=e.buttonClassName,a=e.iconName,n=e.onClickAction,r=e.title,l=e.disabled;return s.a.createElement("button",{type:"button",className:"btn ".concat(t),onClick:n,disabled:l,title:r},s.a.createElement("span",{className:"glyphicon ".concat(a)}))};o.defaultProps={buttonClassName:"btn-success btn-sm",title:"",disabled:!1},o.propTypes={buttonClassName:l.a.string,iconName:l.a.string.isRequired,onClickAction:l.a.func,title:l.a.string,disabled:l.a.bool},t.a=o}}]);