adapt checks in team views to check whether team.oidcId is present and not empty

This commit is contained in:
viehlieb 2023-02-10 15:54:58 +01:00
parent 0b8d8c09c8
commit 2d2fcc5d96
2 changed files with 4 additions and 7 deletions

View File

@ -3,7 +3,7 @@
class="loader-container is-max-width-desktop" class="loader-container is-max-width-desktop"
:class="{ 'is-loading': teamService.loading }" :class="{ 'is-loading': teamService.loading }"
> >
<card class="is-fullwidth" v-if="userIsAdmin && team.oidcId == 0" :title="title"> <card class="is-fullwidth" v-if="userIsAdmin && !team.oidcId" :title="title">
<form @submit.prevent="save()"> <form @submit.prevent="save()">
<div class="field"> <div class="field">
<label <label
@ -68,7 +68,7 @@
</card> </card>
<card class="is-fullwidth has-overflow" :title="$t('team.edit.members')" :padding="false"> <card class="is-fullwidth has-overflow" :title="$t('team.edit.members')" :padding="false">
<div class="p-4" v-if="userIsAdmin && team.oidcId"> <div class="p-4" v-if="userIsAdmin && !team.oidcId">
<div class="field has-addons"> <div class="field has-addons">
<div class="control is-expanded"> <div class="control is-expanded">
<Multiselect <Multiselect

View File

@ -15,11 +15,8 @@
<ul class="teams box" v-if="teams.length > 0"> <ul class="teams box" v-if="teams.length > 0">
<li :key="t.id" v-for="t in teams"> <li :key="t.id" v-for="t in teams">
<router-link :to="{name: 'teams.edit', params: {id: t.id}}"> <router-link :to="{name: 'teams.edit', params: {id: t.id}}">
<p v-if="t.oidcId"> <p>
{{ t.name }}{{ " (sso: " + t.oidcId + ")" }} {{ t.name + (t.oidcId ? ` (sso: ${t.oidcId})`: '')}}
</p>
<p v-else>
{{ t.name }}
</p> </p>
</router-link> </router-link>
</li> </li>