1
0

fix: some typechecks

Most of what's still left now is related to models not exporting visible properties for typescript, that's a problem for another day.
This commit is contained in:
kolaente
2022-01-16 22:24:51 +01:00
parent 654f5f8f57
commit 26a94c7e8c
7 changed files with 24 additions and 17 deletions

View File

@ -23,7 +23,7 @@
</template>
<script lang="ts" setup>
import {computed, shallowRef} from 'vue'
import {computed, PropType, shallowRef} from 'vue'
import {useI18n} from 'vue-i18n'
import SubscriptionService from '@/services/subscription'
@ -38,9 +38,11 @@ const props = defineProps({
},
subscription: {
required: true,
type: Object as PropType<SubscriptionModel>,
},
entityId: {
required: true,
type: Number,
},
isButton: {
type: Boolean,
@ -48,6 +50,8 @@ const props = defineProps({
},
})
const subscriptionEntity = computed<string>(() => props.subscription.entity)
const emit = defineEmits(['change'])
const subscriptionService = shallowRef(new SubscriptionService())
@ -57,7 +61,7 @@ const tooltipText = computed(() => {
if (disabled.value) {
return t('task.subscription.subscribedThroughParent', {
entity: props.entity,
parent: props.subscription.entity,
parent: subscriptionEntity.value,
})
}
@ -73,7 +77,7 @@ const disabled = computed(() => {
return false
}
return props.subscription.entity !== props.entity
return subscriptionEntity.value !== props.entity
})
function changeSubscription() {