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:
@ -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() {
|
||||
|
Reference in New Issue
Block a user