You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
1.5 KiB

  1. <template>
  2. <v-bottom-navigation
  3. app
  4. absolute
  5. hide-on-scroll
  6. >
  7. <v-btn @click="prevPage">
  8. <span>Prev</span>
  9. <v-icon>mdi-chevron-left</v-icon>
  10. </v-btn>
  11. <!-- <v-btn @click="approveDocument">
  12. <span>Done</span>
  13. <v-icon v-if="approved">
  14. mdi-check
  15. </v-icon>
  16. <v-icon v-else>
  17. mdi-close
  18. </v-icon>
  19. </v-btn>
  20. <v-btn value="guide">
  21. <span>Guideline</span>
  22. <v-icon>mdi-book-open-outline</v-icon>
  23. </v-btn> -->
  24. <v-btn @click="nextPage(total)">
  25. <span>Next</span>
  26. <v-icon>mdi-chevron-right</v-icon>
  27. </v-btn>
  28. </v-bottom-navigation>
  29. </template>
  30. <script>
  31. import { mapState, mapActions, mapMutations, mapGetters } from 'vuex'
  32. export default {
  33. computed: {
  34. ...mapState('documents', ['items', 'total']),
  35. ...mapGetters('pagination', ['current', 'limit', 'offset', 'page'])
  36. },
  37. watch: {
  38. offset() {
  39. this.updateSearchOptions({
  40. limit: this.limit,
  41. offset: this.offset
  42. })
  43. this.getDocumentList({
  44. projectId: this.$route.params.id
  45. })
  46. },
  47. current() {
  48. this.setCurrent(this.current)
  49. }
  50. },
  51. created() {
  52. this.initPage({
  53. projectId: this.$route.params.id
  54. })
  55. this.getDocumentList({
  56. projectId: this.$route.params.id
  57. })
  58. },
  59. methods: {
  60. ...mapActions('documents', ['getDocumentList']),
  61. ...mapActions('pagination', ['prevPage', 'nextPage', 'initPage']),
  62. ...mapMutations('documents', ['setCurrent', 'updateSearchOptions'])
  63. }
  64. }
  65. </script>