ver 1.1.20:

- corretto campo foto che non compariva più.
 - sistemato i campi aggiuntivi e i richiesti.
- migliorato la barra in alto di selezione.
- aggiunto alcune icone.
This commit is contained in:
Surya Paolo
2025-02-03 17:18:33 +01:00
parent 997fd136ea
commit 979f90f980
84 changed files with 1257 additions and 357 deletions

View File

@@ -123,6 +123,17 @@ export default defineComponent({
}
return ''
})
const colorsel = computed(() => {
const myarr: any = tools.getoptionsMainCards(false)
if (myarr) {
const rec = myarr.find((rec: any) => rec.value === tablesel.value)
if (rec) {
return rec.color
}
}
return ''
})
const myfilter = ref('')
const myfilterand: any = ref([])
let rowsel: any = {}
@@ -362,6 +373,7 @@ export default defineComponent({
iconsel,
filtri,
clickButtBar,
colorsel,
}
}
})

View File

@@ -25,20 +25,22 @@
/>
</q-avatar>
</div>
<div class="col-fixed" style="width: 200px">
<div class="col-fixed " style="width: 200px;">
<q-select
dense
v-model="tablesel"
:options="optionsMainCards"
emit-value
borderless
class="text-blue"
rounded
dense
filled
class="text-blue q-ml-sm"
bg-color="light-blue-2"
map-options
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
@update:model-value="gotoPageSel"
>
<template v-slot:prepend>
<q-icon :name="iconsel" />
<q-icon :name="iconsel" :color="colorsel" />
</template>
<template v-slot:option="scope">
<q-item v-bind="scope.itemProps">

View File

View File

@@ -0,0 +1,199 @@
import {
computed,
provide, defineComponent, onBeforeMount, onBeforeUnmount, onMounted, ref, toRef, toRefs, watch,
} from 'vue'
import { tools } from '@store/Modules/tools'
import { CMyFieldDb } from '@/components/CMyFieldDb'
import { costanti } from '@costanti'
import { useGlobalStore } from '@store/globalStore'
import { useUserStore } from '@store/UserStore'
import { CTitlePage } from '@/components/CTitlePage'
import { CGridTableRec } from '@/components/CGridTableRec'
import { IColGridTable, IMyBacheca, IMySkill, ISearchList, ISkill } from 'model'
import { shared_consts } from '@/common/shared_vuejs'
import { useI18n } from '@/boot/i18n'
import { toolsext } from '@store/Modules/toolsext'
import { fieldsTable } from '@store/Modules/fieldsTable'
import { useQuasar } from 'quasar'
export default defineComponent({
name: 'CCatalogList',
emits: ['clickButtBar'],
props: {
ind: {
type: Number,
required: false,
default: -1,
},
prop_search: {
type: Boolean,
required: false,
default: true,
},
finder: {
type: Boolean,
required: false,
default: true,
},
heightcarousel: {
type: Number,
required: false,
default: 0,
},
},
components: {
CMyFieldDb, CGridTableRec, CTitlePage,
},
setup(props, { attrs, slots, emit }) {
const { t } = useI18n()
const $q = useQuasar()
const globalStore = useGlobalStore()
const userStore = useUserStore()
const table = ref('catalogs')
const searchList_Base = ref(<ISearchList[]>[])
const arrfilterand: any = ref([])
const filtercustom: any = ref([])
const search = ref('')
const myrecfiltertoggle = ref(tools.FILTER_ALL)
const prop_colkey = ref('')
const col_title = ref('')
const col_footer = ref('')
const col_tabfooter = ref('')
const strextra = ref('')
const myoptions = ref(<any>[])
const col = ref(<IColGridTable[]>[])
const myCatRef = ref(<any>null)
/*
const idSectorServizi = computed(() => {
let myval: any = null
myval = searchList_Servizi.value.find((rec) => (rec.table === toolsext.TABSECTORS))
if (myval) {
const ris = myval.value || 0
// console.log('idSectorServizi=', ris)
return ris
} else {
return 0
}
})
*/
function updatefilter(value: any) {
//
}
watch(() => myrecfiltertoggle.value, (value: any, oldval: any) => {
updatefilter(value)
},
)
const mypagination = computed(() => {
return { sortBy: 'title', descending: false, page: 1, rowsNumber: 0, rowsPerPage: 10 }
})
const searchList = computed(() => {
return searchList_Base.value
})
const showType = computed(() => {
return costanti.SHOW_MYCARD
})
const hint = computed(() => {
return 'digita una parola da cercare'
})
const visuType = computed(() => {
return false // $q.screen.gt.xs
})
const noMsgRecord = computed(() => {
return 'Nessun dato trovato con i filtri selezionati'
})
function mounted() {
let obj = tools.getParamsByTable(table.value)
prop_colkey.value = obj.prop_colkey
col_title.value = obj.col_title
col_footer.value = obj.col_footer
col_tabfooter.value = obj.col_tabfooter
searchList_Base.value = []
filtercustom.value = []
col.value = fieldsTable.getArrColsByTable(table.value)
}
function mySortFieldsAvailable() {
if (table.value === toolsext.TABUSER) {
return userStore.getSortFieldsAvailable()
}
return []
}
function doSearch() {
//
}
function clickButtBar(item: any) {
if (myCatRef.value) {
myCatRef.value.clickButtBar(item)
}
// emit('clickButtBar', item)
}
onMounted(mounted)
return {
t,
tools,
costanti,
arrfilterand,
filtercustom,
searchList,
search,
doSearch,
myrecfiltertoggle,
prop_colkey,
col_title,
col_footer,
col_tabfooter,
col,
toolsext,
mypagination,
noMsgRecord,
showType,
visuType,
hint,
myoptions,
mySortFieldsAvailable,
clickButtBar,
myCatRef,
table,
}
},
})

View File

