ver "0.5.9"

Saldo ora comprende anche le transazioni Pendenti (e le visualizza)
This commit is contained in:
Paolo Arena
2022-09-18 01:20:48 +02:00
parent f625278801
commit da17c2b060
26 changed files with 148 additions and 32 deletions

View File

@@ -2575,6 +2575,25 @@ export const colmyUserCircuit = [
AddCol(DuplicateRec),
]
export const colTableNotifCoins = [
AddCol({ name: 'datenotif', label_trans: 'sendnotifs.datenotif', fieldtype: costanti.FieldType.date }),
AddCol({
name: 'extrarec.dest',
field: 'extrarec',
subfield: 'dest',
label_trans: 'reg.username',
foredit: false,
tipovisu: costanti.TipoVisu.LINK,
fieldtype: costanti.FieldType.username_chip,
link: '/my/extrarec.dest',
noshowlabel: true,
extrafield: 'movement.to',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView,
}),
AddCol({ name: 'extrarec.qty', field: 'extrarec', subfield: 'qty', label_trans: 'movement.amount', fieldtype: costanti.FieldType.currency }),
]
export const colTableMovement = [
AddCol({ name: 'transactionDate', label_trans: 'movement.transactionDate', fieldtype: costanti.FieldType.date }),
AddCol({ name: 'accountFromId', label_trans: 'movement.accountFromId', fieldtype: costanti.FieldType.string, required: true }),
@@ -3179,6 +3198,13 @@ export const fieldsTable = {
colkey: '_id',
collabel: 'transactionDate',
},
{
value: 'sendnotifs',
label: 'Transazioni Pendenti',
columns: colTableNotifCoins,
colkey: '_id',
collabel: 'datenotif',
},
{
value: 'shippings',
label: 'Spedizione',

View File

@@ -4746,9 +4746,9 @@ export const tools = {
// console.log('OUT', res)
if (res && res.user) {
if (res && res.userprofile) {
console.log('updateMyData')
userStore.my = res.user
userStore.my.profile = res.userprofile
if (res.listcircuits) {
circuitStore.listcircuits = res.listcircuits
@@ -6356,12 +6356,12 @@ export const tools = {
try {
if (circuit.symbol) {
return circuit.symbol
} else if (circuit.hasOwnProperty('circuitfrom') && circuit.circuitfrom.symbol) {
return circuit.circuitfrom.symbol
} else if (circuit.hasOwnProperty('extrarec') && circuit.extrarec.hasOwnProperty('symbol')) {
return circuit.extrarec.symbol
} else {
if (circuit.circuitfrom.symbol) {
return circuit.circuitfrom.symbol
} else {
return ''
}
return ''
}
} catch (e) {
return ''

View File

@@ -32,7 +32,7 @@ export const useNotifStore = defineStore('NotifStore', {
},
getnotifs_coinsreq: (mystate: INotifState) => (): INotif[] => {
const ctrec = (mystate.last_notifs) ? mystate.last_notifs.slice(0, 20).filter((rec) => !rec.read && rec.typedir === shared_consts.TypeNotifs.TYPEDIR_CIRCUITS && rec.typeid === shared_consts.TypeNotifs.ID_CIRCUIT_SENDCOINSREQ) : []
const ctrec = (mystate.last_notifs) ? mystate.last_notifs.slice(0, 20).filter((rec) => rec.typedir === shared_consts.TypeNotifs.TYPEDIR_CIRCUITS && rec.typeid === shared_consts.TypeNotifs.ID_CIRCUIT_SENDCOINSREQ && rec.status === 0) : []
return (ctrec)
},

View File

@@ -4,7 +4,7 @@ import {
ICircuit, IMyCircuit,
IFriends, IMsgGlobParam,
ISigninOptions,
ISignupOptions, IUserFields, IUserNotifType, IUserProfile, IUserState, IAccount,
ISignupOptions, IUserFields, IUserNotifType, IUserProfile, IUserState, IAccount, IColGridTable,
} from '@src/model'
import { tools } from '@store/Modules/tools'
import translate from '@src/globalroutines/util'
@@ -277,6 +277,22 @@ export const useUserStore = defineStore('UserStore', {
return img ? img : 'images/noimg-user.svg'
},
getImgUserByRow(row: any, col: IColGridTable): string {
let value = ''
if (row.hasOwnProperty(col.name)) {
value = row[col.name]
}
let img = this.getImgByUsername(value)
if (row) {
const mycol = col.name + '.img'
if (row.hasOwnProperty(mycol)) {
img = row[mycol]
}
}
return img ? img : 'images/noimg-user.svg'
},
getImgByProfile(userparam: IUserFields, reale: any = false): string {
try {
if (userparam.profile && userparam.profile.img) {