[IMP] mail: activity visual update
1. always show the name of the assignee. 2. replace the icon with avatar 3. bold the time info. task-3142628 closes odoo/odoo#116349 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit is contained in:
@@ -12,6 +12,7 @@ import { useAttachmentUploader } from "@mail/attachments/attachment_uploader_hoo
|
||||
|
||||
import { Component, useState } from "@odoo/owl";
|
||||
import { _t } from "@web/core/l10n/translation";
|
||||
import { url } from "@web/core/utils/urls";
|
||||
|
||||
/**
|
||||
* @typedef {Object} Props
|
||||
@@ -96,4 +97,12 @@ export class ActivityListPopoverItem extends Component {
|
||||
await this.env.services["mail.activity"].markAsDone(this.props.activity, [attachmentId]);
|
||||
this.props.onActivityChanged();
|
||||
}
|
||||
|
||||
get activityAssigneeAvatar() {
|
||||
return url("/web/image", {
|
||||
field: "avatar_128",
|
||||
id: this.props.activity.user_id[0],
|
||||
model: "res.users",
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,13 +26,15 @@
|
||||
</button>
|
||||
</t>
|
||||
</div>
|
||||
<div t-if="props.activity.state !== 'today'" class="d-flex align-items-baseline flex-wrap mx-3">
|
||||
<i class="fa fa-clock-o me-2 text-muted" role="img" aria-label="Deadline" title="Deadline"/>
|
||||
<t t-if="props.activity.user_id[0] and props.activity.user_id[0] !== user.userId">
|
||||
<small class="text-truncate" t-esc="props.activity.user_id[1]"/>
|
||||
<small class="mx-1">-</small>
|
||||
</t>
|
||||
<small t-att-title="props.activity.dateDeadline" t-esc="delayLabel"/>
|
||||
<div class="d-flex align-items-center flex-wrap mx-3">
|
||||
<img t-if="props.activity.user_id[0]" class="me-2 rounded-circle" t-att-src="activityAssigneeAvatar" style="max-width: 1.5rem; max-height: 1.5rem;"/>
|
||||
<div class="mt-1">
|
||||
<t t-if="props.activity.user_id[0]">
|
||||
<small class="text-truncate" t-esc="props.activity.user_id[1]"/>
|
||||
<small t-if="props.activity.state !== 'today'" class="mx-1">-</small>
|
||||
</t>
|
||||
<small t-if="props.activity.state !== 'today'" class="fw-bold" t-att-title="props.activity.dateDeadline" t-esc="delayLabel"/>
|
||||
</div>
|
||||
</div>
|
||||
<ActivityMarkAsDone t-if="state.hasMarkDoneView" activity="props.activity" close="closeMarkAsDone" onClickDoneAndScheduleNext="props.onClickDoneAndScheduleNext" reload="props.onActivityChanged"/>
|
||||
<div t-if="props.activity.mail_template_ids.length > 0" class="mx-3 mt-2">
|
||||
|
||||
Reference in New Issue
Block a user