diff --git a/src/common/shared_vuejs.ts b/src/common/shared_vuejs.ts
index 075970da..fbf940c6 100755
--- a/src/common/shared_vuejs.ts
+++ b/src/common/shared_vuejs.ts
@@ -286,7 +286,7 @@ export const shared_consts = {
},
fieldsUserToChange() {
- return ['_id', 'username', 'email', 'name', 'surname', 'perm', 'date_reg', 'verified_email', 'verified_by_aportador', 'img', 'ipaddr', 'lasttimeonline', 'profile', 'news_on']
+ return ['_id', 'username', 'email', 'name', 'surname', 'perm', 'date_reg', 'verified_email', 'verified_by_aportador', 'trust_modified', 'img', 'ipaddr', 'lasttimeonline', 'profile', 'news_on']
},
}
diff --git a/src/components/CMyFriends/CMyFriends.ts b/src/components/CMyFriends/CMyFriends.ts
index 36fb46b8..7c053743 100755
--- a/src/components/CMyFriends/CMyFriends.ts
+++ b/src/components/CMyFriends/CMyFriends.ts
@@ -4,7 +4,7 @@ import { useUserStore } from '@store/UserStore'
import { useI18n } from '@/boot/i18n'
import { useQuasar } from 'quasar'
import { costanti } from '@costanti'
-import { ISearchList, IUserFields } from 'model'
+import { IFriends, ISearchList, IUserFields } from 'model'
import { shared_consts } from '@/common/shared_vuejs'
import { tools } from '@store/Modules/tools'
@@ -247,7 +247,7 @@ export default defineComponent({
if (res) {
console.log('res = ', res)
userStore.my.profile.friends = [...userStore.my.profile.friends, res]
- userStore.my.profile.req_friends = userStore.my.profile.req_friends.filter((rec: any) => rec.username !== usernameDest)
+ userStore.my.profile.req_friends = userStore.my.profile.req_friends.filter((rec: IFriends) => rec.username !== usernameDest)
tools.showPositiveNotif($q, t('db.addedfriend'))
}
})
@@ -264,7 +264,7 @@ export default defineComponent({
userStore.setFriendsCmd($q, t, username.value, usernameDest, shared_consts.FRIENDSCMD.REMOVE_FROM_MYFRIENDS, null).then((res) => {
if (res) {
- userStore.my.profile.friends = userStore.my.profile.friends.filter((rec: IUserFields) => rec.username !== usernameDest)
+ userStore.my.profile.friends = userStore.my.profile.friends.filter((rec: IFriends) => rec.username !== usernameDest)
tools.showPositiveNotif($q, t('db.removedfriend'))
}
})
@@ -281,7 +281,7 @@ export default defineComponent({
userStore.setFriendsCmd($q, t, username.value, usernameDest, shared_consts.FRIENDSCMD.REMOVE_FROM_MYFRIENDS, null).then((res) => {
if (res) {
- userStore.my.profile.req_friends = userStore.my.profile.req_friends.filter((user: any) => user !== usernameDest)
+ userStore.my.profile.req_friends = userStore.my.profile.req_friends.filter((user: IFriends) => user.username !== usernameDest)
tools.showPositiveNotif($q, t('db.removedfriend'))
}
})
@@ -314,7 +314,7 @@ export default defineComponent({
}).onOk(() => {
userStore.setFriendsCmd($q, t, username.value, usernameDest, shared_consts.FRIENDSCMD.BLOCK_USER, null).then((res) => {
if (res) {
- userStore.my.profile.friends = userStore.my.profile.friends.filter((rec: IUserFields) => rec.username !== usernameDest)
+ userStore.my.profile.friends = userStore.my.profile.friends.filter((rec: IFriends) => rec.username !== usernameDest)
tools.showPositiveNotif($q, t('db.blockedfriend'))
}
})
diff --git a/src/components/CMyUser/CMyUser.vue b/src/components/CMyUser/CMyUser.vue
index 7e293672..a134823a 100755
--- a/src/components/CMyUser/CMyUser.vue
+++ b/src/components/CMyUser/CMyUser.vue
@@ -70,7 +70,7 @@
-
+
diff --git a/src/model/UserStore.ts b/src/model/UserStore.ts
index 45ba06b3..2d3fa9fc 100755
--- a/src/model/UserStore.ts
+++ b/src/model/UserStore.ts
@@ -7,6 +7,11 @@ const enum ESexType {
Female = 2,
}
+export interface IFriends {
+ username?: string
+ date?: Date
+}
+
export interface IUserProfile {
img?: string
nationality?: string
@@ -44,8 +49,8 @@ export interface IUserProfile {
socioresidente?: boolean
consiglio?: boolean
myshares: IShareWithUs[]
- friends: any[]
- req_friends: string[]
+ friends: IFriends[]
+ req_friends: IFriends[]
// in memory
asked_friends: any[]
@@ -69,6 +74,7 @@ export interface IUserFields {
perm?: number
verified_email?: boolean
verified_by_aportador?: boolean
+ trust_modified?: Date
aportador_solidario?: string
made_gift?: boolean
diff --git a/src/statics/lang/it.js b/src/statics/lang/it.js
index af652617..00ab8097 100755
--- a/src/statics/lang/it.js
+++ b/src/statics/lang/it.js
@@ -378,6 +378,7 @@ const msg_it = {
legenda: 'Legenda',
aportador_solidario: 'Chi ti ha Invitato',
verified_by_aportador: 'Verificato dall\'Invitante',
+ trust_modified: 'Fiducia Modificata',
blocked: 'Bloccato',
username_who_block: 'Bloccato da',
username_regala_invitato: 'Username del Destinatario del regalo',
@@ -843,7 +844,8 @@ const msg_it = {
friends: {
accept_trust: 'Accetta Fiducia',
accept_friend: 'Accetta Amicizia',
- reject_trust: 'Rifiuta Fiducia',
+ refuse_trust: 'Rifiuta Fiducia',
+ reject_trust: 'Revoca Fiducia',
remove_from_myfriends: 'Rimuovi dagli Amici',
block_user: 'Blocca Utente',
ask_friend: 'Chiedi l\'Amicizia',
diff --git a/src/store/Modules/fieldsTable.ts b/src/store/Modules/fieldsTable.ts
index 63c3c74e..c61d3e25 100755
--- a/src/store/Modules/fieldsTable.ts
+++ b/src/store/Modules/fieldsTable.ts
@@ -1301,6 +1301,7 @@ export const fieldsTable = {
AddCol({ name: 'note', label_trans: 'reg.note' }),
AddCol({ name: 'aportador_solidario', label_trans: 'reg.aportador_solidario' }),
AddCol({ name: 'verified_by_aportador', label_trans: 'reg.verified_by_aportador', fieldtype: costanti.FieldType.boolean }),
+ AddCol({ name: 'trust_modified', label_trans: 'reg.trust_modified', fieldtype: costanti.FieldType.date }),
AddCol({ name: 'blocked', label_trans: 'reg.blocked', fieldtype: costanti.FieldType.boolean }),
AddCol({ name: 'username_who_block', label_trans: 'reg.username_who_block' }),
AddCol({
diff --git a/src/store/UserStore.ts b/src/store/UserStore.ts
index 97ab759f..c02ece09 100755
--- a/src/store/UserStore.ts
+++ b/src/store/UserStore.ts
@@ -1,6 +1,7 @@
import { defineStore } from 'pinia'
import {
+ IFriends,
ISigninOptions,
ISignupOptions, IUserFields, IUserProfile, IUserState,
} from '@src/model'
@@ -176,13 +177,6 @@ export const useUserStore = defineStore('UserStore', {
return false
},
- IsReqFriendByUsername(username: string): boolean {
- if (this.my.profile.req_friends)
- return this.my.profile.req_friends.includes(username)
- else
- return false
- },
-
getUserByUsername(username: string): IUserFields | null {
// Check if is this User!
if (this.my.username === username) return this.my