1_N_E=(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[113],{"7odA":function(t,e,n){"use strict";n.r(e);var a=n("H+61"),o=n("UlJF"),r=n("+Css"),i=n("7LId"),c=n("VIvw"),u=n("iHvq"),l=n("cpVT"),s=n("q1tI"),d=n.n(s),h=n("vOnD"),g=n("/MKj"),f=n("20a2"),p=n("g4pe"),m=n.n(p),y=n("wd/R"),b=n.n(y),v=n("8C4M"),w=n.n(v),j=n("hQyO"),O=n.n(j),_=n("XKeZ"),C=n("yWHn"),T=n("aQ/V"),N=n("OrOU"),A=n("JGUW"),x=n("h+B5"),S=n("6apz"),L=n("Nlzp"),R=n("TMnj"),D=n("o5eH"),U=n("LVBY"),E=n("5LqV"),I=d.a.createElement;function M(t){var e=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(t){return!1}}();return function(){var n,a=Object(u.a)(t);if(e){var o=Object(u.a)(this).constructor;n=Reflect.construct(a,arguments,o)}else n=a.apply(this,arguments);return Object(c.a)(this,n)}}var k=function(t){Object(i.a)(n,t);var e=M(n);function n(){var t;Object(a.a)(this,n);for(var o=arguments.length,i=new Array(o),c=0;c<o;c++)i[c]=arguments[c];return t=e.call.apply(e,[this].concat(i)),Object(l.a)(Object(r.a)(t),"state",{loading:!1,error:null,tour:null,open:!1,changeToUser:null,changeToDate:null,submitError:null,submitLoading:!1}),Object(l.a)(Object(r.a)(t),"getTour",(function(){var e=t.props.router.query.id;t.setState({loading:!0},(function(){L.a.get("/tours",{where:{id:e},include:[{model:"User",as:"createdBy",include:[{model:"Role",as:"roles"}]}],limit:1}).then((function(e){t.setState({loading:!1,error:0===e.data.length?"Tour Not Found":null,tour:e.data.length>0?e.data[0]:null})})).catch((function(e){t.setState({loading:!1,error:e})}))}))})),Object(l.a)(Object(r.a)(t),"componentDidMount",(function(){t.props.router.query.id&&t.getTour()})),Object(l.a)(Object(r.a)(t),"componentDidUpdate",(function(e){var n=t.props.router.query.id;!e.router.query.id&&n&&t.getTour()})),Object(l.a)(Object(r.a)(t),"saveNewAuthor",(function(){var e=t.props.setNotification,n=t.state,a=n.changeToUser,o=n.changeToDate,r=n.tour;t.setState({submitLoading:!0,submitError:!1},(function(){L.a.post("/tours/".concat(r.id,"/changeAuthor"),{userId:null===a||void 0===a?void 0:a.id,createdAt:o}).then((function(n){e("Successfully changed author"),t.setState({submitLoading:!1,submitError:null,changeToUser:null}),t.getTour()})).catch((function(e){t.setState({submitLoading:!1,submitError:e})}))}))})),t}return Object(o.a)(n,[{key:"render",value:function(){var t=this,e=this.props.colors,n=this.state,a=n.tour,o=n.error,r=n.loading,i=n.open,c=n.changeToUser,u=n.changeToDate,l=n.submitLoading,s={suppressWarnings:!0};return I("div",null,I(m.a,null,Object(E.b)()),I(m.a,null,I("title",null,"Clio - Change Author")),o&&I(x.a,{error:o}),r&&I(S.a,null),a&&I(B,null,I(T.a,{variant:"h2"},a.title),I(H,null,I(T.a,null,"Current author:",I(_.a,{styled:!0,style:{marginLeft:8,marginRight:8},target:"_blank",to:"/user/[id]",as:"/user/".concat(a.createdBy.id)},Object(R.a)(a.createdBy,null,s))),I("div",{style:{marginLeft:16,marginRight:16}},I(w.a,{style:{height:32,width:32,color:e.text}})),I(T.a,null,"Changing to:",c&&I(_.a,{styled:!0,style:{marginLeft:8,marginRight:8},target:"_blank",to:"/user/[id]",as:"/user/".concat(c.id)},Object(R.a)(c,null,s)),I(Y,{style:{marginLeft:8,marginRight:8},onClick:function(){return t.setState({open:!0})}},"(Select User)"))),I(A.a,{open:i,onClose:function(){t.setState({open:!1})},onSelectUser:function(e){t.setState({changeToUser:e})}}),I(V,null,I(T.a,null,"Current created date and time:",I("br",null)," ",b()(a.createdAt).format("MMMM Do YYYY, hh:mm:ss")),I("div",{style:{marginLeft:16,marginRight:16}},I(w.a,{style:{height:32,width:32,color:e.text}})),I(N.a,{label:"Changing to",value:u,onChange:function(e){return t.setState({changeToDate:e})},style:{width:"240px"}}))),I(q,null,I(C.a,{color:"secondary",variant:"contained",onClick:function(){t.saveNewAuthor()},disabled:l},I(O.a,null),"Save")))}}]),n}(s.Component);e.default=Object(U.a)(D.b.ADMIN)(Object(g.b)((function(t){return{colors:t.colors,setNotification:t.setNotification}}))(Object(f.withRouter)(k)));var q=h.a.div.withConfig({displayName:"changeAuthor__ButtonsContainer",componentId:"sc-12vcwsy-0"})(["width:100%;padding:8px;margin-top:8px;display:flex;justify-content:flex-end;align-items:center;"]),B=h.a.div.withConfig({displayName:"changeAuthor__Container",componentId:"sc-12vcwsy-1"})(["width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;"]),H=h.a.div.withConfig({displayName:"changeAuthor__AuthorsContainer",componentId:"sc-12vcwsy-2"})(["width:75%;display:flex;justify-content:center;margin-top:32px;align-items:center;"]),V=h.a.div.withConfig({displayName:"changeAuthor__CreatedDatesContainer",componentId:"sc-12vcwsy-3"})(["width:75%;display:flex;justify-content:center;margin-top:32px;align-items:center;"]),Y=h.a.span.withConfig({displayName:"changeAuthor__LinkText",componentId:"sc-12vcwsy-4"})(["text-decoration:underline;:hover{cursor:pointer;}"])},HKFZ:function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/tour/[id]/changeAuthor",function(){return n("7odA")}])}},[["HKFZ",0,1,16,2,3,4,5,6,7,8,9,10,11,12,13,14,15,17,18,21,29,35,48,57]]]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.