Aggiornamento PiuChebuono: lista Totali del Produttore.

This commit is contained in:
Surya Paolo
2025-02-26 19:08:08 +01:00
parent 793c220f59
commit 714ad1b0dd
84 changed files with 1107 additions and 1711 deletions

View File

@@ -1,17 +1,18 @@
APP_VERSION="1.1.22"
SERVICE_WORKER_FILE="service-worker.js"
APP_ID="13"
APP_ID="17"
DIRECTORY_LOCAL="newfreeplanet"
DIRECTORY_SERVER="freeplanet_serverside"
SERVERDIR_WEBSITE=""
SERVERPW_WEBSITE=""
APP_URL="https://localhost"
URL_FACEBOOK="https://www.facebook.com/freeplanetapp"
PROVA_PAOLO="PROVA ENV FUNZIONA!"
LANG_DEFAULT="it"
PAO_APP_ID="KKPPAA5KJK435J3KSS9F9D8S9F8SD98F9SDF"
MASTER_KEY="KKPPSS5KJK435J3KSS9F9D8S9F8SD3CR3T"
MONGODB_HOST="https://localhost:3000"
LOGO_REG='riso-logo-full.png'
LOGO_REG='piuchebuono-logo-full.png'
TEST_NAME="Paolo"
TEST_SURNAME="Arena"
TEST_EMAIL=""
@@ -24,5 +25,5 @@ DEBUG="1"
TELEGRAM_SUPPORT=""
PROJECT_ID_MAIN="5cc0a13fe5c9d156728f400a"
TEST_CELL=""
VUE_APP_ISTEST="1"
VUE_APP_INLOCALE="1"
VUE_APP_ISTEST=1
VUE_APP_INLOCALE=1

View File

@@ -1 +1 @@
TERMINA DI LAVORARE SU gruppomacro.app: (Sovrascrivo !)
TERMINA DI LAVORARE SU riso.app: (Sovrascrivo !)

View File

