- Visu Saldo su Home

- SendRisTo
- Movimenti conto Comunitario
- Profilo
This commit is contained in:
Surya Paolo
2023-03-17 19:07:43 +01:00
parent 37c2f08510
commit af04e022eb
35 changed files with 393 additions and 98 deletions

View File

@@ -1,4 +1,4 @@
APP_VERSION="0.5.75"
APP_VERSION="0.5.79"
SERVICE_WORKER_FILE="service-worker.js"
APP_ID="13"
DIRECTORY_LOCAL="newfreeplanet"

View File

@@ -1,4 +1,4 @@
APP_VERSION="0.5.75"
APP_VERSION="0.5.79"
SERVICE_WORKER_FILE="service-worker.js"
APP_ID="13"
DIRECTORY_LOCAL=newfreeplanet

View File

@@ -1,4 +1,4 @@
APP_VERSION="0.5.75"
APP_VERSION="0.5.79"
SERVICE_WORKER_FILE="service-worker.js"
APP_ID="13"
DIRECTORY_LOCAL=newfreeplanet

View File

@@ -1,4 +1,4 @@
APP_VERSION="0.5.75"
APP_VERSION="0.5.79"
SERVICE_WORKER_FILE="service-worker.js"
APP_ID="13"
DIRECTORY_LOCAL="newfreeplanet"

View File

@@ -1,4 +1,4 @@
APP_VERSION="0.5.75"
APP_VERSION="0.5.79"
SERVICE_WORKER_FILE="service-worker.js"
APP_ID="13"
DIRECTORY_LOCAL=newfreeplanet

View File

@@ -1,4 +1,4 @@
APP_VERSION="0.5.75"
APP_VERSION="0.5.79"
SERVICE_WORKER_FILE="service-worker.js"
APP_ID="14"
DIRECTORY_LOCAL="newfreeplanet"

View File

