PASSAGGIO A VITE !

AGG. 1.1.23
This commit is contained in:
Surya Paolo
2025-03-01 14:14:43 +01:00
parent f0098e57b2
commit bc960d38a1
1044 changed files with 5323 additions and 10823777 deletions

View File

@@ -1,11 +1,11 @@
import { IParamsQuery, IShareWithUs } from 'model'
import { tools } from '@store/Modules/tools'
import { CTitleBanner } from '@components'
import type { IParamsQuery, IShareWithUs } from 'model'
import { tools } from '@tools'
import { CTitleBanner } from '@src/components/CTitleBanner'
import { CCardState } from '../CCardState'
import { CCopyBtn } from '../CCopyBtn'
import { computed, defineComponent, ref } from 'vue'
import { useI18n } from '@src/boot/i18n'
import { useI18n } from 'vue-i18n'
import { useUserStore } from '@store/UserStore'
import { useGlobalStore } from '@store/globalStore'
import { useQuasar } from 'quasar'
@@ -84,7 +84,7 @@ export default defineComponent({
function recsharenow(mydescr: string): IShareWithUs {
return {
idapp: process.env.APP_ID,
idapp: tools.getEnv('VITE_APP_ID'),
description: mydescr,
userId: userStore.my._id,
numshared: 0,
@@ -188,38 +188,38 @@ export default defineComponent({
title: t('pages.sharedwithus')
}).onOk(async () => {
const descr = shared.description
const descr = shared.description
// Aggiorna Record Personale
userStore.my.profile.myshares = userStore.my.profile.myshares.filter((rec: any) => rec.description !== descr)
// Aggiorna Record Personale
userStore.my.profile.myshares = userStore.my.profile.myshares.filter((rec: any) => rec.description !== descr)
const mydata = {
'profile.myshares': userStore.my.profile.myshares
}
tools.saveFieldToServer($q, 'users', userStore.my._id, mydata)
const mydata = {
'profile.myshares': userStore.my.profile.myshares
}
tools.saveFieldToServer($q, 'users', userStore.my._id, mydata)
const updatedexistingrec = updaterecnow(shared.description, false)
if (!updatedexistingrec) {
if (checkifICanRemove(shared)) {
const myrec = globalStore.sharewithus.find((rec) => rec.description.toLowerCase() === descr.toLowerCase())
if (!!myrec) {
await globalStore.DeleteRec({ table: toolsext.TABSHAREWITHUS, id: myrec._id })
.then((ris) => {
console.log('DELETEREC ris=', ris)
if (ris) {
const updatedexistingrec = updaterecnow(shared.description, false)
if (!updatedexistingrec) {
if (checkifICanRemove(shared)) {
const myrec = globalStore.sharewithus.find((rec) => rec.description.toLowerCase() === descr.toLowerCase())
if (!!myrec) {
await globalStore.DeleteRec({ table: toolsext.TABSHAREWITHUS, id: myrec._id })
.then((ris) => {
console.log('DELETEREC ris=', ris)
if (ris) {
// Aggiorna Array Globale
globalStore.sharewithus = globalStore.sharewithus.filter((rec) => rec.description !== descr)
myload()
// Aggiorna Array Globale
globalStore.sharewithus = globalStore.sharewithus.filter((rec) => rec.description !== descr)
myload()
console.log('globalStore.sharewithus', globalStore.sharewithus)
tools.showPositiveNotif($q, t('db.deletedrecord'))
}
})
}
console.log('globalStore.sharewithus', globalStore.sharewithus)
tools.showPositiveNotif($q, t('db.deletedrecord'))
}
})
}
}
}
}
)
}