Commit b7e260a0 authored by Justin Boyson's avatar Justin Boyson Committed by Mike Greiling

Fix broken filter by approvers

This was fixed in CE, and the EE reference no longer makes sense.
So remove the reference to EE since it is basically a straight
passthrough.
And remove the ee version of visual_token_value.js since it is not used
anymore.
parent bb9bded8
/* eslint-disable import/prefer-default-export */
export const TOKEN_TYPES = ['author', 'assignee'];
import VisualTokenValue from 'ee_else_ce/filtered_search/visual_token_value';
import VisualTokenValue from './visual_token_value';
import { objectToQueryString } from '~/lib/utils/common_utils';
import FilteredSearchContainer from './container';
......
......@@ -6,6 +6,7 @@ import DropdownUtils from '~/filtered_search/dropdown_utils';
import Flash from '~/flash';
import UsersCache from '~/lib/utils/users_cache';
import { __ } from '~/locale';
import { TOKEN_TYPES } from 'ee_else_ce/filtered_search/constants';
export default class VisualTokenValue {
constructor(tokenValue, tokenType) {
......@@ -22,7 +23,7 @@ export default class VisualTokenValue {
if (tokenType === 'label') {
this.updateLabelTokenColor(tokenValueContainer);
} else if (tokenType === 'author' || tokenType === 'assignee') {
} else if (TOKEN_TYPES.includes(tokenType)) {
this.updateUserTokenAppearance(tokenValueContainer, tokenValueElement);
} else if (tokenType === 'my-reaction') {
this.updateEmojiTokenAppearance(tokenValueContainer, tokenValueElement);
......
/* eslint-disable import/prefer-default-export */
import { TOKEN_TYPES as CE_TOKEN_TYPES } from '~/filtered_search/constants';
export const TOKEN_TYPES = [...CE_TOKEN_TYPES, 'approver'];
import VisualTokenValueCE from '~/filtered_search/visual_token_value';
export default class VisualTokenValue {
constructor(tokenValue, tokenType) {
this.tokenValue = tokenValue;
this.tokenType = tokenType;
this.visualTokenValueCE = new VisualTokenValueCE(tokenValue, tokenType);
}
render(tokenValueContainer, tokenValueElement) {
if (this.tokenType === 'approver') {
this.visualTokenValueCE.updateUserTokenAppearance(tokenValueContainer, tokenValueElement);
} else {
this.visualTokenValueCE.render(tokenValueContainer, tokenValueElement);
}
}
}
---
title: Fix broken filter by approvers
merge_request:
author:
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment