1 line
No EOL
4 KiB
JavaScript
1 line
No EOL
4 KiB
JavaScript
webpackJsonp([1,2],{182:function(t,e,c){"use strict";function n(t){c(188)}Object.defineProperty(e,"__esModule",{value:!0});var a=c(190),o=c(191),i=c(5),r=n,l=i(a.a,o.a,r,null,null);e.default=l.exports},184:function(t,e,c){"use strict";function n(t){c(196)}Object.defineProperty(e,"__esModule",{value:!0});var a=c(198),o=c(199),i=c(5),r=n,l=i(a.a,o.a,r,null,null);e.default=l.exports},188:function(t,e,c){var n=c(189);"string"==typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);c(181)("59efb0dd",n,!0)},189:function(t,e,c){e=t.exports=c(180)(void 0),e.push([t.i,"",""])},190:function(t,e,c){"use strict";var n=c(4),a=c(30);c.n(a);e.a={components:{QBtn:n.c,QCheckbox:n.i,QCollapsible:n.k,QField:n.o,QIcon:n.q,QInput:n.r,QToggle:n.K},props:["account"],data:function(){return{}},validations:{account:{name:{required:a.required,minLength:Object(a.minLength)(3)},email:{required:a.required,email:a.email},roles:{required:a.required,minLength:Object(a.minLength)(1)}}},methods:{clearForm:function(){this.$refs.createAccount.close(),this.account={name:"",email:"",roles:["account"],active:!0},this.$v.account.$reset()}}}},191:function(t,e,c){"use strict";var n=function(){var t=this,e=t.$createElement,c=t._self._c||e;return c("div",[c("h5",[t._t("title")],2),c("q-field",{attrs:{icon:"account_box",label:"Name",error:t.$v.account.name.$error,"error-label":"Minimum "+t.$v.account.name.$params.minLength.min+" characters"}},[c("q-input",{attrs:{placeholder:"Account Name"},on:{input:function(e){t.$v.account.name.$touch()}},model:{value:t.account.name,callback:function(e){t.account.name="string"==typeof e?e.trim():e},expression:"account.name"}})],1),c("q-field",{attrs:{icon:"mail",label:"Email",error:t.$v.account.email.$error,"error-label":"Not a valid email address"}},[c("q-input",{attrs:{placeholder:"Email Address"},on:{input:function(e){t.$v.account.email.$touch()}},model:{value:t.account.email,callback:function(e){t.account.email="string"==typeof e?e.trim():e},expression:"account.email"}})],1),c("q-field",{attrs:{icon:"supervisor_account",label:"Roles",error:t.$v.account.roles.$error,"error-label":"Choose at least one role"}},[c("q-checkbox",{attrs:{label:"User",val:"user"},on:{focus:function(e){t.$v.account.roles.$touch()}},model:{value:t.account.roles,callback:function(e){t.account.roles=e},expression:"account.roles"}}),c("q-checkbox",{staticClass:"on-right",attrs:{label:"Admin",val:"admin"},model:{value:t.account.roles,callback:function(e){t.account.roles=e},expression:"account.roles"}})],1),c("q-field",{attrs:{icon:"check_circle",label:"Active"}},[c("q-toggle",{model:{value:t.account.active,callback:function(e){t.account.active=e},expression:"account.active"}})],1),c("div",{staticClass:"row justify-end"},[t._t("actions")],2)],1)},a=[],o={render:n,staticRenderFns:a};e.a=o},196:function(t,e,c){var n=c(197);"string"==typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);c(181)("10217b28",n,!0)},197:function(t,e,c){e=t.exports=c(180)(void 0),e.push([t.i,".editAccount{padding:25px}",""])},198:function(t,e,c){"use strict";var n=c(9),a=c.n(n),o=c(182),i=c(4);e.a={components:{AccountForm:o.default,QBtn:i.c,QModal:i.A},props:["account"],data:function(){return{editAccount:a()({},this.account),loading:!1}},methods:{updateAccount:function(){var t=this;this.loading=!0,this.axios.put("/admin/accounts/"+this.account.id,this.editAccount).then(function(e){t.$emit("accountUpdated",e.data),i.O.create.positive({html:"Account updated"})},function(t){i.O.create.negative({html:t.response.data.error})}),this.loading=!1},cancelUpdate:function(){this.$emit("cancelUpdate")}}}},199:function(t,e,c){"use strict";var n=function(){var t=this,e=t.$createElement,c=t._self._c||e;return t.account?c("div",[c("account-form",{attrs:{account:t.editAccount}},[c("div",{slot:"title"},[t._v("Edit "+t._s(t.account.name))]),c("div",{staticClass:"on-right",slot:"actions"},[c("q-btn",{on:{click:t.cancelUpdate}},[t._v("Cancel")]),c("q-btn",{staticClass:"on-right",attrs:{disabled:t.loading,color:"primary"},on:{click:t.updateAccount}},[t._v("Update")])],1)])],1):t._e()},a=[],o={render:n,staticRenderFns:a};e.a=o}}); |