- Invia Ris a e Ricevi Ris
- Tutorial Guidato Passi da Compiere - Provincia in cui vivi - Policy aggiornata
This commit is contained in:
@@ -23,7 +23,7 @@ import { lists } from '@store/Modules/lists'
|
||||
import { costanti } from '@store/Modules/costanti'
|
||||
import { copyToClipboard, date, Screen, useQuasar, colors, Cookies, scroll } from 'quasar'
|
||||
|
||||
const { getScrollTarget, setScrollPosition } = scroll
|
||||
const { getScrollTarget, setVerticalScrollPosition } = scroll
|
||||
import { func_tools, toolsext } from '@store/Modules/toolsext'
|
||||
import { preloadedimages, static_data } from '@src/db/static_data'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
@@ -2672,8 +2672,8 @@ export const tools = {
|
||||
})
|
||||
},
|
||||
|
||||
showPositiveNotif(q: any, msg: string) {
|
||||
this.showNotif(q, msg, { color: 'positive', icon: 'notifications' })
|
||||
showPositiveNotif(q: any, msg: string, time?: number) {
|
||||
this.showNotif(q, msg, { color: 'positive', icon: 'notifications' }, time)
|
||||
},
|
||||
|
||||
showNegativeNotif(q: any, msg: string, time = 5000) {
|
||||
@@ -4180,6 +4180,9 @@ export const tools = {
|
||||
return Cookies.remove(mytok)
|
||||
},
|
||||
|
||||
scrollToTopAll() {
|
||||
window.scrollTo(0,0);
|
||||
},
|
||||
scrollToTop() {
|
||||
const element = document.getElementById('mypage')
|
||||
this.scrollToElement(element)
|
||||
@@ -4194,7 +4197,7 @@ export const tools = {
|
||||
const offset = el.offsetTop
|
||||
const duration = 500
|
||||
console.log('target', target, 'offset', offset, 'duration', duration)
|
||||
setScrollPosition(target, offset, duration)
|
||||
setVerticalScrollPosition(target, offset, duration)
|
||||
}
|
||||
},
|
||||
|
||||
@@ -7693,6 +7696,56 @@ export const tools = {
|
||||
return user.name ? user.name + ' ' + (user.surname ? user.surname : '') : user.username
|
||||
},
|
||||
|
||||
getNomeUtenteEUsernameByRecUser(user: IUserFields) {
|
||||
if (user.name)
|
||||
return user.name + ' ' + user.surname + ' (' + user.username + ')'
|
||||
else
|
||||
return user.username
|
||||
},
|
||||
|
||||
updateLink(link: string) {
|
||||
const userStore = useUserStore()
|
||||
|
||||
if (link === '/circuits') {
|
||||
let path = userStore.my.profile.last_circuitpath
|
||||
if (path) {
|
||||
return '/circuit/' + path
|
||||
}
|
||||
return link
|
||||
}
|
||||
return link
|
||||
},
|
||||
|
||||
async receiveRis($q: any, t: any) {
|
||||
const userStore = useUserStore()
|
||||
|
||||
let username = userStore.my.username
|
||||
|
||||
await userStore.setUserReceiveRIS(username, '').then((data) => {
|
||||
if (data.code === serv_constants.RIS_CODE_OK) {
|
||||
this.showPositiveNotif($q, t('circuit.coins_requestedris', {username}), 6000)
|
||||
} else {
|
||||
this.showNegativeNotif($q, t('db.recfailed'))
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
async receiveRisGroup(groupname: string, $q: any, t: any) {
|
||||
const userStore = useUserStore()
|
||||
|
||||
await userStore.setUserReceiveRIS('', groupname).then((data) => {
|
||||
if (data.code === serv_constants.RIS_CODE_OK) {
|
||||
this.showPositiveNotif($q, t('circuit.coins_requestedris', {groupname}), 6000)
|
||||
} else {
|
||||
this.showNegativeNotif($q, t('db.recfailed'))
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
// FINE !
|
||||
|
||||
// getLocale() {
|
||||
|
||||
Reference in New Issue
Block a user