@@ -123,7 +123,17 @@
"crypto": false
},
"browserslist": [
"defaults"
"last 20 Chrome versions",
"last 20 Firefox versions",
"last 10 Edge versions",
"last 15 Safari versions",
"last 60 Android versions",
"last 180 ChromeAndroid versions",
"last 40 FirefoxAndroid versions",
"last 20 iOS versions",
"last 10 Opera versions",
"> 0.1%",
"not dead"
],
"engines": {
"node": ">= 16.14.0",

View File

@@ -66,6 +66,8 @@ export const shared_consts = {
QUERYTYPE_REFUSED_USER_CIRCUIT: 12,
QUERYTYPE_LIST_MOVEMENTS: 15,
QUERYTYPE_LIST_ALLMOVEMENTS: 16,
QUERYTYPE_LIST_MOVEMENTS_GROUPNAME: 17,
QUERYTYPE_LIST_MOVEMENTS_CONTOCOM: 18,
QUERYTYPE_GROUP_CIRCUIT: 20,
QUERYTYPE_REFUSED_GROUP_CIRCUIT: 22,
@@ -92,6 +94,7 @@ export const shared_consts = {
FILTER_USER_NO_VERIFIED_APORTADOR: 2097152,
FILTER_USER_SI_TELEGRAM_ID: 4194304,
FILTER_USER_WITHOUT_USERNAME_TELEGRAM: 8388608,
FILTER_USER_PROVINCE: 16777216,
OPTIONS_SEARCH_ONLY_FULL_WORDS: 1,
OPTIONS_SEARCH_USER_ONLY_FULL_WORDS: 2,
@@ -189,6 +192,9 @@ export const shared_consts = {
TABLES_VISU_LISTA_USER: ['myskills', 'mybachecas', 'myhosps', 'mygoods', 'users'],
TABLES_ORDER_DATE_UPDATED: ['myskills', 'myhosps', 'mygoods'],
TABLES_ORDER_DESCR: ['mygroups'],
TABLES_VISU_IMG: ['myskills', 'mybachecas', 'myhosps', 'mygoods', 'mygroups'],
TABLES_DIRECTORY_A_PARTE: ['mygroups'],
TABLES_WITH_ADMINS: ['mygroups', 'circuits'],

View File

@@ -148,6 +148,10 @@ export default defineComponent({
return { sortBy: 'numMembers', descending: true, page: 1, rowsNumber: 20, rowsPerPage: 20 }
else if (props.table === toolsext.TABUSER)
return userStore.getMypaginationMembers()
else if (shared_consts.TABLES_ORDER_DATE_UPDATED.includes(props.table))
return { sortBy: 'date_created', descending: true, page: 1, rowsNumber: 0, rowsPerPage: 10 } // date_updated
else if (shared_consts.TABLES_ORDER_DESCR.includes(props.table))
return { sortBy: 'desc', descending: false, page: 1, rowsNumber: 0, rowsPerPage: 10 }
return { sortBy: 'date_created', descending: true, page: 1, rowsNumber: 20, rowsPerPage: 20 }
})

View File

@@ -49,7 +49,7 @@
:nodataLabel="noMsgRecord"
:prop_search="true"
:finder="true"
labelElemFind="circuiti trovati"
labelElemFind="trovati"
:choose_visutype="visuType"
:butt_modif_new="true && !noButtAdd"
noresultLabel="Il filtro selezionato non ha trovato nessun risultato"

View File

@@ -364,6 +364,7 @@ export default defineComponent({
const myvertical = ref(props.vertical)
const ordinam = ref('')
const ordinam_desc = ref(false)
const valoriopt = computed(() => (item: any, addall: boolean, addnone: boolean) => {
@@ -429,8 +430,8 @@ export default defineComponent({
watch(() => ordinam.value, (to: any, from: any) => {
if (pagination.value.sortBy !== ordinam.value) {
tools.setCookie('s_ordinam_' + props.prop_mytable, ordinam.value)
pagination.value.sortBy = ordinam.value
refresh()
// pagination.value.sortBy = getObjSort(ordinam.value, ordinam_desc.value)
// refresh()
}
})
@@ -616,25 +617,33 @@ export default defineComponent({
return precorder ? precorder : 1;
}
// emulate ajax call
// SELECT * FROM ... WHERE...LIMIT...
async function fetchFromServer(startRow: any, endRow: any, param_myfilter: any, param_myfilterand: any, sortBy: any, descending: any) {
// console.log('fetchFromServer')
function getObjSort(sortBy: any, descending: any) {
let myobj: any = {}
if (sortBy) {
let arrsort = sortBy.split(',');
let arrdescending = (descending && descending.length > 0) ? descending.split(',') : [];
if (arrsort) {
sortBy = sortBy + ''
descending = descending + ''
let arrsort = (sortBy && sortBy.indexOf(',') > 0) ? sortBy.split(',') : [];
let arrdescending = (descending && descending.lenght > 1 && descending.indexOf(',') > 0) ? descending.split(',') : [];
if (arrsort.length > 0) {
for (let i = 0; i < arrsort.length; i++) {
let field = arrsort[i].trim()
myobj[field] = (tools.isArray(arrdescending) && (arrdescending.length > [i])) ? parseInt(arrdescending[i].trim()) : 1;
myobj[field] = getOrderByField(field, myobj[field])
let risdesc = (tools.isArray(arrdescending) && (arrdescending.length > i)) ? parseInt(arrdescending[i].trim()) : 1;
myobj[field] = getOrderByField(field, risdesc)
}
} else {
myobj[sortBy] = getOrderByField(sortBy, descending ? -1 : 1)
}
}
console.log('myobj', myobj)
return myobj
}
// emulate ajax call
// SELECT * FROM ... WHERE...LIMIT...
async function fetchFromServer(startRow: any, endRow: any, param_myfilter: any, param_myfilterand: any, sortBy: any, descending: any) {
// console.log('fetchFromServer')
let myobj = getObjSort(sortBy, descending)
// console.log('sortBy', sortBy)
const filtersearch: any[] = []
@@ -982,11 +991,12 @@ export default defineComponent({
// don't forfunction to update local pagination object
pagination.value.page = page
pagination.value.rowsPerPage = rowsPerPage
pagination.value.sortBy = sortBy
pagination.value.sortBy = getObjSort(sortBy, descending)
ordinam.value = sortBy
ordinam_desc.value = descending
pagination.value.descending = descending
console.log('pagination', pagination)
// console.log('pagination', pagination)
// ...and turn of loading indicator
loading.value = false
@@ -1001,8 +1011,10 @@ export default defineComponent({
const myfilternow = myfilter.value
const myfilterandnow = myfilterand.value
if (ordinam.value)
if (ordinam.value) {
sortBy = ordinam.value
descending = ordinam_desc.value
}
savefilter()
@@ -1054,8 +1066,9 @@ export default defineComponent({
// don't forfunction to update local pagination object
pagination.value.page = page
pagination.value.rowsPerPage = rowsPerPage
pagination.value.sortBy = sortBy
pagination.value.sortBy = getObjSort(sortBy, descending)
ordinam.value = sortBy
ordinam_desc.value = descending
pagination.value.descending = descending
// console.log('pagination', pagination)
@@ -1436,7 +1449,6 @@ export default defineComponent({
tablesel.value = tools.getCookie('tablesel', tablesel.value)
}
myfilterand.value = props.filterdef
// myfiltercustom.value = props.filtercustom
// console.log('tablesel', tablesel)
@@ -1448,7 +1460,16 @@ export default defineComponent({
tablesel.value = mytable.value
}
ordinam.value = tools.getCookie('s_ordinam_' + tablesel.value, null)
if (!shared_consts.TABLES_ORDER_DATE_UPDATED.includes(tablesel.value) &&
!shared_consts.TABLES_ORDER_DESCR.includes(tablesel.value)) {
console.log('get cookie)')
let v1 = tools.getCookie('s_ordinam_' + tablesel.value, null)
if (v1)
ordinam.value = v1
let v2 = tools.getCookie('s_ordinam_des_' + tablesel.value, null)
if (v2)
ordinam_desc.value = v2
}
// console.log('2) tablesel', tablesel.value)
@@ -2239,6 +2260,7 @@ export default defineComponent({
userStore,
doSort,
ordinam,
ordinam_desc,
}
}
})

View File

@@ -86,7 +86,7 @@
col.extrafield &&
(col.tipovisu !== costanti.TipoVisu.LINK ||
(col.tipovisu === costanti.TipoVisu.LINK &&
userStore.getImgByProfile(row, true, col)))
myvalue))
"
>
<span class="extrafield">{{ $t(col.extrafield) }}</span>
@@ -115,8 +115,7 @@
!col.extrafield ||
(col.extrafield &&
(col.tipovisu !== costanti.TipoVisu.LINK ||
(col.tipovisu === costanti.TipoVisu.LINK &&
userStore.getImgByProfile(row, true, col))))
(col.tipovisu === costanti.TipoVisu.LINK && myvalue)))
"
class="q-ma-xs chip_shadow"
>

View File

@@ -21,6 +21,7 @@ import { useRoute, useRouter } from 'vue-router'
import { useCircuitStore } from '@store/CircuitStore'
const STEP_NAME_SURNAME = 2
const STEP_FOTO = 5
export default defineComponent({
name: 'CMyProfileTutorial',
@@ -103,6 +104,15 @@ export default defineComponent({
userStore.savenoNameSurname(true)
}
}
if (step.value === STEP_FOTO + 1) {
let index = step.value
if (userStore.my.profile.img) {
// foto esistente
userStore.savenoFoto(false)
} else {
userStore.savenoFoto(true)
}
}
})
@@ -224,6 +234,8 @@ export default defineComponent({
if (contact.value)
filtroutente.value = [{ userId: contact.value._id }]
userStore.my.profile.stepTutorial = getFirstStepToFill()
step.value = userStore.my.profile.stepTutorial ? userStore.my.profile.stepTutorial : 1
if (step.value > numstep.value)
step.value = numstep.value
@@ -234,7 +246,6 @@ export default defineComponent({
userStore.my.profile.stepTutorial = 1
}
userStore.my.profile.stepTutorial = getFirstStepToFill()
}

View File

@@ -13,7 +13,6 @@
clcolor="text-white"
myclass="myshad"
:canopen="!completed()"
:header="step < numstep"
>
<q-slide-transition>
<div v-show="step < numstep">
@@ -192,7 +191,7 @@
dense
size="md"
:label="$t('dialog.vai')"
@click="step = getFirstStepToFill()"
@click="step = 1"
>
</q-btn>
</div>

View File

@@ -27,4 +27,7 @@
.text_title{
color: blue;
@media (prefers-color-scheme: dark) {
color: white;
}
}

View File

@@ -28,3 +28,6 @@
.text_title{
color: blue;
}
.text_title_dark{
color: white;
}

View File

@@ -26,7 +26,7 @@
<!--<span class="dateevent" v-if="myrec.dateTimeStart">dal <span class="datainizio">{{tools.getstrVeryShortDate(myrec.dateStart) }}</span> al <span class="datafine">{{ tools.getstrVeryShortDate(myrec.dateEnd) }}</span>
</span>-->
</q-item-label>
<q-item-label v-if="myrec.title" lines="1" class="text_title">
<q-item-label v-if="myrec.title" lines="1" :class="($q.dark.isActive ? `text_title_dark`: `text_title`)">
<span class="text-weight-bold">{{ myrec.title }}</span>
</q-item-label>
<q-item-label lines="3" v-if="myrec.descr">{{ myrec.descr }}<br>

View File

@@ -54,6 +54,7 @@ export default defineComponent({
const color_border = ref('red')
const showingtooltip = ref(false)
const visuTransac = ref(false)
function created() {
// created
@@ -68,6 +69,7 @@ export default defineComponent({
colTableNotifCoins,
tools,
color_border,
visuTransac,
}
},
})

View File

@@ -9,54 +9,106 @@
:label="t('account.saldo')"
:paramTypeAccount="paramTypeAccount"
:myrecparam="account"
>
>
</CCurrencyValue>
<CCurrencyValue
v-else
:symbol="symbol"
:tips="t('account.saldo_tips', {fido: qtarem, symbol})"
:tips="t('account.saldo_tips', { fido: qtarem, symbol })"
:color="color"
v-model="saldo"
:valueextra="account && account.notifspending && account.notifspending.length > 0 ? `* `: ''"
:label="t('account.saldo') + ` (` + t('account.dispon') + `: ` + qtarem + `)`"
:valueextra="
account && account.notifspending && account.notifspending.length > 0
? `* `
: ''
"
:label="
t('account.saldo') + ` (` + t('account.dispon') + `: ` + qtarem + `)`
"
:paramTypeAccount="paramTypeAccount"
:myrecparam="account"
>
>
</CCurrencyValue>
<q-btn
v-if="
!small &&
account &&
account.notifspending &&
account.notifspending.length > 0
"
:label="$t('movement.viewpendingtransaction')"
@click="visuTransac = true"
icon="fas fa-info"
>
</q-btn>
<div v-if="!small && account && account.notifspending && account.notifspending.length > 0" :class="`text-h7 full-width`"
:style="(!$q.screen.lt.sm ? `min-width: 250px; ` : ``) + (color_border ? `border-color: ` + color_border + `!important;`: '')">
<div class="text-center text-h7-dense text-italic text-grey-14">
{{ t('movement.pendingtransaction') }}
</div>
<div v-for="(myrec, index) in account.notifspending" :key="myrec._id">
<q-card class="row justify-evenly items-center">
<span v-for="(mycol, indcol) of colTableNotifCoins" :key="indcol">
<div
class="col"
style="display: flex;"
v-if="(mycol.visible && (tools.checkIfShowField(mycol, tools.TIPOVIS_SHOW_RECORD, false, tools.getValue(myrec, mycol.field, mycol.subfield))))">
<span class="testo" v-if="mycol.name === 'datenotif'">{{ index + 1 }}°</span>
<CMyFieldRec
table="sendnotifs"
:id="myrec._id"
:rec="myrec"
:field="mycol.name"
:canEdit="false"
:canModify="false">
</CMyFieldRec>
<q-dialog v-model="visuTransac">
<q-card class="dialog_card">
<q-toolbar class="bg-primary text-white">
<q-toolbar-title class="text-h7">
{{ $t('movement.pendingtransaction') }}
</q-toolbar-title>
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
</q-toolbar>
<q-card-section class="inset-shadow">
<div
v-if="
!small &&
account &&
account.notifspending &&
account.notifspending.length > 0
"
:class="`text-h7 full-width`"
:style="
(!$q.screen.lt.sm ? `min-width: 250px; ` : ``) +
(color_border
? `border-color: ` + color_border + `!important;`
: '')
"
>
<div class="text-center text-h7-dense text-italic text-grey-14">
{{ t('movement.pendingtransaction') }}
</div>
</span>
</q-card>
</div>
</div>
<div v-for="(myrec, index) in account.notifspending" :key="myrec._id">
<q-card class="row justify-evenly items-center">
<span v-for="(mycol, indcol) of colTableNotifCoins" :key="indcol">
<div
class="col"
style="display: flex"
v-if="
mycol.visible &&
tools.checkIfShowField(
mycol,
tools.TIPOVIS_SHOW_RECORD,
false,
tools.getValue(myrec, mycol.field, mycol.subfield)
)
"
>
<span class="testo" v-if="mycol.name === 'datenotif'"
>{{ index + 1 }}°</span
>
<CMyFieldRec
table="sendnotifs"
:id="myrec._id"
:rec="myrec"
:field="mycol.name"
:canEdit="false"
:canModify="false"
>
</CMyFieldRec>
</div>
</span>
</q-card>
</div>
</div>
</q-card-section>
</q-card>
</q-dialog>
</template>
<script lang="ts" src="./CSaldo.ts">

View File

@@ -1,4 +1,4 @@
import { computed, defineComponent, PropType, ref } from 'vue'
import { computed, defineComponent, PropType, ref, watch } from 'vue'
import { ICalcStat, IOperators } from '../../model'
import { useUserStore } from '../../store/UserStore'
@@ -11,13 +11,14 @@ import { costanti, IMainCard } from '@store/Modules/costanti'
import { CMyUser } from '../CMyUser'
import { CMyGroup } from '../CMyGroup'
import { CUserInfoAccount } from '../CUserInfoAccount'
import { tools } from '@store/Modules/tools'
import { useQuasar } from 'quasar'
export default defineComponent({
name: 'CSendRISTo',
props: {},
components: { CMyUser, CMyGroup },
components: { CMyUser, CMyGroup, CUserInfoAccount },
setup(props) {
const userStore = useUserStore()
@@ -33,6 +34,9 @@ export default defineComponent({
const tipoConto = ref(costanti.AccountType.USER)
const loading = ref(false)
const circuitpath = computed(() => userStore.my.profile.last_circuitpath)
const contact = computed(() => userStore.my)
const arrTypesAccounts = ref(<any>[
{
@@ -84,6 +88,8 @@ export default defineComponent({
tipoConto,
updateUserListRIS,
loading,
contact,
circuitpath,
}
},
})

View File

@@ -1,5 +1,11 @@
<template>
<div class="row text-center justify-evenly items-center">
<CUserInfoAccount
:user="contact"
:circuitpath="circuitpath"
:admin="false"
:onlysaldo="true"
/>
<div class="q-mb-sm">
<q-btn
icon="fas fa-upload"

View File

@@ -23,6 +23,7 @@
:noaut="noaut"
:hidetitleIfEmpty="true"
:labelBtnAddExtra="`Aggiungi ` + title"
:prop_pagination="tools.getPagination()"
:margin_right="30">
</CGridTableRec>

View File

@@ -18,7 +18,7 @@ import { useCircuitStore } from '@store/CircuitStore'
export default defineComponent({
name: 'CUserInfoAccount',
emits: ['setCmd'],
components: {CUserNonVerif, CSaldo, CSendCoins, CCurrencyValue, CCurrencyV2 },
components: { CUserNonVerif, CSaldo, CSendCoins, CCurrencyValue, CCurrencyV2 },
props: {
user: {
type: Object as PropType<IUserFields>,
@@ -29,11 +29,21 @@ export default defineComponent({
required: false,
default: '',
},
circuitpath: {
type: String,
required: false,
default: '',
},
admin: {
type: Boolean,
required: false,
default: false,
},
onlysaldo: {
type: Boolean,
required: false,
default: false,
},
account: {
type: Object as PropType<IAccount>,
required: false,
@@ -48,7 +58,7 @@ export default defineComponent({
const { t } = useI18n()
const $router = useRouter()
const myaccount = ref(<IAccount|undefined>undefined)
const myaccount = ref(<IAccount | undefined>undefined)
const circuitStore = useCircuitStore()
@@ -60,13 +70,28 @@ export default defineComponent({
mounted()
})
watch(() => tools.isUserOk(), (newval, oldval) => {
if (userStore.isUserOk()) {
mounted()
}
})
function mounted() {
circuit.value = circuitStore.getCircuitByName(props.circuitname)
if (props.circuitname)
circuit.value = circuitStore.getCircuitByName(props.circuitname)
else if (props.circuitpath) {
circuit.value = circuitStore.getCircuitByPath(props.circuitpath)
}
if (props.account) {
myaccount.value = props.account
} else {
myaccount.value = props.user.account
if (props.user.account) {
myaccount.value = props.user.account
} else {
if (circuit.value)
myaccount.value = userStore.getAccountByCircuitId(circuit.value._id)
}
}
}

View File

@@ -1,6 +1,6 @@
<template>
<div v-if="myaccount && circuit">
<q-card-section>
<q-card-section v-if="!onlysaldo">
<div class="text-h6">{{ t('groups.infoaccount') }}</div>
</q-card-section>
@@ -16,7 +16,7 @@
>
</CSaldo>
<q-card-section>
<q-card-section v-if="!onlysaldo">
<div v-if="myaccount.date_created" class="container">
<q-icon name="fas fa-lightbulb" class="iconcirc"></q-icon>
{{

View File

@@ -104,7 +104,7 @@ export interface IUserProfile {
handshake: IFriends[]
mygroups: IMyGroup[]
mycircuits: IMyCircuit[]
last_circuitpath?: string
last_circuitpath: string
lastdate_reqRis?: Date
manage_mygroups: IMyGroup[]
notifs: IUserNotifType[]
@@ -115,6 +115,7 @@ export interface IUserProfile {
notif_sector_goods: number[]
stepTutorial: number
noNameSurname: boolean
noFoto: boolean
// in memory
asked_friends: any[]

View File

@@ -163,6 +163,8 @@
<CKeyAndValue mykey="Invitato da:" :myvalue="myuser.aportador_solidario"></CKeyAndValue>
<CKeyAndValue mykey="Online il:" :mydate="myuser.lasttimeonline"></CKeyAndValue>
<CKeyAndValue mykey="Provincia:" :myvalue="myuser.profile.resid_province"></CKeyAndValue>
<CKeyAndValue mykey="Città di Nascita:" :myvalue="myuser.profile.born_city"></CKeyAndValue>
<CKeyAndValue mykey="Data di Nascita:" :mydate="myuser.profile.dateofbirth"></CKeyAndValue>
<CKeyAndValue mykey="Biografia:" :myvalue="myuser.profile.biografia"></CKeyAndValue>

View File

@@ -61,6 +61,10 @@ export default defineComponent({
{
label: 'Telegram BOT Rimosso',
value: shared_consts.FILTER_USER_TELEGRAM_BLOCKED
},
{
label: 'Provincia',
value: shared_consts.FILTER_USER_PROVINCE
}
]

View File

@@ -1335,6 +1335,7 @@ const msg_it = {
toCColl: 'Al Conto Collettivo:',
toCCom: 'Al Conto Comunitario:',
pendingtransaction: '* Transazioni Pendenti',
viewpendingtransaction: 'Vedi Transazioni Pendenti',
onlymymov: 'Mostra solo i miei movimenti',
showsaldi: 'Mostra i Saldi dei membri',
},

View File

@@ -609,20 +609,6 @@ export const colmyMovement = [
extrafield: 'movement.from',
tipoconto: costanti.AccountType.USER,
}),
AddCol({
name: 'userto.username',
label_trans: 'reg.username',
field: 'userto',
subfield: 'username',
foredit: false,
tipovisu: costanti.TipoVisu.LINK,
fieldtype: costanti.FieldType.username_chip,
link: '/my/userto.username',
extrafield: 'movement.to',
noshowlabel: true,
tipoconto: costanti.AccountType.USER,
}),
AddCol({
name: 'groupfrom.groupname',
label_trans: 'groups.groupname',
@@ -631,7 +617,7 @@ export const colmyMovement = [
foredit: false,
tipovisu: costanti.TipoVisu.LINK,
fieldtype: costanti.FieldType.username_chip,
link: '/my/groupfrom.groupname',
link: '/grp/groupfrom.groupname',
noshowlabel: true,
extrafield: 'movement.fromCColl',
tipoconto: costanti.AccountType.COLLECTIVE_ACCOUNT,
@@ -649,6 +635,20 @@ export const colmyMovement = [
extrafield: 'movement.fromCCom',
tipoconto: costanti.AccountType.COMMUNITY_ACCOUNT,
}),
AddCol({
name: 'userto.username',
label_trans: 'reg.username',
field: 'userto',
subfield: 'username',
foredit: false,
tipovisu: costanti.TipoVisu.LINK,
fieldtype: costanti.FieldType.username_chip,
link: '/my/userto.username',
extrafield: 'movement.to',
noshowlabel: true,
tipoconto: costanti.AccountType.USER,
}),
AddCol({
name: 'groupto.groupname',
label_trans: 'groups.groupname',
@@ -657,7 +657,7 @@ export const colmyMovement = [
foredit: false,
tipovisu: costanti.TipoVisu.LINK,
fieldtype: costanti.FieldType.username_chip,
link: '/my/groupto.groupname',
link: '/grp/groupto.groupname',
extrafield: 'movement.toCColl',
noshowlabel: true,
tipoconto: costanti.AccountType.COLLECTIVE_ACCOUNT,
@@ -2182,6 +2182,7 @@ export const colTableUsers = [
AddCol({ name: 'profile.born_city', label_trans: 'reg.born_city', fieldtype: costanti.FieldType.string }),
AddCol({ name: 'profile.born_province', label_trans: 'reg.born_province', fieldtype: costanti.FieldType.string }),
AddCol({ name: 'profile.born_country', label_trans: 'reg.born_country', fieldtype: costanti.FieldType.string }),
AddCol({ name: 'profile.resid_province', label_trans: 'reg.resid_province', fieldtype: costanti.FieldType.string }),
AddCol({
name: 'profile.resplist',
field: 'profile',
@@ -2596,6 +2597,8 @@ export const colTableUsersISP = [
}),
AddCol({ name: 'profile.born_province', label_trans: 'reg.born_province', fieldtype: costanti.FieldType.string }),
AddCol({ name: 'profile.born_country', label_trans: 'reg.born_country', fieldtype: costanti.FieldType.string }),
AddCol({ name: 'profile.resid_province', label_trans: 'reg.resid_province', fieldtype: costanti.FieldType.string }),
AddCol({
name: 'profile.cell', field: 'profile', subfield: 'cell', label_trans: 'reg.cell', maxlength: 12,
tipovisu: costanti.TipoVisu.TESTO_BORDATO

View File

@@ -12,7 +12,7 @@ import {
ITodo,
IUserFields,
Privacy,
TipoVisu, IGroup, IMySkill, IMyBacheca, IImgGallery, IMsgGlobParam, IUserExport, ISpecialField, IAccount, IMyCircuit, ISendCoin, IMovement, IMovVisu, INotif, IMyElem, IMyCard, ILabelValue, ILabelValueStr, IAnim, ILang, IGroupShort,
TipoVisu, IGroup, IMySkill, IMyBacheca, IImgGallery, IMsgGlobParam, IUserExport, ISpecialField, IAccount, IMyCircuit, ISendCoin, IMovement, IMovVisu, INotif, IMyElem, IMyCard, ILabelValue, ILabelValueStr, IAnim, ILang, IGroupShort, IPagination,
} from '@model'
import { fieldsTable } from '@store/Modules/fieldsTable'
@@ -7746,6 +7746,10 @@ export const tools = {
},
getPagination(table: string): IPagination {
return { sortBy: 'desc', descending: true, page: 1, rowsNumber: 0, rowsPerPage: 10 }
}
// FINE !
// getLocale() {

View File

@@ -83,6 +83,7 @@ export const DefaultUser: IUserFields = {
notif_sector_goods: [],
stepTutorial: 0,
noNameSurname: false,
noFoto: false,
asked_circuits: [],
refused_circuits: [],
manage_mycircuits: [],
@@ -145,6 +146,7 @@ export const DefaultProfile: IUserProfile = {
notif_sector_goods: [],
stepTutorial: 0,
noNameSurname: false,
noFoto: false,
asked_circuits: [],
refused_circuits: [],
manage_mycircuits: [],
@@ -859,6 +861,17 @@ export const useUserStore = defineStore('UserStore', {
return await this.execDbOp({mydata})
}
},
async savenoFoto(val: boolean) {
const mydata = {
_id: this.my._id,
dbop: 'noFoto',
value: val,
}
if (this.my.profile.noFoto !== val) {
this.my.profile.noFoto = val
return await this.execDbOp({mydata})
}
},
async newsletterload(paramquery: any) {

View File

@@ -3,6 +3,7 @@ import { CMyFieldRec } from '@/components/CMyFieldRec'
import { CTitleBanner } from '@/components/CTitleBanner'
import { CProfile } from '@/components/CProfile'
import { CSkill } from '@/components/CSkill'
import { CMySelectCity } from '@/components/CMySelectCity'
import { tools } from '@store/Modules/tools'
import { defineComponent, onMounted, ref } from 'vue'
import { useUserStore } from '@store/UserStore'
@@ -18,7 +19,8 @@ import { IUserFields } from 'model'
export default defineComponent({
name: 'EditProfile',
components: { CProfile, CTitleBanner, CMyFieldDb, CSkill, CMyFieldRec },
components: { CProfile, CTitleBanner,
CMySelectCity, CMyFieldDb, CSkill, CMyFieldRec },
props: {},
setup() {
const userStore = useUserStore()
@@ -106,6 +108,7 @@ export default defineComponent({
filtroutente,
myuser,
t,
userStore,
site: globalStore.site,
}
}

View File

@@ -28,7 +28,7 @@
>
</CMyFieldDb>
</div>
<div> {{ $t('profile.info_msg') }} </div>
<div>{{ $t('profile.info_msg') }}</div>
<div class="myrow">
<div v-if="site.confpages.showNameSurname">
<CMyFieldDb
@@ -163,6 +163,19 @@
:type="costanti.FieldType.date"
>
</CMyFieldDb>
<CMySelectCity
:label="$t('reg.resid_province')"
table="users"
jointable="provinces"
v-model="userStore.my.profile.resid_province"
myclass="selectorwide text-white"
:db_type="costanti.FieldType.string"
db_field="profile"
db_subfield="resid_province"
:db_id="userStore.my._id"
:db_rec="userStore.my"
>
</CMySelectCity>
</div>
<div class="myrow">

View File

@@ -19,7 +19,7 @@ import { useQuasar } from 'quasar'
import { costanti } from '@costanti'
import { ICircuit, ICity, IFriends, IMyCircuit, IMyGroup, ISearchList, IUserFields } from 'model'
import { shared_consts } from '@/common/shared_vuejs'
import { colmyUserPeople, colmyUserGroup } from '@store/Modules/fieldsTable'
import { colmyUserPeople, colmyUserGroup, colmyMovementTable, colmyMovement } from '@store/Modules/fieldsTable'
import { useNotifStore } from '@store/NotifStore'
import { useCircuitStore } from '@src/store/CircuitStore'
@@ -51,6 +51,9 @@ export default defineComponent({
const mystatus = ref(<number>0)
const users_in_group = ref(<IFriends[]>[])
const showonlymine = ref(true)
const tabellare = ref(false)
const loading = ref(false)
const tabgrp = ref('info')
@@ -222,6 +225,23 @@ export default defineComponent({
}
function getExtraparams_movs_grp (circuit: ICircuit): any {
if (showonlymine.value) {
return {
querytype: shared_consts.QUERYTYPE_LIST_MOVEMENTS_GROUPNAME,
myid: circuit ? circuit._id : '',
groupname: mygrp.value ? mygrp.value.groupname : '',
}
} else {
return {
querytype: shared_consts.QUERYTYPE_LIST_ALLMOVEMENTS,
myid: circuit ? circuit._id : '',
}
}
}
onMounted(mounted)
return {
@@ -262,6 +282,11 @@ export default defineComponent({
cities,
circuitslist,
circuitStore,
getExtraparams_movs_grp,
showonlymine,
tabellare,
colmyMovementTable,
colmyMovement,
}
}
})

View File

@@ -490,9 +490,86 @@
<q-tab-panel name="circuits">
<div v-for="(circuit, ind) of circuitslist" :key="ind">
<div class="circuit_name">{{ circuit.name }}:</div>
<CInfoAccount :circuitname="circuit.name"
:grp="mygrp" :account="circuit.account"
:admin="tools.iAmAdminCircuit(circuit.name)" />
<CInfoAccount
:circuitname="circuit.name"
:grp="mygrp"
:account="circuit.account"
:admin="tools.iAmAdminCircuit(circuit.name)"
/>
<q-toggle
v-model="showonlymine"
:label="t('movement.onlymymov')"
></q-toggle>
<q-toggle v-model="tabellare" label="Tabella"></q-toggle>
<CGridTableRec
v-if="tabellare && !loading"
prop_mytable="movements"
prop_mytitle=""
:prop_mycolumns="colmyMovementTable"
prop_colkey="_id"
col_title="Lista Movimenti"
:vertical="0"
nodataLabel="Nessun Movimento effettuato"
:prop_search="true"
:enableExport="true"
hint="nota da trovare (tabella)"
:finder="false"
:choose_visutype="false"
:finder_noNull="false"
:options="shared_consts.OPTIONS_SEARCH_USER_ALL_WORDS"
:butt_modif_new="false"
noresultLabel="movimenti non trovati con questa ricerca"
filterextra=""
:prop_pagination="{
sortBy: 'transactionDate',
descending: true,
page: 1,
rowsNumber: 20,
rowsPerPage: 20,
}"
:showType="costanti.SHOW_MOVEMENTS"
:showCol="true"
:showHeaderCol="true"
:extraparams="getExtraparams_movs_grp(circuit)"
extrafield=""
:visufind="costanti.FRIENDS"
>
</CGridTableRec>
<CGridTableRec
v-else-if="!loading"
prop_mytable="movements"
prop_mytitle=""
:prop_mycolumns="colmyMovement"
prop_colkey="_id"
col_title="Lista Movimenti"
:vertical="costanti.VISUTABLE_LISTA"
nodataLabel="Nessun Movimento effettuato"
:enableExport="true"
:prop_search="true"
hint="nota da trovare"
:finder="false"
:choose_visutype="false"
:finder_noNull="false"
:options="shared_consts.OPTIONS_SEARCH_USER_ALL_WORDS"
:butt_modif_new="false"
noresultLabel="movimenti non trovati con questa ricerca"
:prop_pagination="{
sortBy: 'transactionDate',
descending: true,
page: 1,
rowsNumber: 20,
rowsPerPage: 20,
}"
:showType="costanti.SHOW_MOVEMENTS"
:showCol="false"
:showHeaderCol="false"
:extraparams="getExtraparams_movs_grp(circuit)"
extrafield=""
:visufind="costanti.FRIENDS"
>
</CGridTableRec>
</div>
</q-tab-panel>
</q-tab-panels>