Fixes for features "allow to set user absences"

This commit is contained in:
2023-03-01 16:08:49 +01:00
parent f1ebc089c3
commit 6749758b46
8 changed files with 18 additions and 15 deletions

View File

@@ -35,6 +35,7 @@ export interface User {
id: number;
username: string;
text: string;
text_without_absence: string;
email: string;
user_job: Job;
label: string;

View File

@@ -1,8 +1,7 @@
<template>
<span class="chill-entity entity-user">
{{ user.label }}
<span class="user-job" v-if="user.user_job !== null">({{ user.user_job.label.fr }})</span>
<span class="main-scope" v-if="user.main_scope !== null">({{ user.main_scope.name.fr }})</span>
<span class="user-job" v-if="user.user_job !== null">({{ user.user_job.label.fr }})</span> <span class="main-scope" v-if="user.main_scope !== null">({{ user.main_scope.name.fr }})</span> <span v-if="user.isAbsent" class="badge bg-danger rounded-pill" :title="Absent">A</span>
</span>
</template>

View File

@@ -7,11 +7,6 @@
<span class="main-scope">({{ user.mainScope.name|localize_translatable_string }})</span>
{%- endif -%}
{%- if opts['absence'] and user.isAbsent %}
{%- if date(user.absenceStart) < date() %}
<span class="fa-stack fa-holder" title="{{ 'absence.Absent'|trans }}">
<i class="fa fa-circle fa-stack-1x text-danger"></i>
<i class="fa fa-stack-1x text-white">A</i>
</span>
{%- endif %}
<span class="badge bg-danger rounded-pill" title="{{ 'absence.Absent'|trans|escape('html_attr') }}">{{ 'absence.A'|trans }}</span>
{%- endif -%}
</span>