(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-24fb32a7"],{"4e55":function(a,t,e){"use strict";e.r(t);var s=function(){var a=this,t=a.$createElement,e=a._self._c||t;return e("div",{staticClass:"row"},[e("div",{staticClass:"col-lg-12"},[e("div",{staticClass:"card"},[e("div",{staticClass:"card-header"},[e("router-link",{staticClass:"btn btn-light btn-sm mr-1",attrs:{to:{name:"banksoal.soal",params:{banksoal_id:a.$route.params.banksoal_id}}}},[a._v("Kembali")]),e("a",{staticClass:"btn btn-primary btn-sm mr-1",attrs:{href:a.baseURL+"/download/format-input-soal-pg.docx",download:""}},[e("i",{staticClass:"flaticon-download"}),a._v(" Download format PG")]),e("a",{staticClass:"btn btn-primary btn-sm",attrs:{href:a.baseURL+"/download/format-input-soal-esay.docx",download:""}},[e("i",{staticClass:"flaticon-download"}),a._v(" Download format Esay")])],1),e("div",{staticClass:"card-body"},[e("div",{staticClass:"row"},[e("div",{staticClass:"col-md-8"},[e("div",{staticClass:"card"},[a._m(0),e("div",{staticClass:"card-body"},[a.showEditor?e("ckeditor",{attrs:{config:a.editorConfig,type:"inline"},model:{value:a.editorData,callback:function(t){a.editorData=t},expression:"editorData"}}):a._e()],1)]),a._m(1)]),e("div",{staticClass:"col-md-4"},[e("div",{staticClass:"card"},[a._m(2),e("div",{staticClass:"card-body"},[e("div",{staticClass:"form-group"},[e("label",[a._v("Tipe soal")]),e("select",{directives:[{name:"model",rawName:"v-model",value:a.tipe_soal,expression:"tipe_soal"}],staticClass:"form-control",on:{change:function(t){var e=Array.prototype.filter.call(t.target.options,(function(a){return a.selected})).map((function(a){var t="_value"in a?a._value:a.value;return t}));a.tipe_soal=t.target.multiple?e:e[0]}}},[e("option",{attrs:{value:"1"}},[a._v("Pilihan ganda")]),e("option",{attrs:{value:"2"}},[a._v("Essai")])])])])])])])]),e("div",{staticClass:"card-footer"},[e("b-button",{attrs:{variant:"primary",size:"sm",disabled:a.isLoading},on:{click:function(t){return t.preventDefault(),a.simpan(t)}}},[e("b-spinner",{directives:[{name:"show",rawName:"v-show",value:a.isLoading,expression:"isLoading"}],attrs:{small:"",type:"grow"}}),a._v(" Simpan ")],1)],1)])])])},i=[function(){var a=this,t=a.$createElement,e=a._self._c||t;return e("div",{staticClass:"card-header bg-light"},[e("b",[a._v("Soal")])])},function(){var a=this,t=a.$createElement,e=a._self._c||t;return e("div",{staticClass:"alert alert-info"},[a._v("Tekan "),e("code",[a._v("enter")]),a._v(" pada akhir baris setelah gambar terload")])},function(){var a=this,t=a.$createElement,e=a._self._c||t;return e("div",{staticClass:"card-header bg-light"},[e("b",[a._v("Setting soal")])])}],o=(e("96cf"),e("1da1")),r=e("5530"),n=e("4360"),l=e("2f62"),c=e("cecb"),d={created:function(){this.getBanksoalById(this.$route.params.banksoal_id)},data:function(){return{showEditor:!1,editorData:"",editorConfig:{extraPlugins:"sourcedialog",allowedContent:!0,filebrowserUploadUrl:"/api/v1/file/upload?",fileTools_requestHeaders:{Accept:"application/json",Authorization:"Bearer "+n["a"].state.token}},tipe_soal:1}},computed:Object(r["a"])(Object(r["a"])(Object(r["a"])({},Object(l["c"])(["isLoading","baseURL"])),Object(l["e"])(["errors","token"])),Object(l["e"])("banksoal",{banksoal:function(a){return a.banksoal}})),filters:{charIndex:function(a){return String.fromCharCode(97+a)}},methods:Object(r["a"])(Object(r["a"])({},Object(l["b"])("banksoal",["getBanksoalById","addPasteSoalBanksoal"])),{},{simpan:function(){var a=this;return Object(o["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,a.addPasteSoalBanksoal({soal:a.editorData,banksoal_id:a.$route.params.banksoal_id,tipe_soal:a.tipe_soal});case 3:t.sent,a.$bvToast.toast("Soal berhasil disimpan",Object(c["b"])()),a.editorData="",t.next=11;break;case 8:t.prev=8,t.t0=t["catch"](0),a.$bvToast.toast(t.t0.message,Object(c["a"])());case 11:case"end":return t.stop()}}),t,null,[[0,8]])})))()}}),watch:{banksoal:function(a){this.editorConfig.filebrowserUploadUrl=this.baseURL+"/api/v1/file/upload?directory_id="+this.banksoal.directory_id,this.showEditor=!0}}},u=d,b=(e("b831"),e("2877")),v=Object(b["a"])(u,s,i,!1,null,null,null);t["default"]=v.exports},"5ea4":function(a,t,e){},b831:function(a,t,e){"use strict";var s=e("5ea4"),i=e.n(s);i.a}}]);
//# sourceMappingURL=chunk-24fb32a7.e6b1f669.js.map