Commit 609cb6b5 authored by Sonia Zorba's avatar Sonia Zorba
Browse files

Added option for showing/hiding the user id in searches

parent 1e9783fd
VUE_APP_API_CLIENT = 'mock' VUE_APP_API_CLIENT = 'mock'
VUE_APP_API_BASE_URL = '' VUE_APP_API_BASE_URL = ''
VUE_APP_SHOW_USER_ID_IN_SEARCH = true
VUE_APP_API_CLIENT = 'server' VUE_APP_API_CLIENT = 'server'
VUE_APP_API_BASE_URL = '' VUE_APP_API_BASE_URL = ''
VUE_APP_SHOW_USER_ID_IN_SEARCH = true
...@@ -6573,7 +6573,8 @@ ...@@ -6573,7 +6573,8 @@
"dependencies": { "dependencies": {
"acorn": { "acorn": {
"version": "6.1.1", "version": "6.1.1",
"resolved": "", "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz",
"integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==",
"dev": true "dev": true
}, },
"acorn-jsx": { "acorn-jsx": {
......
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
</template> </template>
<script> <script>
const SHOW_USER_ID_IN_SEARCH = process.env.VUE_APP_SHOW_USER_ID_IN_SEARCH === 'true';
import client from 'api-client'; import client from 'api-client';
import debounce from 'debounce'; // for delaying the input event (search filter) import debounce from 'debounce'; // for delaying the input event (search filter)
...@@ -50,7 +52,7 @@ export default { ...@@ -50,7 +52,7 @@ export default {
let user = res[i]; let user = res[i];
this.users.push({ this.users.push({
value: user.id, value: user.id,
text: user.displayName + ' [' + user.id + ']' text: user.displayName + (SHOW_USER_ID_IN_SEARCH ? ' [' + user.id + ']' : '')
}); });
} }
if (this.users.length > 0) { if (this.users.length > 0) {
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
<properties> <properties>
<java.version>1.8</java.version> <java.version>1.8</java.version>
<show.user_id_in_search>true</show.user_id_in_search>
</properties> </properties>
<dependencies> <dependencies>
...@@ -75,6 +76,9 @@ ...@@ -75,6 +76,9 @@
<version>1.7.6</version> <version>1.7.6</version>
<configuration> <configuration>
<nodeVersion>v12.6.0</nodeVersion> <nodeVersion>v12.6.0</nodeVersion>
<environmentVariables>
<VUE_APP_SHOW_USER_ID_IN_SEARCH>${show.user_id_in_search}</VUE_APP_SHOW_USER_ID_IN_SEARCH>
</environmentVariables>
</configuration> </configuration>
<executions> <executions>
<execution> <execution>
......
Supports Markdown
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