Browse Source

Add nuxt-link for each project

pull/341/head
Hironsan 5 years ago
parent
commit
528fcf9f59
2 changed files with 14 additions and 4 deletions
  1. 13
      frontend/components/FormProjectCreation.vue
  2. 5
      frontend/pages/projects/index.vue

13
frontend/components/FormProjectCreation.vue

@ -14,15 +14,15 @@
v-model="name"
:rules="nameRules"
label="Project name"
prepend-icon="label"
prepend-icon="mdi-account-multiple"
required
autofocus
/>
<v-text-field
v-model="description"
:rules="nameRules"
:rules="descriptionRules"
label="Description"
prepend-icon="label"
prepend-icon="mdi-clipboard-text"
required
/>
<v-select
@ -74,7 +74,12 @@ export default {
'Sequence to sequence'
], // Todo: Get project types from backend server.
nameRules: [
v => !!v || 'Name is required'
v => !!v || 'Project name is required',
v => (v && v.length <= 30) || 'Project name must be less than 30 characters'
],
descriptionRules: [
v => !!v || 'Description is required',
v => (v && v.length <= 100) || 'Description must be less than 100 characters'
]
}),

5
frontend/pages/projects/index.vue

@ -65,6 +65,11 @@
filled
/>
</template>
<template v-slot:item.name="{ item }">
<nuxt-link :to="`/projects/${item.id}`">
<span>{{ item.name }}</span>
</nuxt-link>
</template>
</v-data-table>
</v-card>
</v-flex>

Loading…
Cancel
Save