Skip to content
代码片段 群组 项目
提交 eb49af3f 编辑于 作者: Illya Klymov's avatar Illya Klymov
浏览文件

Merge branch '360557-the-character-is-being-escaped-in-the-assignees-widget' into 'master'

Resolve "The `'` character is being escaped in the Assignees widget"

See merge request gitlab-org/gitlab!86540
No related branches found
No related tags found
无相关合并请求
...@@ -3,6 +3,11 @@ import { GlAvatarLabeled, GlAvatarLink, GlIcon } from '@gitlab/ui'; ...@@ -3,6 +3,11 @@ import { GlAvatarLabeled, GlAvatarLink, GlIcon } from '@gitlab/ui';
import { IssuableType } from '~/issues/constants'; import { IssuableType } from '~/issues/constants';
import { s__, sprintf } from '~/locale'; import { s__, sprintf } from '~/locale';
const AVAILABILITY_STATUS = {
NOT_SET: 'NOT_SET',
BUSY: 'BUSY',
};
export default { export default {
components: { components: {
GlAvatarLabeled, GlAvatarLabeled,
...@@ -22,12 +27,17 @@ export default { ...@@ -22,12 +27,17 @@ export default {
}, },
computed: { computed: {
userLabel() { userLabel() {
if (!this.user.status) { const { name, status } = this.user;
return this.user.name; if (!status || status?.availability !== AVAILABILITY_STATUS.BUSY) {
return name;
} }
return sprintf(s__('UserAvailability|%{author} (Busy)'), { return sprintf(
author: this.user.name, s__('UserAvailability|%{author} (Busy)'),
}); {
author: name,
},
false,
);
}, },
hasCannotMergeIcon() { hasCannotMergeIcon() {
return this.issuableType === IssuableType.MergeRequest && !this.user.canMerge; return this.issuableType === IssuableType.MergeRequest && !this.user.canMerge;
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册