feat: teams modal wrapper

This commit is contained in:
liyasthomas
2021-10-03 18:14:52 +05:30
parent 7f501241f0
commit 84ad4071ad
5 changed files with 87 additions and 37 deletions

View File

@@ -0,0 +1,26 @@
<template>
<SmartModal
v-if="show"
:title="$t('app.invite_your_friends')"
@close="$emit('hide-modal')"
>
<template #body>
<Teams :modal="true" />
</template>
</SmartModal>
</template>
<script>
import { defineComponent } from "@nuxtjs/composition-api"
export default defineComponent({
props: {
show: Boolean,
},
methods: {
hideModal() {
this.$emit("hide-modal")
},
},
})
</script>

View File

@@ -26,7 +26,8 @@
</div>
<div
v-else-if="!myTeams.loading && E.isRight(myTeams.data)"
class="grid gap-4 sm:grid-cols-3 md:grid-cols-4"
class="grid gap-4"
:class="modal ? 'grid-cols-1' : 'sm:grid-cols-3 md:grid-cols-4'"
>
<TeamsTeam
v-for="(team, index) in myTeams.data.right.myTeams"
@@ -69,6 +70,10 @@ import { useGQLQuery } from "~/helpers/backend/GQLClient"
import { MyTeamsQueryError } from "~/helpers/backend/QueryErrors"
import { TeamMemberRole } from "~/helpers/backend/types/TeamMemberRole"
defineProps<{
modal: boolean
}>()
const showModalAdd = ref(false)
const showModalEdit = ref(false)
const editingTeam = ref<any>({}) // TODO: Check this out