diff --git a/src/components/CCurrencyValue/CCurrencyValue.scss b/src/components/CCurrencyValue/CCurrencyValue.scss
new file mode 100755
index 00000000..e69de29b
diff --git a/src/components/CCurrencyValue/CCurrencyValue.ts b/src/components/CCurrencyValue/CCurrencyValue.ts
new file mode 100755
index 00000000..eed77c48
--- /dev/null
+++ b/src/components/CCurrencyValue/CCurrencyValue.ts
@@ -0,0 +1,64 @@
+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'
+
+export default defineComponent({
+ name: 'CCurrencyValue',
+ props: {
+ 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: '',
+ },
+ icon: {
+ type: String,
+ required: false,
+ default: '',
+ },
+ value: {
+ type: Number,
+ required: true,
+ },
+ },
+ components: {},
+ setup(props, { emit }) {
+ const $q = useQuasar()
+ const { t } = useI18n()
+
+ const showingtooltip = ref(false)
+
+ function created() {
+ // created
+ }
+
+
+ onMounted(created)
+
+ return {
+ showingtooltip,
+ t,
+ $q,
+ }
+ },
+})
diff --git a/src/components/CCurrencyValue/CCurrencyValue.vue b/src/components/CCurrencyValue/CCurrencyValue.vue
new file mode 100755
index 00000000..124bd272
--- /dev/null
+++ b/src/components/CCurrencyValue/CCurrencyValue.vue
@@ -0,0 +1,51 @@
+
+
+
+ {{ label }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ value }}
+ {{tips}}
+
+
+
+
+ {{ symbol }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/CCurrencyValue/index.ts b/src/components/CCurrencyValue/index.ts
new file mode 100755
index 00000000..ad2d7ddf
--- /dev/null
+++ b/src/components/CCurrencyValue/index.ts
@@ -0,0 +1 @@
+export {default as CCurrencyValue} from './CCurrencyValue.vue'
diff --git a/src/components/CGridTableRec/CGridTableRec.ts b/src/components/CGridTableRec/CGridTableRec.ts
index 3a9b1f03..5f46d8f2 100755
--- a/src/components/CGridTableRec/CGridTableRec.ts
+++ b/src/components/CGridTableRec/CGridTableRec.ts
@@ -881,7 +881,13 @@ export default defineComponent({
try {
numRecLoaded.value = numRecLoaded.value + (returnedData.value ? returnedData.value.length : 0)
// console.log(' ...numRecLoaded.value', numRecLoaded.value)
- serverData.value = [...serverData.value, ...returnedData.value]
+ let toadd = []
+ for (const elem of returnedData.value) {
+ if (serverData.value.findIndex((rec: any) => rec._id === elem._id) < 0) {
+ toadd.push(elem)
+ }
+ }
+ serverData.value = [...serverData.value, ...toadd]
} catch (e) {
serverData.value = []
}
diff --git a/src/components/CMyPopupEdit/CMyPopupEdit.scss b/src/components/CMyPopupEdit/CMyPopupEdit.scss
index f10835dd..7d504fd4 100755
--- a/src/components/CMyPopupEdit/CMyPopupEdit.scss
+++ b/src/components/CMyPopupEdit/CMyPopupEdit.scss
@@ -9,3 +9,8 @@
.clpopupVisuCard{
/*border-radius: $generic-border-radius */
}
+.extrafield{
+ color: black;
+ font-size: 1rem;
+ padding: 4px;
+}
diff --git a/src/components/CMyPopupEdit/CMyPopupEdit.ts b/src/components/CMyPopupEdit/CMyPopupEdit.ts
index d7215eb8..2549c031 100755
--- a/src/components/CMyPopupEdit/CMyPopupEdit.ts
+++ b/src/components/CMyPopupEdit/CMyPopupEdit.ts
@@ -10,6 +10,7 @@ import { CDateTime } from '../CDateTime'
import { CLabel } from '../CLabel'
import { CMyToggleList } from '../CMyToggleList'
import { CMySelect } from '../CMySelect'
+import { CCurrencyValue } from '../CCurrencyValue'
import { CMyEditor } from '../CMyEditor'
import { CGallery } from '../CGallery'
import { CAccomodation } from '../CAccomodation'
@@ -185,7 +186,8 @@ export default defineComponent({
default: false,
},
},
- components: { CMyChipList, CDateTime, CDate, CMyToggleList, CMySelect, CMyEditor, CGallery, CLabel, CAccomodation },
+ components: { CMyChipList, CDateTime, CDate, CMyToggleList, CMySelect, CMyEditor, CGallery,
+ CCurrencyValue, CLabel, CAccomodation },
setup(props, { emit }) {
const $q = useQuasar()
const { t } = useI18n()
diff --git a/src/components/CMyPopupEdit/CMyPopupEdit.vue b/src/components/CMyPopupEdit/CMyPopupEdit.vue
index 11572a53..d3e75927 100755
--- a/src/components/CMyPopupEdit/CMyPopupEdit.vue
+++ b/src/components/CMyPopupEdit/CMyPopupEdit.vue
@@ -10,13 +10,14 @@
@@ -53,6 +54,9 @@
-
+
+
+
+
+
+
@@ -640,6 +653,16 @@
+
+
+
+
+
+
{{ myrec.longdescr }}
+
+
diff --git a/src/components/CSendCoins/CSendCoins.ts b/src/components/CSendCoins/CSendCoins.ts
index 41b16b03..2e39690b 100755
--- a/src/components/CSendCoins/CSendCoins.ts
+++ b/src/components/CSendCoins/CSendCoins.ts
@@ -1,10 +1,12 @@
import { computed, defineComponent, onMounted, PropType, ref, watch } from 'vue'
-import { ICircuit, IOperators, ISendCoin, ISpecialField, IUserFields } from '../../model'
+import { IAccount, ICircuit, IOperators, ISendCoin, ISpecialField, IUserFields } from '../../model'
import { tools } from '@store/Modules/tools'
+import { CCurrencyValue } from '@/components/CCurrencyValue'
import { useUserStore } from '@store/UserStore'
import { useCircuitStore } from '@store/CircuitStore'
import { useQuasar } from 'quasar'
+import { useI18n } from '@/boot/i18n'
export default defineComponent({
name: 'CSendCoins',
@@ -19,9 +21,11 @@ export default defineComponent({
required: true,
},
},
+ components: { CCurrencyValue },
setup(props, { emit }) {
const $q = useQuasar()
+ const { t } = useI18n()
const show = ref(false)
const userStore = useUserStore()
const circuitStore = useCircuitStore()
@@ -33,8 +37,16 @@ export default defineComponent({
const causal = ref('')
const bothcircuits = ref([])
- const circuitloaded = ref(undefined)
+ const circuitloaded = ref(undefined)
+ const circuitdest = ref(undefined)
+ const accountloaded = ref(undefined)
+ const accountdest = ref(undefined)
+ const remainingCoins = ref(0)
+ const priceLabel = computed(() => circuitloaded.value ? `${qty.value} ` + circuitloaded.value.symbol : '')
+ const arrayMarkerLabel = ref([])
+
+ const qtyRef = ref(null)
watch(() => circuitsel.value, (newval, oldval) => {
aggiorna()
@@ -47,7 +59,28 @@ export default defineComponent({
function aggiorna() {
circuitloaded.value = circuitStore.listcircuits.find((rec: ICircuit) => rec.name === circuitsel.value)
+ if (circuitloaded.value) {
+ accountloaded.value = userStore.getAccountByCircuitId(circuitloaded.value._id)
+ // accountdest.value = userStore.getAccountByCircuitId(circuitloaded.value._id)
+ if (accountloaded.value) {
+ remainingCoins.value = tools.getRemainingCoinsToSend(accountloaded.value)
+ const quanti = [ ...Array(100).keys() ].map( i => i+1)
+ for (const ind of quanti) {
+ let value = ind * 10
+ if (value > remainingCoins.value) {
+ break
+ } else {
+ const label = value.toString()
+ arrayMarkerLabel.value.push({value, label})
+ }
+ }
+ }
+
+ }
+
+
console.log('circuitStore.listcircuits', circuitStore.listcircuits, 'aggiorna', circuitloaded.value)
+ console.log('userStore.my.profile.mycircuits', userStore.my.profile.mycircuits)
}
function mounted() {
@@ -95,16 +128,23 @@ export default defineComponent({
onMounted(mounted)
return {
+ t,
tools,
show,
bothcircuits,
from_username,
circuitsel,
circuitloaded,
+ accountloaded,
+ accountdest,
qty,
hide,
sendCoin,
causal,
+ priceLabel,
+ arrayMarkerLabel,
+ remainingCoins,
+ qtyRef,
}
},
})
diff --git a/src/components/CSendCoins/CSendCoins.vue b/src/components/CSendCoins/CSendCoins.vue
index f6ff9b71..10c1f6c0 100755
--- a/src/components/CSendCoins/CSendCoins.vue
+++ b/src/components/CSendCoins/CSendCoins.vue
@@ -13,6 +13,15 @@
+
+
+
+
@@ -21,21 +30,39 @@
-
+
+
-
-
-
+
+ {{ circuitloaded.symbol }}
+
+
diff --git a/src/components/MyFooter/MyFooter.scss b/src/components/MyFooter/MyFooter.scss
index cf620a6c..4cbb6682 100755
--- a/src/components/MyFooter/MyFooter.scss
+++ b/src/components/MyFooter/MyFooter.scss
@@ -1,3 +1,8 @@
.q-tab__label {
font-size: 0.7rem !important;
}
+
+.q-tab {
+ padding-left: 2px;
+ padding-right: 2px;
+}
diff --git a/src/components/MyFooter/MyFooter.vue b/src/components/MyFooter/MyFooter.vue
index b417a3bf..bcf87899 100755
--- a/src/components/MyFooter/MyFooter.vue
+++ b/src/components/MyFooter/MyFooter.vue
@@ -6,7 +6,9 @@
>
+