Circuits...

Circuits Fido e Max Qta
Fixed error eslint: 7.0.0 is OK
This commit is contained in:
Paolo Arena
2022-09-11 11:45:13 +02:00
parent 0332059c8f
commit d28050e71f
35 changed files with 1862 additions and 1435 deletions

View File

@@ -15,7 +15,7 @@
<div class="q-ma-sm">
<q-btn v-if="!small" :flat="flat" class="mybox" :color="color" rounded push :to="to" v-bind="$attrs" :style="tools.getbackgroundGradient(color, 0)">
<q-icon class="q-ma-sm" size="3rem" :name="icon"/>
<div class="q-ma-sm text-h5 text-cls no-wrap"><span v-html="label"></span></div>
<div class="q-ma-sm text-h5-diff text-cls no-wrap"><span v-html="label"></span></div>
</q-btn>
<q-btn v-if="small" :flat="flat" class="mybox_small" :color="color" rounded push :to="to" v-bind="$attrs" :style="tools.getbackgroundGradient(color, 0)">
<q-icon class="q-ma-sm" :name="icon" size="sm"/>

View File

@@ -202,6 +202,11 @@ export default defineComponent({
required: false,
default: true
},
showHeaderCol: {
type: Boolean,
required: false,
default: false
},
choose_visutype: {
type: Boolean,
required: false,
@@ -1856,9 +1861,12 @@ export default defineComponent({
action = lists.MenuAction.CAN_EDIT_TABLE
}
if (action > 0) {
const col = props.prop_mycolumns.find((rec: any) => rec.action === action)
if (col) {
console.log('col action', col)
const myarr = serverData.value.find((rec: any) => rec._id === id)
if (myarr)
clickFunz(myarr, col)
@@ -1988,6 +1996,7 @@ export default defineComponent({
onLoadScroll,
numRecLoaded,
myinfscroll,
t,
}
}
})

View File

@@ -209,7 +209,20 @@
>
<div v-for="(row, index) in serverData" :key="index" class="caption">
<div v-if="showHeaderCol">
<div
v-for="col in mycolumns" :key="col.name"
class="text-italic text-weight-bold"
>
<span v-if="col && showColCheck(col, tools.TIPOVIS_SHOW_RECORD, true)">
{{ col.label }}
</span>
</div>
</div>
<div v-for="(row, index) in serverData" :key="index">
<div
v-if="showType === costanti.SHOW_MYCARD || (myvertical !== costanti.VISUTABLE_USER_TABGROUP &&
myvertical !== costanti.VISUTABLE_USER_TABCIRCUIT && myvertical === costanti.VISUTABLE_LISTA && shared_consts.TABLES_VISU_CMYSRECCARD.includes(tablesel)) ">
@@ -277,6 +290,47 @@
/>
</div>
</div>
<div
v-else-if="((showType === costanti.SHOW_MOVEMENTS) && (tablesel === 'movements'))"
>
<div class="q-pa-xs row items-start q-gutter-xs">
<q-card class="my-card text-white"
:style="`background: radial-gradient(circle, #cccccc 0%, ` + ((tools.isEntrataByRecMov(row)) ? `#aaffaa` : `#ffaaaa`) + ` 100%)`">
<q-toolbar class="bg-primary text-white" style="min-height: 30px;">
<q-toolbar-title>
{{ tools.isEntrataByRecMov(row) ? t('movement.movin') : t('movement.movout') }}
</q-toolbar-title>
</q-toolbar>
<q-card-section>
<div
v-for="col in mycolumns" :key="col.name">
<div
v-if="showColCheck(col, tools.TIPOVIS_SHOW_RECORD, true, 1, row)" class="tdclass">
<div :class="getclrow(row)">
<CMyPopupEdit
:table="mytable"
:canEdit="false"
:canModify="false"
:disable="false"
:mycol="col"
:row="row"
:field="col.field"
:visulabel="true"
:subfield="col.subfield"
minuteinterval="1"
@save="SaveValue"
@show="selItem(row, col)"
@showandsave="showandsel">
</CMyPopupEdit>
</div>
</div>
</div>
</q-card-section>
</q-card>
</div>
</div>
</div>
<template v-slot:loading>

View File

@@ -1,5 +1,5 @@
<template>
<div>
<div class="q-gutter-y-xs column" style="min-width: 100px">
<q-field
:label="label"
stack-label

View File

@@ -21,10 +21,10 @@
<div class="text-center">
<q-img
v-if="userStore.getImgByCircuit(myrec)"
:src="userStore.getImgByCircuit(myrec)"
v-if="tools.getValue(myrec, 'photos', '')"
:src="tools.getFullFileName(tools.getValue(myrec, 'photos', ''), table, myrec.username, myrec.path)"
class="img"
alt="immagine del Circuito"></q-img>
alt="immagine del circuito"></q-img>
</div>
<!--:title="t(mycol.label_trans)"-->
@@ -38,6 +38,11 @@
</div>
</div>
<div v-else-if="mycol.name === 'descr'">
<div class="text-bacheca">
{{ tools.getValue(myrec, mycol.field, mycol.subfield) }}
</div>
</div>
<div v-else-if="mycol.name === 'path'">
</div>
@@ -54,7 +59,7 @@
{{ tools.getValue(myrec, mycol.field, mycol.subfield) }}
</div>
</div>
<div v-else-if="mycol.name === 'img_logo' && myrec.img_logo">
<div v-else-if="mycol.name === 'photos' && myrec.photos.length <= 1">
</div>
<div v-else-if="mycol.name === 'admins'">
<CMyFieldRec

View File

@@ -38,7 +38,7 @@
</div>
</div>
<div v-else-if="mycol.name === 'descr'">
<div v-else-if="mycol.name === 'name'">
<div class="text-bacheca">
{{ tools.getValue(myrec, mycol.field, mycol.subfield) }}
</div>

View File

@@ -685,6 +685,9 @@ export default defineComponent({
} else if (props.table === 'mygroups') {
if (myrow.value.hasOwnProperty('groupname'))
ris = 'mygroups/' + myrow.value['groupname']
} else if (props.table === 'circuits') {
if (myrow.value.hasOwnProperty('path'))
ris = 'circuits/' + myrow.value['path']
} else if (!!myrow.value && !!myrow.value.directory) {
ris = myrow.value.directory
} else {

View File

@@ -85,7 +85,8 @@
@keyup.enter.stop
@update:model-value="changevalRec"
autofocus
:label="col.label">
:label="col.visulabel ? t(col.label_trans) : (col.label)"
>
</q-input>
</div>
<div v-else-if="col.tipovisu === costanti.TipoVisu.TESTO_BORDATO" :class="{ flex: !isInModif}">
@@ -118,10 +119,11 @@
<div v-if="canEdit || isInModif">
<q-input
v-bind="$attrs"
debounce="1000"
v-model="myvalue"
:maxlength="col.maxlength ? col.maxlength : undefined"
@update:model-value="Savedb"
:label="visulabel ? t(col.label_trans) : ''"
:label="col.visulabel ? t(col.label_trans) : (visulabel ? t(col.label_trans) : '')"
type="number"
autofocus>
@@ -615,6 +617,7 @@
:maxlength="col.maxlength ? col.maxlength : undefined"
:minlength="col.minlength ? col.minlength : undefined"
v-model="scope.value"
:label="col.visulabel ? t(col.label_trans) :''"
:autogrow="col.fieldtype !== costanti.FieldType.crypted"
@keyup.enter.stop
autofocus>
@@ -625,9 +628,11 @@
<div v-if="visulabel">
<q-input
v-model="scope.value" type="number"
debounce="1000"
:maxlength="col.maxlength ? col.maxlength : undefined"
autofocus
:label="visulabel ? col.label : ''">
:label="col.visulabel ? t(col.label_trans) : (visulabel ? col.label : '')"
>
</q-input>
</div>

View File

@@ -4,7 +4,7 @@
<q-item v-if="myrec" clickable v-ripple class="shadow-2 q-btn--rounded bg-teal-1">
<q-item-section v-if="myrec.img_logo" avatar
<q-item-section v-if="myrec.photo" avatar
@click="cmdExt(costanti.CMD_SHOW_PAGE, myrec)">
<q-avatar size="60px">
<q-img :src="userStore.getImgByCircuit(myrec)" :alt="myrec.descr"

View File

@@ -37,7 +37,7 @@ export default defineComponent({
watch(() => circuitsel.value, (newval, oldval) => {
circuitloaded.value = circuitStore.listcircuits.find((rec: ICircuit) => rec.name === newval)
aggiorna()
})
watch(() => props.showprop, (newval, oldval) => {
@@ -45,6 +45,11 @@ export default defineComponent({
show.value = newval
})
function aggiorna() {
circuitloaded.value = circuitStore.listcircuits.find((rec: ICircuit) => rec.name === circuitsel.value)
console.log('circuitStore.listcircuits', circuitStore.listcircuits, 'aggiorna', circuitloaded.value)
}
function mounted() {
@@ -56,7 +61,7 @@ export default defineComponent({
circuitsel.value = bothcircuits.value[0]
}
circuitloaded.value = circuitStore.listcircuits.find((rec: ICircuit) => rec.name === circuitsel.value)
aggiorna()
show.value = true
}
@@ -78,7 +83,11 @@ export default defineComponent({
}
console.log('myrecsendcoin', myrecsendcoin)
if (circuitloaded.value) {
tools.sendCoinsByCircuit($q, circuitloaded.value, myrecsendcoin)
tools.sendCoinsByCircuit($q, circuitloaded.value, myrecsendcoin).then((ris: any) => {
if (ris) {
show.value = false
}
})
}
}
}

View File

@@ -17,9 +17,10 @@
</q-input>
<q-input v-model="to_user.username" label="Destinatario" class="full-width" disable>
</q-input>
<q-input v-model="causal" label="Causale" class="full-width">
<q-input v-model="causal" label="Note" class="full-width">
</q-input>
<q-input outlined v-model="qty" type="number"
label="Quantità"
@@ -31,6 +32,7 @@
</template>
</q-input>
</q-card-section>
<q-card-actions align="center">
<q-btn

View File

@@ -61,6 +61,8 @@ export default defineComponent({
const testStore = useTestStore()
const stateconn = ref(globalStore.stateConnection)
const rightCartOpen = ref(globalStore.rightCartOpen)
const rightNotifOpen = ref(globalStore.rightNotifOpen)
const {
getUsernameChatByMsg,
@@ -171,15 +173,15 @@ export default defineComponent({
set: val => {
globalStore.rightDrawerOpen = val
if (globalStore.rightDrawerOpen) globalStore.rightCartOpen = false
if (globalStore.rightDrawerOpen) globalStore.rightNotifOpen = false
},
})
const rightCartOpen = computed({
get: () => globalStore.rightCartOpen,
set: val => {
globalStore.rightCartOpen = val
if (globalStore.rightCartOpen) globalStore.rightDrawerOpen = false
},
watch(() => rightNotifOpen, (newval, oldval) => {
if (newval) {
globalStore.rightDrawerOpen = false
globalStore.rightCartOpen = false
}
})
const lang = computed({
@@ -426,6 +428,7 @@ export default defineComponent({
leftDrawerOpen,
rightDrawerOpen,
rightCartOpen,
rightNotifOpen,
lang,
langshort,
getnumOrdersCart,

View File

@@ -92,7 +92,8 @@
<message-popover></message-popover>
</div>
<div v-if="static_data.functionality.SHOW_NOTIF">
<notif-popover></notif-popover>
<notifPopover
v-model="rightNotifOpen"></notifPopover>
</div>
<!--
@@ -161,7 +162,10 @@
</q-drawer>
<!-- USER BAR -->
<q-drawer v-if="static_data.functionality.ENABLE_ECOMMERCE" v-model="rightCartOpen" side="right" elevated>
<q-drawer v-if="static_data.functionality.ENABLE_ECOMMERCE"
v-model="rightCartOpen"
side="right" elevated>
<q-btn
class="absolute-top-right" style="margin-right: 10px; color: white;"
dense flat round icon="close" @click="rightCartOpen = !rightCartOpen">
@@ -171,7 +175,8 @@
<CMyCart></CMyCart>
</q-drawer>
<!-- USER BAR -->
<q-drawer v-if="static_data.functionality.SHOW_USER_MENU" v-model="rightDrawerOpen" side="right" elevated>
<q-drawer v-if="static_data.functionality.SHOW_USER_MENU"
v-model="rightDrawerOpen" side="right" elevated>
<div id="profile">
<q-img
class="absolute-top" src="images/landing_first_section.png"