- Invia Ris a e Ricevi Ris
- Tutorial Guidato Passi da Compiere - Provincia in cui vivi - Policy aggiornata
This commit is contained in:
@@ -227,7 +227,7 @@ export const costanti = {
|
||||
{
|
||||
visible: true,
|
||||
title: 'Assistenza',
|
||||
to: '/faq',
|
||||
to: '/istruzioni',
|
||||
icon: 'fas fa-question',
|
||||
color: 'yellow',
|
||||
hint: '',
|
||||
@@ -291,6 +291,7 @@ export const costanti = {
|
||||
|
||||
USER_CIRCUITS: 60,
|
||||
REQ_CIRCUIT: 65,
|
||||
ENTER_TO_THE_CIRCUIT: 70,
|
||||
|
||||
CMD_DELETE: 1,
|
||||
CMD_MODIFY: 2,
|
||||
|
||||
@@ -749,7 +749,7 @@ export const colmyUserGroup = [
|
||||
name: 'groupname', label_trans: 'reg.groupname', required: false,
|
||||
maxlength: 30,
|
||||
allowchar: costanti.ALLOWCHAR_CODE,
|
||||
showWhen: costanti.showWhen.InPage + costanti.showWhen.InEdit
|
||||
showWhen: costanti.showWhen.InPage + costanti.showWhen.NewRec
|
||||
}),
|
||||
AddCol({
|
||||
name: 'idCity',
|
||||
@@ -2808,6 +2808,20 @@ export const colTableCircuitComplete = [
|
||||
remote_field: 'comune',
|
||||
required: true,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'strProv',
|
||||
label_trans: 'reg.provincia',
|
||||
fieldtype: costanti.FieldType.select,
|
||||
jointable: 'provinces',
|
||||
tablesel: 'provinces',
|
||||
noshowlabel: true,
|
||||
icon: 'fas fa-map-marker-alt',
|
||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
|
||||
required: true,
|
||||
}),
|
||||
// AddCol({ name: 'strProv', label_trans: 'reg.provincia', fieldtype: costanti.FieldType.string,
|
||||
// showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
|
||||
// }),
|
||||
AddCol({
|
||||
name: 'visibility',
|
||||
label_trans: 'bot.visibility',
|
||||
@@ -2880,7 +2894,7 @@ export const colTableCircuitComplete = [
|
||||
]
|
||||
|
||||
export const colTableCircuit = [
|
||||
AddCol({ name: '_id', label_trans: 'circuit.Id' }), // da togliere poi
|
||||
// AddCol({ name: '_id', label_trans: 'circuit.Id' }), // da togliere poi
|
||||
AddCol({
|
||||
name: 'name', label_trans: 'circuit.name',
|
||||
required: true,
|
||||
@@ -2909,6 +2923,17 @@ export const colTableCircuit = [
|
||||
remote_field: 'comune',
|
||||
required: true,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'strProv',
|
||||
label_trans: 'reg.provincia',
|
||||
fieldtype: costanti.FieldType.select,
|
||||
jointable: 'provinces',
|
||||
tablesel: 'provinces',
|
||||
noshowlabel: true,
|
||||
icon: 'fas fa-map-marker-alt',
|
||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
|
||||
required: true,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'visibility',
|
||||
label_trans: 'bot.visibility',
|
||||
|
||||
@@ -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