ver "0.5.9"
Saldo ora comprende anche le transazioni Pendenti (e le visualizza)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.5.8"
|
||||
APP_VERSION="0.5.9"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.5.8"
|
||||
APP_VERSION="0.5.9"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.5.8"
|
||||
APP_VERSION="0.5.9"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.5.8"
|
||||
APP_VERSION="0.5.9"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="12"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.5.8"
|
||||
APP_VERSION="0.5.9"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.5.8"
|
||||
APP_VERSION="0.5.9"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.5.8"
|
||||
APP_VERSION="0.5.9"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="14"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.5.8"
|
||||
APP_VERSION="0.5.9"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="14"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -45,6 +45,11 @@ export default defineComponent({
|
||||
type: Number,
|
||||
required: true,
|
||||
},
|
||||
valueextra: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
components: {},
|
||||
setup(props, { emit }) {
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<q-icon v-else name="fas fa-coins" size="sm"/>
|
||||
</template>
|
||||
<template v-slot:control>
|
||||
<div class="align_elem_right">{{ tools.roundDec2(value) }}
|
||||
<div class="align_elem_right">{{valueextra}}{{ tools.roundDec2(value) }}
|
||||
<q-tooltip :offset="[10, 10]" v-model="showingtooltip">{{tips}}</q-tooltip>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<q-item-label v-if="circuit.longdescr" caption lines="3"><em>{{ circuit.longdescr }}</em></q-item-label>
|
||||
<q-item-label lines="1">
|
||||
<CSaldo
|
||||
:account="account"
|
||||
:symbol="circuit.symbol"
|
||||
:color="circuit.color"
|
||||
:saldo="saldo"
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
</q-btn>
|
||||
<q-avatar v-else-if="col.tipovisu === costanti.TipoVisu.LINKIMG && myvalue" size="60px">
|
||||
|
||||
<q-img :src="getImgUser(contact)" :alt="myvalue" img-class="imgprofile" height="60px"/>
|
||||
<q-img :src="userStore.getImgUserByRow(row, col)" :alt="myvalue" img-class="imgprofile" height="60px"/>
|
||||
</q-avatar>
|
||||
<q-btn v-else-if="col.tipovisu === costanti.TipoVisu.BUTTON && myvalue" rounded size="sm"
|
||||
color="primary" icon="person" :to="col.link.replace(col.name, myvalue)" :label="myvalue">
|
||||
@@ -111,7 +111,7 @@
|
||||
</q-btn>
|
||||
<q-avatar v-else-if="col.tipovisu === costanti.TipoVisu.LINKIMG && myvalue" size="60px">
|
||||
|
||||
<q-img :src="getImgUser(contact)" :alt="myvalue" img-class="imgprofile" height="60px"/>
|
||||
<q-img :src="userStore.getImgUserByRow(row, col)" :alt="myvalue" img-class="imgprofile" height="60px"/>
|
||||
</q-avatar>
|
||||
<q-btn v-else-if="col.tipovisu === costanti.TipoVisu.BUTTON && myvalue" rounded size="sm"
|
||||
color="primary" icon="person" :to="col.link.replace(col.name, myvalue)" :label="myvalue">
|
||||
|
||||
@@ -5,6 +5,10 @@ import { CCurrencyValue } from '../CCurrencyValue'
|
||||
|
||||
import { date, useQuasar } from 'quasar'
|
||||
import { useI18n } from '@/boot/i18n'
|
||||
import { IAccount, ISpecialField } from 'model'
|
||||
import { CMyFieldDb } from '@/components/CMyFieldDb'
|
||||
import { CMyFieldRec } from '@/components/CMyFieldRec'
|
||||
import { colTableNotifCoins } from '@store/Modules/fieldsTable'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CSaldo',
|
||||
@@ -18,6 +22,11 @@ export default defineComponent({
|
||||
required: true,
|
||||
default: 0,
|
||||
},
|
||||
account: {
|
||||
type: Object as PropType<IAccount>,
|
||||
required: false,
|
||||
default: null,
|
||||
},
|
||||
qtarem: {
|
||||
type: Number,
|
||||
required: false,
|
||||
@@ -29,10 +38,11 @@ export default defineComponent({
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
components: { CCurrencyValue },
|
||||
components: { CCurrencyValue, CMyFieldRec },
|
||||
setup(props, { emit }) {
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
const color_border = ref('red')
|
||||
|
||||
const showingtooltip = ref(false)
|
||||
|
||||
@@ -46,6 +56,9 @@ export default defineComponent({
|
||||
return {
|
||||
showingtooltip,
|
||||
t,
|
||||
colTableNotifCoins,
|
||||
tools,
|
||||
color_border,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -5,9 +5,42 @@
|
||||
:tips="t('account.saldo_tips', {fido: qtarem, symbol})"
|
||||
:color="color"
|
||||
:value="saldo"
|
||||
:valueextra="account && account.notifspending ? `* `: ''"
|
||||
:label="t('account.saldo') + ` (` + t('account.dispon') + `: ` + qtarem + `)`">
|
||||
|
||||
</CCurrencyValue>
|
||||
|
||||
<div v-if="account && account.notifspending" :class="`text-h5 bordo_stondato_stretto 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">
|
||||
<div class="row justify-evenly items-center q-gutter-xs ">
|
||||
<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 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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CSaldo.ts">
|
||||
|
||||
@@ -35,7 +35,7 @@ export default defineComponent({
|
||||
|
||||
const from_username = ref(userStore.my.username)
|
||||
const circuitsel = ref('')
|
||||
const qty = ref('')
|
||||
const qty = ref(<number>1)
|
||||
const causal = ref('')
|
||||
const bothcircuits = ref(<any>[])
|
||||
|
||||
@@ -86,11 +86,12 @@ export default defineComponent({
|
||||
|
||||
const quanti = [...Array(20).keys()].map(i => i + 1)
|
||||
for (const ind of quanti) {
|
||||
let valuenorm = ind * numstep.value
|
||||
let value = ind * numstep.value
|
||||
if (value > remainingCoins.value) {
|
||||
break
|
||||
} else {
|
||||
const label = value.toString()
|
||||
const label = valuenorm.toString()
|
||||
arrayMarkerLabel.value.push({ value, label })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,6 +40,10 @@
|
||||
outlined v-model="qty" type="text"
|
||||
:rules="[ val => val <= circuitStore.getRemainingCoinsToSend(accountloaded) || t('circuit.qta_remaining_to_send', { maxqta: circuitStore.getRemainingCoinsToSend(accountloaded), symbol: circuitloaded.symbol })]"
|
||||
:label="t('movement.amount_to_send', {qtamax: circuitStore.getRemainingCoinsToSend(accountloaded) ? circuitStore.getRemainingCoinsToSend(accountloaded).toFixed(2) : 0 + ` ` + circuitloaded.symbol})"
|
||||
mask="#.##"
|
||||
fill-mask="0"
|
||||
reverse-fill-mask
|
||||
input-class="text-right"
|
||||
>
|
||||
<!--val => val > circuitStore.getMaxCoinsToSend(accountloaded) || t('circuit.qta_max_to_send', { maxqta: tools.getRemainingCoinsToSend(accountloaded), symbol: circuitloaded.symbol })]" -->
|
||||
<template v-slot:append>
|
||||
@@ -56,6 +60,7 @@
|
||||
v-model="qty"
|
||||
color="green"
|
||||
markers
|
||||
readonly
|
||||
track-size="10px"
|
||||
:step="numstep"
|
||||
:marker-labels="arrayMarkerLabel"
|
||||
@@ -65,7 +70,7 @@
|
||||
switch-marker-labels-side
|
||||
:inner-max="remainingCoins"
|
||||
:min="0"
|
||||
:max="Number(maxsendable ? maxsendable.toFixed(2) : 0)"
|
||||
:max="Number(maxsendable ? maxsendable: 0)"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -865,11 +865,11 @@ const baseroutes: IListRoutes[] = [
|
||||
order: 80,
|
||||
path: '/calendario-eventi',
|
||||
materialIcon: 'event',
|
||||
name: 'pages.calendarioeventi',
|
||||
name: 'ris.calendario_eventi_riso',
|
||||
component: () => import('@/root/calendarioeventi/calendarioeventi.vue'),
|
||||
extraclass: 'isCalendar',
|
||||
inmenu: false,
|
||||
infooter: false
|
||||
inmenu: true,
|
||||
infooter: true
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
|
||||
@@ -16,10 +16,12 @@
|
||||
|
||||
</CEventsCalendar>
|
||||
<br>
|
||||
<div v-if="false">
|
||||
<p class="cltexth3 text-blue q-ma-md" v-for="(mycal, index) in getarrValDb('EVENTS_CAL')" :key="index">
|
||||
<a :href="`../../statics/files/eventi/` + mycal.file" target="_blank">Calendario Eventi {{ mycal.label }}
|
||||
(PDF)</a><br>
|
||||
</p>
|
||||
</div>
|
||||
<br>
|
||||
</CMyPage>
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ import { CStatusReg } from '@/components/CStatusReg'
|
||||
import { CCopyBtn } from '@/components/CCopyBtn'
|
||||
import { CCheckIfIsLogged } from '@/components/CCheckIfIsLogged'
|
||||
import { CMapsEsempio } from '@src/components/CMapsEsempio'
|
||||
import { CEventsCalendar } from '@src/components/CEventsCalendar'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { static_data } from '@/db/static_data'
|
||||
@@ -27,7 +28,7 @@ import MixinMetaTags from '@/mixins/mixin-metatags'
|
||||
export default defineComponent({
|
||||
name: 'mainview',
|
||||
components: { CSkill, CChartMap, CMapsEsempio, CDashboard, CUserNonVerif, CMainView, CCopyBtn,
|
||||
CNotifAtTop, LandingFooter, CCheckIfIsLogged, CStatusReg, CPresentazione },
|
||||
CNotifAtTop, LandingFooter, CCheckIfIsLogged, CStatusReg, CEventsCalendar, CPresentazione },
|
||||
setup() {
|
||||
const globalStore = useGlobalStore()
|
||||
const userStore = useUserStore()
|
||||
@@ -47,6 +48,7 @@ export default defineComponent({
|
||||
shared_consts,
|
||||
globalStore,
|
||||
setmeta,
|
||||
getValDb,
|
||||
notifStore,
|
||||
}
|
||||
},
|
||||
|
||||
@@ -69,6 +69,10 @@
|
||||
</q-btn>
|
||||
</div>
|
||||
|
||||
<CEventsCalendar :mysingleevent="null" :showfirstN="getValDb('SHOW_LAST_EVENTS', false, 3)">
|
||||
|
||||
</CEventsCalendar>
|
||||
|
||||
<!--<CCopyBtn v-if="userStore.my.username" :title="$t('reg.link_reg')" :texttocopy="getRefLink(userStore.my.username)">
|
||||
|
||||
</CCopyBtn>-->
|
||||
|
||||
@@ -879,6 +879,7 @@ const msg_it = {
|
||||
},
|
||||
ris: {
|
||||
menu: 'Ris',
|
||||
calendario_eventi_riso: 'Calendario Eventi RISO'
|
||||
},
|
||||
newsletter: {
|
||||
title: 'Desideri ricevere la nostra Newsletter?',
|
||||
@@ -1188,6 +1189,11 @@ const msg_it = {
|
||||
user: 'Utente',
|
||||
},
|
||||
|
||||
sendnotifs: {
|
||||
datenotif: 'Data Invio',
|
||||
username: 'Mittente',
|
||||
},
|
||||
|
||||
movement: {
|
||||
transactionDate: 'Data Transazione',
|
||||
accountFromId: 'Dal Conto',
|
||||
@@ -1204,6 +1210,7 @@ const msg_it = {
|
||||
movout: 'Monete Inviate',
|
||||
from: 'Inviate da:',
|
||||
to: 'A favore di:',
|
||||
pendingtransaction: '* Transazioni Pendenti',
|
||||
},
|
||||
editor: {
|
||||
showtool: 'Mostra strumenti per formattare il testo',
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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,13 +6356,13 @@ export const tools = {
|
||||
try {
|
||||
if (circuit.symbol) {
|
||||
return circuit.symbol
|
||||
} else {
|
||||
if (circuit.circuitfrom.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 {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
return ''
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
},
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
|
||||
<CSaldo
|
||||
:symbol="circuit.symbol"
|
||||
:account="account"
|
||||
:color="circuit.color"
|
||||
:saldo="saldo"
|
||||
:qtarem="account ? qtarem : 0">
|
||||
|
||||
Reference in New Issue
Block a user