@@ -0,0 +1,47 @@
<template>
<div class="q-ma-xs">
<CGridTableRec
v-if="col && col.length > 0"
ref="myCatRef"
:prop_mytable="table"
:options="tools.optionsTable(table)"
:prop_mytitlenew="tools.getTitleAnnuncio(table)"
prop_mytitle="Cataloghi"
:prop_mycolumns="col"
:prop_colkey="prop_colkey"
:col_title="col_title"
:col_footer="col_footer"
:col_tabfooter="col_tabfooter"
:vertical="costanti.VISUTABLE_LISTA"
:prop_pagination="mypagination"
:showType="showType"
:hint="hint"
:nodataLabel="noMsgRecord"
:prop_search="prop_search"
:finder="finder"
labelElemFind="trovati"
:choose_visutype="visuType"
:butt_modif_new="tools.isAdmin()"
:noresultLabel="t('grid.nosearchfound')"
:arrfilters="arrfilterand"
:filtercustom="filtercustom"
:prop_searchList="searchList"
:defaultnewrec="tools.getdefaultnewrec(table)"
labelBtnAddRow="NONE"
:prop_SortFieldsAvailable="mySortFieldsAvailable"
labelBtnAddExtra="Aggiungi Catalogo"
:extraparams="tools.extraparams(table, { myrecfiltertoggle })"
:prop_showMap="false"
:heightcarousel="heightcarousel"
@clickButtBar="clickButtBar"
:opt="{rowclass: true, widthcard: '170px', heightcard: '170px'}"
>
</CGridTableRec>
</div>
</template>
<script lang="ts" src="./CCatalogList.ts">
</script>
<style lang="scss" scoped>
@import './CCatalogList.scss';
</style>

View File

@@ -0,0 +1 @@
export { default as CCatalogList } from './CCatalogList.vue'

View File

