text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-e22342a6"],{6350:function(t,e,a){"use strict";a.d(e,"d",function(){return s}),a.d(e,"c",function(){return o}),a.d(e,"a",function(){return r}),a.d(e,"e",function(){return l}),a.d(e,"b",function(){return c});var n=a("b775"),i="ajax/";function s(t){return Object(n["a"])({url:i+"testimonials",method:"get",params:t})}function o(t){return Object(n["a"])({url:i+"testimonials/"+t,method:"get"})}function r(t){return Object(n["a"])({url:i+"testimonials",method:"post",data:t})}function l(t,e){return Object(n["a"])({url:i+"testimonials/"+t,method:"patch",data:e})}function c(t){return Object(n["a"])({url:i+"testimonials/"+t,method:"delete"})}},bf1a:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("main",{attrs:{id:"main-container"}},[a("div",{staticClass:"content"},[a("div",{staticClass:"block block-rounded block-bordered"},[a("div",{staticClass:"block-header block-header-default"},[a("h3",{staticClass:"block-title"},[t._v(t._s(t.$t("List testimonials")))])]),a("div",{staticClass:"block-content"},[a("table",{staticClass:"table table-bordered table-striped table-vcenter"},[a("thead",[a("tr",t._l(t.headers,function(e,n){return a("th",{key:n},[t._v(" "+t._s(e.text))])}),0)]),a("tbody",t._l(t.items,function(e,n){return a("tr",{key:n},[a("td",[t._v(t._s(e.author))]),a("td",[t._v(t._s(t.getStatus(e.status)))]),a("td",[t._v(t._s(t.moment(e.created_at,"YYYY-MM-DD").format("DD/MM/YYYY")))]),a("td",{staticClass:"text-center"},[a("div",{staticClass:"btn-group"},[a("router-link",{attrs:{to:"/testimonials/edit/"+e.id}},[a("button",{staticClass:"btn btn-sm btn-primary js-tooltip-enabled mr-1",attrs:{type:"button","data-toggle":"tooltip",title:"","data-original-title":"Edit"}},[a("i",{staticClass:"fa fa-pencil-alt"})])]),a("a",[a("button",{staticClass:"btn btn-sm btn-primary js-tooltip-enabled",attrs:{type:"button","data-toggle":"tooltip",title:"","data-original-title":"Delete"},on:{click:function(a){return a.preventDefault(),t.deleteItem(e.id)}}},[a("i",{staticClass:"fa fa-times"})])])],1)])])}),0)])])])])])},i=[],s=a("6350"),o={name:"TestimonialsList",data:function(){return{headers:[{sortable:!1,text:"Khách hàng",value:"title"},{sortable:!1,text:"Trạng thái",value:"status"},{sortable:!1,text:"Ngày tạo",value:"created_at"},{sortable:!1,text:"Action",align:"right"}],items:[],list:null,total:0,listLoading:!0}},created:function(){this.getList()},methods:{getList:function(){var t=this;this.listLoading=!0,Object(s["d"])().then(function(e){t.items=e})},getStatus:function(t){switch(t){case 1:return"Xuất bản";default:return"Bản nháp"}},deleteItem:function(t){var e=this,a=confirm("Bạn có thực sự muốn xóa bài đánh giá này?");1==a&&Object(s["b"])(t).then(function(t){Dashmix.helpers("notify",{type:"success",icon:"fa fa-success mr-1",message:"Xóa thành công."}),e.getList()},function(t){Dashmix.helpers("notify",{type:"danger",icon:"fa fa-times mr-1",message:"Không xóa được. Vui lòng thử lại."})})}}},r=o,l=a("2877"),c=Object(l["a"])(r,n,i,!1,null,"604300fe",null);e["default"]=c.exports}}]);
  //# sourceMappingURL=chunk-e22342a6.003cb12e.js.map