DefineTreatment.vue 1.26 KB
Newer Older
1
2
3
4
<template>
  <v-container class="my-5">
    <v-card outlined class="px-6 mb-5">
      <v-card-title class="justify-center py-6">
Quentin David's avatar
Quentin David committed
5
        <h1 class="display-3"> {{ $t('module-choice') }} </h1>
6
      </v-card-title>
Quentin David's avatar
Quentin David committed
7
      <DefinePipeline class="my-5" @add-module="updateChain" />
Quentin David's avatar
Quentin David committed
8
9
10
11
      <ModuleChain class="my-5" 
        v-if="chain.length > 0"
        @delete-module="deleteModuleFromChain" 
        :added_modules="chain"/>
12
    </v-card>
Quentin David's avatar
Quentin David committed
13
    <v-btn block color="success" to="/validation"> {{ $t('treatment-validation') }} </v-btn>
14
15
16
17
18
  </v-container>
</template>

<script>
  import DefinePipeline from '@/components/DefineTreatment/DefinePipeline'
Quentin David's avatar
Quentin David committed
19
  import ModuleChain from '@/components/DefineTreatment/ModuleChain'
20
21
22
23
  export default {
    name: 'Treatment',
    components: {
      DefinePipeline,
Quentin David's avatar
Quentin David committed
24
      ModuleChain,
25
    },
Quentin David's avatar
Quentin David committed
26
27
28
29
30
31
32
33
34
35
36
    data: () => ({
      chain: [],
    }),
    methods: {
      updateChain: function(module) {
        this.chain.push(module);
      },
      deleteModuleFromChain: function(index) {
        this.chain.splice(index, 1);
      }
    }
37
  }
Quentin David's avatar
Quentin David committed
38
39
40
41
42
43
44
45
46
47
48
49
50
</script>
<i18n>
{
  "fr":{
    "module-choice":"Choix des modules",
    "treatment-validation":"Lancer le traitement"
  },
  "en":{
    "module-choice":"Choice of modules",
    "treatment-validation":"Start treatment"
  }
}
</i18n>