webpackJsonp([238],{"6xa1":function(r,e,t){"use strict";var s={render:function(){var r=this,e=r.$createElement,t=r._self._c||e;return t("div",{staticClass:"container-fluid"},[t("div",{staticClass:"error-form"},[t("h2",{staticClass:"error-header"},[r._v(r._s(r.translate("errorReport")))]),r._v(" "),t("p",{staticClass:"error-message",domProps:{innerHTML:r._s(r.errorMessage)}}),r._v(" "),t("div",{staticClass:"m-top-10"},[r._v("\n            "+r._s(r.translate("errorFormText"))+"\n        ")]),r._v(" "),t("textarea",{directives:[{name:"model",rawName:"v-model",value:r.error,expression:"error"}],staticClass:"form-control",attrs:{cols:"30",rows:"10"},domProps:{value:r.error},on:{input:function(e){e.target.composing||(r.error=e.target.value)}}}),r._v(" "),t("div",{staticClass:"row margin-0 m-top-10"},[t("button",{staticClass:"btn btn-primary width-150 pull-left",on:{click:function(e){return r.submitForm()}}},[r._v(r._s(r.translate("submit")))]),r._v(" "),t("button",{staticClass:"btn btn-default width-150 pull-right",on:{click:function(e){return r.closeForm()}}},[r._v(r._s(r.translate("close")))])]),r._v(" "),t("div",{staticClass:"clearfix"})])])},staticRenderFns:[]};e.a=s},Aa3R:function(r,e,t){"use strict";var s=t("pFYg"),a=t.n(s),o=t("Xxa5"),n=t.n(o),i=t("mvHQ"),c=t.n(i),u=t("exGp"),l=t.n(u),d=t("yxUK");e.a={name:"error_form",data:function(){return{errorMessage:"",error:"",loading:!1,previousRoute:null}},beforeRouteEnter:function(r,e,t){t(function(r){r.previousRoute=e.fullPath})},methods:{closeForm:function(){var r=this.previousRoute&&"/error/form"!=this.previousRoute?this.previousRoute:"client"==d.a.getType()||"vendor"==d.a.getType()?"/clients/management/analytics_dashboard":"agent"==d.a.getType()?"/agents/management/agent_dashboard":"/statistics/dashboard";this.$router.push({path:r,query:{disableFetch:!0}}).catch(function(){})},submitForm:function(){var r=this;return l()(n.a.mark(function e(){var t,s,a,o;return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r.loading=!0,r._checkErrorMessage(),e.prev=2,t=Api.getEndpointUrl()+"/ticket/create",s={ticket_type:"Issue",subject:"error",url:Storage.get("previousRoute"),department:"Admin",content:r.error},e.next=7,r.$http.post(t,s.removeEmpty());case 7:if(!(a=e.sent).body.success){e.next=13;break}return e.next=11,r.$http.patch(Api.getEndpointUrl()+"/ticket/"+a.body.object_id+"/send");case 11:e.sent.body.success&&r._showSuccessMessage(r.translate("errorReportSent"));case 13:r.moveToPreviousRoute("/routing/trunks"),e.next=23;break;case 16:if(e.prev=16,e.t0=e.catch(2),e.t0.data){e.next=20;break}return e.abrupt("return");case 20:o="",e.t0.data.errors?o=c()(e.t0.data.errors):e.t0.data.error&&(o=e.t0.data.error.message),r._showErrorMessage(o);case 23:return e.prev=23,r.loading=!1,e.finish(23);case 26:case"end":return e.stop()}},e,r,[[2,16,23,26]])}))()},_checkErrorMessage:function(){var r=Storage.get("errorForm.passedErrors")?Storage.get("errorForm.passedErrors"):[];r.indexOf(this.errorMessage)<0&&r.push(this.errorMessage),Storage.set("errorForm.passedErrors",r)}},created:function(){this.errorMessage=Storage.get("errorForm.errorMessage")?Storage.get("errorForm.errorMessage"):"",this.error=Storage.get("errorForm.error"),"object"==a()(this.error)&&(this.error=this.error.message)}}},b3e1:function(r,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=t("Aa3R"),a=t("6xa1");var o=function(r){t("gBrz")},n=t("VU/8")(s.a,a.a,!1,o,"data-v-af181420",null);e.default=n.exports},gBrz:function(r,e){}});