(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7acdbb36"],{"0ac8":function(t,e,n){"use strict";n.r(e);var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-row",[n("el-col",{attrs:{lg:{span:10,offset:7}}},[n("el-card",{directives:[{name:"loading",rawName:"v-loading.body",value:t.isLoading,expression:"isLoading",modifiers:{body:!0}}],staticClass:"overflow-visible",scopedSlots:t._u([{key:"header",fn:function(){return[n("div",[n("h2",{staticClass:"heading page-heading"},[t._v(" "+t._s(t.$t("page_description_edit.title"))+" ")]),n("CurrentUnitInfo")],1)]},proxy:!0},{key:"default",fn:function(){return[n("el-row",[n("el-col",{attrs:{span:24}},[n("v-text-editor",{model:{value:t.editorContent,callback:function(e){t.editorContent=e},expression:"editorContent"}})],1),n("el-col",{staticClass:"card-actions",attrs:{span:24}},[n("el-button",{attrs:{type:"primary"},on:{click:t.handleUpdateUnitInfo}},[t._v(" "+t._s(t.$t("page_unit_edit.btn_update"))+" ")]),n("el-button",{on:{click:t.goToUnitPage}},[t._v(" "+t._s(t.$t("page_unit_edit.btn_cancel"))+" ")])],1)],1)]},proxy:!0}])})],1)],1)},i=[],a=n("5530"),s=(n("498a"),n("1ee2")),r=n("2f62"),c=n("e29f"),u=n("24f5"),d=n("5f7e"),l={name:"UnitEditDescription",components:{CurrentUnitInfo:d["a"],VTextEditor:s["a"]},data:function(){return{editorContent:""}},computed:Object(a["a"])({},Object(r["e"])("loadingState",{isLoading:function(t){return t.isLoading}})),created:function(){this.fetchEditorContent()},methods:{fetchEditorContent:function(){var t=this,e=this.$route.params.unitID;Object(c["c"])(e).then((function(e){t.editorContent=e}))["catch"]((function(e){t.$message({showClose:!1,type:"error",message:"".concat(t.$t(e))})}))},handleUpdateUnitInfo:function(){var t=this;if(this.editorContent.trim()){var e=this.$route.params.unitID;Object(c["i"])(e,this.editorContent).then((function(){t.goToUnitPage(),t.$message({showClose:!1,type:"success",message:"".concat(t.$t("page_unit_edit.messages.edit_success"))})}))["catch"]((function(e){t.$message({showClose:!1,type:"error",message:"".concat(t.$t(e))})}))}else this.$message({showClose:!1,type:"error",message:"".concat(this.$t("validators.cannot_be_empty"))})},goToUnitPage:function(){var t=this.$route.params.unitID;this.$router.push({name:u["z"],params:{unitID:t}})}}},f=l,p=(n("f2ee"),n("2877")),h=Object(p["a"])(f,o,i,!1,null,"333ebd73",null);e["default"]=h.exports},4140:function(t,e,n){},"498a":function(t,e,n){"use strict";var o=n("23e7"),i=n("58a8").trim,a=n("c8d2");o({target:"String",proto:!0,forced:a("trim")},{trim:function(){return i(this)}})},c8d2:function(t,e,n){var o=n("5e77").PROPER,i=n("d039"),a=n("5899"),s="​᠎";t.exports=function(t){return i((function(){return!!a[t]()||s[t]()!==s||o&&a[t].name!==t}))}},f2ee:function(t,e,n){"use strict";n("4140")}}]);
//# sourceMappingURL=chunk-7acdbb36.280cb778.js.map