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