@@ -1,23 +1,23 @@
import { PropType, defineComponent, ref, watch } from 'vue'
import { Catalogo } from '@src/views/ecommerce/catalogo'
import { ICatalogo } from '@src/model'
import { IOptCatalogo } from '@src/model'
export default defineComponent({
name: 'CCatalogo',
components: { Catalogo },
emits: ['update:modelValue', 'updateCatalogo'],
props: {
// add options ICatalogo
// add options IOptCatalogo
modelValue: {
type: Object as PropType<ICatalogo>,
type: Object as PropType<IOptCatalogo>,
required: true,
},
},
setup(props, { emit }) {
// Crea una copia locale reattiva di modelValue
const localCatalogo = ref<ICatalogo>({ ...props.modelValue });
const localCatalogo = ref<IOptCatalogo>({ ...props.modelValue });
// Watcher per sincronizzare le modifiche di modelValue
watch(() => props.modelValue, (newVal) => {
@@ -31,12 +31,12 @@ export default defineComponent({
}
// Metodo per aggiornare il valore del catalogo
const updateCatalogo = (updatedCatalogo: ICatalogo) => {
const updateCatalogo = (updatedCatalogo: IOptCatalogo) => {
localCatalogo.value = updatedCatalogo; // Aggiorna la copia locale
updateCatalogoPadre()
};
function updateCatalogoEmit(updatedCatalogo: ICatalogo) {
function updateCatalogoEmit(updatedCatalogo: IOptCatalogo) {
console.log('updateCatalogoEmit')
localCatalogo.value = updatedCatalogo; // Aggiorna la copia locale
updateCatalogoPadre()

View File

@@ -17,7 +17,7 @@ import { CBarCode } from '../CBarCode'
import { func_tools, toolsext } from '@store/Modules/toolsext'
import {
IBaseOrder, ICatalogo, IGasordine, IMyScheda, IOrder, IOrderCart,
IBaseOrder, IOptCatalogo, IGasordine, IMyScheda, IOrder, IOrderCart,
IProduct, IVariazione
} from '@src/model'
import { tools } from '@store/Modules/tools'
@@ -63,7 +63,7 @@ export default defineComponent({
default: () => { }
},
modelValue: {
type: Object as PropType<ICatalogo>,
type: Object as PropType<IOptCatalogo>,
required: true,
},
scheda: {
@@ -100,7 +100,7 @@ export default defineComponent({
const apriSchedaPDF = ref(false)
// Crea una copia locale reattiva di modelValue
const optcatalogo = ref<ICatalogo>({ ...props.modelValue });
const optcatalogo = ref<IOptCatalogo>({ ...props.modelValue });
// Watcher per sincronizzare le modifiche di modelValue
watch(() => props.modelValue, (newVal) => {
@@ -113,7 +113,7 @@ export default defineComponent({
}
// Metodo per aggiornare il valore del catalogo
const updateCatalogo = (updatedCatalogo: ICatalogo) => {
const updateCatalogo = (updatedCatalogo: IOptCatalogo) => {
optcatalogo.value = updatedCatalogo; // Aggiorna la copia locale
updateCatalogoPadre()
};

View File

@@ -52,17 +52,6 @@ export default defineComponent({
return userStore.my.username
}
function getLinkUserTelegram() {
if (props.myuser) {
if (!!props.myuser.profile.username_telegram) {
return 'https://t.me/' + props.myuser.profile.username_telegram
}
} else {
return ''
}
}
function getLinkWebSite() {
if (props.myuser) {
let mysite = props.myuser.profile.website!
@@ -98,7 +87,6 @@ export default defineComponent({
userStore,
shared_consts,
showsendCoinTo,
getLinkUserTelegram,
getLinkWebSite,
myusername,
showingtooltip,

View File

@@ -1,7 +1,7 @@
<template>
<div
v-if="
((getLinkUserTelegram() || (myuser.email && tools.isEmailVerified())) &&
((tools.getLinkUserTelegramByUser(myuser) || (myuser.email && tools.isEmailVerifiedByUser(myuser))) &&
tools.isUserOk()) ||
showBtnActivities
"
@@ -39,14 +39,14 @@
</div>
<div class="q-pa-xs">
<q-btn
v-if="getLinkUserTelegram() && tools.isUserOk()"
v-if="tools.getLinkUserTelegramByUser(myuser) && tools.isUserOk()"
icon="fab fa-telegram"
color="blue"
:type="tools.isUserOk() ? 'a' : 'btn'"
size="md"
rounded
:label="$t('dialog.contact')"
:href="tools.isUserOk() ? getLinkUserTelegram() : null"
:href="tools.isUserOk() ? tools.getLinkUserTelegramByUser(myuser) : null"
@click="
!tools.isUserOk() ? (showingtooltip = !showingtooltip) : false
"
@@ -54,14 +54,14 @@
>
</q-btn>
<div
v-else-if="myuser.email && !tools.isUsernameTelegOk()"
v-else-if="myuser.email && !tools.isUsernameTelegOkByUser(myuser)"
class="row justify-center q-ma-sx"
>
<div>
<CLabel
v-bind="$attrs"
:copy="true"
:value="!tools.isUsernameTelegOk() ? myuser.email : ''"
:value="!tools.isUsernameTelegOkByUser(myuser) ? myuser.email : ''"
:label="$t('reg.email')"
/>
</div>

View File

@@ -15,7 +15,7 @@ import { shared_consts } from '@src/common/shared_vuejs'
import { useRouter } from 'vue-router'
import { costanti } from '@costanti'
import { ICatalogo, IMyScheda, IProduct } from '@src/model'
import { IOptCatalogo, IMyScheda, IProduct } from '@src/model'
export default defineComponent({
@@ -48,7 +48,7 @@ export default defineComponent({
default: () => { }
},
modelValue: {
type: Object as PropType<ICatalogo>,
type: Object as PropType<IOptCatalogo>,
required: true,
},
scheda: {
@@ -69,7 +69,7 @@ export default defineComponent({
const opendetailbool = ref(false)
// Crea una copia locale reattiva di modelValue
const optcatalogo = ref<ICatalogo>({ ...props.modelValue });
const optcatalogo = ref<IOptCatalogo>({ ...props.modelValue });
// Watcher per sincronizzare le modifiche di modelValue
watch(() => props.modelValue, (newVal) => {
@@ -82,7 +82,7 @@ export default defineComponent({
}
// Metodo per aggiornare il valore del catalogo
const updateCatalogo = (updatedCatalogo: ICatalogo) => {
const updateCatalogo = (updatedCatalogo: IOptCatalogo) => {
optcatalogo.value = updatedCatalogo; // Aggiorna la copia locale
updateCatalogoPadre()
};

View File

@@ -59,6 +59,11 @@ export default defineComponent({
required: false,
default: 'date-time',
},
addstrrequired: {
type: String,
required: false,
default: '',
},
},
components: {},
setup(props, { emit }) {

View File

@@ -259,7 +259,7 @@ export default defineComponent({
if (props.table === shared_consts.TABLES_MYGROUPS) {
myoptions.value = [
{ label: '🌎 Tutti', value: tools.FILTER_ALL },
{ label: '👤 Gruppi che Gestisci', value: tools.FILTER_MYREC },
{ label: '👤 ' + t('groups.che_gestisci'), value: tools.FILTER_MYREC },
// {label: 'Seguo', value: tools.FILTER_MYFOLLOW},
]

View File

@@ -16,7 +16,8 @@ import {
IParamDialog,
IMySkill,
ICoordLatLng,
ICoordGPS
ICoordGPS,
IOptGrid
} from 'model'
import { lists } from '@store/Modules/lists'
import { IParamsQuery } from 'model'
@@ -27,6 +28,7 @@ import { CMyUser } from '../CMyUser'
import { CMyGroups } from '../CMyGroups'
import { CMyFieldDb } from '../CMyFieldDb'
import { CMyRecCard } from '../CMyRecCard'
import { CMyRecCatalog } from '../CMyRecCatalog'
import { CMapByTable } from '../CMapByTable'
import { CMyRecGrpCard } from '../CMyRecGrpCard'
import { CMyRecCircuitCard } from '../CMyRecCircuitCard'
@@ -207,6 +209,11 @@ export default defineComponent({
required: false,
default: null,
},
opt: {
type: Object as PropType<IOptGrid>,
required: false,
default: {},
},
filterdef: {
type: Array,
required: false,
@@ -343,7 +350,7 @@ export default defineComponent({
},
components: {
CMyPopupEdit, CTitleBanner, CMyFieldDb, CMySelect, CMyFriends, CMyGroups,
CMyUser, CMyRecCard, CMyCardPopup, CMyRecGrpCard, CMyCardGrpPopup, CMyCardCircuitPopup,
CMyUser, CMyRecCard, CMyRecCatalog, CMyCardPopup, CMyRecGrpCard, CMyCardGrpPopup, CMyCardCircuitPopup,
CMyRecCircuitCard, CMyCardService, CNotifSettings, CMapByTable, CSingleMovement,
},
setup(props, { emit }) {

View File

@@ -25,10 +25,10 @@
</div>
<div
v-if="butt_modif_new || mytitle"
v-if="(butt_modif_new || mytitle)"
:class="$q.screen.lt.sm ? `` : `q-ma-xs` + ` `"
>
<q-toolbar class="bg-primary text-white">
<q-toolbar v-if="mytitle" class="bg-primary text-white">
<q-toolbar-title>{{ mytitle }}</q-toolbar-title>
</q-toolbar>
@@ -103,11 +103,12 @@
>
<q-btn
size="sm"
dense
color="positive"
rounded
:icon="
!showfilteradv ? 'fas fa-arrow-down' : 'fas fa-arrow-up'
"
:label="$t('grid.advanced_filters')"
:label="!showfilteradv ? $t('grid.advanced_filters') : $t('grid.hide_advanced_filters')"
@click="showfilteradv = !showfilteradv"
></q-btn>
</div>
@@ -266,9 +267,8 @@
<div v-if="searchList && finder" class="row items-start">
<q-btn
v-if="searchList && searchList.length > 0"
:dense="search"
class="q-mx-xs"
color="positive"
:color="!showfilter ? 'positive' : 'blue-grey-4'"
:icon="!showfilter ? 'fas fa-filter' : 'fas fa-arrow-up'"
@click="showfilter = !showfilter"
>
@@ -285,7 +285,6 @@
<q-input
v-model="search"
filled
dense
type="search"
debounce="500"
:hint="!hintinbtnsearch ? hint : ''"
@@ -513,7 +512,11 @@
<div
:style="heightcarousel ? `height: ${heightcarousel}` : ''"
:class="{ 'carousel-scroll-container': !!heightcarousel }"
:class="{
'carousel-scroll-container': !!heightcarousel,
row: opt.rowclass,
'justify-evenly': opt.rowclass,
}"
>
<div v-for="(row, indexrow) in serverData" :key="indexrow">
<div
@@ -554,6 +557,16 @@
@cmdext="cmdExt"
>
</CMyRecCircuitCard>
<CMyRecCatalog
v-else-if="tablesel === shared_consts.TABLES_CATALOG"
:table="tablesel"
:prop_myrec="row"
:opt="opt"
@cmdext="cmdExt"
:editOn="editOn"
:margin_right="margin_right"
>
</CMyRecCatalog>
<CMyRecCard
v-else
:table="tablesel"
@@ -765,11 +778,11 @@
>
<q-btn
size="sm"
dense
color="positive"
:icon="
!showfilteradv ? 'fas fa-arrow-down' : 'fas fa-arrow-up'
"
:label="$t('grid.advanced_filters')"
:label="!showfilteradv ? $t('grid.advanced_filters') : $t('grid.hide_advanced_filters')"
@click="showfilteradv = !showfilteradv"
></q-btn>
</div>
@@ -927,13 +940,12 @@
<q-input
v-model="search"
filled
dense
type="search"
debounce="500"
:hint="hint"
:error-message="noresultLabel"
:error="getNumRecFromQuery() === 0 && !startsearch"
label="Cerca"
:label="$t('grid.search')"
v-on:keyup.enter="doSearch"
>
<template v-slot:after>
@@ -1090,11 +1102,11 @@
props.row['adType']
)
}}
<q-icon
<!--<q-icon
:name="fieldsTable.getIconByAdType(props.row['adType'])"
color="white"
class="q-ml-xs"
/>
/>-->
</q-badge>
<q-space />
@@ -1409,11 +1421,14 @@
v-if="col.fieldtype === costanti.FieldType.separator"
>
<q-btn
color="primary"
color="positive"
size="md"
dense
rounded
:icon="!showfilteradv ? 'fas fa-arrow-down' : 'fas fa-arrow-up'"
:label="$t('grid.show_campi_avanzati')"
:label="showfilteradv ? $t('grid.hide_campi_avanzati') : $t('grid.show_campi_avanzati')"
:class="{ 'q-btn--active': showfilteradv }"
:aria-expanded="showfilteradv.toString()"
@click="showfilteradv = !showfilteradv"
></q-btn>
</div>
@@ -1443,6 +1458,7 @@
minuteinterval="1"
:visulabel="true"
:insertMode="true"
:dense="false"
@save="SaveValue"
@show="selItem(newRecord, col)"
@showandsave="showandsave"
@@ -1491,7 +1507,7 @@
size="md"
dense
:icon="!showfilteradv ? 'fas fa-arrow-down' : 'fas fa-arrow-up'"
:label="$t('grid.show_campi_avanzati')"
:label="!showfilteradv ? $t('grid.advanced_filters') : $t('grid.hide_advanced_filters')"
@click="showfilteradv = !showfilteradv"
></q-btn>
</div>
@@ -1515,6 +1531,7 @@
v-model:row="recModif"
:field="col.field"
:subfield="col.subfield"
:dense="false"
:value_extra="getValueExtra(col, recModif)"
minuteinterval="1"
@save="SaveValue"

View File

@@ -185,17 +185,6 @@ export default defineComponent({
return true
}
function getLinkUserTelegram() {
if (myuser.value) {
if (!!myuser.value.profile.username_telegram) {
return 'https://t.me/' + myuser.value.profile.username_telegram
}
} else {
return ''
}
}
function getLinkWebSite() {
if (myuser.value) {
let site = myuser.value.profile.website!
@@ -251,7 +240,6 @@ export default defineComponent({
shared_consts,
getImgUser,
checkifShow,
getLinkUserTelegram,
getLinkWebSite,
filtroutente,
filtro_eventi,

View File

@@ -111,7 +111,7 @@
<div v-for="(card, ind) of mycards" :key="ind" :name="card.table">
<q-card class="q-my-md">
<div v-if="card.table === 'mygroups' && tools.isUserOk()">
<div class="row text-h6 text-bold">Gruppi:</div>
<div class="row text-h6 text-bold">{{t('circuit.conticollettivi')}}:</div>
<q-list>
<span
v-for="(grp, index) in listgroupsfiltered"

View File

@@ -90,6 +90,26 @@
>
</q-item-section>
</q-item>
<q-item
v-else-if="myrec.profile && !myrec.profile.username_telegram"
clickable
v-close-popup
>
<q-item-section avatar>
<q-icon color="blue" name="email" />
</q-item-section>
<q-item-section>
<a
v-if="
myrec.email
"
:href="tools.isUserOk() ? tools.getemailto(myrec.email) : null"
target="_blank"
>{{ $t('msgs.write_email') }} -
{{ tools.getNomeUtenteByRecUser(myrec) }}</a
>
</q-item-section>
</q-item>
<q-item
v-if="!nopopup && myrec.myreact"
clickable
@@ -733,7 +753,7 @@
/></q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-if="myrec.email">
<q-item clickable v-if="myrec.email && !myrec.contact_email">
<q-item-section avatar>
<q-icon color="blue-grey-6" name="fas fa-envelope" />
</q-item-section>
@@ -998,6 +1018,24 @@
)
"
/>
<q-btn
v-else-if="
(myrec.profile && !myrec.profile.username_telegram) &&
!myrec.contact_telegram
"
class="q-mx-xxs q-my-xs"
rounded
:label="$t('msgs.write_email')"
text-color="primary"
color="white"
icon="mail"
target="_blank"
@click="
tools.openUrl(
tools.getemailto(myrec.email)
)
"
/>
<q-btn
v-if="table === shared_consts.TABLES_MYBACHECAS"
class="q-mx-xxs q-my-xs"

View File

@@ -3,7 +3,7 @@ import {
nextTick,
} from 'vue'
import { ICatalogo, IColGridTable, IElemText, IElementiScheda, IImgGallery, ILabelValue, IMyCard, IMyElem, IMyPage, IMyScheda, IOperators, ISchedaSingola } from '@src/model'
import { IOptCatalogo, IColGridTable, IElemText, IElementiScheda, IImgGallery, ILabelValue, IMyCard, IMyElem, IMyPage, IMyScheda, IOperators, ISchedaSingola } from '@src/model'
import { useGlobalStore } from '@store/globalStore'
import { CImgTitle } from '@/components/CImgTitle'
@@ -776,34 +776,6 @@ export default defineComponent({
return options;
}
function SchedeOpt() {
const arrschede: ISchedaSingola[] = globalStore.getMySchede()
let arr: any = []
arr.push({ label: '[Nessuna]', value: '' })
if (arrschede) {
arrschede.forEach((recscheda: ISchedaSingola) => {
let pagename = ''
if (recscheda.scheda) {
if (recscheda.idPageOrig) {
const page = globalStore.getPageById(recscheda.idPageOrig)
pagename = page ? page.title! : ''
}
if (pagename)
pagename = '[Pag: ' + pagename + '] '
const mylabel = pagename + (recscheda.scheda ? recscheda.scheda!.name : '')
arr.push({ label: mylabel, value: recscheda.scheda!._id })
}
});
}
return arr
}
function updateSizeWidth(value: any) {
// Gestisce l'input dell'utente per un nuovo valore
myel.value.widthimg = value; // Aggiorna widthimg con il nuovo valore
@@ -931,7 +903,7 @@ export default defineComponent({
}
const generatePDF = async (optcatalogo: ICatalogo) => {
const generatePDF = async (optcatalogo: IOptCatalogo) => {
await nextTick()
@@ -1101,7 +1073,6 @@ export default defineComponent({
addNewScheda,
dupNewScheda,
delRecScheda,
SchedeOpt,
addProdSpeciale,
idSchedaDaCopiare,
copyfromTemplate,

View File

@@ -217,7 +217,8 @@
<CMySlider
v-if="
myel.type === shared_consts.ELEMTYPE.CARD ||
myel.type === shared_consts.ELEMTYPE.GRID_ORIZ
myel.type === shared_consts.ELEMTYPE.GRID_ORIZ||
myel.type === shared_consts.ELEMTYPE.CATALOGLIST
"
label="Altezza Carosello:"
v-model="myel.heightcarousel"
@@ -1326,6 +1327,23 @@
></q-toggle>
</div>
</div>
<div v-else-if="myel.type === shared_consts.ELEMTYPE.CATALOGLIST">
<div v-if="enableEdit" class="row">
<br />
<q-toggle
v-model="myel.parambool"
color="positive"
label="Search"
@update:model-value="modifElem"
></q-toggle>
<q-toggle
v-model="myel.parambool2"
color="positive"
label="Finder"
@update:model-value="modifElem"
></q-toggle>
</div>
</div>
<div v-else-if="myel.type === shared_consts.ELEMTYPE.CALENDAR">
<div v-if="enableEdit" class="row">
<q-input
@@ -1640,7 +1658,7 @@
rounded
outlined
v-model="recscheda.scheda.linkIdTemplate"
:options="SchedeOpt()"
:options="globalStore.SchedeOpt()"
@update:model-value="modifElem"
label="Scheda collegata:"
style="width: 250px"
@@ -1658,7 +1676,7 @@
rounded
outlined
v-model="idSchedaDaCopiare"
:options="SchedeOpt()"
:options="globalStore.SchedeOpt()"
@update:model-value="modifElem"
label="Scegli Scheda"
style="width: 250px"

View File

@@ -3,13 +3,14 @@ import {
defineComponent, onMounted, PropType, ref, toRef, watch, nextTick,
} from 'vue'
import { ICatalogo, ICoordGPS, IMyCard, IMyElem, IMyPage, IOperators, ISocial } from '@src/model'
import { IOptCatalogo, ICoordGPS, IMyCard, IMyElem, IMyPage, IOperators, ISocial } from '@src/model'
import { useGlobalStore } from '@store/globalStore'
import { CImgTitle } from '../CImgTitle/index'
import { CImgPoster } from '@/components/CImgPoster'
import { CTitle } from '@/components/CTitle/index'
import { CGridOriz } from '@/components/CGridOriz/index'
import { CCatalogList } from '@/components/CCatalogList/index'
import { tools } from '@store/Modules/tools'
import { shared_consts } from '@/common/shared_vuejs'
import { LandingFooter } from '@/components/LandingFooter'
@@ -68,7 +69,7 @@ export default defineComponent({
CTitleBanner, CShareSocial, CCheckAppRunning, CRegistration,
CVisuVideoPromoAndPDF, CECommerce, CCatalogo, CAITools,
CMapComuni, CMapUsers, CMapGetCoordinates, CMapEditAddressByCoord,
CDashGroup, CMovements, CGridOriz, CQRCode,
CDashGroup, CMovements, CGridOriz, CQRCode, CCatalogList,
// , //CMapMarker,
},
emits: ['selElemClick'],
@@ -283,7 +284,7 @@ export default defineComponent({
return `col-${width}`
}
function updateCatalogoEmit(updatedCatalogo: ICatalogo) {
function updateCatalogoEmit(updatedCatalogo: IOptCatalogo) {
console.log('CMyElem: updateCatalogoEmit')
myel.value.catalogo = updatedCatalogo
}

View File

@@ -8,9 +8,10 @@
getClass() +
(!myel.active ? ` clEditNotActive` : ``)
"
@click="clickOnElem"
>
<div v-if="myel.type">
<q-btn v-if="editOn" rounded dense icon="fas fa-pencil-alt" @click="clickOnElem">
</q-btn>
<div v-if="myel.type === shared_consts.ELEMTYPE.TEXT">
<transition
appear
@@ -92,9 +93,7 @@
:key="groupIndex"
:name="groupIndex"
>
<div
class="row no-wrap justify-start items-center q-px-sm"
>
<div class="row no-wrap justify-start items-center q-px-sm">
<template v-for="(rec, cardIndex) in group" :key="cardIndex">
<div :class="cardColumnClass">
<q-card
@@ -565,6 +564,14 @@
:heightcarousel="myel.heightcarousel"
></CGridOriz>
</div>
<div v-else-if="myel.type === shared_consts.ELEMTYPE.CATALOGLIST">
<div v-if="editOn" class="elemEdit">Lista Cataloghi</div>
<CCatalogList
:prop_search="myel.parambool"
:finder="myel.parambool2"
:heightcarousel="myel.heightcarousel"
></CCatalogList>
</div>
<div v-else-if="myel.type === shared_consts.ELEMTYPE.STATUSREG">
<div v-if="editOn" class="elemEdit">CStatusReg</div>
<CStatusReg> </CStatusReg>
@@ -658,7 +665,10 @@
</div>
<div v-else-if="myel.type === shared_consts.ELEMTYPE.CATALOGO">
<div v-if="editOn" class="elemEdit">PRODOTTI CATALOGO:</div>
<CCatalogo v-model="myel.catalogo" @updateCatalogo="updateCatalogoEmit()"/>
<CCatalogo
v-model="myel.catalogo"
@updateCatalogo="updateCatalogoEmit()"
/>
</div>
<div v-else-if="myel.type === shared_consts.ELEMTYPE.MAPPA">
<div v-if="editOn" class="elemEdit">MAPPA:</div>

View File

@@ -243,6 +243,8 @@ export default defineComponent({
const loaded = ref(false)
const addstrrequired = ref('')
const col = ref(<IColGridTable>{
name: 'test',
fieldtype: 0,
@@ -318,6 +320,8 @@ export default defineComponent({
}
}
addstrrequired.value = col.value.required ? '* ' : ''
// console.log('popupedit myvalue.value: ', myvalue.value)
if (props.tablesel) {
@@ -944,6 +948,7 @@ export default defineComponent({
gotoPage,
mypath,
changeValRecCoordAddr,
addstrrequired,
}
}
})

View File

@@ -102,7 +102,7 @@
:minlength="col.minlength ? col.minlength : undefined"
v-model="myvalue"
@update:model-value="changevalRec"
:label="col.visulabel ? $t(col.label_trans) : ''"
:label="col.visulabel ? addstrrequired + $t(col.label_trans) : ''"
:autogrow="col.fieldtype !== costanti.FieldType.crypted"
@keyup.enter.stop
autofocus
@@ -230,7 +230,8 @@
@keyup.enter.stop
@update:model-value="changevalRec"
autofocus
:label="col.visulabel ? $t(col.label_trans) : col.label"
:rules="[val => (!!val || !col.required) || 'Campo richiesto']"
:label="col.visulabel ? addstrrequired + $t(col.label_trans) : col.label"
>
</q-input>
<q-field v-if="col.showLinkResult && myvalue">
@@ -321,7 +322,7 @@
:label="
col.visulabel
? $t(col.label_trans)
: visulabel
: addstrrequired + visulabel
? $t(col.label_trans)
: ''
"
@@ -356,6 +357,7 @@
:col="col"
:row="row"
:options="tools.SelectHours"
:addstrrequired="addstrrequired"
>
</CMySelect>
</div>
@@ -622,6 +624,7 @@
)
"
:useinput="false"
:addstrrequired="addstrrequired"
>
</CMySelect>
</div>
@@ -654,6 +657,7 @@
)
"
:useinput="false"
:addstrrequired="addstrrequired"
>
</CMySelect>
</div>
@@ -666,9 +670,9 @@
<CDateTime
:label="
col.label
? col.label
? addstrrequired + col.label
: col.label_trans
? $t(col.label_trans)
? addstrrequired + $t(col.label_trans)
: ''
"
:class="{ 'cursor-pointer': canEdit }"
@@ -693,7 +697,7 @@
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.onlydate">
<CDateTime
:label="col.label ? col.label : $t(col.label_trans)"
:label="col.label ? addstrrequired + col.label : addstrrequired + $t(col.label_trans)"
:class="{ 'cursor-pointer': canEdit }"
:valueDate="myvalue"
v-model:value="myvalue"
@@ -782,6 +786,8 @@
:sola_lettura="!isInModif"
:useinput="col.allowNewValue"
:newvaluefunc="addNewValue"
:addstrrequired="addstrrequired"
:dense="dense"
>
</CMySelect>
@@ -904,6 +910,8 @@
)
"
:useinput="col.allowNewValue"
:addstrrequired="addstrrequired"
:dense="dense"
>
</CMySelect>
</div>
@@ -975,6 +983,8 @@
"
:sola_lettura="!isInModif"
:useinput="isInModif"
:addstrrequired="addstrrequired"
:dense="dense"
>
</CMySelect>
</div>
@@ -1006,6 +1016,8 @@
)
"
:useinput="false"
:addstrrequired="addstrrequired"
:dense="dense"
>
</CMySelect>
</div>
@@ -1185,10 +1197,11 @@
:maxlength="col.maxlength ? col.maxlength : undefined"
:minlength="col.minlength ? col.minlength : undefined"
v-model="scope.value"
:label="col.visulabel ? $t(col.label_trans) : ''"
:label="col.visulabel ? addstrrequired + $t(col.label_trans) : ''"
:autogrow="col.fieldtype !== costanti.FieldType.crypted"
@keyup.enter.stop
autofocus
:rules="[val => (!!val || !col.required) || 'Campo richiesto']"
>
<template v-if="notAllowAtChar" v-slot:prepend>
<span class="text-h7 text-blue">@</span>
@@ -1206,8 +1219,8 @@
:label="
col.visulabel
? $t(col.label_trans)
: visulabel
? col.label
: addstrrequired + visulabel
? addstrrequired + col.label
: ''
"
>
@@ -1261,6 +1274,7 @@
@changeval="changevalRecHours"
style="max-width: 100px"
:options="tools.SelectHours"
:addstrrequired="addstrrequired"
>
</CMySelect>
</div>
@@ -1308,6 +1322,8 @@
)
"
:useinput="col.allowNewValue"
:addstrrequired="addstrrequired"
:dense="dense"
>
</CMySelect>
</div>
@@ -1345,6 +1361,8 @@
)
"
:useinput="true"
:addstrrequired="addstrrequired"
:dense="dense"
>
</CMySelect>
</div>
@@ -1379,6 +1397,8 @@
:sola_lettura="!isInModif"
:useinput="col.allowNewValue"
:newvaluefunc="addNewValue"
:addstrrequired="addstrrequired"
:dense="dense"
>
</CMySelect>
@@ -1445,6 +1465,8 @@
:optlab="fieldsTable.getLabelByTable(tablesel)"
:options="[]"
:useinput="false"
:addstrrequired="addstrrequired"
:dense="dense"
>
</CMySelect>
</div>
@@ -1464,6 +1486,7 @@
:optlab="fieldsTable.getLabelByTable(tablesel)"
:options="[]"
:useinput="false"
:addstrrequired="addstrrequired"
>
</CMySelect>
</div>
@@ -1472,9 +1495,9 @@
<CDateTime
:label="
col.label
? col.label
? addstrrequired + col.label
: col.label_trans
? $t(col.label_trans)
? addstrrequired + $t(col.label_trans)
: ''
"
:class="{ 'cursor-pointer': canEdit }"
@@ -1490,7 +1513,7 @@
</div>
<div v-else-if="col.fieldtype === costanti.FieldType.onlydate">
<CDateTime
:label="col.label ? col.label : $t(col.label_trans)"
:label="col.label ? addstrrequired + col.label : addstrrequired + $t(col.label_trans)"
:class="{ 'cursor-pointer': canEdit }"
:valueDate="myvalue"
v-model:value="myvalue"
@@ -1531,7 +1554,7 @@
:maxlength="col.maxlength ? col.maxlength : undefined"
:minlength="col.minlength ? col.minlength : undefined"
v-model="scope.value"
:label="col.visulabel ? $t(col.label_trans) : ''"
:label="col.visulabel ? addstrrequired + $t(col.label_trans) : ''"
:autogrow="col.fieldtype !== costanti.FieldType.crypted"
@keyup.enter.stop
autofocus
@@ -1561,6 +1584,7 @@
)
"
:useinput="false"
:addstrrequired="addstrrequired"
>
</CMySelect>
</div>

View File

@@ -118,11 +118,11 @@
:color="fieldsTable.getColByAdType(myrec.adType)"
>
{{ fieldsTable.getValByTabAndId(table, 'adType', myrec.adType) }}
<q-icon
<!--<q-icon
:name="fieldsTable.getIconByAdType(myrec.adType)"
color="white"
class="q-ml-xs"
/>
/>-->
</q-badge>
<q-avatar size="60px">
@@ -167,11 +167,6 @@
:color="fieldsTable.getColByAdType(myrec.adType)"
>
{{ fieldsTable.getValByTabAndId(table, 'adType', myrec.adType) }}
<q-icon
:name="fieldsTable.getIconByAdType(myrec.adType)"
color="white"
class="q-ml-xs"
/>
</q-badge>
<q-avatar size="60px" class="self-center">
<q-img
@@ -332,7 +327,7 @@
>
</q-item-label>
</q-item-section>
<q-item-section side v-if="tools.canModifyThisRec(myrec) || editOn">
<q-item-section side v-if="tools.canModifyThisRec(myrec, table) || editOn">
<q-item-label>
<q-btn rounded dense icon="fas fa-pencil-alt">
<q-menu>

View File

@@ -0,0 +1,81 @@
.cardrec {
/* Aggiungi un bordo sottile */
border: 1px solid #ddd;
/* Applica un'ombreggiatura per dare l'effetto di elevazione */
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
/* Arrotonda leggermente gli angoli */
border-radius: 8px;
/* Aggiungi un po' di spazio interno intorno ai contenuti */
padding: 8px;
/* Colore di sfondo bianco per separare dal resto del contenuto */
background-color: #eff;
margin: 4px;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
@media (min-width: 500px) {
margin: 1px;
padding: 4px;
}
}
.catalog-image {
max-width: 100%;
height: auto;
margin-bottom: 20px;
}
.imgcatalog {
border: 4px solid #ffffff;
/* Bordo bianco */
border-radius: 12px;
/* Angoli arrotondati */
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
/* Ombra per un effetto 3D */
transition: transform 0.3s ease, box-shadow 0.3s ease;
/* Transizione fluida */
object-fit: cover;
/* Mantiene l'aspetto dell'immagine senza distorsioni */
}
.imgcatalog:hover {
transform: scale(1.05);
/* Effetto di ingrandimento al passaggio del mouse */
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
/* Ombra più pronunciata al passaggio del mouse */
}
.back_img {
background-repeat: no-repeat !important;
background-size: cover;
background-position: center;
}
.flex-grow {
flex-grow: 1;
/* Usa flex-grow per occupare spazio disponibile */
}
.title-container {
background-color: rgba(0, 0, 0, 0.3);
/* Sfondo bianco con trasparenza */
padding: 4px;
/* Aggiunta di padding per creare spazio attorno al testo */
border-radius: 8px;
/* Arrotonda gli angoli dello sfondo */
}
.text-h6 {
font-family: 'Arial', sans-serif;
/* Scegli un font accattivante e comune */
font-size: 1.15rem;
/* Dimensione del font modificabile */
color: #FFF;
/* Colore del testo */
margin-top: auto;
/* Assicura che il titolo sia posizionato alla base della scheda */
}

View File

@@ -0,0 +1,143 @@
import { defineComponent, onMounted, PropType, ref, watch, computed } from 'vue'
import { useUserStore } from '@store/UserStore'
import { IImgGallery, IOptGrid, IUserFields, IUserProfile } from 'model'
import { costanti } from '@costanti'
import { shared_consts } from '@/common/shared_vuejs'
import { fieldsTable } from '@store/Modules/fieldsTable'
import { tools } from '@store/Modules/tools'
import { toolsext } from '@store/Modules/toolsext'
import { useQuasar } from 'quasar'
import { useI18n } from '@/boot/i18n'
import { CMyCardPopup } from '@/components/CMyCardPopup'
import { useRouter } from 'vue-router'
import { useCalendarStore } from '@src/store/CalendarStore'
import { useGlobalStore } from '@src/store/globalStore'
export default defineComponent({
name: 'CMyRecCatalog',
components: { CMyCardPopup },
emits: ['setCmd', 'cmdext'],
props: {
table: {
type: String,
required: true,
},
prop_myrec: {
type: Object as PropType<any>,
required: false,
default: null,
},
editOn: {
type: Boolean,
required: false,
default: false,
},
margin_right: {
type: Number,
required: false,
default: 0,
},
opt: {
type: Object as PropType<IOptGrid>,
required: false,
default: {},
},
},
setup(props, { emit }) {
const userStore = useUserStore()
const calendarStore = useCalendarStore()
const globalStore = useGlobalStore()
const $q = useQuasar()
const { t } = useI18n()
const $router = useRouter()
const myrec = ref(<any>null)
const visupage = ref(false)
const disabilita = computed(() => {
return props.table === shared_consts.TABLES_MYBACHECAS
})
watch(() => props.prop_myrec, (newval, oldval) => {
mounted()
})
function mounted() {
if (props.prop_myrec) {
myrec.value = props.prop_myrec
}
}
function showBadge() {
if (shared_consts.TABLES_SHOW_ADTYPE.includes(props.table)) {
return true
}
return false
}
function getImgUser(profile: IUserFields) {
return userStore.getImgByProfile(profile)
}
function naviga(path: string) {
$router.push(path)
}
function setCmd($q: any, cmd: number, myusername: string, value: any, groupname: string) {
emit('setCmd', $q, cmd, myusername, value, groupname)
}
function cmdExt(cmd: any, val1: any, val2: any) {
emit('cmdext', cmd, val1, val2)
}
function navigaExt(obj: any) {
cmdExt(costanti.CMD_SHOW_PAGE, null, obj)
//let link = shared_consts.getDirectoryByTable(props.table) + '/' + obj._id
//console.log('link', link)
//$router.push(link)
}
function getNameToShow(user: IUserFields, col = null) {
if (myrec.value.groupname)
return myrec.value.groupname
else
return userStore.getNameToShow(user, col)
}
function computedWidth() {
const width = tools.getwidth($q) - 20;
return `${Math.min(width, 600)}px`; // Limita la larghezza massima a 600px
}
onMounted(mounted)
return {
t,
myrec,
costanti,
getImgUser,
naviga,
navigaExt,
setCmd,
shared_consts,
userStore,
tools,
toolsext,
fieldsTable,
cmdExt,
visupage,
showBadge,
getNameToShow,
calendarStore,
disabilita,
globalStore,
computedWidth,
}
},
})

View File

@@ -0,0 +1,80 @@
<template>
<div
v-if="myrec"
class="q-py-xs centermydiv cardrec back_img column justify-between"
:style="{
width: opt.widthcard,
height: opt.heightcard,
backgroundImage:
`url(` +
tools.getFullFileName(
[myrec.foto_collana],
table,
myrec.username,
myrec._id
) +
`)`,
}"
>
<div class="flex-grow" />
<!-- Questo elemento occupa spazio per separare l'immagine dal titolo -->
<div class="title-container">
<div class="text-h6 text-center">
{{ myrec.title }}
</div>
</div>
<q-item>
<q-item-section side v-if="tools.canModifyThisRec(myrec, table) || editOn">
<q-item-label>
<q-btn rounded dense icon="fas fa-pencil-alt">
<q-menu>
<q-list style="min-width: 150px">
<q-item
clickable
v-close-popup
@click="cmdExt(costanti.CMD_MODIFY, myrec._id, null)"
>
<q-item-section side>
<q-icon name="fas fa-pencil-alt" />
</q-item-section>
<q-item-section>{{ $t('reg.edit') }}</q-item-section>
</q-item>
</q-list>
<q-list style="min-width: 150px">
<q-item
clickable
v-close-popup
@click="cmdExt(costanti.CMD_CLONE, myrec._id, null)"
>
<q-item-section side>
<q-icon name="fas fa-copy" />
</q-item-section>
<q-item-section>{{ $t('event.duplicate') }}</q-item-section>
</q-item>
</q-list>
<q-list style="min-width: 150px">
<q-item
clickable
v-close-popup
@click="cmdExt(costanti.CMD_DELETE, myrec._id, null)"
>
<q-item-section side>
<q-icon name="fas fa-trash-alt" />
</q-item-section>
<q-item-section>{{ $t('reg.elimina') }}</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
</q-item-label>
</q-item-section>
</q-item>
</div>
</template>
<script lang="ts" src="./CMyRecCatalog.ts">
</script>
<style lang="scss" scoped>
@import './CMyRecCatalog.scss';
</style>

View File

@@ -0,0 +1 @@
export { default as CMyRecCatalog } from './CMyRecCatalog.vue'

View File

@@ -30,6 +30,11 @@ export default defineComponent({
required: false,
default: undefined,
},
addstrrequired: {
type: String,
required: false,
default: '',
},
myclass: {
type: String,
required: false,

View File

@@ -6,7 +6,7 @@
@update:model-value="changeval"
v-bind="$attrs"
label-color="primary"
:label="label"
:label="addstrrequired + label"
@filter="filterFn"
@filter-abort="abortFilterFn"
input-debounce="600"
@@ -89,7 +89,7 @@
:dense="dense"
options-dense
use-input
:label="label"
:label="addstrrequired + label"
input-debounce="300"
:input-class="myclass"
:options="valori"
@@ -137,7 +137,7 @@
:multiple="true"
:model-value="myarrvalue"
label-color="primary"
:label="label"
:label="addstrrequired + label"
@update:model-value="changeval"
rounded
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
@@ -218,7 +218,7 @@
@update:model-value="changeval"
@filter="filterFn"
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
:label="label"
:label="addstrrequired + label"
:use-input="useinput"
@new-value="newvaluefuncfirst"
emit-value

View File

@@ -5,7 +5,7 @@ import {
} from 'vue'
import { tools } from '@store/Modules/tools'
import { ICatalogo, IMyScheda, IProduct, ISchedaSingola, IText } from '@src/model'
import { IOptCatalogo, IMyScheda, IProduct, ISchedaSingola, IText } from '@src/model'
import { useProducts } from '@store/Products'
import { useGlobalStore } from '@src/store/globalStore'
@@ -24,7 +24,7 @@ export default defineComponent({
required: true,
},
optcatalogo: {
type: Object as PropType<ICatalogo>,
type: Object as PropType<IOptCatalogo>,
required: true,
},
scheda: {

View File

@@ -1,11 +1,6 @@
<template>
<div v-if="!globalStore.serverError" class="q-ma-sm">
<!--
<CVerifyTelegram v-if="!tools.TelegVerificato() || !tools.isUsernameTelegOk()">
</CVerifyTelegram>
-->
<div v-if="tools.isLogged() && (site.confpages.enableRegMultiChoice || (!site.confpages.enabledRegNeedTelegram))">
<CVerifyEmail v-if="!tools.isEmailVerified() && !tools.TelegVerificato()">