(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{578:function(e,t,r){"use strict";r.r(t);var n=r(231),o=r(467),c=r(462),l=r(572),d=r(499),v=r(202),f=r(200),h=r(133),_=r(201),w=r(85),O=r(456),m=r(502),k=r(51),y=r(209),j=(r(37),r(13),r(11),r(10),r(3),r(16),r(12),r(17),r(2)),R=r(131);function A(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(object);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,r)}return t}var P={name:"Resources",middleware:"auth",data:function(){return{loading:!0,dialogAdd:!1,newResource:{name:""}}},computed:function(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?A(Object(source),!0).forEach((function(t){Object(j.a)(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):A(Object(source)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}({},Object(R.b)("resources",["resources"])),methods:{closeAdd:function(){this.dialogAdd=!1,this.newResource={name:""}},save:function(){var e=this;this.loading=!0,this.$store.dispatch("resources/addResource",this.newResource.name).then((function(){e.loading=!1,e.closeAdd()}))}},mounted:function(){var e=this;this.$store.dispatch("resources/fetchResources").then((function(){return e.loading=!1}))}},x=P,D=r(77),component=Object(D.a)(x,(function(){var e=this,t=e._self._c;return t(o.a,{attrs:{loading:e.loading}},[t(k.a,{attrs:{color:"light-blue",dark:""}},[t(y.a,[e._v("Database Resources")]),e._v(" "),t(O.a),e._v(" "),t(n.a,{attrs:{icon:""},on:{click:function(t){e.dialogAdd=!0}}},[t(v.a,{attrs:{color:"white"}},[e._v("mdi-plus-circle")])],1)],1),e._v(" "),t(l.a,{attrs:{persistent:"",transition:"dialog-top-transition","max-width":"500"},model:{value:e.dialogAdd,callback:function(t){e.dialogAdd=t},expression:"dialogAdd"}},[t(o.a,[t(c.c,[t("span",{staticClass:"text-h5"},[e._v("Add Resource")])]),e._v(" "),t(c.b,e._l(e.newResource,(function(r,n,i){return t(m.a,{key:n,attrs:{label:n,placeholder:"new_resource"},model:{value:e.newResource[n],callback:function(t){e.$set(e.newResource,n,t)},expression:"newResource[k]"}})})),1),e._v(" "),t(c.a,[t(O.a),e._v(" "),t(n.a,{attrs:{color:"blue-darken-1",variant:"text"},on:{click:e.closeAdd}},[e._v("\n                    Cancel\n                ")]),e._v(" "),t(n.a,{attrs:{color:"blue-darken-1",variant:"text"},on:{click:e.save}},[e._v("\n                    Save\n                ")])],1)],1)],1),e._v(" "),t(f.a,[e._l(e.resources,(function(r,i){return[t(h.a,{key:r.name,attrs:{to:"/resources/".concat(r.id)}},[t(w.a,[t(w.b,[e._v("\n                        "+e._s(r.name)+"\n                    ")])],1),e._v(" "),t(_.a,[t(n.a,{attrs:{icon:"",to:"/resources/".concat(r.id)}},[t(v.a,{attrs:{color:"blue lighten-1"}},[e._v("mdi-eye")])],1)],1)],1),e._v(" "),i<e.resources.length-1?t(d.a,{key:i}):e._e()]}))],2)],1)}),[],!1,null,null,null);t.default=component.exports}}]);