🐛 Fix wrong can approve detection

This commit is contained in:
LittleSheep 2024-04-06 03:10:58 +08:00
parent 4c929a14fa
commit 79cd1129fd

View File

@ -42,7 +42,8 @@ const props = defineProps<{ item: any }>()
const emits = defineEmits(["approve", "decline"])
const canApprove = computed(() => {
return props.item.status !== 1 && props.item.account_id !== id.userinfo.data?.id
return props.item.status !== 1 &&
(props.item.status !== 0 && props.item.related_id !== id.userinfo.data?.id)
})
const canDecline = computed(() => {
return props.item.status !== 2