- newsletter: prende la lista utenti (flag news_on)

- Abilita a Tutti la Newsletter news_on
- isCommerciale
- JobsInProgress
- PCB: Corretto Totali che era a zero
This commit is contained in:
Surya Paolo
2025-05-06 18:19:03 +02:00
parent 70f1e5cbf1
commit 57cfa5858b
53 changed files with 1123 additions and 428 deletions

View File

@@ -155,7 +155,7 @@
/>
</q-item-section>
<q-item-section>
<q-item-label>Modifica Trafiletto</q-item-label>
<q-item-label>Modifica Sinossi</q-item-label>
</q-item-section>
</q-item>
@@ -180,7 +180,7 @@
</q-item>-->
<q-item
v-if="
tools.isManager() && !optcatalogo.generazionePDFInCorso && (editOn || options.show_edit_book)
!optcatalogo.generazionePDFInCorso && (editOn || options.show_edit_book)
"
clickable
v-close-popup
@@ -683,7 +683,7 @@
>
<CModifTrafiletto
v-model="myproduct"
titolo="Trafiletto"
titolo="Sinossi"
table="productinfos"
mykey="descr_trafiletto_catalogo"
:canModify="true"

View File

@@ -745,6 +745,11 @@ export default defineComponent({
if (recSector) {
tools.setCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + mytable.value + costanti.FILTER_SEP + table + costanti.FILTER_SEP + recSector.value, newval)
}
} else if (table === shared_consts.TABLES_LISTA_EDITORI) {
const rec = searchList.value.find((rec) => rec.table === table)
if (rec) {
tools.setCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + table + costanti.FILTER_SEP + 'referente', rec.value)
}
// setCategBySector('sectorgoods', table, newval)
} else if (table === shared_consts.TAB_CITIES) {
const rec = searchList.value.find((myrec) => myrec.table === shared_consts.TAB_CITIES) // check if exist

View File

@@ -40,6 +40,7 @@
>
<q-tab-panel name="descr">
<q-btn
v-if="false"
flat
round
dense

View File

@@ -18,6 +18,7 @@ import { shared_consts } from '@src/common/shared_vuejs'
import { LandingFooter } from '@src/components/LandingFooter'
import { CMyActivities } from '@src/components/CMyActivities'
import { CECommerce } from '@src/components/CECommerce'
import { CStatMacro } from '@src/components/CStatMacro'
import { CSearchProduct } from '@src/components/CSearchProduct'
import { CQRCode } from '@src/components/CQRCode'
import { CAITools } from '@src/components/CAITools'
@@ -72,7 +73,7 @@ export default defineComponent({
CPresentazione, CMyActivities,
CMyProfileTutorial, CSendRISTo,
CTitleBanner, CShareSocial, CCheckAppRunning, CRegistration,
CVisuVideoPromoAndPDF, CECommerce, CCatalogo, CAITools,
CVisuVideoPromoAndPDF, CECommerce, CCatalogo, CAITools, CStatMacro,
CMapComuni, CMapUsers, CMapGetCoordinates, CMapEditAddressByCoord,
CDashGroup, CMovements, CGridOriz, CQRCode, CCatalogList,
CSearchProduct,

View File

@@ -349,8 +349,8 @@
<div v-if="editOn" class="elemEdit">Cataloghi</div>
<q-tabs v-if="tools.isEditor() || tools.isGrafico()" v-model="tabcatalogo" dense class="bg-green text-white">
<q-tab name="griglia" icon="fas fa-eye" label="Griglia"> </q-tab>
<q-tab name="statistiche" icon="fas fa-chart-pie" label="Statistiche"> </q-tab>
<q-tab name="lista" icon="fas fa-list" label="Lista"> </q-tab>
<q-tab name="cerca" icon="fas fa-book" label="Cerca"> </q-tab>
<q-tab name="tutorial" icon="fas fa-info" label="Tutorial"> </q-tab>
</q-tabs>
<q-tab-panels v-model="tabcatalogo" animated keep-alive>
@@ -358,10 +358,6 @@
<CGridOriz table="catalogs" :tipovisu="costanti.VISUTABLE_TABLELIST" :prop_search="true" :finder="true"
:showMap="false" :prop_modif="tools.isAdmin()"></CGridOriz>
</q-tab-panel>
<q-tab-panel name="cerca">
<CSearchProduct v-model="myel.catalogo">
</CSearchProduct>
</q-tab-panel>
<q-tab-panel name="griglia">
<CCatalogList :prop_search="myel.parambool" :finder="myel.parambool2"
@@ -374,6 +370,11 @@
<q-btn rounded label="Apri Tutorial" color="primary" @click="naviga('/tutorial')"></q-btn>
</div>
</q-tab-panel>
<q-tab-panel name="statistiche">
<div class="q-pa-md q-ma-sm text-center">
<CStatMacro></CStatMacro>
</div>
</q-tab-panel>
</q-tab-panels>
</div>
<div v-else-if="myel.type === shared_consts.ELEMTYPE.STATUSREG">

View File

@@ -143,7 +143,7 @@ export default defineComponent({
const globalStore = useGlobalStore()
const col = ref(<IColGridTable>{
name: 'test', fieldtype: 0, showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView, visible: true, maxlength: props.maxlength, minlength: props.minlength
name: 'test', fieldtype: 0, showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView, visible: true, maxlength: props.maxlength, minlength: props.minlength, label_trans: ''
})
const row = ref({})

View File

@@ -883,9 +883,9 @@
@update:value="changevalRec"
@update:model-value="Savedb"
:newvaluefunc="addNewValue"
:filter_table="col.filter_table"
:addnone="col.addnone"
:filter_field="col.filter_field"
:filter_table="col?.filter_table"
:addnone="col?.addnone"
:filter_field="col?.filter_field"
:value_extra="value_extra"
:optval="fieldsTable.getKeyByTable(col.jointable)"
:optlab="fieldsTable.getLabelByTable(col.jointable)"
@@ -1105,7 +1105,7 @@
@update:model-value="changevalRec"
:maxlength="col.maxlength ? col.maxlength : undefined"
type="password"
@keyup.enter="scope.set"
@keyup.enter="changevalRec"
autofocus
>
</q-input>
@@ -1320,10 +1320,10 @@
:type_out="col.field_outtype"
:col="col"
:row="row"
:label="col.label ? col.label : t(col.label_trans)"
:label="col.label ? col.label : col.label_trans ? t(col.label_trans) : undefined"
v-model:value="scope.value"
:pickup="col.fieldtype === costanti.FieldType.select_by_server"
:addnone="col.addnone"
:addnone="col?.addnone"
:tablesel="col.fieldtype === costanti.FieldType.select_by_server ? tablesel : undefined"
:filter_table="col.filter_table"
:filter_field="col.filter_field"

View File

@@ -248,7 +248,7 @@
@update:model-value="changeval"
@filter="filterFn"
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
:label="addstrrequired + label"
:label="label ? addstrrequired + label : undefined"
:use-input="useinput"
@new-value="newvaluefuncfirst"
emit-value

View File

@@ -126,7 +126,7 @@ export default defineComponent({
{ name: "name", label: "Titolo del Libro", field: "name", align: "left" },
{ name: "authors", label: "Autore", field: "authors", align: "left" },
{ name: "isbn", label: "ISBN", field: "isbn", align: "left" },
{ name: "trafiletto", label: "Trafiletto", field: "trafiletto", align: "left" },
{ name: "trafiletto", label: "Sinossi", field: "trafiletto", align: "left" },
{ name: "catprods", label: "Argomento", field: "catprods", align: "left" },
{ name: "edizione", label: "Edizione", field: "edizione", align: "left" },
{ name: "casaeditrice", label: "Casa Editrice", field: "casaeditrice", align: "left" },

View File

@@ -216,7 +216,7 @@ export default defineComponent({
const arrlist: IRecFields[] = [
{
editOn: true,
label: "Descrizione Trafiletto per Catalogo",
label: "Descrizione Sinossi per Catalogo",
title: myproduct.value?.productInfo?.name,
table: "productinfos",
id: myproduct.value.productInfo._id, // ID dinamico, da sostituire con il valore reale

View File

View File

@@ -0,0 +1,35 @@
import Vue, { computed, 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 { useI18n } from 'vue-i18n'
import { useQuasar } from 'quasar'
import type { ChartItem, ChartConfiguration } from 'chart.js';
import { Chart, BarController, BarElement, LineController, LinearScale, CategoryScale, PointElement, LineElement, Title } from 'chart.js';
export default defineComponent({
name: 'CStatMacro',
components: {},
setup(props, { emit }) {
const userStore = useUserStore()
const globalStore = useGlobalStore()
const { t } = useI18n()
const q = useQuasar()
function mounted() {
}
onMounted(mounted)
return {
tools,
q,
}
},
})

View File

@@ -0,0 +1,12 @@
<template>
<div>
</div>
</template>
<script lang="ts" src="./CStatMacro.ts">
</script>
<style lang="scss" scoped>
@import './CStatMacro.scss';
</style>

View File

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

View File

@@ -26,6 +26,11 @@ export default defineComponent({
type: String,
default: '',
},
tipodest: {
required: false,
type: Number,
default: 0,
},
accept: {
required: false,
type: Boolean,
@@ -51,6 +56,7 @@ export default defineComponent({
const email = toRef(props, 'email')
const idwebsite = toRef(props, 'idwebsite')
const locale = toRef(props, 'locale')
const tipodest = toRef(props, 'tipodest')
const onSubmit = async function a2() {
if (!accept.value) {
@@ -67,6 +73,7 @@ export default defineComponent({
firstName: name.value,
lastName: surname.value,
idwebsite: idwebsite.value,
tipodest: tipodest.value,
locale: locale.value,
settomailchimp: toolsext.getValDb('MAILCHIMP_ON', true, false),
}
@@ -114,9 +121,19 @@ export default defineComponent({
accept.value = false
}
function optionsDest() {
return [
{ label: 'Lista Newsletter', value: 0 },
{ label: 'Utenti', value: 1 },
{ label: 'Diario', value: 2 },
{ label: 'Test', value: 10 },
];
}
return {
onSubmit,
onReset,
optionsDest,
}
},

View File

@@ -1,66 +1,110 @@
<template>
<div>
<div class="q-pa-md q-gutter-sm text-white">
<p class="news_title">{{$t('newsletter.title')}}</p>
<q-form
@submit="onSubmit"
@reset="onReset"
class="q-gutter-md"
>
<q-input
filled
name="firstName"
dense
dark standout
v-model="name"
:label="t('newsletter.name') + `*`"
:hint="t('newsletter.namehint')"
lazy-rules
:rules="[ val => val && val.length > 0 || $t('newsletter.typesomething')]">
<div>
<div class="q-pa-md q-gutter-sm text-white">
<p class="news_title">{{ $t('newsletter.title') }}</p>
<q-form
@submit="onSubmit"
@reset="onReset"
class="q-gutter-md"
>
<q-input
filled
name="firstName"
dense
dark
standout
v-model="name"
:label="t('newsletter.name') + `*`"
:hint="t('newsletter.namehint')"
lazy-rules
:rules="[(val) => (val && val.length > 0) || $t('newsletter.typesomething')]"
>
</q-input>
</q-input>
<q-input
filled
dense
dark
standout
v-model="surname"
name="lastName"
:label="t('newsletter.surname') + `*`"
:hint="t('newsletter.surnamehint')"
lazy-rules
:rules="[(val) => (val && val.length > 0) || $t('newsletter.typesomething')]"
>
</q-input>
<q-input
filled
dense
dark standout
v-model="surname"
name="lastName"
:label="t('newsletter.surname') + `*`"
:hint="t('newsletter.surnamehint')"
lazy-rules
:rules="[ val => val && val.length > 0 || $t('newsletter.typesomething')]">
<q-input
filled
dense
dark
standout
v-model="email"
:label="t('newsletter.email') + `*`"
lazy-rules
:rules="[(val) => (val && val.length > 6) || $t('newsletter.typesomething')]"
>
</q-input>
</q-input>
<q-select
filled
dense
dark
standout
v-model="tipodest"
:options="optionsDest"
:label="$t('newsletter.tipodest') + `*`"
lazy-rules
emit-value
map-options
option-value="value"
option-label="label"
:rules="[(val) => (val && val.length > 0) || $t('newsletter.typesomething')]"
>
</q-select>
<q-input
filled
dense
dark standout
v-model="email"
:label="t('newsletter.email') + `*`"
lazy-rules
:rules="[ val => val && val.length > 6 || $t('newsletter.typesomething')]">
<router-link
to="/policy"
custom
v-slot="{ navigate }"
>
<span
class="news_link"
@click="navigate"
@keypress.enter="navigate"
role="link"
>{{ $t('privacy_policy') }}</span
></router-link
>
</q-input>
<q-toggle
dark
v-model="accept"
:label="$t('newsletter.acceptlicense')"
/>
<router-link to="/policy" custom v-slot="{ navigate }">
<span class="news_link" @click="navigate" @keypress.enter="navigate" role="link">{{$t('privacy_policy')}}</span></router-link>
<q-toggle dark v-model="accept" :label="$t('newsletter.acceptlicense')"/>
<div>
<q-btn :label="$t('newsletter.submit')" type="submit" color="primary"/>
<q-btn :label="$t('newsletter.reset')" type="reset" color="primary" flat class="q-ml-sm"/>
</div>
</q-form>
<div>
<q-btn
:label="$t('newsletter.submit')"
type="submit"
color="primary"
/>
<q-btn
:label="$t('newsletter.reset')"
type="reset"
color="primary"
flat
class="q-ml-sm"
/>
</div>
</q-form>
</div>
</div>
</template>
<script lang="ts" src="./FormNewsletter.ts">
</script>
<script lang="ts" src="./FormNewsletter.ts"></script>
<style lang="scss" scoped>
@import './FormNewsletter.scss';
@import './FormNewsletter.scss';
</style>

View File

@@ -188,12 +188,15 @@
<div v-if="isConsiglio()" class="text-weight-bold text-user q-px-xs bg-deep-orange-10">
Consiglio
</div>
<div v-if="isManager()" class="text-weight-bold text-user bg-blue q-px-xs">
<div v-if="tools.isManager()" class="text-weight-bold text-user bg-blue q-px-xs">
Segreteria
</div>
<div v-if="isEditor()" class="text-weight-bold text-user bg-indigo q-px-xs">
<div v-if="tools.isEditor()" class="text-weight-bold text-user bg-indigo q-px-xs">
Editore
</div>
<div v-if="tools.isCommerciale()" class="text-weight-bold text-user bg-brown q-px-xs">
Commerciale
</div>
<div v-if="isFacilitatore()" class="text-weight-bold text-user q-px-xs">
Facilitatore
</div>