Campo Citta di Nascita (nel profilo nuova maniera), manca ancora da sistemare l'edit
Se seleziono la Provincia , mi deve comparire la lista dei comuni
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="0.2.6"
|
APP_VERSION="0.2.7"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="13"
|
APP_ID="13"
|
||||||
DIRECTORY_LOCAL="newfreeplanet"
|
DIRECTORY_LOCAL="newfreeplanet"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="0.2.6"
|
APP_VERSION="0.2.7"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="1"
|
APP_ID="1"
|
||||||
DIRECTORY_LOCAL="newfreeplanet"
|
DIRECTORY_LOCAL="newfreeplanet"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="0.2.6"
|
APP_VERSION="0.2.7"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="13"
|
APP_ID="13"
|
||||||
DIRECTORY_LOCAL="newfreeplanet"
|
DIRECTORY_LOCAL="newfreeplanet"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
APP_VERSION="0.2.6"
|
APP_VERSION="0.2.7"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="12"
|
APP_ID="12"
|
||||||
DIRECTORY_LOCAL="newfreeplanet"
|
DIRECTORY_LOCAL="newfreeplanet"
|
||||||
|
|||||||
@@ -1,25 +1,25 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="numcol === 3" class="col-xs-4 col-sm-4 col-md-3 col-lg-2">
|
<div v-if="numcol === 3" class="col-xs-4 col-sm-4 col-md-3 col-lg-2">
|
||||||
<div class="q-ma-xs">
|
<div class="q-ma-xs">
|
||||||
<q-btn v-if="!small" class="mybox_3" :color="color" rounded :to="to" v-bind="$attrs">
|
<q-btn v-if="!small" class="mybox_3" :color="color" rounded push :to="to" v-bind="$attrs">
|
||||||
<q-icon class="q-ma-sm" :name="icon"/>
|
<q-icon class="q-ma-sm" :name="icon"/>
|
||||||
<div class="q-ma-sm my-text_3">{{ label }}</div>
|
<div class="q-ma-sm my-text_3 no-wrap"><span v-html="label"></span></div>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn v-if="small" class="mybox_small" :color="color" rounded :to="to" v-bind="$attrs">
|
<q-btn v-if="small" class="mybox_small" :color="color" rounded push :to="to" v-bind="$attrs">
|
||||||
<q-icon class="q-ma-xs" :name="icon" size="sm"/>
|
<q-icon class="q-ma-xs" :name="icon" size="sm"/>
|
||||||
<div class="q-ma-xs my-text-small">{{ label }}</div>
|
<div class="q-ma-xs my-text-small no-wrap"><span v-html="label"></span></div>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="col-xs-6 col-sm-6 col-md-4 col-lg-3">
|
<div v-else class="col-xs-6 col-sm-6 col-md-4 col-lg-3">
|
||||||
<div class="q-ma-sm">
|
<div class="q-ma-sm">
|
||||||
<q-btn v-if="!small" class="mybox" :color="color" rounded :to="to" v-bind="$attrs">
|
<q-btn v-if="!small" class="mybox" :color="color" rounded push :to="to" v-bind="$attrs">
|
||||||
<q-icon class="q-ma-sm" size="4.5rem" :name="icon"/>
|
<q-icon class="q-ma-sm" size="4.5rem" :name="icon"/>
|
||||||
<div class="q-ma-sm text-h5">{{ label }}</div>
|
<div class="q-ma-sm text-h5 no-wrap"><span v-html="label"></span></div>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn v-if="small" class="mybox_small" :color="color" rounded :to="to" v-bind="$attrs">
|
<q-btn v-if="small" class="mybox_small" :color="color" rounded push :to="to" v-bind="$attrs">
|
||||||
<q-icon class="q-ma-xs" :name="icon" size="sm"/>
|
<q-icon class="q-ma-xs" :name="icon" size="sm"/>
|
||||||
<div class="q-ma-xs my-text-small">{{ label }}</div>
|
<div class="q-ma-xs my-text-small no-wrap"><span v-html="label"></span></div>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -125,11 +125,11 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getFilterCitiesByProvince(recSubSkill: any, index: number, arr: any) {
|
function getFilterCitiesByProvince(recCities: any, index: number, arr: any) {
|
||||||
const recprov: any = searchList.value.find((rec) => rec.table === 'provinces')
|
const recprov: any = searchList.value.find((rec) => rec.table === 'provinces')
|
||||||
// console.log('recSubSkill', recSubSkill, 'recskills', recskills)
|
// console.log('recSubSkill', recSubSkill, 'recskills', recskills)
|
||||||
if (recprov) {
|
if (recprov) {
|
||||||
return recSubSkill.idSkill === recprov.value
|
return recCities.idProvince === recprov.value
|
||||||
} else {
|
} else {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
@@ -320,7 +320,7 @@ export default defineComponent({
|
|||||||
arrvalue: [],
|
arrvalue: [],
|
||||||
useinput: true,
|
useinput: true,
|
||||||
filter: null,
|
filter: null,
|
||||||
// filter: getFilterCitiesByProvince,
|
//filter: getFilterCitiesByProvince,
|
||||||
// param1: shared_consts.PARAM_SHOW_PROVINCE,
|
// param1: shared_consts.PARAM_SHOW_PROVINCE,
|
||||||
tablesel: 'cities',
|
tablesel: 'cities',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -403,6 +403,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
let recSector = null
|
let recSector = null
|
||||||
let recSectorGood = null
|
let recSectorGood = null
|
||||||
|
let recCities = null
|
||||||
let recProvince = null
|
let recProvince = null
|
||||||
let recSkill = null
|
let recSkill = null
|
||||||
let idSector = 0
|
let idSector = 0
|
||||||
@@ -421,6 +422,9 @@ export default defineComponent({
|
|||||||
recProvince = searchList.value.find((item: ISearchList) => item.table === 'provinces')
|
recProvince = searchList.value.find((item: ISearchList) => item.table === 'provinces')
|
||||||
idProvince = recProvince ? recProvince.value : 0
|
idProvince = recProvince ? recProvince.value : 0
|
||||||
}
|
}
|
||||||
|
if (searchList.value) {
|
||||||
|
recCities = searchList.value.find((item: ISearchList) => item.table === 'cities')
|
||||||
|
}
|
||||||
|
|
||||||
if (searchList.value) {
|
if (searchList.value) {
|
||||||
recSkill = searchList.value.find((item: ISearchList) => item.table === 'skills')
|
recSkill = searchList.value.find((item: ISearchList) => item.table === 'skills')
|
||||||
@@ -444,6 +448,11 @@ export default defineComponent({
|
|||||||
if (item.value !== '' && item.value !== costanti.FILTER_TUTTI) {
|
if (item.value !== '' && item.value !== costanti.FILTER_TUTTI) {
|
||||||
filtersearch3or.push(obj)
|
filtersearch3or.push(obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (item.value && recCities && idProvince !== costanti.FILTER_TUTTI) {
|
||||||
|
recCities.filter_extra = {prov: idProvince}
|
||||||
|
}
|
||||||
|
|
||||||
} else if (item.table === 'cities') {
|
} else if (item.table === 'cities') {
|
||||||
|
|
||||||
if (item.value && item.value.hasOwnProperty('_id')) {
|
if (item.value && item.value.hasOwnProperty('_id')) {
|
||||||
|
|||||||
@@ -129,6 +129,7 @@
|
|||||||
:optlab="fieldsTable.getLabelByTable(item.table)"
|
:optlab="fieldsTable.getLabelByTable(item.table)"
|
||||||
:options="valoriopt(item, false)"
|
:options="valoriopt(item, false)"
|
||||||
:filter="item.filter"
|
:filter="item.filter"
|
||||||
|
:filter_extra="item.filter_extra"
|
||||||
:useinput="item.useinput && item.type !== costanti.FieldType.select_by_server">
|
:useinput="item.useinput && item.type !== costanti.FieldType.select_by_server">
|
||||||
</CMySelect>
|
</CMySelect>
|
||||||
|
|
||||||
@@ -155,6 +156,7 @@
|
|||||||
:optval="fieldsTable.getKeyByTable(item.table)"
|
:optval="fieldsTable.getKeyByTable(item.table)"
|
||||||
:optlab="fieldsTable.getLabelByTable(item.table)"
|
:optlab="fieldsTable.getLabelByTable(item.table)"
|
||||||
:filter="item.filter"
|
:filter="item.filter"
|
||||||
|
:filter_extra="item.filter_extra"
|
||||||
:options="valoriopt(item, false)"
|
:options="valoriopt(item, false)"
|
||||||
:useinput="true">
|
:useinput="true">
|
||||||
</CMySelect>
|
</CMySelect>
|
||||||
|
|||||||
@@ -43,6 +43,11 @@ export default defineComponent({
|
|||||||
required: false,
|
required: false,
|
||||||
default: ''
|
default: ''
|
||||||
},
|
},
|
||||||
|
rec: {
|
||||||
|
type: Object,
|
||||||
|
required: false,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
components: {},
|
components: {},
|
||||||
setup(props, { emit }) {
|
setup(props, { emit }) {
|
||||||
@@ -60,7 +65,7 @@ export default defineComponent({
|
|||||||
myarrvalues.value = []
|
myarrvalues.value = []
|
||||||
|
|
||||||
// console.log('options', props.options)
|
// console.log('options', props.options)
|
||||||
if (props.options) {
|
if (props.options.length > 0) {
|
||||||
props.options.forEach((rec: any, index) => {
|
props.options.forEach((rec: any, index) => {
|
||||||
if (props.type === costanti.FieldType.multiselect) {
|
if (props.type === costanti.FieldType.multiselect) {
|
||||||
if (!!myval.value) {
|
if (!!myval.value) {
|
||||||
@@ -171,6 +176,20 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
if (props.type === costanti.FieldType.select_by_server) {
|
||||||
|
|
||||||
|
const mydata: any = {
|
||||||
|
// @ts-ignore
|
||||||
|
label: props.rec[props.optlab],
|
||||||
|
value: 0,
|
||||||
|
valbool: true,
|
||||||
|
icon: '',
|
||||||
|
color: tools.getColorByIndexBest(0)
|
||||||
|
}
|
||||||
|
|
||||||
|
myarrvalues.value.push(mydata)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (myarrvalues.value.length === 0)
|
if (myarrvalues.value.length === 0)
|
||||||
|
|||||||
@@ -23,6 +23,9 @@
|
|||||||
<div :class="` q-ma-sm q-pa-sm col-grow popupedit `" :style="withBorder() ? `` : ``">
|
<div :class="` q-ma-sm q-pa-sm col-grow popupedit `" :style="withBorder() ? `` : ``">
|
||||||
<CMyPopupEdit
|
<CMyPopupEdit
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
|
:rec="rec"
|
||||||
|
:isrec="!!rec"
|
||||||
|
:table="table"
|
||||||
:title="title"
|
:title="title"
|
||||||
:field="mykey"
|
:field="mykey"
|
||||||
:subfield="mysubkey"
|
:subfield="mysubkey"
|
||||||
@@ -32,12 +35,11 @@
|
|||||||
:serv="serv"
|
:serv="serv"
|
||||||
:disable="disable"
|
:disable="disable"
|
||||||
:jointable="jointable"
|
:jointable="jointable"
|
||||||
:table="table"
|
|
||||||
:myimg="myimg"
|
:myimg="myimg"
|
||||||
:id="id"
|
|
||||||
:idmain="idmain"
|
|
||||||
:canModify="canModify"
|
:canModify="canModify"
|
||||||
:canEdit="true"
|
:canEdit="true"
|
||||||
|
:id="id"
|
||||||
|
:idmain="idmain"
|
||||||
:mycol="col"
|
:mycol="col"
|
||||||
:tablesel="tablesel"
|
:tablesel="tablesel"
|
||||||
:pickup="pickup"
|
:pickup="pickup"
|
||||||
|
|||||||
@@ -17,6 +17,11 @@ export default defineComponent({
|
|||||||
type: String,
|
type: String,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
tablesel: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
title: {
|
title: {
|
||||||
type: String,
|
type: String,
|
||||||
required: false,
|
required: false,
|
||||||
@@ -66,6 +71,16 @@ export default defineComponent({
|
|||||||
required: false,
|
required: false,
|
||||||
default: -1,
|
default: -1,
|
||||||
},
|
},
|
||||||
|
filter_table: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
filter_field: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
},
|
},
|
||||||
components: { CMyPopupEdit },
|
components: { CMyPopupEdit },
|
||||||
setup(props, { emit }) {
|
setup(props, { emit }) {
|
||||||
@@ -79,7 +94,6 @@ export default defineComponent({
|
|||||||
const optlab = ref('')
|
const optlab = ref('')
|
||||||
|
|
||||||
const pickup = ref(false)
|
const pickup = ref(false)
|
||||||
const tablesel = ref('')
|
|
||||||
const jointable = ref('')
|
const jointable = ref('')
|
||||||
const recordCol = ref(<any>{})
|
const recordCol = ref(<any>{})
|
||||||
|
|
||||||
@@ -95,6 +109,7 @@ export default defineComponent({
|
|||||||
optlab.value = fieldsTable.getLabelByTable(props.table)
|
optlab.value = fieldsTable.getLabelByTable(props.table)
|
||||||
// recordCol.value = fieldsTable.getrecTableList(props.table)
|
// recordCol.value = fieldsTable.getrecTableList(props.table)
|
||||||
let columns = fieldsTable.getArrColsByTable(props.table)
|
let columns = fieldsTable.getArrColsByTable(props.table)
|
||||||
|
|
||||||
if (columns) {
|
if (columns) {
|
||||||
col.value = columns.find((col: any) => col.field === props.field)
|
col.value = columns.find((col: any) => col.field === props.field)
|
||||||
} else {
|
} else {
|
||||||
@@ -151,7 +166,11 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function visuElem() {
|
function visuElem() {
|
||||||
return !!col.value.name && (props.canEdit || (!props.canEdit && getValue()))
|
if (col.value) {
|
||||||
|
return !!col.value.name && (props.canEdit || (!props.canEdit && getValue()))
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(mounted)
|
onMounted(mounted)
|
||||||
@@ -168,7 +187,6 @@ export default defineComponent({
|
|||||||
optlab,
|
optlab,
|
||||||
recordCol,
|
recordCol,
|
||||||
pickup,
|
pickup,
|
||||||
tablesel,
|
|
||||||
jointable,
|
jointable,
|
||||||
showandsel,
|
showandsel,
|
||||||
mykey,
|
mykey,
|
||||||
|
|||||||
@@ -21,7 +21,6 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div :class="` col-grow clpopupVisuCard `" :style="withBorder() ? `` : ``">
|
<div :class="` col-grow clpopupVisuCard `" :style="withBorder() ? `` : ``">
|
||||||
|
|
||||||
<CMyPopupEdit
|
<CMyPopupEdit
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
:isrec="true"
|
:isrec="true"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { defineComponent, onMounted, onBeforeMount, PropType, ref, toRef, watch } from 'vue'
|
import { defineComponent, onMounted, onBeforeMount, PropType, ref, toRef, watch, computed } from 'vue'
|
||||||
import { useI18n } from '@src/boot/i18n'
|
import { useI18n } from '@src/boot/i18n'
|
||||||
import { useUserStore } from '@store/UserStore'
|
import { useUserStore } from '@store/UserStore'
|
||||||
import { useGlobalStore } from '@store/globalStore'
|
import { useGlobalStore } from '@store/globalStore'
|
||||||
@@ -38,6 +38,11 @@ export default defineComponent({
|
|||||||
type: Object,
|
type: Object,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
rec: {
|
||||||
|
type: Object,
|
||||||
|
required: false,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
isrec: {
|
isrec: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
required: false,
|
required: false,
|
||||||
@@ -186,15 +191,20 @@ export default defineComponent({
|
|||||||
|
|
||||||
const col = ref(<IColGridTable> { name: 'test', fieldtype: 0, showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView, visible: true, maxlength: props.mycol ? props.mycol.maxlength : 0 })
|
const col = ref(<IColGridTable> { name: 'test', fieldtype: 0, showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView, visible: true, maxlength: props.mycol ? props.mycol.maxlength : 0 })
|
||||||
|
|
||||||
const myrow = toRef(props, 'row')
|
|
||||||
|
|
||||||
const { setValDb, getValDb } = MixinBase()
|
const { setValDb, getValDb } = MixinBase()
|
||||||
const { getMyUsername } = MixinUsers()
|
const { getMyUsername } = MixinUsers()
|
||||||
|
|
||||||
|
const myrealrow = toRef(props, 'row')
|
||||||
|
|
||||||
watch(() => props.row, (newval, oldval) => {
|
watch(() => props.row, (newval, oldval) => {
|
||||||
refresh()
|
refresh()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
const myrow = computed(() => {
|
||||||
|
return props.rec && props.isrec ? props.rec : props.row
|
||||||
|
})
|
||||||
|
|
||||||
function crea() {
|
function crea() {
|
||||||
// console.log('crea', isFieldDb())
|
// console.log('crea', isFieldDb())
|
||||||
|
|
||||||
@@ -321,12 +331,13 @@ export default defineComponent({
|
|||||||
function mounted() {
|
function mounted() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
// console.log('mounted', 'isFieldDb()', isFieldDb())
|
// console.log('mounted', 'isFieldDb()', isFieldDb())
|
||||||
if (isFieldDb() && !props.isrec) {
|
if (isFieldDb() && !props.isrec) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (props.subfield !== '') {
|
if (props.subfield !== '') {
|
||||||
if (props.row[props.field] === undefined) {
|
if (myrow.value[props.field] === undefined) {
|
||||||
myrow.value[props.field] = {}
|
myrow.value[props.field] = {}
|
||||||
myvalue.value = ''
|
myvalue.value = ''
|
||||||
} else {
|
} else {
|
||||||
@@ -408,8 +419,13 @@ export default defineComponent({
|
|||||||
} else {
|
} else {
|
||||||
if (props.field !== '')
|
if (props.field !== '')
|
||||||
myrow.value[props.field] = newVal
|
myrow.value[props.field] = newVal
|
||||||
else
|
else {
|
||||||
myrow.value = newVal
|
if (!props.isrec) {
|
||||||
|
// @ts-ignore
|
||||||
|
myrealrow.value = newVal
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
emit('save', newVal, valinitial)
|
emit('save', newVal, valinitial)
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div :class="getclassCol(col)">
|
<div :class="getclassCol(col)">
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-if="tools.checkIfShowField(col, insertMode ? tools.TIPOVIS_NEW_RECORD : (isInModif ? tools.TIPOVIS_EDIT_RECORD : tools.TIPOVIS_SHOW_RECORD), visulabel, myvalue)"
|
v-if="tools.checkIfShowField(col, insertMode ? tools.TIPOVIS_NEW_RECORD : (isInModif ? tools.TIPOVIS_EDIT_RECORD : tools.TIPOVIS_SHOW_RECORD), visulabel, myvalue)"
|
||||||
style="flex-grow: 1;">
|
style="flex-grow: 1;">
|
||||||
@@ -305,6 +306,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<CMyChipList
|
<CMyChipList
|
||||||
|
:rec="row"
|
||||||
:type="costanti.FieldType.binary"
|
:type="costanti.FieldType.binary"
|
||||||
:value="myvalue"
|
:value="myvalue"
|
||||||
@update:value="changevalRec"
|
@update:value="changevalRec"
|
||||||
@@ -374,6 +376,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<CMyChipList
|
<CMyChipList
|
||||||
|
:rec="row"
|
||||||
:type="col.fieldtype"
|
:type="col.fieldtype"
|
||||||
:type_out="col.field_outtype"
|
:type_out="col.field_outtype"
|
||||||
@update:value="changevalRec"
|
@update:value="changevalRec"
|
||||||
@@ -394,7 +397,7 @@
|
|||||||
:label="col.label"
|
:label="col.label"
|
||||||
v-model:value="myvalue"
|
v-model:value="myvalue"
|
||||||
:pickup="col.fieldtype === costanti.FieldType.select_by_server"
|
:pickup="col.fieldtype === costanti.FieldType.select_by_server"
|
||||||
:tablesel="col.type === costanti.FieldType.select_by_server ? tablesel : ''"
|
:tablesel="col.fieldtype === costanti.FieldType.select_by_server ? tablesel : ''"
|
||||||
@update:value="changevalRec"
|
@update:value="changevalRec"
|
||||||
:newvaluefunc="addNewValue"
|
:newvaluefunc="addNewValue"
|
||||||
:filter_table="col.filter_table"
|
:filter_table="col.filter_table"
|
||||||
@@ -407,12 +410,23 @@
|
|||||||
</CMySelect>
|
</CMySelect>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
|
<!--
|
||||||
|
rec: {{rec}}
|
||||||
|
row: {{row}}
|
||||||
|
col.jointable {{col.jointable}}
|
||||||
|
myvalue {{myvalue}}
|
||||||
|
opt: {{globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)}}
|
||||||
|
val: {{fieldsTable.getKeyByTable(col.jointable)}}
|
||||||
|
lab: {{fieldsTable.getLabelByTable(col.jointable)}}-->
|
||||||
<CMyChipList
|
<CMyChipList
|
||||||
|
:rec="row"
|
||||||
myclass="text-center"
|
myclass="text-center"
|
||||||
:type="col.fieldtype"
|
:type="col.fieldtype"
|
||||||
:type_out="col.field_outtype"
|
:type_out="col.field_outtype"
|
||||||
@update:value="changevalRec"
|
@update:value="changevalRec"
|
||||||
v-model:value="myvalue"
|
v-model:value="myvalue"
|
||||||
|
:filter_table="col.filter_table"
|
||||||
|
:filter_field="col.filter_field"
|
||||||
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
:options="globalStore.getTableJoinByName(col.jointable, col.addall, col.filter)"
|
||||||
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
:optval="fieldsTable.getKeyByTable(col.jointable)"
|
||||||
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
:optlab="fieldsTable.getLabelByTable(col.jointable)"
|
||||||
@@ -420,6 +434,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.fieldtype === costanti.FieldType.multiselect_by_server">
|
<div v-else-if="col.fieldtype === costanti.FieldType.multiselect_by_server">
|
||||||
|
|
||||||
<CMySelect
|
<CMySelect
|
||||||
:type_out="col.field_outtype"
|
:type_out="col.field_outtype"
|
||||||
:col="col"
|
:col="col"
|
||||||
@@ -648,7 +663,7 @@
|
|||||||
:label="col.label"
|
:label="col.label"
|
||||||
v-model:value="scope.value"
|
v-model:value="scope.value"
|
||||||
:pickup="col.fieldtype === costanti.FieldType.select_by_server"
|
:pickup="col.fieldtype === costanti.FieldType.select_by_server"
|
||||||
:tablesel="col.type === costanti.FieldType.select_by_server ? tablesel : ''"
|
:tablesel="col.fieldtype === costanti.FieldType.select_by_server ? tablesel : ''"
|
||||||
:filter_table="col.filter_table"
|
:filter_table="col.filter_table"
|
||||||
:filter_field="col.filter_field"
|
:filter_field="col.filter_field"
|
||||||
:value_extra="value_extra"
|
:value_extra="value_extra"
|
||||||
|
|||||||
@@ -67,6 +67,11 @@ export default defineComponent({
|
|||||||
required: false,
|
required: false,
|
||||||
default: ''
|
default: ''
|
||||||
},
|
},
|
||||||
|
filter_extra: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
value_extra: {
|
value_extra: {
|
||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
required: false,
|
required: false,
|
||||||
@@ -450,7 +455,8 @@ export default defineComponent({
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (val.length <= 1) {
|
|
||||||
|
if (val.length <= 1 && !(fieldsTable.tableRemotePickup.includes(props.tablesel) && props.filter_extra )) {
|
||||||
console.log('@@@ LENGTH <= 1')
|
console.log('@@@ LENGTH <= 1')
|
||||||
abort()
|
abort()
|
||||||
return
|
return
|
||||||
@@ -461,9 +467,9 @@ export default defineComponent({
|
|||||||
if (fieldsTable.tableRemotePickup.includes(props.tablesel)) {
|
if (fieldsTable.tableRemotePickup.includes(props.tablesel)) {
|
||||||
try {
|
try {
|
||||||
myarr = optionsreal.value
|
myarr = optionsreal.value
|
||||||
if (mystr !== '')
|
if (mystr !== '' || props.filter_extra)
|
||||||
// myarr = [{_id:1, prov: 'RN', descr: 'Rimini'}]
|
// myarr = [{_id:1, prov: 'RN', descr: 'Rimini'}]
|
||||||
myarr = await globalStore.loadPickup({ table: props.tablesel, search: mystr.trim() })
|
myarr = await globalStore.loadPickup({ table: props.tablesel, search: mystr.trim(), filter: props.filter_extra })
|
||||||
|
|
||||||
if (myarr === null) {
|
if (myarr === null) {
|
||||||
console.log('@@@ VALORI VALUE XXX', valori.value)
|
console.log('@@@ VALORI VALUE XXX', valori.value)
|
||||||
|
|||||||
@@ -464,6 +464,7 @@ export interface IParLookup {
|
|||||||
export interface IParamsPickup {
|
export interface IParamsPickup {
|
||||||
table: string
|
table: string
|
||||||
search: string
|
search: string
|
||||||
|
filter: string
|
||||||
}
|
}
|
||||||
export interface IParamsQuery {
|
export interface IParamsQuery {
|
||||||
table: string
|
table: string
|
||||||
@@ -558,6 +559,7 @@ export interface ISearchList {
|
|||||||
tablesel?: string
|
tablesel?: string
|
||||||
icon?: string
|
icon?: string
|
||||||
filteradv?: boolean
|
filteradv?: boolean
|
||||||
|
filter_extra?: object
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IFilter {
|
export interface IFilter {
|
||||||
|
|||||||
@@ -27,22 +27,14 @@ export const costanti = {
|
|||||||
color: 'red',
|
color: 'red',
|
||||||
hint: '',
|
hint: '',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: 'Luoghi',
|
|
||||||
to: '/places',
|
|
||||||
icon: 'fas fa-map-marker-alt',
|
|
||||||
color: 'blue',
|
|
||||||
hint: '',
|
|
||||||
disable: true,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: 'Mobilità',
|
title: 'Mobilità',
|
||||||
to: '/places',
|
to: '/places',
|
||||||
icon: 'fas fa-taxi',
|
icon: 'fas fa-taxi',
|
||||||
color: 'yellow-5',
|
color: 'lime-7',
|
||||||
textcolor: 'grey-10',
|
textcolor: '',
|
||||||
hint: '',
|
hint: '',
|
||||||
disable: true,
|
disable: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Scuola',
|
title: 'Scuola',
|
||||||
@@ -50,7 +42,7 @@ export const costanti = {
|
|||||||
icon: 'fas fa-book-open',
|
icon: 'fas fa-book-open',
|
||||||
color: 'orange',
|
color: 'orange',
|
||||||
hint: '',
|
hint: '',
|
||||||
disable: true,
|
disable: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Alimenti',
|
title: 'Alimenti',
|
||||||
@@ -58,34 +50,42 @@ export const costanti = {
|
|||||||
icon: 'fas fa-utensils',
|
icon: 'fas fa-utensils',
|
||||||
color: 'green-5',
|
color: 'green-5',
|
||||||
hint: '',
|
hint: '',
|
||||||
disable: true,
|
disable: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Tue_Idee',
|
title: 'Luoghi',
|
||||||
|
to: '/places',
|
||||||
|
icon: 'fas fa-map-marker-alt',
|
||||||
|
color: 'blue',
|
||||||
|
hint: '',
|
||||||
|
disable: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Tue Idee',
|
||||||
to: '/ideas',
|
to: '/ideas',
|
||||||
icon: 'fas fa-lightbulb',
|
icon: 'fas fa-lightbulb',
|
||||||
color: 'red-5',
|
color: 'red-5',
|
||||||
textcolor: '',
|
textcolor: '',
|
||||||
hint: '',
|
hint: '',
|
||||||
disable: true,
|
disable: false,
|
||||||
small: true,
|
small: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Aiuto',
|
title: 'Eventi',
|
||||||
to: '/bacheca',
|
to: '/bacheca',
|
||||||
icon: 'event',
|
icon: 'event',
|
||||||
color: 'pink-5',
|
color: 'pink-5',
|
||||||
hint: 'eventi, last minute, offerte di lavoro',
|
hint: 'eventi, last minute, offerte di lavoro',
|
||||||
disable: true,
|
disable: false,
|
||||||
small: true,
|
small: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Socializza',
|
title: 'Social',
|
||||||
to: '/socialising',
|
to: '/socialising',
|
||||||
icon: 'fas fa-users',
|
icon: 'fas fa-users',
|
||||||
color: 'purple-5',
|
color: 'purple-5',
|
||||||
hint: '',
|
hint: '',
|
||||||
disable: true,
|
disable: false,
|
||||||
small: true,
|
small: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,5 @@
|
|||||||
import { CMyFieldDb } from '@/components/CMyFieldDb'
|
import { CMyFieldDb } from '@/components/CMyFieldDb'
|
||||||
|
import { CMyFieldRec } from '@/components/CMyFieldRec'
|
||||||
import { CTitleBanner } from '@/components/CTitleBanner'
|
import { CTitleBanner } from '@/components/CTitleBanner'
|
||||||
import { CProfile } from '@/components/CProfile'
|
import { CProfile } from '@/components/CProfile'
|
||||||
import { CSkill } from '@/components/CSkill'
|
import { CSkill } from '@/components/CSkill'
|
||||||
@@ -12,11 +13,12 @@ import { toolsext } from '@store/Modules/toolsext'
|
|||||||
import { useQuasar } from 'quasar'
|
import { useQuasar } from 'quasar'
|
||||||
import { costanti } from '@costanti'
|
import { costanti } from '@costanti'
|
||||||
import { static_data } from '@/db/static_data'
|
import { static_data } from '@/db/static_data'
|
||||||
|
import { IUserFields } from 'model'
|
||||||
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'EditProfile',
|
name: 'EditProfile',
|
||||||
components: { CProfile, CTitleBanner, CMyFieldDb, CSkill },
|
components: { CProfile, CTitleBanner, CMyFieldDb, CSkill, CMyFieldRec },
|
||||||
props: {},
|
props: {},
|
||||||
setup() {
|
setup() {
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
@@ -25,6 +27,8 @@ export default defineComponent({
|
|||||||
const $q = useQuasar()
|
const $q = useQuasar()
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
|
const myuser = ref({})
|
||||||
|
|
||||||
const filtroutente = ref(<any[]>[])
|
const filtroutente = ref(<any[]>[])
|
||||||
|
|
||||||
function getpayment() {
|
function getpayment() {
|
||||||
@@ -74,10 +78,19 @@ export default defineComponent({
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function loadProfile() {
|
||||||
|
// Carica il profilo di quest'utente
|
||||||
|
userStore.loadUserProfile(userStore.my.username).then((ris) => {
|
||||||
|
myuser.value = ris
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function mounted() {
|
function mounted() {
|
||||||
filtroutente.value = [
|
filtroutente.value = [
|
||||||
{ userId: userStore.my._id}
|
{ userId: userStore.my._id}
|
||||||
]
|
]
|
||||||
|
loadProfile()
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(mounted)
|
onMounted(mounted)
|
||||||
@@ -90,6 +103,8 @@ export default defineComponent({
|
|||||||
costanti,
|
costanti,
|
||||||
static_data,
|
static_data,
|
||||||
filtroutente,
|
filtroutente,
|
||||||
|
myuser,
|
||||||
|
t,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -134,17 +134,34 @@
|
|||||||
:type="costanti.FieldType.nationality">
|
:type="costanti.FieldType.nationality">
|
||||||
</CMyFieldDb>
|
</CMyFieldDb>
|
||||||
|
|
||||||
|
<!--
|
||||||
<CMyFieldDb
|
<CMyFieldDb
|
||||||
|
v-if="myuser"
|
||||||
:title="$t('reg.residency_city')"
|
:title="$t('reg.residency_city')"
|
||||||
table="users"
|
table="users"
|
||||||
tablesel="cities"
|
tablesel="cities"
|
||||||
mykey="profile"
|
mykey="profile"
|
||||||
:useinput="false"
|
|
||||||
mysubkey="born_city_id"
|
mysubkey="born_city_id"
|
||||||
|
:useinput="false"
|
||||||
jointable="cities"
|
jointable="cities"
|
||||||
:pickup="true"
|
:pickup="true"
|
||||||
:type="costanti.FieldType.select_by_server">
|
:type="costanti.FieldType.select_by_server"
|
||||||
</CMyFieldDb>
|
:rec="myuser"
|
||||||
|
/>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<CMyFieldRec
|
||||||
|
:title="t('reg.residency_city')"
|
||||||
|
table="users"
|
||||||
|
tablesel="cities"
|
||||||
|
:id="myuser._id"
|
||||||
|
:rec="myuser"
|
||||||
|
field="profile.born_city_id"
|
||||||
|
:canEdit="true"
|
||||||
|
:canModify="true">
|
||||||
|
</CMyFieldRec>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<CMyFieldDb
|
<CMyFieldDb
|
||||||
:title="$t('reg.dateofbirth')"
|
:title="$t('reg.dateofbirth')"
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { CMyFieldDb } from '@/components/CMyFieldDb'
|
import { CMyFieldDb } from '@/components/CMyFieldDb'
|
||||||
|
import { CMyFieldRec } from '@/components/CMyFieldRec'
|
||||||
import { CTitleBanner } from '@/components/CTitleBanner'
|
import { CTitleBanner } from '@/components/CTitleBanner'
|
||||||
import { CProfile } from '@/components/CProfile'
|
import { CProfile } from '@/components/CProfile'
|
||||||
import { CCopyBtn } from '@/components/CCopyBtn'
|
import { CCopyBtn } from '@/components/CCopyBtn'
|
||||||
@@ -23,7 +24,7 @@ import MixinUsers from '@/mixins/mixin-users'
|
|||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'myprofile',
|
name: 'myprofile',
|
||||||
components: { CProfile, CTitleBanner, CMyFieldDb, CSkill, CDateTime, CCopyBtn, CUserNonVerif },
|
components: { CProfile, CTitleBanner, CMyFieldDb, CSkill, CDateTime, CCopyBtn, CUserNonVerif, CMyFieldRec },
|
||||||
props: {},
|
props: {},
|
||||||
setup() {
|
setup() {
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
|
|||||||
@@ -19,14 +19,16 @@
|
|||||||
<div class="col-12 text-h7 text-blue text-shadow-2">
|
<div class="col-12 text-h7 text-blue text-shadow-2">
|
||||||
{{ myuser.username }}
|
{{ myuser.username }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
ID: {{myuser.profile.born_city_id}}
|
||||||
<div class="col-12 text-h7">
|
<div class="col-12 text-h7">
|
||||||
<span v-if="myuser.profile && myuser.profile.born_city_id">
|
<span v-if="myuser.profile && myuser.profile.born_city_id">
|
||||||
<CMyFieldRec
|
<CMyFieldRec
|
||||||
title="Comune"
|
title=""
|
||||||
table="users"
|
table="users"
|
||||||
|
tablesel="cities"
|
||||||
:id="myuser._id"
|
:id="myuser._id"
|
||||||
:columns="fieldsTable.userlist()"
|
:rec="myuser"
|
||||||
:rec="mygrp"
|
|
||||||
field="profile.born_city_id"
|
field="profile.born_city_id"
|
||||||
:canEdit="false"
|
:canEdit="false"
|
||||||
:canModify="false">
|
:canModify="false">
|
||||||
|
|||||||
Reference in New Issue
Block a user