filter visible if selected, different from friends, hosp, and services

This commit is contained in:
Surya Paolo
2023-03-23 00:42:57 +01:00
parent c28c6c4d8b
commit eb53557090
11 changed files with 25 additions and 27 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -609,7 +609,8 @@ export default defineComponent({
table: 'regions', table: 'regions',
key: 'idReg', key: 'idReg',
type: costanti.FieldType.select, type: costanti.FieldType.select,
value: tools.getCookie(tools.COOK_SEARCH + 'regions', costanti.FILTER_TUTTI), value: tools.getCookie(tools.COOK_SEARCH + 'regions_hosp', costanti.FILTER_TUTTI),
keycookie: '_hosp',
addall: true, addall: true,
arrvalue: [], arrvalue: [],
filter: null, filter: null,
@@ -621,7 +622,8 @@ export default defineComponent({
table: 'provinces', table: 'provinces',
key: 'idProvince', key: 'idProvince',
type: costanti.FieldType.select, type: costanti.FieldType.select,
value: tools.getCookie(tools.COOK_SEARCH + 'provinces', costanti.FILTER_TUTTI), value: tools.getCookie(tools.COOK_SEARCH + 'provinces_hosp', costanti.FILTER_TUTTI),
keycookie: '_hosp',
addall: true, addall: true,
arrvalue: [], arrvalue: [],
filter: getFilterProvinceByRegion, filter: getFilterProvinceByRegion,
@@ -633,7 +635,8 @@ export default defineComponent({
table: 'cities', table: 'cities',
key: 'idCity', key: 'idCity',
type: costanti.FieldType.select_by_server, type: costanti.FieldType.select_by_server,
value: tools.getCookie(tools.COOK_SEARCH + 'cities', costanti.FILTER_TUTTI), value: tools.getCookie(tools.COOK_SEARCH + 'cities_hosp', costanti.FILTER_TUTTI),
keycookie: '_hosp',
addall: true, addall: true,
arrvalue: [], arrvalue: [],
useinput: true, useinput: true,
@@ -642,18 +645,6 @@ export default defineComponent({
// param1: shared_consts.PARAM_SHOW_PROVINCE, // param1: shared_consts.PARAM_SHOW_PROVINCE,
tablesel: 'cities', tablesel: 'cities',
}, },
{
label: 'Visiblità',
table: 'pub_to_share',
key: 'pub_to_share',
type: costanti.FieldType.select,
value: tools.getCookie(tools.COOK_SEARCH + 'pub_to_share', shared_consts.PUBTOSHARE.ALL, true),
addall: false,
arrvalue: [],
useinput: true,
filter: null,
tablesel: 'pub_to_share',
},
{ {
label: 'Tipologia', label: 'Tipologia',
table: toolsext.TABTYPEHOSP, table: toolsext.TABTYPEHOSP,

View File

@@ -560,7 +560,11 @@ export default defineComponent({
function searchval(newval: any, table: any) { function searchval(newval: any, table: any) {
console.log('REFRR searchval', newval, table) console.log('REFRR searchval', newval, table)
tools.setCookie(tools.COOK_SEARCH + table, newval) const myrecfilt = searchList.value.find((rec) => rec.table === table)
let keycookie = tools.COOK_SEARCH + table
if (myrecfilt && myrecfilt.keycookie)
keycookie += myrecfilt.keycookie
tools.setCookie(keycookie, newval)
if (table === toolsext.TABSKILLS) { if (table === toolsext.TABSKILLS) {
const recSector = searchList.value.find((rec) => rec.table === 'sectors') const recSector = searchList.value.find((rec) => rec.table === 'sectors')
@@ -909,7 +913,7 @@ export default defineComponent({
}*/ }*/
} }
// if ((false && nosearch && props.finder) || (props.finder_noNull && nosearch)) { // if ((false && nosearch && props.finder) || (props.finder_noNull && nosearch)) {
if ((props.finder_noNull || (props.finder_noNullFilters && filtersearch3and.values.length === 0)) && nosearch) { if ((props.finder_noNull || (props.finder_noNullFilters && getNumFilterSelected() === 0)) && nosearch) {
returnedData.value = [] returnedData.value = []
returnedCount = 0 returnedCount = 0
return true return true

View File

@@ -780,6 +780,7 @@ export interface ISearchList {
useinput: boolean useinput: boolean
notinsearch?: boolean notinsearch?: boolean
addall?: boolean addall?: boolean
keycookie?: string
showcount?: boolean showcount?: boolean
tablesel?: string tablesel?: string
icon?: string icon?: string

View File

@@ -35,7 +35,8 @@ export default defineComponent({
table: 'regions', table: 'regions',
key: 'idReg', key: 'idReg',
type: costanti.FieldType.select, type: costanti.FieldType.select,
value: tools.getCookie(tools.COOK_SEARCH + 'regions', costanti.FILTER_TUTTI), value: tools.getCookie(tools.COOK_SEARCH + 'regions_fr', costanti.FILTER_TUTTI),
keycookie: '_fr',
addall: true, addall: true,
arrvalue: [], arrvalue: [],
filter: null, filter: null,
@@ -47,7 +48,8 @@ export default defineComponent({
table: 'provinces', table: 'provinces',
key: 'profile.resid_province', key: 'profile.resid_province',
type: costanti.FieldType.select, type: costanti.FieldType.select,
value: tools.getCookie(tools.COOK_SEARCH + 'resid_provinces', costanti.FILTER_TUTTI), value: tools.getCookie(tools.COOK_SEARCH + 'provinces_fr', costanti.FILTER_TUTTI),
keycookie: '_fr',
addall: true, addall: true,
arrvalue: [], arrvalue: [],
filter: getFilterProvinceByRegion, filter: getFilterProvinceByRegion,

View File

@@ -25,11 +25,11 @@
nodataLabel=" " nodataLabel=" "
:prop_search="true" :prop_search="true"
:prop_showfilter="true" :prop_showfilter="true"
hint="Username o nome da trovare" hint="Scegli una Regione o Provincia oppure digita il nome o Username"
:finder="true" :finder="true"
:choose_visutype="true" :choose_visutype="true"
:finder_noNull="false" :finder_noNull="false"
:finder_noNullFilters="false" :finder_noNullFilters="true"
:options="shared_consts.OPTIONS_SEARCH_USER_ALL_WORDS" :options="shared_consts.OPTIONS_SEARCH_USER_ALL_WORDS"
:butt_modif_new="false" :butt_modif_new="false"
noresultLabel="Username o nome non trovato" noresultLabel="Username o nome non trovato"