- Invia Ris a e Ricevi Ris
- Tutorial Guidato Passi da Compiere - Provincia in cui vivi - Policy aggiornata
This commit is contained in:
@@ -69,6 +69,8 @@ export const DefaultUser: IUserFields = {
|
||||
handshake: [],
|
||||
mygroups: [],
|
||||
mycircuits: [],
|
||||
last_circuitpath: '',
|
||||
lastdate_reqRis: tools.getLastDateReadReset(),
|
||||
manage_mygroups: [],
|
||||
asked_friends: [],
|
||||
asked_groups: [],
|
||||
@@ -79,6 +81,8 @@ export const DefaultUser: IUserFields = {
|
||||
notif_regions: [],
|
||||
notif_sectors: [],
|
||||
notif_sector_goods: [],
|
||||
stepTutorial: 0,
|
||||
noNameSurname: false,
|
||||
asked_circuits: [],
|
||||
refused_circuits: [],
|
||||
manage_mycircuits: [],
|
||||
@@ -128,6 +132,7 @@ export const DefaultProfile: IUserProfile = {
|
||||
handshake: [],
|
||||
mygroups: [],
|
||||
mycircuits: [],
|
||||
last_circuitpath: '',
|
||||
manage_mygroups: [],
|
||||
asked_friends: [],
|
||||
asked_groups: [],
|
||||
@@ -138,7 +143,8 @@ export const DefaultProfile: IUserProfile = {
|
||||
notif_regions: [],
|
||||
notif_sectors: [],
|
||||
notif_sector_goods: [],
|
||||
|
||||
stepTutorial: 0,
|
||||
noNameSurname: false,
|
||||
asked_circuits: [],
|
||||
refused_circuits: [],
|
||||
manage_mycircuits: [],
|
||||
@@ -218,6 +224,15 @@ export const useUserStore = defineStore('UserStore', {
|
||||
},
|
||||
|
||||
actions: {
|
||||
|
||||
|
||||
getMypaginationMembers(): any {
|
||||
return { sortBy: 'name,username', descending: '1,1', page: 1, rowsNumber: 0, rowsPerPage: 10 }
|
||||
},
|
||||
getSortFieldsAvailable(): any[] {
|
||||
return [{ label: 'Username', value: 'username,name' }, { label: 'Nome', value: 'name,username' }, { label: 'Ultimi reg.', value: 'date_reg,username' }]
|
||||
},
|
||||
|
||||
IsMyFriendByUsername(username: string): boolean {
|
||||
if (this.my.profile.friends)
|
||||
return this.my.profile.friends.findIndex((rec) => rec.username === username) >= 0
|
||||
@@ -416,6 +431,7 @@ export const useUserStore = defineStore('UserStore', {
|
||||
},
|
||||
|
||||
|
||||
|
||||
IsMyCircuitByName(circuitname: string): boolean {
|
||||
|
||||
if (this.my.profile.mycircuits)
|
||||
@@ -483,7 +499,7 @@ export const useUserStore = defineStore('UserStore', {
|
||||
if (acc.circuit) {
|
||||
chi += ' (' + circuitStore.getNameByCircuitId(acc.circuitId) + ')'
|
||||
}
|
||||
arr.push({label: chi, value: acc._id})
|
||||
arr.push({ label: chi, value: acc._id })
|
||||
}
|
||||
}
|
||||
return arr
|
||||
@@ -823,6 +839,27 @@ export const useUserStore = defineStore('UserStore', {
|
||||
})
|
||||
},
|
||||
|
||||
async saveStepTutorial(step: number) {
|
||||
const mydata = {
|
||||
_id: this.my._id,
|
||||
dbop: 'saveStepTut',
|
||||
value: step,
|
||||
}
|
||||
this.my.profile.stepTutorial = step
|
||||
return await this.execDbOp({mydata})
|
||||
},
|
||||
async savenoNameSurname(val: boolean) {
|
||||
const mydata = {
|
||||
_id: this.my._id,
|
||||
dbop: 'noNameSurname',
|
||||
value: val,
|
||||
}
|
||||
if (this.my.profile.noNameSurname !== val) {
|
||||
this.my.profile.noNameSurname = val
|
||||
return await this.execDbOp({mydata})
|
||||
}
|
||||
},
|
||||
|
||||
async newsletterload(paramquery: any) {
|
||||
|
||||
return Api.SendReq('/news/load', 'POST', paramquery)
|
||||
@@ -1323,6 +1360,22 @@ export const useUserStore = defineStore('UserStore', {
|
||||
|
||||
},
|
||||
|
||||
async setUserReceiveRIS(username: string, groupname: string) {
|
||||
const data = {
|
||||
username,
|
||||
groupname,
|
||||
}
|
||||
|
||||
return Api.SendReq('/users/receiveris', 'POST', data)
|
||||
.then((ris) => {
|
||||
console.log('out:', ris)
|
||||
return ris.data
|
||||
}).catch((error) => {
|
||||
return {}
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
async loadGroup(groupname: string, idnotif: string) {
|
||||
const data = {
|
||||
groupname,
|
||||
@@ -1348,6 +1401,7 @@ export const useUserStore = defineStore('UserStore', {
|
||||
|
||||
return Api.SendReq('/circuit/load', 'POST', data)
|
||||
.then((res) => {
|
||||
this.my.profile.last_circuitpath = path
|
||||
if (res && res.data.arrrecnotif) {
|
||||
notifStore.updateArrRecNotifFromServer(res.data.arrrecnotif)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user