- Cerca Amici persone: filtro per Regione o Provincia

This commit is contained in:
Surya Paolo
2023-03-23 00:09:59 +01:00
parent 9745133e81
commit c28c6c4d8b
11 changed files with 48 additions and 16 deletions

View File

@@ -1,4 +1,4 @@
APP_VERSION="0.5.81"
APP_VERSION="0.5.82"
SERVICE_WORKER_FILE="service-worker.js"
APP_ID="13"
DIRECTORY_LOCAL="newfreeplanet"

View File

@@ -1,4 +1,4 @@
APP_VERSION="0.5.81"
APP_VERSION="0.5.82"
SERVICE_WORKER_FILE="service-worker.js"
APP_ID="13"
DIRECTORY_LOCAL=newfreeplanet

View File

@@ -1,4 +1,4 @@
APP_VERSION="0.5.81"
APP_VERSION="0.5.82"
SERVICE_WORKER_FILE="service-worker.js"
APP_ID="13"
DIRECTORY_LOCAL=newfreeplanet

View File

@@ -1,4 +1,4 @@
APP_VERSION="0.5.81"
APP_VERSION="0.5.82"
SERVICE_WORKER_FILE="service-worker.js"
APP_ID="13"
DIRECTORY_LOCAL="newfreeplanet"

View File

@@ -1,4 +1,4 @@
APP_VERSION="0.5.81"
APP_VERSION="0.5.82"
SERVICE_WORKER_FILE="service-worker.js"
APP_ID="13"
DIRECTORY_LOCAL=newfreeplanet

View File

@@ -1,4 +1,4 @@
APP_VERSION="0.5.81"
APP_VERSION="0.5.82"
SERVICE_WORKER_FILE="service-worker.js"
APP_ID="14"
DIRECTORY_LOCAL="newfreeplanet"

View File

@@ -62,6 +62,11 @@ export default defineComponent({
required: false,
default: '',
},
prop_showfilter: {
type: Boolean,
required: false,
default: false,
},
hint: {
type: String,
required: false,
@@ -102,6 +107,11 @@ export default defineComponent({
required: false,
default: false,
},
finder_noNullFilters: {
type: Boolean,
required: false,
default: false,
},
vertical: {
type: Number,
required: false,
@@ -640,6 +650,22 @@ export default defineComponent({
return myobj
}
function getNumFilterSelected(): number {
let numfilter = 0
for (const item of searchList.value) {
if (!item.notinsearch) {
if (item.value && item.value !== -100) {
console.log(item.label, item.value)
numfilter++
}
}
}
return numfilter
}
// emulate ajax call
// SELECT * FROM ... WHERE...LIMIT...
async function fetchFromServer(startRow: any, endRow: any, param_myfilter: any, param_myfilterand: any, sortBy: any, descending: any) {
@@ -883,7 +909,7 @@ export default defineComponent({
}*/
}
// if ((false && nosearch && props.finder) || (props.finder_noNull && nosearch)) {
if (props.finder_noNull && nosearch) {
if ((props.finder_noNull || (props.finder_noNullFilters && filtersearch3and.values.length === 0)) && nosearch) {
returnedData.value = []
returnedCount = 0
return true
@@ -2278,6 +2304,7 @@ export default defineComponent({
doSort,
ordinam,
ordinam_desc,
getNumFilterSelected,
}
}
})

View File

@@ -78,7 +78,7 @@
-->
</div>
<q-slide-transition>
<div v-show="showfilter">
<div v-show="showfilter || prop_showfilter">
<div
v-show="searchList"
:class="$q.screen.lt.sm ? `` : `row` + ` text-blue `"
@@ -249,7 +249,9 @@
color="positive"
icon="fas fa-filter"
@click="showfilter = !showfilter"
></q-btn>
><q-badge v-if="getNumFilterSelected()" color="red" floating transparent> {{ getNumFilterSelected() }} </q-badge>
</q-btn>
<q-btn
dense
color="orange"
@@ -269,7 +271,7 @@
label="Ordinamento:"
emit-value
map-options
style="min-width:120px;"
style="min-width: 120px"
>
</q-select>
<q-btn
@@ -313,7 +315,7 @@
{{ pagination.rowsNumber }} elemento trovato
</div>
<div v-if="pagination.rowsNumber > 1 && prop_search">
{{ pagination.rowsNumber }} {{labelElemFind}}
{{ pagination.rowsNumber }} {{ labelElemFind }}
</div>
<div v-if="choose_visutype && $q.screen.gt.xs" class="">

View File

@@ -263,7 +263,7 @@
{{ $t('groups.accept_group') }}
</q-item-section>
</q-item>
<q-item clickable v-close-popup @click="showAccountInfo = true">
<q-item v-if="circuit" clickable v-close-popup @click="showAccountInfo = true">
<q-item-section avatar>
<q-icon name="fas fa-info" />
</q-item-section>
@@ -427,7 +427,7 @@
{{ $t('circuit.accept') }}
</q-item-section>
</q-item>
<q-item clickable v-close-popup @click="showAccountInfo = true">
<q-item v-if="circuit" clickable v-close-popup @click="showAccountInfo = true">
<q-item-section avatar>
<q-icon name="fas fa-info" />
</q-item-section>
@@ -854,7 +854,7 @@
$t('handshake.remove_from_myhandshake')
}}</q-item-section>
</q-item>
<q-item clickable v-close-popup @click="showAccountInfo = true">
<q-item v-if="circuit" clickable v-close-popup @click="showAccountInfo = true">
<q-item-section avatar>
<q-icon name="fas fa-info" />
</q-item-section>

View File

@@ -85,6 +85,7 @@ export default defineComponent({
username: 1,
name: 1,
surname: 1,
'profile.handshake': 1,
'profile.img': 1,
'profile.mygroups': 1,
'profile.qualifica': 1,

View File

@@ -24,13 +24,15 @@
:vertical="costanti.VISUTABLE_LISTA"
nodataLabel=" "
:prop_search="true"
:prop_showfilter="true"
hint="Username o nome da trovare"
:finder="true"
:choose_visutype="true"
:finder_noNull="true"
:finder_noNull="false"
:finder_noNullFilters="false"
:options="shared_consts.OPTIONS_SEARCH_USER_ALL_WORDS"
:butt_modif_new="false"
noresultLabel="Username non trovato"
noresultLabel="Username o nome non trovato"
:arrfilters="arrfilterand"
:filtercustom="filtercustom"
:prop_searchList="searchList"