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.

56 lines
989 B

  1. <template>
  2. <project-list
  3. :headers="headers"
  4. :projects="projects"
  5. :selected="selected"
  6. :loading="loading"
  7. @update="update"
  8. />
  9. </template>
  10. <script>
  11. import { mapState, mapActions, mapMutations } from 'vuex'
  12. import ProjectList from '@/components/organisms/ProjectList'
  13. export default {
  14. components: {
  15. ProjectList
  16. },
  17. data() {
  18. return {
  19. headers: [
  20. {
  21. text: 'Name',
  22. align: 'left',
  23. value: 'name'
  24. },
  25. {
  26. text: 'Description',
  27. value: 'description'
  28. },
  29. {
  30. text: 'Type',
  31. value: 'project_type'
  32. }
  33. ]
  34. }
  35. },
  36. computed: {
  37. ...mapState('projects', ['projects', 'selected', 'loading'])
  38. },
  39. created() {
  40. this.getProjectList()
  41. },
  42. methods: {
  43. ...mapActions('projects', ['getProjectList']),
  44. ...mapMutations('projects', ['updateSelected']),
  45. update(selected) {
  46. this.updateSelected(selected)
  47. }
  48. }
  49. }
  50. </script>