Browse Source

Fix auto-complete username when creating new cards (addCardForm)

Ben0it-T 3 years ago
parent
commit
e176410b54
1 changed files with 4 additions and 1 deletions
  1. 4 1
      client/components/lists/listBody.js

+ 4 - 1
client/components/lists/listBody.js

@@ -336,7 +336,7 @@ BlazeComponent.extendComponent({
       [
       [
         // User mentions
         // User mentions
         {
         {
-          match: /\B@([\w.]*)$/,
+          match: /\B@([\w.-]*)$/,
           search(term, callback) {
           search(term, callback) {
             const currentBoard = Boards.findOne(Session.get('currentBoard'));
             const currentBoard = Boards.findOne(Session.get('currentBoard'));
             callback(
             callback(
@@ -347,6 +347,9 @@ BlazeComponent.extendComponent({
             );
             );
           },
           },
           template(user) {
           template(user) {
+            if (user.profile && user.profile.fullname) {
+              return (user.username + " (" + user.profile.fullname + ")");
+            }
             return user.username;
             return user.username;
           },
           },
           replace(user) {
           replace(user) {