From 4a89a6aafc790fa4040582520187b675b56b424b Mon Sep 17 00:00:00 2001 From: liyasthomas Date: Sat, 9 Oct 2021 16:10:51 +0530 Subject: [PATCH] feat: teams invite modal --- .../components/teams/Invite.vue | 373 ++++++++++++++++++ .../hoppscotch-app/components/teams/Team.vue | 12 + .../hoppscotch-app/components/teams/index.vue | 27 ++ 3 files changed, 412 insertions(+) create mode 100644 packages/hoppscotch-app/components/teams/Invite.vue diff --git a/packages/hoppscotch-app/components/teams/Invite.vue b/packages/hoppscotch-app/components/teams/Invite.vue new file mode 100644 index 000000000..9d48d21f0 --- /dev/null +++ b/packages/hoppscotch-app/components/teams/Invite.vue @@ -0,0 +1,373 @@ + + + diff --git a/packages/hoppscotch-app/components/teams/Team.vue b/packages/hoppscotch-app/components/teams/Team.vue index 49d37e695..33bd27105 100644 --- a/packages/hoppscotch-app/components/teams/Team.vue +++ b/packages/hoppscotch-app/components/teams/Team.vue @@ -21,6 +21,18 @@ + @@ -87,6 +100,7 @@ defineProps<{ const showModalAdd = ref(false) const showModalEdit = ref(false) +const showModalInvite = ref(false) const editingTeam = ref({}) // TODO: Check this out const editingTeamID = ref("") @@ -109,12 +123,25 @@ const displayModalEdit = (shouldDisplay: boolean) => { if (!shouldDisplay) resetSelectedData() } + +const displayModalInvite = (shouldDisplay: boolean) => { + showModalInvite.value = shouldDisplay + + if (!shouldDisplay) resetSelectedData() +} + const editTeam = (team: any, teamID: any) => { editingTeam.value = team editingTeamID.value = teamID displayModalEdit(true) } +const inviteTeam = (team: any, teamID: any) => { + editingTeam.value = team + editingTeamID.value = teamID + displayModalInvite(true) +} + const resetSelectedData = () => { editingTeam.value = undefined editingTeamID.value = undefined