CorporaCard.vue 1.42 KB
Newer Older
1
<template>
Quentin David's avatar
Quentin David committed
2
  <v-card outlined v-if="!!corpus">
3
    <v-card-title>
4
      Nom du corpus : {{ corpus.metadata.title }}
5
6
7
8
    </v-card-title>
    <v-card-text>
      <v-row>
        <v-col cols="9">
9
          <span v-if="corpus.metadata.description">Description : {{ corpus.metadata.description }}</span>
10
          <br/>
11
          <span v-if="corpus.metadata.date">Date: {{ corpus.metadata.date }}</span>
12
          <br/>
13
          <span v-if="corpus.metadata.type">Type: {{ corpus.metadata.type }}</span>
14
15
        </v-col>
        <v-col cols="3">
16
          <!-- Ajouté le {{ formatDate(corpus.creationDate) }} par <b>{{ corpus.createdBy }}</b> -->
17
18
19
20
21
22
23
          <br/>
          Poids: {{ corpus.size }}
          <br/>
          Nombre de documents: {{ corpus.numberOfDocuments }}
        </v-col>
      </v-row>
    </v-card-text>
Quentin David's avatar
Quentin David committed
24
    <v-card-actions v-if="showActions">
25
26
27
28
29
30
31
32
33
34
35
36
      <v-btn elevation="6" @click="toString()">
        <v-icon>mdi-pencil</v-icon> Éditer
      </v-btn>
      <v-btn elevation="6" color="error" @click="toString()">
        <v-icon>mdi-delete</v-icon> Supprimer
      </v-btn>
    </v-card-actions>
  </v-card>
</template>

<script>
export default {
Quentin David's avatar
Quentin David committed
37
38
39
40
41
  props: {
    corpus: Object,
    showActions: Boolean
  },
  data: () => ({}),
42
43
44
45
46
47
48
49
50
51
  // methods: {
  //   formatDate(date) {
  //     if (date) {
  //       return date.toLocaleDateString('fr-FR');
  //     }
  //     else {
  //       return "unknown"
  //     }
  //   }
  // }
52
53
}
</script>