strette di mano

This commit is contained in:
Surya Paolo
2023-01-06 15:51:58 +01:00
parent d5d005a714
commit 865e1ad738
37 changed files with 644 additions and 76 deletions

View File

@@ -73,8 +73,14 @@ export default defineComponent({
arr = userStore.my.profile.friends
} else if (props.modelValue === costanti.REQ_FRIENDS) {
arr = userStore.my.profile.req_friends
} else if (props.modelValue === costanti.HANDSHAKE) {
arr = userStore.my.profile.handshake
} else if (props.modelValue === costanti.REQ_HANDSHAKE) {
arr = userStore.my.profile.req_handshake
} else if (props.modelValue === costanti.ASK_SENT_FRIENDS) {
arr = userStore.my.profile.asked_friends
} else if (props.modelValue === costanti.ASK_SENT_HANDSHAKE) {
arr = userStore.my.profile.asked_handshake
} else if (props.modelValue === costanti.ASK_TRUST) {
arr = listTrusted.value.filter((user: IUserFields) => user.verified_by_aportador === undefined)
} else if (props.modelValue === costanti.TRUSTED) {
@@ -101,6 +107,15 @@ export default defineComponent({
label: t('mypages.request_friends') + ' (' + numReqFriends.value + ')',
value: costanti.REQ_FRIENDS
})
if (numHandShake.value > 0 || props.modelValue === costanti.HANDSHAKE)
mybutt.push({ label: t('mypages.handshake') + ' (' + numHandShake.value + ')', value: costanti.HANDSHAKE })
if (numReqHandShake.value > 0 || props.modelValue === costanti.REQ_HANDSHAKE)
mybutt.push({
label: t('mypages.requesthandshake') + ' (' + numReqHandShake.value + ')',
value: costanti.REQ_HANDSHAKE
})
if (numAskSentFriends.value > 0 || props.modelValue === costanti.ASK_SENT_FRIENDS)
mybutt.push({
label: t('mypages.request_sent') + ' (' + numAskSentFriends.value + ')',
@@ -121,11 +136,21 @@ export default defineComponent({
return (arr) ? arr.length : 0
})
const numHandShake = computed(() => {
const arr = userStore.my.profile.handshake
return (arr) ? arr.length : 0
})
const numReqFriends = computed(() => {
const arr = userStore.my.profile.req_friends
return (arr) ? arr.length : 0
})
const numReqHandShake = computed(() => {
const arr = userStore.my.profile.req_handshake
return (arr) ? arr.length : 0
})
const numAskSentFriends = computed(() => {
const arr = userStore.my.profile.asked_friends
return (arr) ? arr.length : 0