text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-78a89c96"],{b0c0:function(e,t,n){var r=n("83ab"),a=n("9bf2").f,o=Function.prototype,i=o.toString,u=/^\s*function ([^ (]*)/,s="name";r&&!(s in o)&&a(o,s,{configurable:!0,get:function(){try{return i.call(this).match(u)[1]}catch(e){return""}}})},d861:function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("div",{staticClass:"mb-4"},[n("h1",[e._v("Edit Senator "+e._s(e.senator.name))])]),n("b-form",{on:{submit:e.onSubmit}},[n("b-form-group",{attrs:{id:"input-group-1",label:"Name:","label-for":"input-1"}},[n("b-form-input",{attrs:{id:"input-1",type:"name",placeholder:"Enter name",required:""},model:{value:e.senator.name,callback:function(t){e.$set(e.senator,"name",t)},expression:"senator.name"}})],1),n("b-form-group",{attrs:{id:"input-group-2",label:"Email:","label-for":"input-2"}},[n("b-form-input",{attrs:{id:"input-2",type:"email",placeholder:"Enter email",required:""},model:{value:e.senator.email,callback:function(t){e.$set(e.senator,"email",t)},expression:"senator.email"}})],1),n("b-form-group",{attrs:{id:"input-group-3",label:"Phone:","label-for":"input-2"}},[n("b-form-input",{attrs:{id:"input-3",placeholder:"Enter phone no",required:""},model:{value:e.senator.phoneNumber,callback:function(t){e.$set(e.senator,"phoneNumber",t)},expression:"senator.phoneNumber"}})],1),n("b-form-group",{attrs:{id:"input-group-4",label:"Your State","label-for":"input-4"}},[n("b-form-input",{attrs:{id:"input-4",placeholder:"Enter lastname",required:""},model:{value:e.senator.state,callback:function(t){e.$set(e.senator,"state",t)},expression:"senator.state"}})],1),n("b-button",{attrs:{type:"submit",variant:"primary"}},[e._v("Update")])],1)],1)},a=[],o=n("1da1"),i=(n("96cf"),n("b0c0"),n("5e3b")),u={data:function(){return{name:"",email:"",phoneNumber:"",state:"",senator:this.senator}},mounted:function(){this.getASenator(this.$route.params.id)},methods:{onSubmit:function(e){var t=this;return Object(o["a"])(regeneratorRuntime.mark((function n(){var r,a;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return e.preventDefault(),r={email:t.email,name:t.name,phoneNumber:t.phoneNumber,state:t.state},n.next=4,i["a"].update(t.$route.params.id,r);case 4:a=n.sent,console.log("senatorLogin",a),t.$router.push({path:"/"});case 7:case"end":return n.stop()}}),n)})))()},getASenator:function(e){var t=this;return Object(o["a"])(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return console.log("idddd",e),n.next=3,i["a"].get(e);case 3:return r=n.sent,console.log("dataaaaaa",r),n.next=7,r;case 7:t.senator=n.sent;case 8:case"end":return n.stop()}}),n)})))()}}},s=u,l=n("2877"),p=Object(l["a"])(s,r,a,!1,null,null,null);t["default"]=p.exports}}]);
  //# sourceMappingURL=chunk-78a89c96.4072cc13.js.map