- fix: Errore se premevo "Aggiungi" e poi "Annulla" poi la tabella non si aggiornava piu.
This commit is contained in:
@@ -316,7 +316,7 @@ export const shared_consts = {
|
||||
TABLES_UPDATE_LASTIFIED: ['myskills', 'mybachecas', 'myhosps', 'mygoods', 'bots'],
|
||||
TABLES_FINDER: ['myskills', 'mybachecas', 'myhosps', 'mygoods', 'mygroups'],
|
||||
TABLES_VISU_CMYSRECCARD: ['myskills', 'mybachecas', 'myhosps', 'mygoods', 'mygroups'],
|
||||
TABLES_SHOW_ADTYPE: ['myskills', 'mygoods'],
|
||||
TABLES_SHOW_ADTYPE: ['myskills', 'mygoods', 'myhosps'],
|
||||
|
||||
TABLES_VISU_LISTA_USER: ['myskills', 'mybachecas', 'myhosps', 'mygoods', 'users'],
|
||||
TABLES_FIELDS_DESCR_AND_CITY_AND_USER: ['myskills', 'mybachecas', 'myhosps', 'mygoods'],
|
||||
@@ -2026,6 +2026,7 @@ export const shared_consts = {
|
||||
} else if (table === this.TABLES_MYHOSPS) {
|
||||
proj = {
|
||||
visibile: 1,
|
||||
adType: 1,
|
||||
typeHosp: 1,
|
||||
numMaxPeopleHosp: 1,
|
||||
accomodation: 1,
|
||||
@@ -2104,7 +2105,7 @@ export const shared_consts = {
|
||||
photos: 1,
|
||||
note: 1,
|
||||
descr: 1,
|
||||
date_created: 1,
|
||||
date_createzd: 1,
|
||||
date_updated: 1,
|
||||
userId: 1,
|
||||
username: 1,
|
||||
|
||||
@@ -652,6 +652,17 @@ export default defineComponent({
|
||||
// param1: shared_consts.PARAM_SHOW_PROVINCE,
|
||||
tablesel: 'cities',
|
||||
},
|
||||
{
|
||||
label: 'Offro/Cerco',
|
||||
table: 'adtypes',
|
||||
key: 'adType',
|
||||
value: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + props.table + costanti.FILTER_SEP + 'adtypes', costanti.FILTER_TUTTI, true),
|
||||
arrvalue: [],
|
||||
addall: true,
|
||||
type: costanti.FieldType.select,
|
||||
filter: null,
|
||||
useinput: false,
|
||||
},
|
||||
{
|
||||
label: 'Tipologia',
|
||||
table: toolsext.TABTYPEHOSP,
|
||||
|
||||
@@ -341,10 +341,10 @@ export default defineComponent({
|
||||
const newRecordBool = ref(false)
|
||||
const newRecordBoolOld = ref(false)
|
||||
const editRecordBool = ref(false)
|
||||
const newRecord: any = ref({})
|
||||
const recSaved: any = ref({})
|
||||
const recModif: any = ref({})
|
||||
const showInnerDialog: any = ref(false)
|
||||
const newRecord = ref(<any>{})
|
||||
const recSaved = ref(<any>{})
|
||||
const recModif = ref(<any>{})
|
||||
const showInnerDialog = ref(false)
|
||||
|
||||
const mytable = ref('')
|
||||
const mytitle = ref('')
|
||||
@@ -1231,7 +1231,11 @@ export default defineComponent({
|
||||
// fetch data from "server"
|
||||
return fetchFromServer(startRow, endRow, myfilternow, myfilterandnow, sortBy, descending).then((ris: any) => {
|
||||
|
||||
pagination.value.rowsNumber = getRowsNumberCount()
|
||||
try {
|
||||
pagination.value.rowsNumber = getRowsNumberCount()
|
||||
} catch (e) {
|
||||
console.error('Err', e)
|
||||
}
|
||||
// console.log(' ...rowsNumber', pagination.value.rowsNumber)
|
||||
|
||||
if (!returnedData.value || returnedData.value.length === 0) {
|
||||
@@ -1472,7 +1476,8 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
*/
|
||||
newRecord.value = null
|
||||
newRecordBool.value = false
|
||||
newRecord.value = {}
|
||||
}
|
||||
|
||||
function SaveValue(newVal: any, valinitial: any) {
|
||||
@@ -1576,6 +1581,7 @@ export default defineComponent({
|
||||
newRecord.value = tools.getdefaultnewrec(mytable.value, { groupname: props.groupname })
|
||||
}
|
||||
if (!newRecord.value) {
|
||||
newRecordBool.value = false
|
||||
newRecord.value = {}
|
||||
}
|
||||
newRecord.value.userId = userStore.my._id
|
||||
@@ -2153,8 +2159,9 @@ export default defineComponent({
|
||||
else
|
||||
serverData.value = [ris, ...serverData.value]
|
||||
|
||||
newRecord.value = null
|
||||
|
||||
newRecord.value = {}
|
||||
newRecordBool.value = false
|
||||
|
||||
tools.showPositiveNotif($q, t('db.recupdated'))
|
||||
// refresh()
|
||||
} else {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<div v-if="tools.isDebugOn()"></div>
|
||||
newrecord: {{newRecord}}
|
||||
<div :class="$q.screen.lt.sm ? `` : `q-pa-xs`" v-if="isfinishLoading">
|
||||
<q-toggle
|
||||
v-if="tools.isManager() && !showMap"
|
||||
|
||||
@@ -1535,6 +1535,16 @@ export const colmyHosp = [
|
||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit,
|
||||
}),
|
||||
|
||||
AddCol({
|
||||
name: 'adType',
|
||||
label_trans: 'adTypes.name',
|
||||
fieldtype: costanti.FieldType.select,
|
||||
required: true,
|
||||
jointable: 'adtypes',
|
||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit,
|
||||
icon: 'fas fa-bullhorn',
|
||||
noshowlabel: true,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'typeHosp',
|
||||
label_trans: 'hosps.typeHosp',
|
||||
|
||||
@@ -7287,6 +7287,7 @@ export const tools = {
|
||||
getdefaultnewrec_MyHosp(): any {
|
||||
return {
|
||||
visibile: true,
|
||||
adType: tools.getSelectionByTable('adtypes', costanti.AdType.OFFRO),
|
||||
typeHosp: tools.getSelectionByTable(toolsext.TABTYPEHOSP, 2),
|
||||
idContribType: tools.getSelectionByTable('contribtypes', []),
|
||||
accomodation: [],
|
||||
|
||||
@@ -623,6 +623,14 @@
|
||||
></q-btn>
|
||||
<br />
|
||||
</div>
|
||||
<div class="row">
|
||||
<q-btn
|
||||
label="Setta AdType 'Offro' In Ospitalità"
|
||||
color="primary"
|
||||
@click="EseguiFunz('SettaAdTypeOffro_In_Hosps')"
|
||||
></q-btn>
|
||||
<br />
|
||||
</div>
|
||||
<div class="row">
|
||||
<q-btn
|
||||
label="AbilitaNewsletterALL"
|
||||
|
||||
Reference in New Issue
Block a user