refactor: switch workspace after creation (#4015)

Co-authored-by: amk-dev <akash.k.mohan98@gmail.com>
This commit is contained in:
Nivedin
2024-05-09 20:28:24 +05:30
committed by GitHub
parent 5c4b651aee
commit ef1117d8cc
11 changed files with 112 additions and 149 deletions

View File

@@ -66,7 +66,11 @@
{{ t("error.something_went_wrong") }}
</div>
</div>
<TeamsAdd :show="showModalAdd" @hide-modal="displayModalAdd(false)" />
<TeamsAdd
:show="showModalAdd"
:switch-workspace-after-creation="true"
@hide-modal="displayModalAdd(false)"
/>
</div>
</template>
<script setup lang="ts">
@@ -153,6 +157,7 @@ const switchToTeamWorkspace = (team: GetMyTeamsQuery["myTeams"][number]) => {
workspaceService.changeWorkspace({
teamID: team.id,
teamName: team.name,
role: team.myRole,
type: "team",
})
}
@@ -175,7 +180,6 @@ watch(
const displayModalAdd = (shouldDisplay: boolean) => {
showModalAdd.value = shouldDisplay
teamListadapter.fetchList()
}
defineActionHandler("modals.team.new", () => {