PASSAGGIO A VITE !

AGG. 1.1.23
This commit is contained in:
Surya Paolo
2025-03-01 14:15:40 +01:00
parent bc960d38a1
commit c52ca22c83
520 changed files with 3618692 additions and 5448 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 696 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 B

7
src/boot/pinia.ts Normal file
View File

@@ -0,0 +1,7 @@
import { boot } from 'quasar/wrappers'
import { createPinia } from 'pinia'
export default boot(({ app }) => {
const pinia = createPinia()
app.use(pinia)
})

View File

View File

@@ -0,0 +1,61 @@
import type {
PropType} from 'vue';
import {
computed,
defineComponent, onBeforeMount, onBeforeUnmount, onMounted, ref, toRef, toRefs, watch,
} from 'vue'
import { tools } from '@tools'
import type { IOptQueryGM } from '@src/model';
import { IOptCatalogo, IMyScheda, IProduct, ISchedaSingola, IText } from '@src/model'
import { useProducts } from '@store/Products'
import { useGlobalStore } from '@src/store/globalStore'
import { costanti } from '@costanti'
export default defineComponent({
name: 'CViewTable',
props: {
options: {
type: Object as PropType<IOptQueryGM>,
required: true,
},
},
setup(props, { attrs, slots, emit }) {
const globalStore = useGlobalStore()
const risultatoHTML = ref('')
const tabella = ref('')
const loading = ref(false)
async function mounted() {
if (props.options) {
loading.value = true
await getTabellaDaGM()
loading.value = false
}
}
async function getTabellaDaGM() {
tabella.value = props.options.nameTable
risultatoHTML.value = ''
risultatoHTML.value = await globalStore.getGM_Tabella(props.options)
}
onMounted(mounted)
return {
tools,
globalStore,
costanti,
getTabellaDaGM,
risultatoHTML,
tabella,
loading,
}
},
})

View File

@@ -0,0 +1,23 @@
<template>
<q-inner-loading id="spinner" :showing="loading">
<q-spinner-tail color="primary" size="4em"> </q-spinner-tail>
</q-inner-loading>
<div v-if="options">
<div class="text-center text-bold text-h6 text-blue">
Tabella: {{ options.nameTable }}<br>
</div>
<div class="text-center text-h7">
Query: {{ options.where }}<br>
</div>
risultatoHTML: {{risultatoHTML}}
<br><br>
<div v-html="risultatoHTML">
</div>
</div>
</template>
<script lang="ts" src="./CViewTable.ts">
</script>
<style lang="scss" scoped>
@import './CViewTable.scss';
</style>

View File

@@ -0,0 +1 @@
export { default as CViewTable } from './CViewTable.vue'

9
src/db/lang/languages.ts Normal file
View File

@@ -0,0 +1,9 @@
// import it from 'quasar/lang/it.mjs';
// import en from 'quasar/lang/en.mjs';
// const languages = {
// it,
// en,
// };
// export default languages;

9
src/helpers.ts Executable file
View File

@@ -0,0 +1,9 @@
import { resolve, join } from 'path';
// Ottieni la radice del progetto
const ROOT = resolve(__dirname, '.');
// Funzione per unire la radice con altri argomenti passati
export function root(...args: string[]): string {
return join(ROOT, ...args);
}

10
src/vite-env.d.ts vendored Normal file
View File

@@ -0,0 +1,10 @@
/// <reference types="vite/client" />
interface ImportMetaEnv {
readonly VITE_LANG_DEFAULT: string;
// Aggiungi qui altre variabili d'ambiente di Vite se necessarie
}
interface ImportMeta {
readonly env: ImportMetaEnv;
}