- aggiornato catalogo lista con filtri per editori e grafico
This commit is contained in:
@@ -215,7 +215,7 @@ export default defineComponent({
|
||||
item.value = valsaved
|
||||
else {
|
||||
if (arrvalues) {
|
||||
item.value = costanti.FILTER_TUTTI
|
||||
item.value = costanti.FILTER_TUTTI_STR
|
||||
}
|
||||
}
|
||||
} else if (item.table === shared_consts.TAB_CITIES) {
|
||||
|
||||
@@ -74,8 +74,6 @@ export default defineComponent({
|
||||
|
||||
const table = ref('catalogs')
|
||||
|
||||
const searchList_Base = ref(<ISearchList[]>[])
|
||||
|
||||
const arrfilterand: any = ref([])
|
||||
const filtercustom: any = ref([])
|
||||
|
||||
@@ -94,6 +92,10 @@ export default defineComponent({
|
||||
|
||||
const myCatRef = ref(<any>null)
|
||||
|
||||
const searchList_Cataloghi = ref(<ISearchList[]>
|
||||
tools.getsearchList_Cataloghi()
|
||||
)
|
||||
|
||||
/*
|
||||
const idSectorServizi = computed(() => {
|
||||
let myval: any = null
|
||||
@@ -124,10 +126,6 @@ export default defineComponent({
|
||||
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
|
||||
})
|
||||
@@ -155,8 +153,6 @@ export default defineComponent({
|
||||
col_footer.value = obj.col_footer
|
||||
col_tabfooter.value = obj.col_tabfooter
|
||||
|
||||
searchList_Base.value = []
|
||||
|
||||
filtercustom.value = []
|
||||
|
||||
col.value = fieldsTable.getArrColsByTable(table.value)
|
||||
@@ -194,7 +190,6 @@ export default defineComponent({
|
||||
costanti,
|
||||
arrfilterand,
|
||||
filtercustom,
|
||||
searchList,
|
||||
search,
|
||||
doSearch,
|
||||
myrecfiltertoggle,
|
||||
@@ -214,6 +209,7 @@ export default defineComponent({
|
||||
clickButtBar,
|
||||
myCatRef,
|
||||
table,
|
||||
searchList_Cataloghi,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
:noresultLabel="t('grid.nosearchfound')"
|
||||
:arrfilters="arrfilterand"
|
||||
:filtercustom="filtercustom"
|
||||
:prop_searchList="searchList"
|
||||
:prop_searchList="searchList_Cataloghi"
|
||||
:defaultnewrec="tools.getdefaultnewrec(table)"
|
||||
labelBtnAddRow="NONE"
|
||||
:prop_SortFieldsAvailable="mySortFieldsAvailable()"
|
||||
|
||||
@@ -650,6 +650,10 @@
|
||||
>
|
||||
</CMyValueDb>
|
||||
</div>
|
||||
<div class="boxtitleval">
|
||||
<div class="etichetta">Argomenti:</div>
|
||||
{{ products.getCatProdsStrByCatProds(myproduct.productInfo.idCatProds) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="boxtitleval">
|
||||
|
||||
@@ -170,6 +170,8 @@ export default defineComponent({
|
||||
return { sortBy: 'transactionDate', descending: true, page: 1, rowsNumber: 0, rowsPerPage: 20 }
|
||||
else if (props.table === shared_consts.TABLES_CIRCUITS)
|
||||
return { sortBy: 'numMembers', descending: true, page: 1, rowsNumber: 0, rowsPerPage: 20 }
|
||||
else if (props.table === shared_consts.TABLES_CATALOG)
|
||||
return { sortBy: 'title', descending: false, page: 1, rowsNumber: 0, rowsPerPage: 25 }
|
||||
else if (props.table === toolsext.TABUSER)
|
||||
return userStore.getMypaginationMembers()
|
||||
else if (shared_consts.TABLES_ORDER_DATE_UPDATED.includes(props.table))
|
||||
@@ -198,7 +200,7 @@ export default defineComponent({
|
||||
else if (props.table === shared_consts.TABLES_CATALOG)
|
||||
return searchList_Cataloghi.value
|
||||
|
||||
return searchList_Cataloghi.value
|
||||
return []
|
||||
})
|
||||
|
||||
const showType = computed(() => {
|
||||
@@ -642,24 +644,8 @@ export default defineComponent({
|
||||
|
||||
]
|
||||
|
||||
searchList_Cataloghi.value = [
|
||||
{
|
||||
visible: true,
|
||||
label: 'Regione',
|
||||
table: 'regions',
|
||||
key: 'idReg',
|
||||
type: costanti.FieldType.select,
|
||||
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'regions', costanti.FILTER_TUTTI),
|
||||
keycookie: '_hosp',
|
||||
addall: true,
|
||||
arrvalue: [],
|
||||
filter: null,
|
||||
useinput: false,
|
||||
icon: 'fas fa-globe-europe'
|
||||
},
|
||||
|
||||
]
|
||||
|
||||
searchList_Cataloghi.value = tools.getsearchList_Cataloghi()
|
||||
|
||||
searchList_Hosp.value = [
|
||||
{
|
||||
visible: true,
|
||||
|
||||
@@ -1042,6 +1042,14 @@ export default defineComponent({
|
||||
objitem[item.key] = item.value
|
||||
filter_gte.push(objitem)
|
||||
|
||||
|
||||
} else if (item.table === 'lista_editori') {
|
||||
|
||||
if (item.value !== costanti.FILTER_TUTTI) {
|
||||
objitem[item.key] = item.value
|
||||
filtersearch.push(objitem)
|
||||
}
|
||||
|
||||
} else if (item.value > 0) {
|
||||
objitem[item.key] = item.value
|
||||
filtersearch.push(objitem)
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
:icon_alternative="item.icon"
|
||||
:optval="fieldsTable.getKeyByTable(item.table)"
|
||||
:optlab="fieldsTable.getLabelByTable(item.table)"
|
||||
:options="valoriopt(item, false, false)"
|
||||
:options="valoriopt(item, item.addall, item.addnone)"
|
||||
:filter="item && item.filter ? item.filter : ''"
|
||||
:filter_extra="item.filter_extra"
|
||||
:useinput="
|
||||
@@ -811,7 +811,7 @@
|
||||
:icon_alternative="item.icon"
|
||||
:optval="fieldsTable.getKeyByTable(item.table)"
|
||||
:optlab="fieldsTable.getLabelByTable(item.table)"
|
||||
:options="valoriopt(item, false)"
|
||||
:options="valoriopt(item, item.addall, item.addnone)"
|
||||
:filter="item.filter"
|
||||
:filter_extra="item.filter_extra"
|
||||
:useinput="
|
||||
|
||||
@@ -228,6 +228,27 @@
|
||||
addstr="px"
|
||||
@update:model-value="modifElem"
|
||||
></CMySlider>
|
||||
|
||||
<CMySlider
|
||||
v-if="myel.type === shared_consts.ELEMTYPE.CATALOGLIST"
|
||||
label="Lunghezza Card:"
|
||||
v-model="myel.widthcard"
|
||||
:min="10"
|
||||
:max="1000"
|
||||
color="green"
|
||||
addstr="px"
|
||||
@update:model-value="modifElem"
|
||||
></CMySlider>
|
||||
|
||||
<CMySlider
|
||||
label="Altezza Card:"
|
||||
v-model="myel.heightcard"
|
||||
:min="10"
|
||||
:max="1000"
|
||||
color="red"
|
||||
addstr="px"
|
||||
@update:model-value="modifElem"
|
||||
></CMySlider>
|
||||
</div>
|
||||
</q-expansion-item>
|
||||
|
||||
|
||||
@@ -56,6 +56,8 @@ import { useI18n } from '@/boot/i18n'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { LatLng } from 'leaflet'
|
||||
|
||||
import { costanti } from '@costanti'
|
||||
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CMyElem',
|
||||
@@ -123,6 +125,8 @@ export default defineComponent({
|
||||
const enableAdd = ref(true)
|
||||
const visushare = ref(false)
|
||||
|
||||
const tabcatalogo = ref('griglia')
|
||||
|
||||
const social = ref(<ISocial>{})
|
||||
|
||||
const neworder = ref(<number | undefined>0)
|
||||
@@ -294,6 +298,10 @@ export default defineComponent({
|
||||
myel.value.catalogo = updatedCatalogo
|
||||
}
|
||||
|
||||
function naviga(path: string) {
|
||||
$router.push(path)
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
@@ -336,6 +344,9 @@ export default defineComponent({
|
||||
currentCardsPerSlide,
|
||||
animarecard,
|
||||
updateCatalogoEmit,
|
||||
tabcatalogo,
|
||||
costanti,
|
||||
naviga,
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -10,7 +10,13 @@
|
||||
"
|
||||
>
|
||||
<div v-if="myel.type">
|
||||
<q-btn v-if="editOn" rounded dense icon="fas fa-pencil-alt" @click="clickOnElem">
|
||||
<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
|
||||
@@ -566,16 +572,50 @@
|
||||
></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"
|
||||
:heightimg="myel.heightimg"
|
||||
:widthimg="myel.widthimg"
|
||||
:heightcard="myel.height"
|
||||
:widthcard="myel.width"
|
||||
></CCatalogList>
|
||||
<div v-if="editOn" class="elemEdit">Cataloghi</div>
|
||||
<q-tabs
|
||||
v-if="tools.isEditor() || tools.isGrafico()"
|
||||
v-model="tabcatalogo"
|
||||
dense
|
||||
class="bg-green text-white"
|
||||
>
|
||||
<q-tab name="griglia" icon="fas fa-eye" label="Griglia"> </q-tab>
|
||||
<q-tab name="lista" icon="fas fa-list" label="Lista"> </q-tab>
|
||||
<q-tab name="tutorial" icon="fas fa-info" label="Tutorial"> </q-tab>
|
||||
</q-tabs>
|
||||
<q-tab-panels v-model="tabcatalogo" animated keep-alive>
|
||||
<q-tab-panel name="lista">
|
||||
<CGridOriz
|
||||
table="catalogs"
|
||||
:tipovisu="costanti.VISUTABLE_TABLELIST"
|
||||
:prop_search="true"
|
||||
:finder="true"
|
||||
:showMap="false"
|
||||
:prop_modif="tools.isAdmin()"
|
||||
></CGridOriz>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="griglia">
|
||||
<CCatalogList
|
||||
:prop_search="myel.parambool"
|
||||
:finder="myel.parambool2"
|
||||
:heightcarousel="myel.heightcarousel"
|
||||
:heightimg="myel.heightimg"
|
||||
:widthimg="myel.widthimg"
|
||||
:heightcard="myel.heightcard"
|
||||
:widthcard="myel.widthcard"
|
||||
></CCatalogList>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="tutorial">
|
||||
<div class="q-pa-md q-ma-sm text-center">
|
||||
<q-btn
|
||||
rounded
|
||||
label="Apri Tutorial"
|
||||
color="primary"
|
||||
@click="naviga('/tutorial')"
|
||||
></q-btn>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.STATUSREG">
|
||||
<div v-if="editOn" class="elemEdit">CStatusReg</div>
|
||||
|
||||
@@ -63,6 +63,7 @@ export default defineComponent({
|
||||
const apriInfo = ref(false)
|
||||
const collanestr = ref('')
|
||||
const argomentistr = ref('')
|
||||
const numprodtot = ref(0)
|
||||
const editorestr = ref('')
|
||||
|
||||
const products = useProducts()
|
||||
@@ -86,7 +87,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
return linkpage
|
||||
|
||||
|
||||
})
|
||||
|
||||
watch(() => props.prop_myrec, (newval, oldval) => {
|
||||
@@ -109,12 +110,16 @@ export default defineComponent({
|
||||
}
|
||||
argomentistr.value = ''
|
||||
if (myrec.value.argomenti) {
|
||||
numprodtot.value = 0
|
||||
for (const arg of myrec.value.argomenti!) {
|
||||
const recargomento: ICatProd = products.catprods!.find((catprod: ICatProd) => catprod._id === arg)
|
||||
if (recargomento)
|
||||
argomentistr.value += recargomento.name + ' '
|
||||
numprodtot.value += products.getTotaliProdottiByIdCatProd(arg)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
editorestr.value = ''
|
||||
if (myrec.value.editore) {
|
||||
for (const receditore of myrec.value.editore!) {
|
||||
@@ -122,7 +127,7 @@ export default defineComponent({
|
||||
editorestr.value += rectrovato!.name + ' '
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
statecolor.value = 'negative'
|
||||
|
||||
if (myrec.value.descr_introduttiva && myrec.value.img_bordata?.imagefile && myrec.value.img_intro?.imagefile) {
|
||||
@@ -149,7 +154,7 @@ export default defineComponent({
|
||||
$router.push(path)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function setCmd($q: any, cmd: number, myusername: string, value: any, groupname: string) {
|
||||
emit('setCmd', $q, cmd, myusername, value, groupname)
|
||||
@@ -208,6 +213,7 @@ export default defineComponent({
|
||||
pagina_collegata,
|
||||
esiste_descrintro,
|
||||
argomentistr,
|
||||
numprodtot,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
</div>
|
||||
<div v-if="argomentistr" class="text-caption text-h7 text-grey">
|
||||
<q-icon name="fas fa-book" /> {{$t('cataloglist.argomenti')}}:
|
||||
<span class="text-blue">{{ argomentistr }}</span>
|
||||
<span class="text-blue">{{ argomentistr + ` (${numprodtot})` }}</span>
|
||||
</div>
|
||||
<div v-if="editorestr" class="text-caption text-h7 text-grey">
|
||||
<q-icon name="fas fa-book-open" /> {{$t('cataloglist.referenti')}}:
|
||||
@@ -86,7 +86,7 @@
|
||||
:style="
|
||||
`color: ` + (myrec.img_bordata?.imagefile ? 'green' : 'red')
|
||||
"
|
||||
>{{ esiste_descrintro ? 'Presente' : 'Mancante' }}</span
|
||||
>{{ myrec.img_bordata?.imagefile ? 'Presente' : 'Mancante' }}</span
|
||||
>
|
||||
</div>
|
||||
<div
|
||||
@@ -96,7 +96,7 @@
|
||||
<q-icon name="fas fa-image" /> Copertina:
|
||||
<span
|
||||
:style="`color: ` + (myrec.img_intro?.imagefile ? 'green' : 'red')"
|
||||
>{{ esiste_descrintro ? 'Presente' : 'Mancante' }}</span
|
||||
>{{ myrec.img_intro?.imagefile ? 'Presente' : 'Mancante' }}</span
|
||||
>
|
||||
</div>
|
||||
<div v-if="myrec.pdf_generato" class="text-caption text-h7 text-blue">
|
||||
@@ -112,7 +112,7 @@
|
||||
<!--<div class="text-overline text-orange-9">{{collanestr}}</div>-->
|
||||
</q-card-section>
|
||||
|
||||
<q-card-actions align="center">
|
||||
<q-card-actions align="center" class="q-pa-none" style="position: absolute; bottom: 0; width: 100%;">
|
||||
<div class="row justify-center">
|
||||
<q-fab
|
||||
color="primary"
|
||||
@@ -200,7 +200,7 @@
|
||||
<CLabel :value="collanestr" :label="$t('cataloglist.collane') + `:`" />
|
||||
</div>
|
||||
<div v-if="argomentistr" style="width: 300px" class="q-ma-sm">
|
||||
<CLabel :value="argomentistr" :label="$t('cataloglist.argomenti') + `:`" />
|
||||
<CLabel :value="argomentistr + ` (${numprodtot})`" :label="$t('cataloglist.argomenti') + `:`" />
|
||||
</div>
|
||||
<div style="width: 300px" class="q-ma-sm">
|
||||
<CLabel
|
||||
|
||||
@@ -507,14 +507,13 @@ export default defineComponent({
|
||||
|
||||
if (props.addall) {
|
||||
let myobj: any = {}
|
||||
if (typeof props.optlab === 'string') {
|
||||
myobj = tools.setRecordByField(props.optlab, myobj, '(Tutti)')
|
||||
myobj = tools.setRecordByField(props.optval, myobj, costanti.FILTER_TUTTI)
|
||||
}
|
||||
// if (typeof props.optlab === 'string') {
|
||||
myobj = tools.setRecordByField(props.optlab, myobj, '(Tutti)')
|
||||
myobj = tools.setRecordByField(props.optval, myobj, costanti.FILTER_TUTTI)
|
||||
// }
|
||||
|
||||
if (myarr)
|
||||
if (myarr && !tools.isObjectEmpty(myobj))
|
||||
myarr = [myobj, ...myarr]
|
||||
// console.log(' myarr: ', myarr)
|
||||
}
|
||||
|
||||
if (props.addnone) {
|
||||
|
||||
Reference in New Issue
Block a user