1
0

feat: use withDefaults for UserTeam

This commit is contained in:
Dominik Pschenitschni 2024-07-06 13:30:57 +02:00 committed by konrad
parent 4b9b9da122
commit f2fdbad7d4

View File

@ -162,7 +162,6 @@ export default {name: 'UserTeamShare'}
<script setup lang="ts"> <script setup lang="ts">
import {ref, reactive, computed, shallowReactive, type Ref} from 'vue' import {ref, reactive, computed, shallowReactive, type Ref} from 'vue'
import type {PropType} from 'vue'
import {useI18n} from 'vue-i18n' import {useI18n} from 'vue-i18n'
import UserProjectService from '@/services/userProject' import UserProjectService from '@/services/userProject'
@ -192,23 +191,16 @@ import User from '@/components/misc/User.vue'
// FIXME: I think this whole thing can now only manage user/team sharing for projects? Maybe remove a little generalization? // FIXME: I think this whole thing can now only manage user/team sharing for projects? Maybe remove a little generalization?
const props = defineProps({ const props = withDefaults(defineProps<{
type: { type: 'project',
type: String as PropType<'project'>, shareType: 'user' | 'team',
default: '', id: number,
}, userIsAdmin?: boolean
shareType: { }>(), {
type: String as PropType<'user' | 'team'>, type: '',
default: '', shareType: '',
}, id: 0,
id: { userIsAdmin: false,
type: Number,
default: 0,
},
userIsAdmin: {
type: Boolean,
default: false,
},
}) })
const {t} = useI18n({useScope: 'global'}) const {t} = useI18n({useScope: 'global'})