mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
improve homepage_widget tables with datas
This commit is contained in:
parent
971789d5cf
commit
e4d5e40a8b
@ -3,16 +3,38 @@
|
|||||||
<span v-if="noResults" class="chill-no-data-statement">{{ $t('no_data') }}</span>
|
<span v-if="noResults" class="chill-no-data-statement">{{ $t('no_data') }}</span>
|
||||||
<tab-table v-else>
|
<tab-table v-else>
|
||||||
<template v-slot:thead>
|
<template v-slot:thead>
|
||||||
<th scope="col">id</th>
|
<th scope="col">{{ $t('opening_date') }}</th>
|
||||||
<th scope="col">Ouvert le</th>
|
<th scope="col">{{ $t('social_issues') }}</th>
|
||||||
<th scope="col">Usagers concernés</th>
|
<th scope="col">{{ $t('concerned_persons') }}</th>
|
||||||
|
<th scope="col"></th>
|
||||||
<th scope="col"></th>
|
<th scope="col"></th>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:tbody>
|
<template v-slot:tbody>
|
||||||
<tr v-for="(c, i) in accompanyingCourses.results" :key="`course-${i}`">
|
<tr v-for="(c, i) in accompanyingCourses.results" :key="`course-${i}`">
|
||||||
<td>{{ c.id}}</td>
|
<td>{{ $d(c.openingDate.datetime, 'short') }}</td>
|
||||||
<td>{{ $d(c.openingDate.datetime, 'long') }}</td>
|
<td>
|
||||||
<td>{{ c.participations.length }}</td>
|
<span v-for="i in c.socialIssues"
|
||||||
|
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"
|
||||||
|
:buttonText="p.person.textAge"
|
||||||
|
:displayBadge="'true' === 'true'"
|
||||||
|
action="show">
|
||||||
|
</on-the-fly>
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<span v-if="c.emergency" class="badge rounded-pill bg-danger">{{ $t('emergency') }}</span>
|
||||||
|
<span v-if="c.confidential" class="badge rounded-pill bg-danger">{{ $t('confidential') }}</span>
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a class="btn btn-sm btn-show" :href="getUrl(c)">
|
<a class="btn btn-sm btn-show" :href="getUrl(c)">
|
||||||
{{ $t('show_entity', { entity: $t('the_course') }) }}
|
{{ $t('show_entity', { entity: $t('the_course') }) }}
|
||||||
@ -26,11 +48,13 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapState, mapGetters } from "vuex";
|
import { mapState, mapGetters } from "vuex";
|
||||||
import TabTable from "./TabTable";
|
import TabTable from "./TabTable";
|
||||||
|
import OnTheFly from 'ChillMainAssets/vuejs/OnTheFly/components/OnTheFly';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MyAccompanyingCourses",
|
name: "MyAccompanyingCourses",
|
||||||
components: {
|
components: {
|
||||||
TabTable
|
TabTable,
|
||||||
|
OnTheFly,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState([
|
...mapState([
|
||||||
|
@ -3,12 +3,14 @@
|
|||||||
<span v-if="noResults" class="chill-no-data-statement">{{ $t('no_data') }}</span>
|
<span v-if="noResults" class="chill-no-data-statement">{{ $t('no_data') }}</span>
|
||||||
<tab-table v-else>
|
<tab-table v-else>
|
||||||
<template v-slot:thead>
|
<template v-slot:thead>
|
||||||
<th scope="col">id</th>
|
<th scope="col">{{ $t('max_date') }}</th>
|
||||||
|
<th scope="col">{{ $t('evaluation') }}</th>
|
||||||
<th scope="col"></th>
|
<th scope="col"></th>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:tbody>
|
<template v-slot:tbody>
|
||||||
<tr v-for="(e, i) in evaluations.results" :key="`evaluation-${i}`">
|
<tr v-for="(e, i) in evaluations.results" :key="`evaluation-${i}`">
|
||||||
<td>{{ e.id}}</td>
|
<td>{{ $d(e.maxDate.datetime, 'short') }}</td>
|
||||||
|
<td>{{ e.evaluation.title.fr }}</td>
|
||||||
<td>
|
<td>
|
||||||
<a class="btn btn-sm btn-show" :href="getUrl(e)">
|
<a class="btn btn-sm btn-show" :href="getUrl(e)">
|
||||||
{{ $t('show_entity', { entity: $t('the_evaluation') }) }}
|
{{ $t('show_entity', { entity: $t('the_evaluation') }) }}
|
||||||
|
@ -1,15 +1,21 @@
|
|||||||
<template>
|
<template>
|
||||||
|
|
||||||
<div class="alert alert-light">{{ $t('my_tasks.description_alert') }}</div>
|
<div class="alert alert-light">{{ $t('my_tasks.description_warning') }}</div>
|
||||||
<span v-if="noResultsWarning" class="chill-no-data-statement">{{ $t('no_data') }}</span>
|
<span v-if="noResultsAlert" class="chill-no-data-statement">{{ $t('no_data') }}</span>
|
||||||
<tab-table v-else>
|
<tab-table v-else>
|
||||||
<template v-slot:thead>
|
<template v-slot:thead>
|
||||||
<th scope="col">id</th>
|
<th scope="col">{{ $t('warning_date') }}</th>
|
||||||
|
<th scope="col">{{ $t('max_date') }}</th>
|
||||||
|
<th scope="col">{{ $t('task') }}</th>
|
||||||
<th scope="col"></th>
|
<th scope="col"></th>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:tbody>
|
<template v-slot:tbody>
|
||||||
<tr v-for="(t, i) in tasks.warning" :key="`task-warning-${i}`">
|
<tr v-for="(t, i) in tasks.alert.results" :key="`task-alert-${i}`">
|
||||||
<td>{{ t.id}}</td>
|
<td>{{ $d(t.warningDate.datetime, 'short') }}</td>
|
||||||
|
<td>
|
||||||
|
<span class="outdated">{{ $d(t.endDate.datetime, 'short') }}</span>
|
||||||
|
</td>
|
||||||
|
<td>{{ t.title }}</td>
|
||||||
<td>
|
<td>
|
||||||
<a class="btn btn-sm btn-show" :href="getUrl(t)">
|
<a class="btn btn-sm btn-show" :href="getUrl(t)">
|
||||||
{{ $t('show_entity', { entity: $t('the_task') }) }}
|
{{ $t('show_entity', { entity: $t('the_task') }) }}
|
||||||
@ -19,16 +25,22 @@
|
|||||||
</template>
|
</template>
|
||||||
</tab-table>
|
</tab-table>
|
||||||
|
|
||||||
<div class="alert alert-light">{{ $t('my_tasks.description_warning') }}</div>
|
<div class="alert alert-light">{{ $t('my_tasks.description_alert') }}</div>
|
||||||
<span v-if="noResultsAlert" class="chill-no-data-statement">{{ $t('no_data') }}</span>
|
<span v-if="noResultsWarning" class="chill-no-data-statement">{{ $t('no_data') }}</span>
|
||||||
<tab-table v-else>
|
<tab-table v-else>
|
||||||
<template v-slot:thead>
|
<template v-slot:thead>
|
||||||
<th scope="col">id</th>
|
<th scope="col">{{ $t('warning_date') }}</th>
|
||||||
|
<th scope="col">{{ $t('max_date') }}</th>
|
||||||
|
<th scope="col">{{ $t('task') }}</th>
|
||||||
<th scope="col"></th>
|
<th scope="col"></th>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:tbody>
|
<template v-slot:tbody>
|
||||||
<tr v-for="(t, i) in tasks.alert" :key="`task-alert-${i}`">
|
<tr v-for="(t, i) in tasks.warning.results" :key="`task-warning-${i}`">
|
||||||
<td>{{ t.id}}</td>
|
<td>
|
||||||
|
<span class="outdated">{{ $d(t.warningDate.datetime, 'short') }}</span>
|
||||||
|
</td>
|
||||||
|
<td>{{ $d(t.endDate.datetime, 'short') }}</td>
|
||||||
|
<td>{{ t.title }}</td>
|
||||||
<td>
|
<td>
|
||||||
<a class="btn btn-sm btn-show" :href="getUrl(t)">
|
<a class="btn btn-sm btn-show" :href="getUrl(t)">
|
||||||
{{ $t('show_entity', { entity: $t('the_task') }) }}
|
{{ $t('show_entity', { entity: $t('the_task') }) }}
|
||||||
@ -81,5 +93,8 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
span.outdated {
|
||||||
|
font-weight: bold;
|
||||||
|
color: var(--bs-warning);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
@ -6,12 +6,18 @@
|
|||||||
<template v-slot:thead>
|
<template v-slot:thead>
|
||||||
<th scope="col">{{ $t('StartDate') }}</th>
|
<th scope="col">{{ $t('StartDate') }}</th>
|
||||||
<th scope="col">{{ $t('SocialAction') }}</th>
|
<th scope="col">{{ $t('SocialAction') }}</th>
|
||||||
|
<th scope="col">{{ $t('concerned_persons') }}</th>
|
||||||
<th scope="col"></th>
|
<th scope="col"></th>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:tbody>
|
<template v-slot:tbody>
|
||||||
<tr v-for="(w, i) in works.results" :key="`works-${i}`">
|
<tr v-for="(w, i) in works.results" :key="`works-${i}`">
|
||||||
<td>{{ $d(w.startDate.datetime, 'short') }}</td>
|
<td>{{ $d(w.startDate.datetime, 'short') }}</td>
|
||||||
<td>
|
<td>
|
||||||
|
<span class="chill-entity entity-social-issue">
|
||||||
|
<span class="badge bg-chill-l-gray text-dark">
|
||||||
|
{{ w.socialAction.issue.text }}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
<h4 class="badge-title">
|
<h4 class="badge-title">
|
||||||
<span class="title_label"></span>
|
<span class="title_label"></span>
|
||||||
<span class="title_action">
|
<span class="title_action">
|
||||||
@ -19,6 +25,17 @@
|
|||||||
</span>
|
</span>
|
||||||
</h4>
|
</h4>
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
<span v-for="person in w.persons" class="me-1" :key="person.id">
|
||||||
|
<on-the-fly
|
||||||
|
:type="person.type"
|
||||||
|
:id="person.id"
|
||||||
|
:buttonText="person.textAge"
|
||||||
|
:displayBadge="'true' === 'true'"
|
||||||
|
action="show">
|
||||||
|
</on-the-fly>
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="btn-group" role="group" aria-label="Actions">
|
<div class="btn-group" role="group" aria-label="Actions">
|
||||||
<a class="btn btn-sm btn-update" :href="getUrl(w)">
|
<a class="btn btn-sm btn-update" :href="getUrl(w)">
|
||||||
@ -38,11 +55,13 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapState, mapGetters } from "vuex";
|
import { mapState, mapGetters } from "vuex";
|
||||||
import TabTable from "./TabTable";
|
import TabTable from "./TabTable";
|
||||||
|
import OnTheFly from 'ChillMainAssets/vuejs/OnTheFly/components/OnTheFly';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MyWorks",
|
name: "MyWorks",
|
||||||
components: {
|
components: {
|
||||||
TabTable
|
TabTable,
|
||||||
|
OnTheFly,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState([
|
...mapState([
|
||||||
|
@ -22,8 +22,15 @@ const appMessages = {
|
|||||||
tab: "Mes notifications",
|
tab: "Mes notifications",
|
||||||
description: "Liste des notifications reçues et non lues.",
|
description: "Liste des notifications reçues et non lues.",
|
||||||
},
|
},
|
||||||
|
opening_date: "Date d'ouverture",
|
||||||
|
social_issues: "Problématiques sociales",
|
||||||
|
concerned_persons: "Usagers concernés",
|
||||||
|
max_date: "Date d'échéance",
|
||||||
|
warning_date: "Date de rappel",
|
||||||
|
evaluation: "Évaluation",
|
||||||
|
task: "Tâche",
|
||||||
Date: "Date",
|
Date: "Date",
|
||||||
From: "De",
|
From: "Expéditeur",
|
||||||
Subject: "Objet",
|
Subject: "Objet",
|
||||||
Entity: "Associé à",
|
Entity: "Associé à",
|
||||||
show_entity: "Voir {entity}",
|
show_entity: "Voir {entity}",
|
||||||
|
@ -18,6 +18,7 @@ use Doctrine\Common\Collections\ArrayCollection;
|
|||||||
use Doctrine\Common\Collections\Collection;
|
use Doctrine\Common\Collections\Collection;
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
use Symfony\Component\Validator\Constraints as Assert;
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SingleTask.
|
* SingleTask.
|
||||||
@ -48,6 +49,7 @@ class SingleTask extends AbstractTask
|
|||||||
*
|
*
|
||||||
* @ORM\Column(name="end_date", type="date", nullable=true)
|
* @ORM\Column(name="end_date", type="date", nullable=true)
|
||||||
* @Assert\Date
|
* @Assert\Date
|
||||||
|
* @Serializer\Groups({"read"})
|
||||||
*/
|
*/
|
||||||
private $endDate;
|
private $endDate;
|
||||||
|
|
||||||
@ -57,6 +59,7 @@ class SingleTask extends AbstractTask
|
|||||||
* @ORM\Column(name="id", type="integer")
|
* @ORM\Column(name="id", type="integer")
|
||||||
* @ORM\Id
|
* @ORM\Id
|
||||||
* @ORM\GeneratedValue(strategy="AUTO")
|
* @ORM\GeneratedValue(strategy="AUTO")
|
||||||
|
* @Serializer\Groups({"read"})
|
||||||
*/
|
*/
|
||||||
private $id;
|
private $id;
|
||||||
|
|
||||||
@ -73,6 +76,7 @@ class SingleTask extends AbstractTask
|
|||||||
* @var DateTime
|
* @var DateTime
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="start_date", type="date", nullable=true)
|
* @ORM\Column(name="start_date", type="date", nullable=true)
|
||||||
|
* @Serializer\Groups({"read"})
|
||||||
* @Assert\Date
|
* @Assert\Date
|
||||||
*
|
*
|
||||||
* @Assert\Expression(
|
* @Assert\Expression(
|
||||||
@ -102,6 +106,7 @@ class SingleTask extends AbstractTask
|
|||||||
* and this.getEndDate() === null
|
* and this.getEndDate() === null
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="warning_interval", type="dateinterval", nullable=true)
|
* @ORM\Column(name="warning_interval", type="dateinterval", nullable=true)
|
||||||
|
* @Serializer\Groups({"read"})
|
||||||
*
|
*
|
||||||
* @Assert\Expression(
|
* @Assert\Expression(
|
||||||
* "!(value != null and this.getEndDate() == null)",
|
* "!(value != null and this.getEndDate() == null)",
|
||||||
@ -162,6 +167,7 @@ class SingleTask extends AbstractTask
|
|||||||
* Return null if warningDate or endDate is null
|
* Return null if warningDate or endDate is null
|
||||||
*
|
*
|
||||||
* @return DateTimeImmutable
|
* @return DateTimeImmutable
|
||||||
|
* @Serializer\Groups({"read"})
|
||||||
*/
|
*/
|
||||||
public function getWarningDate()
|
public function getWarningDate()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user