mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 23:23:51 +00:00
fix loading of evaluations
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
<select class="form-select" v-model="template">
|
||||
<option disabled selected value="">{{ $t('choose_a_template') }}</option>
|
||||
<template v-for="t in templates">
|
||||
<option v-bind:value="t.id">{{ t.name.fr }}</option>
|
||||
<option v-bind:value="t.id">{{ t.name.fr || 'Aucun nom défini' }}</option>
|
||||
</template>
|
||||
</select>
|
||||
<button v-if="canGenerate" class="btn btn-update btn-sm change-icon" type="button" @click="generateDocument"><i class="fa fa-fw fa-cog"></i></button>
|
||||
@@ -48,6 +48,7 @@ export default {
|
||||
required: true,
|
||||
},
|
||||
templates: {
|
||||
type: Array,
|
||||
required: true,
|
||||
},
|
||||
// beforeMove execute "something" before
|
||||
@@ -73,7 +74,11 @@ export default {
|
||||
return true;
|
||||
},
|
||||
getDescription() {
|
||||
return this.templates.find(t => t.id === this.template).description || '';
|
||||
let desc = this.templates.find(t => t.id === this.template);
|
||||
if (null === desc) {
|
||||
return '';
|
||||
}
|
||||
return desc.description || '';
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
|
Reference in New Issue
Block a user