diff --git a/CHANGELOG.md b/CHANGELOG.md
index e65918d5a..7f70492f3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,7 +11,7 @@ and this project adheres to
## Unreleased
-
+* vuejs: add dead information on all on-the-fly person render boxes, in vis graph and other templates (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/271)
* [thirdparty] fix bug in 3rd party view: types was replaced by thirdPartyTypes
* [main] location form type: fix unmapped address field (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/246)
* [activity] fix wrong import of js assets for adding and viewing documents in activity (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/83 & https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/176)
diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/concernedGroups.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/concernedGroups.html.twig
index 70280d714..33575cea6 100644
--- a/src/Bundle/ChillActivityBundle/Resources/views/Activity/concernedGroups.html.twig
+++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/concernedGroups.html.twig
@@ -8,6 +8,7 @@
action: 'show', displayBadge: true,
targetEntity: { name: type, id: entity.id },
buttonText: entity|chill_entity_render_string,
+ isDead: entity.deathdate is not null,
parent: parent
} %}
{% endmacro %}
diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/App.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/App.vue
index 05fed6671..7b3b04686 100644
--- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/App.vue
+++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/App.vue
@@ -5,6 +5,7 @@
:action="context.action"
:buttonText="options.buttonText"
:displayBadge="options.displayBadge === 'true'"
+ :isDead="options.isDead"
:parent="options.parent"
@saveFormOnTheFly="saveFormOnTheFly">
diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/OnTheFly.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/OnTheFly.vue
index 8c93eec71..116ed86c1 100644
--- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/OnTheFly.vue
+++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/OnTheFly.vue
@@ -2,14 +2,14 @@
- {{ buttonText }}
+ {{ buttonText }} (‡)
- {{ buttonText }}
+ {{ buttonText }} (‡)
@@ -90,7 +90,7 @@ export default {
OnTheFlyThirdparty,
OnTheFlyCreate
},
- props: ['type', 'id', 'action', 'buttonText', 'displayBadge', 'parent', 'canCloseModal'],
+ props: ['type', 'id', 'action', 'buttonText', 'displayBadge', 'isDead', 'parent', 'canCloseModal'],
emits: ['saveFormOnTheFly'],
data() {
return {
diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/index.js b/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/index.js
index 3e8683de1..87dc82114 100644
--- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/index.js
+++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/index.js
@@ -22,6 +22,7 @@ containers.forEach((container) => {
options: {
buttonText: container.dataset.buttonText || null,
displayBadge: container.dataset.displayBadge || false,
+ isDead: container.dataset.isDead || false,
parent: container.dataset.parent ? JSON.parse(container.dataset.parent) : null,
}
}
diff --git a/src/Bundle/ChillMainBundle/Resources/views/OnTheFly/_insert_vue_onthefly.html.twig b/src/Bundle/ChillMainBundle/Resources/views/OnTheFly/_insert_vue_onthefly.html.twig
index 666743fb2..1f29bfe7a 100644
--- a/src/Bundle/ChillMainBundle/Resources/views/OnTheFly/_insert_vue_onthefly.html.twig
+++ b/src/Bundle/ChillMainBundle/Resources/views/OnTheFly/_insert_vue_onthefly.html.twig
@@ -11,6 +11,7 @@
* buttonText string
* displayBadge boolean (default: false) replace button by badge, need to define buttonText for content
* parent object (optional) pass parent context of the targetEntity (used for course resource comment)
+ * isDead boolean (default: false) is the person dead
#}
T
{{ person.text }}
+ (‡)
@@ -134,6 +135,7 @@
T
{{ person.text }}
+ (‡)
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/_confirm_delete.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/_confirm_delete.html.twig
index b60f71373..638bc005f 100644
--- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/_confirm_delete.html.twig
+++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/_confirm_delete.html.twig
@@ -3,7 +3,8 @@
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
action: 'show', displayBadge: true,
targetEntity: { name: type, id: entity.id },
- buttonText: entity|chill_entity_render_string
+ buttonText: entity|chill_entity_render_string,
+ isDead: entity.deathdate is not null
} %}
{% endmacro %}
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig
index 21e4a376e..c0de1e1ba 100644
--- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig
+++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourse/index.html.twig
@@ -9,6 +9,7 @@
action: 'show', displayBadge: true,
targetEntity: { name: type, id: entity.id },
buttonText: entity|chill_entity_render_string,
+ isDead: entity.deathdate is not null,
parent: parent
} %}
{% endmacro %}
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/index.html.twig
index 96775ca70..3bb34a22d 100644
--- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/index.html.twig
+++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/index.html.twig
@@ -69,7 +69,8 @@
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
action: 'show', displayBadge: true,
targetEntity: { name: 'person', id: p.id },
- buttonText: p|chill_entity_render_string
+ buttonText: p|chill_entity_render_string,
+ isDead: entity.deathdate is not null
} %}
{% endfor %}
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list_item.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list_item.html.twig
index 3c89bf3e3..9066abf39 100644
--- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list_item.html.twig
+++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list_item.html.twig
@@ -65,7 +65,8 @@
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
action: 'show', displayBadge: true,
targetEntity: { name: 'person', id: period.requestorPerson.id },
- buttonText: period.requestorPerson|chill_entity_render_string
+ buttonText: period.requestorPerson|chill_entity_render_string,
+ isDead: period.requestorPerson.deathdate is not null
} %}
{% endif %}
@@ -90,7 +91,8 @@
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
action: 'show', displayBadge: true,
targetEntity: { name: 'person', id: p.person.id },
- buttonText: p.person|chill_entity_render_string
+ buttonText: p.person|chill_entity_render_string,
+ isDead: p.person.deathdate is not null
} %}
{% endfor %}
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Person/household_history.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Person/household_history.html.twig
index 3a72459ac..8a3c72d4f 100644
--- a/src/Bundle/ChillPersonBundle/Resources/views/Person/household_history.html.twig
+++ b/src/Bundle/ChillPersonBundle/Resources/views/Person/household_history.html.twig
@@ -59,7 +59,8 @@
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
action: 'show', displayBadge: true,
targetEntity: { name: 'person', id: m.person.id },
- buttonText: m.person|chill_entity_render_string
+ buttonText: m.person|chill_entity_render_string,
+ isDead: m.person.deathdate is not null
} %}
{%- endfor -%}
{% endif %}
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig
index 4b0076078..aaaac1459 100644
--- a/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig
+++ b/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig
@@ -154,7 +154,8 @@
targetEntity: { name: 'person', id: part.person.id },
action: 'show',
displayBadge: true,
- buttonText: part.person|chill_entity_render_string
+ buttonText: part.person|chill_entity_render_string,
+ isDead: part.person.deathdate is not null
} %}
{% else %}
{% set participating = true %}
@@ -190,7 +191,8 @@
targetEntity: { name: 'person', id: acp.requestorPerson.id },
action: 'show',
displayBadge: true,
- buttonText: acp.requestorPerson|chill_entity_render_string
+ buttonText: acp.requestorPerson|chill_entity_render_string,
+ isDead: acp.requestorPerson.deathdate is not null
} %}
{% endif %}
diff --git a/src/Bundle/ChillTaskBundle/Resources/views/SingleTask/List/index_item.html.twig b/src/Bundle/ChillTaskBundle/Resources/views/SingleTask/List/index_item.html.twig
index 284769448..fedf62c8e 100644
--- a/src/Bundle/ChillTaskBundle/Resources/views/SingleTask/List/index_item.html.twig
+++ b/src/Bundle/ChillTaskBundle/Resources/views/SingleTask/List/index_item.html.twig
@@ -22,7 +22,8 @@
targetEntity: { name: 'person', id: task.person.id },
action: 'show',
displayBadge: true,
- buttonText: task.person|chill_entity_render_string
+ buttonText: task.person|chill_entity_render_string,
+ isDead: task.person.deathdate is not null
} %}
{% elseif task.course is not null %}
@@ -36,7 +37,8 @@
targetEntity: { name: 'person', id: part.person.id },
action: 'show',
displayBadge: true,
- buttonText: part.person|chill_entity_render_string
+ buttonText: part.person|chill_entity_render_string,
+ isDead: part.person.deathdate is not null
} %}
{% endfor %}