text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2f799fe8"],{"4ca7":function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("b-row",[a("b-col",{attrs:{md:"12"}},[a("b-card",{attrs:{"header-tag":"header","footer-tag":"footer"}},[a("div",{attrs:{slot:"header"},slot:"header"},[a("i",{staticClass:"fa fa-align-justify"}),a("strong",[e._v("Product")])]),a("b-list-group",[a("b-list-group-item",{staticClass:"flex-column align-items-start",attrs:{href:"#"}},[a("div",{staticClass:"d-flex w-100 justify-content-between"},[a("h5",{staticClass:"mb-1"},[e._v(e._s(e.posts.product_name))]),a("small",[e._v(e._s(e.posts.price))])]),a("p",{staticClass:"mb-1"},[e._v("\n                "+e._s(e.posts.long_description)+"\n              ")]),a("small",[e._v(e._s(e.posts.short_description))])])],1)],1),a("b-card",[a("div",{attrs:{slot:"header"},slot:"header"},[a("strong",[e._v("Update/Delete")]),e._v(" Product\n        ")]),a("b-form",{on:{submit:function(t){return t.preventDefault(),e.updateData(t)}}},[a("b-form-group",{attrs:{description:"The products full name.",label:"Product Name","label-for":"basicName","label-cols":3,horizontal:!0}},[a("b-form-input",{attrs:{id:"basicName",value:e.posts.product_name,type:"text",autocomplete:"name"},model:{value:e.posts.product_name,callback:function(t){e.$set(e.posts,"product_name",t)},expression:"posts.product_name"}})],1),a("b-form-group",{attrs:{description:"The price of the product",label:"Price","label-for":"basicText","label-cols":3,horizontal:!0}},[a("b-form-input",{attrs:{id:"basicText",value:e.posts.price,type:"text"},model:{value:e.posts.price,callback:function(t){e.$set(e.posts,"price",t)},expression:"posts.price"}})],1),a("b-form-group",{attrs:{description:"A short description of the product",label:"Short Description","label-for":"basicText","label-cols":3,horizontal:!0}},[a("b-form-input",{attrs:{id:"basicText",value:e.posts.short_description,type:"text"},model:{value:e.posts.short_description,callback:function(t){e.$set(e.posts,"short_description",t)},expression:"posts.short_description"}})],1),a("b-form-group",{attrs:{label:"Detailed Description","label-for":"basicTextarea","label-cols":3,horizontal:!0}},[a("b-form-input",{attrs:{value:e.posts.long_description,id:"basicTextarea",textarea:!0,rows:9,placeholder:"Detailed Description of the Product"},model:{value:e.posts.long_description,callback:function(t){e.$set(e.posts,"long_description",t)},expression:"posts.long_description"}})],1),a("b-form-group",{attrs:{label:"Keywords","label-for":"basicMultiSelect","label-cols":3,horizontal:!0}},[a("b-form-select",{attrs:{id:"basicMultiSelect",plain:!0,multiple:!0,options:[{text:"Please select some item",value:null},{text:"This is First option",value:"a"},{text:"Default Selected Option",value:"b"},{text:"This is another option",value:"c"},{text:"This one is disabled",value:"d",disabled:!0}],value:[null,"c"]},model:{value:e.posts.search_keywords,callback:function(t){e.$set(e.posts,"search_keywords",t)},expression:"posts.search_keywords"}})],1),a("b-form-group",{attrs:{label:"Search Keywords","label-for":"basicMultiSelect","label-cols":3,horizontal:!0}},[a("b-form-select",{attrs:{id:"basicMultiSelect",plain:!0,multiple:!0,options:[{text:"Please select some item",value:null},{text:"This is First option",value:"a"},{text:"Default Selected Option",value:"b"},{text:"This is another option",value:"c"},{text:"This one is disabled",value:"d",disabled:!0}],value:[null,"c"]},model:{value:e.posts.keywords,callback:function(t){e.$set(e.posts,"keywords",t)},expression:"posts.keywords"}})],1),a("div",{attrs:{slot:"footer"},slot:"footer"},[a("b-button",{attrs:{type:"submit",size:"sm",variant:"primary"}},[a("i",{staticClass:"fa fa-dot-circle-o"}),e._v(" Submit")]),a("b-button",{attrs:{type:"submit",size:"sm",variant:"danger"},on:{click:function(t){return e.delData()}}},[a("i",{staticClass:"fa fa-ban"}),e._v(" Delete")])],1)],1)],1)],1)],1)},r=[],o=(a("96cf"),a("3b8d")),n=(a("28a5"),a("f1fb")),i=a("bc3a"),l=a.n(i),c=a("b955"),u=a("78de"),p=a("e7ce"),d=a("97b8"),m=a("ea9d"),f=a("e6ad"),b=a("1eaf"),h=window.location.href,v=h.split("product/",24).pop();console.log(v);var g={name:"dashboard",components:{Callout:n["d"],CardLine1ChartExample:c["a"],CardLine2ChartExample:u["a"],CardLine3ChartExample:p["a"],CardBarChartExample:d["a"],MainChartExample:m["a"],SocialBoxChartExample:f["a"],CalloutChartExample:b["a"]},data:function(){return{selected:"Month",errors:[],posts:{product_name:"",subtitle:"",short_description:"",long_description:"",price:"",keywords:"",search_keywords:"",_id:v},response:"",tableItems:[{avatar:{url:"img/avatars/1.jpg",status:"success"},user:{name:"Yiorgos Avraamu",new:!0,registered:"Jan 1, 2015"},country:{name:"USA",flag:"us"},usage:{value:50,period:"Jun 11, 2015 - Jul 10, 2015"},payment:{name:"Mastercard",icon:"fa fa-cc-mastercard"},activity:"10 sec ago"},{avatar:{url:"img/avatars/2.jpg",status:"danger"},user:{name:"Avram Tarasios",new:!1,registered:"Jan 1, 2015"},country:{name:"Brazil",flag:"br"},usage:{value:22,period:"Jun 11, 2015 - Jul 10, 2015"},payment:{name:"Visa",icon:"fa fa-cc-visa"},activity:"5 minutes ago"},{avatar:{url:"img/avatars/3.jpg",status:"warning"},user:{name:"Quintin Ed",new:!0,registered:"Jan 1, 2015"},country:{name:"India",flag:"in"},usage:{value:74,period:"Jun 11, 2015 - Jul 10, 2015"},payment:{name:"Stripe",icon:"fa fa-cc-stripe"},activity:"1 hour ago"},{avatar:{url:"img/avatars/4.jpg",status:""},user:{name:"Enéas Kwadwo",new:!0,registered:"Jan 1, 2015"},country:{name:"France",flag:"fr"},usage:{value:98,period:"Jun 11, 2015 - Jul 10, 2015"},payment:{name:"PayPal",icon:"fa fa-paypal"},activity:"Last month"},{avatar:{url:"img/avatars/5.jpg",status:"success"},user:{name:"Agapetus Tadeáš",new:!0,registered:"Jan 1, 2015"},country:{name:"Spain",flag:"es"},usage:{value:22,period:"Jun 11, 2015 - Jul 10, 2015"},payment:{name:"Google Wallet",icon:"fa fa-google-wallet"},activity:"Last week"},{avatar:{url:"img/avatars/6.jpg",status:"danger"},user:{name:"Friderik Dávid",new:!0,registered:"Jan 1, 2015"},country:{name:"Poland",flag:"pl"},usage:{value:43,period:"Jun 11, 2015 - Jul 10, 2015"},payment:{name:"Amex",icon:"fa fa-cc-amex"},activity:"Last week"}],tableFields:{avatar:{label:'<i class="icon-people"></i>',class:"text-center"},user:{label:"User"},country:{label:"Country",class:"text-center"},usage:{label:"Usage"},payment:{label:"Payment method",class:"text-center"},activity:{label:"Activity"}}}},mounted:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(){var t=this;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:l.a.get("https://selacious-cloud-siteapi.herokuapp.com/products/".concat(v)).then(function(e){t.posts=e.data});case 1:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}(),methods:{variant:function(e){var t;return e<=25?t="info":e>25&&e<=50?t="success":e>50&&e<=75?t="warning":e>75&&e<=100&&(t="danger"),t},flag:function(e){return"flag-icon flag-icon-"+e},updateData:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(){var t=this;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:l.a.put("https://selacious-cloud-siteapi.herokuapp.com/products/".concat(v),this.posts).then(function(e){console.log(e),t.$router.push("/product")});case 1:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}(),delData:function(){var e=Object(o["a"])(regeneratorRuntime.mark(function e(){var t=this;return regeneratorRuntime.wrap(function(e){while(1)switch(e.prev=e.next){case 0:l()({method:"DELETE",url:"https://selacious-cloud-siteapi.herokuapp.com/products/".concat(v),data:this.posts,headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(e){t.posts=e.data,t.$router.push("/product")},function(e){console.error(e)});case 1:case"end":return e.stop()}},e,this)}));function t(){return e.apply(this,arguments)}return t}()}},y=g,w=(a("948c"),a("2877")),x=Object(w["a"])(y,s,r,!1,null,null,null);t["default"]=x.exports},"8a16":function(e,t,a){},"948c":function(e,t,a){"use strict";var s=a("8a16"),r=a.n(s);r.a}}]);
  //# sourceMappingURL=chunk-2f799fe8.f25c9985.js.map