PASSAGGIO A VITE !
AGG. 1.1.23
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Api } from '@api'
|
||||
import { ITodo } from '@src/model'
|
||||
import type { ITodo } from '@src/model'
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
@@ -72,7 +72,6 @@ async function checkPendingMsg() {
|
||||
// ...
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||
return new Promise((resolve, reject) => globalroutines('count', 'swmsg')
|
||||
.then((count) => {
|
||||
if (count > 0) {
|
||||
@@ -88,7 +87,6 @@ async function checkPendingNotif() {
|
||||
|
||||
const howmanybefore = notifStore.countNotif
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||
return new Promise((resolve, reject) => globalroutines('count', 'notifications')
|
||||
.then((count) => {
|
||||
if (count !== howmanybefore) {
|
||||
@@ -170,7 +168,7 @@ export async function waitAndcheckPendingMsg() {
|
||||
return sendSwMsgIfAvailable()
|
||||
.then((something) => {
|
||||
if (something) {
|
||||
if (process.env.DEBUG === '1') {
|
||||
if (import.meta.env.VITE_DEBUG === '1') {
|
||||
console.log('something')
|
||||
}
|
||||
// Refresh data
|
||||
@@ -397,7 +395,7 @@ export function Sync_HideItem(nametab: string, item: any, id: string) {
|
||||
export async function aftercalling(ris: any, checkPending: boolean, nametabindex: string) {
|
||||
const userStore = useUserStore()
|
||||
if (ris.status !== 200) {
|
||||
if (process.env.DEBUG === '1') {
|
||||
if (import.meta.env.VITE_DEBUG === '1') {
|
||||
console.log('ris.status', ris.status)
|
||||
}
|
||||
if (ris.status === serv_constants.RIS_CODE__HTTP_FORBIDDEN_INVALID_TOKEN) {
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { IColGridTable } from '@model'
|
||||
import type { IColGridTable } from '@model'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { lists } from './lists'
|
||||
import { costanti } from './costanti'
|
||||
import { tools } from '@tools'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { toolsext } from '@store/Modules/toolsext'
|
||||
import { static_data } from '@/db/static_data'
|
||||
import { static_data } from '@src/db/static_data'
|
||||
import { shared_consts } from '@src/common/shared_vuejs'
|
||||
|
||||
const DeleteRec = {
|
||||
@@ -226,7 +227,7 @@ export const colTableCatalogList = [
|
||||
label_trans: 'cataloglist.pdf_online_stampa',
|
||||
}),
|
||||
// AddCol({ name: 'data_online', label_trans: 'dataloglist.data_online', fieldtype: costanti.FieldType.date }),
|
||||
|
||||
|
||||
AddCol(ModifRec),
|
||||
// AddCol(DuplicateRec),
|
||||
AddCol(DeleteRec),
|
||||
@@ -419,7 +420,7 @@ export const colmypage = [
|
||||
AddCol({
|
||||
name: '_id', label_trans: 'index', fieldtype: costanti.FieldType.string,
|
||||
showWhen: costanti.showWhen.InPage + costanti.showWhen.InEdit,
|
||||
}),
|
||||
}),
|
||||
AddCol({ name: 'path', label_trans: 'pages.path' }),
|
||||
AddCol({ name: 'icon', label_trans: 'pages.icon' }),
|
||||
AddCol({ name: 'order', label_trans: 'pages.order', fieldtype: costanti.FieldType.number }),
|
||||
@@ -2525,7 +2526,7 @@ export const colTableProductInfos = [
|
||||
AddCol({ name: 'name', label_trans: 'products.name' }),
|
||||
AddCol({ name: 'description', label_trans: 'products.description', fieldtype: costanti.FieldType.html }),
|
||||
AddCol({ name: 'icon', label_trans: 'products.icon' }),
|
||||
AddCol({ name: 'imagefile', label_trans: 'products.img', fieldtype: costanti.FieldType.image_and_filename, path: costanti.DIR_UPLOAD + 'products/' }),
|
||||
AddCol({ name: 'imagefile', label_trans: 'products.img', fieldtype: costanti.FieldType.image_and_filename, path: 'products/' }),
|
||||
AddCol({
|
||||
name: 'department',
|
||||
label_trans: 'products.department',
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,11 @@
|
||||
import { date, useQuasar } from 'quasar'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
// import { useGlobalStore } from '@store/globalStore'
|
||||
import { static_data } from '@/db/static_data'
|
||||
import { static_data } from '@src/db/static_data'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { useTodoStore } from '@store/Todos'
|
||||
import { Router } from 'vue-router'
|
||||
import { ISpecialField } from 'model'
|
||||
import type { Router } from 'vue-router'
|
||||
import type { ISpecialField } from 'model'
|
||||
|
||||
export const func_tools = {
|
||||
getLocale(vero?: boolean): string {
|
||||
@@ -13,7 +13,7 @@ export const func_tools = {
|
||||
if (userStore) {
|
||||
return userStore.lang
|
||||
}
|
||||
if (!vero) return process.env.LANG_DEFAULT ? process.env.LANG_DEFAULT : 'it'
|
||||
if (!vero) return import.meta.env.VITE_LANG_DEFAULT ? import.meta.env.VITE_LANG_DEFAULT : 'it'
|
||||
return ''
|
||||
},
|
||||
|
||||
@@ -134,7 +134,7 @@ export const toolsext = {
|
||||
if (userStore) {
|
||||
return userStore.lang
|
||||
}
|
||||
return process.env.LANG_DEFAULT ? process.env.LANG_DEFAULT : 'it'
|
||||
return import.meta.env.VITE_LANG_DEFAULT ? import.meta.env.VITE_LANG_DEFAULT : 'it'
|
||||
},
|
||||
isLang(whichlang: string): boolean {
|
||||
const loc = func_tools.getLocale()
|
||||
@@ -144,26 +144,6 @@ export const toolsext = {
|
||||
if (mylang === 'enUs') return 'en-us'
|
||||
return mylang
|
||||
},
|
||||
setLangAtt($q: any, $router: Router, mylang: string) {
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
// console.log('setLangAtt =', mylang)
|
||||
// console.log('PRIMA this.$q.lang.isoName', this.$q.lang.isoName)
|
||||
|
||||
// dynamic import, so loading on demand only
|
||||
import(`quasar/lang/${this.getlangforQuasar(mylang)}`).then((lang) => {
|
||||
// console.log(' Import dinamically lang =', lang)
|
||||
|
||||
$q.lang.set(this.getlangforQuasar(lang.default.isoName))
|
||||
import('../../statics/i18n').then(() => {
|
||||
// console.log(' *** MY LANG DOPO=', $q.lang.isoName)
|
||||
})
|
||||
})
|
||||
|
||||
globalStore.addDynamicPages($router)
|
||||
|
||||
// this.$q.lang.set(mylang)
|
||||
},
|
||||
|
||||
getValDb(keystr: string, serv: boolean, def?: any, table?: string, subkey?: string, id?: any, idmain?: any, indrec?: number, subsubkey?: string, specialField?: ISpecialField): any {
|
||||
|
||||
@@ -285,7 +265,7 @@ export const toolsext = {
|
||||
}
|
||||
|
||||
if (!mylang) {
|
||||
if (process.env.LANG_DEFAULT) mylang = process.env.LANG_DEFAULT
|
||||
if (import.meta.env.VITE_LANG_DEFAULT) mylang = import.meta.env.VITE_LANG_DEFAULT
|
||||
console.log('LANG DEFAULT: ', mylang)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user