Version 0.2.7

This commit is contained in:
paoloar77
2022-02-21 18:14:38 +01:00
parent 6c3973b5ad
commit 36f53334ed
26 changed files with 313 additions and 118 deletions

View File

@@ -360,7 +360,7 @@ export default defineComponent({
useinput: false,
},
{
label: 'Spedizione',
label: 'Consegna',
table: 'shippings',
key: 'idShipping',
value: tools.getCookie(tools.COOK_SEARCH + 'shippings', costanti.FILTER_TUTTI),

View File

@@ -12,6 +12,7 @@
<div class="row shadow justify-center" style="border-radius: 4px;border: 1px solid rgba(0, 0, 0, 0.12);">
<CBigBtn
v-for="(card, ind) of cardssmall" :key="ind"
glossy
:label="card.title" :to="card.to" :icon="card.icon" :color="card.color" :text-color="!!card.textcolor ? card.textcolor : ''"
:small="card.small"
:numcol="3"

View File

@@ -32,3 +32,15 @@
padding: 10px;
}
.img {
margin-left: auto;
margin-right: auto;
max-height: 350px;
max-width: 350px;
@media (max-width: 500px) {
max-height: 400px;
max-width: 400px;
}
}

View File

@@ -13,7 +13,7 @@ import { useI18n } from '@/boot/i18n'
import { toolsext } from '@store/Modules/toolsext'
import { useQuasar } from 'quasar'
import { costanti } from '@costanti'
import { IColGridTable, IMyBacheca, IUserFields } from 'model'
import { IColGridTable, IImgGallery, IUserFields } from 'model'
import { shared_consts } from '@/common/shared_vuejs'
import { colCitys, fieldsTable } from '@store/Modules/fieldsTable'
@@ -45,7 +45,7 @@ export default defineComponent({
const showPic = ref(false)
const mybacheca = ref(<IMyBacheca>{})
const myrec = ref({})
const col = ref(<IColGridTable>{})
function profile() {
@@ -56,11 +56,11 @@ export default defineComponent({
// Carica il profilo di quest'utente
if (props.idRec > 0) {
userStore.loadGeneric(props.table, props.idRec).then((ris) => {
mybacheca.value = ris
myrec.value = ris
})
} else {
mybacheca.value = props.prop_myrec
myrec.value = props.prop_myrec
}
col.value = fieldsTable.getArrColsByTable(props.table)
@@ -74,13 +74,21 @@ export default defineComponent({
load()
}
function getFullFileName(arrimage: IImgGallery[], username: string){
if (arrimage && arrimage.length > 0) {
return 'upload/profile/' + username + '/' + props.table + '/' + arrimage[0].imagefile
} else {
return ''
}
}
onMounted(mounted)
return {
profile,
tools,
costanti,
mybacheca,
myrec,
shared_consts,
globalStore,
showPic,
@@ -90,6 +98,7 @@ export default defineComponent({
colCitys,
toolsext,
col,
getFullFileName,
}
}
})

View File

@@ -1,5 +1,5 @@
<template>
<q-card class="dialog_card" v-if="mybacheca">
<q-card class="dialog_card q-mb-lg" v-if="myrec">
<q-footer
class="bg-white small-screen-only text-center"
bordered
@@ -8,17 +8,24 @@
</q-footer>
<q-bar dense class="bg-primary text-white">
{{ mybacheca.username }}
{{ myrec.username }}
<q-space/>
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
</q-bar>
<q-card-section class="inset-shadow">
<!-- Per ora visualizzo solo la Prima Immagine -->
<div class="text-center">
<q-img
v-if="tools.getValue(myrec, 'photos', '')"
:src="getFullFileName(tools.getValue(myrec, 'photos', ''), myrec.username)" class="img" alt="immagine bene"></q-img>
</div>
<div class="text-center">
<q-chip :icon="fieldsTable.getIconByAdType(mybacheca.adType)"
:color="fieldsTable.getColByAdType(mybacheca.adType)"
<q-chip :icon="fieldsTable.getIconByAdType(myrec.adType)"
:color="fieldsTable.getColByAdType(myrec.adType)"
text-color="white">{{
fieldsTable.getValByTabAndId(table, 'adType', mybacheca.adType)
fieldsTable.getValByTabAndId(table, 'adType', myrec.adType)
}}
</q-chip>
</div>
@@ -27,23 +34,23 @@
<div v-for="(mycol, index) of col" :key="index">
<div
v-if="(mycol.visible && (tools.checkIfShowField(mycol, tools.TIPOVIS_SHOW_RECORD, false, tools.getValue(mybacheca, mycol.field, mycol.subfield))))">
v-if="(mycol.visible && (tools.checkIfShowField(mycol, tools.TIPOVIS_SHOW_RECORD, false, tools.getValue(myrec, mycol.field, mycol.subfield))))">
<div v-if="mycol.fieldtype === costanti.FieldType.html">
<div class="note-bacheca"
v-html="tools.getValue(mybacheca, mycol.field, mycol.subfield)">
v-html="tools.getValue(myrec, mycol.field, mycol.subfield)">
</div>
</div>
<div v-else-if="mycol.name === 'descr'">
<div class="text-bacheca">
{{ tools.getValue(mybacheca, mycol.field, mycol.subfield) }}
{{ tools.getValue(myrec, mycol.field, mycol.subfield) }}
</div>
</div>
<CMyFieldRec
v-else
:table="table"
:id="mybacheca._id"
:rec="mybacheca"
:id="myrec._id"
:rec="myrec"
:field="mycol.field"
:canEdit="false"
:canModify="false">
@@ -51,7 +58,7 @@
</div>
</div>
<br><br>
</q-card-section>
</q-card>

View File

@@ -43,6 +43,11 @@ export default defineComponent({
required: false,
default: ''
},
labelifblank: {
type: String,
required: false,
default: ''
},
rec: {
type: Object,
required: false,
@@ -188,6 +193,11 @@ export default defineComponent({
color: tools.getColorByIndexBest(0)
}
if (!mydata.label && props.labelifblank) {
mydata.label = props.labelifblank
mydata.color = 'grey'
}
myarrvalues.value.push(mydata)
}
}

View File

@@ -81,6 +81,11 @@ export default defineComponent({
required: false,
default: ''
},
sameclassasfielddb: {
tupe: Boolean,
required: false,
default: false,
}
},
components: { CMyPopupEdit },
setup(props, { emit }) {
@@ -165,6 +170,12 @@ export default defineComponent({
return myvalue
}
function getclass() {
if (props.sameclassasfielddb) {
return 'q-ma-sm q-pa-sm col-grow popupedit'
}
}
function visuElem() {
if (col.value) {
return !!col.value.name && (props.canEdit || (!props.canEdit && getValue()))
@@ -193,6 +204,7 @@ export default defineComponent({
mysubkey,
mysubsubkey,
visuElem,
getclass,
}
},
})

View File

@@ -20,7 +20,7 @@
</q-field>
</div>
<div :class="` col-grow clpopupVisuCard `" :style="withBorder() ? `` : ``">
<div :class="` col-grow clpopupVisuCard ` + getclass()" :style="withBorder() ? `` : ``">
<CMyPopupEdit
v-bind="$attrs"
:isrec="true"

View File

@@ -1,6 +1,5 @@
<template>
<div :class="getclassCol(col)">
<div
v-if="tools.checkIfShowField(col, insertMode ? tools.TIPOVIS_NEW_RECORD : (isInModif ? tools.TIPOVIS_EDIT_RECORD : tools.TIPOVIS_SHOW_RECORD), visulabel, myvalue)"
style="flex-grow: 1;">
@@ -38,6 +37,7 @@
<q-input
v-bind="$attrs"
v-model="myvalue"
:maxlength="col.maxlength ? col.maxlength : undefined"
:style="$q.screen.lt.sm ? 'min-width: 300px' : ''"
:disable="disable"
:readonly="disable"
@@ -124,6 +124,7 @@
<q-input
v-bind="$attrs"
v-model="myvalue"
:maxlength="col.maxlength ? col.maxlength : undefined"
@update:model-value="Savedb"
:label="visulabel ? col.label : ''"
type="number"
@@ -152,6 +153,7 @@
<div v-else>
<q-input
v-model="myvalue" type="number"
:maxlength="col.maxlength ? col.maxlength : undefined"
@update:value="changevalRec"
autofocus>
@@ -410,6 +412,7 @@
</CMySelect>
</div>
<div v-else>
<!--
rec: {{rec}}
row: {{row}}
@@ -425,6 +428,7 @@
:type_out="col.field_outtype"
@update:value="changevalRec"
v-model:value="myvalue"
:labelifblank="canEdit ? 'Selezionare' : '' "
:filter_table="col.filter_table"
:filter_field="col.filter_field"
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
@@ -564,6 +568,7 @@
<q-input
v-model="myvalue"
@update:model-value="changevalRec"
:maxlength="col.maxlength ? col.maxlength : undefined"
type="password"
@keyup.enter="scope.set"
autofocus>
@@ -612,6 +617,7 @@
<div v-if="visulabel">
<q-input
v-model="scope.value" type="number"
:maxlength="col.maxlength ? col.maxlength : undefined"
autofocus
:label="visulabel ? col.label : ''">
@@ -625,6 +631,7 @@
<div v-if="visulabel">
<q-input
v-model="myvalue" type="number"
:maxlength="col.maxlength ? col.maxlength : undefined"
autofocus
@update:model-value="changevalRec"
style="max-width: 100px;"
@@ -649,6 +656,7 @@
<div v-else>
<q-input
v-model="scope.value" type="number"
:maxlength="col.maxlength ? col.maxlength : undefined"
autofocus>
</q-input>
@@ -823,6 +831,7 @@
<div v-else-if="col.fieldtype === costanti.FieldType.password">
<q-input
v-model="scope.value"
:maxlength="col.maxlength ? col.maxlength : undefined"
type="password"
@keyup.enter="scope.set"
autofocus>

View File

@@ -68,9 +68,9 @@ export default defineComponent({
default: ''
},
filter_extra: {
type: String,
type: [Object, String],
required: false,
default: ''
default: null
},
value_extra: {
type: [String, Number],
@@ -466,10 +466,25 @@ export default defineComponent({
if (fieldsTable.tableRemotePickup.includes(props.tablesel)) {
try {
myarr = optionsreal.value
// myarr = optionsreal.value
myarr = []
if (mystr !== '' || props.filter_extra)
// myarr = [{_id:1, prov: 'RN', descr: 'Rimini'}]
myarr = await globalStore.loadPickup({ table: props.tablesel, search: mystr.trim(), filter: props.filter_extra })
/*
if (val === '1') {
myarr.push({ _id: 1, comune: 'PROVA 1', prov: 'AL' })
myarr.push({ _id: 2, comune: 'PROVA 1b', prov: 'AL' })
}else if (val === '2') {
myarr.push({ _id: 1, comune: 'PROVA 2', prov: 'AL' })
myarr.push({ _id: 2, comune: 'PROVA 2B', prov: 'AL' })
}*/
{ // @ts-ignore
myarr = await globalStore.loadPickup({ table: props.tablesel, search: mystr.trim(), filter: props.filter_extra })
}
if (myarr === null) {
console.log('@@@ VALORI VALUE XXX', valori.value)

View File

@@ -34,7 +34,7 @@
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
No results
Digita il testo da cercare
</q-item-section>
</q-item>
</template>
@@ -100,7 +100,7 @@
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
No results
Digita il testo da cercare
</q-item-section>
</q-item>
</template>

View File

@@ -1,12 +1,14 @@
<template>
<div class="q-ma-md">
<q-banner inline-actions rounded class="bg-orange text-white">
<template v-slot:avatar>
<q-icon name="info" color="primary" />
</template>
<strong>La verifica è in corso. Ti arriverà un messaggio sul Bot Telegram quando verrai abilitato dal tuo invitante.</strong>
<div v-if="tools.isTelegOk()">
<q-banner inline-actions rounded class="bg-orange text-black">
<template v-slot:avatar>
<q-icon name="info" color="primary"/>
</template>
<strong>A breve sarai abilitato, altrimenti avvisa il tuo invitante che ti sei Registrato.<br>Ti arriverà un messaggio su Telegram quando verrai abilitato dal tuo invitante.</strong>
</q-banner>
</q-banner>
</div>
</div>
</template>