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.

55 lines
955 B

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