ver 0.5.71:
- Info Conto - Admin: poter modificare Fido e QtaMax.
This commit is contained in:
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'
|
||||
Reference in New Issue
Block a user