{"version":3,"sources":["webpack:///src/views/Notes/Notes.vue","webpack:///./src/views/Notes/Notes.vue","webpack:///./src/views/Notes/Notes.vue?9be6","webpack:///./src/views/Notes/Notes.vue?51f8","webpack:///./src/views/Notes/Notes.vue?ac49"],"names":["components","NoteItem","Pagination","props","data","locationId","Number","$route","params","notes","page","itemsPerPage","morePages","isLoading","computed","created","_this","_asyncToGenerator","_regenerator","m","_callee","w","_context","n","getLocationNotes","a","methods","_this2","_callee2","_context2","noteProvider","then","response","status","Results","MorePages","finally","pageSelected","_this3","_callee3","self","_context3","render","_vm","_c","_self","staticClass","_v","_l","note","index","key","attrs","showLink","currentPage","on","_e","staticRenderFns","_withStripped"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBA;AAEe;EACfA,UAAA;IACAC,QAAA,WAAAA,SAAA;MAAA;IAAA;IACAC,UAAA,WAAAA,WAAA;MAAA;IAAA;EACA;EAEAC,KAAA;EAEAC,IAAA,WAAAA,KAAA;IACA;MACAC,UAAA,EAAAC,MAAA,MAAAC,MAAA,CAAAC,MAAA,CAAAH,UAAA;MACAI,KAAA;MACAC,IAAA;MACAC,YAAA;MACAC,SAAA;MACAC,SAAA;IACA;EACA;EAEAC,QAAA;EAEAC,OAAA,WAAAA,QAAA;IAAA,IAAAC,KAAA;IAAA,OAAAC,oIAAA,cAAAC,+HAAA,GAAAC,CAAA,UAAAC,QAAA;MAAA,OAAAF,+HAAA,GAAAG,CAAA,WAAAC,QAAA;QAAA,kBAAAA,QAAA,CAAAC,CAAA;UAAA;YAAAD,QAAA,CAAAC,CAAA;YAAA,OACAP,KAAA,CAAAQ,gBAAA;UAAA;YAAA,OAAAF,QAAA,CAAAG,CAAA;QAAA;MAAA,GAAAL,OAAA;IAAA;EACA;EAEAM,OAAA;IACAF,gBAAA,WAAAA,iBAAA;MAAA,IAAAG,MAAA;MAAA,OAAAV,oIAAA,cAAAC,+HAAA,GAAAC,CAAA,UAAAS,SAAA;QAAA,OAAAV,+HAAA,G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AACA;;AAEA;;AAEA;AACA,IAAI,KAAU,EAAE,YAiBf;AACD;AACe,gF;;;;;;;;;;;;;ACtCf;AAA6R,CAAgB,uUAAG,EAAC,C;;;;;;;;;;;;;ACAjT;AAAA;AAAA;AAAA;AAAA","file":"js/notes-list.js?id=8ca139f9596444d59015","sourcesContent":["<template>\n  <div>\n    <p class=\"title\">Notes</p>\n    <div v-for=\"(note, index) in notes\" :key=\"index\">\n      <NoteItem :note=\"note\" :showLink=\"true\" />\n    </div>\n\n    <div>\n      <Pagination\n        v-if=\"(!isLoading && morePages > 0) || page > 1\"\n        :currentPage=\"page\"\n        :morePages=\"morePages\"\n        @pageSelected=\"pageSelected\"\n      />\n    </div>\n  </div>\n</template>\n\n<script>\nimport noteProvider from '@/providers/note'\n\nexport default {\n  components: {\n    NoteItem: () => import('@/components/Notes/NoteItem'),\n    Pagination: () => import('@/components/UI/Pagination'),\n  },\n\n  props: {},\n\n  data() {\n    return {\n      locationId: Number(this.$route.params.locationId),\n      notes: [],\n      page: 1,\n      itemsPerPage: 25,\n      morePages: 0,\n      isLoading: false,\n    }\n  },\n\n  computed: {},\n\n  async created() {\n    await this.getLocationNotes()\n  },\n\n  methods: {\n    async getLocationNotes() {\n      if (!this.isLoading) {\n        this.isLoading = true\n        await noteProvider.methods\n          .getLocationNotes(this.locationId, this.page, this.itemsPerPage)\n          .then((response) => {\n            if (response.status === 200) {\n              this.notes = response.data.Results\n              this.morePages = response.data.MorePages\n            }\n          })\n          .finally(() => {\n            this.isLoading = false\n          })\n      }\n    },\n\n    async pageSelected(page) {\n      let self = this\n      self.notes = []\n      self.page = page\n\n      await self.getLocationNotes()\n    },\n  },\n}\n</script>\n\n<style></style>\n","var render = function render() {\n  var _vm = this,\n    _c = _vm._self._c\n  return _c(\n    \"div\",\n    [\n      _c(\"p\", { staticClass: \"title\" }, [_vm._v(\"Notes\")]),\n      _vm._l(_vm.notes, function (note, index) {\n        return _c(\n          \"div\",\n          { key: index },\n          [_c(\"NoteItem\", { attrs: { note: note, showLink: true } })],\n          1\n        )\n      }),\n      _c(\n        \"div\",\n        [\n          (!_vm.isLoading && _vm.morePages > 0) || _vm.page > 1\n            ? _c(\"Pagination\", {\n                attrs: { currentPage: _vm.page, morePages: _vm.morePages },\n                on: { pageSelected: _vm.pageSelected },\n              })\n            : _vm._e(),\n        ],\n        1\n      ),\n    ],\n    2\n  )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","import { render, staticRenderFns } from \"./Notes.vue?vue&type=template&id=55789409\"\nimport script from \"./Notes.vue?vue&type=script&lang=js\"\nexport * from \"./Notes.vue?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\n/* hot reload */\nif (module.hot) {\n  var api = require(\"/github/workspace/node_modules/vue-hot-reload-api/dist/index.js\")\n  api.install(require('vue'))\n  if (api.compatible) {\n    module.hot.accept()\n    if (!api.isRecorded('55789409')) {\n      api.createRecord('55789409', component.options)\n    } else {\n      api.reload('55789409', component.options)\n    }\n    module.hot.accept(\"./Notes.vue?vue&type=template&id=55789409\", function () {\n      api.rerender('55789409', {\n        render: render,\n        staticRenderFns: staticRenderFns\n      })\n    })\n  }\n}\ncomponent.options.__file = \"src/views/Notes/Notes.vue\"\nexport default component.exports","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Notes.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Notes.vue?vue&type=script&lang=js\"","export * from \"-!../../../node_modules/cache-loader/dist/cjs.js?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"d2a26fb4-vue-loader-template\\\"}!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Notes.vue?vue&type=template&id=55789409\""],"sourceRoot":""}