(window.webpackJsonp=window.webpackJsonp||[]).push([[69],{KsIK:function(e,a,l){"use strict";l.r(a),l.d(a,"default",(function(){return D}));var t=l("JX7q"),n=l("dI71"),r=l("0HrA"),u=l("G9dV"),c=l("jGo9"),m=l("DAwz"),i=(l("Wbzz"),l("paqj")),o=l("eUAm"),d=l("q1tI"),s=l.n(d),b=l("vOnD"),v=l("1Yd/"),E=(l("vDqi"),l("Ji2X")),p=l("NRhA"),h=l.n(p),f=(l("5Buo"),l("PoRk")),g=l("kzC8"),N=Object(b.e)(u.a).withConfig({displayName:"report__Input",componentId:"sc-1sa7m5m-0"})(["margin-bottom:10px;"]),y=Object(b.e)(r.a).withConfig({displayName:"report__SelectStyled",componentId:"sc-1sa7m5m-1"})(["margin-bottom:1rem;"]),C=[{value:"All",label:"All"},{value:"ProductID",label:"Product"},{value:"CampaignID",label:"Campaign"},{value:"MerchantID",label:"Merchant"}],S=[{value:"0",label:"All"},{value:"1",label:"First Charge"},{value:"2",label:"First Recurring"},{value:"3",label:"Recurring"}],k="undefined"!=typeof window,D=function(e){function a(){for(var a,l=arguments.length,n=new Array(l),r=0;r<l;r++)n[r]=arguments[r];return(a=e.call.apply(e,[this].concat(n))||this).state={startDate:new Date,endDate:new Date,limitBy:"All",limitByLabel:"All",chargeNum:"0",chargeNumLabel:"All",loader:"",error:!1,errorMsg:"",reset:!1,data:{attempted:{number:{label:"# Attempted:",value:0},dollar:{label:"$ Attempted:",value:0}},approved:{number:{label:"# Approved:",value:0},dollar:{label:"$ Approved:",value:0},percent:{label:"$ Approved:",value:0}},declined:{number:{label:"# Declined:",value:0},dollar:{label:"$ Declined:",value:0},percent:{label:"$ Declined:",value:0}},refunded:{number:{label:"# Refunded:",value:0},dollar:{label:"$ Refunded:",value:0}},chargeback:{number:{label:"# Chargeback:",value:0},dollar:{label:"$ Chargeback:",value:0}}}},a.saveState=function(e){a.setState(e)},a.onSearchLeads=function(){var e=Object(t.a)(a).saveState;e({loader:"Loading!!!",error:!1,errorMsg:"",reset:!1}),setTimeout((function(){e({reset:!0})}),3e3)},a.display=function(e){var a=e.reset,l=e.data,t=e.loader;return a?s.a.createElement("div",null,s.a.createElement("h2",null,"BILLING STATISTICS"),s.a.createElement("table",{className:"table table-striped table-hover"},s.a.createElement("tbody",null,s.a.createElement("tr",null,s.a.createElement("td",null,l.attempted.number.label),s.a.createElement("td",null,l.attempted.number.value)),s.a.createElement("tr",null,s.a.createElement("td",null,l.attempted.dollar.label),s.a.createElement("td",null,Object(g.f)(l.attempted.dollar.value))),s.a.createElement("tr",null,s.a.createElement("td",null," "),s.a.createElement("td",null," ")),s.a.createElement("tr",null,s.a.createElement("td",null,l.approved.number.label),s.a.createElement("td",null,l.approved.number.value)),s.a.createElement("tr",null,s.a.createElement("td",null,l.approved.dollar.label),s.a.createElement("td",null,Object(g.f)(l.approved.dollar.value))),s.a.createElement("tr",null,s.a.createElement("td",null,l.approved.percent.label),s.a.createElement("td",null,l.approved.percent.value)),s.a.createElement("tr",null,s.a.createElement("td",null," "),s.a.createElement("td",null," ")),s.a.createElement("tr",null,s.a.createElement("td",null,l.declined.number.label),s.a.createElement("td",null,l.declined.number.value)),s.a.createElement("tr",null,s.a.createElement("td",null,l.declined.dollar.label),s.a.createElement("td",null,Object(g.f)(l.declined.dollar.value))),s.a.createElement("tr",null,s.a.createElement("td",null,l.declined.percent.label),s.a.createElement("td",null,l.declined.percent.value)),s.a.createElement("tr",null,s.a.createElement("td",null," "),s.a.createElement("td",null," ")),s.a.createElement("tr",null,s.a.createElement("td",null,l.refunded.number.label),s.a.createElement("td",null,l.refunded.number.value)),s.a.createElement("tr",null,s.a.createElement("td",null,l.refunded.dollar.label),s.a.createElement("td",null,Object(g.f)(l.refunded.dollar.value))),s.a.createElement("tr",null,s.a.createElement("td",null," "),s.a.createElement("td",null," ")),s.a.createElement("tr",null,s.a.createElement("td",null,l.chargeback.number.label),s.a.createElement("td",null,l.chargeback.number.value)),s.a.createElement("tr",null,s.a.createElement("td",null,l.chargeback.dollar.label),s.a.createElement("td",null,Object(g.f)(l.chargeback.dollar.value)))))):t},a.onChangeStatus=function(e,l){var t;switch(e){case"chargeNum":t={chargeNum:l.value,chargeNumLabel:l.label};break;default:t={limitBy:l.value,limitByLabel:l.label}}a.saveState(t)},a.onChangeDate=function(e,l){var t;switch(e){case"end":t={endDate:l};break;default:t={startDate:l}}a.saveState(t)},a}Object(n.a)(a,e);var l=a.prototype;return l.componentDidMount=function(){!Object(f.c)()&&k&&(window.location.href="/")},l.render=function(){var e,a,l=this.state,t=this.state,n=t.startDate,r=t.endDate,u=t.limitBy,d=t.limitByLabel,b=t.chargeNum,p=t.chargeNumLabel,f=this.onSearchLeads,g=this.onChangeDate,k=this.onChangeStatus,D=this.display;return s.a.createElement(s.a.Fragment,null,s.a.createElement(v.a,{title:"Report Criteria"}),s.a.createElement("div",{className:"content-wrapper px-4 py-4"},s.a.createElement(c.a,null,s.a.createElement(c.b,null,s.a.createElement(E.a,null,s.a.createElement(o.a,null,s.a.createElement(i.a,{breakPoint:{xs:12}},s.a.createElement("h1",{className:"text-center mb-5"},"Report Criteria"))),s.a.createElement(o.a,{className:"justify-content-center align-items-center mb-5"},s.a.createElement(i.a,{className:"col-lg-12"},s.a.createElement(c.a,null,s.a.createElement(c.b,{className:"p-5"},s.a.createElement("form",null,s.a.createElement(o.a,null,s.a.createElement(i.a,{breakPoint:{xs:12}},s.a.createElement("label",{htmlFor:"SelLimitBy"},"Limit By"),s.a.createElement(y,{options:C,placeholder:d,value:u,id:"SelLimitBy",name:"SelLimitBy",onChange:k.bind(this,"limitBy")})),s.a.createElement(i.a,{breakPoint:{xs:12}},s.a.createElement("label",{htmlFor:"ChargeNum"},"On Charge"),s.a.createElement(y,{options:S,placeholder:p,value:b,id:"ChargeNum",name:"ChargeNum",onChange:k.bind(this,"chargeNum")})),s.a.createElement(i.a,{breakPoint:{xs:12}},s.a.createElement("label",{htmlFor:"StartDate"},"Start Date"),s.a.createElement(N,{fullWidth:!0,size:"Medium",className:"notes"},s.a.createElement(h.a,{id:"StartDate",name:"StartDate",selected:n,value:n,onChange:g.bind(this,"start")}))),s.a.createElement(i.a,{breakPoint:{xs:12}},s.a.createElement("label",{htmlFor:"EndDate"},"End Date"),s.a.createElement(N,{fullWidth:!0,size:"Medium",className:"notes"},s.a.createElement(h.a,{id:"EndDate",name:"EndDate",selected:r,value:r,onChange:g.bind(this,"end")}))),s.a.createElement(i.a,((e={breakPoint:{xs:12}}).breakPoint={md:12},e.className="text-right",e),s.a.createElement(m.a,{status:"Success",type:"button",shape:"SemiRound",onClick:f},"Run Report")))))))),s.a.createElement(o.a,{className:"justify-content-center align-items-center mb-4"},s.a.createElement(i.a,((a={breakPoint:{xs:12}}).breakPoint={md:12},a),s.a.createElement("h2",{className:"mb-0"},"Report"))),s.a.createElement(o.a,{className:"mb-5"},s.a.createElement(i.a,{id:"main_view"},D(l))))))))},a}(d.Component)},kzC8:function(e,a,l){"use strict";l.d(a,"h",(function(){return r})),l.d(a,"i",(function(){return u})),l.d(a,"c",(function(){return c})),l.d(a,"j",(function(){return m})),l.d(a,"d",(function(){return i})),l.d(a,"o",(function(){return o})),l.d(a,"a",(function(){return d})),l.d(a,"b",(function(){return b})),l.d(a,"e",(function(){return v})),l.d(a,"m",(function(){return E})),l.d(a,"l",(function(){return p})),l.d(a,"n",(function(){return h})),l.d(a,"f",(function(){return f})),l.d(a,"k",(function(){return g}));var t=l("q1tI"),n=l.n(t),r=function(e,a,l,t){var r,u=[],c=1,m=5;t>1&&(c=t,m+=t);for(var i=e>m?m:e,o=e>m,d=c;d<=i;d++)r={},t===d&&(r={fontWeight:600,textDecoration:"underline"}),u[d]=n.a.createElement("li",{className:"page-item",key:d},n.a.createElement("a",{className:"page-link",style:r,href:"/#",onClick:a.bind(void 0,null,l,e,d)},d));if(o){var s=i;1===t&&(s+=1),u[s]=n.a.createElement("li",{className:"page-item"},n.a.createElement("button",{className:"page-link",style:r},"..."))}return u},u=function(e,a,l){return n.a.createElement("div",null,n.a.createElement("input",{type:"number",value:l,onChange:a.bind(void 0,e)}),"/",e)},c="no-product",m=function(e){var a,l,t,n=e.lengthData,r=e.pagination,u=e.current,c=e.perpage,m=e.max,i=e.number;switch(e.type){case"prev":a=1===r?1:r-1,t=u-c,0===u&&(t=u),l=Object.assign({},l,{current:t,pagination:a});break;case"next":a=r===m?m:r+1,t=u+c,u===n-n%c&&(t=u),l=Object.assign({},l,{current:t,pagination:a});break;case"first":l=Object.assign({},l,{pagination:1,current:0});break;case"last":l=Object.assign({},l,{current:c*m-c,pagination:m});break;default:t=i*c-c,1===i&&(t=0),i===n&&(t=n-n%c),l=Object.assign({},l,{current:t,pagination:i})}return l},i=function(e){return null!=e?e.toUpperCase():""},o=function(e,a,l){return e<a?l?1:-1:e>a?l?-1:1:0},d=["None","SP (Self Pay)","NFU (Needs Followup)","NS (Needs Scholarship)","RL (Revisit Later)","TY (Too Young)","TO (Too Old)","M (Medicaid)","PI (Private Insurance)","L (Location)","NC (No Call)"],s=[];s[4]="Phone Call",s[5]="Missed Call",s[6]="Form Fill";var b=[].concat(s),v={Active:"Success",Referred:"Success",Deactivated:"Success",Admin:"Success",All:"Success"},E=[{value:"EmailAddress",label:"Email"},{value:"FirstName",label:"First Name"},{value:"LastName",label:"Last Name"},{value:"CompanyName",label:"Company Name"},{value:"HomePhone",label:"Home Phone"},{value:"WorkPhone",label:"WorkPhone"},{value:"CellPhone",label:"CellPhone"}],p=[{value:"0",label:"All"},{value:"12",label:"Advanced Recovery Systems"},{value:"1",label:"Apex Notes"},{value:"20",label:"At The Crossroads"},{value:"3",label:"Cedar Ridge"},{value:"22",label:"Clearview Girls Academy"},{value:"2",label:"Clearview Horizon"},{value:"7",label:"Elevations"},{value:"21",label:"Elk Mountain"},{value:"10",label:"Family First"},{value:"6",label:"Family Positive Impact"},{value:"16",label:"Gulf Coast Treatment Center"},{value:"13",label:"Journey Pure"},{value:"9",label:"Makana"},{value:"4",label:"MiBoSpi Recovery"},{value:"17",label:"Newport Academy"},{value:"14",label:"Palm Shores Behavioral Health Center"},{value:"8",label:"Red Frog"},{value:"19",label:"Second Chances of Southern Utah"},{value:"23",label:"Soulegria"},{value:"5",label:"Therapy Insider"},{value:"18",label:"Visions Teen Center"},{value:"11",label:"Voyage Recovery"},{value:"15",label:"Voyage Recovery Center"}],h=[{value:"EmailAddress",label:"Email"},{value:"FirstName",label:"First Name"},{value:"LastName",label:"Last Name"},{value:"HomePhone",label:"Home Phone"},{value:"WorkPhone",label:"WorkPhone"},{value:"CellPhone",label:"CellPhone"},{value:"First4",label:"First 4"},{value:"Last4",label:"Last 4"}],f=function(e){return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(e)},g=[{value:10,label:"10"},{value:20,label:"20"},{value:30,label:"30"},{value:40,label:"40"}]}}]);
//# sourceMappingURL=component---src-pages-report-index-js-0cf802d7f25ba8aef606.js.map