mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-27 00:55:01 +00:00
Apply prettier rules
This commit is contained in:
@@ -1,116 +1,110 @@
|
||||
<template>
|
||||
<div class="alert alert-light">
|
||||
{{ $t('my_accompanying_courses.description') }}
|
||||
</div>
|
||||
<span
|
||||
v-if="noResults"
|
||||
class="chill-no-data-statement"
|
||||
>{{ $t('no_data') }}</span>
|
||||
<tab-table v-else>
|
||||
<template #thead>
|
||||
<th scope="col">
|
||||
{{ $t('opening_date') }}
|
||||
</th>
|
||||
<th scope="col">
|
||||
{{ $t('social_issues') }}
|
||||
</th>
|
||||
<th scope="col">
|
||||
{{ $t('concerned_persons') }}
|
||||
</th>
|
||||
<th scope="col" />
|
||||
<th scope="col" />
|
||||
</template>
|
||||
<template #tbody>
|
||||
<tr
|
||||
v-for="(c, i) in accompanyingCourses.results"
|
||||
:key="`course-${i}`"
|
||||
>
|
||||
<td>{{ $d(c.openingDate.datetime, 'short') }}</td>
|
||||
<td>
|
||||
<span
|
||||
v-for="(i, index) in c.socialIssues"
|
||||
:key="index"
|
||||
class="chill-entity entity-social-issue"
|
||||
>
|
||||
<span class="badge bg-chill-l-gray text-dark">
|
||||
{{ i.title.fr }}
|
||||
</span>
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<span
|
||||
v-for="p in c.participations"
|
||||
class="me-1"
|
||||
:key="p.person.id"
|
||||
>
|
||||
<on-the-fly
|
||||
:type="p.person.type"
|
||||
:id="p.person.id"
|
||||
:button-text="p.person.textAge"
|
||||
:display-badge="'true' === 'true'"
|
||||
action="show"
|
||||
/>
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<span
|
||||
v-if="c.emergency"
|
||||
class="badge rounded-pill bg-danger me-1"
|
||||
>{{ $t('emergency') }}</span>
|
||||
<span
|
||||
v-if="c.confidential"
|
||||
class="badge rounded-pill bg-danger"
|
||||
>{{ $t('confidential') }}</span>
|
||||
</td>
|
||||
<td>
|
||||
<a
|
||||
class="btn btn-sm btn-show"
|
||||
:href="getUrl(c)"
|
||||
>
|
||||
{{ $t('show_entity', { entity: $t('the_course') }) }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
</tab-table>
|
||||
<div class="alert alert-light">
|
||||
{{ $t("my_accompanying_courses.description") }}
|
||||
</div>
|
||||
<span v-if="noResults" class="chill-no-data-statement">{{
|
||||
$t("no_data")
|
||||
}}</span>
|
||||
<tab-table v-else>
|
||||
<template #thead>
|
||||
<th scope="col">
|
||||
{{ $t("opening_date") }}
|
||||
</th>
|
||||
<th scope="col">
|
||||
{{ $t("social_issues") }}
|
||||
</th>
|
||||
<th scope="col">
|
||||
{{ $t("concerned_persons") }}
|
||||
</th>
|
||||
<th scope="col" />
|
||||
<th scope="col" />
|
||||
</template>
|
||||
<template #tbody>
|
||||
<tr
|
||||
v-for="(c, i) in accompanyingCourses.results"
|
||||
:key="`course-${i}`"
|
||||
>
|
||||
<td>{{ $d(c.openingDate.datetime, "short") }}</td>
|
||||
<td>
|
||||
<span
|
||||
v-for="(i, index) in c.socialIssues"
|
||||
:key="index"
|
||||
class="chill-entity entity-social-issue"
|
||||
>
|
||||
<span class="badge bg-chill-l-gray text-dark">
|
||||
{{ i.title.fr }}
|
||||
</span>
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<span
|
||||
v-for="p in c.participations"
|
||||
class="me-1"
|
||||
:key="p.person.id"
|
||||
>
|
||||
<on-the-fly
|
||||
:type="p.person.type"
|
||||
:id="p.person.id"
|
||||
:button-text="p.person.textAge"
|
||||
:display-badge="'true' === 'true'"
|
||||
action="show"
|
||||
/>
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<span
|
||||
v-if="c.emergency"
|
||||
class="badge rounded-pill bg-danger me-1"
|
||||
>{{ $t("emergency") }}</span
|
||||
>
|
||||
<span
|
||||
v-if="c.confidential"
|
||||
class="badge rounded-pill bg-danger"
|
||||
>{{ $t("confidential") }}</span
|
||||
>
|
||||
</td>
|
||||
<td>
|
||||
<a class="btn btn-sm btn-show" :href="getUrl(c)">
|
||||
{{ $t("show_entity", { entity: $t("the_course") }) }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
</tab-table>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState, mapGetters } from "vuex";
|
||||
import TabTable from "./TabTable";
|
||||
import OnTheFly from 'ChillMainAssets/vuejs/OnTheFly/components/OnTheFly';
|
||||
import OnTheFly from "ChillMainAssets/vuejs/OnTheFly/components/OnTheFly";
|
||||
|
||||
export default {
|
||||
name: "MyAccompanyingCourses",
|
||||
components: {
|
||||
TabTable,
|
||||
OnTheFly,
|
||||
},
|
||||
computed: {
|
||||
...mapState([
|
||||
'accompanyingCourses',
|
||||
]),
|
||||
...mapGetters([
|
||||
'isAccompanyingCoursesLoaded',
|
||||
]),
|
||||
noResults() {
|
||||
if (!this.isAccompanyingCoursesLoaded) {
|
||||
return false;
|
||||
} else {
|
||||
return this.accompanyingCourses.count === 0;
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
getUrl(c) {
|
||||
return `/fr/parcours/${c.id}`
|
||||
}
|
||||
}
|
||||
}
|
||||
name: "MyAccompanyingCourses",
|
||||
components: {
|
||||
TabTable,
|
||||
OnTheFly,
|
||||
},
|
||||
computed: {
|
||||
...mapState(["accompanyingCourses"]),
|
||||
...mapGetters(["isAccompanyingCoursesLoaded"]),
|
||||
noResults() {
|
||||
if (!this.isAccompanyingCoursesLoaded) {
|
||||
return false;
|
||||
} else {
|
||||
return this.accompanyingCourses.count === 0;
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
getUrl(c) {
|
||||
return `/fr/parcours/${c.id}`;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
span.badge.rounded-pill.bg-danger {
|
||||
text-transform: uppercase;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
</style>
|
||||
|
Reference in New Issue
Block a user