Browse Source

Delete organisms/ProjectList

pull/341/head
Hironsan 5 years ago
parent
commit
e237ba45c1
2 changed files with 27 additions and 76 deletions
  1. 37
      frontend/components/containers/ProjectList.vue
  2. 66
      frontend/components/organisms/ProjectList.vue

37
frontend/components/containers/ProjectList.vue

@ -1,21 +1,37 @@
<template>
<project-list
<v-data-table
:value="selected"
:headers="headers"
:projects="projects"
:selected="selected"
:items="projects"
:search="search"
:loading="loading"
@update="update"
/>
loading-text="Loading... Please wait"
item-key="id"
show-select
@input="update"
>
<template v-slot:top>
<v-text-field
v-model="search"
prepend-inner-icon="search"
label="Search"
single-line
hide-details
filled
/>
</template>
<template v-slot:item.name="{ item }">
<nuxt-link :to="`/projects/${item.id}`">
<span>{{ item.name }}</span>
</nuxt-link>
</template>
</v-data-table>
</template>
<script>
import { mapState, mapActions, mapMutations } from 'vuex'
import ProjectList from '@/components/organisms/ProjectList'
export default {
components: {
ProjectList
},
data() {
return {
headers: [
@ -32,7 +48,8 @@ export default {
text: 'Type',
value: 'project_type'
}
]
],
search: ''
}
},

66
frontend/components/organisms/ProjectList.vue

@ -1,66 +0,0 @@
<template>
<v-data-table
:value="selected"
:headers="headers"
:items="projects"
:search="search"
:loading="loading"
loading-text="Loading... Please wait"
item-key="id"
show-select
@input="update"
>
<template v-slot:top>
<v-text-field
v-model="search"
prepend-inner-icon="search"
label="Search"
single-line
hide-details
filled
/>
</template>
<template v-slot:item.name="{ item }">
<nuxt-link :to="`/projects/${item.id}`">
<span>{{ item.name }}</span>
</nuxt-link>
</template>
</v-data-table>
</template>
<script>
export default {
props: {
headers: {
type: Array,
default: () => [],
required: true
},
projects: {
type: Array,
default: () => [],
required: true
},
selected: {
type: Array,
default: () => [],
required: true
},
loading: {
type: Boolean,
default: false,
required: true
}
},
data() {
return {
search: ''
}
},
methods: {
update(selected) {
this.$emit('update', selected)
}
}
}
</script>
Loading…
Cancel
Save