Resolve "Action d'accompagnement - afficher les objectifs avant les résultats"

This commit is contained in:
2025-11-07 16:23:52 +00:00
committed by Julien Fastré
parent c28670f0fd
commit c28bd22560
3 changed files with 60 additions and 38 deletions

View File

@@ -0,0 +1,6 @@
kind: UX
body: Change the order of display for results and objectives in the social work/action form
time: 2025-11-03T13:15:54.837971477+01:00
custom:
Issue: "455"
SchemaChange: No schema change

View File

@@ -52,20 +52,7 @@
</div>
</div>
<!-- results which are not attached to an objective -->
<div v-if="hasResultsForAction">
<div class="results_without_objective">
{{ $t("results_without_objective") }}
</div>
<div>
<add-result
:availableResults="resultsForAction"
destination="action"
></add-result>
</div>
</div>
<!-- results which **are** attached to an objective -->
<!-- 1. Goals with results that were already selected/saved to the entity -->
<div v-for="g in goalsPicked" :key="g.goal.id">
<div class="item-title" @click="removeGoal(g)">
<span class="removable">{{
@@ -76,6 +63,32 @@
<add-result :goal="g.goal" destination="goal"></add-result>
</div>
</div>
<!-- 2. Results without objectives that were already selected/saved to the entity -->
<div v-if="hasResultsForAction">
<div
class="results_without_objective"
style="
background: repeating-linear-gradient(
45deg,
#e6e6e6,
#e6e6e6 10px,
#f3f3f3 0,
#f3f3f3 20px
);
"
>
{{ $t("results_without_objective") }}
</div>
<div>
<add-result
:availableResults="resultsForAction"
destination="action"
></add-result>
</div>
</div>
<!-- 3. Selector for objectives with results -->
<div class="accordion" id="expandedSuggestions">
<div
v-if="availableForCheckGoal.length > 0"
@@ -138,6 +151,8 @@
}}</span>
</div>
</div>
<!-- 4. Selector for results without objectives is already included above in section 2 -->
</div>
<div id="evaluations" class="action-row">

View File

@@ -2,30 +2,6 @@
# OPTIONS
# - displayContent: [short|long] default: short
#}
{% if w.results|length > 0 %}
<table class="obj-res-eval">
<thead>
<th class="obj"><h4 class="title_label">{{ 'accompanying_course_work.goal'|trans }}</h4></th>
<th class="res"><h4 class="title_label">{{ 'accompanying_course_work.results'|trans }}</h4></th>
</thead>
<tbody>
<tr>
<td class="obj">
<p class="chill-no-data-statement">{{ 'accompanying_course_work.results without objective'|trans }}</p>
</td>
<td class="res">
<ul class="result_list">
{% for r in w.results %}
<li>{{ r.title|localize_translatable_string }}</li>
{% endfor %}
</ul>
</td>
</tr>
</tbody>
</table>
{% endif %}
{% if w.goals|length > 0 %}
<table class="obj-res-eval">
<thead>
@@ -57,6 +33,31 @@
</table>
{% endif %}
{% if w.results|length > 0 %}
<table class="obj-res-eval">
<thead>
<th class="obj"><h4 class="title_label">{{ 'accompanying_course_work.goal'|trans }}</h4></th>
<th class="res"><h4 class="title_label">{{ 'accompanying_course_work.results'|trans }}</h4></th>
</thead>
<tbody>
<tr>
<td class="obj">
<p class="chill-no-data-statement">{{ 'accompanying_course_work.results without objective'|trans }}</p>
</td>
<td class="res">
<ul class="result_list">
{% for r in w.results %}
<li>{{ r.title|localize_translatable_string }}</li>
{% endfor %}
</ul>
</td>
</tr>
</tbody>
</table>
{% endif %}
{% if w.accompanyingPeriodWorkEvaluations|length > 0 %}
<table class="obj-res-eval">
<thead>