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,5 +1,5 @@
import { defineComponent, onMounted, ref } from 'vue'
import { CTitleBanner } from '@/components/CTitleBanner'
import { CTitleBanner } from '@src/components/CTitleBanner'
import { useGlobalStore } from '@store/globalStore'
interface IPagination {
@@ -16,7 +16,7 @@ export default defineComponent({
const loading = ref(false)
const serverPagination = ref(<IPagination> { page: 1, rowsNumber: 10 })
const serverPagination = ref(<IPagination>{ page: 1, rowsNumber: 10 })
const serverData = ref(<any>[])

View File

@@ -1,31 +1,30 @@
<template>
<q-page padding class="docs-table">
<p class="caption">TableOnlyView</p>
<q-table
ref="table"
color="primary"
title="Parametri di Configurazione Server"
:rows="serverData"
:columns="columns"
:filter="filter"
selection="multiple"
v-model:selected="selected"
row-key="chiave"
v-model:pagination="serverPagination"
@request="request"
:loading="loading"
>
<q-search hide-underline v-model="filter" />
<!--<template v-slot:top-right="props" >
<q-page padding class="docs-table">
<p class="caption">TableOnlyView</p>
<q-table
ref="table"
color="primary"
title="Parametri di Configurazione Server"
:rows="serverData"
:columns="columns"
:filter="filter"
selection="multiple"
v-model:selected="selected"
row-key="chiave"
v-model:pagination="serverPagination"
@request="request"
:loading="loading"
>
<q-search hide-underline v-model="filter" />
<!--<template v-slot:top-right="props" >
<q-search hide-underline v-model="filter" />
</template>-->
</q-table>
</q-page>
</q-table>
</q-page>
</template>
<script lang="ts" src="tableOnlyView.ts">
<script lang="ts" src="./tableOnlyView.ts">
</script>
<style lang="scss" scoped>
@import 'tableOnlyView';
@import "tableOnlyView";
</style>

View File

@@ -1,9 +1,11 @@
import { computed, defineComponent, PropType, ref } from 'vue'
import { tools } from '@tools'
import { useQuasar } from 'quasar'
import { useI18n } from '@/boot/i18n'
import { useI18n } from 'vue-i18n'
import { useGlobalStore } from '@store/globalStore'
import { ICfgServer } from 'model'
import type { ICfgServer } from 'model'
interface IPageSrv {
page: number,
@@ -66,7 +68,7 @@ export default defineComponent({
chiave: keysel.value,
userId: userIdsel.value,
valore: newVal,
idapp: process.env.APP_ID!,
idapp: tools.getEnv('VITE_APP_ID')!,
}
// Save on Server

View File

@@ -4,13 +4,14 @@ import { CTitleBanner } from '../../../components/CTitleBanner'
import { CDateTime } from '../../../components/CDateTime'
import { CMyFieldDb } from '../../../components/CMyFieldDb'
import { useQuasar } from 'quasar'
import { useI18n } from '@/boot/i18n'
import { useI18n } from 'vue-i18n'
import { useUserStore } from '@store/UserStore'
import { useGlobalStore } from '@store/globalStore'
import { useCircuitStore } from '@store/CircuitStore'
import { tools } from '@store/Modules/tools'
import { tools } from '@tools'
import { costanti } from '@costanti'
import { shared_consts } from '@src/common/shared_vuejs'
import type { IOptQueryGM } from '@src/model'
export default defineComponent({
name: 'Dbop',
@@ -38,11 +39,13 @@ export default defineComponent({
const search = ref('')
const replace_username = ref('')
const risultato = ref('')
const risultatoHTML = ref('')
const incaricamento = ref(false)
const globalStore = useGlobalStore()
function EseguiFunz(miafunz: string, search_username?: string, replace_username?: string, valmin?: number, valmax?: number, circuitId?: string) {
const userStore = useUserStore()
const globalStore = useGlobalStore()
$q.dialog({
message: t('dialog.continue') + ' ' + miafunz + ' ?',
@@ -90,6 +93,16 @@ export default defineComponent({
})
}
async function getListaArg() {
risultatoHTML.value = ''
risultatoHTML.value = await globalStore.getGM_Lista_Argomenti(true)
}
async function getTabellaDaGM(options: IOptQueryGM) {
risultatoHTML.value = ''
risultatoHTML.value = await globalStore.getGM_Tabella(options)
}
return {
EseguiFunz,
tools,
@@ -108,6 +121,10 @@ export default defineComponent({
ris,
risultato,
search,
globalStore,
risultatoHTML,
getListaArg,
getTabellaDaGM,
}
},
})

View File

@@ -344,15 +344,17 @@
<q-btn
label="Esci da tutti i Circuiti a saldo Zero"
color="primary"
@click="
EseguiFunz('ExitFromAllCircuitWithZero', search_username)
"
@click="EseguiFunz('ExitFromAllCircuitWithZero', search_username)"
></q-btn>
<q-btn
label="Replace AportadorSolidario"
color="primary"
@click="
EseguiFunz('replaceAportadorSolidario', search_username, replace_username)
EseguiFunz(
'replaceAportadorSolidario',
search_username,
replace_username
)
"
></q-btn>
<q-btn
@@ -373,9 +375,7 @@
<q-btn
label="Cerca Stringa su tutto il DB"
color="primary"
@click="
EseguiFunz('SearchString', search)
"
@click="EseguiFunz('SearchString', search)"
></q-btn>
<br />
</div>
@@ -771,6 +771,22 @@
color="positive"
@click="EseguiFunz('MyElemSetIdPageInsteadThePah')"
></q-btn>
<q-btn
label="getGM_Lista_Argomenti"
color="positive"
@click="getListaArg()"
></q-btn>
<q-btn
label="getGM_Tabella Collane"
color="positive"
@click="
getTabellaDaGM({
nameTable: 'T_Web_Collane',
numrec: 500,
outhtml: true,
})
"
></q-btn>
<br />
</div>
@@ -779,6 +795,8 @@
<div class="results-content">
{{ risultato }}
</div>
<h2 v-if="!!risultatoHTML" class="results-title">Risultati HTML:</h2>
<div v-if="!!risultatoHTML" v-html="risultatoHTML"></div>
</div>
<br />
<br />
@@ -788,5 +806,5 @@
</script>
<style lang="scss" scoped>
@import './dbop';
@import "./dbop";
</style>

View File

@@ -1,9 +1,9 @@
import { defineComponent, PropType, ref } from 'vue'
import { useQuasar } from 'quasar'
import { CTitleBanner } from '@/components/CTitleBanner'
import { CTitleBanner } from '@src/components/CTitleBanner'
import { useUserStore } from '@store/UserStore'
import { useGlobalStore } from '@store/globalStore'
import { tools } from '@store/Modules/tools'
import { tools } from '@tools'
export default defineComponent({
name: 'Extralist',

View File

@@ -1,10 +1,10 @@
import { defineComponent, onMounted, ref, watch } from 'vue'
import { tools } from '@store/Modules/tools'
import { tools } from '@tools'
import { useUserStore } from '@store/UserStore'
import { useRouter } from 'vue-router'
import { useGlobalStore } from '@store/globalStore'
import { useProducts } from '@store/Products'
import { useI18n } from '@/boot/i18n'
import { useI18n } from 'vue-i18n'
import { toolsext } from '@store/Modules/toolsext'
import { useQuasar } from 'quasar'
import { costanti } from '@costanti'
@@ -14,7 +14,8 @@ import { serv_constants } from '@store/Modules/serv_constants'
import { fieldsTable } from '@store/Modules/fieldsTable'
import { CSingleCart } from '../../../components/CSingleCart'
import { CTitleBanner, CMyFieldDb } from '@components'
import { CTitleBanner } from '@src/components/CTitleBanner'
import { CMyFieldDb } from '@src/components/CMyFieldDb'
import { ICart, IOrder, IOrderCart } from '@src/model'
export default defineComponent({
@@ -129,7 +130,7 @@ export default defineComponent({
totalPrice: orderscart.reduce((total: number, rec: any) => total + rec.totalPrice, 0),
};
let rowsWithTotals: any = [...orderscart];
const rowsWithTotals: any = [...orderscart];
if (tools.isManager()) {
// Combine orders and totals

View File

@@ -19,7 +19,7 @@
<template v-slot:tutti>
<div class="row items-center no-wrap">
<div class="text-center">
{{ t('gas.tutti') }}
{{ t("gas.tutti") }}
</div>
<q-icon right name="fas fa-user-friends" />
</div>
@@ -27,7 +27,7 @@
<template v-slot:gas>
<div class="row items-center no-wrap">
<div class="text-center">
{{ t('gas.ordina_sul_gas') }}
{{ t("gas.ordina_sul_gas") }}
</div>
<q-icon right name="fas fa-user-friends" />
</div>
@@ -36,7 +36,7 @@
<template v-slot:bottega>
<div class="row items-center no-wrap">
<div class="text-center">
{{ t('gas.bottega') }}
{{ t("gas.bottega") }}
</div>
<q-icon right name="fas fa-store" />
</div>
@@ -96,8 +96,7 @@
<q-td key="totalPrice" :props="props">
<span v-if="props.row.totalPrice">
<span :class="props.row.name !== 'TOTALI' ? '' : 'totali'">
&nbsp; {{ props.row.totalPrice.toFixed(2) }}
&nbsp;</span
&nbsp; {{ props.row.totalPrice.toFixed(2) }} &nbsp;</span
>
</span>
</q-td>
@@ -113,5 +112,5 @@
</script>
<style lang="scss" scoped>
@import './gestoreordini';
@import "./gestoreordini";
</style>

View File

@@ -1 +1 @@
export {default as gestoreordini} from './orderInfo.vue'
export { default as gestoreordini } from './gestoreordini.vue'

View File

@@ -2,13 +2,13 @@ import { defineComponent, reactive, ref, watch } from 'vue'
import { serv_constants } from '@store/Modules/serv_constants'
import { useQuasar } from 'quasar'
import { useI18n } from '@/boot/i18n'
import { useI18n } from 'vue-i18n'
import { useGlobalStore } from '@store/globalStore'
import { useUserStore } from '@store/UserStore'
import { useRouter } from 'vue-router'
import useVuelidate from '@vuelidate/core'
import { validations } from '@src/views/admin/install_site/install_site-validate'
import { tools } from '@store/Modules/tools'
import { tools } from '@tools'
export default defineComponent({
name: 'install_site',
@@ -52,12 +52,12 @@ export default defineComponent({
$q.loading.show({ message: t('reset.incorso') })
userStore.addNewSite({...form})
userStore.addNewSite({ ...form })
.then((ris: any) => {
if (ris.code === serv_constants.RIS_CODE_OK) {
emailsent.value = true
idapp.value = ris.idapp
tools.showPositiveNotif($q, t('install.created', {idapp: ris.idapp}))
tools.showPositiveNotif($q, t('install.created', { idapp: ris.idapp }))
$router.replace('/signin')
form.password = ''
} else

View File

@@ -4,11 +4,11 @@ import { CTitleBanner } from '../../../components/CTitleBanner'
import { CDateTime } from '../../../components/CDateTime'
import { CMyFieldDb } from '../../../components/CMyFieldDb'
import { useQuasar } from 'quasar'
import { useI18n } from '@/boot/i18n'
import { useI18n } from 'vue-i18n'
import { useUserStore } from '@store/UserStore'
import { useGlobalStore } from '@store/globalStore'
import { useCircuitStore } from '@store/CircuitStore'
import { tools } from '@store/Modules/tools'
import { tools } from '@tools'
import { costanti } from '@costanti'
import { shared_consts } from '@src/common/shared_vuejs'
@@ -160,7 +160,7 @@ export default defineComponent({
tools.setCookie('CF_API_DIR', mydir.value)
if (dnsPageActive.value) {
// get the Tokens
// get the Tokens
optionsApi.value = await globalStore.getCloudFlareTok("gettok", selectedApi.value, "")
} else {
if (mydir.value)
@@ -216,7 +216,7 @@ export default defineComponent({
}
async function removeEmails(email: String) {
async function removeEmails(email: string) {
$q.dialog({
message: t('miab.deleteemail') + email + ' ?',
ok: {
@@ -351,7 +351,7 @@ export default defineComponent({
if (scrollArea.value) {
const el = scrollArea.value.$el;
let scrollHeight = el.scrollHeight
const scrollHeight = el.scrollHeight
if (el) {
// Use el.scrollIntoView() to instantly scroll to the element
@@ -397,7 +397,7 @@ export default defineComponent({
console.log('EseguiScript', risfunz)
//write the string of the time now
let timenowstr = '<span style="font-style: italic; color: gray;">✅ Eseguito alle ' + tools.getstrTimeAll(Date.now()) + ' -> ' + '</span><br>'
const timenowstr = '<span style="font-style: italic; color: gray;">✅ Eseguito alle ' + tools.getstrTimeAll(Date.now()) + ' -> ' + '</span><br>'
if (risfunz.stderr)
@@ -409,7 +409,7 @@ export default defineComponent({
}
const connectWebSocket = () => {
let myurlws = tools.getWssUrl()
const myurlws = tools.getWssUrl()
ws = new WebSocket(myurlws)
const input = ref('');
@@ -444,7 +444,7 @@ export default defineComponent({
// messages.value = '' // Pulisce i messaggi precedenti
inputRequired.value = false;
let timenowstr = '<br><span style="font-style: italic; color: gray;">✅ Eseguito alle ' + tools.getstrTimeAll(Date.now()) + ' -> ' + '</span><br>'
const timenowstr = '<br><span style="font-style: italic; color: gray;">✅ Eseguito alle ' + tools.getstrTimeAll(Date.now()) + ' -> ' + '</span><br>'
messages.value += timenowstr
ws.send(JSON.stringify({ user_id: userStore.my._id, type: 'start_script', scriptName, dir: mydir.value }));
@@ -537,7 +537,7 @@ export default defineComponent({
incaricamento.value = true
let myrecord = {
const myrecord = {
name: tools.getDomainSite()
}
await globalStore.getCloudFlareTok("setCorrectIpsOnDNS", selectedApi.value, selZoneId.value, null, myrecord)
@@ -642,7 +642,7 @@ export default defineComponent({
if (dnsPageActive.value) {
let checkDomainA1 = '';
for (let i = 0; i < domainsData.length; i++) {
let ris = tools.getHostPuntamento(arrDNS.value, domainsData[i].url, domainsData[i].expected!, domainsData[i].type);
const ris = tools.getHostPuntamento(arrDNS.value, domainsData[i].url, domainsData[i].expected, domainsData[i].type);
checkDomainA1 += ris.text;
if (!ris.ok) {
errorDNS.value = true;
@@ -654,35 +654,35 @@ export default defineComponent({
if (globalStore.site.enable_servermail) {
// Controlla type MX
const mxRecord = arrDNS.value.find((record: any) => record.type === 'MX' && record.name === domainSite);
checkServerMailEnabled += getResultCheckDnsParam('Server mail enabled', mxRecord, 'content', globalStore.site.servermail!)
checkServerMailEnabled += getResultCheckDnsParam('Server mail enabled', mxRecord, 'content', globalStore.site.servermail)
// *** Controlla type TXT spf1 ***
let contentTXTspf1Expected = `v=spf1 a mx:${globalStore.site.servermail} ip4:${globalStore.site.servermailip} ~all`;
const contentTXTspf1Expected = `v=spf1 a mx:${globalStore.site.servermail} ip4:${globalStore.site.servermailip} ~all`;
const mxRecordTXTspf1 = arrDNS.value.find((record: any) => record.type === 'TXT' && record.name === domainSite && (record.content.indexOf('v=spf1') > -1))
checkServerMailEnabled += getResultCheckDnsParam('TXT spf1 RECORD', mxRecordTXTspf1, 'content', contentTXTspf1Expected)
let nameDkimtoFind = `mail._domainkey.${domainSite}`;
const nameDkimtoFind = `mail._domainkey.${domainSite}`;
// Controllo DKIM:
const mxRecordTXTDKIM = arrDNS.value.find((record: any) => record.type === 'TXT' && record.name === nameDkimtoFind)
let contentTXTDKIMExpected = `v=DKIM1; h=sha256; k=rsa; s=email; p=${globalStore.site.dkim}`
const contentTXTDKIMExpected = `v=DKIM1; h=sha256; k=rsa; s=email; p=${globalStore.site.dkim}`
checkServerMailEnabled += getResultCheckDnsParam('DKIM1', mxRecordTXTDKIM, 'content', contentTXTDKIMExpected)
// Controllo DMARC:
const mxRecordTXTDMARC = arrDNS.value.find((record: any) => record.type === 'TXT' && record.name === `_dmarc.${domainSite}`)
let contentTXTMARCExpected = `v=DMARC1; p=quarantine; ruf=mailto:dmarc@${domainSite};`;
const contentTXTMARCExpected = `v=DMARC1; p=quarantine; ruf=mailto:dmarc@${domainSite};`;
checkServerMailEnabled += getResultCheckDnsParam('DMARC RECORD', mxRecordTXTDMARC, 'content', contentTXTMARCExpected)
// Controlla autoconfig
const recAutoConfig = arrDNS.value.find((record: any) => record.type === 'CNAME' && record.name === `autoconfig.${domainSite}`);
checkServerMailEnabled += getResultCheckDnsParam('AutoConfig CNAME', recAutoConfig, 'content', globalStore.site.servermail!)
checkServerMailEnabled += getResultCheckDnsParam('AutoConfig CNAME', recAutoConfig, 'content', globalStore.site.servermail)
// Controlla autodiscover
const recAutoDiscover = arrDNS.value.find((record: any) => record.type === 'CNAME' && record.name === `autodiscover.${domainSite}`);
checkServerMailEnabled += getResultCheckDnsParam('AutoDiscover CNAME', recAutoDiscover, 'content', globalStore.site.servermail!)
checkServerMailEnabled += getResultCheckDnsParam('AutoDiscover CNAME', recAutoDiscover, 'content', globalStore.site.servermail)
await getEmails()
}

View File

@@ -95,7 +95,7 @@
<q-item-section top class="col-2 gt-sm">
<q-item-label class="q-mt-sm">{{
email.slice(0, email.indexOf('@'))
email.slice(0, email.indexOf("@"))
}}</q-item-label>
</q-item-section>
@@ -215,7 +215,7 @@
buttons
transition-show="scale"
transition-hide="scale"
:max-width="200"
max-width="200"
@save="saveContentDNS"
>
<q-input
@@ -452,11 +452,11 @@
</q-card>
</q-dialog>
</template>
<script lang="ts" src="./server.ts">
</script>
<style lang="scss" scoped>
@import './server';
@import "./server";
</style>

View File

@@ -4,11 +4,11 @@ import { CTitleBanner } from '../../../components/CTitleBanner'
import { CDateTime } from '../../../components/CDateTime'
import { CMyFieldDb } from '../../../components/CMyFieldDb'
import { useQuasar } from 'quasar'
import { useI18n } from '@/boot/i18n'
import { useI18n } from 'vue-i18n'
import { useUserStore } from '@store/UserStore'
import { useGlobalStore } from '@store/globalStore'
import { useCircuitStore } from '@store/CircuitStore'
import { tools } from '@store/Modules/tools'
import { tools } from '@tools'
import { costanti } from '@costanti'
import { shared_consts } from '@src/common/shared_vuejs'

View File

@@ -1,10 +1,10 @@
import { defineComponent, onMounted, ref } from 'vue'
import { tools } from '@store/Modules/tools'
import { tools } from '@tools'
import { useUserStore } from '@store/UserStore'
import { useRouter } from 'vue-router'
import { useGlobalStore } from '@store/globalStore'
import { useProducts } from '@store/Products'
import { useI18n } from '@/boot/i18n'
import { useI18n } from 'vue-i18n'
import { toolsext } from '@store/Modules/toolsext'
import { useQuasar } from 'quasar'
import { costanti } from '@costanti'
@@ -35,7 +35,7 @@ export default defineComponent({
function getCart() {
return productStore.getCart()
}
function getProducts() {
return productStore.getProducts()
}

View File

@@ -1,18 +1,18 @@
import { defineComponent, onMounted, ref, watch, computed } from 'vue'
import { tools } from '@store/Modules/tools'
import { tools } from '@tools'
import { useUserStore } from '@store/UserStore'
import { useRouter } from 'vue-router'
import { useGlobalStore } from '@store/globalStore'
import { useProducts } from '@store/Products'
import { useI18n } from '@/boot/i18n'
import { useI18n } from 'vue-i18n'
import { toolsext } from '@store/Modules/toolsext'
import { useQuasar } from 'quasar'
import { costanti } from '@costanti'
import { shared_consts } from '@/common/shared_vuejs'
import { shared_consts } from '@src/common/shared_vuejs'
import { CProductCard } from '@src/components/CProductCard'
import { CSelectUserActive } from '@src/components/CSelectUserActive'
import { IProduct } from '@src/model'
import type { IProduct } from '@src/model'
export default defineComponent({
@@ -38,25 +38,25 @@ export default defineComponent({
})
const getArrProducts = computed(() => {
let arrprod = productStore.getProducts(cosa.value)
let catstr = cat.value;
let lowerSearchText = search.value.toLowerCase().trim();
const arrprod = productStore.getProducts(cosa.value)
const catstr = cat.value;
const lowerSearchText = search.value.toLowerCase().trim();
if ((!lowerSearchText || (lowerSearchText && lowerSearchText.length < 2)) && !catstr) {
return arrprod
}
return arrprod.filter((product: IProduct) => {
let lowerName = product.productInfo.name!.toLowerCase();
let hasCategoria = !catstr || (catstr && product.productInfo.idCatProds?.includes(catstr));
const lowerName = product.productInfo.name!.toLowerCase();
const hasCategoria = !catstr || (catstr && product.productInfo.idCatProds?.includes(catstr));
// Use a regular expression to match whole words
let codeMatch = new RegExp(`\\b${lowerSearchText}\\b`, 'i');
let nameMatch = new RegExp(`\\b${lowerSearchText}`, 'i');
const codeMatch = new RegExp(`\\b${lowerSearchText}\\b`, 'i');
const nameMatch = new RegExp(`\\b${lowerSearchText}`, 'i');
// Check if any word in lowerName starts with lowerSearchText
let anyWordStartsWithSearch = lowerName.split(/\s+/).some(word => nameMatch.test(word));
const anyWordStartsWithSearch = lowerName.split(/\s+/).some(word => nameMatch.test(word));
return (codeMatch.test(product.productInfo.code!) || anyWordStartsWithSearch) && hasCategoria;
return (codeMatch.test(product.productInfo.code) || anyWordStartsWithSearch) && hasCategoria;
});
})
@@ -65,10 +65,10 @@ export default defineComponent({
if (!search.value) {
return arrprod
}
let lowerSearchText = search.value.toLowerCase();
let catstr = cat.value;
return arrprod.filter((product: IProduct) => {
let lowerName = product.productInfo.name!.toLowerCase();
const hasCategoria = !catstr || (catstr && product.productInfo.idCatProds?.includes(catstr));
@@ -85,8 +85,8 @@ export default defineComponent({
}
function getCatProds() {
let arrcat = productStore.getCatProds(cosa.value)
let riscat: any = [{ label: 'Tutti', value: '', icon: undefined, color: undefined }]
const arrcat = productStore.getCatProds(cosa.value)
const riscat: any = [{ label: 'Tutti', value: '', icon: undefined, color: undefined }]
for (const rec of arrcat) {
riscat.push({ label: rec.name, value: rec._id, icon: rec.icon, color: rec.color })
}

View File

@@ -1,24 +1,28 @@
import { defineComponent, onMounted, ref, watch, computed, onBeforeUnmount, PropType, nextTick } from 'vue'
import { tools } from '@store/Modules/tools'
import type { PropType } from 'vue';
import { defineComponent, onMounted, ref, watch, computed, onBeforeUnmount, nextTick } from 'vue'
import { tools } from '@tools'
import { useUserStore } from '@store/UserStore'
import { useRouter } from 'vue-router'
import { useGlobalStore } from '@store/globalStore'
import { useProducts } from '@store/Products'
import { useI18n } from '@/boot/i18n'
import { useI18n } from 'vue-i18n'
import { toolsext } from '@store/Modules/toolsext'
import { useQuasar } from 'quasar'
import { costanti } from '@costanti'
import { shared_consts } from '@/common/shared_vuejs'
import { shared_consts } from '@src/common/shared_vuejs'
import { CProductCard } from '@src/components/CProductCard'
import { CMySelect } from '@src/components/CMySelect'
import { CContainerCatalogoCard } from '@src/components/CContainerCatalogoCard'
import { CSelectUserActive } from '@src/components/CSelectUserActive'
import {
import type {
IOptCatalogo, IDimensioni, IFilterCatalogo,
IMyScheda, IProdView, IProduct, ISchedaSingola, ISearchList, ICatalog, IImg, IMyPage,
IMyScheda, IProdView, IProduct, ISchedaSingola, ISearchList, ICatalog, IImg
} from 'model';
import {
IMyPage,
} from 'model'
@@ -169,7 +173,7 @@ export default defineComponent({
if (loadpage.value)
tools.setCookie(tools.COOK_CATEGORIA, cat.value.toString())
filter.value.author = '' // disattivo il filtro autore
filter.value.author = '' // disattivo il filtro autore
resetSearch()
calcArrProducts()
@@ -235,7 +239,7 @@ export default defineComponent({
function resetSearch() {
const mialista = getSearchList()
if (mialista && mialista.value && mialista.value.hasOwnProperty('name')) {
if (mialista && mialista.value && tools.existProp(mialista.value, 'name')) {
mialista.value = null
}
search.value = ''
@@ -249,11 +253,17 @@ export default defineComponent({
function getSearchText(): string {
const lista = getSearchList()
return lista && lista.value && lista.value.hasOwnProperty('name') ? lista.value.name : ''
return lista && lista.value && tools.existProp(lista.value, 'name') ? lista.value.name : ''
}
function getTitoloCatalogo(): string {
const trovatocatalogo = getCatalogoByMyPage.value
return trovatocatalogo ? trovatocatalogo.title : 'Catalogo'
}
function getImgIntroCatalogo(scheda: IMyScheda): IImg {
let trovatocatalogo = getCatalogoByMyPage.value
const trovatocatalogo = getCatalogoByMyPage.value
let imagefile = ''
let fit = ''
@@ -263,7 +273,7 @@ export default defineComponent({
if (recimg) {
imagefile = recimg.imagefile!
fit = recimg.fit! || 'contain'
imagefile = imagefile ? `url(${costanti.DIR_UPLOAD + shared_consts.getDirectoryByTable(shared_consts.TABLES_CATALOG) + '/' + trovatocatalogo._id + '/' + imagefile})` : ''
imagefile = imagefile ? `url(${tools.getDirUpload() + shared_consts.getDirectoryByTable(shared_consts.TABLES_CATALOG) + '/' + trovatocatalogo._id + '/' + imagefile})` : ''
}
}
@@ -271,14 +281,14 @@ export default defineComponent({
}
function getSfondoImgCatalogo(scheda?: IMyScheda | null, mypage?: IDimensioni): IImg {
let trovatocatalogo = getCatalogoByMyPage.value
const trovatocatalogo = getCatalogoByMyPage.value
let imagefile = ''
let fit = ''
if (trovatocatalogo) {
// Cerca prima se c'è un Immagine Introduttiva
const recimgintro = getImgIntroCatalogo(scheda!)
const recimgintro = getImgIntroCatalogo(scheda)
if (recimgintro.imagefile) {
imagefile = recimgintro.imagefile!
fit = recimgintro.fit! || 'contain'
@@ -289,18 +299,18 @@ export default defineComponent({
if (!imagefile && recimg) {
imagefile = recimg.imagefile!
fit = recimg.fit! || 'contain'
imagefile = imagefile ? `url(${costanti.DIR_UPLOAD + shared_consts.getDirectoryByTable(shared_consts.TABLES_CATALOG) + '/' + trovatocatalogo._id + '/' + imagefile})` : ''
imagefile = imagefile ? `url(${tools.getDirUpload() + shared_consts.getDirectoryByTable(shared_consts.TABLES_CATALOG) + '/' + trovatocatalogo._id + '/' + imagefile})` : ''
}
}
if (!imagefile && scheda) {
imagefile = scheda.dimensioni?.pagina?.dimensioni?.imgsfondo!.imagefile!
imagefile = imagefile ? `url(${costanti.DIR_UPLOAD + costanti.DIR_SCHEDA + imagefile})` : ''
fit = scheda.dimensioni?.pagina?.dimensioni?.imgsfondo!.fit!
imagefile = scheda.dimensioni?.pagina?.dimensioni?.imgsfondo!.imagefile
imagefile = imagefile ? `url(${tools.getDirUpload() + costanti.DIR_SCHEDA + imagefile})` : ''
fit = scheda.dimensioni?.pagina?.dimensioni?.imgsfondo!.fit
}
if (!imagefile && mypage) {
imagefile = mypage.imgsfondo!.imagefile!
imagefile = imagefile ? `url(${costanti.DIR_UPLOAD + costanti.DIR_CATALOGO + imagefile})` : ''
imagefile = imagefile ? `url(${tools.getDirUpload() + costanti.DIR_CATALOGO + imagefile})` : ''
fit = mypage.imgsfondo!.fit!
}
@@ -311,7 +321,7 @@ export default defineComponent({
let idCollane: number[] = []
// Cerca se nella lista cataloghi c'è la Collana di questa Pagina !
let trovatocatalogo = getCatalogoByMyPage.value
const trovatocatalogo = getCatalogoByMyPage.value
if (trovatocatalogo) {
idCollane = trovatocatalogo.idCollane! || []
@@ -326,12 +336,16 @@ export default defineComponent({
let argomenti: string[] = []
// Cerca se nella lista cataloghi c'è la Collana di questa Pagina !
let trovatocatalogo = getCatalogoByMyPage.value
const trovatocatalogo = getCatalogoByMyPage.value
if (trovatocatalogo) {
argomenti = trovatocatalogo.argomenti! || []
} else {
argomenti = def_argomenti || []
if (def_argomenti && def_argomenti.length > 0) {
argomenti = def_argomenti
} else {
argomenti = []
}
}
return argomenti
@@ -341,7 +355,7 @@ export default defineComponent({
let editore: string[] = []
// Cerca se nella lista cataloghi c'è la Collana di questa Pagina !
let trovatocatalogo = getCatalogoByMyPage.value
const trovatocatalogo = getCatalogoByMyPage.value
if (trovatocatalogo) {
editore = trovatocatalogo.editore! || []
@@ -362,38 +376,38 @@ export default defineComponent({
const searchtext = getSearchText()
let arrprod = productStore.getProducts(cosa.value) || [];
let filtroAuthor = filter.value.author || '';
const filtroAuthor = filter.value.author || '';
//++AddCATALOGO_FIELDS
let filtroProductTypes = optcatalogo.value.productTypes || [0]
let filtroExcludeProductTypes = optcatalogo.value.excludeproductTypes || [0]
let boolfiltroVuotoProductTypes = (filtroProductTypes.length === 0 || (filtroProductTypes.length === 1 && (filtroProductTypes[0] === 0)))
let boolfiltroVuotoExcludeProductTypes = filtroExcludeProductTypes.length === 0
const filtroProductTypes = optcatalogo.value.productTypes || [0]
const filtroExcludeProductTypes = optcatalogo.value.excludeproductTypes || [0]
const boolfiltroVuotoProductTypes = (filtroProductTypes.length === 0 || (filtroProductTypes.length === 1 && (filtroProductTypes[0] === 0)))
const boolfiltroVuotoExcludeProductTypes = filtroExcludeProductTypes.length === 0
let editore = getEditoreDaFiltrare(optcatalogo.value.editore)
let filtroPublishers = editore || []
const editore = getEditoreDaFiltrare(optcatalogo.value.editore)
const filtroPublishers = editore || []
let idCollane = getIdCollaneDaFiltrare(optcatalogo.value.idCollane!)
let filtroCollane = idCollane || []
let boolfiltroVuotoEditore = (filtroPublishers.length === 0)
let boolfiltroVuotoCollane = (filtroCollane.length === 0)
const idCollane = getIdCollaneDaFiltrare(optcatalogo.value.idCollane)
const filtroCollane = idCollane || []
const boolfiltroVuotoEditore = (filtroPublishers.length === 0)
const boolfiltroVuotoCollane = (filtroCollane.length === 0)
//console.log('filtroVersione', filtroProductTypes)
let catstr = ''
const catstr = ''
if (optcatalogo.value.argomenti && optcatalogo.value.argomenti.length > 0) {
// ha la priorità questo scelto sul catalogo
arrargomstr = getArgomentiDaFiltrare(optcatalogo.value.argomenti!)
arrargomstr = getArgomentiDaFiltrare(optcatalogo.value.argomenti)
} else {
arrargomstr = getArgomentiDaFiltrare([cat.value || ''])
arrargomstr = getArgomentiDaFiltrare(cat.value ? [cat.value] : [])
// catstr = cat.value || ''
}
let filtroArgomenti = arrargomstr || []
let boolfiltroVuotoArgomenti = (filtroArgomenti.length === 0)
const filtroArgomenti = arrargomstr || []
const boolfiltroVuotoArgomenti = (filtroArgomenti.length === 0)
let gasselstr = ''
if (cosa.value === shared_consts.PROD.GAS) {
@@ -401,13 +415,13 @@ export default defineComponent({
}
let lowerSearchText = (searchtext || '').toLowerCase().trim();
lowerSearchText = lowerSearchText.replace(/[-@:=]/g, '');
if ((!lowerSearchText || (lowerSearchText && lowerSearchText.length < 2)) && !catstr && boolfiltroVuotoArgomenti && boolfiltroVuotoProductTypes && boolfiltroVuotoExcludeProductTypes && boolfiltroVuotoCollane && boolfiltroVuotoEditore && boolfiltroVuotoCollana && !filtroAuthor && (!gasselstr && (cosa.value !== shared_consts.PROD.GAS))) {
if ((!lowerSearchText || (lowerSearchText && lowerSearchText.length < 2)) && !catstr && boolfiltroVuotoArgomenti && boolfiltroVuotoProductTypes && boolfiltroVuotoExcludeProductTypes && boolfiltroVuotoCollane && boolfiltroVuotoEditore && !filtroAuthor && (!gasselstr && (cosa.value !== shared_consts.PROD.GAS))) {
} else {
arrprod = arrprod.filter((product: IProduct) => {
if (product && product.productInfo) {
let lowerName = (product.productInfo.name || '').toLowerCase();
const lowerName = (product.productInfo.name || '').toLowerCase();
let hasCategoria = false
let hasArgomentiCat = true
if (arrargomstr && arrargomstr.length > 0) {
@@ -417,7 +431,7 @@ export default defineComponent({
hasCategoria = (!catstr || (catstr && (product.productInfo.idCatProds || []).includes(catstr))) ? true : false
}
let hasAuthor = !filtroAuthor || (filtroAuthor && (product.productInfo.idAuthors || []).includes(filtroAuthor));
const hasAuthor = !filtroAuthor || (filtroAuthor && (product.productInfo.idAuthors || []).includes(filtroAuthor));
let hasProductTypes = true
let hasPublished = true
@@ -431,10 +445,10 @@ export default defineComponent({
hasProductTypes = !optcatalogo.value.productTypes || (optcatalogo.value.productTypes && (product.productInfo.productTypes || []).some((item: any) => optcatalogo.value.productTypes!.includes(item)))
}
if (optcatalogo.value && !boolfiltroVuotoEditore) {
hasPublished = !editore || (editore && editore.includes(product.productInfo.idPublisher!))
hasPublished = !editore || (editore && editore.includes(product.productInfo.idPublisher))
}
if (optcatalogo.value && !boolfiltroVuotoCollane) {
hasCollana = !idCollane || (idCollane && idCollane.includes(product.productInfo.idCollana!))
hasCollana = !idCollane || (idCollane && idCollane.includes(product.productInfo.idCollana))
}
if (optcatalogo.value && !boolfiltroVuotoExcludeProductTypes) {
@@ -448,11 +462,11 @@ export default defineComponent({
}
// Use a regular expression to match whole words
let codeMatch = new RegExp(`\\b${lowerSearchText}\\b`, 'i');
const codeMatch = new RegExp(`\\b${lowerSearchText}\\b`, 'i');
// let nameMatch = new RegExp(`\\b(?=.*\\b${lowerSearchText.split(/\s+/).map(word => `(${word})\\b`).join('.*\\b')}\\b)`, 'i');
// Check if all words in lowerSearchText are present in lowerName
let allWordsPresent = lowerSearchText.split(/\s+/).every(word => new RegExp(`\\b${word}\\b`, 'i').test(lowerName));
const allWordsPresent = lowerSearchText.split(/\s+/).every(word => new RegExp(`\\b${word}\\b`, 'i').test(lowerName));
return (codeMatch.test(product.productInfo.code || '') || allWordsPresent) && hasCategoria && hasCollana && hasArgomentiCat && hasAuthor && productgassel && hasProductTypes && hasPublished && !hasExcludeProductTypes;
} else {
@@ -483,13 +497,13 @@ export default defineComponent({
const arrschede: ISchedaSingola[] = globalStore.getMySchede()
const myfindscheda = arrschede.find((recscheda: ISchedaSingola) => recscheda.scheda?._id === idTemplate)
let mynewscheda = tools.jsonCopy(origScheda)
const mynewscheda = tools.jsonCopy(origScheda)
const linkIdTemplate = origScheda.scheda?.linkIdTemplate
const precname = origScheda.scheda?.name
if (myfindscheda) {
let myschedatocopy = tools.jsonCopy(myfindscheda)
const myschedatocopy = tools.jsonCopy(myfindscheda)
if (myschedatocopy) {
myschedatocopy.scheda._id = origScheda.scheda?._id
@@ -505,7 +519,7 @@ export default defineComponent({
}
function populateDataWithlinkIdTemplate() {
console.log('populateDataWithlinkIdTemplate')
// console.log('populateDataWithlinkIdTemplate')
if (optcatalogo.value) {
@@ -521,7 +535,7 @@ export default defineComponent({
}
}
console.log(' FINE - populateDataWithlinkIdTemplate')
// console.log(' FINE - populateDataWithlinkIdTemplate')
}
@@ -532,20 +546,20 @@ export default defineComponent({
let arrargomstr: any = []
let arrprod = productStore.getProducts(cosa.value) || [];
let filtroAuthor = filter.value.author || '';
const filtroAuthor = filter.value.author || '';
let filtroProductTypes = scheda.productTypes || [0]
let filtroExcludeProductTypes = scheda.excludeproductTypes || [0]
let boolfiltroVuotoProductTypes = (filtroProductTypes.length === 0 || (filtroProductTypes.length === 1 && (filtroProductTypes[0] === 0)))
let boolfiltroVuotoExcludeProductTypes = filtroExcludeProductTypes.length === 0
const filtroProductTypes = scheda.productTypes || [0]
const filtroExcludeProductTypes = scheda.excludeproductTypes || [0]
const boolfiltroVuotoProductTypes = (filtroProductTypes.length === 0 || (filtroProductTypes.length === 1 && (filtroProductTypes[0] === 0)))
const boolfiltroVuotoExcludeProductTypes = filtroExcludeProductTypes.length === 0
let editore = getEditoreDaFiltrare(scheda.editore)
let filtroPublishers = editore || []
const editore = getEditoreDaFiltrare(scheda.editore)
const filtroPublishers = editore || []
let idCollane = getIdCollaneDaFiltrare(scheda.idCollane)
let filtroCollane = idCollane || []
let boolfiltroVuotoEditore = (filtroPublishers.length === 0)
let boolfiltroVuotoCollane = (filtroCollane.length === 0)
const idCollane = getIdCollaneDaFiltrare(scheda.idCollane)
const filtroCollane = idCollane || []
const boolfiltroVuotoEditore = (filtroPublishers.length === 0)
const boolfiltroVuotoCollane = (filtroCollane.length === 0)
//console.log('filtroVersione', filtroProductTypes)
@@ -553,7 +567,7 @@ export default defineComponent({
if (optcatalogo.value.argomenti && optcatalogo.value.argomenti.length > 0) {
// ha la priorità questo scelto sul catalogo
arrargomstr = getArgomentiDaFiltrare(optcatalogo.value.argomenti!)
arrargomstr = getArgomentiDaFiltrare(optcatalogo.value.argomenti)
} else {
catstr = cat.value || ''
}
@@ -562,15 +576,15 @@ export default defineComponent({
if (cosa.value === shared_consts.PROD.GAS) {
gasselstr = idGasSel.value || '';
}
let lowerSearchTexts = (searchtext || []).map((text: string) =>
const lowerSearchTexts = (searchtext || []).map((text: string) =>
text.toLowerCase().trim().replace(/[-@:=]/g, '')
)
// Remove the condition that skips filtering if search text is too short
// Now it will work with multiple search terms
arrprod = arrprod.filter((product: IProduct) => {
if (product && product.productInfo) {
let lowerName = (product.productInfo.name || '').toLowerCase();
let lowerCode = (product.productInfo.code || '').toLowerCase();
const lowerName = (product.productInfo.name || '').toLowerCase();
const lowerCode = (product.productInfo.code || '').toLowerCase();
let hasCategoria = false
let hasArgomentiCat = true
@@ -581,15 +595,15 @@ export default defineComponent({
hasCategoria = (!catstr || (catstr && (product.productInfo.idCatProds || []).includes(catstr))) ? true : false
}
let hasAuthor = !filtroAuthor || (filtroAuthor && (product.productInfo.idAuthors || []).includes(filtroAuthor));
const hasAuthor = !filtroAuthor || (filtroAuthor && (product.productInfo.idAuthors || []).includes(filtroAuthor));
// Check if ANY search term matches the product name or code
let searchMatch = lowerSearchTexts.length === 0 || lowerSearchTexts.some((searchTerm: any) => {
const searchMatch = lowerSearchTexts.length === 0 || lowerSearchTexts.some((searchTerm: any) => {
// Check if the entire search term is a whole word in name or code
let codeMatch = new RegExp(`\\b${searchTerm}\\b`, 'i').test(lowerCode);
const codeMatch = new RegExp(`\\b${searchTerm}\\b`, 'i').test(lowerCode);
// Check if all words in the search term are present in the name
let allWordsPresent = searchTerm.split(/\s+/).every((word: string) =>
const allWordsPresent = searchTerm.split(/\s+/).every((word: string) =>
new RegExp(`\\b${word}\\b`, 'i').test(lowerName)
);
@@ -606,11 +620,11 @@ export default defineComponent({
hasProductTypes = !scheda.productTypes || (scheda.productTypes && (product.productInfo.productTypes || []).some((item: any) => scheda.productTypes!.includes(item)))
}
if (!boolfiltroVuotoEditore) {
hasPublished = !editore || (editore && editore.includes(product.productInfo.idPublisher!))
hasPublished = !editore || (editore && editore.includes(product.productInfo.idPublisher))
}
if (optcatalogo.value && !boolfiltroVuotoCollane) {
hasCollane = !idCollane || (idCollane && idCollane.includes(product.productInfo.idCollana!))
hasCollane = !idCollane || (idCollane && idCollane.includes(product.productInfo.idCollana))
}
if (!boolfiltroVuotoExcludeProductTypes) {
@@ -625,7 +639,7 @@ export default defineComponent({
}
})
arrprod = getProductsSorted(arrprod, scheda?.sort_field!, scheda?.sort_dir!);
arrprod = getProductsSorted(arrprod, scheda?.sort_field, scheda?.sort_dir);
return arrprod
@@ -706,7 +720,7 @@ export default defineComponent({
}
function generatearrProdToViewSorted() {
console.log('generatearrProdToViewSorted...')
// console.log('generatearrProdToViewSorted...')
try {
@@ -717,15 +731,15 @@ export default defineComponent({
const arrGeneraleProdotti = arrProducts.value;
let indprod = 0
let indprodGenerale = 0
const indprodGenerale = 0
let indtotale = 0
for (const recscheda of optcatalogo.value.arrSchede!) {
if (recscheda && recscheda.scheda) {
let schedePerRiga = recscheda.scheda.numschede_perRiga || 1
let schedePerCol = recscheda.scheda.numschede_perCol || 1
let schedePerPagina = schedePerRiga * schedePerCol
const schedePerRiga = recscheda.scheda.numschede_perRiga || 1
const schedePerCol = recscheda.scheda.numschede_perCol || 1
const schedePerPagina = schedePerRiga * schedePerCol
let arrProdFiltrati: IProduct[] = []
@@ -734,8 +748,8 @@ export default defineComponent({
arrProdFiltrati = getProductsFilteredByScheda(recscheda.scheda)
indprod = 0
} else {
if (recscheda.scheda?.sort_field!) {
arrProdFiltrati = getProductsSorted(arrGeneraleProdotti, recscheda.scheda.sort_field!, recscheda.scheda.sort_dir!);
if (recscheda.scheda.sort_field!) {
arrProdFiltrati = getProductsSorted(arrGeneraleProdotti, recscheda.scheda.sort_field, recscheda.scheda.sort_dir);
indprod = 0
} else {
indprod = indprodGenerale
@@ -762,8 +776,8 @@ export default defineComponent({
indprod = result.indprod // Aggiorna indprod per il prossimo giro
if (result.myrec) {
let riga = Math.floor(indadded / schedePerCol)
let col = indadded % schedePerCol
const riga = Math.floor(indadded / schedePerCol)
const col = indadded % schedePerCol
if (!recscheda.arrProdToShow[pagina][riga]) {
recscheda.arrProdToShow[pagina][riga] = [];
@@ -779,12 +793,12 @@ export default defineComponent({
if (optcatalogo.value.maxnumlibri! > 0) {
if (indtotale > optcatalogo.value.maxnumlibri!)
return
} else {
if (indtotale > 200)
return
}
}
}
}
@@ -804,7 +818,7 @@ export default defineComponent({
// console.log('Fine Generazione')
}
console.log(' FINE - generatearrProdToViewSorted !')
// console.log(' FINE - generatearrProdToViewSorted !')
} catch (e) {
console.error('Err', e)
@@ -814,7 +828,7 @@ export default defineComponent({
}
function getNextProd() {
let nextRecord = arrProdToView.value.find((rec: any) => !rec.showed)
const nextRecord = arrProdToView.value.find((rec: any) => !rec.showed)
// Se un tale record esiste, impostalo su mostrato
if (nextRecord) {
@@ -831,10 +845,10 @@ export default defineComponent({
if (!search.value) {
return arrprod
}
let lowerSearchText = search.value.toLowerCase();
let catstr = cat.value;
return arrprod.filter((product: IProduct) => {
let lowerName = product.productInfo.name!.toLowerCase();
const hasCategoria = !catstr || (catstr && product.productInfo.idCatProds?.includes(catstr));
@@ -895,8 +909,8 @@ export default defineComponent({
});
function getCatProds() {
let arrcat = productStore.getCatProds(cosa.value)
let riscat: any = [{ label: 'Tutti', value: '', icon: undefined, color: undefined }]
const arrcat = productStore.getCatProds(cosa.value)
const riscat: any = [{ label: 'Tutti', value: '', icon: undefined, color: undefined }]
for (const rec of arrcat) {
riscat.push({ label: rec.name, value: rec._id, icon: rec.icon, color: rec.color })
}
@@ -956,7 +970,7 @@ export default defineComponent({
}
}*/
const valoriopt = computed(() => (item: any, addall: boolean, addnone: boolean) => {
const valoriopt = computed(() => (item: any, addall: boolean, addnone?: boolean = false) => {
// console.log('valoriopt', item.table)
return globalStore.getTableJoinByName(item.table, addall, addnone, item.filter)
})
@@ -995,12 +1009,12 @@ export default defineComponent({
// Esiste un immagine di sfondo specifica della singola pagina ?
let recimg = getSfondoImgCatalogo(scheda)
let backgroundImage = recimg.imagefile! ?? ''
let backgroundSize = recimg.fit
const recimg = getSfondoImgCatalogo(scheda)
const backgroundImage = recimg.imagefile! ?? ''
const backgroundSize = recimg.fit
let width = scheda.dimensioni?.pagina?.dimensioni?.size?.width ? tools.adjustSize(optcatalogo, scheda.dimensioni?.pagina?.dimensioni?.size?.width) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.size?.width) ?? '')
let height = scheda.dimensioni?.pagina?.dimensioni?.size?.height ? tools.adjustSize(optcatalogo, scheda.dimensioni?.pagina?.dimensioni?.size?.height) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.size?.height) ?? '')
const width = scheda.dimensioni?.pagina?.dimensioni?.size?.width ? tools.adjustSize(optcatalogo, scheda.dimensioni?.pagina?.dimensioni?.size?.width) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.size?.width) ?? '')
const height = scheda.dimensioni?.pagina?.dimensioni?.size?.height ? tools.adjustSize(optcatalogo, scheda.dimensioni?.pagina?.dimensioni?.size?.height) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.size?.height) ?? '')
return {
marginBottom,
@@ -1021,32 +1035,32 @@ export default defineComponent({
}
function generateStyleByPageDim(optcatalogo: IOptCatalogo, mypage: IDimensioni) {
const marginTop = mypage!.margini?.top ? tools.adjustSize(optcatalogo, mypage!.margini?.top) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.margini?.top) || '')
const marginBottom = mypage!.margini?.bottom ? tools.adjustSize(optcatalogo, mypage!.margini?.bottom) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.margini?.bottom) || '')
const marginLeft = mypage!.margini?.left ? tools.adjustSize(optcatalogo, mypage!.margini?.left) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.margini?.left) || '')
const marginRight = mypage!.margini?.right ? tools.adjustSize(optcatalogo, mypage!.margini?.right) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.margini?.right) || '')
const marginTop = mypage.margini?.top ? tools.adjustSize(optcatalogo, mypage.margini?.top) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.margini?.top) || '')
const marginBottom = mypage.margini?.bottom ? tools.adjustSize(optcatalogo, mypage.margini?.bottom) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.margini?.bottom) || '')
const marginLeft = mypage.margini?.left ? tools.adjustSize(optcatalogo, mypage.margini?.left) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.margini?.left) || '')
const marginRight = mypage.margini?.right ? tools.adjustSize(optcatalogo, mypage.margini?.right) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.margini?.right) || '')
const paddingTop = mypage!.padding?.top ? tools.adjustSize(optcatalogo, mypage!.padding?.top) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.padding?.top) || '')
const paddingBottom = mypage!.padding?.bottom ? tools.adjustSize(optcatalogo, mypage!.padding?.bottom) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.padding?.bottom) ?? '')
const paddingLeft = mypage!.padding?.left ? tools.adjustSize(optcatalogo, mypage!.padding?.left) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.padding?.left) ?? '')
const paddingRight = mypage!.padding?.right ? tools.adjustSize(optcatalogo, mypage!.padding?.right) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.padding?.right) ?? '')
const paddingTop = mypage.padding?.top ? tools.adjustSize(optcatalogo, mypage.padding?.top) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.padding?.top) || '')
const paddingBottom = mypage.padding?.bottom ? tools.adjustSize(optcatalogo, mypage.padding?.bottom) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.padding?.bottom) ?? '')
const paddingLeft = mypage.padding?.left ? tools.adjustSize(optcatalogo, mypage.padding?.left) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.padding?.left) ?? '')
const paddingRight = mypage.padding?.right ? tools.adjustSize(optcatalogo, mypage.padding?.right) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.padding?.right) ?? '')
// Esiste un immagine di sfondo specifica della singola pagina ?
let recimg = getSfondoImgCatalogo(null, mypage)
const recimg = getSfondoImgCatalogo(null, mypage)
let fileimg = recimg.imagefile! ?? ''
let backgroundSize = recimg.fit
if (!fileimg) {
// Esiste un immagine di sfondo uguali per tutte le pagine ?
fileimg = optcatalogo.dimensioni_def?.pagina.imgsfondo?.imagefile!
backgroundSize = optcatalogo.dimensioni_def?.pagina.imgsfondo?.fit!
fileimg = fileimg ? `url(${costanti.DIR_UPLOAD + costanti.DIR_CATALOGO + fileimg})` : ''
fileimg = optcatalogo.dimensioni_def?.pagina.imgsfondo?.imagefile
backgroundSize = optcatalogo.dimensioni_def?.pagina.imgsfondo?.fit
fileimg = fileimg ? `url(${tools.getDirUpload() + costanti.DIR_CATALOGO + fileimg})` : ''
}
let backgroundImage = fileimg ?? ''
const backgroundImage = fileimg ?? ''
let width = mypage!.size?.width ? tools.adjustSize(optcatalogo, mypage!.size?.width) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.size?.width) ?? '')
let height = mypage!.size?.height ? tools.adjustSize(optcatalogo, mypage!.size?.height) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.size?.height) ?? '')
const width = mypage.size?.width ? tools.adjustSize(optcatalogo, mypage.size?.width) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.size?.width) ?? '')
const height = mypage.size?.height ? tools.adjustSize(optcatalogo, mypage.size?.height) : (tools.adjustSize(optcatalogo, optcatalogo.dimensioni_def?.pagina?.size?.height) ?? '')
return {
marginBottom,
@@ -1099,7 +1113,7 @@ export default defineComponent({
const paddingLeft = tools.adjustSize(optcatalogo.value, recscheda.scheda?.dimensioni?.riga?.padding?.left) || '0';
const paddingRight = tools.adjustSize(optcatalogo.value, recscheda.scheda?.dimensioni?.riga?.padding?.right) || '0';
let out: any = {
const out: any = {
placeContent,
flex: `0 1 ${width} !important`,
margin: `${marginTop} ${marginRight} ${marginBottom} ${marginLeft}`,
@@ -1207,6 +1221,7 @@ export default defineComponent({
getTestoIntroduttivo,
ispageCatalogata,
naviga,
getTitoloCatalogo,
}
}
})

View File

@@ -1,5 +1,11 @@
<template>
<q-page>
<div
v-if="ispageCatalogata"
class="text-bold text-h6 text-center text-blue"
>
{{ getTitoloCatalogo() }}
</div>
<q-tabs
v-if="optcatalogo.pdf && tools.isEditor()"
v-model="tabcatalogo"
@@ -217,7 +223,7 @@
<span
v-show="productStore.getNumProdTot() !== arrProducts.length"
>{{
t('ecomm.prodotti_trovati', {
t("ecomm.prodotti_trovati", {
qta: arrProducts.length,
qtatot: productStore.getNumProdTot(),
})
@@ -275,7 +281,7 @@
v-if="
product.active ||
(show_hide &&
productInfo.productTypes.includes(
product.productInfo.productTypes.includes(
shared_consts.PRODUCTTYPE.PRODUCT
))
"
@@ -456,7 +462,7 @@
<div>
Sfondo:
{{
costanti.DIR_UPLOAD +
tools.getDirUpload() +
costanti.DIR_CATALOGO +
optcatalogo.dimensioni_def?.pagina.imgsfondo?.imagefile
}}
@@ -465,7 +471,7 @@
<q-img
v-if="optcatalogo.dimensioni_def?.pagina.imgsfondo?.imagefile"
:src="
costanti.DIR_UPLOAD +
tools.getDirUpload() +
costanti.DIR_CATALOGO +
optcatalogo.dimensioni_def?.pagina.imgsfondo?.imagefile
"
@@ -478,7 +484,7 @@
<div>
Prima Pagina:
{{
costanti.DIR_UPLOAD +
tools.getDirUpload() +
costanti.DIR_CATALOGO +
optcatalogo.first_page.imgsfondo.imagefile
}}
@@ -486,7 +492,7 @@
<q-img
:src="
costanti.DIR_UPLOAD +
tools.getDirUpload() +
costanti.DIR_CATALOGO +
optcatalogo.first_page.imgsfondo.imagefile
"
@@ -495,7 +501,7 @@
<div>
Ultima Pagina:
{{
costanti.DIR_UPLOAD +
tools.getDirUpload() +
costanti.DIR_CATALOGO +
optcatalogo.last_page.imgsfondo.imagefile
}}
@@ -503,7 +509,7 @@
<q-img
:src="
costanti.DIR_UPLOAD +
tools.getDirUpload() +
costanti.DIR_CATALOGO +
optcatalogo.last_page.imgsfondo.imagefile
"
@@ -525,11 +531,11 @@
<pre>
<strong>PASSI DA COMPIERE PER FARE AGGIORNAMENTI :</strong>
1. Ottenere il file delle descrizioni aggiornato (da Matteo chiedere l'export di tutti i prodotti presenti su GruppoMacro - XML)
1. Ottenere il file delle descrizioni aggiornato (da Matteo chiedere l'export di tutti i prodotti presenti su GruppoMacro - XML)
2. Eseguire "IMPORTA DESCRIZIONI E LINK DA SITO GRUPPOMACRO (XML)" - importa_descrizioni_e_link.xml
3. Visualizza
3. Visualizza
<a
href="http://vps-88271abb.vps.ovh.net/apimacro/public/view-articles-fatturati"
target="_blank"
@@ -537,9 +543,9 @@
<a
href="http://vps-88271abb.vps.ovh.net/apimacro/public/view-articles-sales"
target="_blank"
>(Ranking Ordini)</a>
e controlla se tutto ok
>(Ranking Ordini)</a>
e controlla se tutto ok
4. Esporta il file del Ranking ed importarlo con "IMPORTA RANKING DA JSON"
<a
href="http://vps-88271abb.vps.ovh.net/apimacro/public/export-articles-sales-json"
@@ -552,7 +558,7 @@
target="_blank"
>Catalogo primofeed-2.json</a
>)
6. Esegui "Importa Cataloghi da JSON (ImportaMacro)"
7. GENERARE UN CATALOGO cliccando su "CREA CATALOGO ..."
@@ -604,5 +610,5 @@
</script>
<style lang="scss">
@import './catalogo.scss';
@import "./catalogo.scss";
</style>

View File

@@ -1,11 +1,11 @@
import { defineComponent, onMounted, ref } from 'vue'
import { tools } from '@store/Modules/tools'
import { tools } from '@tools'
import { useUserStore } from '@store/UserStore'
import { useRouter } from 'vue-router'
import { useRoute } from 'vue-router'
import { useGlobalStore } from '@store/globalStore'
import { useProducts } from '@store/Products'
import { useI18n } from '@/boot/i18n'
import { useI18n } from 'vue-i18n'
import { toolsext } from '@store/Modules/toolsext'
import { useQuasar } from 'quasar'
import { costanti } from '@costanti'
@@ -35,13 +35,13 @@ export default defineComponent({
// Inizializza
console.log('created productInfo')
console.log($route)
if (!!$route.params.idprod) {
if ($route.params.idprod) {
id.value = $route.params.idprod.toString()
}
if (!!$route.params.idprod) {
if ($route.params.idprod) {
cosa.value = tools.strToVal($route.params.cosa.toString())
}
}
onMounted(mounted)

View File

@@ -1,10 +1,10 @@
import { defineComponent, onMounted, ref, computed } from 'vue'
import { tools } from '@store/Modules/tools'
import { tools } from '@tools'
import { useUserStore } from '@store/UserStore'
import { useRouter } from 'vue-router'
import { useGlobalStore } from '@store/globalStore'
import { useProducts } from '@store/Products'
import { useI18n } from '@/boot/i18n'
import { useI18n } from 'vue-i18n'
import { toolsext } from '@store/Modules/toolsext'
import { useQuasar } from 'quasar'
import { costanti } from '@costanti'
@@ -14,7 +14,7 @@ import { shared_consts } from '@src/common/shared_vuejs'
import { CSingleCart } from '../../../components/CSingleCart'
import { CCart } from '../../../components/CCart'
import { CTitleBanner } from '@components'
import { CTitleBanner } from '@src/components/CTitleBanner'
export default defineComponent({
name: 'checkOut',
@@ -29,7 +29,7 @@ export default defineComponent({
const endload = ref(false)
async function mounted() {
// Inizializza
// Inizializza
await productStore.loadProducts()
endload.value = true

View File

@@ -1,10 +1,10 @@
import { defineComponent, onMounted, ref, watch } from 'vue'
import { tools } from '@store/Modules/tools'
import { tools } from '@tools'
import { useUserStore } from '@store/UserStore'
import { useRouter } from 'vue-router'
import { useGlobalStore } from '@store/globalStore'
import { useProducts } from '@store/Products'
import { useI18n } from '@/boot/i18n'
import { useI18n } from 'vue-i18n'
import { toolsext } from '@store/Modules/toolsext'
import { useQuasar } from 'quasar'
import { costanti } from '@costanti'
@@ -13,9 +13,11 @@ import { shared_consts } from '@src/common/shared_vuejs'
import { serv_constants } from '@store/Modules/serv_constants'
import { fieldsTable } from '@store/Modules/fieldsTable'
import { CSingleCart } from '../../../components/CSingleCart'
import { CTitleBanner, CMyFieldDb } from '@components'
import { ICart, IOrder, IOrderCart } from '@src/model'
import { CSingleCart } from '@src/components/CSingleCart'
import { CTitleBanner } from '@src/components/CTitleBanner'
import { CMyFieldDb } from '@src/components/CMyFieldDb'
import type { IOrderCart } from '@src/model';
import { ICart, IOrder } from '@src/model'
export default defineComponent({
name: 'OrderInfo',
@@ -231,7 +233,7 @@ export default defineComponent({
totalPriceCalc: orderscart.reduce((total: number, rec: any) => total + rec.totalPriceCalc, 0),
};
let rowsWithTotals: any = [...orderscart];
const rowsWithTotals: any = [...orderscart];
if (tools.isManager()) {
// Combine orders and totals
@@ -356,7 +358,7 @@ export default defineComponent({
const statusStr = shared_consts.getStatusStr(status)
$q.dialog({
message: 'Impostare l\'ordine di ' + tools.getNomeUtenteByRecUser(order.user!) + ' n. ' + order.numorder + ' ' + statusStr + ' ?',
message: 'Impostare l\'ordine di ' + tools.getNomeUtenteByRecUser(order.user) + ' n. ' + order.numorder + ' ' + statusStr + ' ?',
ok: {
label: t('dialog.yes'),
push: true

View File

@@ -1,11 +1,11 @@
import { defineComponent, onMounted, ref } from 'vue'
import { tools } from '@store/Modules/tools'
import { tools } from '@tools'
import { useUserStore } from '@store/UserStore'
import { useRouter } from 'vue-router'
import { useRoute } from 'vue-router'
import { useGlobalStore } from '@store/globalStore'
import { useProducts } from '@store/Products'
import { useI18n } from '@/boot/i18n'
import { useI18n } from 'vue-i18n'
import { toolsext } from '@store/Modules/toolsext'
import { useQuasar } from 'quasar'
import { costanti } from '@costanti'
@@ -34,10 +34,10 @@ export default defineComponent({
function mounted() {
// Inizializza
if (!!$route.params.idorderscart) {
if ($route.params.idorderscart) {
idOrdersCart.value = $route.params.idorderscart.toString()
}
}
onMounted(mounted)

View File

@@ -1,11 +1,11 @@
import { defineComponent, onMounted, ref } from 'vue'
import { tools } from '@store/Modules/tools'
import { tools } from '@tools'
import { useUserStore } from '@store/UserStore'
import { useRouter } from 'vue-router'
import { useRoute } from 'vue-router'
import { useGlobalStore } from '@store/globalStore'
import { useProducts } from '@store/Products'
import { useI18n } from '@/boot/i18n'
import { useI18n } from 'vue-i18n'
import { toolsext } from '@store/Modules/toolsext'
import { useQuasar } from 'quasar'
import { costanti } from '@costanti'
@@ -35,13 +35,13 @@ export default defineComponent({
// Inizializza
console.log('created productInfo')
console.log($route)
if (!!$route.params.idprod) {
if ($route.params.idprod) {
id.value = $route.params.idprod.toString()
}
if (!!$route.params.idprod) {
if ($route.params.idprod) {
cosa.value = tools.strToVal($route.params.cosa.toString())
}
}
onMounted(mounted)

View File

@@ -1,18 +1,18 @@
import { defineComponent, onMounted, ref, watch, computed, onBeforeUnmount } from 'vue'
import { tools } from '@store/Modules/tools'
import { tools } from '@tools'
import { useUserStore } from '@store/UserStore'
import { useRouter } from 'vue-router'
import { useGlobalStore } from '@store/globalStore'
import { useProducts } from '@store/Products'
import { useI18n } from '@/boot/i18n'
import { useI18n } from 'vue-i18n'
import { toolsext } from '@store/Modules/toolsext'
import { useQuasar } from 'quasar'
import { costanti } from '@costanti'
import { shared_consts } from '@/common/shared_vuejs'
import { shared_consts } from '@src/common/shared_vuejs'
import { CProductCard } from '@src/components/CProductCard'
import { CSelectUserActive } from '@src/components/CSelectUserActive'
import { IProduct } from '@src/model'
import type { IProduct } from '@src/model'
export default defineComponent({
name: 'ProductsList',
@@ -90,7 +90,7 @@ export default defineComponent({
cat.value = ''
subcat.value = ''
}
calcArrProducts()
})
@@ -99,22 +99,22 @@ export default defineComponent({
refreshpage.value = true
let arrprod = productStore.getProducts(cosa.value)
let catstr = cat.value;
let subcatstr = subcat.value;
const catstr = cat.value;
const subcatstr = subcat.value;
let gasselstr = ''
if (cosa.value === shared_consts.PROD.GAS) {
gasselstr = idGasSel.value
}
let lowerSearchText = search.value.toLowerCase().trim();
const lowerSearchText = search.value.toLowerCase().trim();
if ((!lowerSearchText || (lowerSearchText && lowerSearchText.length < 2)) && !catstr && !subcatstr && (!gasselstr && (cosa.value !== shared_consts.PROD.GAS))) {
} else {
arrprod = arrprod.filter((product: IProduct) => {
if (product && product.productInfo && !!product.productInfo.name) {
let lowerName = product.productInfo.name!.toLowerCase();
let hasCategoria = !catstr || (catstr && product.productInfo.idCatProds?.includes(catstr));
let hasSubCategoria = !subcatstr || (subcatstr && product.productInfo.idSubCatProds?.includes(subcatstr));
const lowerName = product.productInfo.name.toLowerCase();
const hasCategoria = !catstr || (catstr && product.productInfo.idCatProds?.includes(catstr));
const hasSubCategoria = !subcatstr || (subcatstr && product.productInfo.idSubCatProds?.includes(subcatstr));
let productgassel = true
if (gasselstr || (cosa.value === shared_consts.PROD.GAS)) {
@@ -122,13 +122,13 @@ export default defineComponent({
}
// Use a regular expression to match whole words
let codeMatch = new RegExp(`\\b${lowerSearchText}\\b`, 'i');
let nameMatch = new RegExp(`\\b${lowerSearchText}`, 'i');
const codeMatch = new RegExp(`\\b${lowerSearchText}\\b`, 'i');
const nameMatch = new RegExp(`\\b${lowerSearchText}`, 'i');
// Check if any word in lowerName starts with lowerSearchText
let anyWordStartsWithSearch = lowerName.split(/\s+/).some(word => nameMatch.test(word));
const anyWordStartsWithSearch = lowerName.split(/\s+/).some(word => nameMatch.test(word));
return (codeMatch.test(product.productInfo.code!) || anyWordStartsWithSearch) && hasCategoria && hasSubCategoria && productgassel;
return (codeMatch.test(product.productInfo.code) || anyWordStartsWithSearch) && hasCategoria && hasSubCategoria && productgassel;
}
});
}
@@ -143,10 +143,10 @@ export default defineComponent({
if (!search.value) {
return arrprod
}
let lowerSearchText = search.value.toLowerCase();
let catstr = cat.value;
return arrprod.filter((product: IProduct) => {
let lowerName = product.productInfo.name!.toLowerCase();
const hasCategoria = !catstr || (catstr && product.productInfo.idCatProds?.includes(catstr));
@@ -180,7 +180,7 @@ export default defineComponent({
});
function getCatProds() {
let arrcat = productStore.getCatProds(cosa.value)
const arrcat = productStore.getCatProds(cosa.value)
let riscat: any = []
if (arrcat && arrcat.length > 0) {
riscat = [{ label: 'Tutti', value: '', icon: undefined, color: undefined }]
@@ -192,7 +192,7 @@ export default defineComponent({
return riscat
}
function getCatProdsByGas(idGasOrdine: string): any {
let arrcat = productStore.getCatProdsByGas(idGasOrdine)
const arrcat = productStore.getCatProdsByGas(idGasOrdine)
let riscat: any = []
if (arrcat && arrcat.length > 0) {
riscat = [{ label: 'Tutti', value: '', icon: undefined, color: undefined }]
@@ -204,7 +204,7 @@ export default defineComponent({
return riscat
}
function getSubCatProdsByGas(idGasOrdine: string, idCatProd: string): any {
let arrcat = productStore.getSubCatProdsByGas(idGasOrdine, idCatProd)
const arrcat = productStore.getSubCatProdsByGas(idGasOrdine, idCatProd)
let riscat: any = []
if (arrcat && arrcat.length > 0) {
riscat = [{ label: 'Tutti', value: '', icon: undefined, color: undefined }]

View File

@@ -1,9 +1,9 @@
import { serv_constants } from '@store/Modules/serv_constants'
import { tools } from '@store/Modules/tools'
import { tools } from '@tools'
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'

View File

@@ -1,5 +1,5 @@
import { defineComponent, ref, computed } 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'
@@ -7,7 +7,7 @@ import { useQuasar } from 'quasar'
import { CMyPage } from '../../../components/CMyPage'
import { LandingFooter } from '../../../components/LandingFooter'
import { CTitleBanner } from '../../../components/CTitleBanner'
import { CSignUpIscrizioneArcadei } from '@/components/CSignUpIscrizioneArcadei'
import { CSignUpIscrizioneArcadei } from '@src/components/CSignUpIscrizioneArcadei'
export default defineComponent({
name: 'Iscrizionearcadei',

View File

@@ -1,5 +1,5 @@
import { defineComponent, ref, computed } 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'
@@ -7,7 +7,7 @@ import { useQuasar } from 'quasar'
import { CMyPage } from '../../../components/CMyPage'
import { LandingFooter } from '../../../components/LandingFooter'
import { CTitleBanner } from '../../../components/CTitleBanner'
import { CSignUpIscrizioneConacreis } from '@/components/CSignUpIscrizioneConacreis'
import { CSignUpIscrizioneConacreis } from '@src/components/CSignUpIscrizioneConacreis'
export default defineComponent({
name: 'Iscrizioneconacreis',

View File

@@ -1,4 +1,3 @@
/* eslint-disable */
export default {
Digitalizer: `<g>
<path fill="none" stroke="#FFFFFF" stroke-width="6" d="M259.476,280.364V247.5c0-12.958-10.542-23.5-23.5-23.5s-23.5,10.542-23.5,23.5v29.672 c0,35.757-13.173,70.087-37.094,96.665l-32.981,36.646c-2.771,3.079-2.521,7.821,0.558,10.593c3.078,2.771,7.82,2.521,10.592-0.558 l32.981-36.646c26.403-29.338,40.944-67.231,40.944-106.7V247.5c0-4.687,3.813-8.5,8.5-8.5s8.5,3.813,8.5,8.5v32.864 c0,44.003-16.301,86.167-45.901,118.727l-32.149,35.364c-2.786,3.064-2.56,7.809,0.505,10.595c1.437,1.307,3.242,1.95,5.042,1.95 c2.04,0,4.072-0.827,5.552-2.455l32.148-35.364C241.789,373.854,259.476,328.106,259.476,280.364z" />

View File

@@ -1,8 +1,8 @@
import { defineComponent } from 'vue'
import { LandingFooter } from '@/components/LandingFooter'
import { LandingFooter } from '@src/components/LandingFooter'
import { useUserStore } from '@store/UserStore'
import MixinUsers from '@/mixins/mixin-users'
import MixinUsers from '@src/mixins/mixin-users'
export default defineComponent({
name: 'Regok',

View File

@@ -1,6 +1,6 @@
import { defineComponent } from 'vue'
import { CSigninNoreg } from '@/components/CSigninNoreg'
import { CSigninNoreg } from '@src/components/CSigninNoreg'
export default defineComponent({
name: 'Signin',

View File

@@ -1,6 +1,6 @@
import { defineComponent } from 'vue'
import { CSigninNoreg } from '@/components/CSigninNoreg'
import { CSigninNoreg } from '@src/components/CSigninNoreg'
export default defineComponent({
name: 'SigninNoreg',

View File

@@ -1,10 +1,10 @@
import { computed, defineComponent, ref, watch } from 'vue'
import { CSignUp } from '../../../components/CSignUp'
import { useQuasar } from 'quasar'
import { useI18n } from '@/boot/i18n'
import { useI18n } from 'vue-i18n'
import { useUserStore } from '@store/UserStore'
import { useRoute } from 'vue-router'
import { tools } from '@store/Modules/tools'
import { tools } from '@tools'
export default defineComponent({
name: 'SignUp',
@@ -23,7 +23,7 @@ export default defineComponent({
adult.value = !!$route.params.invited
})
function created() {
function created() {
if (!tools.getCookie(tools.APORTADOR_SOLIDARIO, '')) {
// @ts-ignore
tools.setCookie(tools.APORTADOR_SOLIDARIO, $route.params.invited ? $route.params.invited : '')

View File

@@ -1,10 +1,10 @@
import { computed, defineComponent, ref, watch } from 'vue'
import { CSignUp } from '../../../components/CSignUp'
import { useQuasar } from 'quasar'
import { useI18n } from '@/boot/i18n'
import { useI18n } from 'vue-i18n'
import { useUserStore } from '@store/UserStore'
import { useRoute } from 'vue-router'
import { tools } from '@store/Modules/tools'
import { tools } from '@tools'
export default defineComponent({
name: 'SignUpCollettivo',
@@ -25,7 +25,7 @@ export default defineComponent({
adult.value = !!$route.params.invited
})
function created() {
function created() {
if (!tools.getCookie(tools.APORTADOR_SOLIDARIO, '')) {
// @ts-ignore
tools.setCookie(tools.APORTADOR_SOLIDARIO, $route.params.invited ? $route.params.invited : '')

View File

@@ -1,10 +1,10 @@
import { computed, defineComponent, ref, watch } from 'vue'
import { CSignUp } from '../../../components/CSignUp'
import { useQuasar } from 'quasar'
import { useI18n } from '@/boot/i18n'
import { useI18n } from 'vue-i18n'
import { useUserStore } from '@store/UserStore'
import { useRoute } from 'vue-router'
import { tools } from '@store/Modules/tools'
import { tools } from '@tools'
export default defineComponent({
name: 'SignUp_noteleg',
@@ -22,7 +22,7 @@ export default defineComponent({
adult.value = !!$route.params.invited
})
function created() {
function created() {
if (!tools.getCookie(tools.APORTADOR_SOLIDARIO, '')) {
// @ts-ignore
tools.setCookie(tools.APORTADOR_SOLIDARIO, $route.params.invited ? $route.params.invited : '')

View File

@@ -3,14 +3,15 @@ import { defineComponent, ref } from 'vue'
import { serv_constants } from '../../../store/Modules/serv_constants'
import './vreg.scss'
import { ICallResult, ILinkReg } from '../../../model/other'
import type { ILinkReg } from '../../../model/other';
import { ICallResult } from '../../../model/other'
import { CSigninNoreg } from '../../../components/CSigninNoreg'
import { useQuasar } from 'quasar'
import { useI18n } from '@src/boot/i18n'
import { useI18n } from 'vue-i18n'
import { useGlobalStore } from '@store/globalStore'
import { useRoute, useRouter } from 'vue-router'
import { useUserStore } from '@store/UserStore'
import { tools } from '@store/Modules/tools'
import { tools } from '@tools'
export default defineComponent({
@@ -41,7 +42,7 @@ export default defineComponent({
}
function load() {
// console.log('load VREG')
console.log('load VREG')
let param: ILinkReg = { idlink: '' }
if (route.query.idlink)
param = { idlink: route.query.idlink.toString() }

View File

@@ -1,12 +1,13 @@
import { defineComponent, ref, computed, watch } 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'
import { tools } from '@store/Modules/tools'
import { tools } from '@tools'
import { IChat, IMessage, IMsgUsers, StatusMessage } from 'model'
import type { IChat, IMessage, IMsgUsers } from 'model';
import { StatusMessage } from 'model'
import MixinUsers from '../../mixins/mixin-users'
import { CMyAvatar } from '../../components/CMyAvatar'
import { useRoute, useRouter } from 'vue-router'
@@ -119,7 +120,7 @@ export default defineComponent({
if (route.params.un === undefined || route.params.un === ':un') {
usernameloading.value = getLastUserChatted()
} else {
let mystr2: any = route.params.un ? route.params.un : ''
const mystr2: any = route.params.un ? route.params.un : ''
usernameloading.value = mystr2
}
@@ -234,7 +235,7 @@ export default defineComponent({
// @ts-ignore
function myonScroll({ target: { scrollTop, clientHeight, scrollHeight } }: {scrollTop: number, clientHeight: number, scrollHeight: number}) {
function myonScroll({ target: { scrollTop, clientHeight, scrollHeight } }: { scrollTop: number, clientHeight: number, scrollHeight: number }) {
if (scrollTop + clientHeight >= scrollHeight) {
loadMorePosts()
}
@@ -271,6 +272,7 @@ export default defineComponent({
Username,
func_tools,
tools,
miniState,
}
}
})

View File

@@ -18,14 +18,14 @@
<q-scroll-area class="fit">
<q-list bordered class="rounded-borders chat-list">
<q-item-label header class="title_msg">{{
$t('msgs.messages')
$t("msgs.messages")
}}</q-item-label>
<q-separator />
<div v-if="getNumMsg() === 0">
<q-item>
{{ $t('msgs.nomessage') }}
{{ $t("msgs.nomessage") }}
</q-item>
</div>
@@ -115,10 +115,7 @@
>
<div v-if="msg.dest">
<div>
<div
class="chat_dest"
v-if="msg.dest === Username()"
>
<div class="chat_dest" v-if="msg.dest === Username()">
<q-chat-message
:name="getUsernameChatByMsg(msg)"
:text="getMsgText(msg, true)"
@@ -163,7 +160,7 @@
</q-page>
</q-page-container>
</div>
<div class="bottomfixed row" :style="styletextbar">
<div class="bottomfixed row" :style="styletextbar()">
<div class="" style="max-width: 50px; align-self: center; order: 1">
<q-btn rounded size="sm" icon="fas fa-smile"> </q-btn>
</div>
@@ -192,5 +189,5 @@
</script>
<style lang="scss" scoped>
@import './messages.scss';
@import "./messages.scss";
</style>

View File

@@ -4,7 +4,7 @@ export default defineComponent({
name: 'Offline',
setup() {
function logoimg() {
return 'º' + process.env.LOGO_REG
return 'º' + import.meta.env.VITE_LOGO_REG
}
return {

View File

@@ -1,9 +1,9 @@
import { defineComponent, ref, onMounted } 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'
import { IEstimate } from '@src/model'
import type { IEstimate } from '@src/model'
import { tools } from '@src/store/Modules/tools'
export default defineComponent({

View File

@@ -8,7 +8,7 @@ import {
import { SingleProject } from '../../../components/projects/SingleProject/index'
import { CTodo } from '../../../components/todos/CTodo'
import { tools } from '@store/Modules/tools'
import { tools } from '@tools'
import { toolsext } from '@src/store/Modules/toolsext'
import { lists } from '@store/Modules/lists'
import * as ApiTables from '../../../store/Modules/ApiTables'
@@ -23,11 +23,11 @@ import { colTableHours } from '@src/store/Modules/fieldsTable'
import { costanti } from '@src/store/Modules/costanti'
import { defineComponent, ref, computed, watch, onMounted, onBeforeUnmount } 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'
import { CGridTableRec } from '@/components/CGridTableRec'
import { CGridTableRec } from '@src/components/CGridTableRec'
import { useRoute, useRouter } from 'vue-router'
import { useProjectStore } from '@store/Projects'
import { useTodoStore } from '@store/Todos'
@@ -72,7 +72,7 @@ export default defineComponent({
// const service: any
const scrollable = ref(true)
const dragname = ref('second')
const idProjAtt = ref(process.env.PROJECT_ID_MAIN || '')
const idProjAtt = ref(import.meta.env.VITE_PROJECT_ID_MAIN || '')
const splitterModel = ref(50) // start at 50%
const itemproj = ref(<IProject>{})
const tipoproj = ref('')
@@ -261,7 +261,7 @@ export default defineComponent({
}
function isRootProject() {
return idProjAtt.value === process.env.PROJECT_ID_MAIN
return idProjAtt.value === import.meta.env.VITE_PROJECT_ID_MAIN
}
function isRootProjectAtt() {
@@ -570,7 +570,7 @@ export default defineComponent({
if (!idProjAtt.value) {
// @ts-ignore
idProjAtt.value = process.env.PROJECT_ID_MAIN ? process.env.PROJECT_ID_MAIN : ''
idProjAtt.value = import.meta.env.VITE_PROJECT_ID_MAIN ? import.meta.env.VITE_PROJECT_ID_MAIN : ''
}
console.log('idProjAtt', idProjAtt)
updateindexProj()
@@ -581,7 +581,7 @@ export default defineComponent({
function load() {
// console.log('LOAD PROJECTS....')
if (!idProjAtt.value) {
idProjAtt.value = process.env.PROJECT_ID_MAIN ? process.env.PROJECT_ID_MAIN : ''
idProjAtt.value = import.meta.env.VITE_PROJECT_ID_MAIN ? import.meta.env.VITE_PROJECT_ID_MAIN : ''
}
console.log('LOAD idProjAtt', idProjAtt)
@@ -680,7 +680,7 @@ export default defineComponent({
const projatt = projects.getRecordById(idProjAtt.value)
// console.log('projatt', projatt)
let myobj: IProject | null = null
if (idProjAtt.value === process.env.PROJECT_ID_MAIN) {
if (idProjAtt.value === import.meta.env.VITE_PROJECT_ID_MAIN) {
myobj = {
descr,
id_parent: idProjAtt.value,
@@ -714,7 +714,7 @@ export default defineComponent({
myobj.id_main_project = idProjAtt.value
} else {
myobj.typeproj = TypeProj.TYPE_SUBDIR
if (itemproj.value.id_main_project === process.env.PROJECT_ID_MAIN)
if (itemproj.value.id_main_project === import.meta.env.VITE_PROJECT_ID_MAIN)
myobj.id_main_project = itemproj.value._id
else
myobj.id_main_project = itemproj.value.id_main_project

View File

@@ -1,11 +1,11 @@
import { serv_constants } from '@store/Modules/serv_constants'
import { tools } from '@store/Modules/tools'
import { tools } from '@tools'
import { Logo } from '../../components/logo'
import { CTitleBanner } from '../../components/CTitleBanner'
import { defineComponent, reactive, ref, watch } 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'

View File

@@ -1,45 +0,0 @@
import { defineComponent, onMounted, ref } from 'vue'
import { tools } from '@store/Modules/tools'
import { useUserStore } from '@store/UserStore'
import { useRouter } from 'vue-router'
import { useGlobalStore } from '@store/globalStore'
import { useProducts } from '@store/Products'
import { useI18n } from '@/boot/i18n'
import { toolsext } from '@store/Modules/toolsext'
import { useQuasar } from 'quasar'
import { costanti } from '@costanti'
import { shared_consts } from '@src/common/shared_vuejs'
// import MixinBase from '@src/mixins/mixin-base'
export default defineComponent({
name: 'Scheletro',
components: { },
props: {},
setup() {
const userStore = useUserStore()
const globalStore = useGlobalStore()
const productStore = useProducts()
const $router = useRouter()
const $q = useQuasar()
const { t } = useI18n();
// const { setValDb, getValDb } = MixinBase()
function mounted() {
// Inizializza
}
onMounted(mounted)
return {
userStore,
costanti,
tools,
toolsext,
shared_consts,
}
}
})

View File

@@ -1,4 +0,0 @@
<template>
<div>
</div>
</template>

View File

@@ -1,13 +1,13 @@
import { CMyFieldDb } from '@/components/CMyFieldDb'
import { CTitleBanner } from '@/components/CTitleBanner'
import { CProfile } from '@/components/CProfile'
import { CSkill } from '@/components/CSkill'
import { tools } from '@store/Modules/tools'
import { CMyFieldDb } from '@src/components/CMyFieldDb'
import { CTitleBanner } from '@src/components/CTitleBanner'
import { CProfile } from '@src/components/CProfile'
import { CSkill } from '@src/components/CSkill'
import { tools } from '@tools'
import { defineComponent, onMounted, ref } from 'vue'
import { useUserStore } from '@store/UserStore'
import { useRouter } from 'vue-router'
import { useGlobalStore } from '@store/globalStore'
import { useI18n } from '@/boot/i18n'
import { useI18n } from 'vue-i18n'
import { toolsext } from '@store/Modules/toolsext'
import { useQuasar } from 'quasar'
import { costanti } from '@costanti'
@@ -75,7 +75,7 @@ export default defineComponent({
function mounted() {
filtroutente.value = [
{ userId: userStore.my._id}
{ userId: userStore.my._id }
]
}

View File

@@ -17,9 +17,7 @@
>
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
No results
</q-item-section>
<q-item-section class="text-grey"> No results </q-item-section>
</q-item>
</template>
</q-select>
@@ -40,9 +38,7 @@
>
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
No results
</q-item-section>
<q-item-section class="text-grey"> No results </q-item-section>
</q-item>
</template>
</q-select>
@@ -50,82 +46,92 @@
</div>
</template>
<script>
import { ref } from 'vue'
<script lang="ts">
import { ref } from "vue";
const stringOptions = [
'Google', 'Facebook', 'Twitter', 'Apple', 'Oracle'
"Google",
"Facebook",
"Twitter",
"Apple",
"Oracle",
].reduce((acc, opt) => {
for (let i = 1; i <= 5; i++) {
acc.push(opt + ' ' + i)
acc.push(opt + " " + i);
}
return acc
}, [])
return acc;
}, []);
export default {
setup () {
const options = ref(stringOptions)
setup() {
const options = ref(stringOptions);
return {
model: ref(null),
options,
filterFn (val, update, abort) {
filterFn(val, update, abort) {
// call abort() at any time if you can't retrieve data somehow
setTimeout(() => {
update(
() => {
if (val === '') {
options.value = stringOptions
}
else {
const needle = val.toLowerCase()
options.value = stringOptions.filter(v => v.toLowerCase().indexOf(needle) > -1)
if (val === "") {
options.value = stringOptions;
} else {
const needle = val.toLowerCase();
options.value = stringOptions.filter(
(v) => v.toLowerCase().indexOf(needle) > -1
);
}
},
// "ref" is the Vue reference to the QSelect
ref => {
if (val !== '' && ref.options.length > 0) {
ref.setOptionIndex(-1) // reset optionIndex in case there is something selected
ref.moveOptionSelection(1, true) // focus the first selectable option and do not update the input-value
(ref) => {
if (val !== "" && ref.options.length > 0) {
ref.setOptionIndex(-1); // reset optionIndex in case there is something selected
ref.moveOptionSelection(1, true); // focus the first selectable option and do not update the input-value
}
}
)
}, 300)
);
}, 300);
},
filterFnAutoselect (val, update, abort) {
filterFnAutoselect(val, update, abort) {
// call abort() at any time if you can't retrieve data somehow
setTimeout(() => {
update(
() => {
if (val === '') {
options.value = stringOptions
}
else {
const needle = val.toLowerCase()
options.value = stringOptions.filter(v => v.toLowerCase().indexOf(needle) > -1)
if (val === "") {
options.value = stringOptions;
} else {
const needle = val.toLowerCase();
options.value = stringOptions.filter(
(v) => v.toLowerCase().indexOf(needle) > -1
);
}
},
// "ref" is the Vue reference to the QSelect
ref => {
if (val !== '' && ref.options.length > 0 && ref.getOptionIndex() === -1) {
ref.moveOptionSelection(1, true) // focus the first selectable option and do not update the input-value
ref.toggleOption(ref.options[ ref.optionIndex ], true) // toggle the focused option
(ref) => {
if (
val !== "" &&
ref.options.length > 0 &&
ref.getOptionIndex() === -1
) {
ref.moveOptionSelection(1, true); // focus the first selectable option and do not update the input-value
ref.toggleOption(ref.options[ref.optionIndex], true); // toggle the focused option
}
}
)
}, 300)
);
}, 300);
},
abortFilterFn () {
abortFilterFn() {
// console.log('delayed filter aborted')
}
}
}
}
},
};
},
};
</script>

View File

@@ -1,17 +1,17 @@
import { defineComponent, onMounted, ref, watch, computed, onBeforeUnmount } from 'vue'
import { tools } from '@store/Modules/tools'
import { tools } from '@tools'
import { useUserStore } from '@store/UserStore'
import { useRouter } from 'vue-router'
import { useGlobalStore } from '@store/globalStore'
import { useProducts } from '@store/Products'
import { useI18n } from '@/boot/i18n'
import { useI18n } from 'vue-i18n'
import { toolsext } from '@store/Modules/toolsext'
import { useQuasar } from 'quasar'
import { costanti } from '@costanti'
import { shared_consts } from '@/common/shared_vuejs'
import { shared_consts } from '@src/common/shared_vuejs'
import { CAITools } from '@src/components/CAITools'
import { IProduct } from '@src/model'
import type { IProduct } from '@src/model'
export default defineComponent({
name: 'ToolsAIMain',
@@ -70,24 +70,24 @@ export default defineComponent({
function calcArrProducts() {
refreshpage.value = true
let arrprod = productStore.getProducts(cosa.value)
let catstr = cat.value;
let lowerSearchText = search.value.toLowerCase().trim();
const catstr = cat.value;
const lowerSearchText = search.value.toLowerCase().trim();
if ((!lowerSearchText || (lowerSearchText && lowerSearchText.length < 2)) && !catstr) {
} else {
arrprod = arrprod.filter((product: IProduct) => {
let lowerName = product.productInfo.name!.toLowerCase();
let hasCategoria = !catstr || (catstr && product.productInfo.idCatProds?.includes(catstr));
const lowerName = product.productInfo.name!.toLowerCase();
const hasCategoria = !catstr || (catstr && product.productInfo.idCatProds?.includes(catstr));
// Use a regular expression to match whole words
let codeMatch = new RegExp(`\\b${lowerSearchText}\\b`, 'i');
let nameMatch = new RegExp(`\\b${lowerSearchText}`, 'i');
const codeMatch = new RegExp(`\\b${lowerSearchText}\\b`, 'i');
const nameMatch = new RegExp(`\\b${lowerSearchText}`, 'i');
// Check if any word in lowerName starts with lowerSearchText
let anyWordStartsWithSearch = lowerName.split(/\s+/).some(word => nameMatch.test(word));
const anyWordStartsWithSearch = lowerName.split(/\s+/).some(word => nameMatch.test(word));
return (codeMatch.test(product.productInfo.code!) || anyWordStartsWithSearch) && hasCategoria;
return (codeMatch.test(product.productInfo.code) || anyWordStartsWithSearch) && hasCategoria;
});
}
@@ -100,10 +100,10 @@ export default defineComponent({
if (!search.value) {
return arrprod
}
let lowerSearchText = search.value.toLowerCase();
let catstr = cat.value;
return arrprod.filter((product: IProduct) => {
let lowerName = product.productInfo.name!.toLowerCase();
const hasCategoria = !catstr || (catstr && product.productInfo.idCatProds?.includes(catstr));
@@ -128,8 +128,8 @@ export default defineComponent({
});
function getCatProds() {
let arrcat = productStore.getCatProds(cosa.value)
let riscat: any = [{ label: 'Tutti', value: '', icon: undefined, color: undefined }]
const arrcat = productStore.getCatProds(cosa.value)
const riscat: any = [{ label: 'Tutti', value: '', icon: undefined, color: undefined }]
for (const rec of arrcat) {
riscat.push({ label: rec.name, value: rec._id, icon: rec.icon, color: rec.color })
}

View File

@@ -1,9 +1,9 @@
import { serv_constants } from '@store/Modules/serv_constants'
import { tools } from '@store/Modules/tools'
import { tools } from '@tools'
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'

View File

@@ -1,11 +1,11 @@
import { serv_constants } from '@store/Modules/serv_constants'
import { tools } from '@store/Modules/tools'
import { tools } from '@tools'
import { Logo } from '../../components/logo'
import { CTitleBanner } from '../../components/CTitleBanner'
import { defineComponent, ref, reactive } 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'
@@ -73,7 +73,7 @@ export default defineComponent({
if ($route.query.email) {
form.email = $route.query.email.toString()
}
form.idapp = process.env.APP_ID ? process.env.APP_ID : '1'
form.idapp = tools.getEnv('VITE_APP_ID') ? tools.getEnv('VITE_APP_ID') : '1'
console.log(form)
userStore.resetpwd(form)

View File

@@ -1,26 +1,28 @@
import { CMyFieldDb } from '@/components/CMyFieldDb'
import { CMyFieldRec } from '@/components/CMyFieldRec'
import { CTitleBanner } from '@/components/CTitleBanner'
import { CProfile } from '@/components/CProfile'
import { CSkill } from '@/components/CSkill'
import { CMySelectCity } from '@/components/CMySelectCity'
import { tools } from '@store/Modules/tools'
import { CMyFieldDb } from '@src/components/CMyFieldDb'
import { CMyFieldRec } from '@src/components/CMyFieldRec'
import { CTitleBanner } from '@src/components/CTitleBanner'
import { CProfile } from '@src/components/CProfile'
import { CSkill } from '@src/components/CSkill'
import { CMySelectCity } from '@src/components/CMySelectCity'
import { tools } from '@tools'
import { defineComponent, onMounted, ref } from 'vue'
import { useUserStore } from '@store/UserStore'
import { useRouter } from 'vue-router'
import { useGlobalStore } from '@store/globalStore'
import { useI18n } from '@/boot/i18n'
import { useI18n } from 'vue-i18n'
import { toolsext } from '@store/Modules/toolsext'
import { useQuasar } from 'quasar'
import { costanti } from '@costanti'
import { static_data } from '@/db/static_data'
import { static_data } from '@src/db/static_data'
import { IUserFields } from 'model'
export default defineComponent({
name: 'EditProfile',
components: { CProfile, CTitleBanner,
CMySelectCity, CMyFieldDb, CSkill, CMyFieldRec },
components: {
CProfile, CTitleBanner,
CMySelectCity, CMyFieldDb, CSkill, CMyFieldRec
},
props: {},
setup() {
const userStore = useUserStore()
@@ -82,7 +84,7 @@ export default defineComponent({
async function loadProfile() {
// Carica il profilo di quest'utente
await userStore.loadUserProfile({username: userStore.my.username}).then((ris) => {
await userStore.loadUserProfile({ username: userStore.my.username }).then((ris) => {
myuser.value = ris
// console.log('myuser._id', ris)
})
@@ -91,7 +93,7 @@ export default defineComponent({
function mounted() {
filtroutente.value = [
{ userId: userStore.my._id}
{ userId: userStore.my._id }
]
loadProfile()
}

View File

@@ -1,5 +1,5 @@
import { CMyActivities } from '@/components/CMyActivities'
import { tools } from '@store/Modules/tools'
import { CMyActivities } from '@src/components/CMyActivities'
import { tools } from '@tools'
import { computed, defineComponent, onMounted, ref, watch } from 'vue'

View File

@@ -1,30 +1,31 @@
import { CGridTableRec } from '@/components/CGridTableRec'
import { CMyFriends } from '@/components/CMyFriends'
import { CMyUser } from '@/components/CMyUser'
import { CTitleBanner } from '@/components/CTitleBanner'
import { CProfile } from '@/components/CProfile'
import { CCheckIfIsLogged } from '@/components/CCheckIfIsLogged'
import { CMyFieldRec } from '@/components/CMyFieldRec'
import { CCurrencyValue } from '@/components/CCurrencyValue'
import { CSaldo } from '@/components/CSaldo'
import { CSendCoins } from '@/components/CSendCoins'
import { CUserNonVerif } from '@/components/CUserNonVerif'
import { CTitleSec } from '@/components/CTitleSec'
import { CSkill } from '@/components/CSkill'
import { CFinder } from '@/components/CFinder'
import { CDateTime } from '@/components/CDateTime'
import { tools } from '@store/Modules/tools'
import { CGridTableRec } from '@src/components/CGridTableRec'
import { CMyFriends } from '@src/components/CMyFriends'
import { CMyUser } from '@src/components/CMyUser'
import { CTitleBanner } from '@src/components/CTitleBanner'
import { CProfile } from '@src/components/CProfile'
import { CCheckIfIsLogged } from '@src/components/CCheckIfIsLogged'
import { CMyFieldRec } from '@src/components/CMyFieldRec'
import { CCurrencyValue } from '@src/components/CCurrencyValue'
import { CSaldo } from '@src/components/CSaldo'
import { CSendCoins } from '@src/components/CSendCoins'
import { CUserNonVerif } from '@src/components/CUserNonVerif'
import { CTitleSec } from '@src/components/CTitleSec'
import { CSkill } from '@src/components/CSkill'
import { CFinder } from '@src/components/CFinder'
import { CDateTime } from '@src/components/CDateTime'
import { tools } from '@tools'
import { computed, defineComponent, onMounted, ref, watch } from 'vue'
import { useUserStore } from '@store/UserStore'
import { useRoute, useRouter } from 'vue-router'
import { useGlobalStore } from '@store/globalStore'
import { useI18n } from '@/boot/i18n'
import { useI18n } from 'vue-i18n'
import { toolsext } from '@store/Modules/toolsext'
import { useQuasar } from 'quasar'
import { CNotifAtTop } from '@src/components/CNotifAtTop'
import { costanti } from '@costanti'
import { ICity, IFriends, ICircuit, ISearchList, IUserFields, IAccount, IMyGroup } from 'model'
import { shared_consts } from '@/common/shared_vuejs'
import type { ICity, IFriends, ICircuit, ISearchList, IAccount, IMyGroup } from 'model';
import { IUserFields } from 'model'
import { shared_consts } from '@src/common/shared_vuejs'
import { colmyUserPeople, colmyUserPeopleSaldi, colmyUserCircuit, colmyMovement, colmyMovementTable, colmyUserGroup } from '@store/Modules/fieldsTable'
import { useNotifStore } from '@store/NotifStore'
import { useCircuitStore } from '@store/CircuitStore'
@@ -73,7 +74,7 @@ export default defineComponent({
const card = ref(<any>{})
const circuit = ref({} as ICircuit | null)
const circuit = ref(<ICircuit | undefined>undefined)
const account = ref(<IAccount | null>null)
const mystatus = ref(0 as number)
const users_in_circuit = ref([] as IFriends[])
@@ -177,13 +178,13 @@ export default defineComponent({
searchList.value = []
if (circuit.value) {
let addquerysingle = [
const addquerysingle = [
];
filterextra.value = [{
$match: {
idapp: process.env.APP_ID,
idapp: tools.getEnv('VITE_APP_ID'),
'profile.mycircuits': {
$elemMatch: { circuitname: { $eq: circuit.value.name } },
},
@@ -257,7 +258,7 @@ export default defineComponent({
filterextra_group.value = [{
$match: {
idapp: process.env.APP_ID,
idapp: tools.getEnv('VITE_APP_ID'),
'mycircuits': {
$elemMatch: { circuitname: { $eq: circuit.value.name } },
},
@@ -499,7 +500,7 @@ export default defineComponent({
}
function getRegulation(reg: string) {
let strreg = reg + ''
const strreg = reg + ''
if (!reg) {
const mystringa = t('circuit.regolamento', { nomecircuito: circuit.value!.name })
return mystringa
@@ -516,7 +517,7 @@ export default defineComponent({
loadSaldo.value = false
}
onMounted(mounted)
return {

View File

@@ -48,7 +48,7 @@
</q-card-section>
<q-card-section class="inset-shadow">
<div style="font-weight: bold; font-size: 1.25rem">
{{ t('circuit.regulation') }} {{ circuit.name }}
{{ t("circuit.regulation") }} {{ circuit.name }}
</div>
<q-btn
v-if="!showrules"
@@ -139,7 +139,7 @@
<q-icon color="negative" name="fas fa-user-minus" />
</q-item-section>
<q-item-section>
{{ $t('circuit.exit_circuit') }}
{{ $t("circuit.exit_circuit") }}
</q-item-section>
</q-item>
@@ -160,7 +160,7 @@
<q-item-section avatar>
<q-icon color="negative" name="fas fa-trash-alt" />
</q-item-section>
<q-item-section>{{ $t('circuit.delete') }}</q-item-section>
<q-item-section>{{ $t("circuit.delete") }}</q-item-section>
</q-item>
</q-list>
</q-list>
@@ -228,7 +228,7 @@
<q-dialog v-model="showMov" :maximized="$q.screen.lt.sm" permanent>
<q-card class="dialog_card">
<q-bar dense class="bg-primary text-white">
{{ t('circuit.movements') }}:
{{ t("circuit.movements") }}:
<q-space />
<q-btn
flat
@@ -341,7 +341,7 @@
@click="showMov = !showMov"
:icon="
tools.getSymbolByCircuit(circuit) === 'RIS'
? 'img: images/1ris_rosso_100.png'
? 'img: /images/1ris_rosso_100.png'
: undefined
"
rounded
@@ -355,7 +355,7 @@
class="bg-red text-white"
style="text-align: center"
>
<em style="font-weight: bold">{{ $t('db.youarerefusedcircuit') }}</em>
<em style="font-weight: bold">{{ $t("db.youarerefusedcircuit") }}</em>
<br />
</q-banner>
@@ -393,7 +393,7 @@
</template>
<em style="font-weight: bold">
{{ $t('circuit.beforeentertolocalcircuit') }}
{{ $t("circuit.beforeentertolocalcircuit") }}
</em>
<br />
</q-banner>
@@ -416,7 +416,7 @@
</template>
<em style="font-weight: bold">
{{ $t('db.insertgoodorservices_to_enter_circuit') }}
{{ $t("db.insertgoodorservices_to_enter_circuit") }}
</em>
<br />
</q-banner>
@@ -442,14 +442,14 @@
</template>
<em style="font-weight: bold">
{{ $t('db.insertgoodorservices_to_enter_circuit') }}
{{ $t("db.insertgoodorservices_to_enter_circuit") }}
</em>
<br />
</q-banner>
<div class="centermydiv">
<q-btn
class="q-mt-md"
class="q-mt-md"
v-if="
!userStore.IsMyCircuitByName(circuit.name) &&
!userStore.IsAskedCircuitByName(circuit.name) &&
@@ -542,7 +542,7 @@
style="max-width: 500px"
v-if="tools.iCanShowCircuitsMember(circuit)"
>
<div class="text-h7">{{ t('circuit.contideigruppi') }}:</div>
<div class="text-h7">{{ t("circuit.contideigruppi") }}:</div>
<div class="text-h8 q-mb-sm">
<div v-html="$t('circuit.collettivi_info')"></div>
</div>
@@ -695,7 +695,7 @@
></CGridTableRec>
</q-tab-panel>
<q-tab-panel name="rich">
{{ $t('circuit.richieste_title') }}
{{ $t("circuit.richieste_title") }}
<CGridTableRec
v-if="!loading"
prop_mytable="circuits"
@@ -759,7 +759,7 @@
<div>
<q-card>
<q-card-section>
<div class="text-h7">{{ t('circuit.info') }}</div>
<div class="text-h7">{{ t("circuit.info") }}</div>
</q-card-section>
<q-separator />
@@ -772,7 +772,7 @@
<div v-html="$t('circuit.aggiuntive')"></div>
</div>
<q-card-section>
<div class="text-h7">{{ t('circuit.descr') }}:</div>
<div class="text-h7">{{ t("circuit.descr") }}:</div>
</q-card-section>
<q-separator />
@@ -790,15 +790,15 @@
<span class="element">{{ numUsers() }}</span>
{{
numUsers() === 1
? t('shared.member')
: t('shared.members')
? t("shared.member")
: t("shared.members")
}}
</div>
<div class="container" v-if="circuit.link_group">
<q-icon name="fab fa-telegram" class="iconcirc"></q-icon>
<span class="element">
{{
$t('circuit.chat_gruppo_telegram_circuito', {
$t("circuit.chat_gruppo_telegram_circuito", {
name: circuit.name,
})
}}:
@@ -839,7 +839,7 @@
<q-icon name="fas fa-user-cog" class="iconcirc"></q-icon>
<span class="element">{{ numAdmins() }}</span>
{{
numAdmins() === 1 ? t('shared.admin') : t('shared.admins')
numAdmins() === 1 ? t("shared.admin") : t("shared.admins")
}}
</div>
<div v-for="(user, index) of circuit.admins" :key="index">
@@ -851,7 +851,7 @@
</div>
<div class="sezioni">
<q-icon name="fas fa-coins" class="iconcirc"></q-icon>
{{ t('circuit.symbol') }}:
{{ t("circuit.symbol") }}:
<span class="text-h7">
<em
class="q-px-sm text-black rounded-borders"
@@ -926,7 +926,7 @@
</div>
<div v-if="circuit.totTransato" class="sezioni">
<q-icon name="fas fa-stats" class="iconcirc"></q-icon>
{{ t('circuit.stats') }}:
{{ t("circuit.stats") }}:
<br />
</div>
<div :class="$q.screen.lt.sm ? '' : 'row'">
@@ -955,12 +955,12 @@
</div>
<div class="sezioni">
<q-icon name="fas fa-toggle-on" class="iconcirc"></q-icon>
{{ t('circuit.transactionsEnabled') }}:
{{ t("circuit.transactionsEnabled") }}:
<span class="text-section">
{{
circuit.transactionsEnabled
? t('dialog.yes')
: t('dialog.no')
? t("dialog.yes")
: t("dialog.no")
}}
{{}}
</span>
@@ -990,7 +990,7 @@
<q-card v-if="circuit.name">
<q-card-section>
<div class="text-h8">
{{ t('circuit.regulation') }} {{ circuit.name }}:
{{ t("circuit.regulation") }} {{ circuit.name }}:
</div>
</q-card-section>
<q-separator />
@@ -1013,7 +1013,7 @@
<div v-if="circuit.createdBy" class="container text-h8">
<q-icon name="fas fa-lightbulb" class="iconcirc"></q-icon>
{{
$t('shared.createddate', {
$t("shared.createddate", {
date: tools.getstrDateYY(circuit.date_created),
})
}}
@@ -1029,7 +1029,7 @@
<q-icon name="fas fa-pencil-alt" class="iconcirc"></q-icon>
<span class="element text-h8">
{{
$t('shared.lastmodify', {
$t("shared.lastmodify", {
date: tools.getstrDateYY(circuit.date_updated),
})
}}
@@ -1141,9 +1141,9 @@
<q-tab-panel name="comunitario">
<q-card v-if="circuit.name">
<q-card-section>
<div class="text-h7">{{ t('circuit.contocomunitario') }}:</div>
<div class="text-h7">{{ t("circuit.contocomunitario") }}:</div>
<div class="text-h8 q-mb-sm">
{{ $t('circuit.info_contocom') }}
{{ $t("circuit.info_contocom") }}
</div>
</q-card-section>
<q-separator />
@@ -1294,6 +1294,6 @@
</script>
<style lang="scss" scoped>
@import './mycircuit.scss';
@import "./mycircuit.scss";
</style>

View File

@@ -1,18 +1,18 @@
import { CMyCircuits } from '@/components/CMyCircuits'
import { CCheckIfIsLogged } from '@components'
import { CFinder } from '@/components/CFinder'
import { CGridTableRec } from '@/components/CGridTableRec'
import { CNotifAtTop } from '@/components/CNotifAtTop'
import { tools } from '@store/Modules/tools'
import { CMyCircuits } from '@src/components/CMyCircuits'
import { CCheckIfIsLogged } from '@src/components/CCheckIfIsLogged'
import { CFinder } from '@src/components/CFinder'
import { CGridTableRec } from '@src/components/CGridTableRec'
import { CNotifAtTop } from '@src/components/CNotifAtTop'
import { tools } from '@tools'
import { toolsext } from '@store/Modules/toolsext'
import { computed, defineComponent, onMounted, ref, watch } from 'vue'
import { useUserStore } from '@store/UserStore'
import { useRoute, useRouter } from 'vue-router'
import { useGlobalStore } from '@store/globalStore'
import { useI18n } from '@/boot/i18n'
import { useI18n } from 'vue-i18n'
import { colmyUserCircuit } from '@store/Modules/fieldsTable'
import { costanti } from '@costanti'
import { shared_consts } from '@/common/shared_vuejs'
import { shared_consts } from '@src/common/shared_vuejs'
export default defineComponent({
name: 'mycircuits',

View File

@@ -1,15 +1,15 @@
import { CMyFriends } from '@/components/CMyFriends'
import { CGridTableRec } from '@/components/CGridTableRec'
import { tools } from '@store/Modules/tools'
import { CMyFriends } from '@src/components/CMyFriends'
import { CGridTableRec } from '@src/components/CGridTableRec'
import { tools } from '@tools'
import { computed, defineComponent, onMounted, ref, watch } from 'vue'
import { useUserStore } from '@store/UserStore'
import { useRoute, useRouter } from 'vue-router'
import { useGlobalStore } from '@store/globalStore'
import { useI18n } from '@/boot/i18n'
import { useI18n } from 'vue-i18n'
import { colmyUserPeople } from '@store/Modules/fieldsTable'
import { ISearchList } from 'model'
import type { ISearchList } from 'model'
import { costanti } from '@costanti'
import { shared_consts } from '@/common/shared_vuejs'
import { shared_consts } from '@src/common/shared_vuejs'
import { toolsext } from '@store/Modules/toolsext'
export default defineComponent({
@@ -111,7 +111,7 @@ export default defineComponent({
'profile.mygroups': 1,
'profile.qualifica': 1,
'profile.note': 1,
'profile.da_contattare': 1,
'profile.da_contattare': 1,
'profile.resid_province': 1,
'mycities.reg': 1,
}

View File

@@ -1,26 +1,27 @@
import { CGridTableRec } from '@/components/CGridTableRec'
import { CMyFriends } from '@/components/CMyFriends'
import { CMyUser } from '@/components/CMyUser'
import { CNotifAtTop } from '@/components/CNotifAtTop'
import { CTitleBanner } from '@/components/CTitleBanner'
import { CProfile } from '@/components/CProfile'
import { CCheckIfIsLogged } from '@/components/CCheckIfIsLogged'
import { CMyFieldRec } from '@/components/CMyFieldRec'
import { CSkill } from '@/components/CSkill'
import { CDateTime } from '@/components/CDateTime'
import { CInfoAccount } from '@/components/CInfoAccount'
import { CSendCoins } from '@/components/CSendCoins'
import { tools } from '@store/Modules/tools'
import { CGridTableRec } from '@src/components/CGridTableRec'
import { CMyFriends } from '@src/components/CMyFriends'
import { CMyUser } from '@src/components/CMyUser'
import { CNotifAtTop } from '@src/components/CNotifAtTop'
import { CTitleBanner } from '@src/components/CTitleBanner'
import { CProfile } from '@src/components/CProfile'
import { CCheckIfIsLogged } from '@src/components/CCheckIfIsLogged'
import { CMyFieldRec } from '@src/components/CMyFieldRec'
import { CSkill } from '@src/components/CSkill'
import { CDateTime } from '@src/components/CDateTime'
import { CInfoAccount } from '@src/components/CInfoAccount'
import { CSendCoins } from '@src/components/CSendCoins'
import { tools } from '@tools'
import { computed, defineComponent, onMounted, ref, watch } from 'vue'
import { useUserStore } from '@store/UserStore'
import { useRoute, useRouter } from 'vue-router'
import { useGlobalStore } from '@store/globalStore'
import { useI18n } from '@/boot/i18n'
import { useI18n } from 'vue-i18n'
import { toolsext } from '@store/Modules/toolsext'
import { useQuasar } from 'quasar'
import { costanti } from '@costanti'
import { ICircuit, ICity, IFriends, IMyCircuit, IMyGroup, ISearchList, IUserFields } from 'model'
import { shared_consts } from '@/common/shared_vuejs'
import type { ICircuit, ICity, IFriends, IMyCircuit, IMyGroup, ISearchList } from 'model';
import { IUserFields } from 'model'
import { shared_consts } from '@src/common/shared_vuejs'
import { colmyUserPeople, colmyUserGroup, colmyMovementTable, colmyMovement } from '@store/Modules/fieldsTable'
import { useNotifStore } from '@store/NotifStore'
import { useCircuitStore } from '@src/store/CircuitStore'
@@ -42,7 +43,7 @@ export default defineComponent({
const $q = useQuasar()
const { t } = useI18n()
const animation = ref('fade')
const animation = ref(<any>'fade')
const tabevents = ref('new')
const mycards = computed(() => {
@@ -60,7 +61,7 @@ export default defineComponent({
const tabcircuit = ref('info')
const filtro_eventi = ref(<any[]>[])
const mygrp = ref(<IMyGroup | null>{})
const mygrp = ref(<IMyGroup>{})
const mystatus = ref(<number>0)
const users_in_group = ref(<IFriends[]>[])
@@ -113,7 +114,7 @@ export default defineComponent({
circuitslistOpt.value = []
for (let i = 0; i < circuitslist.value.length; i++) {
circuitslistOpt.value.push({ label: circuitslist.value[i].name, value: i })
let myc = data.mygroup.mycircuits.find((circ: IMyCircuit) => circ.circuitname === circuitslist.value[i].name)
const myc = data.mygroup.mycircuits.find((circ: IMyCircuit) => circ.circuitname === circuitslist.value[i].name)
if (myc) {
circuitslist.value[i].account = myc.account
}
@@ -165,7 +166,7 @@ export default defineComponent({
function getLinkGrpTelegram() {
if (mygrp.value) {
if (!!mygrp.value.link_telegram) {
if (mygrp.value.link_telegram) {
return (!mygrp.value.link_telegram.startsWith('http') ? 'https://' : '') + mygrp.value.link_telegram
}
} else {
@@ -221,7 +222,7 @@ export default defineComponent({
}
function filtrotables(table: string, quale: string) {
let out = []
const out = []
if (mygrp.value)
out.push({ groupname: mygrp.value.groupname })

View File

@@ -46,13 +46,13 @@
class="bg-red text-white"
style="text-align: center"
>
<em style="font-weight: bold">{{ $t('db.youarerefusedgroup') }}</em>
<em style="font-weight: bold">{{ $t("db.youarerefusedgroup") }}</em>
<br />
</q-banner>
<q-btn
v-if="circuitslistOpt.length > 0"
icon-right="img: images/1ris_rosso_100.png"
icon-right="img: /images/1ris_rosso_100.png"
color="green"
size="md"
:label="t('circuit.sendcoins')"
@@ -107,7 +107,7 @@
<q-icon color="negative" name="fas fa-user-minus" />
</q-item-section>
<q-item-section>
{{ $t('groups.exit_group') }}
{{ $t("groups.exit_group") }}
</q-item-section>
</q-item>
@@ -135,7 +135,7 @@
<q-icon color="negative" name="fas fa-trash-alt" />
</q-item-section>
<q-item-section>
{{ $t('groups.delete_group') }}
{{ $t("groups.delete_group") }}
</q-item-section>
</q-item>
</q-list>
@@ -217,7 +217,7 @@
"
:label="t('groups.circuits')"
name="circuits"
icon="img: images/1ris_rosso_100.png"
icon="img: /images/1ris_rosso_100.png"
></q-tab>
</q-tabs>
@@ -250,7 +250,11 @@
type="a"
size="md"
rounded
:label="$t('reg.website') + ' ' + tools.getMainUrl(getLinkWebSite())"
:label="
$t('reg.website') +
' ' +
tools.getMainUrl(getLinkWebSite())
"
:href="getLinkWebSite()"
target="__blank"
></q-btn>
@@ -273,9 +277,9 @@
</div>
<div>
<div class="title_param">
{{ $t('groups.private') }}
{{ $t("groups.private") }}
</div>
{{ $t('groups.private_descr') }}
{{ $t("groups.private_descr") }}
</div>
</div>
@@ -291,12 +295,12 @@
<q-icon name="fas fa-eye-slash"></q-icon>
</div>
<div>
<div class="title_param">{{ $t('groups.hidden') }}</div>
{{ $t('groups.hidden_descr') }}
<div class="title_param">{{ $t("groups.hidden") }}</div>
{{ $t("groups.hidden_descr") }}
</div>
</div>
<div class="members">
{{ $t('products.category') }}
{{ $t("products.category") }}
<q-item>
<q-item-section>
<q-item-label class="full-width">
@@ -321,8 +325,8 @@
{{ numUsers() }}
{{
numUsers() === 1
? t('shared.member')
: t('shared.members')
? t("shared.member")
: t("shared.members")
}}
</div>
<div class="admins">
@@ -330,8 +334,8 @@
{{ numAdmins() }}
{{
numAdmins() === 1
? t('shared.admin')
: t('shared.admins')
? t("shared.admin")
: t("shared.admins")
}}
</div>
@@ -358,7 +362,7 @@
<div class="element">
<q-icon name="fas fa-lightbulb"></q-icon>
{{
$t('shared.createdby', {
$t("shared.createdby", {
username: mygrp.createdBy,
date: tools.getstrDateYY(mygrp.date_created),
})
@@ -374,7 +378,7 @@
>
<q-icon name="fas fa-pencil-alt"></q-icon>
{{
$t('shared.lastmodify', {
$t("shared.lastmodify", {
date: tools.getstrDateYY(mygrp.date_updated),
})
}}
@@ -517,7 +521,7 @@
<q-tab
:label="t('circuit.movements')"
name="mov"
icon="img: images/1ris_rosso_100.png"
icon="img: /images/1ris_rosso_100.png"
></q-tab>
</q-tabs>
</q-tab-panel>
@@ -709,7 +713,7 @@
type="QAvatar"
size="140px"
height="140px"
animation="fade"
:animation="animation"
/>
<q-card flat bordered style="width: 250px">
<div class="text-h6">
@@ -754,6 +758,6 @@
</script>
<style lang="scss" scoped>
@import './mygroup.scss';
@import "./mygroup.scss";
</style>

View File

@@ -1,18 +1,18 @@
import { CMyGroups } from '@/components/CMyGroups'
import { CFinder } from '@/components/CFinder'
import { CGridTableRec } from '@/components/CGridTableRec'
import { CNotifAtTop } from '@/components/CNotifAtTop'
import { tools } from '@store/Modules/tools'
import { CMyGroups } from '@src/components/CMyGroups'
import { CFinder } from '@src/components/CFinder'
import { CGridTableRec } from '@src/components/CGridTableRec'
import { CNotifAtTop } from '@src/components/CNotifAtTop'
import { tools } from '@tools'
import { toolsext } from '@store/Modules/toolsext'
import { computed, defineComponent, onMounted, ref, watch } from 'vue'
import { useUserStore } from '@store/UserStore'
import { useRoute, useRouter } from 'vue-router'
import { useGlobalStore } from '@store/globalStore'
import { CCheckIfIsLogged } from '@components'
import { useI18n } from '@/boot/i18n'
import { CCheckIfIsLogged } from '@src/components/CCheckIfIsLogged'
import { useI18n } from 'vue-i18n'
import { colmyUserGroup } from '@store/Modules/fieldsTable'
import { costanti } from '@costanti'
import { shared_consts } from '@/common/shared_vuejs'
import { shared_consts } from '@src/common/shared_vuejs'
export default defineComponent({
name: 'mygroups',

View File

@@ -1,15 +1,15 @@
import { computed, defineComponent, onMounted, ref, watch } from 'vue'
import { useUserStore } from '@store/UserStore'
import { useRoute, useRouter } from 'vue-router'
import { useI18n } from '@/boot/i18n'
import { useI18n } from 'vue-i18n'
import { useQuasar } from 'quasar'
import { CMyCardPopup } from '@/components/CMyCardPopup'
import { CMyCardService } from '@/components/CMyCardService'
import { CMyCardPopup } from '@src/components/CMyCardPopup'
import { CMyCardService } from '@src/components/CMyCardService'
import { shared_consts } from '@src/common/shared_vuejs'
import { CMyPage } from '@/components/CMyPage'
import { CCheckIfIsLogged } from '@/components/CCheckIfIsLogged'
import { CMyPage } from '@src/components/CMyPage'
import { CCheckIfIsLogged } from '@src/components/CCheckIfIsLogged'
import { toolsext } from '@store/Modules/toolsext'
import { tools } from '@store/Modules/tools'
import { tools } from '@tools'
export default defineComponent({
name: 'mypagebacheca',

View File

@@ -1,13 +1,13 @@
import { computed, defineComponent, onMounted, ref, watch } from 'vue'
import { useUserStore } from '@store/UserStore'
import { useRoute, useRouter } from 'vue-router'
import { useI18n } from '@/boot/i18n'
import { useI18n } from 'vue-i18n'
import { useQuasar } from 'quasar'
import { CMyCardService } from '@/components/CMyCardService'
import { CMyPage } from '@/components/CMyPage'
import { CCheckIfIsLogged } from '@/components/CCheckIfIsLogged'
import { CMyCardService } from '@src/components/CMyCardService'
import { CMyPage } from '@src/components/CMyPage'
import { CCheckIfIsLogged } from '@src/components/CCheckIfIsLogged'
import { toolsext } from '@store/Modules/toolsext'
import { tools } from '@store/Modules/tools'
import { tools } from '@tools'
import { shared_consts } from '@src/common/shared_vuejs'

View File

@@ -1,13 +1,13 @@
import { computed, defineComponent, onMounted, ref, watch } from 'vue'
import { useUserStore } from '@store/UserStore'
import { useRoute, useRouter } from 'vue-router'
import { useI18n } from '@/boot/i18n'
import { useI18n } from 'vue-i18n'
import { useQuasar } from 'quasar'
import { CMyCardService } from '@/components/CMyCardService'
import { CMyPage } from '@/components/CMyPage'
import { CCheckIfIsLogged } from '@/components/CCheckIfIsLogged'
import { CMyCardService } from '@src/components/CMyCardService'
import { CMyPage } from '@src/components/CMyPage'
import { CCheckIfIsLogged } from '@src/components/CCheckIfIsLogged'
import { toolsext } from '@store/Modules/toolsext'
import { tools } from '@store/Modules/tools'
import { tools } from '@tools'
import { shared_consts } from '@src/common/shared_vuejs'
export default defineComponent({

View File

@@ -1,37 +1,38 @@
import { CMyFieldDb } from '@/components/CMyFieldDb'
import { CMyFieldRec } from '@/components/CMyFieldRec'
import { CTitleBanner } from '@/components/CTitleBanner'
import { CProfile } from '@/components/CProfile'
import { CLabel } from '@/components/CLabel'
import { CCopyBtn } from '@/components/CCopyBtn'
import { CSkill } from '@/components/CSkill'
import { CDateTime } from '@/components/CDateTime'
import { CMyGroup } from '@/components/CMyGroup'
import { CUserNote } from '@/components/CUserNote'
import { CMyCircuit } from '@/components/CMyCircuit'
import { CMyFieldDb } from '@src/components/CMyFieldDb'
import { CMyFieldRec } from '@src/components/CMyFieldRec'
import { CTitleBanner } from '@src/components/CTitleBanner'
import { CProfile } from '@src/components/CProfile'
import { CLabel } from '@src/components/CLabel'
import { CCopyBtn } from '@src/components/CCopyBtn'
import { CSkill } from '@src/components/CSkill'
import { CDateTime } from '@src/components/CDateTime'
import { CMyGroup } from '@src/components/CMyGroup'
import { CUserNote } from '@src/components/CUserNote'
import { CMyCircuit } from '@src/components/CMyCircuit'
import { CNotifAtTop } from '@src/components/CNotifAtTop'
import { CMyActivities } from '@src/components/CMyActivities'
import { CSendCoins } from '@/components/CSendCoins'
import { CContactUser } from '@/components/CContactUser'
import { CTimeAgo } from '@/components/CTimeAgo'
import { CMyUser } from '@/components/CMyUser'
import { CUserNonVerif } from '@/components/CUserNonVerif'
import { CCheckIfIsLogged } from '@/components/CCheckIfIsLogged'
import { tools } from '@store/Modules/tools'
import { CSendCoins } from '@src/components/CSendCoins'
import { CContactUser } from '@src/components/CContactUser'
import { CTimeAgo } from '@src/components/CTimeAgo'
import { CMyUser } from '@src/components/CMyUser'
import { CUserNonVerif } from '@src/components/CUserNonVerif'
import { CCheckIfIsLogged } from '@src/components/CCheckIfIsLogged'
import { tools } from '@tools'
import { computed, defineComponent, onMounted, ref, watch } from 'vue'
import { useUserStore } from '@store/UserStore'
import { useRoute, useRouter } from 'vue-router'
import { useGlobalStore } from '@store/globalStore'
import { useI18n } from '@/boot/i18n'
import { useI18n } from 'vue-i18n'
import { toolsext } from '@store/Modules/toolsext'
import { useQuasar } from 'quasar'
import { costanti } from '@costanti'
import { ICircuit, IFriends, IMyCircuit, IMyGroup, IUserFields } from 'model'
import { shared_consts } from '@/common/shared_vuejs'
import { static_data } from '@/db/static_data'
import type { IMyCircuit, IMyGroup, IUserFields } from 'model';
import { ICircuit, IFriends } from 'model'
import { shared_consts } from '@src/common/shared_vuejs'
import { static_data } from '@src/db/static_data'
import { fieldsTable } from '@store/Modules/fieldsTable'
import { useNotifStore } from '@store/NotifStore'
import MixinUsers from '@/mixins/mixin-users'
import MixinUsers from '@src/mixins/mixin-users'
export default defineComponent({
@@ -62,8 +63,8 @@ export default defineComponent({
const idnotif = computed(() => $route.query.idnotif ? $route.query.idnotif.toString() : '')
const isDebugOn = computed(() => tools.isDebugOn())
const sendRIS = computed(() => !!$route.query.sr ? $route.query.sr : '')
const causalDest = computed(() => !!$route.query.cd ? $route.query.cd : '')
const sendRIS = computed(() => $route.query.sr ? $route.query.sr : '')
const causalDest = computed(() => $route.query.cd ? $route.query.cd : '')
const $router = useRouter()
const filtroutente = ref(<any[]>[])
@@ -89,7 +90,7 @@ export default defineComponent({
const listcircuitsfiltered = ref(<IMyCircuit[]>[])
const tab = ref('attivita')
function profile() {
return userStore.my.profile
}
@@ -101,7 +102,7 @@ export default defineComponent({
async function loadProfile() {
console.log('loadProfile...', username.value)
try {
caricato.value = false
if (sendRIS.value)
@@ -207,13 +208,13 @@ export default defineComponent({
function saveDaContattare() {
const globalStore = useGlobalStore()
const { t } = useI18n()
const mydatatosave = {
id: userStore.userprofile._id,
table: 'users',
fieldsvalue: { 'profile.da_contattare': userStore.userprofile.profile.da_contattare }
}
globalStore.saveFieldValue(mydatatosave).then((esito) => {
if (esito) {
tools.showPositiveNotif($q, t('db.recupdated'))
@@ -226,13 +227,13 @@ export default defineComponent({
function savePerm() {
const globalStore = useGlobalStore()
const { t } = useI18n()
const mydatatosave = {
id: userStore.userprofile._id,
table: 'users',
fieldsvalue: { 'perm': userStore.userprofile.perm }
}
globalStore.saveFieldValue(mydatatosave).then((esito) => {
if (esito) {
tools.showPositiveNotif($q, t('db.recupdated'))
@@ -280,7 +281,7 @@ export default defineComponent({
globalStore,
getLinkWebSite,
gotoPage,
sendRIS,
sendRIS,
causalDest,
spinner_visible,
showed,

View File

@@ -1,10 +1,14 @@
<template>
<div v-if="isDebugOn" class="bg-red text-white">
getImgUser(): {{ getImgUser() }}
<span v-if="!!tools.isLogged()">Logged: {{ tools.isLogged() }}</span> -
<span v-if="!!tools.isUserOk()">UserOk: {{ tools.isUserOk() }}</span> -
<span>tools.isEmailVerified(): {{ tools.isEmailVerified() }}</span> -
<span>tools.getLinkUserTelegramByUser(): {{ tools.getLinkUserTelegramByUser(userStore.userprofile) }}</span> -
<span v-if="caricato">caricato: {{ caricato }}</span> -
<span
>tools.getLinkUserTelegramByUser():
{{ tools.getLinkUserTelegramByUser(userStore.userprofile) }}</span
>
- <span v-if="caricato">caricato: {{ caricato }}</span> -
<span v-if="userStore.userprofile"
>userStore.userprofile: {{ userStore.userprofile.username }}</span
>
@@ -42,16 +46,13 @@
<div class="">
<q-avatar size="140px">
<q-img
:src="
userStore.userprofile.profile
? getImgUser(userStore.userprofile.profile)
: ''
"
:src="userStore.userprofile.profile ? getImgUser() : ''"
:alt="username"
img-class="imgprofile"
height="140px"
@click="showPic = true"
/>
<q-badge
v-if="tools.isUserOnline(userStore.userprofile)"
align="top"
@@ -146,11 +147,7 @@
<div class="">
<q-avatar size="140px">
<q-img
:src="
userStore.userprofile.profile
? getImgUser(userStore.userprofile.profile)
: ''
"
:src="userStore.userprofile.profile ? getImgUser() : ''"
:alt="username"
img-class="imgprofile"
height="140px"
@@ -347,7 +344,7 @@
class="q-pa-xxs text-white rounded-borders shadow-2"
>
{{
$t('db.both_fiducia', {
$t("db.both_fiducia", {
username: userStore.userprofile.username,
})
}}
@@ -373,7 +370,7 @@
class="q-pa-xxs text-white rounded-borders shadow-2"
>
{{
$t('db.handshake_him', {
$t("db.handshake_him", {
username: userStore.userprofile.username,
})
}}
@@ -399,7 +396,7 @@
class="q-pa-xxs text-white rounded-borders shadow-2"
>
{{
$t('db.handshake_you', {
$t("db.handshake_you", {
username: userStore.userprofile.username,
})
}}
@@ -555,7 +552,7 @@
/>
</q-item-section>
<q-item-section>{{
$t('handshake.remove_from_myhandshake')
$t("handshake.remove_from_myhandshake")
}}</q-item-section>
</q-item>
<q-item
@@ -581,7 +578,7 @@
<q-icon color="negative" name="fas fa-user-minus" />
</q-item-section>
<q-item-section>{{
$t('friends.remove_from_myfriends')
$t("friends.remove_from_myfriends")
}}</q-item-section>
</q-item>
<q-item
@@ -605,7 +602,7 @@
<q-icon color="negative" name="fas fa-ban" />
</q-item-section>
<q-item-section>{{
$t('friends.block_user')
$t("friends.block_user")
}}</q-item-section>
</q-item>
<q-item
@@ -628,7 +625,7 @@
<q-icon color="negative" name="fas fa-flag" />
</q-item-section>
<q-item-section>{{
$t('friends.report_user')
$t("friends.report_user")
}}</q-item-section>
</q-item>
</q-list>
@@ -829,12 +826,14 @@
v-if="userStore.isFacilitatore || userStore.isAdmin"
color="green"
:icon="
userStore.userprofile.profile && userStore.userprofile.profile.da_contattare
userStore.userprofile.profile &&
userStore.userprofile.profile.da_contattare
? 'fas fa-user-slash'
: 'fas fa-comment'
"
:label="
userStore.userprofile.profile && userStore.userprofile.profile.da_contattare
userStore.userprofile.profile &&
userStore.userprofile.profile.da_contattare
? $t('profile.togli_da_contattare')
: $t('profile.da_contattare')
"
@@ -909,7 +908,7 @@
<q-icon color="blue" name="fas fa-pencil-alt" />
</q-item-section>
<q-item-section>
{{ $t('shared.edit_profile') }}
{{ $t("shared.edit_profile") }}
</q-item-section>
</q-item>
</q-list>
@@ -970,6 +969,6 @@
</script>
<style lang="scss" scoped>
@import './myprofile.scss';
@import "./myprofile.scss";
</style>

View File

@@ -1,22 +1,23 @@
import { CMyFieldDb } from '@/components/CMyFieldDb'
import { CTitleBanner } from '@/components/CTitleBanner'
import { CProfile } from '@/components/CProfile'
import { CDateTime } from '@/components/CDateTime'
import { CMyPage } from '@/components/CMyPage'
import { CMyCardPopup } from '@/components/CMyCardPopup'
import { CCheckIfIsLogged } from '@/components/CCheckIfIsLogged'
import { CMyCardService } from '@/components/CMyCardService'
import { tools } from '@store/Modules/tools'
import { CMyFieldDb } from '@src/components/CMyFieldDb'
import { CTitleBanner } from '@src/components/CTitleBanner'
import { CProfile } from '@src/components/CProfile'
import { CDateTime } from '@src/components/CDateTime'
import { CMyPage } from '@src/components/CMyPage'
import { CMyCardPopup } from '@src/components/CMyCardPopup'
import { CCheckIfIsLogged } from '@src/components/CCheckIfIsLogged'
import { CMyCardService } from '@src/components/CMyCardService'
import { tools } from '@tools'
import { computed, defineComponent, onMounted, ref, watch } from 'vue'
import { useUserStore } from '@store/UserStore'
import { useRoute, useRouter } from 'vue-router'
import { useGlobalStore } from '@store/globalStore'
import { useI18n } from '@/boot/i18n'
import { useI18n } from 'vue-i18n'
import { toolsext } from '@store/Modules/toolsext'
import { useQuasar } from 'quasar'
import { costanti } from '@costanti'
import { IMySkill, IUserFields } from 'model'
import { shared_consts } from '@/common/shared_vuejs'
import type { IMySkill } from 'model';
import { IUserFields } from 'model'
import { shared_consts } from '@src/common/shared_vuejs'
import { fieldsTable } from '@store/Modules/fieldsTable'
import { colCitys } from '@store/Modules/fieldsTable'

View File

@@ -1,12 +1,12 @@
import { CMyFieldDb } from '@/components/CMyFieldDb'
import { CTitleBanner } from '@/components/CTitleBanner'
import { CProfile } from '@/components/CProfile'
import { tools } from '@store/Modules/tools'
import { CMyFieldDb } from '@src/components/CMyFieldDb'
import { CTitleBanner } from '@src/components/CTitleBanner'
import { CProfile } from '@src/components/CProfile'
import { tools } from '@tools'
import { defineComponent } from 'vue'
import { useUserStore } from '@store/UserStore'
import { useRouter } from 'vue-router'
import { useGlobalStore } from '@store/globalStore'
import { useI18n } from '@/boot/i18n'
import { useI18n } from 'vue-i18n'
import { toolsext } from '@store/Modules/toolsext'
import { useQuasar } from 'quasar'
import { costanti } from '@costanti'

View File

@@ -1,13 +1,13 @@
import { computed, defineComponent, onMounted, ref, watch } from 'vue'
import { useUserStore } from '@store/UserStore'
import { useRoute, useRouter } from 'vue-router'
import { useI18n } from '@/boot/i18n'
import { useI18n } from 'vue-i18n'
import { useQuasar } from 'quasar'
import { CMyCardPopup } from '@/components/CMyCardPopup'
import { CMyPage } from '@/components/CMyPage'
import { CNotifSettings } from '@/components/CNotifSettings'
import { CMyCardPopup } from '@src/components/CMyCardPopup'
import { CMyPage } from '@src/components/CMyPage'
import { CNotifSettings } from '@src/components/CNotifSettings'
import { toolsext } from '@store/Modules/toolsext'
import { tools } from '@store/Modules/tools'
import { tools } from '@tools'
import { shared_consts } from '@src/common/shared_vuejs'
export default defineComponent({