mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-17 07:44:24 +00:00
59 lines
1.5 KiB
Vue
59 lines
1.5 KiB
Vue
<template>
|
|
<div class="alert alert-light">{{ $t('my_evaluations.description') }}</div>
|
|
<span v-if="noResults" class="chill-no-data-statement">{{ $t('no_data') }}</span>
|
|
<tab-table v-else>
|
|
<template v-slot:thead>
|
|
<th scope="col">{{ $t('max_date') }}</th>
|
|
<th scope="col">{{ $t('evaluation') }}</th>
|
|
<th scope="col"></th>
|
|
</template>
|
|
<template v-slot:tbody>
|
|
<tr v-for="(e, i) in evaluations.results" :key="`evaluation-${i}`">
|
|
<td>{{ $d(e.maxDate.datetime, 'short') }}</td>
|
|
<td>{{ e.evaluation.title.fr }}</td>
|
|
<td>
|
|
<a class="btn btn-sm btn-show" :href="getUrl(e)">
|
|
{{ $t('show_entity', { entity: $t('the_evaluation') }) }}
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
</template>
|
|
</tab-table>
|
|
</template>
|
|
|
|
<script>
|
|
import { mapState, mapGetters } from "vuex";
|
|
import TabTable from "./TabTable";
|
|
|
|
export default {
|
|
name: "MyEvaluations",
|
|
components: {
|
|
TabTable
|
|
},
|
|
computed: {
|
|
...mapState([
|
|
'evaluations',
|
|
]),
|
|
...mapGetters([
|
|
'isEvaluationsLoaded',
|
|
]),
|
|
noResults() {
|
|
if (!this.isEvaluationsLoaded) {
|
|
return false;
|
|
} else {
|
|
return this.evaluations.count === 0;
|
|
}
|
|
}
|
|
},
|
|
methods: {
|
|
getUrl(e) {
|
|
let anchor = '#evaluations';
|
|
return `/fr/person/accompanying-period/work/${e.id}/edit${anchor}`
|
|
}
|
|
},
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
|
|
</style> |