Filtra Ricerca...
This commit is contained in:
@@ -20,6 +20,7 @@ import { lists } from '@store/Modules/lists'
|
||||
import { IParamsQuery } from 'model'
|
||||
import { CMyPopupEdit } from '../CMyPopupEdit'
|
||||
import { CMyFriends } from '../CMyFriends'
|
||||
import { CNotifSettings } from '../CNotifSettings'
|
||||
import { CMyUser } from '../CMyUser'
|
||||
import { CMyGroups } from '../CMyGroups'
|
||||
import { CMyFieldDb } from '../CMyFieldDb'
|
||||
@@ -293,7 +294,7 @@ export default defineComponent({
|
||||
components: {
|
||||
CMyPopupEdit, CTitleBanner, CMyFieldDb, CMySelect, CMyFriends, CMyGroups,
|
||||
CMyUser, CMyRecCard, CMyCardPopup, CMyRecGrpCard, CMyCardGrpPopup, CMyCardCircuitPopup,
|
||||
CMyRecCircuitCard, CMyCardService
|
||||
CMyRecCircuitCard, CMyCardService, CNotifSettings
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
const $q = useQuasar()
|
||||
@@ -312,6 +313,7 @@ export default defineComponent({
|
||||
const newRecord: any = ref({})
|
||||
const recSaved: any = ref({})
|
||||
const recModif: any = ref({})
|
||||
const showInnerDialog: any = ref(false)
|
||||
|
||||
const mytable = ref('')
|
||||
const mytitle = ref('')
|
||||
@@ -321,6 +323,7 @@ export default defineComponent({
|
||||
|
||||
const tablesel = ref('')
|
||||
const showSpin = ref(false)
|
||||
const showNotification = ref(false)
|
||||
|
||||
const loading = ref(false)
|
||||
const editOn = computed({
|
||||
@@ -387,6 +390,11 @@ export default defineComponent({
|
||||
// console.log('valoriopt', item.table)
|
||||
return globalStore.getTableJoinByName(item.table, addall, addnone, item.filter)
|
||||
})
|
||||
const lengthopt = computed(() => (item: any, addall: boolean, addnone: boolean) => {
|
||||
// console.log('valoriopt', item.table)
|
||||
const valori = globalStore.getTableJoinByName(item.table, addall, addnone, item.filter)
|
||||
return (valori ? valori.length : 0)
|
||||
})
|
||||
|
||||
const labelcombo = computed(() => (item: any) => {
|
||||
let lab = item.label
|
||||
@@ -2150,6 +2158,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function onLoadScroll(index: number, done: any) {
|
||||
|
||||
if (index > 1) {
|
||||
// console.log('onLoadScroll', index, 'RECLOAD', numRecLoaded.value, 'ROWS: ', pagination.value.rowsNumber, 'PAGE: ', pagination.value.page)
|
||||
if (numRecLoaded.value < pagination.value.rowsNumber || (pagination.value.rowsNumber <= 0 && clickbuttsearch.value)) {
|
||||
@@ -2228,9 +2237,9 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
function showNotification() {
|
||||
/*function showNotification() {
|
||||
$router.push('/notifs')
|
||||
}
|
||||
} */
|
||||
|
||||
created()
|
||||
mounted()
|
||||
@@ -2333,6 +2342,8 @@ export default defineComponent({
|
||||
ordinam_desc,
|
||||
getNumFilterSelected,
|
||||
rowsel,
|
||||
showInnerDialog,
|
||||
lengthopt,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -87,8 +87,9 @@
|
||||
<CMySelect
|
||||
:col="fieldsTable.getColByColumns(mycolumns, item.key)"
|
||||
v-if="
|
||||
item.type === costanti.FieldType.select ||
|
||||
item.type === costanti.FieldType.select_by_server
|
||||
(item.type === costanti.FieldType.select ||
|
||||
item.type === costanti.FieldType.select_by_server)
|
||||
&& lengthopt(item, false) > 1
|
||||
"
|
||||
:label="labelcombo(item)"
|
||||
v-model:value="item.value"
|
||||
@@ -122,7 +123,7 @@
|
||||
</div>-->
|
||||
|
||||
<CMySelect
|
||||
v-if="item.type === costanti.FieldType.multiselect_by_server"
|
||||
v-if="item.type === costanti.FieldType.multiselect_by_server && lengthopt(item, false) > 1"
|
||||
:col="fieldsTable.getColByColumns(mycolumns, item.key)"
|
||||
:multiselect_by_server="true"
|
||||
:label="labelcombo(item)"
|
||||
@@ -229,6 +230,33 @@
|
||||
v-if="prop_search || canEdit"
|
||||
class="row justify-center vertical-middle"
|
||||
>
|
||||
<div class="row justify-around q-mb-sm">
|
||||
<div v-if="searchList && finder">
|
||||
<q-btn
|
||||
dense
|
||||
label="Filtra Ricerca"
|
||||
color="positive"
|
||||
icon="fas fa-filter"
|
||||
@click="showfilter = !showfilter"
|
||||
><q-badge
|
||||
v-if="getNumFilterSelected()"
|
||||
color="red"
|
||||
floating
|
||||
transparent
|
||||
>
|
||||
{{ getNumFilterSelected() }}
|
||||
</q-badge>
|
||||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
dense
|
||||
color="orange"
|
||||
icon="fas fa-bell"
|
||||
label="Avvisami se..."
|
||||
@click="showNotification = !showNotification"
|
||||
></q-btn>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="prop_search" class="q-mr-sm full-width">
|
||||
<q-input
|
||||
v-model="search"
|
||||
@@ -243,29 +271,6 @@
|
||||
<template v-slot:prepend>
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
<template v-if="searchList && finder" v-slot:before>
|
||||
<q-btn
|
||||
dense
|
||||
color="positive"
|
||||
icon="fas fa-filter"
|
||||
@click="showfilter = !showfilter"
|
||||
><q-badge
|
||||
v-if="getNumFilterSelected()"
|
||||
color="red"
|
||||
floating
|
||||
transparent
|
||||
>
|
||||
{{ getNumFilterSelected() }}
|
||||
</q-badge>
|
||||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
dense
|
||||
color="orange"
|
||||
icon="fas fa-bell"
|
||||
@click="showNotification"
|
||||
></q-btn>
|
||||
</template>
|
||||
<template v-slot:after>
|
||||
<q-select
|
||||
v-if="prop_SortFieldsAvailable.length > 0"
|
||||
@@ -376,7 +381,9 @@
|
||||
<div v-if="row && shared_consts.TABLES_WITH_DATE.includes(tablesel)">
|
||||
<div
|
||||
v-if="
|
||||
actmonth !== tools.getstrMonth(row.dateTimeStart) || !actmonth || index === 0
|
||||
actmonth !== tools.getstrMonth(row.dateTimeStart) ||
|
||||
!actmonth ||
|
||||
index === 0
|
||||
"
|
||||
>
|
||||
<span style="display: none">{{
|
||||
@@ -393,10 +400,11 @@
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="false &&
|
||||
v-if="
|
||||
false &&
|
||||
((row.dateTimeStart &&
|
||||
tools.getstrVeryShortDate(row.dateTimeStart) !== actual) ||
|
||||
index === 0)
|
||||
index === 0)
|
||||
"
|
||||
class="actualdate"
|
||||
>
|
||||
@@ -457,6 +465,7 @@
|
||||
? tools.getLabelFooterByRow(row, col_footer, tablesel)
|
||||
: ''
|
||||
"
|
||||
@showInnerDialog="showInnerDialog"
|
||||
>
|
||||
</CMyUser>
|
||||
|
||||
@@ -1404,7 +1413,22 @@
|
||||
</q-dialog>
|
||||
<span v-if="!hidetitleIfEmpty"> <br /></span>
|
||||
</div>
|
||||
<q-dialog v-model="showNotification" :maximized="$q.screen.lt.sm">
|
||||
<q-card class="dialog_card">
|
||||
<q-toolbar class="bg-primary text-white">
|
||||
<q-toolbar-title>
|
||||
Notifiche
|
||||
</q-toolbar-title>
|
||||
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
|
||||
</q-toolbar>
|
||||
|
||||
<q-card-section class="inset-shadow">
|
||||
<CNotifSettings> </CNotifSettings>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CGridTableRec.ts">
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user