Fix return type in user getters for mainScope and userJob

This commit is contained in:
2023-09-20 14:34:42 +02:00
parent 8a6f29ef79
commit d2feb0f0b4
5 changed files with 24 additions and 52 deletions

View File

@@ -11,32 +11,16 @@
{% endblock %}
{% block table_entities_tbody %}
{{ dump(entities) }}
{#
#}
{% for entity in entities %}
<tr>
<td>{{ entity.startDate|format_datetime('medium') }}</td>
<td>
{# {{ dump(entity.id) }} #}
{{ entity.startDate|format_datetime('medium') }}
</td>
<td>{{ entity.endDate|format_datetime('medium') }}</td>
<td>
{% for scope in entity.scope %}
{#
#}
{{ dump(scope) }}
{{ scope.label|localize_translatable_string }}
{% endfor %}
</td>
<td>
{% for user in entity.user %}
{#
#}
{{ dump(user.id) }}
{{ user.usernameCanonical }}
{% endfor %}
{{ (entity.endDate is null)
? "crud.admin_user_scope_history.index.today"|trans
: entity.endDate|format_datetime('medium') }}
</td>
<td>{{ entity.user.usernameCanonical }}</td>
<td>{{ entity.scope.name|localize_translatable_string }}</td>
</tr>
{% endfor %}
{% endblock %}

View File

@@ -56,7 +56,9 @@
</li>
<li>
<span class="dt">métier:</span>
{% if entity.userJob %}{{ entity.userJob.label|localize_translatable_string }}{% endif %}
{% if entity.userJob %}
{{ entity.userJob.label|localize_translatable_string }}
{% endif %}
</li>
<li>
<span class="dt">cercle/centre:</span>

View File

@@ -11,32 +11,16 @@
{% endblock %}
{% block table_entities_tbody %}
{{ dump(entities) }}
{#
#}
{% for entity in entities %}
<tr>
<td>{{ entity.startDate|format_datetime('medium') }}</td>
<td>
{# {{ dump(entity.id) }} #}
{{ entity.startDate|format_datetime('medium') }}
</td>
<td>{{ entity.endDate|format_datetime('medium') }}</td>
<td>
{% for job in entity.job %}
{#
#}
{{ dump(job) }}
{{ job.label|localize_translatable_string }}
{% endfor %}
</td>
<td>
{% for user in entity.user %}
{#
#}
{{ dump(user.id) }}
{{ user.usernameCanonical }}
{% endfor %}
{{ (entity.endDate is null)
? "crud.admin_user_job_history.index.today"|trans
: entity.endDate|format_datetime('medium') }}
</td>
<td>{{ entity.user.usernameCanonical }}</td>
<td>{{ entity.job.label|localize_translatable_string }}</td>
</tr>
{% endfor %}
{% endblock %}