ver 0.5.71:
- Info Conto - Admin: poter modificare Fido e QtaMax.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="0.5.67"
|
APP_VERSION="0.5.71"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="13"
|
APP_ID="13"
|
||||||
DIRECTORY_LOCAL="newfreeplanet"
|
DIRECTORY_LOCAL="newfreeplanet"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="0.5.67"
|
APP_VERSION="0.5.71"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="13"
|
APP_ID="13"
|
||||||
DIRECTORY_LOCAL=newfreeplanet
|
DIRECTORY_LOCAL=newfreeplanet
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="0.5.67"
|
APP_VERSION="0.5.71"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="13"
|
APP_ID="13"
|
||||||
DIRECTORY_LOCAL=newfreeplanet
|
DIRECTORY_LOCAL=newfreeplanet
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="0.5.67"
|
APP_VERSION="0.5.71"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="13"
|
APP_ID="13"
|
||||||
DIRECTORY_LOCAL="newfreeplanet"
|
DIRECTORY_LOCAL="newfreeplanet"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="0.5.67"
|
APP_VERSION="0.5.71"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="13"
|
APP_ID="13"
|
||||||
DIRECTORY_LOCAL=newfreeplanet
|
DIRECTORY_LOCAL=newfreeplanet
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="0.5.67"
|
APP_VERSION="0.5.71"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="14"
|
APP_ID="14"
|
||||||
DIRECTORY_LOCAL="newfreeplanet"
|
DIRECTORY_LOCAL="newfreeplanet"
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
text-color="white"
|
text-color="white"
|
||||||
></q-btn>
|
></q-btn>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<div v-if="$q.platform.is.ios && $q.platform.is.safari">
|
<div v-if="$q.platform.is.ios && $q.platform.is.safari && !tools.isDevelop()">
|
||||||
<q-btn
|
<q-btn
|
||||||
glossy
|
glossy
|
||||||
size="xl"
|
size="xl"
|
||||||
@@ -56,6 +56,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div v-if="$q.platform.is.android">
|
<div v-if="$q.platform.is.android">
|
||||||
<q-btn
|
<q-btn
|
||||||
|
v-if="!tools.isDevelop()"
|
||||||
glossy
|
glossy
|
||||||
size="lg"
|
size="lg"
|
||||||
label="Installa App"
|
label="Installa App"
|
||||||
|
|||||||
0
src/components/CCurrencyV2/CCurrencyV2.scss
Executable file
0
src/components/CCurrencyV2/CCurrencyV2.scss
Executable file
122
src/components/CCurrencyV2/CCurrencyV2.ts
Executable file
122
src/components/CCurrencyV2/CCurrencyV2.ts
Executable file
@@ -0,0 +1,122 @@
|
|||||||
|
import { defineComponent, onMounted, PropType, ref, watch } from 'vue'
|
||||||
|
import { tools } from '@src/store/Modules/tools'
|
||||||
|
|
||||||
|
import { date, useQuasar } from 'quasar'
|
||||||
|
import { useI18n } from '@/boot/i18n'
|
||||||
|
import { CCurrencyValue } from '@/components/CCurrencyValue'
|
||||||
|
import { CMyFieldDb } from '@/components/CMyFieldDb'
|
||||||
|
|
||||||
|
|
||||||
|
import { costanti } from '@costanti'
|
||||||
|
|
||||||
|
export default defineComponent({
|
||||||
|
name: 'CCurrencyV2',
|
||||||
|
components: { CCurrencyValue, CMyFieldDb },
|
||||||
|
emits: ['save'],
|
||||||
|
props: {
|
||||||
|
small: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
label: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
tips: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
readonly: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
symbol: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
color: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
color_border: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
icon: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
modelValue: {
|
||||||
|
type: [String, Number],
|
||||||
|
required: true,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
valueextra: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
paramTypeAccount: {
|
||||||
|
type: Number,
|
||||||
|
required: false,
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
|
myrecparam: {
|
||||||
|
type: Object,
|
||||||
|
required: false,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
|
admin: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
setup(props, { emit }) {
|
||||||
|
const $q = useQuasar()
|
||||||
|
const { t } = useI18n()
|
||||||
|
|
||||||
|
const changeParamValue = ref(false)
|
||||||
|
|
||||||
|
const showingtooltip = ref(false)
|
||||||
|
|
||||||
|
const myvalue = ref(<any>null)
|
||||||
|
|
||||||
|
function created() {
|
||||||
|
// created
|
||||||
|
myvalue.value = props.modelValue
|
||||||
|
}
|
||||||
|
|
||||||
|
function changedParamValue(value: boolean) {
|
||||||
|
changeParamValue.value = value
|
||||||
|
}
|
||||||
|
|
||||||
|
function save(value: any) {
|
||||||
|
|
||||||
|
// ricarico
|
||||||
|
emit('save', value)
|
||||||
|
|
||||||
|
myvalue.value = value
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(created)
|
||||||
|
|
||||||
|
return {
|
||||||
|
showingtooltip,
|
||||||
|
t,
|
||||||
|
tools,
|
||||||
|
changeParamValue,
|
||||||
|
changedParamValue,
|
||||||
|
costanti,
|
||||||
|
save,
|
||||||
|
myvalue,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
47
src/components/CCurrencyV2/CCurrencyV2.vue
Executable file
47
src/components/CCurrencyV2/CCurrencyV2.vue
Executable file
@@ -0,0 +1,47 @@
|
|||||||
|
<template>
|
||||||
|
<div v-if="myrecparam">
|
||||||
|
<CCurrencyValue
|
||||||
|
:symbol="symbol"
|
||||||
|
:color="color"
|
||||||
|
:color_border="color_border"
|
||||||
|
v-model="myvalue"
|
||||||
|
:icon="icon"
|
||||||
|
:label="label"
|
||||||
|
:tips="tips"
|
||||||
|
:paramTypeAccount="paramTypeAccount"
|
||||||
|
:myrecparam="myrecparam"
|
||||||
|
@changedParamValue="changedParamValue"
|
||||||
|
:admin="admin"
|
||||||
|
>
|
||||||
|
</CCurrencyValue>
|
||||||
|
</div>
|
||||||
|
<q-dialog v-model="changeParamValue">
|
||||||
|
<q-card class="dialog_card">
|
||||||
|
<q-toolbar class="bg-primary text-white">
|
||||||
|
<q-toolbar-title class="text-h7">
|
||||||
|
{{ $t('account.settings') }}
|
||||||
|
</q-toolbar-title>
|
||||||
|
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
|
||||||
|
</q-toolbar>
|
||||||
|
<q-card-section class="inset-shadow">
|
||||||
|
<CMyFieldDb
|
||||||
|
v-if="myrecparam"
|
||||||
|
table="accounts"
|
||||||
|
:title="tools.getStrByParamTypeAccount(paramTypeAccount)"
|
||||||
|
:id="myrecparam._id"
|
||||||
|
:rec="myrecparam"
|
||||||
|
:mykey="tools.getFieldByParamTypeAccount(paramTypeAccount)"
|
||||||
|
:type="tools.getTypeByParamTypeAccount(paramTypeAccount)"
|
||||||
|
@save="save"
|
||||||
|
/>
|
||||||
|
</q-card-section>
|
||||||
|
</q-card>
|
||||||
|
</q-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" src="./CCurrencyV2.ts">
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import './CCurrencyV2.scss';
|
||||||
|
</style>
|
||||||
1
src/components/CCurrencyV2/index.ts
Executable file
1
src/components/CCurrencyV2/index.ts
Executable file
@@ -0,0 +1 @@
|
|||||||
|
export {default as CCurrencyV2} from './CCurrencyV2.vue'
|
||||||
@@ -4,9 +4,18 @@ import { tools } from '@src/store/Modules/tools'
|
|||||||
import { date, useQuasar } from 'quasar'
|
import { date, useQuasar } from 'quasar'
|
||||||
import { useI18n } from '@/boot/i18n'
|
import { useI18n } from '@/boot/i18n'
|
||||||
|
|
||||||
|
import { costanti } from '@costanti'
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'CCurrencyValue',
|
name: 'CCurrencyValue',
|
||||||
|
components: { },
|
||||||
|
emits: ['changedParamValue' ],
|
||||||
props: {
|
props: {
|
||||||
|
modelValue: {
|
||||||
|
type: [String, Number],
|
||||||
|
required: false,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
small: {
|
small: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
@@ -45,17 +54,27 @@ export default defineComponent({
|
|||||||
required: false,
|
required: false,
|
||||||
default: '',
|
default: '',
|
||||||
},
|
},
|
||||||
value: {
|
|
||||||
type: Number,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
valueextra: {
|
valueextra: {
|
||||||
type: String,
|
type: String,
|
||||||
required: false,
|
required: false,
|
||||||
default: '',
|
default: '',
|
||||||
},
|
},
|
||||||
|
paramTypeAccount: {
|
||||||
|
type: Number,
|
||||||
|
required: false,
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
|
myrecparam: {
|
||||||
|
type: Object,
|
||||||
|
required: false,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
|
admin: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
components: {},
|
|
||||||
setup(props, { emit }) {
|
setup(props, { emit }) {
|
||||||
const $q = useQuasar()
|
const $q = useQuasar()
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
@@ -66,13 +85,13 @@ export default defineComponent({
|
|||||||
// created
|
// created
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
onMounted(created)
|
onMounted(created)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
showingtooltip,
|
showingtooltip,
|
||||||
t,
|
t,
|
||||||
tools,
|
tools,
|
||||||
|
costanti,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -4,11 +4,11 @@
|
|||||||
dense
|
dense
|
||||||
class="cltexth4 chipbooked shadow-5 q-pa-sm2"
|
class="cltexth4 chipbooked shadow-5 q-pa-sm2"
|
||||||
size="md"
|
size="md"
|
||||||
:color="value > 0 ? `green` : value === 0 ? `gray` : `red`"
|
:color="modelValue > 0 ? `green` : modelValue === 0 ? `gray` : `red`"
|
||||||
text-color="white"
|
text-color="white"
|
||||||
icon="fas fa-coins"
|
icon="fas fa-coins"
|
||||||
>
|
>
|
||||||
{{ tools.roundDec2(value) }}
|
{{ tools.roundDec2(modelValue) }}
|
||||||
<span class="text-currency"
|
<span class="text-currency"
|
||||||
> <em
|
> <em
|
||||||
class="q-pa-xxs text-white rounded-borders shadow-2"
|
class="q-pa-xxs text-white rounded-borders shadow-2"
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<div
|
<div
|
||||||
v-if="value !== null"
|
v-if="modelValue !== null"
|
||||||
:class="
|
:class="
|
||||||
`text-h5 ` +
|
`text-h5 ` +
|
||||||
(small ? `bordo_stondato_small` : `bordo_stondato_stretto`) +
|
(small ? `bordo_stondato_small` : `bordo_stondato_stretto`) +
|
||||||
@@ -35,7 +35,12 @@
|
|||||||
(color_border ? `border-color: ` + color_border + `!important;` : '')
|
(color_border ? `border-color: ` + color_border + `!important;` : '')
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<div :class="`text-center text-h7-dense text-italic ` + ($q.dark.isActive ? `text-grey-6`: `text-grey-14`)">
|
<div
|
||||||
|
:class="
|
||||||
|
`text-center text-h7-dense text-italic ` +
|
||||||
|
($q.dark.isActive ? `text-grey-6` : `text-grey-14`)
|
||||||
|
"
|
||||||
|
>
|
||||||
<span v-if="small">
|
<span v-if="small">
|
||||||
<em
|
<em
|
||||||
class="q-px-xs text-white rounded-borders"
|
class="q-px-xs text-white rounded-borders"
|
||||||
@@ -53,7 +58,7 @@
|
|||||||
type="number"
|
type="number"
|
||||||
rounded
|
rounded
|
||||||
:class="!small ? `q-px-sm text-h5` : `q-px-xs text-h7`"
|
:class="!small ? `q-px-sm text-h5` : `q-px-xs text-h7`"
|
||||||
:color="value > 0 ? `green` : `red`"
|
:color="modelValue > 0 ? `green` : `red`"
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<!--<img src="https://cdn.quasar.dev/logo-v2/svg/logo.svg">-->
|
<!--<img src="https://cdn.quasar.dev/logo-v2/svg/logo.svg">-->
|
||||||
@@ -71,7 +76,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-slot:control>
|
<template v-slot:control>
|
||||||
<div :class="`align_elem_right ` + (small ? `text-h7` : ``)">
|
<div :class="`align_elem_right ` + (small ? `text-h7` : ``)">
|
||||||
{{ valueextra }}{{ tools.roundDec2(value) }}
|
{{ valueextra }}{{ tools.roundDec2(modelValue) }}
|
||||||
<q-tooltip :offset="[10, 10]" v-model="showingtooltip">{{
|
<q-tooltip :offset="[10, 10]" v-model="showingtooltip">{{
|
||||||
tips
|
tips
|
||||||
}}</q-tooltip>
|
}}</q-tooltip>
|
||||||
@@ -85,6 +90,15 @@
|
|||||||
>{{ symbol }}</em
|
>{{ symbol }}</em
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="paramTypeAccount && admin">
|
||||||
|
<q-btn
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
icon="fas fa-pencil-alt"
|
||||||
|
size="sm"
|
||||||
|
@click="$emit('changedParamValue', true)"
|
||||||
|
></q-btn>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</q-field>
|
</q-field>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.progress-base {
|
.progress-base {
|
||||||
height: 3px;
|
height: 5px;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
background-color: #e9ecef;
|
background-color: #e9ecef;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,34 +42,32 @@
|
|||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-item-label
|
<q-item-label
|
||||||
:class="
|
:class="
|
||||||
(!$q.dark.isActive ? 'text-grey-5' : 'text-white') +
|
(!$q.dark.isActive ? 'text-grey-9' : 'text-white') +
|
||||||
` title_view_shadow`
|
` title_view_shadow`
|
||||||
"
|
"
|
||||||
style="letter-spacing: 1px"
|
style="letter-spacing: 1px"
|
||||||
>
|
>
|
||||||
{{ rec.title }}
|
{{ rec.title }}
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
<q-item-label
|
<q-item-label lines="3" no-wrap
|
||||||
v-if="rec.subtitle"
|
v-if="rec.subtitle"
|
||||||
:class="
|
:class="
|
||||||
(!$q.dark.isActive ? 'text-grey-5' : 'text-white') +
|
(!$q.dark.isActive ? 'text-grey-8' : 'text-white') +
|
||||||
` title_view_subtitle_shadow`
|
` title_view_subtitle`
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
|
||||||
<span v-html="rec.subtitle"></span>
|
<span v-html="rec.subtitle"></span>
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
<q-item-label class="text-h9" style="letter-spacing: 2px">
|
|
||||||
<!--{{ calcstat.numByTab[rec.table] }}-->
|
|
||||||
</q-item-label>
|
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
|
|
||||||
<q-item-section side>
|
<q-item-section side class="small_side" style="right: 4px; position: absolute; ">
|
||||||
<q-img v-if="rec.image" :src="rec.image" style="width: 35px;"></q-img>
|
<q-img v-if="rec.image" :src="rec.image" style="width: 27px;"></q-img>
|
||||||
<q-icon
|
<q-icon
|
||||||
v-else
|
v-else
|
||||||
:name="rec.icon"
|
:name="rec.icon"
|
||||||
:class="`text-` + rec.color"
|
:class="`text-` + rec.color"
|
||||||
size="35px"
|
size="27px"
|
||||||
></q-icon>
|
></q-icon>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
@@ -104,9 +102,9 @@
|
|||||||
<q-card class="no-shadow q-pa-xxs">
|
<q-card class="no-shadow q-pa-xxs">
|
||||||
<q-item class="q-pb-none q-pt-xs cursor-pointer" :to="rec.to">
|
<q-item class="q-pb-none q-pt-xs cursor-pointer" :to="rec.to">
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-item-label
|
<q-item-label lines="3"
|
||||||
:class="
|
:class="
|
||||||
(!$q.dark.isActive ? 'text-grey-7' : 'text-white') +
|
(!$q.dark.isActive ? 'text-grey-9' : 'text-white') +
|
||||||
` title_view_small_shadow`
|
` title_view_small_shadow`
|
||||||
"
|
"
|
||||||
style="letter-spacing: 0.5px"
|
style="letter-spacing: 0.5px"
|
||||||
@@ -116,8 +114,8 @@
|
|||||||
<q-item-label
|
<q-item-label
|
||||||
v-if="rec.subtitle"
|
v-if="rec.subtitle"
|
||||||
:class="
|
:class="
|
||||||
(!$q.dark.isActive ? 'text-grey-7' : 'text-white') +
|
(!$q.dark.isActive ? 'text-grey-8' : 'text-white') +
|
||||||
` title_view_subtitle_shadow`
|
` title_view_subtitle`
|
||||||
"
|
"
|
||||||
style="letter-spacing: 0.2px"
|
style="letter-spacing: 0.2px"
|
||||||
>
|
>
|
||||||
@@ -131,7 +129,7 @@
|
|||||||
v-else
|
v-else
|
||||||
:name="rec.icon"
|
:name="rec.icon"
|
||||||
:class="`text-` + rec.color"
|
:class="`text-` + rec.color"
|
||||||
size="25px"
|
size="20px"
|
||||||
></q-icon>
|
></q-icon>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
|
|||||||
25
src/components/CInfoAccount/CInfoAccount.scss
Executable file
25
src/components/CInfoAccount/CInfoAccount.scss
Executable file
@@ -0,0 +1,25 @@
|
|||||||
|
.myflex{
|
||||||
|
display: flex;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container{
|
||||||
|
vertical-align: center;
|
||||||
|
padding: 5px;
|
||||||
|
font-size: 1.15rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.element{
|
||||||
|
font-weight: bold;
|
||||||
|
vertical-align: center;
|
||||||
|
padding: 5px;
|
||||||
|
font-size: 1.15rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.title_param{
|
||||||
|
font-size: 1.25rem;
|
||||||
|
}
|
||||||
|
.iconcirc {
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
117
src/components/CInfoAccount/CInfoAccount.ts
Executable file
117
src/components/CInfoAccount/CInfoAccount.ts
Executable file
@@ -0,0 +1,117 @@
|
|||||||
|
import { defineComponent, onMounted, PropType, ref, watch } from 'vue'
|
||||||
|
import { useUserStore } from '@store/UserStore'
|
||||||
|
import { IMyGroup, IImgGallery, IUserFields, IUserProfile, IFriends, ICircuit, IAccount } from 'model'
|
||||||
|
import { costanti } from '@costanti'
|
||||||
|
import { shared_consts } from '@/common/shared_vuejs'
|
||||||
|
import { tools } from '@store/Modules/tools'
|
||||||
|
import { useQuasar } from 'quasar'
|
||||||
|
import { useI18n } from '@/boot/i18n'
|
||||||
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
|
import { CUserNonVerif } from '@/components/CUserNonVerif'
|
||||||
|
import { toolsext } from '@store/Modules/toolsext'
|
||||||
|
import { CSaldo } from '@/components/CSaldo'
|
||||||
|
import { CSendCoins } from '@/components/CSendCoins'
|
||||||
|
import { CCurrencyValue } from '@/components/CCurrencyValue'
|
||||||
|
import { CCurrencyV2 } from '@/components/CCurrencyV2'
|
||||||
|
import { useCircuitStore } from '@store/CircuitStore'
|
||||||
|
|
||||||
|
export default defineComponent({
|
||||||
|
name: 'CInfoAccount',
|
||||||
|
emits: ['setCmd'],
|
||||||
|
components: {CUserNonVerif, CSaldo, CSendCoins, CCurrencyValue, CCurrencyV2 },
|
||||||
|
props: {
|
||||||
|
grp: {
|
||||||
|
type: Object as PropType<IMyGroup>,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
circuitname: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
admin: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
account: {
|
||||||
|
type: Object as PropType<IAccount>,
|
||||||
|
required: false,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
setup(props, { emit }) {
|
||||||
|
|
||||||
|
const userStore = useUserStore()
|
||||||
|
const $q = useQuasar()
|
||||||
|
const { t } = useI18n()
|
||||||
|
const $router = useRouter()
|
||||||
|
|
||||||
|
const myaccount = ref(<IAccount|undefined>undefined)
|
||||||
|
|
||||||
|
const circuitStore = useCircuitStore()
|
||||||
|
|
||||||
|
const table = ref(toolsext.TABMYGROUPS)
|
||||||
|
|
||||||
|
const circuit = ref(<ICircuit | null | undefined>null)
|
||||||
|
|
||||||
|
watch(() => props.grp, (newval, oldval) => {
|
||||||
|
mounted()
|
||||||
|
})
|
||||||
|
|
||||||
|
function mounted() {
|
||||||
|
circuit.value = circuitStore.getCircuitByName(props.circuitname)
|
||||||
|
|
||||||
|
if (props.account) {
|
||||||
|
myaccount.value = props.account
|
||||||
|
} else {
|
||||||
|
myaccount.value = props.grp.account
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getImgGroup(group: IMyGroup) {
|
||||||
|
return userStore.getImgByGroup(group)
|
||||||
|
}
|
||||||
|
|
||||||
|
function naviga(path: string) {
|
||||||
|
$router.push(path)
|
||||||
|
}
|
||||||
|
|
||||||
|
function setCmd(cmd: number, myusername: string, value: any = '') {
|
||||||
|
emit('setCmd', cmd, myusername, value)
|
||||||
|
}
|
||||||
|
|
||||||
|
function myusername() {
|
||||||
|
return userStore.my.username
|
||||||
|
}
|
||||||
|
|
||||||
|
async function save(value: any) {
|
||||||
|
console.log('save and mounted')
|
||||||
|
await tools.loadCircuits()
|
||||||
|
// ricarico
|
||||||
|
mounted()
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(mounted)
|
||||||
|
|
||||||
|
return {
|
||||||
|
costanti,
|
||||||
|
getImgGroup,
|
||||||
|
naviga,
|
||||||
|
setCmd,
|
||||||
|
shared_consts,
|
||||||
|
userStore,
|
||||||
|
tools,
|
||||||
|
table,
|
||||||
|
myusername,
|
||||||
|
circuit,
|
||||||
|
circuitStore,
|
||||||
|
t,
|
||||||
|
myaccount,
|
||||||
|
save,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
99
src/components/CInfoAccount/CInfoAccount.vue
Executable file
99
src/components/CInfoAccount/CInfoAccount.vue
Executable file
@@ -0,0 +1,99 @@
|
|||||||
|
<template>
|
||||||
|
<div v-if="myaccount && circuit">
|
||||||
|
<q-card-section>
|
||||||
|
<div class="text-h6">{{ t('groups.infoaccount') }}</div>
|
||||||
|
</q-card-section>
|
||||||
|
|
||||||
|
<q-separator />
|
||||||
|
|
||||||
|
<CSaldo
|
||||||
|
v-if="tools.isUserOk() && myaccount"
|
||||||
|
:account="myaccount"
|
||||||
|
:symbol="circuit.symbol"
|
||||||
|
:color="circuit.color"
|
||||||
|
:saldo="myaccount.saldo"
|
||||||
|
:qtarem="myaccount ? circuitStore.getRemainingCoinsToSend(myaccount) : 0"
|
||||||
|
>
|
||||||
|
</CSaldo>
|
||||||
|
|
||||||
|
<q-card-section>
|
||||||
|
<div v-if="myaccount.date_created" class="container">
|
||||||
|
<q-icon name="fas fa-lightbulb" class="iconcirc"></q-icon>
|
||||||
|
{{
|
||||||
|
$t('shared.createddate', {
|
||||||
|
date: tools.getstrDateYY(myaccount.date_created),
|
||||||
|
})
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
v-if="
|
||||||
|
!!myaccount.date_updated &&
|
||||||
|
tools.getstrDate(myaccount.date_updated) !==
|
||||||
|
tools.getstrDate(myaccount.date_created)
|
||||||
|
"
|
||||||
|
class="container"
|
||||||
|
>
|
||||||
|
<q-icon name="fas fa-pencil-alt" class="iconcirc"></q-icon>
|
||||||
|
<span class="element">{{
|
||||||
|
$t('shared.lastmodify', {
|
||||||
|
date: tools.getstrDateYY(myaccount.date_updated),
|
||||||
|
})
|
||||||
|
}}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div :class="$q.screen.lt.sm ? '' : 'row'">
|
||||||
|
<div class="sezioni">
|
||||||
|
<CCurrencyV2
|
||||||
|
:symbol="tools.getSymbolByCircuit(circuit)"
|
||||||
|
:color="tools.getColorByCircuit(circuit)"
|
||||||
|
color_border="red"
|
||||||
|
v-model="myaccount.fidoConcesso"
|
||||||
|
icon="fas fa-battery-quarter"
|
||||||
|
:label="t('circuit.fido_scoperto_default')"
|
||||||
|
:tips="t('circuit.fido_scoperto_default_tips')"
|
||||||
|
:paramTypeAccount="costanti.ParamTypeAccount.FIDO_CONCESSO"
|
||||||
|
:myrecparam="myaccount"
|
||||||
|
:admin="admin"
|
||||||
|
@save="save"
|
||||||
|
>
|
||||||
|
</CCurrencyV2>
|
||||||
|
</div>
|
||||||
|
<div class="sezioni">
|
||||||
|
<CCurrencyV2
|
||||||
|
:symbol="tools.getSymbolByCircuit(circuit)"
|
||||||
|
:color="tools.getColorByCircuit(circuit)"
|
||||||
|
color_border="green"
|
||||||
|
v-model="myaccount.qta_maxConcessa"
|
||||||
|
icon="fas fa-battery-quarter"
|
||||||
|
:label="t('circuit.qta_max_default')"
|
||||||
|
:tips="t('circuit.qta_max_default_tips')"
|
||||||
|
:paramTypeAccount="costanti.ParamTypeAccount.QTA_MAXCONCESSA"
|
||||||
|
:myrecparam="myaccount"
|
||||||
|
:admin="admin"
|
||||||
|
@save="save"
|
||||||
|
>
|
||||||
|
</CCurrencyV2>
|
||||||
|
</div>
|
||||||
|
<div v-if="myaccount.totTransato" class="sezioni">
|
||||||
|
<CCurrencyValue
|
||||||
|
:symbol="tools.getSymbolByCircuit(circuit)"
|
||||||
|
:color="tools.getColorByCircuit(circuit)"
|
||||||
|
color_border="blue"
|
||||||
|
v-model="myaccount.totTransato"
|
||||||
|
icon="fas fa-battery-quarter"
|
||||||
|
:label="t('circuit.totTransato')"
|
||||||
|
:tips="t('circuit.totTransato_tips')"
|
||||||
|
>
|
||||||
|
</CCurrencyValue>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</q-card-section>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" src="./CInfoAccount.ts">
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import './CInfoAccount.scss';
|
||||||
|
</style>
|
||||||
1
src/components/CInfoAccount/index.ts
Executable file
1
src/components/CInfoAccount/index.ts
Executable file
@@ -0,0 +1 @@
|
|||||||
|
export { default as CInfoAccount } from './CInfoAccount.vue'
|
||||||
@@ -140,8 +140,9 @@ export default defineComponent({
|
|||||||
function showandsel(row: any, col: any, newval: any, valinitial: any) {
|
function showandsel(row: any, col: any, newval: any, valinitial: any) {
|
||||||
console.log('showandsel CMyFieldDb', row, col, newval)
|
console.log('showandsel CMyFieldDb', row, col, newval)
|
||||||
|
|
||||||
if (newval !== valinitial)
|
if (newval !== valinitial) {
|
||||||
setValDb($q, props.mykey, newval, props.type, props.serv, props.table, props.mysubkey, props.id, props.indrec, props.mysubsubkey, props.specialField)
|
setValDb($q, props.mykey, newval, props.type, props.serv, props.table, props.mysubkey, props.id, props.indrec, props.mysubsubkey, props.specialField)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import { useRoute, useRouter } from 'vue-router'
|
|||||||
import { CUserNonVerif } from '@/components/CUserNonVerif'
|
import { CUserNonVerif } from '@/components/CUserNonVerif'
|
||||||
import { toolsext } from '@store/Modules/toolsext'
|
import { toolsext } from '@store/Modules/toolsext'
|
||||||
import { CSaldo } from '@/components/CSaldo'
|
import { CSaldo } from '@/components/CSaldo'
|
||||||
|
import { CInfoAccount } from '@/components/CInfoAccount'
|
||||||
import { CSendCoins } from '@/components/CSendCoins'
|
import { CSendCoins } from '@/components/CSendCoins'
|
||||||
import { CCurrencyValue } from '@/components/CCurrencyValue'
|
import { CCurrencyValue } from '@/components/CCurrencyValue'
|
||||||
import { useCircuitStore } from '@store/CircuitStore'
|
import { useCircuitStore } from '@store/CircuitStore'
|
||||||
@@ -17,7 +18,7 @@ import { useCircuitStore } from '@store/CircuitStore'
|
|||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'CMyGroup',
|
name: 'CMyGroup',
|
||||||
emits: ['setCmd'],
|
emits: ['setCmd'],
|
||||||
components: {CUserNonVerif, CSaldo, CSendCoins, CCurrencyValue },
|
components: {CInfoAccount, CUserNonVerif, CSaldo, CSendCoins, CCurrencyValue },
|
||||||
props: {
|
props: {
|
||||||
mygrp: {
|
mygrp: {
|
||||||
type: Object as PropType<IMyGroup | null>,
|
type: Object as PropType<IMyGroup | null>,
|
||||||
|
|||||||
@@ -562,95 +562,14 @@
|
|||||||
</CSendCoins>
|
</CSendCoins>
|
||||||
</div>
|
</div>
|
||||||
<q-dialog v-model="showAccountInfo" full-height full-width>
|
<q-dialog v-model="showAccountInfo" full-height full-width>
|
||||||
<q-card>
|
<q-card v-if="circuit">
|
||||||
<q-toolbar class="bg-primary text-white">
|
<q-toolbar class="bg-primary text-white">
|
||||||
<q-toolbar-title>
|
<q-toolbar-title>
|
||||||
{{ grp.title }}
|
{{ grp.title }}
|
||||||
</q-toolbar-title>
|
</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-toolbar>
|
||||||
<q-card-section>
|
<CInfoAccount :grp="grp" :circuitname="circuitname" :admin="tools.iAmAdminCircuit(circuitname)" />
|
||||||
<div class="text-h6">{{ t('groups.infoaccount') }}</div>
|
|
||||||
</q-card-section>
|
|
||||||
|
|
||||||
<q-separator />
|
|
||||||
|
|
||||||
<CSaldo
|
|
||||||
v-if="tools.isUserOk() && grp.account"
|
|
||||||
:account="grp.account"
|
|
||||||
:symbol="circuit.symbol"
|
|
||||||
:color="circuit.color"
|
|
||||||
:saldo="grp.account.saldo"
|
|
||||||
:qtarem="
|
|
||||||
grp.account ? circuitStore.getRemainingCoinsToSend(grp.account) : 0
|
|
||||||
"
|
|
||||||
>
|
|
||||||
</CSaldo>
|
|
||||||
|
|
||||||
<q-card-section>
|
|
||||||
<div v-if="grp.account.date_created" class="container">
|
|
||||||
<q-icon name="fas fa-lightbulb" class="iconcirc"></q-icon>
|
|
||||||
{{
|
|
||||||
$t('shared.createddate', {
|
|
||||||
date: tools.getstrDateYY(grp.account.date_created),
|
|
||||||
})
|
|
||||||
}}
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
v-if="
|
|
||||||
!!grp.account.date_updated &&
|
|
||||||
tools.getstrDate(grp.account.date_updated) !==
|
|
||||||
tools.getstrDate(grp.account.date_created)
|
|
||||||
"
|
|
||||||
class="container"
|
|
||||||
>
|
|
||||||
<q-icon name="fas fa-pencil-alt" class="iconcirc"></q-icon>
|
|
||||||
<span class="element">{{
|
|
||||||
$t('shared.lastmodify', {
|
|
||||||
date: tools.getstrDateYY(grp.account.date_updated),
|
|
||||||
})
|
|
||||||
}}</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div :class="$q.screen.lt.sm ? '' : 'row'">
|
|
||||||
<div class="sezioni">
|
|
||||||
<CCurrencyValue
|
|
||||||
:symbol="tools.getSymbolByCircuit(circuit)"
|
|
||||||
:color="tools.getColorByCircuit(circuit)"
|
|
||||||
color_border="red"
|
|
||||||
:value="grp.account.fidoConcesso"
|
|
||||||
icon="fas fa-battery-quarter"
|
|
||||||
:label="t('circuit.fido_scoperto_default')"
|
|
||||||
:tips="t('circuit.fido_scoperto_default_tips')"
|
|
||||||
>
|
|
||||||
</CCurrencyValue>
|
|
||||||
</div>
|
|
||||||
<div class="sezioni">
|
|
||||||
<CCurrencyValue
|
|
||||||
:symbol="tools.getSymbolByCircuit(circuit)"
|
|
||||||
:color="tools.getColorByCircuit(circuit)"
|
|
||||||
color_border="green"
|
|
||||||
:value="grp.account.qta_maxConcessa"
|
|
||||||
icon="fas fa-battery-quarter"
|
|
||||||
:label="t('circuit.qta_max_default')"
|
|
||||||
:tips="t('circuit.qta_max_default_tips')"
|
|
||||||
>
|
|
||||||
</CCurrencyValue>
|
|
||||||
</div>
|
|
||||||
<div v-if="grp.account.totTransato" class="sezioni">
|
|
||||||
<CCurrencyValue
|
|
||||||
:symbol="tools.getSymbolByCircuit(circuit)"
|
|
||||||
:color="tools.getColorByCircuit(circuit)"
|
|
||||||
color_border="blue"
|
|
||||||
:value="grp.account.totTransato"
|
|
||||||
icon="fas fa-battery-quarter"
|
|
||||||
:label="t('circuit.totTransato')"
|
|
||||||
:tips="t('circuit.totTransato_tips')"
|
|
||||||
>
|
|
||||||
</CCurrencyValue>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</q-card-section>
|
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -3,8 +3,10 @@
|
|||||||
<div v-if="mypathin && !!rec">
|
<div v-if="mypathin && !!rec">
|
||||||
<q-toggle
|
<q-toggle
|
||||||
v-if="tools.isManager()"
|
v-if="tools.isManager()"
|
||||||
|
style=" position:absolute;"
|
||||||
v-model="editOn"
|
v-model="editOn"
|
||||||
color="green"
|
color="green"
|
||||||
|
size="sm"
|
||||||
@update:model-value="changeVisuDrawer(mypathin, editOn)"
|
@update:model-value="changeVisuDrawer(mypathin, editOn)"
|
||||||
icon="fas fa-pencil-alt"
|
icon="fas fa-pencil-alt"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -309,7 +309,7 @@
|
|||||||
<CCurrencyValue
|
<CCurrencyValue
|
||||||
:symbol="tools.getSymbolByCircuit(row)"
|
:symbol="tools.getSymbolByCircuit(row)"
|
||||||
:color="tools.getColorByCircuit(row)"
|
:color="tools.getColorByCircuit(row)"
|
||||||
:value="myvalue"
|
v-model="myvalue"
|
||||||
:label="$t(col.label_trans)"
|
:label="$t(col.label_trans)"
|
||||||
>
|
>
|
||||||
</CCurrencyValue>
|
</CCurrencyValue>
|
||||||
@@ -1099,7 +1099,7 @@
|
|||||||
<CCurrencyValue
|
<CCurrencyValue
|
||||||
:symbol="tools.getSymbolByCircuit(row)"
|
:symbol="tools.getSymbolByCircuit(row)"
|
||||||
:color="tools.getColorByCircuit(row)"
|
:color="tools.getColorByCircuit(row)"
|
||||||
:value="scope.value"
|
v-model="scope.value"
|
||||||
:label="$t(col.label_trans)"
|
:label="$t(col.label_trans)"
|
||||||
>
|
>
|
||||||
</CCurrencyValue>
|
</CCurrencyValue>
|
||||||
|
|||||||
@@ -41,6 +41,11 @@ export default defineComponent({
|
|||||||
required: false,
|
required: false,
|
||||||
default: '',
|
default: '',
|
||||||
},
|
},
|
||||||
|
paramTypeAccount: {
|
||||||
|
type: Number,
|
||||||
|
required: false,
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
components: { CCurrencyValue, CMyFieldRec },
|
components: { CCurrencyValue, CMyFieldRec },
|
||||||
setup(props, { emit }) {
|
setup(props, { emit }) {
|
||||||
|
|||||||
@@ -5,17 +5,23 @@
|
|||||||
:symbol="symbol"
|
:symbol="symbol"
|
||||||
:color_border="saldo > 0 ? `green` : `red`"
|
:color_border="saldo > 0 ? `green` : `red`"
|
||||||
:color="color"
|
:color="color"
|
||||||
:value="saldo"
|
v-model="saldo"
|
||||||
:label="t('account.saldo')">
|
:label="t('account.saldo')"
|
||||||
|
:paramTypeAccount="paramTypeAccount"
|
||||||
|
:myrecparam="account"
|
||||||
|
>
|
||||||
</CCurrencyValue>
|
</CCurrencyValue>
|
||||||
<CCurrencyValue
|
<CCurrencyValue
|
||||||
v-else
|
v-else
|
||||||
:symbol="symbol"
|
:symbol="symbol"
|
||||||
:tips="t('account.saldo_tips', {fido: qtarem, symbol})"
|
:tips="t('account.saldo_tips', {fido: qtarem, symbol})"
|
||||||
:color="color"
|
:color="color"
|
||||||
:value="saldo"
|
v-model="saldo"
|
||||||
:valueextra="account && account.notifspending && account.notifspending.length > 0 ? `* `: ''"
|
:valueextra="account && account.notifspending && account.notifspending.length > 0 ? `* `: ''"
|
||||||
:label="t('account.saldo') + ` (` + t('account.dispon') + `: ` + qtarem + `)`">
|
:label="t('account.saldo') + ` (` + t('account.dispon') + `: ` + qtarem + `)`"
|
||||||
|
:paramTypeAccount="paramTypeAccount"
|
||||||
|
:myrecparam="account"
|
||||||
|
>
|
||||||
|
|
||||||
</CCurrencyValue>
|
</CCurrencyValue>
|
||||||
|
|
||||||
|
|||||||
@@ -1219,6 +1219,13 @@ h3 {
|
|||||||
letter-spacing: 0.15px;
|
letter-spacing: 0.15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.title_view_subtitle {
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
font-size: 0.7rem;
|
||||||
|
letter-spacing: 0.15px;
|
||||||
|
min-height: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.text-normal {
|
.text-normal {
|
||||||
font-family: 'Open Sans', Arial, sans-serif;
|
font-family: 'Open Sans', Arial, sans-serif;
|
||||||
@@ -1565,3 +1572,7 @@ h3 {
|
|||||||
.elem {
|
.elem {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.small_side {
|
||||||
|
padding-left: 4px !important;
|
||||||
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
<div v-if="tools.isUserOk()">
|
<div v-if="tools.isUserOk()">
|
||||||
<CFinder
|
<CFinder
|
||||||
:ind="4"
|
:ind="tools.getIndMainCardsByTable(toolsext.TABMYBACHECAS)"
|
||||||
:table="toolsext.TABMYBACHECAS">
|
:table="toolsext.TABMYBACHECAS">
|
||||||
|
|
||||||
</CFinder>
|
</CFinder>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<div v-if="tools.isUserOk()">
|
<div v-if="tools.isUserOk()">
|
||||||
|
|
||||||
<CFinder
|
<CFinder
|
||||||
:ind="0"
|
:ind="tools.getIndMainCardsByTable(toolsext.TABMYGOODS)"
|
||||||
:table="toolsext.TABMYGOODS"
|
:table="toolsext.TABMYGOODS"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<div v-if="tools.isUserOk()">
|
<div v-if="tools.isUserOk()">
|
||||||
|
|
||||||
<CFinder
|
<CFinder
|
||||||
:ind="2"
|
:ind="tools.getIndMainCardsByTable(toolsext.TABMYHOSPS)"
|
||||||
:table="toolsext.TABMYHOSPS">
|
:table="toolsext.TABMYHOSPS">
|
||||||
|
|
||||||
</CFinder>
|
</CFinder>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<div v-if="tools.isUserOk()">
|
<div v-if="tools.isUserOk()">
|
||||||
|
|
||||||
<CFinder
|
<CFinder
|
||||||
:ind="1"
|
:ind="tools.getIndMainCardsByTable(toolsext.TABMYSKILLS)"
|
||||||
:table="toolsext.TABMYSKILLS"
|
:table="toolsext.TABMYSKILLS"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|||||||
@@ -1279,6 +1279,8 @@ const msg_it = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
account: {
|
account: {
|
||||||
|
updateval: 'Aggiorna',
|
||||||
|
settings: 'Impostazioni',
|
||||||
deperibile: 'Deperibile',
|
deperibile: 'Deperibile',
|
||||||
fidoConcesso: 'Capacità di finanziamento',
|
fidoConcesso: 'Capacità di finanziamento',
|
||||||
qta_maxConcessa: 'Capacità massima accumulabile',
|
qta_maxConcessa: 'Capacità massima accumulabile',
|
||||||
|
|||||||
@@ -62,6 +62,27 @@ export const costanti = {
|
|||||||
SHOW_ONLY_TOCOMPLETE: 201,
|
SHOW_ONLY_TOCOMPLETE: 201,
|
||||||
SHOW_ALL: 202,
|
SHOW_ALL: 202,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
ParamTypeAccount: {
|
||||||
|
FIDO_CONCESSO: 1,
|
||||||
|
QTA_MAXCONCESSA: 2,
|
||||||
|
},
|
||||||
|
|
||||||
|
ParamTypeAccountStr: [
|
||||||
|
{
|
||||||
|
labeltrans: 'account.fidoConcesso',
|
||||||
|
value: 1, // FIDO_CONCESSO
|
||||||
|
field: 'fidoConcesso',
|
||||||
|
type: 4, //string
|
||||||
|
},
|
||||||
|
{
|
||||||
|
labeltrans: 'account.qta_maxConcessa',
|
||||||
|
field: 'qta_maxConcessa',
|
||||||
|
value: 2, // QTA_MAXCONCESSA
|
||||||
|
type: 4, //string
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
CONFIG_ID_CFG: '1',
|
CONFIG_ID_CFG: '1',
|
||||||
CONFIG_ID_STATE_CONN: '2',
|
CONFIG_ID_STATE_CONN: '2',
|
||||||
CONFIG_ID_SHOW_TYPE_TODOS: '3',
|
CONFIG_ID_SHOW_TYPE_TODOS: '3',
|
||||||
@@ -75,7 +96,7 @@ export const costanti = {
|
|||||||
{
|
{
|
||||||
visible: true,
|
visible: true,
|
||||||
title: ' Beni ',
|
title: ' Beni ',
|
||||||
subtitle: 'Autoproduzioni, artigianato, cibo, abbigliamento ...',
|
subtitle: 'Autoproduzioni, artigianato, cibo, abbigliamento, attrezzature, arredamento',
|
||||||
strsingolo: 'Bene',
|
strsingolo: 'Bene',
|
||||||
to: '/goods',
|
to: '/goods',
|
||||||
icon: 'fas fa-tshirt',
|
icon: 'fas fa-tshirt',
|
||||||
@@ -89,7 +110,7 @@ export const costanti = {
|
|||||||
visible: true,
|
visible: true,
|
||||||
strsingolo: 'Servizio',
|
strsingolo: 'Servizio',
|
||||||
title: 'Servizi',
|
title: 'Servizi',
|
||||||
subtitle: 'Competenze, formazione, aiuti, benessere, comunità',
|
subtitle: 'Competenze, formazione, aiuti, benessere, salute, casa, riparazioni',
|
||||||
to: '/services',
|
to: '/services',
|
||||||
icon: 'fas fa-house-user',
|
icon: 'fas fa-house-user',
|
||||||
color: 'red-6',
|
color: 'red-6',
|
||||||
@@ -101,7 +122,7 @@ export const costanti = {
|
|||||||
{
|
{
|
||||||
visible: true,
|
visible: true,
|
||||||
title: 'Ospitalità',
|
title: 'Ospitalità',
|
||||||
subtitle: 'Conosci persone, ospita viaggiatori, esplora nuovi paesi',
|
subtitle: 'Conosci persone nuove, ospita viaggiatori o esplora tu nuovi paesi',
|
||||||
strsingolo: 'Ospitalità',
|
strsingolo: 'Ospitalità',
|
||||||
to: '/hosps',
|
to: '/hosps',
|
||||||
icon: 'fas fa-bed',
|
icon: 'fas fa-bed',
|
||||||
@@ -125,11 +146,38 @@ export const costanti = {
|
|||||||
small: false,
|
small: false,
|
||||||
table: '',
|
table: '',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
visible: false,
|
||||||
|
title: 'Circuiti RIS',
|
||||||
|
subtitle: 'Unisciti al circuito della tua provincia per utilizzare <strong>i RIS come moneta di scambio</strong>',
|
||||||
|
to: '/circuits',
|
||||||
|
table: 'circuits',
|
||||||
|
icon: 'fas fa-coins',
|
||||||
|
image: 'images/1ris_rosso_100.png',
|
||||||
|
color: 'orange-6',
|
||||||
|
hint: '',
|
||||||
|
disable: true,
|
||||||
|
small: true,
|
||||||
|
visuonstat: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
visible: false,
|
||||||
|
title: 'Gruppi',
|
||||||
|
subtitle: 'Conosci gruppi locali, associazioni, progetti, comunità',
|
||||||
|
to: '/groups',
|
||||||
|
table: 'mygroups',
|
||||||
|
icon: 'fas fa-users',
|
||||||
|
color: 'blue-6',
|
||||||
|
hint: '',
|
||||||
|
disable: true,
|
||||||
|
small: true,
|
||||||
|
visuonstat: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
visible: true,
|
visible: true,
|
||||||
title: 'Eventi',
|
title: 'Eventi',
|
||||||
strsingolo: 'Evento',
|
strsingolo: 'Evento',
|
||||||
subtitle: 'Mercatini, incontri, corsi, feste',
|
subtitle: 'Mercatini, incontri, conferenze, corsi formativi, feste e divertimento',
|
||||||
to: '/events',
|
to: '/events',
|
||||||
icon: 'event',
|
icon: 'event',
|
||||||
color: 'green-6',
|
color: 'green-6',
|
||||||
@@ -199,38 +247,9 @@ export const costanti = {
|
|||||||
small: true,
|
small: true,
|
||||||
table: '',
|
table: '',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
visible: false,
|
|
||||||
title: 'Gruppi', // ! IND_MYGROUPS
|
|
||||||
subtitle: 'Conosci gruppi, associazioni, progetti, comunità',
|
|
||||||
to: '/groups',
|
|
||||||
table: 'mygroups',
|
|
||||||
icon: 'fas fa-users',
|
|
||||||
color: 'blue-6',
|
|
||||||
hint: '',
|
|
||||||
disable: true,
|
|
||||||
small: true,
|
|
||||||
visuonstat: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
visible: false, // ! IND_CIRCUIT: 11,
|
|
||||||
title: 'Circuiti RIS',
|
|
||||||
subtitle: 'Entra nel territorio e <strong>Invia e Ricevi monete</strong>',
|
|
||||||
to: '/circuits',
|
|
||||||
table: 'circuits',
|
|
||||||
icon: 'fas fa-coins',
|
|
||||||
image: 'images/1ris_rosso_100.png',
|
|
||||||
color: 'orange-6',
|
|
||||||
hint: '',
|
|
||||||
disable: true,
|
|
||||||
small: true,
|
|
||||||
visuonstat: true,
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
||||||
IND_CIRCUIT: 11,
|
|
||||||
IND_MYGROUPS: 10,
|
|
||||||
|
|
||||||
BINARY_CHECK: 1,
|
BINARY_CHECK: 1,
|
||||||
|
|
||||||
|
|||||||
@@ -7663,6 +7663,32 @@ export const tools = {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
isDevelop() {
|
||||||
|
return process.env.DEV
|
||||||
|
},
|
||||||
|
|
||||||
|
getIndMainCardsByTable(table: string) {
|
||||||
|
for (let i = 0; i < costanti.MAINCARDS.length; i++) {
|
||||||
|
if (costanti.MAINCARDS[i].table === table)
|
||||||
|
return i
|
||||||
|
}
|
||||||
|
return -1
|
||||||
|
},
|
||||||
|
|
||||||
|
getStrByParamTypeAccount(paramTypeAccount: string): string {
|
||||||
|
const myrec = costanti.ParamTypeAccountStr.find((rec: any) => rec.value === paramTypeAccount)
|
||||||
|
return myrec ? translate(myrec.labeltrans) : ''
|
||||||
|
},
|
||||||
|
|
||||||
|
getTypeByParamTypeAccount(paramTypeAccount: string): number {
|
||||||
|
const myrec = costanti.ParamTypeAccountStr.find((rec: any) => rec.value === paramTypeAccount)
|
||||||
|
return myrec ? myrec.type : 0
|
||||||
|
},
|
||||||
|
getFieldByParamTypeAccount(paramTypeAccount: string): string {
|
||||||
|
const myrec = costanti.ParamTypeAccountStr.find((rec: any) => rec.value === paramTypeAccount)
|
||||||
|
return myrec ? myrec.field : ''
|
||||||
|
},
|
||||||
|
|
||||||
// FINE !
|
// FINE !
|
||||||
|
|
||||||
// getLocale() {
|
// getLocale() {
|
||||||
|
|||||||
@@ -621,7 +621,7 @@
|
|||||||
:symbol="tools.getSymbolByCircuit(circuit)"
|
:symbol="tools.getSymbolByCircuit(circuit)"
|
||||||
:color="tools.getColorByCircuit(circuit)"
|
:color="tools.getColorByCircuit(circuit)"
|
||||||
color_border="red"
|
color_border="red"
|
||||||
:value="circuit.fido_scoperto_default"
|
v-model="circuit.fido_scoperto_default"
|
||||||
icon="fas fa-battery-quarter"
|
icon="fas fa-battery-quarter"
|
||||||
:label="t('circuit.fido_scoperto_default')"
|
:label="t('circuit.fido_scoperto_default')"
|
||||||
:tips="t('circuit.fido_scoperto_default_tips')"
|
:tips="t('circuit.fido_scoperto_default_tips')"
|
||||||
@@ -633,7 +633,7 @@
|
|||||||
:symbol="tools.getSymbolByCircuit(circuit)"
|
:symbol="tools.getSymbolByCircuit(circuit)"
|
||||||
:color="tools.getColorByCircuit(circuit)"
|
:color="tools.getColorByCircuit(circuit)"
|
||||||
color_border="green"
|
color_border="green"
|
||||||
:value="circuit.qta_max_default"
|
v-model="circuit.qta_max_default"
|
||||||
icon="fas fa-battery-quarter"
|
icon="fas fa-battery-quarter"
|
||||||
:label="t('circuit.qta_max_default')"
|
:label="t('circuit.qta_max_default')"
|
||||||
:tips="t('circuit.qta_max_default_tips')"
|
:tips="t('circuit.qta_max_default_tips')"
|
||||||
@@ -645,7 +645,7 @@
|
|||||||
:symbol="tools.getSymbolByCircuit(circuit)"
|
:symbol="tools.getSymbolByCircuit(circuit)"
|
||||||
:color="tools.getColorByCircuit(circuit)"
|
:color="tools.getColorByCircuit(circuit)"
|
||||||
color_border="red"
|
color_border="red"
|
||||||
:value="circuit.fido_scoperto_default_grp"
|
v-model="circuit.fido_scoperto_default_grp"
|
||||||
icon="fas fa-battery-quarter"
|
icon="fas fa-battery-quarter"
|
||||||
:label="t('circuit.fido_scoperto_default_grp')"
|
:label="t('circuit.fido_scoperto_default_grp')"
|
||||||
:tips="t('circuit.fido_scoperto_default_tips_grp')"
|
:tips="t('circuit.fido_scoperto_default_tips_grp')"
|
||||||
@@ -657,7 +657,7 @@
|
|||||||
:symbol="tools.getSymbolByCircuit(circuit)"
|
:symbol="tools.getSymbolByCircuit(circuit)"
|
||||||
:color="tools.getColorByCircuit(circuit)"
|
:color="tools.getColorByCircuit(circuit)"
|
||||||
color_border="green"
|
color_border="green"
|
||||||
:value="circuit.qta_max_default_grp"
|
v-model="circuit.qta_max_default_grp"
|
||||||
icon="fas fa-battery-quarter"
|
icon="fas fa-battery-quarter"
|
||||||
:label="t('circuit.qta_max_default_grp')"
|
:label="t('circuit.qta_max_default_grp')"
|
||||||
:tips="t('circuit.qta_max_default_tips_grp')"
|
:tips="t('circuit.qta_max_default_tips_grp')"
|
||||||
@@ -675,7 +675,7 @@
|
|||||||
:symbol="tools.getSymbolByCircuit(circuit)"
|
:symbol="tools.getSymbolByCircuit(circuit)"
|
||||||
:color="tools.getColorByCircuit(circuit)"
|
:color="tools.getColorByCircuit(circuit)"
|
||||||
color_border="blue"
|
color_border="blue"
|
||||||
:value="circuit.totTransato"
|
v-model="circuit.totTransato"
|
||||||
icon="fas fa-battery-quarter"
|
icon="fas fa-battery-quarter"
|
||||||
:label="t('circuit.totTransato')"
|
:label="t('circuit.totTransato')"
|
||||||
:tips="t('circuit.totTransato_tips')"
|
:tips="t('circuit.totTransato_tips')"
|
||||||
@@ -687,7 +687,7 @@
|
|||||||
:symbol="tools.getSymbolByCircuit(circuit)"
|
:symbol="tools.getSymbolByCircuit(circuit)"
|
||||||
:color="tools.getColorByCircuit(circuit)"
|
:color="tools.getColorByCircuit(circuit)"
|
||||||
color_border="blue"
|
color_border="blue"
|
||||||
:value="circuit.totCircolante"
|
v-model="circuit.totCircolante"
|
||||||
icon="fas fa-battery-quarter"
|
icon="fas fa-battery-quarter"
|
||||||
:label="t('circuit.totCircolante')"
|
:label="t('circuit.totCircolante')"
|
||||||
:tips="t('circuit.totCircolante_tips')"
|
:tips="t('circuit.totCircolante_tips')"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import { CCheckIfIsLogged } from '@/components/CCheckIfIsLogged'
|
|||||||
import { CMyFieldRec } from '@/components/CMyFieldRec'
|
import { CMyFieldRec } from '@/components/CMyFieldRec'
|
||||||
import { CSkill } from '@/components/CSkill'
|
import { CSkill } from '@/components/CSkill'
|
||||||
import { CDateTime } from '@/components/CDateTime'
|
import { CDateTime } from '@/components/CDateTime'
|
||||||
import { CSaldo } from '@/components/CSaldo'
|
import { CInfoAccount } from '@/components/CInfoAccount'
|
||||||
import { tools } from '@store/Modules/tools'
|
import { tools } from '@store/Modules/tools'
|
||||||
import { computed, defineComponent, onMounted, ref, watch } from 'vue'
|
import { computed, defineComponent, onMounted, ref, watch } from 'vue'
|
||||||
import { useUserStore } from '@store/UserStore'
|
import { useUserStore } from '@store/UserStore'
|
||||||
@@ -22,14 +22,13 @@ import { shared_consts } from '@/common/shared_vuejs'
|
|||||||
import { colmyUserPeople, colmyUserGroup } from '@store/Modules/fieldsTable'
|
import { colmyUserPeople, colmyUserGroup } from '@store/Modules/fieldsTable'
|
||||||
import { useNotifStore } from '@store/NotifStore'
|
import { useNotifStore } from '@store/NotifStore'
|
||||||
import { useCircuitStore } from '@src/store/CircuitStore'
|
import { useCircuitStore } from '@src/store/CircuitStore'
|
||||||
import circuitsList from '@src/rootgen/admin/circuitsList/circuitsList'
|
|
||||||
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'mygroup',
|
name: 'mygroup',
|
||||||
components: {
|
components: {
|
||||||
CProfile, CTitleBanner, CMyFieldRec,
|
CProfile, CTitleBanner, CMyFieldRec,
|
||||||
CSaldo, CSkill, CDateTime, CMyFriends, CGridTableRec, CMyUser, CCheckIfIsLogged
|
CInfoAccount, CSkill, CDateTime, CMyFriends, CGridTableRec, CMyUser, CCheckIfIsLogged
|
||||||
},
|
},
|
||||||
props: {},
|
props: {},
|
||||||
setup() {
|
setup() {
|
||||||
@@ -76,6 +75,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function loadGroup() {
|
async function loadGroup() {
|
||||||
|
console.log('loadGroup')
|
||||||
// Carica il profilo di quest'utente
|
// Carica il profilo di quest'utente
|
||||||
if (groupname.value) {
|
if (groupname.value) {
|
||||||
await userStore.loadGroup(groupname.value, idnotif.value).then(({ data, status }: { data: any, status: number }) => {
|
await userStore.loadGroup(groupname.value, idnotif.value).then(({ data, status }: { data: any, status: number }) => {
|
||||||
@@ -87,9 +87,11 @@ export default defineComponent({
|
|||||||
notifStore.setAsRead(idnotif.value)
|
notifStore.setAsRead(idnotif.value)
|
||||||
users_in_group.value = data.users_in_group
|
users_in_group.value = data.users_in_group
|
||||||
|
|
||||||
if (mygrp.value && tools.iAmAdminGroup(groupname.value)) {
|
if (mygrp.value)
|
||||||
circuitslist.value = circuitStore.getCircuitsListByGroup(mygrp.value)
|
circuitslist.value = circuitStore.getCircuitsListByGroup(mygrp.value)
|
||||||
}
|
|
||||||
|
/*if (mygrp.value && tools.iAmAdminGroup(groupname.value)) {
|
||||||
|
}*/
|
||||||
if (circuitslist.value) {
|
if (circuitslist.value) {
|
||||||
for (let i = 0; i < circuitslist.value.length; i++) {
|
for (let i = 0; i < circuitslist.value.length; i++) {
|
||||||
let myc = data.mygroup.mycircuits.find((circ: IMyCircuit) => circ.circuitname === circuitslist.value[i].name)
|
let myc = data.mygroup.mycircuits.find((circ: IMyCircuit) => circ.circuitname === circuitslist.value[i].name)
|
||||||
|
|||||||
@@ -488,18 +488,9 @@
|
|||||||
<q-tab-panel name="circuits">
|
<q-tab-panel name="circuits">
|
||||||
<div v-for="(circuit, ind) of circuitslist" :key="ind">
|
<div v-for="(circuit, ind) of circuitslist" :key="ind">
|
||||||
<div class="circuit_name">{{ circuit.name }}:</div>
|
<div class="circuit_name">{{ circuit.name }}:</div>
|
||||||
<CSaldo
|
<CInfoAccount :circuitname="circuit.name"
|
||||||
:account="circuit.account"
|
:grp="mygrp" :account="circuit.account"
|
||||||
:symbol="circuit.symbol"
|
:admin="tools.iAmAdminCircuit(circuit.name)" />
|
||||||
:color="circuit.color"
|
|
||||||
:saldo="circuit.account.saldo"
|
|
||||||
:qtarem="
|
|
||||||
circuit.account
|
|
||||||
? circuitStore.getRemainingCoinsToSend(circuit.account)
|
|
||||||
: 0
|
|
||||||
"
|
|
||||||
>
|
|
||||||
</CSaldo>
|
|
||||||
</div>
|
</div>
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
</q-tab-panels>
|
</q-tab-panels>
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
filter,
|
filter,
|
||||||
|
tools,
|
||||||
costanti,
|
costanti,
|
||||||
shared_consts,
|
shared_consts,
|
||||||
colmyUserGroup,
|
colmyUserGroup,
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
>
|
>
|
||||||
|
|
||||||
<CFinder
|
<CFinder
|
||||||
:ind="10"
|
:ind="tools.getIndMainCardsByTable(toolsext.TABMYGROUPS)"
|
||||||
:table="toolsext.TABMYGROUPS"
|
:table="toolsext.TABMYGROUPS"
|
||||||
:showFilterPersonal="true"
|
:showFilterPersonal="true"
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user