variable-list.vue 1.54 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
<template>
  <main>
    <section class="max-w-6xl px-4 mx-auto py-9 xl:px-0">
      <toolbar title="Utilisateurs" :addActionName="$t('variable.actions.add')" :actionLink="createVariablePath()"></toolbar>
      <table class="w-full bg-white border-t-2">
        <thead class="font-bold">
        <tr class="border-b-2">
          <th class="p-2 text-left" v-text="$t('variable.id')">ID</th>
          <th class="p-2 text-left" v-text="$t('variable.name')">Nom</th>
          <th class="p-2 text-left" v-text="$t('variable.reference')">Réference</th>
11
          <th class="p-2 text-center" v-text="$t('variable.actions')">Actions</th>
12
13
14
15
16
17
18
19
20
21
22
23
24
        </tr>
        </thead>
        <tbody>
        <tr v-for="(variable, index) in variables" :key="index" class="text-left align-top border-b">
          <td class="p-2">
            <a :href="getVariableEditLink(variable.id)">{{ variable.id }}</a>
          </td>
          <td class="p-2">
            <a :href="getVariableEditLink(variable.id)">{{ variable.name }}</a>
          </td>
          <td class="p-2">
            <a :href="getVariableEditLink(variable.id)">{{ variable.reference }}</a>
          </td>
25
26
27
28
29
          <td class="p-2">
            <button class="flex items-center p-2 text-red-600 transition ml-auto mr-auto hover:bg-red-600 focus:ring hover:text-red-100" @click="deleteVariable(variable)">
              <icon name="trash"></icon>
            </button>
          </td>
30
31
32
33
34
35
36
37
        </tr>
        </tbody>
      </table>
    </section>
  </main>
</template>

<script lang="ts" src="./variable-list.component.ts" />