Site Configuration by Server Params (confsites and confpages)
This commit is contained in:
@@ -18,6 +18,7 @@ import { CAccomodation } from '../CAccomodation'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { costanti } from '@costanti'
|
||||
|
||||
|
||||
// @ts-ignore
|
||||
// import VueTelInput from 'vue3-tel-input'
|
||||
// import 'vue3-tel-input/dist/vue3-tel-input.css'
|
||||
@@ -237,17 +238,28 @@ export default defineComponent({
|
||||
refresh()
|
||||
})
|
||||
|
||||
|
||||
const myrow = computed(() => {
|
||||
return props.rec && props.isrec ? props.rec : props.row
|
||||
watch(() => props.rec, (newval, oldval) => {
|
||||
refresh()
|
||||
})
|
||||
|
||||
const myrow = ref(<any>null)
|
||||
|
||||
/* const myrow = computed(() => {
|
||||
return props.rec && props.isrec ? props.rec : props.row
|
||||
})
|
||||
*/
|
||||
function crea() {
|
||||
// console.log('crea', isFieldDb(), 'props.mycol', props.mycol)
|
||||
|
||||
if (props.mycol && props.mycol.name) {
|
||||
if (props.mycol && props.mycol.name && props.mycol.name !== 'test') {
|
||||
col.value = props.mycol
|
||||
} else {
|
||||
if (col.value.name === 'test') {
|
||||
col.value.name = props.field
|
||||
if (props.subfield) {
|
||||
col.value.name += '.' + props.subfield
|
||||
}
|
||||
}
|
||||
col.value.jointable = props.jointable
|
||||
if (props.filter)
|
||||
col.value.filter = props.filter
|
||||
@@ -265,7 +277,7 @@ export default defineComponent({
|
||||
myImgGall.value = [myvalue.value]
|
||||
}
|
||||
|
||||
console.log('* col', col.value);
|
||||
// console.log('* col', col.value);
|
||||
}
|
||||
|
||||
if (props.type) {
|
||||
@@ -282,6 +294,20 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
if (props.tablesel) {
|
||||
// let obj = tools.getParamsByTable(props.table)
|
||||
// console.log('OBJ:', obj)
|
||||
if (true) {
|
||||
|
||||
console.log(' CAMPO', props.field + '.' + props.subfield)
|
||||
let myval = tools.getLabelFooterByRow(myrow.value, props.field + '.' + props.subfield, props.table)
|
||||
if (myval)
|
||||
myvalue.value = myval
|
||||
console.log(' RECORD INPUT', myrow.value)
|
||||
console.log(' VALORE OUTPUT: ', myvalue.value)
|
||||
}
|
||||
}
|
||||
|
||||
// console.log('CMyFieldDb crea', myvalue)
|
||||
}
|
||||
|
||||
@@ -317,7 +343,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
async function addNewValue(value: any) {
|
||||
console.log('addNewValue', value, col.value)
|
||||
// console.log('addNewValue', value, col.value)
|
||||
|
||||
if (col.value.allowNewValue && col.value.jointable) {
|
||||
let myrec: any = {}
|
||||
@@ -341,17 +367,18 @@ export default defineComponent({
|
||||
if (col.value && col.value.allowchar === costanti.ALLOWCHAR_CODE) {
|
||||
myvalue.value = tools.removespaces_slash(newval)
|
||||
}
|
||||
// console.log('popypedit: changevalRec', newval)
|
||||
// console.log('popuppedit: changevalRec', newval, 'COLName', col.value.name)
|
||||
|
||||
// console.log('row', props.row, 'col', props.mycol, 'newval', newval)
|
||||
// console.log('row[col.value.name]', props.row[col.value.name])
|
||||
if (props.type === costanti.FieldType.image) {
|
||||
// console.log('image', newval)
|
||||
}
|
||||
|
||||
myrow.value[col.value.name] = newval
|
||||
|
||||
// console.log('changevalRec update:row', newval)
|
||||
emit('update:row', props.row)
|
||||
// console.log('changevalRec update:row', myrow.value)
|
||||
emit('update:row', myrow.value)
|
||||
if (props.isInModif)
|
||||
OpenEdit()
|
||||
}
|
||||
@@ -371,11 +398,13 @@ export default defineComponent({
|
||||
|
||||
function mounted() {
|
||||
|
||||
myrow.value = props.rec && props.isrec ? {...props.rec} : {...props.row}
|
||||
|
||||
try {
|
||||
|
||||
// console.log('mounted', 'isFieldDb()', isFieldDb())
|
||||
if (isFieldDb() && !props.isrec) {
|
||||
|
||||
// console.log(' . none...')
|
||||
} else {
|
||||
if (props.subfield !== '') {
|
||||
if (myrow.value[props.field] === undefined) {
|
||||
@@ -392,6 +421,7 @@ export default defineComponent({
|
||||
myvalue.value = myrow.value
|
||||
}
|
||||
}
|
||||
// console.log('props.field', props.field, 'props.subfield', props.subfield, 'myvalue: ', myvalue)
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
@@ -761,7 +791,6 @@ export default defineComponent({
|
||||
myImgGall,
|
||||
noPopupeditByCol,
|
||||
getTitleEditor,
|
||||
t,
|
||||
myrow,
|
||||
shared_consts,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user