From 8892dd329da9054ba454f31c19f160036ac98d3a Mon Sep 17 00:00:00 2001 From: sreehari jayaraj Date: Fri, 22 Sep 2023 15:26:12 +0000 Subject: [PATCH] feat: email badge on enter --- .../components/workspace/InviteSection.vue | 18 ++++++++++++++---- .../pages/WorkspacePage/ContainerPage.ts | 2 +- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/packages/nc-gui/components/workspace/InviteSection.vue b/packages/nc-gui/components/workspace/InviteSection.vue index 684013ca6e..0fae0eb521 100644 --- a/packages/nc-gui/components/workspace/InviteSection.vue +++ b/packages/nc-gui/components/workspace/InviteSection.vue @@ -22,11 +22,12 @@ const inviteCollaborator = async () => { message.error(await extractSdkResponseErrorMsg(e)) } } - +// all user input emails are stored here +const emailBadges = ref>([]) watch(inviteData, (newVal) => { - console.log(newVal.email) - if (newVal.email[-1] === ',') { - console.log(newVal.email) + if (newVal.email.includes(',')) { + emailBadges.value.push(newVal.email.split(',')[0]) + inviteData.email = '' } }) @@ -52,11 +53,20 @@ onMounted(async () => {
Invite
+ + {{ email }} + +