{"version":3,"sources":["webpack:///./src/views/Posts/components/PostList/Index.vue","webpack:///./src/views/Posts/components/PostList","webpack:///./src/views/Posts/components/PostList/attrs/methods.js","webpack:///./src/views/Posts/components/PostList/attrs/mounted.js","webpack:///./src/views/Posts/components/PostList/Index.vue?53a8","webpack:///./src/views/Posts/components/PostList/Index.vue?84fc","webpack:///./src/views/Posts/components/PostList/index.js","webpack:///./src/views/Posts/components/PostList/attrs/data.js"],"names":["component","loadPosts","self","this","api","getApiClient","$store","get","then","result","posts","data","catch","error","console","log","editPost","postId","$router","push","render","_vm","_h","$createElement","_c","_self","_v","attrs","fields","scopedSlots","_u","key","fn","ref","item","_s","roles","length","$parent","on","$event","id","staticRenderFns","name","methods","mounted","label"],"mappings":"kHAAA,oIAOIA,EAAY,qBACd,aACA,YACA,sBACA,EACA,KACA,KACA,MAIa,aAAAA,E,2CClBf,wGAAoP,2B,kCCApP,uBAEe,cACXC,UAAW,WACP,IAAMC,EAAOC,KACTC,EAAMC,qBAAaH,EAAKI,QAE5BF,EAAIG,IAAI,SACHC,MAAK,SAAAC,GACFP,EAAKQ,MAAQD,EAAOE,KAAK,mBAE5BC,OAAM,SAAAC,GACHC,QAAQC,IAAIF,OAIxBG,SAAU,SAASC,GACfd,KAAKe,QAAQC,KAAb,sBAAiCF,O,oCCjBzC,OAAe,wBACX,IAAMf,EAAOC,KAEbD,EAAKD,c,kCCHT,kGAAImB,EAAS,WAAa,IAAIC,EAAIlB,KAASmB,EAAGD,EAAIE,eAAmBC,EAAGH,EAAII,MAAMD,IAAIF,EAAG,OAAOE,EAAG,QAAQ,CAACA,EAAG,YAAY,CAACA,EAAG,KAAK,CAACH,EAAIK,GAAG,oBAAoBF,EAAG,aAAa,CAACG,MAAM,CAAC,MAAQN,EAAIX,MAAM,OAASW,EAAIO,OAAO,iBAAiB,EAAE,MAAQ,GAAG,WAAa,IAAIC,YAAYR,EAAIS,GAAG,CAAC,CAACC,IAAI,QAAQC,GAAG,SAASC,GAC1T,IAAIC,EAAOD,EAAIC,KACf,MAAO,CAACV,EAAG,KAAK,CAACH,EAAIK,GAAG,IAAIL,EAAIc,GAAGD,EAAKE,MAAMC,OAAShB,EAAIiB,QAAQF,MAAMF,EAAKE,OAAS,SAAS,UAAU,CAACL,IAAI,UAAUC,GAAG,SAASC,GACrI,IAAIC,EAAOD,EAAIC,KACf,MAAO,CAACV,EAAG,KAAK,CAACA,EAAG,eAAe,CAACA,EAAG,UAAU,CAACG,MAAM,CAAC,MAAQ,QAAQY,GAAG,CAAC,MAAQ,SAASC,GAAQ,OAAOnB,EAAIL,SAASkB,EAAKO,OAAO,CAACjB,EAAG,QAAQ,CAACG,MAAM,CAAC,KAAO,gBAAgBN,EAAIK,GAAG,aAAa,GAAGF,EAAG,UAAU,CAACG,MAAM,CAAC,MAAQ,WAAW,CAACH,EAAG,QAAQ,CAACG,MAAM,CAAC,KAAO,eAAeN,EAAIK,GAAG,aAAa,IAAI,IAAI,WAAW,IAAI,IACjUgB,EAAkB,I,kCCLtB,yG,kCCAA,+CAIe,cACXC,KAAM,WACNhC,kBACAiC,qBACAC,uB,kCCRJ,OAAe,wBACX,MAAO,CACHnC,MAAO,GACPkB,OAAQ,CACJ,CACIG,IAAK,QACLe,MAAO,UAEX,CACIf,IAAK,SACLe,MAAO,UAEX,CACIf,IAAK,QACLe,MAAO,mBAEX,CACIf,IAAK,UACLe,MAAO","file":"js/chunk-f101eb7e.a7367e66.js","sourcesContent":["import { render, staticRenderFns } from \"./Index.vue?vue&type=template&id=70799f09&\"\nimport script from \"./index.js?vue&type=script&lang=js&\"\nexport * from \"./index.js?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!./index.js?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!./index.js?vue&type=script&lang=js&\"","import getApiClient from '@/plugins/api-client'\n\nexport default {\n loadPosts: function() {\n const self = this,\n api = getApiClient(self.$store)\n\n api.get('posts')\n .then(result => {\n self.posts = result.data['hydra:member']\n })\n .catch(error => {\n console.log(error)\n })\n },\n\n editPost: function(postId) {\n this.$router.push(`/posts/edit/${postId}`)\n }\n}\n","export default function() {\n const self = this\n\n self.loadPosts()\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('CCard',[_c('CCardBody',[_c('h1',[_vm._v(\"Todos os posts\")]),_c('CDataTable',{attrs:{\"items\":_vm.posts,\"fields\":_vm.fields,\"items-per-page\":5,\"hover\":\"\",\"pagination\":\"\"},scopedSlots:_vm._u([{key:\"roles\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('td',[_vm._v(\" \"+_vm._s(item.roles.length ? _vm.$parent.roles[item.roles] : 'Todos')+\" \")])]}},{key:\"actions\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('td',[_c('CButtonGroup',[_c('CButton',{attrs:{\"color\":\"info\"},on:{\"click\":function($event){return _vm.editPost(item.id)}}},[_c('CIcon',{attrs:{\"name\":\"cil-pencil\"}}),_vm._v(\" Editar \")],1),_c('CButton',{attrs:{\"color\":\"danger\"}},[_c('CIcon',{attrs:{\"name\":\"cil-trash\"}}),_vm._v(\" Apagar \")],1)],1)],1)]}}])})],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"7d6964bc-vue-loader-template\\\"}!../../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Index.vue?vue&type=template&id=70799f09&\"","import data from './attrs/data'\nimport methods from './attrs/methods'\nimport mounted from './attrs/mounted'\n\nexport default {\n name: 'PostList',\n data,\n methods,\n mounted\n}\n","export default function() {\n return {\n posts: [],\n fields: [\n {\n key: 'title',\n label: 'Título'\n },\n {\n key: 'status',\n label: 'Status'\n },\n {\n key: 'roles',\n label: 'Tipo de usuário'\n },\n {\n key: 'actions',\n label: 'Ações'\n }\n ]\n }\n}\n"],"sourceRoot":""}