text: (window.webpackJsonp=window.webpackJsonp||[]).push([[122],{1622:function(e,t,a){"use strict";a.r(t);var n=a(25),s=a.n(n),o=a(24),i=a.n(o),l=a(26),r=a.n(l),c=a(27),u=a.n(c),m=a(21),p=a.n(m),h=a(28),d=a.n(h),f=a(6),E=a.n(f),v=a(0),g=a.n(v),k=a(682),y=a(683),T=a(12),N=function(){return T.a.get("jory/task-type",{params:{jory:{fld:["id","name","usesWfCompletedTask","emailTemplateIdWfCompletedTask","numberOfDaysToSendEmailCompletedTask","usesWfExpiredTask","emailTemplateIdWfExpiredTask"]}}})},b=a(33),w=a(685),C=Object(b.b)((function(e){return{permissions:e.meDetails.permissions}}),null)((function(e){var t=e.taskTypesCount,a=e.refreshTaskTypesData;e.permissions;return g.a.createElement("div",{className:"row"},g.a.createElement("div",{className:"col-md-4"},g.a.createElement("div",{className:"btn-group",role:"group"},g.a.createElement(w.a,{iconName:"glyphicon-refresh",onClickAction:a}))),g.a.createElement("div",{className:"col-md-4"},g.a.createElement("h3",{className:"text-center table-title"},"Taak types")),g.a.createElement("div",{className:"col-md-4"},g.a.createElement("div",{className:"pull-right"},"Resultaten: ",t)))})),L=a(198),M=a.n(L),D=a(144),R=a(145),A=a(199),S=a(99),j=a(4),F=function(e){function t(e){var a;return s()(this,t),(a=r()(this,u()(t).call(this,e))).state={showActionButtons:!1,highlightRow:""},a}return d()(t,e),i()(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){j.f.push("/taak-type/".concat(e))}},{key:"render",value:function(){var e=this,t=this.props,a=t.id,n=t.name,s=t.permissions;return g.a.createElement("tr",{className:this.state.highlightRow,onDoubleClick:s.manageFinancial?function(){return e.openItem(a)}:null,onMouseEnter:function(){return e.onRowEnter()},onMouseLeave:function(){return e.onRowLeave()}},g.a.createElement("td",null,n),g.a.createElement("td",null,this.state.showActionButtons&&s.manageFinancial?g.a.createElement("a",{role:"button",onClick:function(){return e.openItem(a)}},g.a.createElement("span",{className:"glyphicon glyphicon-pencil mybtn-success"})," "):""))}}]),t}(v.Component),I=Object(b.b)((function(e){return{permissions:e.meDetails.permissions}}))(F),B=function(e){var t=e.taskTypes,a=e.hasError,n=e.isLoading,s="",o=!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!":o=!1,g.a.createElement("div",null,g.a.createElement(D.a,null,g.a.createElement(R.a,null,g.a.createElement("tr",{className:"thead-title"},g.a.createElement(S.a,{title:"Omschrijving",width:"100%"}))),g.a.createElement(A.a,null,o?g.a.createElement("tr",null,g.a.createElement("td",{colSpan:4},s)):t.map((function(e){return g.a.createElement(I,M()({key:e.id},e))})))))},O=function(e){function t(e){var a;return s()(this,t),a=r()(this,u()(t).call(this,e)),E()(p()(a),"callFetchTaskTypesData",(function(){a.setState({isLoading:!0,hasError:!1}),N().then((function(e){a.setState({isLoading:!1,taskTypes:e.data.data})})).catch((function(e){a.setState({isLoading:!1,hasError:!0})}))})),a.state={taskTypes:[],isLoading:!1,hasError:!1},a}return d()(t,e),i()(t,[{key:"componentDidMount",value:function(){this.callFetchTaskTypesData()}},{key:"render",value:function(){return g.a.createElement(k.a,null,g.a.createElement(y.a,null,g.a.createElement("div",{className:"col-md-12 margin-10-top"},g.a.createElement(C,{taskTypesCount:this.state.taskTypes?this.state.taskTypes.length:0,refreshTaskTypesData:this.callFetchTaskTypesData})),g.a.createElement("div",{className:"col-md-12 margin-10-top"},g.a.createElement(B,{taskTypes:this.state.taskTypes,isLoading:this.state.isLoading,hasError:this.state.hasError}))))}}]),t}(v.Component);t.default=O},682:function(e,t,a){"use strict";var n=a(0),s=a.n(n),o=a(14),i=a.n(o),l=function(e){var t=e.children,a=e.className,n=e.onMouseEnter,o=e.onMouseLeave;return s.a.createElement("div",{className:"panel panel-default ".concat(a),onMouseEnter:n,onMouseLeave:o},t)};l.defaultProps={className:"",onMouseEnter:function(){},onMouseLeave:function(){}},l.propTypes={className:i.a.string,onMouseEnter:i.a.func,onMouseLeave:i.a.func},t.a=l},683:function(e,t,a){"use strict";var n=a(0),s=a.n(n),o=a(14),i=a.n(o),l=function(e){var t=e.className,a=e.children;return s.a.createElement("div",{className:"panel-body ".concat(t)},a)};l.defaultProps={className:""},l.propTypes={className:i.a.string},t.a=l},685:function(e,t,a){"use strict";var n=a(0),s=a.n(n),o=a(14),i=a.n(o),l=function(e){var t=e.buttonClassName,a=e.iconName,n=e.onClickAction,o=e.title,i=e.disabled;return s.a.createElement("button",{type:"button",className:"btn ".concat(t),onClick:n,disabled:i,title:o},s.a.createElement("span",{className:"glyphicon ".concat(a)}))};l.defaultProps={buttonClassName:"btn-success btn-sm",title:"",disabled:!1},l.propTypes={buttonClassName:i.a.string,iconName:i.a.string.isRequired,onClickAction:i.a.func,title:i.a.string,disabled:i.a.bool},t.a=l}}]);