text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["page-admin-project-kategori~1c00bb25"],{"586b":function(t,a,e){"use strict";e.r(a);var n=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",[e("form",{on:{submit:function(a){return a.preventDefault(),t.submit(a)}}},[e("div",{staticClass:"row justify-content-center"},[e("div",{staticClass:"col-sm-9 p-2",staticStyle:{"font-size":"12px"}},[e("div",{staticClass:"shadow p-3 rounded-lg"},[e("div",{staticClass:"sm-form"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.vdata.id,expression:"vdata.id"}],staticClass:"form-control form-control-sm",attrs:{type:"text",id:"id",name:"id",placeholder:"id",disabled:""},domProps:{value:t.vdata.id},on:{input:function(a){a.target.composing||t.$set(t.vdata,"id",a.target.value)}}})]),e("div",{staticClass:"sm-form "},[e("label",{attrs:{for:"kategori"}},[t._v("kategori")]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.vdata.kategori,expression:"vdata.kategori"}],staticClass:"form-control form-control-sm",attrs:{type:"text",id:"kategori",name:"kategori",placeholder:"kategori"},domProps:{value:t.vdata.kategori},on:{input:function(a){a.target.composing||t.$set(t.vdata,"kategori",a.target.value)}}})]),e("div",{staticClass:"mt-3 p-3"},[e("button",{staticClass:"btn btn-sm",class:"tambah"==t.btn?"btn-primary":"update"==t.btn?"btn-success":"btn-danger",attrs:{type:"submit"}},[e("span",{staticClass:"typcn typcn-info"}),t._v(" Proses "+t._s(t.btn)+" ")]),e("div",{staticClass:"float-right"},[e("button",{directives:[{name:"show",rawName:"v-show",value:"tambah"!=t.btn,expression:"btn!='tambah'"}],staticClass:"btn btn-sm btn-dark",attrs:{type:"button"},on:{click:function(a){t.btn="tambah",t.vdata={}}}},[e("span",{staticClass:"typcn typcn-edit"}),t._v(" Tambah ")]),e("button",{directives:[{name:"show",rawName:"v-show",value:"tambah"!=t.btn,expression:"btn!='tambah'"}],staticClass:"ml-3 btn btn-sm btn-danger",attrs:{type:"button"},on:{click:function(a){t.btn="delete"}}},[e("span",{staticClass:"typcn typcn-delete"}),t._v(" Delete ")])])])])]),e("div",{staticClass:"col-sm-9 p-2",staticStyle:{"font-size":"12px"}},[e("div",{staticClass:"shadow rounded-lg"},[t.datanya.length>0?e("div",{staticClass:"p-2"},[e("div",{staticClass:"text-right"},[e("vue-json-excel",{attrs:{data:t.datanya}},[e("button",{staticClass:"btn btn-sm btn-dark",attrs:{type:"button"}},[t._v(" Export "),e("span",{staticClass:"typcn typcn-chart-area"})])])],1),e("Btables",{ref:"btable",attrs:{tables:t.datanya,cari:[""],hide:["keterangan"]},on:{selected:t.ambil}})],1):t._e()])])])])])},s=[],o=e("1da1"),i=(e("96cf"),e("4b97")),r=e("6be6"),c=new i["a"],l="https://gis.officialapp.website",d={components:{Btables:r["a"]},data:function(){return{selected:!1,vdata:{},btn:"tambah",datanya:[]}},layout:"app_admin",methods:{upload:function(){var t=this,a=document.querySelector("#filenya");c.collection("tbuser",!1,l).upload(a,!0,!0).then((function(a){console.log(a),t.vdata.gambar=a,t.$forceUpdate()}))},getData:function(){var t=this;c.collection("app_portofolio_project_kategori",!1,l).doc().select("select * from app_portofolio_project_kategori").then((function(a){t.datanya=a,t.$forceUpdate()}))},ambil:function(t){this.vdata=t,this.btn="update",this.$forceUpdate()},submit:function(){var t=this;return Object(o["a"])(regeneratorRuntime.mark((function a(){var e;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:if(e=t,!confirm("Apakah yakin proses dilanjutkan ?")){a.next=19;break}if("tambah"!=t.btn){a.next=9;break}return delete t.vdata.id,a.next=6,c.collection("app_portofolio_project_kategori",!0,l).doc().set(t.vdata);case 6:e.getData(),a.next=19;break;case 9:if("update"!=t.btn){a.next=15;break}return a.next=12,c.collection("app_portofolio_project_kategori",!0,l).doc().set(t.vdata);case 12:e.getData(),a.next=19;break;case 15:if("delete"!=t.btn){a.next=19;break}return a.next=18,c.collection("app_portofolio_project_kategori",!0,l).doc(t.vdata.id)["delete"]();case 18:e.getData();case 19:case"end":return a.stop()}}),a)})))()}},mounted:function(){var t=this;return Object(o["a"])(regeneratorRuntime.mark((function a(){return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:t.getData();case 1:case"end":return a.stop()}}),a)})))()}},p=d,u=e("2877"),b=Object(u["a"])(p,n,s,!1,null,null,null);a["default"]=b.exports}}]);
  //# sourceMappingURL=page-admin-project-kategori~1c00bb25.496759bf.js.map