- aggiornamento con proj RISO. postcss, pwa.
This commit is contained in:
@@ -329,10 +329,10 @@ export const shared_consts = {
|
||||
TABFILTRI_UTENTE: 'filtriutente',
|
||||
|
||||
RECFILTRI_UTENTE: [
|
||||
/*{
|
||||
{
|
||||
label: '[Tutti]',
|
||||
value: -100,
|
||||
},*/
|
||||
},
|
||||
// {
|
||||
// label: 'Online almeno da 6 mesi',
|
||||
// value: 268435456, // FILTER_USER_ONLINE_6_MESI: 268435456,
|
||||
@@ -1246,6 +1246,12 @@ export const shared_consts = {
|
||||
},
|
||||
],
|
||||
|
||||
ShowCode: {
|
||||
ALL: 1,
|
||||
CODE: 2,
|
||||
INTERNAL_CODE: 3,
|
||||
},
|
||||
|
||||
OrderStatus: {
|
||||
NONE: 0,
|
||||
IN_CART: 1,
|
||||
@@ -1261,6 +1267,11 @@ export const shared_consts = {
|
||||
DELETE_REALLY: 20,
|
||||
},
|
||||
|
||||
OrderPages: {
|
||||
LISTA_TOTALI: { label: 'Lista Totali', value: 1, icon: 'fas fa-chart-bar', color: 'text-green' },
|
||||
ORDINI: { label: 'Ordini', value: 2, icon: 'fas fa-tasks', color: 'text-blue' },
|
||||
},
|
||||
|
||||
OrderStat: {
|
||||
// IN_CART: { label: 'In Carrello', value: 1 }, //IN_CART
|
||||
IN_CORSO: { label: 'In Corso', value: 2, icon: 'fas fa-tasks', color: 'text-black' }, //CHECKOUT_SENT
|
||||
|
||||
@@ -60,14 +60,16 @@ export default defineComponent({
|
||||
const { t } = useI18n();
|
||||
|
||||
// Converti le props in riferimenti reattivi
|
||||
const { value, format, width, widthlines, height, fontsize } = toRefs(props);
|
||||
const { value, format, width, widthlines, height, fontsizeprop } = toRefs(props);
|
||||
|
||||
const fontsize = ref(<string>props.fontsizeprop)
|
||||
|
||||
// Funzione per disegnare il codice a barre
|
||||
const drawBarcode = () => {
|
||||
try {
|
||||
if (value.value && value.value.length > 2) {
|
||||
JsBarcode("#C" + value.value, value.value, {
|
||||
format: format.value,
|
||||
format: (format.value || 'CODE128'),
|
||||
width: widthlines.value,
|
||||
height: tools.convstrToNum(height.value),
|
||||
displayValue: true,
|
||||
|
||||
@@ -21,7 +21,7 @@ h4 {
|
||||
}
|
||||
|
||||
.landing_background {
|
||||
background: #000 url(../../../public/images/foto1.jpg) no-repeat 50% fixed;
|
||||
background: #000 url(/images/foto1.jpg) no-repeat 50% fixed;
|
||||
background-size: cover
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ body.mobile .landing:before {
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: -1;
|
||||
//background: #000 url(../../public/images/cover.jpg) 50%;
|
||||
//background: #000 url(/images/cover.jpg) 50%;
|
||||
|
||||
background-size: cover
|
||||
}
|
||||
@@ -256,17 +256,17 @@ body.mobile .landing:before {
|
||||
}
|
||||
|
||||
.homep-cover-img-1 {
|
||||
background: #000 url(../../../public/images/foto1.jpg) no-repeat 50% fixed;
|
||||
background: #000 url(/images/foto1.jpg) no-repeat 50% fixed;
|
||||
//transition: background-image 1s ease-in-out;
|
||||
}
|
||||
|
||||
.homep-cover-img-2 {
|
||||
background: #000 url(../../../public/images/foto2.jpg) no-repeat 50% fixed;
|
||||
background: #000 url(/images/foto2.jpg) no-repeat 50% fixed;
|
||||
//transition: background-image 1s ease-in-out;
|
||||
}
|
||||
|
||||
.homep-cover-img-3 {
|
||||
background: #000 url(../../../public/images/foto3.jpg) no-repeat 50% fixed;
|
||||
background: #000 url(/images/foto3.jpg) no-repeat 50% fixed;
|
||||
//transition: background-image 1s ease-in-out;
|
||||
}
|
||||
|
||||
@@ -306,7 +306,7 @@ body.mobile .landing:before {
|
||||
}
|
||||
|
||||
.carousel_img_3 {
|
||||
//background-image: url(../../public/images/cibo_sano.jpg);
|
||||
//background-image: url(/images/cibo_sano.jpg);
|
||||
background-size: cover !important;
|
||||
background-position: 50% center !important;
|
||||
background-repeat: no-repeat !important;
|
||||
@@ -387,7 +387,7 @@ body.mobile .landing:before {
|
||||
}
|
||||
|
||||
.carousel_img_3 {
|
||||
//background-image: url(../../public/images/cibo_sano.jpg);
|
||||
//background-image: url(/images/cibo_sano.jpg);
|
||||
background-size: 620px 620px !important;
|
||||
background-position: 50% top !important;
|
||||
background-repeat: no-repeat !important;
|
||||
|
||||
0
src/components/CMyDialog/CMyDialog.scss
Executable file
0
src/components/CMyDialog/CMyDialog.scss
Executable file
59
src/components/CMyDialog/CMyDialog.ts
Executable file
59
src/components/CMyDialog/CMyDialog.ts
Executable file
@@ -0,0 +1,59 @@
|
||||
import { defineComponent, onMounted, ref, computed, watch } from 'vue'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { toolsext } from '@store/Modules/toolsext'
|
||||
import { costanti } from '@costanti'
|
||||
|
||||
import { shared_consts } from '@src/common/shared_vuejs'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CMyDialog',
|
||||
emits: ['update:modelValue'],
|
||||
props: {
|
||||
modelValue: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
const userStore = useUserStore()
|
||||
const { t } = useI18n();
|
||||
|
||||
const internalModel = ref(props.modelValue)
|
||||
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
(newVal) => {
|
||||
internalModel.value = newVal
|
||||
}
|
||||
)
|
||||
|
||||
watch(internalModel, (newVal) => {
|
||||
emit('update:modelValue', newVal)
|
||||
})
|
||||
|
||||
function mounted() {
|
||||
|
||||
// ...
|
||||
}
|
||||
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
userStore,
|
||||
costanti,
|
||||
tools,
|
||||
toolsext,
|
||||
shared_consts,
|
||||
t,
|
||||
internalModel,
|
||||
}
|
||||
}
|
||||
})
|
||||
26
src/components/CMyDialog/CMyDialog.vue
Executable file
26
src/components/CMyDialog/CMyDialog.vue
Executable file
@@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<q-dialog v-model="internalModel" maximized
|
||||
transition-show="slide-up"
|
||||
transition-hide="slide-down"
|
||||
>
|
||||
<q-card class="dialog_card">
|
||||
<q-toolbar class="bg-primary text-white">
|
||||
<q-toolbar-title>
|
||||
{{ title }}
|
||||
</q-toolbar-title>
|
||||
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
|
||||
</q-toolbar>
|
||||
|
||||
<q-card-section class="inset-shadow">
|
||||
<slot></slot>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CMyDialog.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CMyDialog';
|
||||
</style>
|
||||
1
src/components/CMyDialog/index.ts
Executable file
1
src/components/CMyDialog/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as CMyDialog} from './CMyDialog.vue'
|
||||
@@ -17,7 +17,7 @@ h4 {
|
||||
}
|
||||
|
||||
.landing_background {
|
||||
background: #000 url(../../../public/images/foto1.jpg) no-repeat 50% fixed;
|
||||
background: #000 url(/images/foto1.jpg) no-repeat 50% fixed;
|
||||
background-size: cover
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ body.mobile .landing:before {
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: -1;
|
||||
//background: #000 url(../../public/images/cover.jpg) 50%;
|
||||
//background: #000 url(/images/cover.jpg) 50%;
|
||||
|
||||
background-size: cover
|
||||
}
|
||||
@@ -291,7 +291,7 @@ h1 {
|
||||
}
|
||||
|
||||
.carousel_img_3 {
|
||||
//background-image: url(../../public/images/cibo_sano.jpg);
|
||||
//background-image: url(/images/cibo_sano.jpg);
|
||||
background-size: cover !important;
|
||||
background-position: 50% center !important;
|
||||
background-repeat: no-repeat !important;
|
||||
|
||||
@@ -17,7 +17,7 @@ h4 {
|
||||
}
|
||||
|
||||
.landing_background {
|
||||
background: #000 url(../../../public/images/foto1.jpg) no-repeat 50% fixed;
|
||||
background: #000 url(/images/foto1.jpg) no-repeat 50% fixed;
|
||||
background-size: cover
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ body.mobile .landing:before {
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: -1;
|
||||
//background: #000 url(../../public/images/cover.jpg) 50%;
|
||||
//background: #000 url(/images/cover.jpg) 50%;
|
||||
|
||||
background-size: cover
|
||||
}
|
||||
@@ -292,7 +292,7 @@ h1 {
|
||||
}
|
||||
|
||||
.carousel_img_3 {
|
||||
//background-image: url(../../public/images/cibo_sano.jpg);
|
||||
//background-image: url(/images/cibo_sano.jpg);
|
||||
background-size: cover !important;
|
||||
background-position: 50% center !important;
|
||||
background-repeat: no-repeat !important;
|
||||
|
||||
@@ -21,7 +21,7 @@ h4 {
|
||||
}
|
||||
|
||||
.landing_background {
|
||||
background: #000 url(../../../public/images/foto1.jpg) no-repeat 50% fixed;
|
||||
background: #000 url(/images/foto1.jpg) no-repeat 50% fixed;
|
||||
background-size: cover
|
||||
}
|
||||
|
||||
@@ -201,7 +201,7 @@ body.mobile .landing:before {
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: -1;
|
||||
//background: #000 url(../../public/images/cover.jpg) 50%;
|
||||
//background: #000 url(/images/cover.jpg) 50%;
|
||||
|
||||
background-size: cover
|
||||
}
|
||||
@@ -268,17 +268,17 @@ body.mobile .landing:before {
|
||||
}
|
||||
|
||||
.homep-cover-img-1 {
|
||||
background: #000 url(../../../public/images/foto1.jpg) no-repeat 50% fixed;
|
||||
background: #000 url(/images/foto1.jpg) no-repeat 50% fixed;
|
||||
//transition: background-image 1s ease-in-out;
|
||||
}
|
||||
|
||||
.homep-cover-img-2 {
|
||||
background: #000 url(../../../public/images/foto2.jpg) no-repeat 50% fixed;
|
||||
background: #000 url(/images/foto2.jpg) no-repeat 50% fixed;
|
||||
//transition: background-image 1s ease-in-out;
|
||||
}
|
||||
|
||||
.homep-cover-img-3 {
|
||||
background: #000 url(../../../public/images/foto3.jpg) no-repeat 50% fixed;
|
||||
background: #000 url(/images/foto3.jpg) no-repeat 50% fixed;
|
||||
//transition: background-image 1s ease-in-out;
|
||||
}
|
||||
|
||||
@@ -318,7 +318,7 @@ body.mobile .landing:before {
|
||||
}
|
||||
|
||||
.carousel_img_3 {
|
||||
//background-image: url(../../public/images/cibo_sano.jpg);
|
||||
//background-image: url(/images/cibo_sano.jpg);
|
||||
background-size: contain !important;
|
||||
background-position: 50% center !important;
|
||||
background-repeat: no-repeat !important;
|
||||
|
||||
@@ -7,14 +7,15 @@
|
||||
font-weight: 350;
|
||||
}
|
||||
|
||||
.q-toolbar__title{
|
||||
.q-toolbar__title {
|
||||
padding: 0 12px;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 600px) {
|
||||
.q-toolbar__title{
|
||||
.q-toolbar__title {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.layout-padding {
|
||||
padding: 1.5em .5em;
|
||||
}
|
||||
@@ -157,13 +158,12 @@
|
||||
}
|
||||
|
||||
select {
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
text-indent: 1px;
|
||||
text-overflow: '';
|
||||
}
|
||||
|
||||
.label-success .q-picker-textfield:after, .label-error .q-picker-textfield:after {
|
||||
.label-success .q-picker-textfield:after,
|
||||
.label-error .q-picker-textfield:after {
|
||||
content: "" !important;
|
||||
}
|
||||
|
||||
@@ -218,7 +218,8 @@ canvas {
|
||||
min-height: 43px;
|
||||
}
|
||||
|
||||
.right-itens a, .right-itens button {
|
||||
.right-itens a,
|
||||
.right-itens button {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
@@ -228,7 +229,7 @@ canvas {
|
||||
}
|
||||
|
||||
.fa-facebook:before {
|
||||
content: url('../../../public/svg/flag_it.svg');
|
||||
content: url('/svg/flag_it.svg');
|
||||
}
|
||||
|
||||
.clIconOnline {
|
||||
@@ -247,14 +248,17 @@ canvas {
|
||||
.clCloudUpload {
|
||||
transition: all 1s ease-out;
|
||||
color: initial;
|
||||
|
||||
&.send {
|
||||
transition: all 1s ease-in;
|
||||
background-color: lightgreen;
|
||||
}
|
||||
|
||||
&.receive {
|
||||
transition: all 1s ease-in;
|
||||
background-color: yellow;
|
||||
}
|
||||
|
||||
&.error {
|
||||
transition: all 1s ease-in;
|
||||
background-color: red;
|
||||
@@ -264,14 +268,17 @@ canvas {
|
||||
.clIndexeddb {
|
||||
transition: all 1s ease-out;
|
||||
color: initial;
|
||||
|
||||
&.receive {
|
||||
transition: all 1s ease-in;
|
||||
background-color: yellow;
|
||||
}
|
||||
|
||||
&.send {
|
||||
transition: all 1s ease-in;
|
||||
background-color: lightgreen;
|
||||
}
|
||||
|
||||
&.error {
|
||||
transition: all 1s ease-in;
|
||||
background-color: red;
|
||||
@@ -306,7 +313,7 @@ canvas {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.roundimg {
|
||||
.roundimg {
|
||||
border-radius: 50% !important;
|
||||
color: red;
|
||||
background-color: red;
|
||||
@@ -316,6 +323,6 @@ canvas {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.q-drawer-cart{
|
||||
.q-drawer-cart {
|
||||
width: 350px !important;
|
||||
}
|
||||
@@ -9,8 +9,8 @@
|
||||
>
|
||||
<q-toolbar
|
||||
color="primary"
|
||||
:glossy="$q.theme === 'mat'"
|
||||
:inverted="$q.theme === 'ios'"
|
||||
:glossy="!$q.platform.is.ios && !$q.platform.is.android"
|
||||
:inverted="$q.platform.is.ios"
|
||||
class="toolbar"
|
||||
>
|
||||
<q-btn flat dense round @click="clickMenu3Orizz" aria-label="Menu">
|
||||
@@ -71,7 +71,10 @@
|
||||
<q-toggle :icon="'fas fa-moon'" v-model="dark"> </q-toggle>
|
||||
</div>
|
||||
<div
|
||||
v-if="tools.isLogged() && (isAdmin() || tools.isEditor()|| tools.isGrafico())"
|
||||
v-if="
|
||||
tools.isLogged() &&
|
||||
(isAdmin() || tools.isEditor() || tools.isGrafico())
|
||||
"
|
||||
class="text-h7"
|
||||
>
|
||||
<q-toggle :icon="'fas fa-pencil-alt'" v-model="editOn"> </q-toggle>
|
||||
@@ -260,7 +263,7 @@
|
||||
<CSelectUserActive></CSelectUserActive>
|
||||
|
||||
<div v-if="tools.isLogged()" class="text-weight-bold text-cart">
|
||||
{{ $t('ecomm.carrello_di', { user: products.userActive.username }) }}
|
||||
{{ $t("ecomm.carrello_di", { user: products.userActive.username }) }}
|
||||
</div>
|
||||
<CMyCart v-if="isfinishLoading"></CMyCart>
|
||||
</q-drawer>
|
||||
@@ -288,7 +291,7 @@
|
||||
`text-center q-ma-xs boldhigh text-` + getColorText + ` text-h7`
|
||||
"
|
||||
>
|
||||
{{ t('header.area_personale') }}
|
||||
{{ t("header.area_personale") }}
|
||||
</div>
|
||||
|
||||
<q-avatar size="80px" class="center_img q-ma-md">
|
||||
@@ -366,14 +369,14 @@
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!tools.isLogged()" class="text-user text-italic bg-red">
|
||||
{{ t('user.loggati') }}
|
||||
{{ t("user.loggati") }}
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="tools.isLogged() && !tools.isVerified()"
|
||||
class="text-verified"
|
||||
>
|
||||
{{ t('components.authentication.email_verification.verify_email') }}
|
||||
{{ t("components.authentication.email_verification.verify_email") }}
|
||||
</div>
|
||||
|
||||
<div v-if="tools.isLogged()" class="text-verified">
|
||||
@@ -382,7 +385,7 @@
|
||||
class="text-user text-italic bg-red"
|
||||
v-if="!tools.Verificato()"
|
||||
>
|
||||
{{ t('reg.non_verificato') }}
|
||||
{{ t("reg.non_verificato") }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -396,7 +399,7 @@
|
||||
color="primary"
|
||||
icon="person"
|
||||
:to="`/my/` + getMyUsername()"
|
||||
>{{ t('pages.profile') }}
|
||||
>{{ t("pages.profile") }}
|
||||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
@@ -404,7 +407,7 @@
|
||||
color="negative"
|
||||
icon="exit_to_app"
|
||||
@click="logoutHandler"
|
||||
>{{ t('login.esci') }}</q-btn
|
||||
>{{ t("login.esci") }}</q-btn
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
@@ -429,5 +432,5 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './MyHeader.scss';
|
||||
@import "./MyHeader.scss";
|
||||
</style>
|
||||
|
||||
240
src/css/app.scss
240
src/css/app.scss
@@ -1,67 +1,5 @@
|
||||
@use "sass:color";
|
||||
|
||||
@font-face {
|
||||
font-family: 'AGaramondPro-Regular';
|
||||
src: url('~src/assets/fonts/AGaramondPro-Regular.otf') format('opentype');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'DINPro-BoldItalic';
|
||||
src: url('~src/assets/fonts/DINPro-BoldItalic.otf') format('opentype');
|
||||
font-weight: bold;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'DINPro-CondBlack';
|
||||
src: url('~src/assets/fonts/DINPro-CondBlack.otf') format('opentype');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'DINPro-CondensedBold';
|
||||
src: url('~src/assets/fonts/DINPro-CondensedBold.otf') format('opentype');
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'DIN-Pro-Condensed-Bold-Italic';
|
||||
src: url('~src/assets/fonts/DIN-Pro-Condensed-Bold-Italic.otf') format('opentype');
|
||||
font-weight: bold;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'DIN-Pro-Condensed-Regular';
|
||||
src: url('~src/assets/fonts/DIN-Pro-Condensed-Regular.otf') format('opentype');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'DIN-Pro-Condensed-Medium-Italic';
|
||||
src: url('~src/assets/fonts/DIN-Pro-Condensed-Medium-Italic.otf') format('opentype');
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'DINPro';
|
||||
src: url('~src/assets/fonts/DINPro.otf') format('opentype');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'DINPro-Medium';
|
||||
src: url('~src/assets/fonts/DINPro-Medium.otf') format('opentype');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
@@ -191,14 +129,10 @@ $heightBtn: 100%;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.slide-enter {}
|
||||
|
||||
.slide-enter-active {
|
||||
animation: slide-in 0.2s ease-out forwards;
|
||||
}
|
||||
|
||||
.slide-leave {}
|
||||
|
||||
.slide-leave-active {
|
||||
animation: slide-out 0.5s ease-out forwards;
|
||||
}
|
||||
@@ -749,24 +683,24 @@ h3 {
|
||||
}
|
||||
|
||||
.fa-flag-it:before {
|
||||
content: url('../../public/svg/flag_it.svg');
|
||||
content: url('/svg/flag_it.svg');
|
||||
}
|
||||
|
||||
.fa-flag-us:before {
|
||||
content: url('../../public/svg/flag_us.svg');
|
||||
content: url('/svg/flag_us.svg');
|
||||
}
|
||||
|
||||
|
||||
.fa-flag-es:before {
|
||||
content: url('../../public/svg/flag_es.svg');
|
||||
content: url('/svg/flag_es.svg');
|
||||
}
|
||||
|
||||
.fa-flag-gb:before {
|
||||
content: url('../../public/svg/flag_gb.svg');
|
||||
content: url('/svg/flag_gb.svg');
|
||||
}
|
||||
|
||||
.fa-flag-de:before {
|
||||
content: url('../../public/svg/flag_de.svg');
|
||||
content: url('/svg/flag_de.svg');
|
||||
}
|
||||
|
||||
.animazione {
|
||||
@@ -1003,11 +937,6 @@ h3 {
|
||||
border: solid 3px #0f01b5;
|
||||
}
|
||||
|
||||
.my-sticky-header-table {
|
||||
/* max height is important */
|
||||
/* this is when the loading indicator appears */
|
||||
|
||||
}
|
||||
|
||||
.my-sticky-header-table .q-table__middle {
|
||||
max-height: 650px !important;
|
||||
@@ -1098,8 +1027,6 @@ h3 {
|
||||
}
|
||||
}
|
||||
|
||||
.myfooter {}
|
||||
|
||||
.iconplusminus {
|
||||
font-size: 6px;
|
||||
}
|
||||
@@ -1204,6 +1131,7 @@ h3 {
|
||||
margin: 1px;
|
||||
object-position: 50% 5% !important;
|
||||
object-fit: contain !important;
|
||||
|
||||
@media (max-width: 600px) {
|
||||
/* Versione Mobile */
|
||||
}
|
||||
@@ -1271,8 +1199,6 @@ h3 {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.regione {}
|
||||
|
||||
.accom_num,
|
||||
.accom_maxosp {
|
||||
font-size: 1.25rem;
|
||||
@@ -1387,7 +1313,7 @@ h3 {
|
||||
}
|
||||
|
||||
.carousel_img {
|
||||
//background-image: url(../../public/images/cibo_sano.jpg);
|
||||
//background-image: url(/images/cibo_sano.jpg);
|
||||
background-size: contain !important;
|
||||
background-position: 50% center !important;
|
||||
background-repeat: no-repeat !important;
|
||||
@@ -1477,10 +1403,12 @@ h3 {
|
||||
.chip_shadow {
|
||||
border-radius: 20px;
|
||||
background: #1729ea;
|
||||
background: -webkit-linear-gradient(45deg, #1e90ff, #3742fa) !important; /* A combination of lighter blues */
|
||||
background: -webkit-linear-gradient(45deg, #1e90ff, #3742fa) !important;
|
||||
/* A combination of lighter blues */
|
||||
background: linear-gradient(45deg, #3a90e7, #8e92e4) !important;
|
||||
box-shadow: 1px 1px 3px #5f6f8b;
|
||||
color: #ffffff; /* Ensure the text is white for better contrast */
|
||||
color: #ffffff;
|
||||
/* Ensure the text is white for better contrast */
|
||||
}
|
||||
|
||||
.last_access {
|
||||
@@ -1522,17 +1450,24 @@ h3 {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.accordion-enter-active, .accordion-leave-active {
|
||||
.accordion-enter-active,
|
||||
.accordion-leave-active {
|
||||
transition: max-height 0.3s ease;
|
||||
}
|
||||
|
||||
.accordion-enter, .accordion-leave-to /* .accordion-leave-active nella versione 2.1.8 e precedenti */ {
|
||||
.accordion-enter,
|
||||
.accordion-leave-to
|
||||
|
||||
/* .accordion-leave-active nella versione 2.1.8 e precedenti */
|
||||
{
|
||||
max-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.accordion-enter-to, .accordion-leave {
|
||||
max-height: 500px; /* Imposta a quanto vuoi che si espanda */
|
||||
.accordion-enter-to,
|
||||
.accordion-leave {
|
||||
max-height: 500px;
|
||||
/* Imposta a quanto vuoi che si espanda */
|
||||
}
|
||||
|
||||
.accordion-content {
|
||||
@@ -2020,17 +1955,18 @@ h3 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.ev_hour, .ev_hour_end {
|
||||
.ev_hour,
|
||||
.ev_hour_end {
|
||||
color: black;
|
||||
font-size: 0.85rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.ev_hour{
|
||||
.ev_hour {
|
||||
color: green;
|
||||
}
|
||||
|
||||
.ev_hour_end{
|
||||
.ev_hour_end {
|
||||
color: red;
|
||||
}
|
||||
|
||||
@@ -2070,6 +2006,7 @@ h3 {
|
||||
|
||||
.fake-link {
|
||||
font-weight: bold;
|
||||
|
||||
@media (max-width: 600px) {
|
||||
color: #1976D2;
|
||||
text-decoration: underline !important;
|
||||
@@ -2263,23 +2200,18 @@ $coloreprincipale: lightblue;
|
||||
}
|
||||
|
||||
.sfondo_gradiente_rosso {
|
||||
background: linear-gradient(
|
||||
180deg,
|
||||
rgba(
|
||||
color.channel($rosso, "red", $space: rgb),
|
||||
color.channel($rosso, "green", $space: rgb),
|
||||
color.channel($rosso, "blue", $space: rgb),
|
||||
$trasparenza
|
||||
),
|
||||
$coloreprincipale,
|
||||
rgba(
|
||||
color.channel($rosso, "red", $space: rgb),
|
||||
color.channel($rosso, "green", $space: rgb),
|
||||
color.channel($rosso, "blue", $space: rgb),
|
||||
$trasparenza
|
||||
)
|
||||
) !important;
|
||||
background: linear-gradient(180deg,
|
||||
rgba(color.channel($rosso, "red", $space: rgb),
|
||||
color.channel($rosso, "green", $space: rgb),
|
||||
color.channel($rosso, "blue", $space: rgb),
|
||||
$trasparenza ),
|
||||
$coloreprincipale,
|
||||
rgba(color.channel($rosso, "red", $space: rgb),
|
||||
color.channel($rosso, "green", $space: rgb),
|
||||
color.channel($rosso, "blue", $space: rgb),
|
||||
$trasparenza )) !important;
|
||||
}
|
||||
|
||||
.card-carousel-container {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
@@ -2318,8 +2250,10 @@ $coloreprincipale: lightblue;
|
||||
.card-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-width: 200px; /* Massima larghezza per la card */
|
||||
margin: 0 10px; /* Spazio tra le card */
|
||||
max-width: 200px;
|
||||
/* Massima larghezza per la card */
|
||||
margin: 0 10px;
|
||||
/* Spazio tra le card */
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@@ -2466,8 +2400,10 @@ $coloreprincipale: lightblue;
|
||||
:root {
|
||||
--background-even-light: rgba(211, 211, 211, 0.3);
|
||||
--background-odd-light: white;
|
||||
--background-even-dark: rgba(45, 45, 45, 0.7); /* Aggiustare per il tema dark */
|
||||
--background-odd-dark: rgba(30, 30, 30, 1); /* Aggiustare per il tema dark */
|
||||
--background-even-dark: rgba(45, 45, 45, 0.7);
|
||||
/* Aggiustare per il tema dark */
|
||||
--background-odd-dark: rgba(30, 30, 30, 1);
|
||||
/* Aggiustare per il tema dark */
|
||||
--text-color: #555;
|
||||
--bg-color: #f9f9f9;
|
||||
}
|
||||
@@ -2483,9 +2419,10 @@ body.body--dark {
|
||||
|
||||
.background-odd {
|
||||
background-color: white;
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
background-color: rgba(140, 140, 140, 0.3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.q-stepper__tab {
|
||||
@@ -2500,47 +2437,67 @@ body.body--dark {
|
||||
}
|
||||
}
|
||||
|
||||
.dialog_class{
|
||||
.dialog_class {
|
||||
max-width: 800px;
|
||||
width: 100%;
|
||||
|
||||
@media (max-width: 600px) {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.citation {
|
||||
font-style: italic; /* Testo in corsivo per indicare una citazione */
|
||||
border-left: 4px solid #cccccc; /* Barra verticale per evidenziare la citazione */
|
||||
margin: 10px 0; /* Spaziatura verticale */
|
||||
padding: 10px 20px; /* Spaziatura interna */
|
||||
color: #555555; /* Colore del testo leggermente attenuato */
|
||||
background-color: #f9f9f9; /* Sfondo leggero per evidenziare la citazione */
|
||||
font-style: italic;
|
||||
/* Testo in corsivo per indicare una citazione */
|
||||
border-left: 4px solid #cccccc;
|
||||
/* Barra verticale per evidenziare la citazione */
|
||||
margin: 10px 0;
|
||||
/* Spaziatura verticale */
|
||||
padding: 10px 20px;
|
||||
/* Spaziatura interna */
|
||||
color: #555555;
|
||||
/* Colore del testo leggermente attenuato */
|
||||
background-color: #f9f9f9;
|
||||
/* Sfondo leggero per evidenziare la citazione */
|
||||
}
|
||||
|
||||
.comment {
|
||||
font-size: 0.9em; /* Testo leggermente più piccolo */
|
||||
color: #666666; /* Colore del testo attenuato */
|
||||
background-color: #f4f4f4; /* Sfondo neutro */
|
||||
padding: 10px; /* Spaziatura interna */
|
||||
border-radius: 5px; /* Angoli arrotondati */
|
||||
box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.1); /* Leggera ombra per effetto di profondità */
|
||||
margin: 10px 0; /* Spaziatura verticale */
|
||||
font-size: 0.9em;
|
||||
/* Testo leggermente più piccolo */
|
||||
color: #666666;
|
||||
/* Colore del testo attenuato */
|
||||
background-color: #f4f4f4;
|
||||
/* Sfondo neutro */
|
||||
padding: 10px;
|
||||
/* Spaziatura interna */
|
||||
border-radius: 5px;
|
||||
/* Angoli arrotondati */
|
||||
box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.1);
|
||||
/* Leggera ombra per effetto di profondità */
|
||||
margin: 10px 0;
|
||||
/* Spaziatura verticale */
|
||||
}
|
||||
|
||||
.flex-container-book {
|
||||
display: flex;
|
||||
flex-direction: row; /* Allineamento orizzontale */
|
||||
flex-direction: row;
|
||||
/* Allineamento orizzontale */
|
||||
flex-wrap: wrap;
|
||||
gap: 0px; /* Spaziatura tra gli elementi */
|
||||
gap: 0px;
|
||||
/* Spaziatura tra gli elementi */
|
||||
justify-content: space-evenly;
|
||||
}
|
||||
|
||||
.flex-item-book {
|
||||
display: flex; /* Rende il div un container flex per allineare i contenuti */
|
||||
justify-content: center; /* Allineamento orizzontale al centro */
|
||||
align-items: center; /* Allineamento verticale al centro */
|
||||
display: flex;
|
||||
/* Rende il div un container flex per allineare i contenuti */
|
||||
justify-content: center;
|
||||
/* Allineamento orizzontale al centro */
|
||||
align-items: center;
|
||||
/* Allineamento verticale al centro */
|
||||
padding: 0px;
|
||||
flex-grow: 0; /* Opzionale: permette agli elementi di crescere uniformemente */
|
||||
flex-grow: 0;
|
||||
/* Opzionale: permette agli elementi di crescere uniformemente */
|
||||
}
|
||||
|
||||
.card-page {
|
||||
@@ -2565,10 +2522,11 @@ body.body--dark {
|
||||
flex-direction: column !important;
|
||||
}
|
||||
|
||||
.sfondo_print{
|
||||
.sfondo_print {
|
||||
background-color: #17ead9;
|
||||
}
|
||||
.sfondo_margine{
|
||||
|
||||
.sfondo_margine {
|
||||
background-color: #d8f38a;
|
||||
}
|
||||
|
||||
@@ -2580,23 +2538,11 @@ body.body--dark {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.justified-text {
|
||||
text-align: justify;
|
||||
hyphens: auto;
|
||||
-webkit-hyphens: auto;
|
||||
-ms-hyphens: auto;
|
||||
word-break: break-word;
|
||||
overflow-wrap: break-word;
|
||||
|
||||
/* Supporto per lingue specifiche */
|
||||
lang: it; /* Imposta la lingua a italiano */
|
||||
}
|
||||
|
||||
.custom-z-index {
|
||||
z-index: 2000 !important;
|
||||
}
|
||||
|
||||
.mybadge {
|
||||
border-radius: 10px !important;
|
||||
text-shadow: .05rem .05rem .15rem #878787;
|
||||
text-shadow: .05rem .05rem .15rem #878787;
|
||||
}
|
||||
@@ -8,8 +8,6 @@ const msg_website_enUs = {
|
||||
products: {
|
||||
quantity: 'Quantità',
|
||||
quantityAvailable: 'Disponibili',
|
||||
stockQty: 'In Magazzino',
|
||||
stockBloccatiQty: 'Bloccati In Magazzino',
|
||||
weight: 'Peso',
|
||||
stars: 'Voto',
|
||||
color: 'Colore',
|
||||
@@ -38,7 +36,6 @@ const msg_website_enUs = {
|
||||
productslist: 'Lista Prodotti',
|
||||
collabora: 'Collabora',
|
||||
storehouses: 'Magazzino',
|
||||
providers: 'Fornitori',
|
||||
departments: 'Uffici',
|
||||
orders: 'Ordini Ricevuti',
|
||||
orders2: 'Ordini Ricevuti',
|
||||
|
||||
@@ -8,7 +8,6 @@ const msg_website_es = {
|
||||
products: {
|
||||
quantity: 'Quantità',
|
||||
quantityAvailable: 'Disponibili',
|
||||
stockQty: 'In Magazzino',
|
||||
weight: 'Peso',
|
||||
stars: 'Voto',
|
||||
color: 'Colore',
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
const msg_website_it = {
|
||||
ws: {
|
||||
sitename: 'Più che Buono',
|
||||
siteshortname: 'Più che Buono',
|
||||
description: '',
|
||||
keywords: '',
|
||||
sitename: 'Riso',
|
||||
siteshortname: 'RISO',
|
||||
description: 'Siamo la Rete Italiana di Scambio Orizzontale, abbiamo creato questa piattaforma per metterla al servizio di chi vuole riscoprire il valore della condivisione e della cooperazione. Valori semplici e profondi che ci aiutano a ritrovare il Senso della Vita, perduto in questa società consumista, e riporti quei Sani Pricìpi Naturali ed Umani di Fratellanza che intere popolazioni antiche conoscevano bene.',
|
||||
keywords: 'riso, piattaforma di scambio, rete italiana scambio orizzontale, riso app, riso piattaforma, scambio e baratto, momenta RIS',
|
||||
},
|
||||
hours: {
|
||||
descr: 'Descrizione',
|
||||
@@ -16,35 +16,23 @@ const msg_website_it = {
|
||||
pages: {
|
||||
home: 'Home',
|
||||
profile: 'Profilo',
|
||||
install_site: 'Installa Sito',
|
||||
profile2: 'ProfiloU',
|
||||
mypage2: 'mypage2',
|
||||
myservice2: 'myservice2',
|
||||
myhosps2: 'myhosps2',
|
||||
mygood2: 'mygood2',
|
||||
catalogo: 'Catalogo',
|
||||
fundraising: 'Sostieni il Progetto',
|
||||
notifs: 'Configura le Notifiche',
|
||||
unsubscribe: 'Disiscriviti',
|
||||
unsubscribe_user: 'Disiscriviti User',
|
||||
test: 'Test',
|
||||
projects: 'Progetti',
|
||||
report: 'Report Ore',
|
||||
producer: 'Produttore',
|
||||
orderinfo: 'Ordini Effettuati',
|
||||
products: 'Prodotti',
|
||||
cash: 'Cassa',
|
||||
productInfos: 'Info Prodotti',
|
||||
listinoprodotti: 'Listino Prodotti',
|
||||
productslist: 'Lista Prodotti',
|
||||
collabora: 'Collabora',
|
||||
categories: 'Categorie',
|
||||
storehouses: 'Magazzino',
|
||||
providers: 'Fornitori',
|
||||
catprods: 'Categorie',
|
||||
subcatprods: 'Sotto-Categorie',
|
||||
gasordine: 'Gas Ordine',
|
||||
scontisticas: 'Scontistica',
|
||||
departments: 'Uffici',
|
||||
orders: 'Ordini Ricevuti',
|
||||
orders2: 'Ordini Ricevuti',
|
||||
@@ -133,11 +121,15 @@ const msg_website_it = {
|
||||
only_residenti: 'Solo Residenti',
|
||||
only_consiglio: 'Solo Consiglieri',
|
||||
color: 'Colore',
|
||||
gasordini: 'Gas Ordini',
|
||||
gestoreordini: 'Gestore Ordini',
|
||||
mainMenu: 'Menu Principale',
|
||||
subtitle: 'Sottotitolo',
|
||||
lang: 'Lingua',
|
||||
keywords: 'Parole Chiave',
|
||||
desctiption: 'Descrizione',
|
||||
heightimg: 'Altezza Immagine',
|
||||
},
|
||||
msg: {
|
||||
myAppName: 'Più che Buono',
|
||||
myAppName: 'Riso',
|
||||
myAppDescription: 'Il primo Vero Social Libero, Equo e Solidale, dove Vive Consapevolezza e Aiuto Comunitario. Gratuito',
|
||||
underconstruction: 'App in costruzione...',
|
||||
myDescriz: '',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {
|
||||
import type {
|
||||
IListRoutes,
|
||||
ILang,
|
||||
IPreloadImages,
|
||||
@@ -7,6 +7,30 @@ import {
|
||||
import { func } from '@store/Modules/fieldsTable'
|
||||
|
||||
|
||||
// const SHOW_PROJINTHEMENU = false
|
||||
//
|
||||
// let arrlistafavourite = []
|
||||
// let arrlistaprojtutti = []
|
||||
// let arrlistaprojmiei = []
|
||||
// if (SHOW_PROJINTHEMENU) {
|
||||
// arrlistaprojtutti = Projects.getters.listaprojects(RouteNames.projectsall)
|
||||
// arrlistaprojmiei = Projects.getters.listaprojects(RouteNames.myprojects)
|
||||
// arrlistafavourite = Projects.getters.listaprojects(RouteNames.favouriteprojects)
|
||||
// }
|
||||
// PROGETTI -> FAVORITI :
|
||||
|
||||
// if (arrlistafavourite.length > 0) {
|
||||
// arrMenu.push({
|
||||
// icon: 'favorite_border',
|
||||
// nametranslate: 'pages.' + RouteNames.favouriteprojects,
|
||||
// urlroute: RouteNames.favouriteprojects,
|
||||
// level_parent: 0.0,
|
||||
// level_child: 0.5,
|
||||
// routes2: arrlistafavourite,
|
||||
// idelem: ''
|
||||
// })
|
||||
// }
|
||||
|
||||
const firstPage = {
|
||||
active: true,
|
||||
order: 5,
|
||||
@@ -40,12 +64,76 @@ function getDynamicPages(site: ISites): IListRoutes[] {
|
||||
materialIcon: 'fas fa-test',
|
||||
name: 'mypages.test',
|
||||
component: () => import('@src/views/testServer/testServer.vue'),
|
||||
inmenu: false,
|
||||
infooter: false,
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
order: 12,
|
||||
path: '/goods',
|
||||
materialIcon: 'fas fa-tshirt',
|
||||
name: 'mypages.goods',
|
||||
component: () => import('@src/root/goods/goods.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
inmenu: true,
|
||||
infooter: true,
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
order: 15,
|
||||
path: '/services',
|
||||
materialIcon: 'fas fa-house-user',
|
||||
name: 'mypages.services',
|
||||
component: () => import('@src/root/services/services.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
inmenu: true,
|
||||
infooter: true,
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
order: 15,
|
||||
path: '/activities',
|
||||
materialIcon: 'fas fa-house-user',
|
||||
name: 'mypages.activities',
|
||||
component: () => import('@src/root/activities/activities.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
inmenu: false,
|
||||
infooter: false,
|
||||
},
|
||||
|
||||
/*{
|
||||
{
|
||||
active: true,
|
||||
order: 15,
|
||||
path: '/provapao',
|
||||
materialIcon: 'fas fa-house-user',
|
||||
name: 'mypages.provapao',
|
||||
component: () => import('@src/root/provapao/provapao.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
inmenu: false,
|
||||
infooter: false,
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
order: 15,
|
||||
path: '/hosps',
|
||||
materialIcon: 'fas fa-bed',
|
||||
name: 'mypages.hosp',
|
||||
component: () => import('@src/root/hosp/hosp.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
inmenu: true,
|
||||
infooter: true,
|
||||
},
|
||||
{
|
||||
active: site.confpages && site.confpages.enableCircuits,
|
||||
order: 16,
|
||||
path: '/circuits',
|
||||
materialIcon: 'fas fa-coins',
|
||||
name: 'mypages.circuits',
|
||||
component: () => import('@src/views/user/mycircuits/mycircuits.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
inmenu: true,
|
||||
infooter: true,
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
order: 20,
|
||||
path: '/events',
|
||||
@@ -55,17 +143,6 @@ function getDynamicPages(site: ISites): IListRoutes[] {
|
||||
meta: { requiresAuth: true },
|
||||
inmenu: true,
|
||||
infooter: true,
|
||||
},*/
|
||||
{
|
||||
active: site.confpages && site.confpages.showProfile,
|
||||
order: 120,
|
||||
path: '/myprofile',
|
||||
materialIcon: 'fas fa-user',
|
||||
name: 'pages.profile',
|
||||
component: () => import('@src/views/user/myprofile/myprofile.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
inmenu: true,
|
||||
infooter: true,
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
@@ -78,6 +155,17 @@ function getDynamicPages(site: ISites): IListRoutes[] {
|
||||
inmenu: false,
|
||||
infooter: false,
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
order: 120,
|
||||
path: '/myprofile',
|
||||
materialIcon: 'fas fa-user',
|
||||
name: 'pages.profile',
|
||||
component: () => import('@src/views/user/myprofile/myprofile.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
inmenu: true,
|
||||
infooter: true,
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
order: 120,
|
||||
@@ -90,7 +178,7 @@ function getDynamicPages(site: ISites): IListRoutes[] {
|
||||
infooter: false,
|
||||
},
|
||||
{
|
||||
active: site.confpages && site.confpages.showiscrittiMenu,
|
||||
active: true,
|
||||
order: 130,
|
||||
path: '/friends',
|
||||
materialIcon: 'fas fa-user-friends',
|
||||
@@ -100,19 +188,6 @@ function getDynamicPages(site: ISites): IListRoutes[] {
|
||||
inmenu: true,
|
||||
infooter: true,
|
||||
},
|
||||
{
|
||||
active: site.confpages && site.confpages.enableCircuits,
|
||||
order: 16,
|
||||
path: '/circuits',
|
||||
materialIcon: 'fas fa-coins',
|
||||
name: 'mypages.circuits',
|
||||
component: () => import('@src/views/user/mycircuits/mycircuits.vue'),
|
||||
meta: { requiresAuth: true },
|
||||
inmenu: true,
|
||||
infooter: true,
|
||||
onlyAdmin: true,
|
||||
onlyManager: true,
|
||||
},
|
||||
{
|
||||
active: site.confpages && site.confpages.enableGroups,
|
||||
order: 132,
|
||||
@@ -123,8 +198,6 @@ function getDynamicPages(site: ISites): IListRoutes[] {
|
||||
meta: { requiresAuth: true },
|
||||
inmenu: true,
|
||||
infooter: false,
|
||||
onlyAdmin: true,
|
||||
onlyManager: true,
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
@@ -203,7 +276,7 @@ function getDynamicPages(site: ISites): IListRoutes[] {
|
||||
{
|
||||
active: true,
|
||||
order: 150,
|
||||
path: '/fundraising',
|
||||
path: '/sostieniilprogetto',
|
||||
materialIcon: 'fas fa-hand-holding-heart',
|
||||
name: 'pages.fundraising',
|
||||
component: () => import('@src/root/fundraising/fundraising.vue'),
|
||||
@@ -228,7 +301,7 @@ function getDynamicPages(site: ISites): IListRoutes[] {
|
||||
|
||||
export function firstimagehome() {
|
||||
|
||||
let img = 'statics/images/background.jpg'
|
||||
const img = 'statics/images/background.jpg'
|
||||
return img
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { costanti } from '@store/Modules/costanti'
|
||||
import { costanti } from '@costanti'
|
||||
import type { ICfgData } from '@src/model'
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
|
||||
@@ -77,17 +77,19 @@ export let idbKeyval = (() => {
|
||||
}
|
||||
},
|
||||
async getalldata(table) {
|
||||
let req;
|
||||
await withStore('readonly', table, store => {
|
||||
req = store.getAll();
|
||||
// console.log(' req', req)
|
||||
});
|
||||
if (req) {
|
||||
return req.result;
|
||||
} else {
|
||||
return null;
|
||||
try {
|
||||
let result;
|
||||
await withStore('readonly', table, store => {
|
||||
const req = store.getAll();
|
||||
req.onsuccess = () => (result = req.result);
|
||||
});
|
||||
return result || [];
|
||||
} catch (error) {
|
||||
console.error('Errore durante getalldata:', error);
|
||||
return [];
|
||||
}
|
||||
},
|
||||
|
||||
async count(table) {
|
||||
let req;
|
||||
await withStore('readonly', table, store => {
|
||||
|
||||
@@ -2,16 +2,10 @@ import { toolsext } from '@src/store/Modules/toolsext'
|
||||
|
||||
import { i18n } from 'src/boot/i18n' // Importa l'istanza di i18n configurata in Quasar
|
||||
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
// import { fieldsTable } from '@src/store/Modules/fieldsTable'
|
||||
import MixinMetaTags from '@src/mixins/mixin-metatags'
|
||||
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { useQuasar } from 'quasar'
|
||||
import type { IDataPass, IProduct, IProductInfo, ISpecialField, IVariazione } from '@model';
|
||||
import { IProducer } from '@model'
|
||||
import { tools } from '../store/Modules/tools'
|
||||
import { costanti } from '@costanti'
|
||||
import { fieldsTable } from '@store/Modules/fieldsTable'
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import type { IUserFields, IUserShort } from './UserStore'
|
||||
import { IUserFields, IUserShort } from './UserStore'
|
||||
|
||||
|
||||
export interface IProductInfo {
|
||||
_id?: any
|
||||
code?: string
|
||||
codice?: string
|
||||
id_wp?: string
|
||||
sku?: string
|
||||
name?: string
|
||||
@@ -32,6 +33,8 @@ export interface IProductInfo {
|
||||
link?: string
|
||||
link_scheda?: string
|
||||
checkout_link?: string
|
||||
valori_nutrizionali?: string
|
||||
note?: string
|
||||
idAuthors?: string[]
|
||||
authors?: string[]
|
||||
idCollana?: number
|
||||
@@ -342,6 +345,20 @@ export interface ICart {
|
||||
modify_at?: Date
|
||||
}
|
||||
|
||||
export interface ISingleProductOrdered {
|
||||
index: number
|
||||
code: string
|
||||
codice_interno: string
|
||||
idProduct: string
|
||||
productName: string
|
||||
subCat: string
|
||||
strSubCatProds: string
|
||||
qty: number
|
||||
singlePrice: number
|
||||
subtotalPrice: number
|
||||
}
|
||||
|
||||
|
||||
export interface IOrderCart {
|
||||
_id?: any
|
||||
idapp?: string
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
. $grayshadow: #555;
|
||||
$heightBtn: 100%;
|
||||
$grayshadow: #555;
|
||||
|
||||
$textcol: blue;
|
||||
$textcol_scuro: darkblue;
|
||||
@@ -172,10 +173,6 @@ h4 {
|
||||
//margin-left: -48px
|
||||
}
|
||||
|
||||
body.mobile .landing {
|
||||
//background: unset
|
||||
}
|
||||
|
||||
body.mobile .landing:before {
|
||||
content: "";
|
||||
position: fixed;
|
||||
@@ -287,7 +284,7 @@ body.mobile .landing:before {
|
||||
}
|
||||
|
||||
.carousel_img_3 {
|
||||
//background-image: url(../../public/images/cibo_sano.jpg);
|
||||
//background-image: url(/images/cibo_sano.jpg);
|
||||
background-size: cover !important;
|
||||
background-position: 50% center !important;
|
||||
background-repeat: no-repeat !important;
|
||||
@@ -368,7 +365,7 @@ body.mobile .landing:before {
|
||||
}
|
||||
|
||||
.carousel_img_3 {
|
||||
//background-image: url(../../public/images/cibo_sano.jpg);
|
||||
//background-image: url(/images/cibo_sano.jpg);
|
||||
background-size: cover !important;
|
||||
background-position: 50% top !important;
|
||||
background-repeat: no-repeat !important;
|
||||
|
||||
249
src/scss/variables.scss
Executable file
249
src/scss/variables.scss
Executable file
@@ -0,0 +1,249 @@
|
||||
// Couleurs
|
||||
$mainStyle: #4975BA;
|
||||
$mainColor: #3c4858;
|
||||
|
||||
|
||||
|
||||
$yellow1: #f8ab1c;
|
||||
$yellow2: rgb(221, 144, 35);
|
||||
$yellow3: #f8d71c;
|
||||
|
||||
$blue1: #4286f4;
|
||||
$blue2: #a9dff5;
|
||||
|
||||
$red1: #c84242;
|
||||
$orange1: #cf7219;
|
||||
$rose1: #dd4587;
|
||||
|
||||
$green1: #5cb85c;
|
||||
$green2: #CEE8DF;
|
||||
$green3: #70BEB1;
|
||||
$green4: #4c964c;
|
||||
|
||||
$brown1: #D99E7E;
|
||||
|
||||
:export {
|
||||
mainStyle: $mainStyle;
|
||||
red1: $red1;
|
||||
blue2: $blue2;
|
||||
yellow1: $yellow1;
|
||||
yellow2: $yellow2;
|
||||
yellow3: $yellow3;
|
||||
mainColor: $mainColor;
|
||||
green1: $green1;
|
||||
green2: $green2;
|
||||
green3: $green3;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$w255: rgb(255, 255, 255);
|
||||
$w250: rgb(250, 250, 250);
|
||||
$w245: rgb(245, 245, 245);
|
||||
$w240: rgb(240, 240, 240);
|
||||
$w235: rgb(235, 235, 235);
|
||||
$w230: rgb(230, 230, 230);
|
||||
$w225: rgb(225, 225, 225);
|
||||
$w220: rgb(220, 220, 220);
|
||||
$w210: rgb(210, 210, 210);
|
||||
$w200: rgb(200, 200, 200);
|
||||
$w190: rgb(190, 190, 190);
|
||||
$w180: rgb(180, 180, 180);
|
||||
$w170: rgb(170, 170, 170);
|
||||
$w160: rgb(160, 160, 160);
|
||||
$w150: rgb(150, 150, 150);
|
||||
$w140: rgb(140, 140, 140);
|
||||
$w130: rgb(130, 130, 130);
|
||||
$w120: rgb(120, 120, 120);
|
||||
$w110: rgb(110, 110, 110);
|
||||
$w100: rgb(100, 100, 100);
|
||||
|
||||
$g90: rgb(90, 90, 90);
|
||||
$g80: rgb(80, 80, 80);
|
||||
$g70: rgb(70, 70, 70);
|
||||
$g60: rgb(60, 60, 60);
|
||||
$g50: rgb(50, 50, 50);
|
||||
$g40: rgb(40, 40, 40);
|
||||
$g30: rgb(30, 30, 30);
|
||||
$g20: rgb(20, 20, 20);
|
||||
$g10: rgb(10, 10, 10);
|
||||
$g0: rgb(0, 0, 0);
|
||||
|
||||
$ombre: rgba(10, 10, 10, 0.2);
|
||||
|
||||
|
||||
$mainFont: 'Arial, sans-serif';
|
||||
|
||||
$mini: "(max-width: 1000px)";
|
||||
$desktop: "(min-width: 1001px)";
|
||||
|
||||
|
||||
$Loadersize: 20px;
|
||||
|
||||
//tailles
|
||||
|
||||
$headerHeight: 60px;
|
||||
$headerColor: #373F46;
|
||||
|
||||
|
||||
$boutonfont: 14px;
|
||||
$boutonH: 20px;
|
||||
|
||||
$aside-w: 180px;
|
||||
|
||||
$contentSize: 170px;
|
||||
|
||||
// fonts
|
||||
|
||||
|
||||
|
||||
@mixin transition($args...) {
|
||||
-webkit-transition: $args;
|
||||
-moz-transition: $args;
|
||||
-o-transition: $args;
|
||||
-ms-transition: $args;
|
||||
transition: $args;
|
||||
}
|
||||
|
||||
@mixin scale($scale) {
|
||||
-webkit-transform: scale($scale);
|
||||
-moz-transform: scale($scale);
|
||||
-o-transform: scale($scale);
|
||||
-ms-transform: scale($scale);
|
||||
transform: scale($scale);
|
||||
}
|
||||
|
||||
@mixin rotate($angle) {
|
||||
-webkit-transform: rotate($angle);
|
||||
-moz-transform: rotate($angle);
|
||||
-o-transform: rotate($angle);
|
||||
-ms-transform: rotate($angle);
|
||||
transform: rotate($angle);
|
||||
}
|
||||
|
||||
@mixin translateX($value) {
|
||||
-webkit-transform: translateX($value);
|
||||
-moz-transform: translateX($value);
|
||||
-o-transform: translateX($value);
|
||||
-ms-transform: translateX($value);
|
||||
transform: translateX($value);
|
||||
}
|
||||
|
||||
@mixin translateY($value) {
|
||||
-webkit-transform: translateY($value);
|
||||
-moz-transform: translateY($value);
|
||||
-o-transform: translateY($value);
|
||||
-ms-transform: translateY($value);
|
||||
transform: translateY($value);
|
||||
}
|
||||
|
||||
@mixin translate($x, $y) {
|
||||
-webkit-transform: translate($x, $y);
|
||||
-moz-transform: translate($x, $y);
|
||||
-o-transform: translate($x, $y);
|
||||
-ms-transform: translate($x, $y);
|
||||
transform: translate($x, $y);
|
||||
}
|
||||
|
||||
@mixin userselect {
|
||||
-webkit-user-select: none;
|
||||
-o-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
@mixin ellipsis {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
word-wrap: break-word;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
@mixin inputbase {
|
||||
outline: none;
|
||||
border: none;
|
||||
background: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
@mixin bg-center {
|
||||
background: {
|
||||
size: cover;
|
||||
position: center center;
|
||||
repeat: no-repeat;
|
||||
}
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
@mixin filter($property) {
|
||||
-webkit-filter: $property;
|
||||
-o-filter: $property;
|
||||
-moz-filter: $property;
|
||||
-ms-filter: $property;
|
||||
filter: $property;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'AGaramondPro-Regular';
|
||||
src: url('/src/assets/fonts/AGaramondPro-Regular.otf') format('opentype');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'DINPro-BoldItalic';
|
||||
src: url('/src/assets/fonts/DINPro-BoldItalic.otf') format('opentype');
|
||||
font-weight: bold;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'DINPro-CondBlack';
|
||||
src: url('/src/assets/fonts/DINPro-CondBlack.otf') format('opentype');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'DINPro-CondensedBold';
|
||||
src: url('/src/assets/fonts/DINPro-CondensedBold.otf') format('opentype');
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'DIN-Pro-Condensed-Bold-Italic';
|
||||
src: url('/src/assets/fonts/DIN-Pro-Condensed-Bold-Italic.otf') format('opentype');
|
||||
font-weight: bold;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'DIN-Pro-Condensed-Regular';
|
||||
src: url('/src/assets/fonts/DIN-Pro-Condensed-Regular.otf') format('opentype');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'DIN-Pro-Condensed-Medium-Italic';
|
||||
src: url('/src/assets/fonts/DIN-Pro-Condensed-Medium-Italic.otf') format('opentype');
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'DINPro';
|
||||
src: url('/src/assets/fonts/DINPro.otf') format('opentype');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'DINPro-Medium';
|
||||
src: url('/src/assets/fonts/DINPro-Medium.otf') format('opentype');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
@@ -1922,6 +1922,7 @@ const msg_it = {
|
||||
tutti: 'Tutti',
|
||||
},
|
||||
orderscart: {
|
||||
show_which_code: 'Mostra Codice',
|
||||
numorder: 'Ordine',
|
||||
totalQty: 'totalQty',
|
||||
totalQtyPreordered: 'totalQty PreOrd',
|
||||
@@ -1935,7 +1936,10 @@ const msg_it = {
|
||||
update_TotalPrice: 'Aggiorna Totale',
|
||||
TotalPriceProduct: 'Prezzo Totale',
|
||||
order_confirm: 'Conferma Ordini (aggiorna Qta magazzino)',
|
||||
check_invia_email: 'Abilita l\'Invio delle email (📩)',
|
||||
check_invia_email: 'Abilita Invio email (📩)',
|
||||
mostra_codice: 'Codice',
|
||||
mostra_cat: 'Categoria',
|
||||
mostra_solo_ordini_produttore: 'Filtra Ordini Produttore',
|
||||
},
|
||||
cash: {
|
||||
creatorUserId: 'Creatore',
|
||||
|
||||
@@ -36,8 +36,6 @@ import MixinBase from '@src/mixins/mixin-base'
|
||||
|
||||
import { fieldsTable } from '@store/Modules/fieldsTable'
|
||||
|
||||
import { addToDate } from '@quasar/quasar-ui-qcalendar'
|
||||
|
||||
import { lists } from '@store/Modules/lists'
|
||||
import { costanti } from '@store/Modules/costanti'
|
||||
import { copyToClipboard, date, Screen, useQuasar, colors, Cookies, scroll } from 'quasar'
|
||||
@@ -64,7 +62,8 @@ import type { AxiosResponse } from 'axios';
|
||||
import { default as Axios } from 'axios'
|
||||
import { PayloadMessageTypes } from '@src/common'
|
||||
import { useNotifStore } from '@store/NotifStore'
|
||||
import { isDimensionToken } from 'html2canvas/dist/types/css/syntax/parser'
|
||||
|
||||
const { t } = i18n.global;
|
||||
|
||||
export interface INotify {
|
||||
color?: string
|
||||
@@ -72,7 +71,6 @@ export interface INotify {
|
||||
icon?: string
|
||||
}
|
||||
|
||||
const { t } = i18n.global;
|
||||
|
||||
export const tools = {
|
||||
CAN_EDIT: 'q-ce',
|
||||
@@ -89,6 +87,12 @@ export const tools = {
|
||||
COOK_SEARCH: 'SEARCH_',
|
||||
COOK_SELCART: 'SELCART_',
|
||||
COOK_SELGAS: 'SELGAS',
|
||||
COOK_TABORD: 'TABORD',
|
||||
COOK_TABPAGES: 'TABPAGES',
|
||||
COOK_SHOWCODICE: 'SHOWCOD',
|
||||
COOK_SHOWCAT: 'SHOWCAT',
|
||||
COOK_SHOWCODE: 'SHOW_WC',
|
||||
COOK_SHOWORDPROD: 'SHOWORDPROD',
|
||||
COOK_TAB_CIRCUIT: 'TAB_CIRC',
|
||||
COOK_COSA_PRODOTTI: 'PROD_N',
|
||||
COOK_MAP_CENTER_LAT: 'MAP_LAT',
|
||||
@@ -4121,7 +4125,6 @@ export const tools = {
|
||||
|
||||
SignIncheckErrors(mythisq: any, $router: Router, route: any, riscode: any, ispageLogin?: boolean) {
|
||||
console.log('SignIncheckErrors: ', riscode)
|
||||
const $q = useQuasar()
|
||||
//T_TOLTO
|
||||
|
||||
|
||||
@@ -4245,6 +4248,7 @@ export const tools = {
|
||||
const msg2 = t('fetch.errore_generico') + userStore.getMsgError(riscode)
|
||||
this.showNotif(mythisq, msg2)
|
||||
} else if (riscode === this.OK) {
|
||||
console.log('VAI A SIGNIN:')
|
||||
$router.replace('/signin')
|
||||
/*this.showNotif(mythisq, t('components.authentication.email_verification.link_sent', { botname: t('ws.botname') }), {
|
||||
color: 'green',
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
import type { IBaseOrder, ICart, IOrder, IOrderCart, IProduct, IProductsState, IProductInfo, ICatProd, IUserShort, IGasordine, IAuthor, ISubCatProd, IText, IOptCatalogo, ICatPrTotali } from 'model';
|
||||
import { ICatalog } from 'model'
|
||||
import { IBaseOrder, ICart, IOrder, IOrderCart, IProduct, IProductsState, IProductInfo, ICatProd, IUserShort, IGasordine, IAuthor, ISubCatProd, IText, IOptCatalogo, ICatalog, ICatPrTotali, ISingleProductOrdered, ISchedaSingola, IMyScheda } from 'model'
|
||||
|
||||
import { Api } from '@api'
|
||||
import { serv_constants } from '@src/store/Modules/serv_constants'
|
||||
import * as Types from '@src/store/Api/ApiTypes'
|
||||
import { static_data } from '@src/db/static_data'
|
||||
import { shared_consts } from '@src/common/shared_vuejs'
|
||||
import { tools } from '@tools'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { defineStore } from 'pinia'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { toolsext } from '@store/Modules/toolsext'
|
||||
@@ -120,7 +119,7 @@ export const useProducts = defineStore('Products', {
|
||||
getCatProds: (state: IProductsState) => (cosa: number): ICatProd[] => {
|
||||
if (cosa === shared_consts.PROD.GAS)
|
||||
return state.catprods_gas
|
||||
else if (cosa === shared_consts.PROD.BOTTEGA)
|
||||
else if (cosa === shared_consts.PROD.GAS)
|
||||
return state.catprods
|
||||
else
|
||||
return [...state.catprods, ...state.catprods_gas]
|
||||
@@ -163,6 +162,42 @@ export const useProducts = defineStore('Products', {
|
||||
return mystr
|
||||
},
|
||||
|
||||
getSubCatProdsStrBySubCatProds: (state: IProductsState) => (idSubCatProds: string[]): string => {
|
||||
let mystr = '';
|
||||
if (Array.isArray(idSubCatProds) && idSubCatProds.length > 0) {
|
||||
const names = idSubCatProds.map(id => {
|
||||
const subCatProd = state.subcatprods.find((rec: ISubCatProd) => rec._id === id);
|
||||
return subCatProd ? subCatProd.name : '';
|
||||
}).filter(name => name !== '');
|
||||
|
||||
mystr = names.join(' - ');
|
||||
}
|
||||
return mystr;
|
||||
},
|
||||
|
||||
getTotaleOrdineByOrdId: (state: IProductsState) => (idOrdine: string, idGasordine: string, mostra_solo_ordini_produttore: boolean): number => {
|
||||
|
||||
const arrprod = state.orders.filter((rec: IOrderCart) => {
|
||||
if (idGasordine && !rec.items?.some(item => item.order && item.order.idGasordine === idGasordine) || (rec._id !== idOrdine)) {
|
||||
return false; // Skip records not matching gasordine condition
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
let subtotalPrice = 0
|
||||
|
||||
arrprod.forEach((rec: IOrderCart) => {
|
||||
rec.items?.forEach(item => {
|
||||
if (item.order && ((mostra_solo_ordini_produttore && (item.order.idGasordine === idGasordine)) || !mostra_solo_ordini_produttore)) {
|
||||
const qtyparz = item.order.quantity + item.order.quantitypreordered
|
||||
subtotalPrice += item.order.price * qtyparz
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
return subtotalPrice;
|
||||
},
|
||||
|
||||
getCatProdDescrStrByIdCatProd: (state: IProductsState) => (idCatProd: string): string => {
|
||||
const myfirstcat = state.catprods.find((rec: ICatProd) => rec._id === idCatProd)
|
||||
|
||||
@@ -180,6 +215,7 @@ export const useProducts = defineStore('Products', {
|
||||
return 0
|
||||
},
|
||||
|
||||
|
||||
getSubCatProdsByGas: (state: IProductsState) => (idGasOrdine: string, idCatProd: string): ISubCatProd[] => {
|
||||
let arrcat = state.subcatprods
|
||||
|
||||
@@ -469,7 +505,7 @@ export const useProducts = defineStore('Products', {
|
||||
const userStore = useUserStore()
|
||||
const myorder: IOrder = {
|
||||
userId: this.userActive._id,
|
||||
idapp: tools.getEnv('VITE_APP_ID'),
|
||||
idapp: import.meta.env.VITE_APP_ID,
|
||||
status: shared_consts.OrderStatus.IN_CART,
|
||||
TotalPriceProduct: 0,
|
||||
TotalPriceProductCalc: 0,
|
||||
@@ -563,9 +599,6 @@ export const useProducts = defineStore('Products', {
|
||||
this.orders = []
|
||||
}
|
||||
|
||||
if (import.meta.env.VITE_DEBUG === '1') {
|
||||
}
|
||||
|
||||
return res
|
||||
})
|
||||
.catch((error) => {
|
||||
@@ -1049,7 +1082,7 @@ export const useProducts = defineStore('Products', {
|
||||
mystr += ' + '
|
||||
}
|
||||
if (order.quantitypreordered > 0) {
|
||||
mystr += ' ' + order.quantitypreordered + ' ' + $t('ecomm.preord');
|
||||
mystr += ' ' + order.quantitypreordered + ' ';
|
||||
}
|
||||
return mystr
|
||||
},
|
||||
@@ -1249,6 +1282,14 @@ export const useProducts = defineStore('Products', {
|
||||
return mystr
|
||||
},
|
||||
|
||||
getGasordineNameById(idGasordine: string) {
|
||||
|
||||
const globalStore = useGlobalStore()
|
||||
const rec = globalStore.gasordines.find((gasordine: IGasordine) => gasordine._id === idGasordine)
|
||||
return rec ? rec.name : ''
|
||||
|
||||
},
|
||||
|
||||
getGasordines() {
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
@@ -1258,16 +1299,22 @@ export const useProducts = defineStore('Products', {
|
||||
value: ''
|
||||
}]
|
||||
let ind = 1
|
||||
globalStore.gasordines.forEach((gasordine: IGasordine) => {
|
||||
myarr.push(
|
||||
{
|
||||
id: ind,
|
||||
label: gasordine.name,
|
||||
value: gasordine._id
|
||||
})
|
||||
|
||||
ind++
|
||||
})
|
||||
if (globalStore.gasordines) {
|
||||
globalStore.gasordines.forEach((gasordine: IGasordine) => {
|
||||
if (gasordine) {
|
||||
myarr.push(
|
||||
{
|
||||
id: ind,
|
||||
label: gasordine.name
|
||||
+ (gasordine.dataora_chiusura_ordini ? (' - chiusura: ' + tools.getstrDateShort(gasordine.dataora_chiusura_ordini)) : '')
|
||||
+ (gasordine.dataora_ritiro ? (' - consegna ' + tools.getstrDateShort(gasordine.dataora_ritiro)) : '')
|
||||
,
|
||||
value: gasordine._id
|
||||
})
|
||||
ind++
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
return myarr
|
||||
},
|
||||
@@ -1419,6 +1466,82 @@ export const useProducts = defineStore('Products', {
|
||||
return result.trim()
|
||||
},
|
||||
|
||||
getSubCatStrByProduct(myproductInfo: IProductInfo): string {
|
||||
return this.getSubCatProdsStrBySubCatProds(myproductInfo.idSubCatProds || [])
|
||||
},
|
||||
|
||||
getListProductBySumQuantity(idGasordine: string): ISingleProductOrdered[] {
|
||||
|
||||
const arrprod = this.orders.filter((rec: IOrderCart) => {
|
||||
if (idGasordine && !rec.items?.some(item => item.order && item.order.idGasordine === idGasordine)) {
|
||||
return false; // Skip records not matching gasordine condition
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
const productMap = new Map<string, ISingleProductOrdered>();
|
||||
|
||||
arrprod.forEach((rec: IOrderCart) => {
|
||||
rec.items?.forEach(item => {
|
||||
if (item.order && item.order.idGasordine === idGasordine) {
|
||||
const productId: string = item.order.idProduct!;
|
||||
const qtyparz = item.order.quantity + item.order.quantitypreordered
|
||||
if (productMap.has(productId)) {
|
||||
const existingProduct: ISingleProductOrdered = productMap.get(productId)!
|
||||
existingProduct.qty += qtyparz
|
||||
existingProduct.subtotalPrice += item.order.price * qtyparz
|
||||
existingProduct.subtotalPrice = Number((existingProduct.subtotalPrice).toFixed(2))
|
||||
} else {
|
||||
|
||||
const sottocategoria = item.order.product?.productInfo.subcatprods && item.order.product?.productInfo.subcatprods.length > 0 ? item.order.product?.productInfo.subcatprods[0].name! : ''
|
||||
productMap.set(productId, {
|
||||
subCat: sottocategoria,
|
||||
strSubCatProds: this.getSubCatProdsStrBySubCatProds(item.order.product?.productInfo.idSubCatProds!),
|
||||
index: productMap.size + 1,
|
||||
idProduct: productId,
|
||||
code: item.order.product?.productInfo.code!,
|
||||
codice_interno: item.order.product?.productInfo.codice!,
|
||||
qty: qtyparz,
|
||||
singlePrice: item.order.price,
|
||||
subtotalPrice: Number((item.order.price * qtyparz).toFixed(2)),
|
||||
productName: item.order.product?.productInfo.name!,
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
return Array.from(productMap.values());
|
||||
|
||||
},
|
||||
|
||||
getSchedeOpt(arrschede: IMyScheda[]): any[] {
|
||||
|
||||
let arr: any = []
|
||||
|
||||
arr.push({ label: '[Nessuna]', value: '' })
|
||||
|
||||
if (arrschede) {
|
||||
arrschede.forEach((recscheda: ISchedaSingola) => {
|
||||
let pagename = ''
|
||||
if (recscheda.scheda) {
|
||||
if (recscheda.idPageOrig) {
|
||||
const page = this.mypage.find((page) => (`${page._id}`) === recscheda.idPageOrig)
|
||||
pagename = page ? page.title! : ''
|
||||
}
|
||||
if (pagename)
|
||||
pagename = '[Pag: ' + pagename + '] '
|
||||
|
||||
const mylabel = pagename + (recscheda.scheda ? recscheda.scheda!.name : '')
|
||||
arr.push({ label: mylabel, value: recscheda.scheda!._id })
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return arr
|
||||
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@ import { useCatalogStore } from './CatalogStore'
|
||||
|
||||
const stateConnDefault = 'online'
|
||||
|
||||
|
||||
async function getConfig(id: any) {
|
||||
return globalroutines('read', 'config', null, id)
|
||||
}
|
||||
@@ -257,6 +258,12 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
return false
|
||||
},
|
||||
|
||||
getSchedeOpt: (state: IGlobalState) => {
|
||||
const Products = useProducts()
|
||||
|
||||
return Products.getSchedeOpt(state.myschedas)
|
||||
},
|
||||
|
||||
isMyLang: (state: IGlobalState) => (rec: any) => {
|
||||
if (!rec.lang) return true
|
||||
|
||||
@@ -344,34 +351,6 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
return !!rec ? rec.name + ' ' + rec.surname : ''
|
||||
},
|
||||
|
||||
getSchedeOpt(): any[] {
|
||||
const arrschede: ISchedaSingola[] = this.myschedas
|
||||
|
||||
let arr: any = []
|
||||
|
||||
arr.push({ label: '[Nessuna]', value: '' })
|
||||
|
||||
if (arrschede) {
|
||||
arrschede.forEach((recscheda: ISchedaSingola) => {
|
||||
let pagename = ''
|
||||
if (recscheda.scheda) {
|
||||
if (recscheda.idPageOrig) {
|
||||
const page = this.mypage.find((page) => (`${page._id}`) === recscheda.idPageOrig)
|
||||
pagename = page ? page.title! : ''
|
||||
}
|
||||
if (pagename)
|
||||
pagename = '[Pag: ' + pagename + '] '
|
||||
|
||||
const mylabel = pagename + (recscheda.scheda ? recscheda.scheda!.name : '')
|
||||
arr.push({ label: mylabel, value: recscheda.scheda!._id })
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return arr
|
||||
|
||||
},
|
||||
|
||||
getListByTable: (state: IGlobalState) => (table: string, value2?: any): any => {
|
||||
let ris: any = []
|
||||
|
||||
@@ -474,7 +453,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
else if (table === 'collanas')
|
||||
return Products.collane
|
||||
else if (table === 'schedeopt')
|
||||
return state.getSchedeOpt
|
||||
return Products.getSchedeOpt(state.myschedas)
|
||||
else if (table === 'provinces')
|
||||
return state.provinces.filter((rec: IProvince) => (!rec.card) && (rec.prov !== 'ITA') && (rec.prov !== 'EST'))
|
||||
else if (table === 'cards') {
|
||||
@@ -1868,6 +1847,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
this.rightDrawerOpen = true
|
||||
return false
|
||||
} else {
|
||||
console.log('NON SONO LOGGATO... MYUSER NON TORNATO dal SRV',)
|
||||
console.log('Sbianca cmq i dati')
|
||||
// Sbianca cmq i dati
|
||||
const token = localStorage.getItem(toolsext.localStorage.token)
|
||||
|
||||
@@ -43,7 +43,7 @@ export default defineComponent({
|
||||
const initialPagination = ref({
|
||||
sortBy: 'desc',
|
||||
descending: false,
|
||||
rowsPerPage: 10,
|
||||
rowsPerPage: 20,
|
||||
// rowsNumber: xx if getting data from a server
|
||||
})
|
||||
|
||||
|
||||
@@ -58,6 +58,7 @@ export default defineComponent({
|
||||
emailsent.value = true
|
||||
idapp.value = ris.idapp
|
||||
tools.showPositiveNotif($q, t('install.created', { idapp: ris.idapp }))
|
||||
console.log('VAI A SIGNIN (2):')
|
||||
$router.replace('/signin')
|
||||
form.password = ''
|
||||
} else
|
||||
|
||||
@@ -4,19 +4,19 @@ $heightBtn: 100%;
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
.mycol{
|
||||
color:gray;
|
||||
.mycol {
|
||||
color: gray;
|
||||
}
|
||||
|
||||
|
||||
.q-item__label--caption{
|
||||
.q-item__label--caption {
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.ordstat{
|
||||
.ordstat {
|
||||
text-align: center;
|
||||
border: 1px solid #8778cb;
|
||||
border-radius: 10px;
|
||||
border-radius: 10px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
@@ -27,31 +27,61 @@ $heightBtn: 100%;
|
||||
|
||||
.note {
|
||||
font-style: italic;
|
||||
color:blue;
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.totali {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.q-table {
|
||||
overflow-x: auto; /* Aggiungi scroll se il contenuto supera in larghezza */
|
||||
overflow-x: auto;
|
||||
/* Aggiungi scroll se il contenuto supera in larghezza */
|
||||
}
|
||||
|
||||
.q-item-label {
|
||||
white-space: nowrap; /* Impedisce il wrapping del testo */
|
||||
white-space: nowrap;
|
||||
/* Impedisce il wrapping del testo */
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis; /* Aggiunge "..." se il testo è troppo lungo */
|
||||
text-overflow: ellipsis;
|
||||
/* Aggiunge "..." se il testo è troppo lungo */
|
||||
}
|
||||
|
||||
.my-card-shadow {
|
||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15); /* Aggiunge un'ombra sottile alle card */
|
||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
|
||||
/* Aggiunge un'ombra sottile alle card */
|
||||
}
|
||||
|
||||
.q-item__section--side {
|
||||
flex-grow: 1; /* Permette a questa sezione di crescere più dell'etichetta "Articoli" */
|
||||
flex-grow: 1;
|
||||
/* Permette a questa sezione di crescere più dell'etichetta "Articoli" */
|
||||
}
|
||||
|
||||
.q-item__label {
|
||||
overflow: hidden !important;
|
||||
white-space: wrap !important; /* Impedisce che il testo si spezzi in più righe */
|
||||
white-space: wrap !important;
|
||||
/* Impedisce che il testo si spezzi in più righe */
|
||||
}
|
||||
|
||||
|
||||
.full-height {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
/* Imposta la direzione verticale */
|
||||
height: 100vh;
|
||||
/* Occupa tutta l'altezza della viewport */
|
||||
}
|
||||
|
||||
.header {
|
||||
background-color: #f1f1f1;
|
||||
padding: 10px;
|
||||
flex-shrink: 0;
|
||||
/* Il header non cambia altezza */
|
||||
}
|
||||
|
||||
.table-container {
|
||||
flex-grow: 1;
|
||||
/* La tabella occupa tutto lo spazio rimanente */
|
||||
overflow-y: auto;
|
||||
/* Abilita lo scrolling verticale */
|
||||
}
|
||||
@@ -1,27 +1,28 @@
|
||||
import { defineComponent, onMounted, ref, watch } from 'vue'
|
||||
import { tools } from '@tools'
|
||||
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 'vue-i18n'
|
||||
import { toolsext } from '@store/Modules/toolsext'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { useQuasar, exportFile } from 'quasar'
|
||||
import { costanti } from '@costanti'
|
||||
import { shared_consts } from '@src/common/shared_vuejs'
|
||||
// import MixinBase from '@src/mixins/mixin-base'
|
||||
import { serv_constants } from '@store/Modules/serv_constants'
|
||||
import { fieldsTable } from '@store/Modules/fieldsTable'
|
||||
|
||||
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'
|
||||
import { CSingleCart } from '../../../components/CSingleCart'
|
||||
import { CMyDialog } from '../../../components/CMyDialog'
|
||||
import { COrdersCart } from '../../../components/COrdersCart'
|
||||
import { CTitleBanner } from '../../../components/CTitleBanner'
|
||||
import { CMyFieldDb } from '../../../components/CMyFieldDb'
|
||||
import type { ISingleProductOrdered } from '@src/model'
|
||||
import { ICart, IOrder, IOrderCart } from '@src/model'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'OrderInfo',
|
||||
components: { CSingleCart, CTitleBanner, CMyFieldDb },
|
||||
components: { CSingleCart, CTitleBanner, CMyFieldDb, COrdersCart, CMyDialog },
|
||||
props: {},
|
||||
setup() {
|
||||
const userStore = useUserStore()
|
||||
@@ -37,15 +38,45 @@ export default defineComponent({
|
||||
const templemail = ref('')
|
||||
|
||||
const cosa = ref(0)
|
||||
const showOrdersCart = ref(false)
|
||||
const idOrdersCartToShow = ref('')
|
||||
|
||||
const arrout = ref(<any[]>[])
|
||||
const listatotali = ref(<any[]>[])
|
||||
|
||||
const showWhichCode = ref(shared_consts.ShowCode.ALL)
|
||||
|
||||
const showWhichCodeOptions = ref([
|
||||
{
|
||||
label: 'Tutti i codici',
|
||||
value: shared_consts.ShowCode.ALL
|
||||
},
|
||||
{
|
||||
label: 'Codice Interno',
|
||||
value: shared_consts.ShowCode.CODE
|
||||
},
|
||||
{
|
||||
label: 'Codice Produttore',
|
||||
value: shared_consts.ShowCode.INTERNAL_CODE
|
||||
}
|
||||
])
|
||||
|
||||
const check_send_email = ref(false)
|
||||
const mostra_codice = ref(false)
|
||||
const mostra_cat = ref(false)
|
||||
const mostra_solo_ordini_produttore = ref(false)
|
||||
|
||||
const initialPagination = ref({
|
||||
sortBy: 'desc',
|
||||
sortBy: 'ind',
|
||||
descending: false,
|
||||
rowsPerPage: 10,
|
||||
rowsPerPage: 0,
|
||||
// rowsNumber: xx if getting data from a server
|
||||
})
|
||||
|
||||
const totalPagination = ref({
|
||||
sortBy: 'codice_interno',
|
||||
descending: false,
|
||||
rowsPerPage: 1000,
|
||||
// rowsNumber: xx if getting data from a server
|
||||
})
|
||||
|
||||
@@ -56,8 +87,81 @@ export default defineComponent({
|
||||
const storeGasordine = ref(<any>'')
|
||||
|
||||
const taborders = ref(shared_consts.OrderStat.IN_CORSO.value)
|
||||
const tabpages = ref(shared_consts.OrderPages.LISTA_TOTALI.value)
|
||||
const statusnow = ref(0)
|
||||
const arrnumstatus = ref(<any[]>[])
|
||||
|
||||
const columns_listafiltrati = ref(<any>[])
|
||||
|
||||
//index, code, productName, qty, singlePrice, subtotalPrice
|
||||
const columns_listaTotali = ref(<any>[
|
||||
{
|
||||
name: 'index',
|
||||
required: true,
|
||||
align: 'left',
|
||||
label: 'Indice',
|
||||
field: 'index',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
name: 'code',
|
||||
required: true,
|
||||
align: 'left',
|
||||
label: 'Codice',
|
||||
field: 'code',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
name: 'codice_interno',
|
||||
required: false,
|
||||
align: 'left',
|
||||
label: 'Codice Produttore',
|
||||
field: 'codice_interno',
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
name: 'productName',
|
||||
required: true,
|
||||
align: 'left',
|
||||
label: 'Prodotto',
|
||||
field: 'productName',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
name: 'strSubCatProds',
|
||||
required: true,
|
||||
align: 'left',
|
||||
label: 'Categoria',
|
||||
field: 'strSubCatProds',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
name: 'qty',
|
||||
required: true,
|
||||
align: 'center',
|
||||
label: 'Qta',
|
||||
field: 'qty',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
name: 'singlePrice',
|
||||
required: true,
|
||||
align: 'center',
|
||||
label: 'Prezzo',
|
||||
field: 'singlePrice',
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
name: 'subtotalPrice',
|
||||
required: true,
|
||||
align: 'center',
|
||||
label: 'Totale',
|
||||
field: 'subtotalPrice',
|
||||
sortable: true
|
||||
}
|
||||
|
||||
])
|
||||
|
||||
const columns = ref(<any>[
|
||||
{
|
||||
name: 'ind',
|
||||
@@ -193,14 +297,40 @@ export default defineComponent({
|
||||
})
|
||||
|
||||
watch(() => taborders.value, (newval, oldval) => {
|
||||
tools.setCookie(tools.COOK_TABORD, taborders.value.toString())
|
||||
updateorders(false)
|
||||
})
|
||||
watch(() => tabpages.value, (newval, oldval) => {
|
||||
tools.setCookie(tools.COOK_TABPAGES, tabpages.value.toString())
|
||||
if (tabpages.value === shared_consts.OrderPages.LISTA_TOTALI.value) {
|
||||
taborders.value = -1
|
||||
}
|
||||
updateorders(true)
|
||||
})
|
||||
|
||||
watch(() => storeGasordine.value, (newval, oldval) => {
|
||||
tools.setCookie(tools.COOK_SELGAS, storeGasordine.value)
|
||||
updateorders(true)
|
||||
})
|
||||
|
||||
watch(() => mostra_codice.value, (newval, oldval) => {
|
||||
tools.setCookie(tools.COOK_SHOWCODICE, mostra_codice.value ? '1' : '0')
|
||||
updateorders(true)
|
||||
})
|
||||
watch(() => mostra_cat.value, (newval, oldval) => {
|
||||
tools.setCookie(tools.COOK_SHOWCAT, mostra_cat.value ? '1' : '0')
|
||||
updateorders(true)
|
||||
})
|
||||
watch(() => showWhichCode.value, (newval, oldval) => {
|
||||
tools.setCookie(tools.COOK_SHOWCODE, showWhichCode.value.toString())
|
||||
updateorders(true)
|
||||
})
|
||||
|
||||
watch(() => mostra_solo_ordini_produttore.value, (newval, oldval) => {
|
||||
tools.setCookie(tools.COOK_SHOWORDPROD, mostra_solo_ordini_produttore.value ? '1' : '0')
|
||||
updateorders(true)
|
||||
})
|
||||
|
||||
// const { setValDb, getValDb } = MixinBase()
|
||||
|
||||
function getCols(props: any) {
|
||||
@@ -214,6 +344,47 @@ export default defineComponent({
|
||||
return ris
|
||||
}
|
||||
|
||||
// Creami una lista di tutti i prodotti, con i totali delle quantità e il prezzo totale
|
||||
function getListProductBySumQuantity(): ISingleProductOrdered[] {
|
||||
const listproductstotal = productStore.getListProductBySumQuantity(storeGasordine.value)
|
||||
|
||||
if (listproductstotal) {
|
||||
// Calculate totals
|
||||
const totals: ISingleProductOrdered = {
|
||||
index: -1,
|
||||
code: '',
|
||||
codice_interno: '',
|
||||
idProduct: '',
|
||||
subCat: '',
|
||||
strSubCatProds: '',
|
||||
productName: 'TOTALI',
|
||||
qty: listproductstotal.reduce((total: number, rec: any) => total + rec.qty, 0),
|
||||
singlePrice: 0,
|
||||
subtotalPrice: listproductstotal.reduce((total: number, rec: any) => total + rec.subtotalPrice, 0),
|
||||
};
|
||||
|
||||
let rowsWithTotals: any = [...listproductstotal];
|
||||
|
||||
if (tools.isManager()) {
|
||||
// Combine orders and totals
|
||||
rowsWithTotals.push(totals);
|
||||
}
|
||||
|
||||
// Supponendo che rowsWithTotals sia il tuo array di record
|
||||
rowsWithTotals.forEach((record: any, index: number) => {
|
||||
record.ind = index;
|
||||
});
|
||||
|
||||
return rowsWithTotals;
|
||||
}
|
||||
|
||||
return listproductstotal
|
||||
}
|
||||
|
||||
function getTotaleOrdineByOrdId(id: string, idGasordine: string): string {
|
||||
return productStore.getTotaleOrdineByOrdId(id, idGasordine, mostra_solo_ordini_produttore.value).toFixed(2)
|
||||
}
|
||||
|
||||
function getOrdersCartWithTotals(): any[] {
|
||||
const orderscart = getOrdersCart();
|
||||
|
||||
@@ -233,7 +404,7 @@ export default defineComponent({
|
||||
totalPriceCalc: orderscart.reduce((total: number, rec: any) => total + rec.totalPriceCalc, 0),
|
||||
};
|
||||
|
||||
const rowsWithTotals: any = [...orderscart];
|
||||
let rowsWithTotals: any = [...orderscart];
|
||||
|
||||
if (tools.isManager()) {
|
||||
// Combine orders and totals
|
||||
@@ -258,26 +429,44 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function updateorders(updatetab: boolean) {
|
||||
arrout.value = []
|
||||
|
||||
myorderscart.value = getOrdersCart()
|
||||
if (myorderscart.value) {
|
||||
for (const orderscart of myorderscart.value) {
|
||||
myarrrec.value[orderscart._id] = Object.keys(orderscart)
|
||||
// Rimuovi dalla lista columns_listaTotali il record "codice_interno" se mostra_codice.value = false
|
||||
columns_listafiltrati.value = columns_listaTotali.value.filter((column: any) => {
|
||||
let show = false
|
||||
if (showWhichCode.value === shared_consts.ShowCode.ALL) {
|
||||
show = true
|
||||
} else if (showWhichCode.value === shared_consts.ShowCode.CODE) {
|
||||
show = (column.name !== 'codice_interno')
|
||||
} else if (showWhichCode.value === shared_consts.ShowCode.INTERNAL_CODE) {
|
||||
show = (column.name !== 'code')
|
||||
}
|
||||
}
|
||||
return show
|
||||
})
|
||||
|
||||
if (updatetab) {
|
||||
const allorders = getAllOrdersCart()
|
||||
for (const status of [15, 2, 3, 4, 5, 6, 7, 8, 10]) {
|
||||
arrnumstatus.value[status] = allorders.filter((rec) => (rec.status === status)).reduce((sum, item) => sum + 1, 0)
|
||||
|
||||
if (tabpages.value === shared_consts.OrderPages.ORDINI.value) {
|
||||
arrout.value = []
|
||||
|
||||
myorderscart.value = getOrdersCart()
|
||||
if (myorderscart.value) {
|
||||
for (const orderscart of myorderscart.value) {
|
||||
myarrrec.value[orderscart._id] = Object.keys(orderscart)
|
||||
}
|
||||
}
|
||||
|
||||
selectfirstavailable()
|
||||
if (updatetab) {
|
||||
const allorders = getAllOrdersCart()
|
||||
for (const status of [15, 2, 3, 4, 5, 6, 7, 8, 10]) {
|
||||
arrnumstatus.value[status] = allorders.filter((rec) => (rec.status === status)).reduce((sum, item) => sum + 1, 0)
|
||||
}
|
||||
|
||||
selectfirstavailable()
|
||||
}
|
||||
|
||||
arrout.value = getOrdersCartWithTotals()
|
||||
} else if (tabpages.value === shared_consts.OrderPages.LISTA_TOTALI.value) {
|
||||
listatotali.value = getListProductBySumQuantity()
|
||||
}
|
||||
|
||||
arrout.value = getOrdersCartWithTotals()
|
||||
|
||||
}
|
||||
|
||||
function selectfirstavailable() {
|
||||
@@ -293,18 +482,30 @@ export default defineComponent({
|
||||
|
||||
async function mounted() {
|
||||
|
||||
taborders.value = -1
|
||||
taborders.value = tools.getCookie(tools.COOK_TABORD, shared_consts.OrderStat.IN_CORSO.value, true)
|
||||
if (tools.isManager())
|
||||
tabpages.value = tools.getCookie(tools.COOK_TABPAGES, shared_consts.OrderPages.LISTA_TOTALI.value, true)
|
||||
else
|
||||
tabpages.value = shared_consts.OrderPages.ORDINI.value
|
||||
|
||||
storeGasordine.value = tools.getCookie(tools.COOK_SELGAS, '')
|
||||
|
||||
mostra_codice.value = tools.getCookie(tools.COOK_SHOWCODICE, '1') === '1'
|
||||
mostra_cat.value = tools.getCookie(tools.COOK_SHOWCAT, '1') === '1'
|
||||
mostra_solo_ordini_produttore.value = tools.getCookie(tools.COOK_SHOWORDPROD, '1') === '1'
|
||||
showWhichCode.value = tools.getCookie(tools.COOK_SHOWCODE, shared_consts.ShowCode.ALL, true)
|
||||
|
||||
await userStore.newsletterload(false)
|
||||
await productStore.loadProducts()
|
||||
|
||||
|
||||
updateorders(true)
|
||||
|
||||
if (taborders.value === -1)
|
||||
taborders.value = shared_consts.OrderStat.IN_CORSO.value
|
||||
|
||||
if (tabpages.value === -1)
|
||||
tabpages.value = shared_consts.OrderPages.LISTA_TOTALI.value
|
||||
|
||||
|
||||
if (tools.isManager()) {
|
||||
columns.value = [...columns_Admin.value]
|
||||
@@ -358,7 +559,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
|
||||
@@ -468,6 +669,31 @@ export default defineComponent({
|
||||
})
|
||||
}
|
||||
|
||||
function exportListaTotali() {
|
||||
// console.log('row', serverData.value)
|
||||
// console.log('mycolumns.value', mycolumns.value)
|
||||
// naive encoding to csv format
|
||||
const content = [columns_listafiltrati.value.map((col: any) => (col.label))].concat(
|
||||
listatotali.value.map((row: any) => columns_listafiltrati.value.map((col: any) => (
|
||||
row[col.field]
|
||||
)).join(','))
|
||||
).join('\r\n')
|
||||
|
||||
const status = exportFile(
|
||||
'lista-totali-' + productStore.getGasordineNameById(storeGasordine.value) + '_' + tools.getstrYYMMDDDate(tools.getDateNow()) + '.csv',
|
||||
content,
|
||||
'text/csv'
|
||||
)
|
||||
|
||||
if (status !== true) {
|
||||
$q.notify({
|
||||
message: 'Il Browser ha negato il download del file.',
|
||||
color: 'negative',
|
||||
icon: 'warning'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
@@ -479,6 +705,7 @@ export default defineComponent({
|
||||
globalStore,
|
||||
columns,
|
||||
taborders,
|
||||
tabpages,
|
||||
arrnumstatus,
|
||||
clickFunz,
|
||||
getOrdersCart,
|
||||
@@ -499,6 +726,18 @@ export default defineComponent({
|
||||
arrout,
|
||||
check_send_email,
|
||||
ConfermaOrdini,
|
||||
mostra_codice,
|
||||
mostra_cat,
|
||||
mostra_solo_ordini_produttore,
|
||||
listatotali,
|
||||
columns_listafiltrati,
|
||||
showWhichCode,
|
||||
showWhichCodeOptions,
|
||||
getTotaleOrdineByOrdId,
|
||||
showOrdersCart,
|
||||
idOrdersCartToShow,
|
||||
exportListaTotali,
|
||||
totalPagination,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -18,50 +18,74 @@
|
||||
>
|
||||
<template v-slot:tutti>
|
||||
<div class="row items-center no-wrap">
|
||||
<div class="text-center">{{ t('gas.tutti') }}</div>
|
||||
<div class="text-center">{{ t("gas.tutti") }}</div>
|
||||
<q-icon right name="fas fa-user-friends" />
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:gas>
|
||||
<div class="row items-center no-wrap">
|
||||
<div class="text-center">{{ t('gas.ordina_sul_gas') }}</div>
|
||||
<div class="text-center">{{ t("gas.ordina_sul_gas") }}</div>
|
||||
<q-icon right name="fas fa-user-friends" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template v-slot:bottega>
|
||||
<div class="row items-center no-wrap">
|
||||
<div class="text-center">{{ t('gas.bottega') }}</div>
|
||||
<div class="text-center">{{ t("gas.bottega") }}</div>
|
||||
<q-icon right name="fas fa-store" />
|
||||
</div>
|
||||
</template>
|
||||
</q-btn-toggle>
|
||||
</div>
|
||||
|
||||
<div v-if="endload" class="panel">
|
||||
<div>
|
||||
<div v-if="endload" class="row">
|
||||
<div class="row">
|
||||
<q-toggle
|
||||
v-if="tools.isManager()"
|
||||
v-model="check_send_email"
|
||||
color="blue"
|
||||
class="row q-mx-md"
|
||||
icon="fas fa-envelope"
|
||||
:label="$t('orderscart.check_invia_email')"
|
||||
:label="t('orderscart.check_invia_email')"
|
||||
></q-toggle>
|
||||
<q-toggle
|
||||
v-if="tools.isManager()"
|
||||
v-model="mostra_codice"
|
||||
color="blue"
|
||||
class="row q-mx-md"
|
||||
icon="fas fa-barcode"
|
||||
:label="t('orderscart.mostra_codice')"
|
||||
></q-toggle>
|
||||
<q-toggle
|
||||
v-if="tools.isManager()"
|
||||
v-model="mostra_cat"
|
||||
color="blue"
|
||||
class="row q-mx-md"
|
||||
icon="fas fa-barcode"
|
||||
:label="t('orderscart.mostra_cat')"
|
||||
></q-toggle>
|
||||
<q-toggle
|
||||
v-if="tools.isManager()"
|
||||
v-model="mostra_solo_ordini_produttore"
|
||||
color="blue"
|
||||
class="row q-mx-md"
|
||||
icon="fas fa-user-friends"
|
||||
:label="t('orderscart.mostra_solo_ordini_produttore')"
|
||||
></q-toggle>
|
||||
<q-select
|
||||
v-if="tools.isManager()"
|
||||
v-model="showWhichCode"
|
||||
:options="showWhichCodeOptions"
|
||||
emit-value
|
||||
map-options
|
||||
option-value="value"
|
||||
option-label="label"
|
||||
:label="t('orderscart.show_which_code')"
|
||||
class="row q-mx-md"
|
||||
:style="'width: 200px;'"
|
||||
></q-select>
|
||||
</div>
|
||||
|
||||
<q-tabs v-model="taborders" inline-label class="text-blue">
|
||||
<span v-for="(stat, index) of shared_consts.OrderStat" :key="index">
|
||||
<q-tab
|
||||
v-if="arrnumstatus[stat.value] > 0"
|
||||
:class="stat.color"
|
||||
:name="stat.value"
|
||||
:icon="stat.icon"
|
||||
:label="`(` + arrnumstatus[stat.value] + `) ` + stat.label"
|
||||
/>
|
||||
</span>
|
||||
</q-tabs>
|
||||
|
||||
<q-select
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
outlined
|
||||
@@ -71,347 +95,461 @@
|
||||
emit-value
|
||||
map-options
|
||||
></q-select>
|
||||
</div>
|
||||
<div>
|
||||
<q-tabs
|
||||
v-if="tools.isManager()"
|
||||
v-model="tabpages"
|
||||
inline-label
|
||||
class="text-blue"
|
||||
>
|
||||
<span v-for="(page, index) of shared_consts.OrderPages" :key="index">
|
||||
<q-tab
|
||||
:class="page.color"
|
||||
:name="page.value"
|
||||
:icon="page.icon"
|
||||
:label="page.label"
|
||||
/>
|
||||
</span>
|
||||
</q-tabs>
|
||||
|
||||
<div class="q-pa-sm">
|
||||
<q-table
|
||||
v-if="taborders > 0"
|
||||
:grid="$q.screen.lt.sm"
|
||||
:hide-header="$q.screen.lt.sm"
|
||||
:columns="columns"
|
||||
row-key="numorder"
|
||||
:pagination="initialPagination"
|
||||
:rows="arrout"
|
||||
<div v-if="tabpages === shared_consts.OrderPages.ORDINI.value">
|
||||
<q-tabs
|
||||
v-if="taborders"
|
||||
v-model="taborders"
|
||||
inline-label
|
||||
class="text-blue"
|
||||
>
|
||||
<template v-if="$q.screen.lt.sm" v-slot:item="props">
|
||||
<div class="q-pa-xs col-xs-12 col-sm-6 col-md-4">
|
||||
<q-card class="my-card-shadow yes_shadow">
|
||||
<q-list dense>
|
||||
<q-item v-for="col in getCols(props)" :key="col.name">
|
||||
<q-item-section>
|
||||
<q-item-label>{{ col.label }}</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side>
|
||||
<q-item-label
|
||||
v-if="col.name === 'created_at'"
|
||||
caption
|
||||
>{{ tools.getstrDateTime(col.value) }}</q-item-label>
|
||||
<q-item-label v-else-if="col.name === 'nameSurname'" caption>
|
||||
<span v-if="props.row.user">
|
||||
<span
|
||||
:class="
|
||||
props.row.user.name !== 'TOTALI' ? '' : 'totali'
|
||||
"
|
||||
>{{ tools.getNomeUtenteByRecUser(props.row.user) }}</span>
|
||||
</span>
|
||||
</q-item-label>
|
||||
<q-item-label v-else-if="col.name === 'items'" caption>
|
||||
<div v-for="(item, index) of props.row.items" :key="index">
|
||||
<span v-for="(stat, index) of shared_consts.OrderStat" :key="index">
|
||||
<q-tab
|
||||
v-if="arrnumstatus[stat.value] > 0"
|
||||
:class="stat.color"
|
||||
:name="stat.value"
|
||||
:icon="stat.icon"
|
||||
:label="`(` + arrnumstatus[stat.value] + `) ` + stat.label"
|
||||
/>
|
||||
</span>
|
||||
</q-tabs>
|
||||
|
||||
<div class="q-pa-sm">
|
||||
<q-table
|
||||
v-if="taborders > 0"
|
||||
:grid="$q.screen.lt.sm"
|
||||
:hide-header="$q.screen.lt.sm"
|
||||
:columns="columns"
|
||||
row-key="numorder"
|
||||
:pagination="initialPagination"
|
||||
:rows="arrout"
|
||||
:virtual-scroll="false"
|
||||
class="table-container"
|
||||
>
|
||||
<template v-if="$q.screen.lt.sm" v-slot:item="props">
|
||||
<div class="q-pa-xs col-xs-12 col-sm-6 col-md-4">
|
||||
<q-card class="my-card-shadow yes_shadow">
|
||||
<q-list dense>
|
||||
<q-item v-for="col in getCols(props)" :key="col.name">
|
||||
<q-item-section>
|
||||
<q-item-label>{{ col.label }}</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side>
|
||||
<q-item-label
|
||||
v-if="col.name === 'created_at'"
|
||||
caption
|
||||
>{{ tools.getstrDateTime(col.value) }}</q-item-label
|
||||
>
|
||||
<q-item-label
|
||||
v-else-if="col.name === 'nameSurname'"
|
||||
caption
|
||||
>
|
||||
<span v-if="props.row.user">
|
||||
<span
|
||||
:class="
|
||||
props.row.user.name !== 'TOTALI' ? '' : 'totali'
|
||||
"
|
||||
>{{
|
||||
tools.getNomeUtenteByRecUser(props.row.user)
|
||||
}}</span
|
||||
>
|
||||
</span>
|
||||
</q-item-label>
|
||||
<q-item-label v-else-if="col.name === 'items'" caption>
|
||||
<div
|
||||
v-for="(item, index) of props.row.items"
|
||||
:key="index"
|
||||
>
|
||||
<div
|
||||
v-if="
|
||||
!!item &&
|
||||
item.order &&
|
||||
item.order.product &&
|
||||
item.order.product.productInfo &&
|
||||
((mostra_solo_ordini_produttore &&
|
||||
item.order.idGasordine === storeGasordine) ||
|
||||
!mostra_solo_ordini_produttore)
|
||||
"
|
||||
>
|
||||
<span
|
||||
v-html="
|
||||
productStore.getStrInfoOrder(t, item.order)
|
||||
"
|
||||
></span>
|
||||
{{
|
||||
productStore.getQuantityByOrder(t, item.order)
|
||||
}}
|
||||
{{ item.order.product.productInfo.name }}
|
||||
<span v-if="mostra_cat"
|
||||
>({{
|
||||
productStore.getSubCatStrByProduct(
|
||||
item.order.product.productInfo
|
||||
)
|
||||
}})</span
|
||||
>
|
||||
{{
|
||||
mostra_codice
|
||||
? "- [" +
|
||||
item.order.product.productInfo.code +
|
||||
"]"
|
||||
: ""
|
||||
}}
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
</q-item-label>
|
||||
<q-item-label
|
||||
v-else-if="col.name === 'totalPrice'"
|
||||
caption
|
||||
>{{
|
||||
getTotaleOrdineByOrdId(
|
||||
props.row._id,
|
||||
storeGasordine
|
||||
)
|
||||
}}
|
||||
€</q-item-label
|
||||
>
|
||||
<q-item-label
|
||||
v-else-if="col.name === 'totalPriceCalc'"
|
||||
caption
|
||||
>{{ props.row.totalPriceCalc }} €</q-item-label
|
||||
>
|
||||
<q-item-label
|
||||
v-else-if="col.name === 'status'"
|
||||
caption
|
||||
>{{
|
||||
shared_consts.getStatusStr(props.row.status)
|
||||
}}</q-item-label
|
||||
>
|
||||
<q-item-label
|
||||
v-else-if="col.name === 'comandi'"
|
||||
caption
|
||||
>
|
||||
<div
|
||||
v-if="
|
||||
!!item &&
|
||||
item.order &&
|
||||
item.order.product &&
|
||||
item.order.product.productInfo
|
||||
tools.isManager() &&
|
||||
props.row.user.name !== 'TOTALI'
|
||||
"
|
||||
class="q-pa-sm"
|
||||
>
|
||||
<span v-html="productStore.getStrInfoOrder(t, item.order)"></span>
|
||||
{{ item.order.product.productInfo.name }} ({{
|
||||
productStore.getQuantityByOrder(t, item.order)
|
||||
}})
|
||||
<br />
|
||||
<q-btn
|
||||
v-if="
|
||||
taborders ===
|
||||
shared_consts.OrderStat.CONFERMATI.value
|
||||
"
|
||||
size="sm"
|
||||
dense
|
||||
color="green"
|
||||
icon="fas fa-people-carry"
|
||||
:label="t('ecomm.consegna')"
|
||||
@click="
|
||||
clickFunz(
|
||||
props.row,
|
||||
shared_consts.OrderStat.DELIVERED.value
|
||||
)
|
||||
"
|
||||
></q-btn>
|
||||
|
||||
<q-btn-dropdown rounded dense label="Azioni">
|
||||
<q-list class="text-primary">
|
||||
<q-item
|
||||
v-for="(
|
||||
cmd, index
|
||||
) of shared_consts.OrderCmdStr"
|
||||
:key="index"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="clickFunz(props.row, cmd.value)"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-avatar
|
||||
:icon="cmd.icon"
|
||||
:color="cmd.color"
|
||||
text-color="white"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label>{{ cmd.label }}</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-btn-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
</q-item-label>
|
||||
<q-item-label
|
||||
v-else-if="col.name === 'totalPrice'"
|
||||
caption
|
||||
>{{ props.row.totalPrice }} €</q-item-label>
|
||||
<q-item-label
|
||||
v-else-if="col.name === 'totalPriceCalc'"
|
||||
caption
|
||||
>{{ props.row.totalPriceCalc }} €</q-item-label>
|
||||
<q-item-label
|
||||
v-else-if="col.name === 'status'"
|
||||
caption
|
||||
>{{ shared_consts.getStatusStr(props.row.status) }}</q-item-label>
|
||||
<q-item-label v-else-if="col.name === 'comandi'" caption>
|
||||
<div
|
||||
v-if="
|
||||
tools.isManager() &&
|
||||
props.row.user.name !== 'TOTALI'
|
||||
"
|
||||
class="q-pa-sm"
|
||||
</q-item-label>
|
||||
|
||||
<q-item-label
|
||||
v-else-if="col.name === 'apri' && props.row._id"
|
||||
caption
|
||||
>
|
||||
<q-btn
|
||||
v-if="
|
||||
taborders ===
|
||||
shared_consts.OrderStat.CONFERMATI.value
|
||||
"
|
||||
size="sm"
|
||||
dense
|
||||
color="green"
|
||||
icon="fas fa-people-carry"
|
||||
:label="t('ecomm.consegna')"
|
||||
@click="clickFunz(props.row, shared_consts.OrderStat.DELIVERED.value)"
|
||||
></q-btn>
|
||||
<div class="q-pa-sm">
|
||||
<q-btn
|
||||
size="sm"
|
||||
dense
|
||||
icon="fas fa-filter"
|
||||
:label="t('ecomm.apriordine')"
|
||||
@click="
|
||||
idOrdersCartToShow = props.row._id;
|
||||
showOrdersCart = true;
|
||||
"
|
||||
></q-btn>
|
||||
</div>
|
||||
</q-item-label>
|
||||
<q-item-label v-else caption>
|
||||
{{ col.value }}
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-card>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else v-slot:body="props">
|
||||
<q-tr :props="props">
|
||||
<q-td key="ind" :props="props">
|
||||
<div class="q-pa-sm">{{ props.row.ind + 1 }}</div>
|
||||
</q-td>
|
||||
<q-td key="apri" :props="props">
|
||||
<div class="q-pa-sm">
|
||||
<q-btn
|
||||
v-if="props.row._id"
|
||||
color="primary"
|
||||
size="sm"
|
||||
dense
|
||||
icon="far fa-file-alt"
|
||||
:label="t('ecomm.apriordine')"
|
||||
@click="
|
||||
idOrdersCartToShow = props.row._id;
|
||||
showOrdersCart = true;
|
||||
"
|
||||
></q-btn>
|
||||
</div>
|
||||
</q-td>
|
||||
<q-td key="comandi" :props="props">
|
||||
<div
|
||||
v-if="tools.isManager() && props.row.user.name !== 'TOTALI'"
|
||||
class="q-pa-sm"
|
||||
>
|
||||
<q-btn
|
||||
v-if="
|
||||
taborders === shared_consts.OrderStat.CONFERMATI.value
|
||||
"
|
||||
size="sm"
|
||||
dense
|
||||
color="green"
|
||||
icon="fas fa-people-carry"
|
||||
class="q-mx-sm"
|
||||
:label="t('ecomm.consegna')"
|
||||
@click="
|
||||
clickFunz(
|
||||
props.row,
|
||||
shared_consts.OrderStat.DELIVERED.value
|
||||
)
|
||||
"
|
||||
></q-btn>
|
||||
|
||||
<q-btn-dropdown rounded dense label="Azioni">
|
||||
<q-list class="text-primary">
|
||||
<q-item
|
||||
v-for="(
|
||||
cmd, index
|
||||
) of shared_consts.OrderCmdStr"
|
||||
:key="index"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="clickFunz(props.row, cmd.value)"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-avatar :icon="cmd.icon" :color="cmd.color" text-color="white" />
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label>{{ cmd.label }}</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-btn-dropdown>
|
||||
</div>
|
||||
</q-item-label>
|
||||
|
||||
<q-item-label v-else-if="col.name === 'apri' && props.row._id" caption>
|
||||
<div class="q-pa-sm">
|
||||
<q-btn
|
||||
size="sm"
|
||||
dense
|
||||
icon="fas fa-filter"
|
||||
:label="t('ecomm.apriordine')"
|
||||
:to="`/orderscart/${props.row._id}`"
|
||||
></q-btn>
|
||||
</div>
|
||||
</q-item-label>
|
||||
<q-item-label v-else caption>
|
||||
{{
|
||||
col.value
|
||||
}}
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-card>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else v-slot:body="props">
|
||||
<q-tr :props="props">
|
||||
<q-td key="ind" :props="props">
|
||||
<div class="q-pa-sm">{{ index }}</div>
|
||||
</q-td>
|
||||
<q-td key="apri" :props="props">
|
||||
<div class="q-pa-sm">
|
||||
<q-btn
|
||||
v-if="props.row._id"
|
||||
color="primary"
|
||||
size="sm"
|
||||
dense
|
||||
icon="far fa-file-alt"
|
||||
:label="t('ecomm.apriordine')"
|
||||
:to="`/orderscart/${props.row._id}`"
|
||||
></q-btn>
|
||||
</div>
|
||||
</q-td>
|
||||
<q-td key="comandi" :props="props">
|
||||
<div v-if="tools.isManager() && props.row.user.name !== 'TOTALI'" class="q-pa-sm">
|
||||
<q-btn
|
||||
<q-btn-dropdown rounded dense label="Azioni">
|
||||
<q-list class="text-primary">
|
||||
<q-item
|
||||
v-for="(cmd, index) of shared_consts.OrderCmdStr"
|
||||
:key="index"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="clickFunz(props.row, cmd.value)"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-avatar
|
||||
:icon="cmd.icon"
|
||||
:color="cmd.color"
|
||||
text-color="white"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label>{{ cmd.label }}</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-btn-dropdown>
|
||||
</div>
|
||||
</q-td>
|
||||
<q-td key="numorder" :props="props">
|
||||
<span v-if="props.row.numorder"
|
||||
> n. {{ props.row.numorder }}</span
|
||||
>
|
||||
</q-td>
|
||||
<q-td key="nameSurname" :props="props">
|
||||
<span v-if="props.row.user">
|
||||
<span
|
||||
:class="props.row.user.name !== 'TOTALI' ? '' : 'totali'"
|
||||
>{{ tools.getNomeUtenteByRecUser(props.row.user) }}</span
|
||||
>
|
||||
</span>
|
||||
</q-td>
|
||||
<q-td key="created_at" :props="props">
|
||||
{{ tools.getstrDateTime(props.row.created_at) }}
|
||||
<span
|
||||
v-if="
|
||||
taborders === shared_consts.OrderStat.CONFERMATI.value
|
||||
taborders === shared_consts.OrderStat.COMPLETATI.value
|
||||
"
|
||||
size="sm"
|
||||
dense
|
||||
color="green"
|
||||
icon="fas fa-people-carry"
|
||||
class="q-mx-sm"
|
||||
:label="t('ecomm.consegna')"
|
||||
@click="clickFunz(props.row, shared_consts.OrderStat.DELIVERED.value)"
|
||||
></q-btn>
|
||||
|
||||
<q-btn-dropdown rounded dense label="Azioni">
|
||||
<q-list class="text-primary">
|
||||
<q-item
|
||||
v-for="(cmd, index) of shared_consts.OrderCmdStr"
|
||||
:key="index"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="clickFunz(props.row, cmd.value)"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-avatar :icon="cmd.icon" :color="cmd.color" text-color="white" />
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label>{{ cmd.label }}</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-btn-dropdown>
|
||||
</div>
|
||||
</q-td>
|
||||
<q-td key="numorder" :props="props">
|
||||
<span v-if="props.row.numorder"> n. {{ props.row.numorder }}</span>
|
||||
</q-td>
|
||||
<q-td key="nameSurname" :props="props">
|
||||
<span v-if="props.row.user">
|
||||
>
|
||||
<br />Consegnato il:
|
||||
<br />
|
||||
{{ tools.getstrDateTime(props.row.date_consegnato) }}
|
||||
</span>
|
||||
</q-td>
|
||||
<q-td key="items" :props="props">
|
||||
<div v-for="(item, index) of props.row.items" :key="index">
|
||||
<div
|
||||
v-if="
|
||||
!!item.order &&
|
||||
item.order.product &&
|
||||
item.order.product.productInfo &&
|
||||
((mostra_solo_ordini_produttore &&
|
||||
item.order.idGasordine === storeGasordine) ||
|
||||
!mostra_solo_ordini_produttore)
|
||||
"
|
||||
>
|
||||
{{ productStore.getQuantityByOrder(t, item.order) }}
|
||||
{{ item.order.product.productInfo.name }}
|
||||
<span v-if="mostra_cat">
|
||||
({{
|
||||
productStore.getSubCatStrByProduct(
|
||||
item.order.product.productInfo
|
||||
)
|
||||
}})
|
||||
</span>
|
||||
{{
|
||||
mostra_codice
|
||||
? "- [" + item.order.product.productInfo.code + "]"
|
||||
: ""
|
||||
}}
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="props.row.note" class="note">
|
||||
Note: {{ props.row.note }}
|
||||
</div>
|
||||
<div v-if="props.row.note_per_gestore" class="note">
|
||||
Note per Gestore: {{ props.row.note_per_gestore }}
|
||||
</div>
|
||||
<div v-if="props.row.note_per_admin" class="note">
|
||||
Note per Admin: {{ props.row.note_per_admin }}
|
||||
</div>
|
||||
</q-td>
|
||||
<q-td key="totalPrice" :props="props">
|
||||
<span
|
||||
:class="props.row.user.name !== 'TOTALI' ? '' : 'totali'"
|
||||
>{{ tools.getNomeUtenteByRecUser(props.row.user) }}</span>
|
||||
</span>
|
||||
</q-td>
|
||||
<q-td key="created_at" :props="props">
|
||||
{{ tools.getstrDateTime(props.row.created_at) }}
|
||||
<span
|
||||
v-if="taborders === shared_consts.OrderStat.COMPLETATI"
|
||||
>
|
||||
<br />Consegnato il:
|
||||
<br />
|
||||
{{
|
||||
tools.getstrDateTime(props.row.date_consegnato)
|
||||
}}
|
||||
</span>
|
||||
</q-td>
|
||||
<q-td key="items" :props="props">
|
||||
<div v-for="(item, index) of props.row.items" :key="index">
|
||||
<div
|
||||
v-if="
|
||||
!!item.order &&
|
||||
item.order.product &&
|
||||
item.order.product.productInfo
|
||||
"
|
||||
>
|
||||
{{ item.order.product.productInfo.name }} ({{
|
||||
productStore.getQuantityByOrder($t, item.order)
|
||||
}})
|
||||
<br />
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="props.row.note" class="note">Note: {{ props.row.note }}</div>
|
||||
<div
|
||||
v-if="props.row.note_per_gestore"
|
||||
class="note"
|
||||
>Note per Gestore: {{ props.row.note_per_gestore }}</div>
|
||||
<div
|
||||
v-if="props.row.note_per_admin"
|
||||
class="note"
|
||||
>Note per Admin: {{ props.row.note_per_admin }}</div>
|
||||
</q-td>
|
||||
<q-td key="totalPrice" :props="props">
|
||||
<span
|
||||
:class="props.row.user.name !== 'TOTALI' ? '' : 'totali'"
|
||||
>{{ props.row.totalPrice }} €</span>
|
||||
</q-td>
|
||||
<q-td key="status" :props="props">
|
||||
<span :class="props.row.status">
|
||||
{{
|
||||
shared_consts.getStatusStr(props.row.status)
|
||||
}}
|
||||
</span>
|
||||
<br />
|
||||
<div v-if="props.row.confermato" class="ordstat">
|
||||
{{ tools.getstrDateTime(props.row.date_confermato) }}:
|
||||
<span
|
||||
class="ordstat confermato"
|
||||
>
|
||||
{{
|
||||
$t('ecomm.confermato')
|
||||
>{{
|
||||
getTotaleOrdineByOrdId(props.row._id, storeGasordine)
|
||||
}}
|
||||
€</span
|
||||
>
|
||||
</q-td>
|
||||
<q-td key="status" :props="props">
|
||||
<span :class="props.row.status">
|
||||
{{ shared_consts.getStatusStr(props.row.status) }}
|
||||
</span>
|
||||
</div>
|
||||
<div v-if="props.row.pagato" class="ordstat">
|
||||
{{ tools.getstrDateTime(props.row.date_pagato) }}:
|
||||
<span
|
||||
class="ordstat"
|
||||
>{{ $t('ecomm.pagato') }}</span>
|
||||
</div>
|
||||
<div v-if="props.row.consegnato" class="ordstat">
|
||||
{{ tools.getstrDateTime(props.row.date_consegnato) }}:
|
||||
<span
|
||||
class="ordstat"
|
||||
>{{ $t('ecomm.consegnato') }}</span>
|
||||
</div>
|
||||
<div v-if="props.row.preparato" class="ordstat">
|
||||
{{ tools.getstrDateTime(props.row.date_preparato) }}:
|
||||
<span
|
||||
class="ordstat"
|
||||
>{{ $t('ecomm.preparato') }}</span>
|
||||
</div>
|
||||
<div v-if="props.row.spedito">
|
||||
{{ tools.getstrDateTime(props.row.date_spedito) }}:
|
||||
<span
|
||||
class="ordstat"
|
||||
>{{ $t('ecomm.spedito') }}</span>
|
||||
</div>
|
||||
<div v-if="props.row.ricevuto">
|
||||
{{ tools.getstrDateTime(props.row.date_ricevuto) }}:
|
||||
<span
|
||||
class="ordstat"
|
||||
>{{ $t('ecomm.ricevuto') }}</span>
|
||||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
</q-table>
|
||||
</div>
|
||||
<br />
|
||||
<div v-if="props.row.confermato" class="ordstat">
|
||||
{{ tools.getstrDateTime(props.row.date_confermato) }}:
|
||||
<span class="ordstat confermato">
|
||||
{{ $t("ecomm.confermato") }}
|
||||
</span>
|
||||
</div>
|
||||
<div v-if="props.row.pagato" class="ordstat">
|
||||
{{ tools.getstrDateTime(props.row.date_pagato) }}:
|
||||
<span class="ordstat">{{ t("ecomm.pagato") }}</span>
|
||||
</div>
|
||||
<div v-if="props.row.consegnato" class="ordstat">
|
||||
{{ tools.getstrDateTime(props.row.date_consegnato) }}:
|
||||
<span class="ordstat">{{ t("ecomm.consegnato") }}</span>
|
||||
</div>
|
||||
<div v-if="props.row.preparato" class="ordstat">
|
||||
{{ tools.getstrDateTime(props.row.date_preparato) }}:
|
||||
<span class="ordstat">{{ t("ecomm.preparato") }}</span>
|
||||
</div>
|
||||
<div v-if="props.row.spedito">
|
||||
{{ tools.getstrDateTime(props.row.date_spedito) }}:
|
||||
<span class="ordstat">{{ t("ecomm.spedito") }}</span>
|
||||
</div>
|
||||
<div v-if="props.row.ricevuto">
|
||||
{{ tools.getstrDateTime(props.row.date_ricevuto) }}:
|
||||
<span class="ordstat">{{ t("ecomm.ricevuto") }}</span>
|
||||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
</q-table>
|
||||
</div>
|
||||
|
||||
<!-- Ordini IN CORSO -->
|
||||
<div
|
||||
v-if="
|
||||
tools.isManager() &&
|
||||
taborders === shared_consts.OrderStat.IN_CORSO.value
|
||||
"
|
||||
class="q-ma-sm q-pa-sm row justify-center"
|
||||
>
|
||||
<q-btn
|
||||
color="positive"
|
||||
icon="mail"
|
||||
:label="t('orderscart.order_confirm')"
|
||||
@click="ConfermaOrdini"
|
||||
></q-btn>
|
||||
</div>
|
||||
<!-- Ordini IN CORSO -->
|
||||
<div
|
||||
v-if="
|
||||
tools.isManager() &&
|
||||
taborders === shared_consts.OrderStat.IN_CORSO.value
|
||||
"
|
||||
class="q-ma-sm q-pa-sm row justify-center"
|
||||
>
|
||||
<q-btn
|
||||
color="positive"
|
||||
icon="mail"
|
||||
:label="t('orderscart.order_confirm')"
|
||||
@click="ConfermaOrdini"
|
||||
></q-btn>
|
||||
</div>
|
||||
|
||||
<!-- Emails -->
|
||||
<div v-if="tools.isManager()" class="q-ma-sm q-pa-sm row">
|
||||
<q-select
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
rounded
|
||||
style="width: 300px"
|
||||
outlined
|
||||
v-model="templemail"
|
||||
:options="globalStore.templemail"
|
||||
:option-value="fieldsTable.getKeyByTable('templemail')"
|
||||
:option-label="fieldsTable.getLabelByTable('templemail')"
|
||||
label="Scegli il tipo di Email:"
|
||||
emit-value
|
||||
map-options
|
||||
></q-select>
|
||||
<CMyFieldDb
|
||||
title="Email di Test"
|
||||
mykey="EMAIL_TEST"
|
||||
:serv="true"
|
||||
:type="costanti.FieldType.string"
|
||||
></CMyFieldDb>
|
||||
<q-btn
|
||||
color="primary"
|
||||
icon="fas fa-check"
|
||||
:label="t('orderscart.sendmail_test')"
|
||||
@click="sendMailTest"
|
||||
></q-btn>
|
||||
|
||||
<div v-if="tools.isManager()" class="q-ma-sm q-pa-sm row">
|
||||
<q-select
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
rounded
|
||||
style="width: 300px"
|
||||
outlined
|
||||
v-model="templemail"
|
||||
:options="globalStore.templemail"
|
||||
:option-value="fieldsTable.getKeyByTable('templemail')"
|
||||
:option-label="fieldsTable.getLabelByTable('templemail')"
|
||||
label="Scegli il tipo di Email:"
|
||||
emit-value
|
||||
map-options
|
||||
></q-select>
|
||||
<CMyFieldDb
|
||||
title="Email di Test"
|
||||
mykey="EMAIL_TEST"
|
||||
:serv="true"
|
||||
:type="costanti.FieldType.string"
|
||||
></CMyFieldDb>
|
||||
<q-btn
|
||||
color="primary"
|
||||
icon="fas fa-check"
|
||||
:label="t('orderscart.sendmail_test')"
|
||||
@click="sendMailTest"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
color="positive"
|
||||
icon="mail"
|
||||
:label="t('orderscart.sendmail', { count: arrout.length })"
|
||||
@click="sendMailToAll"
|
||||
></q-btn>
|
||||
</div>
|
||||
|
||||
<q-btn
|
||||
color="positive"
|
||||
icon="mail"
|
||||
:label="t('orderscart.sendmail', { count: arrout.length })"
|
||||
@click="sendMailToAll"
|
||||
></q-btn>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
<!--
|
||||
<div v-for="(orderscart, index) in getOrdersCart" :key="index">
|
||||
|
||||
<div>
|
||||
@@ -439,8 +577,69 @@
|
||||
|
||||
<br>
|
||||
</div>
|
||||
-->
|
||||
--></div>
|
||||
<div v-else-if="tabpages === shared_consts.OrderPages.LISTA_TOTALI.value">
|
||||
<div class="q-pa-sm">
|
||||
<q-btn
|
||||
v-if="true"
|
||||
color="primary"
|
||||
icon-right="archive"
|
||||
label="Esporta Lista Totali"
|
||||
no-caps
|
||||
@click="exportListaTotali"
|
||||
/>
|
||||
|
||||
<q-table
|
||||
:grid="false"
|
||||
:hide-header="$q.screen.lt.sm"
|
||||
:columns="columns_listafiltrati"
|
||||
row-key="index"
|
||||
:pagination="totalPagination"
|
||||
:rows="listatotali"
|
||||
>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props">
|
||||
<q-td key="index" :props="props">
|
||||
<div class="q-pa-sm">{{ props.row.index }}</div>
|
||||
</q-td>
|
||||
<q-td key="code" :props="props">
|
||||
<div class="q-pa-sm">{{ props.row.code }}</div>
|
||||
</q-td>
|
||||
<q-td key="codice_interno" :props="props">
|
||||
<div class="q-pa-sm">{{ props.row.codice_interno }}</div>
|
||||
</q-td>
|
||||
<q-td key="productName" :props="props">
|
||||
<div class="q-pa-sm">{{ props.row.productName }}</div>
|
||||
</q-td>
|
||||
<q-td key="strSubCatProds" :props="props">
|
||||
<div class="q-pa-sm">
|
||||
{{ props.row.strSubCatProds }}
|
||||
</div>
|
||||
</q-td>
|
||||
<q-td key="qty" :props="props">
|
||||
<div class="q-pa-sm">{{ props.row.qty }}</div>
|
||||
</q-td>
|
||||
<q-td key="singlePrice" :props="props">
|
||||
<div class="q-pa-sm">
|
||||
{{ props.row.singlePrice.toFixed(2) }} €
|
||||
</div>
|
||||
</q-td>
|
||||
<q-td key="subtotalPrice" :props="props">
|
||||
<div class="q-pa-sm">
|
||||
{{ props.row.subtotalPrice.toFixed(2) }} €
|
||||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
</q-table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Emails -->
|
||||
</div>
|
||||
<CMyDialog v-model="showOrdersCart" title="Ordine">
|
||||
<COrdersCart :iscash="false" :idOrdersCart="idOrdersCartToShow" />
|
||||
</CMyDialog>
|
||||
</q-page>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user