@@ -1,15 +1,15 @@
{
"name": "riso",
"name": "piuchebuono",
"version": "1.1.22",
"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.",
"productName": "Riso",
"description": "PiuCheBuono",
"productName": "PiuCheBuono",
"author": "Surya",
"private": true,
"keywords": [],
"license": "MIT",
"scripts": {
"dev": "quasar dev",
"build": "NODE_ENV=production quasar build",
"build": "quasar build",
"buildpwa": "NODE_ENV=production quasar build -m pwa",
"buildpwatest": "NODE_ENV=test quasar build -m pwa",
"buildspa": "NODE_ENV=production quasar build -m spa",
@@ -127,7 +127,6 @@
"jest": "^29.7.0",
"json-loader": "^0.5.7",
"node-sass": "^9.0.0",
"nodemon": "^3.1.7",
"npm-check-updates": "^17.1.3",
"optimize-css-assets-webpack-plugin": "^6.0.1",
"parcel": "^2.12.0",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 862 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 424 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 279 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

View File

@@ -152,9 +152,9 @@ module.exports = configure((ctx) => ({
},
devServer: {
https: false,
port: 8084,
port: 8088,
open: false, // opens browser window automatically
hot: false, // Disable hot module replacement
hot: true, // Disable hot module replacement
headers: {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Headers': '*',
@@ -313,9 +313,9 @@ module.exports = configure((ctx) => ({
},
manifest: {
name: 'Riso',
short_name: '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.',
name: 'Più che Buono',
short_name: 'PiuCheBuono',
description: 'PiuCheBuono è un GAS e Bottega',
display: 'standalone',
orientation: 'portrait',
background_color: '#fff',
@@ -325,54 +325,54 @@ module.exports = configure((ctx) => ({
start_url: "/?homescreen=1",
icons: [
{
src: 'images/riso-android-icon-512x512.png',
src: 'images/pcb-android-icon-512x512.png',
sizes: '512x512',
type: 'image/png',
},
{
src: 'images/riso-android-icon-384x384.png',
src: 'images/pcb-android-icon-384x384.png',
sizes: '384x384',
type: 'image/png',
},
{
src: 'images/riso-android-icon-192x192.png',
src: 'images/pcb-android-icon-192x192.png',
sizes: '192x192',
type: 'image/png',
},
{
src: 'images/riso-android-icon-144x144.png',
src: 'images/pcb-android-icon-144x144.png',
sizes: '144x144',
type: 'image/png',
},
{
src: 'images/riso-android-icon-96x96.png',
src: 'images/pcb-android-icon-96x96.png',
sizes: '96x96',
type: 'image/png',
},
{
src: 'images/riso-apple-icon-120x120.png',
src: 'images/pcb-apple-icon-120x120.png',
sizes: '120x120',
type: 'image/png',
},
{
src: 'images/riso-apple-icon-144x144.png',
src: 'images/pcb-apple-icon-144x144.png',
sizes: '144x144',
type: 'image/png',
},
{
src: 'images/riso-apple-icon-152x152.png',
src: 'images/pcb-apple-icon-152x152.png',
sizes: '152x152',
type: 'image/png',
},
{
src: 'images/riso-apple-icon-180x180.png',
src: 'images/pcb-apple-icon-180x180.png',
sizes: '180x180',
type: 'image/png',
},
],
related_applications: [{
"platform": "webapp",
"url": "https://www.riso.app/manifest.json"
"url": "https://www.piuchebuono.app/manifest.json"
}]
},
},
@@ -407,7 +407,7 @@ module.exports = configure((ctx) => ({
builder: {
// https://www.electron.build/configuration/configuration
appId: 'Riso',
appId: 'PiuCheBuono',
},
// "chain" is a webpack-chain object https://github.com/neutrinojs/webpack-chain

View File

@@ -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

View File

View 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 '@/boot/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,
}
}
})

View 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>

View File

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

View File

@@ -8,6 +8,8 @@ const msg_website_enUs = {
products: {
quantity: 'Quantità',
quantityAvailable: 'Disponibili',
stockQty: 'In Magazzino',
stockBloccatiQty: 'Bloccati In Magazzino',
weight: 'Peso',
stars: 'Voto',
color: 'Colore',
@@ -36,6 +38,7 @@ const msg_website_enUs = {
productslist: 'Lista Prodotti',
collabora: 'Collabora',
storehouses: 'Magazzino',
providers: 'Fornitori',
departments: 'Uffici',
orders: 'Ordini Ricevuti',
orders2: 'Ordini Ricevuti',

View File

@@ -8,6 +8,7 @@ const msg_website_es = {
products: {
quantity: 'Quantità',
quantityAvailable: 'Disponibili',
stockQty: 'In Magazzino',
weight: 'Peso',
stars: 'Voto',
color: 'Colore',

View File

@@ -1,9 +1,9 @@
const msg_website_it = {
ws: {
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',
sitename: 'Più che Buono',
siteshortname: 'Più che Buono',
description: '',
keywords: '',
},
hours: {
descr: 'Descrizione',
@@ -16,23 +16,35 @@ 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',
@@ -121,15 +133,11 @@ const msg_website_it = {
only_residenti: 'Solo Residenti',
only_consiglio: 'Solo Consiglieri',
color: 'Colore',
mainMenu: 'Menu Principale',
subtitle: 'Sottotitolo',
lang: 'Lingua',
keywords: 'Parole Chiave',
desctiption: 'Descrizione',
heightimg: 'Altezza Immagine',
gasordini: 'Gas Ordini',
gestoreordini: 'Gestore Ordini',
},
msg: {
myAppName: 'Riso',
myAppName: 'Più che Buono',
myAppDescription: 'Il primo Vero Social Libero, Equo e Solidale, dove Vive Consapevolezza e Aiuto Comunitario. Gratuito',
underconstruction: 'App in costruzione...',
myDescriz: '',

View File

@@ -7,30 +7,6 @@ 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,
@@ -64,76 +40,12 @@ function getDynamicPages(site: ISites): IListRoutes[] {
materialIcon: 'fas fa-test',
name: 'mypages.test',
component: () => import('@/views/testServer/testServer.vue'),
inmenu: false,
infooter: false,
},
{
active: true,
order: 12,
path: '/goods',
materialIcon: 'fas fa-tshirt',
name: 'mypages.goods',
component: () => import('@/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('@/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('@/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('@/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('@/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('@/views/user/mycircuits/mycircuits.vue'),
meta: { requiresAuth: true },
inmenu: true,
infooter: true,
},
{
/*{
active: true,
order: 20,
path: '/events',
@@ -143,6 +55,17 @@ 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('@/views/user/myprofile/myprofile.vue'),
meta: { requiresAuth: true },
inmenu: true,
infooter: true,
},
{
active: true,
@@ -155,17 +78,6 @@ function getDynamicPages(site: ISites): IListRoutes[] {
inmenu: false,
infooter: false,
},
{
active: true,
order: 120,
path: '/myprofile',
materialIcon: 'fas fa-user',
name: 'pages.profile',
component: () => import('@/views/user/myprofile/myprofile.vue'),
meta: { requiresAuth: true },
inmenu: true,
infooter: true,
},
{
active: true,
order: 120,
@@ -178,7 +90,7 @@ function getDynamicPages(site: ISites): IListRoutes[] {
infooter: false,
},
{
active: true,
active: site.confpages && site.confpages.showiscrittiMenu,
order: 130,
path: '/friends',
materialIcon: 'fas fa-user-friends',
@@ -188,6 +100,19 @@ 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('@/views/user/mycircuits/mycircuits.vue'),
meta: { requiresAuth: true },
inmenu: true,
infooter: true,
onlyAdmin: true,
onlyManager: true,
},
{
active: site.confpages && site.confpages.enableGroups,
order: 132,
@@ -198,6 +123,8 @@ function getDynamicPages(site: ISites): IListRoutes[] {
meta: { requiresAuth: true },
inmenu: true,
infooter: false,
onlyAdmin: true,
onlyManager: true,
},
{
active: true,
@@ -276,7 +203,7 @@ function getDynamicPages(site: ISites): IListRoutes[] {
{
active: true,
order: 150,
path: '/sostieniilprogetto',
path: '/fundraising',
materialIcon: 'fas fa-hand-holding-heart',
name: 'pages.fundraising',
component: () => import('@src/root/fundraising/fundraising.vue'),

View File

@@ -4,6 +4,7 @@ import { IUserFields, IUserShort } from './UserStore'
export interface IProductInfo {
_id?: any
code?: string
codice?: string
id_wp?: string
sku?: string
name?: string
@@ -41,11 +42,11 @@ export interface IProductInfo {
ListaArgomenti?: string
publisher?: IPublisher
date_pub?: Date
date_pub_ts: number
date_pub_ts?: number
pagine?: number
productTypes?: number[]
versioneGM?: string
short_descr: string
short_descr?: string
totVen?: number,
totFat?: number,
@@ -342,6 +343,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

View File

@@ -1871,7 +1871,7 @@ const msg_it = {
btn_ordini: 'I tuoi Ordini',
available: 'Disponib.',
preorders: 'Quantità Massima Pre-Ordinabili',
preord: 'Pre-Ordinate',
preord: 'Ordinate',
di_cui_x_in_carrello: '(nel tuo carrello: {qty})',
confermato: 'Ordine Confermato',
consegnato: 'Ordine Consegnato',
@@ -1929,6 +1929,7 @@ const msg_it = {
tutti: 'Tutti',
},
orderscart: {
show_which_code: 'Mostra Codice',
numorder: 'Ordine',
totalQty: 'totalQty',
totalQtyPreordered: 'totalQty PreOrd',
@@ -1943,6 +1944,9 @@ const msg_it = {
TotalPriceProduct: 'Prezzo Totale',
order_confirm: 'Conferma Ordini (aggiorna Qta magazzino)',
check_invia_email: 'Abilita l\'Invio delle email (📩)',
mostra_codice: 'Mostra Codice',
mostra_cat: 'Mostra Categoria',
mostra_solo_ordini_produttore: 'Filtra Ordini del Produttore',
},
cash: {
creatorUserId: 'Creatore',

View File

@@ -59,6 +59,8 @@ import { PayloadMessageTypes } from '@/common'
import { useNotifStore } from '@store/NotifStore'
import { isDimensionToken } from 'html2canvas/dist/types/css/syntax/parser'
const { t } = useI18n()
export interface INotify {
color?: string
textColor?: string
@@ -80,6 +82,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',

View File

@@ -1,4 +1,4 @@
import { IBaseOrder, ICart, IOrder, IOrderCart, IProduct, IProductsState, IProductInfo, ICatProd, IUserShort, IGasordine, IAuthor, ISubCatProd, IText, IOptCatalogo, ICatalog, ICatPrTotali } from 'model'
import { IBaseOrder, ICart, IOrder, IOrderCart, IProduct, IProductsState, IProductInfo, ICatProd, IUserShort, IGasordine, IAuthor, ISubCatProd, IText, IOptCatalogo, ICatalog, ICatPrTotali, ISingleProductOrdered } from 'model'
import { Api } from '@api'
import { serv_constants } from '@src/store/Modules/serv_constants'
@@ -162,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)
@@ -179,6 +215,7 @@ export const useProducts = defineStore('Products', {
return 0
},
getSubCatProdsByGas: (state: IProductsState) => (idGasOrdine: string, idCatProd: string): ISubCatProd[] => {
let arrcat = state.subcatprods
@@ -1048,7 +1085,7 @@ export const useProducts = defineStore('Products', {
mystr += ' + '
}
if (order.quantitypreordered > 0) {
mystr += ' ' + order.quantitypreordered + ' ' + $t('ecomm.preord');
mystr += ' ' + order.quantitypreordered + ' ';
}
return mystr
},
@@ -1248,6 +1285,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()
@@ -1257,16 +1302,22 @@ export const useProducts = defineStore('Products', {
value: ''
}]
let ind = 1
if (globalStore.gasordines) {
globalStore.gasordines.forEach((gasordine: IGasordine) => {
if (gasordine) {
myarr.push(
{
id: ind,
label: gasordine.name,
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
},
@@ -1418,6 +1469,54 @@ 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());
}
},

View File

@@ -6,7 +6,7 @@ import { useGlobalStore } from '@store/globalStore'
import { useProducts } from '@store/Products'
import { useI18n } from '@/boot/i18n'
import { toolsext } from '@store/Modules/toolsext'
import { useQuasar } from 'quasar'
import { useQuasar, exportFile } from 'quasar'
import { costanti } from '@costanti'
import { shared_consts } from '@src/common/shared_vuejs'
// import MixinBase from '@src/mixins/mixin-base'
@@ -14,12 +14,14 @@ import { serv_constants } from '@store/Modules/serv_constants'
import { fieldsTable } from '@store/Modules/fieldsTable'
import { CSingleCart } from '../../../components/CSingleCart'
import { CMyDialog } from '../../../components/CMyDialog'
import { COrdersCart } from '../../../components/COrdersCart'
import { CTitleBanner, CMyFieldDb } from '@components'
import { ICart, IOrder, IOrderCart } from '@src/model'
import { ICart, IOrder, IOrderCart, ISingleProductOrdered } from '@src/model'
export default defineComponent({
name: 'OrderInfo',
components: { CSingleCart, CTitleBanner, CMyFieldDb },
components: { CSingleCart, CTitleBanner, CMyFieldDb, COrdersCart, CMyDialog },
props: {},
setup() {
const userStore = useUserStore()
@@ -35,18 +37,48 @@ 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(0)
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,
// 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
})
const conferma_carrello = ref(false)
const conferma_ordine = ref(false)
const endload = ref(false)
@@ -54,8 +86,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',
@@ -191,6 +296,11 @@ 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())
updateorders(false)
})
@@ -199,6 +309,24 @@ export default defineComponent({
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) {
@@ -212,6 +340,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();
@@ -256,6 +425,22 @@ export default defineComponent({
}
function updateorders(updatetab: boolean) {
// 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 (tabpages.value === shared_consts.OrderPages.ORDINI.value) {
arrout.value = []
myorderscart.value = getOrdersCart()
@@ -275,7 +460,9 @@ export default defineComponent({
}
arrout.value = getOrdersCartWithTotals()
} else if (tabpages.value === shared_consts.OrderPages.LISTA_TOTALI.value) {
listatotali.value = getListProductBySumQuantity()
}
}
function selectfirstavailable() {
@@ -291,18 +478,26 @@ export default defineComponent({
async function mounted() {
taborders.value = -1
taborders.value = tools.getCookie(tools.COOK_TABORD, shared_consts.OrderStat.IN_CORSO.value, true)
tabpages.value = tools.getCookie(tools.COOK_TABPAGES, shared_consts.OrderPages.LISTA_TOTALI.value, true)
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]
@@ -466,6 +661,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 {
@@ -477,6 +697,7 @@ export default defineComponent({
globalStore,
columns,
taborders,
tabpages,
arrnumstatus,
clickFunz,
getOrdersCart,
@@ -497,6 +718,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,
}
}
})

View File

@@ -38,7 +38,7 @@
</q-btn-toggle>
</div>
<div v-if="endload" class="panel">
<div v-if="endload" class="">
<div>
<q-toggle
v-if="tools.isManager()"
@@ -46,10 +46,67 @@
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-model="showWhichCode"
:options="showWhichCodeOptions"
emit-value
map-options
option-value="value"
option-label="label"
:label="t('orderscart.show_which_code')"
class="q-mx-md"
:style="'width: 200px;'"
></q-select>
</div>
<q-select
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
outlined
v-model="storeGasordine"
:options="productStore.getGasordines()"
:label="t('products.gasordine') + `:`"
emit-value
map-options
></q-select>
<q-tabs 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 v-if="tabpages === shared_consts.OrderPages.ORDINI.value">
<q-tabs v-model="taborders" inline-label class="text-blue">
<span v-for="(stat, index) of shared_consts.OrderStat" :key="index">
<q-tab
@@ -62,16 +119,6 @@
</span>
</q-tabs>
<q-select
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
outlined
v-model="storeGasordine"
:options="productStore.getGasordines()"
:label="t('products.gasordine') + `:`"
emit-value
map-options
></q-select>
<div class="q-pa-sm">
<q-table
v-if="taborders > 0"
@@ -94,30 +141,62 @@
<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>
>{{ 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>
>{{
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-for="(item, index) of props.row.items"
:key="index"
>
<div
v-if="
!!item &&
item.order &&
item.order.product &&
item.order.product.productInfo
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>
{{ item.order.product.productInfo.name }} ({{
<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>
@@ -125,16 +204,30 @@
<q-item-label
v-else-if="col.name === 'totalPrice'"
caption
>{{ props.row.totalPrice }} €</q-item-label>
>{{
getTotaleOrdineByOrdId(
props.row._id,
storeGasordine
)
}}
€</q-item-label
>
<q-item-label
v-else-if="col.name === 'totalPriceCalc'"
caption
>{{ props.row.totalPriceCalc }} €</q-item-label>
>{{ 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>
>{{
shared_consts.getStatusStr(props.row.status)
}}</q-item-label
>
<q-item-label
v-else-if="col.name === 'comandi'"
caption
>
<div
v-if="
tools.isManager() &&
@@ -152,7 +245,12 @@
color="green"
icon="fas fa-people-carry"
:label="t('ecomm.consegna')"
@click="clickFunz(props.row, shared_consts.OrderStat.DELIVERED.value)"
@click="
clickFunz(
props.row,
shared_consts.OrderStat.DELIVERED.value
)
"
></q-btn>
<q-btn-dropdown rounded dense label="Azioni">
@@ -167,7 +265,11 @@
@click="clickFunz(props.row, cmd.value)"
>
<q-item-section avatar>
<q-avatar :icon="cmd.icon" :color="cmd.color" text-color="white" />
<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>
@@ -178,21 +280,25 @@
</div>
</q-item-label>
<q-item-label v-else-if="col.name === 'apri' && props.row._id" caption>
<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}`"
@click="
idOrdersCartToShow = props.row._id;
showOrdersCart = true;
"
></q-btn>
</div>
</q-item-label>
<q-item-label v-else caption>
{{
col.value
}}
{{ col.value }}
</q-item-label>
</q-item-section>
</q-item>
@@ -203,7 +309,7 @@
<template v-else v-slot:body="props">
<q-tr :props="props">
<q-td key="ind" :props="props">
<div class="q-pa-sm">{{ index }}</div>
<div class="q-pa-sm">{{ props.row.ind + 1 }}</div>
</q-td>
<q-td key="apri" :props="props">
<div class="q-pa-sm">
@@ -214,12 +320,18 @@
dense
icon="far fa-file-alt"
:label="t('ecomm.apriordine')"
:to="`/orderscart/${props.row._id}`"
@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">
<div
v-if="tools.isManager() && props.row.user.name !== 'TOTALI'"
class="q-pa-sm"
>
<q-btn
v-if="
taborders === shared_consts.OrderStat.CONFERMATI.value
@@ -230,7 +342,12 @@
icon="fas fa-people-carry"
class="q-mx-sm"
:label="t('ecomm.consegna')"
@click="clickFunz(props.row, shared_consts.OrderStat.DELIVERED.value)"
@click="
clickFunz(
props.row,
shared_consts.OrderStat.DELIVERED.value
)
"
></q-btn>
<q-btn-dropdown rounded dense label="Azioni">
@@ -243,7 +360,11 @@
@click="clickFunz(props.row, cmd.value)"
>
<q-item-section avatar>
<q-avatar :icon="cmd.icon" :color="cmd.color" text-color="white" />
<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>
@@ -254,25 +375,28 @@
</div>
</q-td>
<q-td key="numorder" :props="props">
<span v-if="props.row.numorder">&nbsp; n. {{ props.row.numorder }}</span>
<span v-if="props.row.numorder"
>&nbsp; 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>
>{{ 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"
v-if="
taborders === shared_consts.OrderStat.COMPLETATI.value
"
>
<br />Consegnato il:
<br />
{{
tools.getstrDateTime(props.row.date_consegnato)
}}
{{ tools.getstrDateTime(props.row.date_consegnato) }}
</span>
</q-td>
<q-td key="items" :props="props">
@@ -281,76 +405,78 @@
v-if="
!!item.order &&
item.order.product &&
item.order.product.productInfo
item.order.product.productInfo &&
((mostra_solo_ordini_produttore &&
item.order.idGasordine === storeGasordine) ||
!mostra_solo_ordini_produttore)
"
>
{{ item.order.product.productInfo.name }} ({{
productStore.getQuantityByOrder($t, item.order)
{{ 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>
<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>
>{{
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)
}}
{{ 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')
}}
<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>
<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>
<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>
<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>
<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>
<span class="ordstat">{{ t('ecomm.ricevuto') }}</span>
</div>
</q-td>
</q-tr>
@@ -374,8 +500,6 @@
></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'"
@@ -439,8 +563,71 @@
<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>
@@ -448,5 +635,5 @@
</script>
<style lang="scss" scoped>
@import "./orderInfo";
@import './orderInfo';
</style>