Aggiornamento PiuChebuono: lista Totali del Produttore.
@@ -1,17 +1,18 @@
|
|||||||
APP_VERSION="1.1.22"
|
APP_VERSION="1.1.22"
|
||||||
SERVICE_WORKER_FILE="service-worker.js"
|
SERVICE_WORKER_FILE="service-worker.js"
|
||||||
APP_ID="13"
|
APP_ID="17"
|
||||||
DIRECTORY_LOCAL="newfreeplanet"
|
DIRECTORY_LOCAL="newfreeplanet"
|
||||||
DIRECTORY_SERVER="freeplanet_serverside"
|
DIRECTORY_SERVER="freeplanet_serverside"
|
||||||
SERVERDIR_WEBSITE=""
|
SERVERDIR_WEBSITE=""
|
||||||
SERVERPW_WEBSITE=""
|
SERVERPW_WEBSITE=""
|
||||||
APP_URL="https://localhost"
|
APP_URL="https://localhost"
|
||||||
URL_FACEBOOK="https://www.facebook.com/freeplanetapp"
|
URL_FACEBOOK="https://www.facebook.com/freeplanetapp"
|
||||||
|
PROVA_PAOLO="PROVA ENV FUNZIONA!"
|
||||||
LANG_DEFAULT="it"
|
LANG_DEFAULT="it"
|
||||||
PAO_APP_ID="KKPPAA5KJK435J3KSS9F9D8S9F8SD98F9SDF"
|
PAO_APP_ID="KKPPAA5KJK435J3KSS9F9D8S9F8SD98F9SDF"
|
||||||
MASTER_KEY="KKPPSS5KJK435J3KSS9F9D8S9F8SD3CR3T"
|
MASTER_KEY="KKPPSS5KJK435J3KSS9F9D8S9F8SD3CR3T"
|
||||||
MONGODB_HOST="https://localhost:3000"
|
MONGODB_HOST="https://localhost:3000"
|
||||||
LOGO_REG='riso-logo-full.png'
|
LOGO_REG='piuchebuono-logo-full.png'
|
||||||
TEST_NAME="Paolo"
|
TEST_NAME="Paolo"
|
||||||
TEST_SURNAME="Arena"
|
TEST_SURNAME="Arena"
|
||||||
TEST_EMAIL=""
|
TEST_EMAIL=""
|
||||||
@@ -24,5 +25,5 @@ DEBUG="1"
|
|||||||
TELEGRAM_SUPPORT=""
|
TELEGRAM_SUPPORT=""
|
||||||
PROJECT_ID_MAIN="5cc0a13fe5c9d156728f400a"
|
PROJECT_ID_MAIN="5cc0a13fe5c9d156728f400a"
|
||||||
TEST_CELL=""
|
TEST_CELL=""
|
||||||
VUE_APP_ISTEST="1"
|
VUE_APP_ISTEST=1
|
||||||
VUE_APP_INLOCALE="1"
|
VUE_APP_INLOCALE=1
|
||||||
|
|||||||
2
now.txt
@@ -1 +1 @@
|
|||||||
TERMINA DI LAVORARE SU gruppomacro.app: (Sovrascrivo !)
|
TERMINA DI LAVORARE SU riso.app: (Sovrascrivo !)
|
||||||
|
|||||||
11
package.json
@@ -1,15 +1,15 @@
|
|||||||
{
|
{
|
||||||
"name": "riso",
|
"name": "piuchebuono",
|
||||||
"version": "1.1.22",
|
"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.",
|
"description": "PiuCheBuono",
|
||||||
"productName": "Riso",
|
"productName": "PiuCheBuono",
|
||||||
"author": "Surya",
|
"author": "Surya",
|
||||||
"private": true,
|
"private": true,
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "quasar dev",
|
"dev": "quasar dev",
|
||||||
"build": "NODE_ENV=production quasar build",
|
"build": "quasar build",
|
||||||
"buildpwa": "NODE_ENV=production quasar build -m pwa",
|
"buildpwa": "NODE_ENV=production quasar build -m pwa",
|
||||||
"buildpwatest": "NODE_ENV=test quasar build -m pwa",
|
"buildpwatest": "NODE_ENV=test quasar build -m pwa",
|
||||||
"buildspa": "NODE_ENV=production quasar build -m spa",
|
"buildspa": "NODE_ENV=production quasar build -m spa",
|
||||||
@@ -127,7 +127,6 @@
|
|||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"json-loader": "^0.5.7",
|
"json-loader": "^0.5.7",
|
||||||
"node-sass": "^9.0.0",
|
"node-sass": "^9.0.0",
|
||||||
"nodemon": "^3.1.7",
|
|
||||||
"npm-check-updates": "^17.1.3",
|
"npm-check-updates": "^17.1.3",
|
||||||
"optimize-css-assets-webpack-plugin": "^6.0.1",
|
"optimize-css-assets-webpack-plugin": "^6.0.1",
|
||||||
"parcel": "^2.12.0",
|
"parcel": "^2.12.0",
|
||||||
@@ -165,4 +164,4 @@
|
|||||||
"npm": ">= 6.14.8",
|
"npm": ">= 6.14.8",
|
||||||
"yarn": ">= 1.21.1"
|
"yarn": ">= 1.21.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 66 KiB |
BIN
public/images/arcadei/borgovivo.png
Normal file
|
After Width: | Height: | Size: 43 KiB |
BIN
public/images/arcadei/boscovivo.png
Normal file
|
After Width: | Height: | Size: 40 KiB |
BIN
public/images/arcadei/img1.png
Normal file
|
After Width: | Height: | Size: 90 KiB |
BIN
public/images/arcadei/ortovivo-gsa.png
Normal file
|
After Width: | Height: | Size: 63 KiB |
BIN
public/images/arcadei/pandeldia.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
public/images/arcadei/prospera.png
Normal file
|
After Width: | Height: | Size: 74 KiB |
BIN
public/images/arcadei/saluteviva.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
public/images/arcadei/scuolaviva.png
Normal file
|
After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 862 B |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 90 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 110 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 32 KiB |
BIN
public/images/pcb-android-icon-144x144.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
public/images/pcb-android-icon-192x192.png
Normal file
|
After Width: | Height: | Size: 63 KiB |
BIN
public/images/pcb-android-icon-36x36.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
public/images/pcb-android-icon-48x48.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
public/images/pcb-android-icon-72x72.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
public/images/pcb-android-icon-96x96.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
public/images/pcb-apple-icon-114x114.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
public/images/pcb-apple-icon-120x120.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
public/images/pcb-apple-icon-144x144.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
public/images/pcb-apple-icon-152x152.png
Normal file
|
After Width: | Height: | Size: 39 KiB |
BIN
public/images/pcb-apple-icon-180x180.png
Normal file
|
After Width: | Height: | Size: 53 KiB |
BIN
public/images/pcb-apple-icon-57x57.png
Normal file
|
After Width: | Height: | Size: 7.1 KiB |
BIN
public/images/pcb-apple-icon-60x60.png
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
BIN
public/images/pcb-apple-icon-72x72.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
public/images/pcb-apple-icon-76x76.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
public/images/pcb-apple-icon.png
Normal file
|
After Width: | Height: | Size: 63 KiB |
BIN
public/images/piuchebuono-logo-full.png
Normal file
|
After Width: | Height: | Size: 163 KiB |
BIN
public/images/piuchebuono.jpg
Normal file
|
After Width: | Height: | Size: 142 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 138 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 185 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 424 KiB |
|
Before Width: | Height: | Size: 279 KiB |
|
Before Width: | Height: | Size: 124 KiB |
BIN
public/images/sito_in_manutenzione.jpg
Normal file
|
After Width: | Height: | Size: 139 KiB |
@@ -152,9 +152,9 @@ module.exports = configure((ctx) => ({
|
|||||||
},
|
},
|
||||||
devServer: {
|
devServer: {
|
||||||
https: false,
|
https: false,
|
||||||
port: 8084,
|
port: 8088,
|
||||||
open: false, // opens browser window automatically
|
open: false, // opens browser window automatically
|
||||||
hot: false, // Disable hot module replacement
|
hot: true, // Disable hot module replacement
|
||||||
headers: {
|
headers: {
|
||||||
'Access-Control-Allow-Origin': '*',
|
'Access-Control-Allow-Origin': '*',
|
||||||
'Access-Control-Allow-Headers': '*',
|
'Access-Control-Allow-Headers': '*',
|
||||||
@@ -313,9 +313,9 @@ module.exports = configure((ctx) => ({
|
|||||||
},
|
},
|
||||||
|
|
||||||
manifest: {
|
manifest: {
|
||||||
name: 'Riso',
|
name: 'Più che Buono',
|
||||||
short_name: 'Riso',
|
short_name: 'PiuCheBuono',
|
||||||
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.',
|
description: 'PiuCheBuono è un GAS e Bottega',
|
||||||
display: 'standalone',
|
display: 'standalone',
|
||||||
orientation: 'portrait',
|
orientation: 'portrait',
|
||||||
background_color: '#fff',
|
background_color: '#fff',
|
||||||
@@ -325,54 +325,54 @@ module.exports = configure((ctx) => ({
|
|||||||
start_url: "/?homescreen=1",
|
start_url: "/?homescreen=1",
|
||||||
icons: [
|
icons: [
|
||||||
{
|
{
|
||||||
src: 'images/riso-android-icon-512x512.png',
|
src: 'images/pcb-android-icon-512x512.png',
|
||||||
sizes: '512x512',
|
sizes: '512x512',
|
||||||
type: 'image/png',
|
type: 'image/png',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
src: 'images/riso-android-icon-384x384.png',
|
src: 'images/pcb-android-icon-384x384.png',
|
||||||
sizes: '384x384',
|
sizes: '384x384',
|
||||||
type: 'image/png',
|
type: 'image/png',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
src: 'images/riso-android-icon-192x192.png',
|
src: 'images/pcb-android-icon-192x192.png',
|
||||||
sizes: '192x192',
|
sizes: '192x192',
|
||||||
type: 'image/png',
|
type: 'image/png',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
src: 'images/riso-android-icon-144x144.png',
|
src: 'images/pcb-android-icon-144x144.png',
|
||||||
sizes: '144x144',
|
sizes: '144x144',
|
||||||
type: 'image/png',
|
type: 'image/png',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
src: 'images/riso-android-icon-96x96.png',
|
src: 'images/pcb-android-icon-96x96.png',
|
||||||
sizes: '96x96',
|
sizes: '96x96',
|
||||||
type: 'image/png',
|
type: 'image/png',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
src: 'images/riso-apple-icon-120x120.png',
|
src: 'images/pcb-apple-icon-120x120.png',
|
||||||
sizes: '120x120',
|
sizes: '120x120',
|
||||||
type: 'image/png',
|
type: 'image/png',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
src: 'images/riso-apple-icon-144x144.png',
|
src: 'images/pcb-apple-icon-144x144.png',
|
||||||
sizes: '144x144',
|
sizes: '144x144',
|
||||||
type: 'image/png',
|
type: 'image/png',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
src: 'images/riso-apple-icon-152x152.png',
|
src: 'images/pcb-apple-icon-152x152.png',
|
||||||
sizes: '152x152',
|
sizes: '152x152',
|
||||||
type: 'image/png',
|
type: 'image/png',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
src: 'images/riso-apple-icon-180x180.png',
|
src: 'images/pcb-apple-icon-180x180.png',
|
||||||
sizes: '180x180',
|
sizes: '180x180',
|
||||||
type: 'image/png',
|
type: 'image/png',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
related_applications: [{
|
related_applications: [{
|
||||||
"platform": "webapp",
|
"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: {
|
builder: {
|
||||||
// https://www.electron.build/configuration/configuration
|
// https://www.electron.build/configuration/configuration
|
||||||
|
|
||||||
appId: 'Riso',
|
appId: 'PiuCheBuono',
|
||||||
},
|
},
|
||||||
|
|
||||||
// "chain" is a webpack-chain object https://github.com/neutrinojs/webpack-chain
|
// "chain" is a webpack-chain object https://github.com/neutrinojs/webpack-chain
|
||||||
|
|||||||
@@ -343,7 +343,7 @@ export const shared_consts = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Dentro ad un Circuito RIS',
|
label: 'Dentro ad un Circuito RIS',
|
||||||
value: 134217728, //FILTER_USER_CON_CIRCUITO:
|
value: 134217728, //FILTER_USER_CON_CIRCUITO:
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Senza Circuito RIS',
|
label: 'Senza Circuito RIS',
|
||||||
@@ -351,7 +351,7 @@ export const shared_consts = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Con Provincia inserita',
|
label: 'Con Provincia inserita',
|
||||||
value: 16777216, //FILTER_USER_PROVINCE:
|
value: 16777216, //FILTER_USER_PROVINCE:
|
||||||
},
|
},
|
||||||
|
|
||||||
],
|
],
|
||||||
@@ -359,7 +359,7 @@ export const shared_consts = {
|
|||||||
RECFILTRI_UTENTE_FACIL: [
|
RECFILTRI_UTENTE_FACIL: [
|
||||||
{
|
{
|
||||||
label: 'Facilitatore RISO',
|
label: 'Facilitatore RISO',
|
||||||
value: 4294967296, //FILTER_FACILITATORE: ,:
|
value: 4294967296, //FILTER_FACILITATORE: ,:
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Non ancora approvati dall\'invitante',
|
label: 'Non ancora approvati dall\'invitante',
|
||||||
@@ -1246,6 +1246,12 @@ export const shared_consts = {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
|
ShowCode: {
|
||||||
|
ALL: 1,
|
||||||
|
CODE: 2,
|
||||||
|
INTERNAL_CODE: 3,
|
||||||
|
},
|
||||||
|
|
||||||
OrderStatus: {
|
OrderStatus: {
|
||||||
NONE: 0,
|
NONE: 0,
|
||||||
IN_CART: 1,
|
IN_CART: 1,
|
||||||
@@ -1261,6 +1267,11 @@ export const shared_consts = {
|
|||||||
DELETE_REALLY: 20,
|
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: {
|
OrderStat: {
|
||||||
// IN_CART: { label: 'In Carrello', value: 1 }, //IN_CART
|
// 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
|
IN_CORSO: { label: 'In Corso', value: 2, icon: 'fas fa-tasks', color: 'text-black' }, //CHECKOUT_SENT
|
||||||
@@ -2360,7 +2371,7 @@ export const shared_consts = {
|
|||||||
AUDIOLIBRO: 22,
|
AUDIOLIBRO: 22,
|
||||||
VIDEO: 23,
|
VIDEO: 23,
|
||||||
CARTE: 25,
|
CARTE: 25,
|
||||||
// -----------
|
// -----------
|
||||||
NUOVO: 101,
|
NUOVO: 101,
|
||||||
USATO: 102,
|
USATO: 102,
|
||||||
DOWNLOAD: 103,
|
DOWNLOAD: 103,
|
||||||
|
|||||||
0
src/components/CMyDialog/CMyDialog.scss
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 '@/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,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
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
@@ -0,0 +1 @@
|
|||||||
|
export {default as CMyDialog} from './CMyDialog.vue'
|
||||||
@@ -8,6 +8,8 @@ const msg_website_enUs = {
|
|||||||
products: {
|
products: {
|
||||||
quantity: 'Quantità',
|
quantity: 'Quantità',
|
||||||
quantityAvailable: 'Disponibili',
|
quantityAvailable: 'Disponibili',
|
||||||
|
stockQty: 'In Magazzino',
|
||||||
|
stockBloccatiQty: 'Bloccati In Magazzino',
|
||||||
weight: 'Peso',
|
weight: 'Peso',
|
||||||
stars: 'Voto',
|
stars: 'Voto',
|
||||||
color: 'Colore',
|
color: 'Colore',
|
||||||
@@ -36,6 +38,7 @@ const msg_website_enUs = {
|
|||||||
productslist: 'Lista Prodotti',
|
productslist: 'Lista Prodotti',
|
||||||
collabora: 'Collabora',
|
collabora: 'Collabora',
|
||||||
storehouses: 'Magazzino',
|
storehouses: 'Magazzino',
|
||||||
|
providers: 'Fornitori',
|
||||||
departments: 'Uffici',
|
departments: 'Uffici',
|
||||||
orders: 'Ordini Ricevuti',
|
orders: 'Ordini Ricevuti',
|
||||||
orders2: 'Ordini Ricevuti',
|
orders2: 'Ordini Ricevuti',
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ const msg_website_es = {
|
|||||||
products: {
|
products: {
|
||||||
quantity: 'Quantità',
|
quantity: 'Quantità',
|
||||||
quantityAvailable: 'Disponibili',
|
quantityAvailable: 'Disponibili',
|
||||||
|
stockQty: 'In Magazzino',
|
||||||
weight: 'Peso',
|
weight: 'Peso',
|
||||||
stars: 'Voto',
|
stars: 'Voto',
|
||||||
color: 'Colore',
|
color: 'Colore',
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
const msg_website_it = {
|
const msg_website_it = {
|
||||||
ws: {
|
ws: {
|
||||||
sitename: 'Riso',
|
sitename: 'Più che Buono',
|
||||||
siteshortname: 'RISO',
|
siteshortname: 'Più che Buono',
|
||||||
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.',
|
description: '',
|
||||||
keywords: 'riso, piattaforma di scambio, rete italiana scambio orizzontale, riso app, riso piattaforma, scambio e baratto, momenta RIS',
|
keywords: '',
|
||||||
},
|
},
|
||||||
hours: {
|
hours: {
|
||||||
descr: 'Descrizione',
|
descr: 'Descrizione',
|
||||||
@@ -16,23 +16,35 @@ const msg_website_it = {
|
|||||||
pages: {
|
pages: {
|
||||||
home: 'Home',
|
home: 'Home',
|
||||||
profile: 'Profilo',
|
profile: 'Profilo',
|
||||||
|
install_site: 'Installa Sito',
|
||||||
profile2: 'ProfiloU',
|
profile2: 'ProfiloU',
|
||||||
mypage2: 'mypage2',
|
mypage2: 'mypage2',
|
||||||
myservice2: 'myservice2',
|
myservice2: 'myservice2',
|
||||||
myhosps2: 'myhosps2',
|
myhosps2: 'myhosps2',
|
||||||
mygood2: 'mygood2',
|
mygood2: 'mygood2',
|
||||||
|
catalogo: 'Catalogo',
|
||||||
fundraising: 'Sostieni il Progetto',
|
fundraising: 'Sostieni il Progetto',
|
||||||
notifs: 'Configura le Notifiche',
|
notifs: 'Configura le Notifiche',
|
||||||
unsubscribe: 'Disiscriviti',
|
unsubscribe: 'Disiscriviti',
|
||||||
|
unsubscribe_user: 'Disiscriviti User',
|
||||||
test: 'Test',
|
test: 'Test',
|
||||||
projects: 'Progetti',
|
projects: 'Progetti',
|
||||||
report: 'Report Ore',
|
report: 'Report Ore',
|
||||||
producer: 'Produttore',
|
producer: 'Produttore',
|
||||||
orderinfo: 'Ordini Effettuati',
|
orderinfo: 'Ordini Effettuati',
|
||||||
products: 'Prodotti',
|
products: 'Prodotti',
|
||||||
|
cash: 'Cassa',
|
||||||
|
productInfos: 'Info Prodotti',
|
||||||
|
listinoprodotti: 'Listino Prodotti',
|
||||||
productslist: 'Lista Prodotti',
|
productslist: 'Lista Prodotti',
|
||||||
collabora: 'Collabora',
|
collabora: 'Collabora',
|
||||||
|
categories: 'Categorie',
|
||||||
storehouses: 'Magazzino',
|
storehouses: 'Magazzino',
|
||||||
|
providers: 'Fornitori',
|
||||||
|
catprods: 'Categorie',
|
||||||
|
subcatprods: 'Sotto-Categorie',
|
||||||
|
gasordine: 'Gas Ordine',
|
||||||
|
scontisticas: 'Scontistica',
|
||||||
departments: 'Uffici',
|
departments: 'Uffici',
|
||||||
orders: 'Ordini Ricevuti',
|
orders: 'Ordini Ricevuti',
|
||||||
orders2: 'Ordini Ricevuti',
|
orders2: 'Ordini Ricevuti',
|
||||||
@@ -121,15 +133,11 @@ const msg_website_it = {
|
|||||||
only_residenti: 'Solo Residenti',
|
only_residenti: 'Solo Residenti',
|
||||||
only_consiglio: 'Solo Consiglieri',
|
only_consiglio: 'Solo Consiglieri',
|
||||||
color: 'Colore',
|
color: 'Colore',
|
||||||
mainMenu: 'Menu Principale',
|
gasordini: 'Gas Ordini',
|
||||||
subtitle: 'Sottotitolo',
|
gestoreordini: 'Gestore Ordini',
|
||||||
lang: 'Lingua',
|
|
||||||
keywords: 'Parole Chiave',
|
|
||||||
desctiption: 'Descrizione',
|
|
||||||
heightimg: 'Altezza Immagine',
|
|
||||||
},
|
},
|
||||||
msg: {
|
msg: {
|
||||||
myAppName: 'Riso',
|
myAppName: 'Più che Buono',
|
||||||
myAppDescription: 'Il primo Vero Social Libero, Equo e Solidale, dove Vive Consapevolezza e Aiuto Comunitario. Gratuito',
|
myAppDescription: 'Il primo Vero Social Libero, Equo e Solidale, dove Vive Consapevolezza e Aiuto Comunitario. Gratuito',
|
||||||
underconstruction: 'App in costruzione...',
|
underconstruction: 'App in costruzione...',
|
||||||
myDescriz: '',
|
myDescriz: '',
|
||||||
|
|||||||
@@ -7,30 +7,6 @@ import {
|
|||||||
import { func } from '@store/Modules/fieldsTable'
|
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 = {
|
const firstPage = {
|
||||||
active: true,
|
active: true,
|
||||||
order: 5,
|
order: 5,
|
||||||
@@ -64,76 +40,12 @@ function getDynamicPages(site: ISites): IListRoutes[] {
|
|||||||
materialIcon: 'fas fa-test',
|
materialIcon: 'fas fa-test',
|
||||||
name: 'mypages.test',
|
name: 'mypages.test',
|
||||||
component: () => import('@/views/testServer/testServer.vue'),
|
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 },
|
meta: { requiresAuth: true },
|
||||||
inmenu: false,
|
inmenu: false,
|
||||||
infooter: 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,
|
active: true,
|
||||||
order: 20,
|
order: 20,
|
||||||
path: '/events',
|
path: '/events',
|
||||||
@@ -143,6 +55,17 @@ function getDynamicPages(site: ISites): IListRoutes[] {
|
|||||||
meta: { requiresAuth: true },
|
meta: { requiresAuth: true },
|
||||||
inmenu: true,
|
inmenu: true,
|
||||||
infooter: 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,
|
active: true,
|
||||||
@@ -155,17 +78,6 @@ function getDynamicPages(site: ISites): IListRoutes[] {
|
|||||||
inmenu: false,
|
inmenu: false,
|
||||||
infooter: 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,
|
active: true,
|
||||||
order: 120,
|
order: 120,
|
||||||
@@ -178,7 +90,7 @@ function getDynamicPages(site: ISites): IListRoutes[] {
|
|||||||
infooter: false,
|
infooter: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
active: true,
|
active: site.confpages && site.confpages.showiscrittiMenu,
|
||||||
order: 130,
|
order: 130,
|
||||||
path: '/friends',
|
path: '/friends',
|
||||||
materialIcon: 'fas fa-user-friends',
|
materialIcon: 'fas fa-user-friends',
|
||||||
@@ -188,6 +100,19 @@ function getDynamicPages(site: ISites): IListRoutes[] {
|
|||||||
inmenu: true,
|
inmenu: true,
|
||||||
infooter: 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,
|
active: site.confpages && site.confpages.enableGroups,
|
||||||
order: 132,
|
order: 132,
|
||||||
@@ -198,6 +123,8 @@ function getDynamicPages(site: ISites): IListRoutes[] {
|
|||||||
meta: { requiresAuth: true },
|
meta: { requiresAuth: true },
|
||||||
inmenu: true,
|
inmenu: true,
|
||||||
infooter: false,
|
infooter: false,
|
||||||
|
onlyAdmin: true,
|
||||||
|
onlyManager: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
active: true,
|
active: true,
|
||||||
@@ -276,7 +203,7 @@ function getDynamicPages(site: ISites): IListRoutes[] {
|
|||||||
{
|
{
|
||||||
active: true,
|
active: true,
|
||||||
order: 150,
|
order: 150,
|
||||||
path: '/sostieniilprogetto',
|
path: '/fundraising',
|
||||||
materialIcon: 'fas fa-hand-holding-heart',
|
materialIcon: 'fas fa-hand-holding-heart',
|
||||||
name: 'pages.fundraising',
|
name: 'pages.fundraising',
|
||||||
component: () => import('@src/root/fundraising/fundraising.vue'),
|
component: () => import('@src/root/fundraising/fundraising.vue'),
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { IUserFields, IUserShort } from './UserStore'
|
|||||||
export interface IProductInfo {
|
export interface IProductInfo {
|
||||||
_id?: any
|
_id?: any
|
||||||
code?: string
|
code?: string
|
||||||
|
codice?: string
|
||||||
id_wp?: string
|
id_wp?: string
|
||||||
sku?: string
|
sku?: string
|
||||||
name?: string
|
name?: string
|
||||||
@@ -41,11 +42,11 @@ export interface IProductInfo {
|
|||||||
ListaArgomenti?: string
|
ListaArgomenti?: string
|
||||||
publisher?: IPublisher
|
publisher?: IPublisher
|
||||||
date_pub?: Date
|
date_pub?: Date
|
||||||
date_pub_ts: number
|
date_pub_ts?: number
|
||||||
pagine?: number
|
pagine?: number
|
||||||
productTypes?: number[]
|
productTypes?: number[]
|
||||||
versioneGM?: string
|
versioneGM?: string
|
||||||
short_descr: string
|
short_descr?: string
|
||||||
|
|
||||||
totVen?: number,
|
totVen?: number,
|
||||||
totFat?: number,
|
totFat?: number,
|
||||||
@@ -69,7 +70,7 @@ export interface IVariazione {
|
|||||||
_id?: string
|
_id?: string
|
||||||
active?: boolean
|
active?: boolean
|
||||||
versione?: number
|
versione?: number
|
||||||
status?: string,
|
status?: string,
|
||||||
price?: number
|
price?: number
|
||||||
sale_price?: number
|
sale_price?: number
|
||||||
quantita?: number
|
quantita?: number
|
||||||
@@ -122,7 +123,7 @@ export interface IProduct {
|
|||||||
QuantitaPrenotateInAttesa?: number,
|
QuantitaPrenotateInAttesa?: number,
|
||||||
note?: string
|
note?: string
|
||||||
arrvariazioni?: IVariazione[]
|
arrvariazioni?: IVariazione[]
|
||||||
|
|
||||||
stockQty: number, // UPDATING
|
stockQty: number, // UPDATING
|
||||||
stockBloccatiQty: number, // UPDATING
|
stockBloccatiQty: number, // UPDATING
|
||||||
bookedQtyOrdered: number // UPDATING
|
bookedQtyOrdered: number // UPDATING
|
||||||
@@ -342,6 +343,20 @@ export interface ICart {
|
|||||||
modify_at?: Date
|
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 {
|
export interface IOrderCart {
|
||||||
_id?: any
|
_id?: any
|
||||||
idapp?: string
|
idapp?: string
|
||||||
|
|||||||
@@ -1871,7 +1871,7 @@ const msg_it = {
|
|||||||
btn_ordini: 'I tuoi Ordini',
|
btn_ordini: 'I tuoi Ordini',
|
||||||
available: 'Disponib.',
|
available: 'Disponib.',
|
||||||
preorders: 'Quantità Massima Pre-Ordinabili',
|
preorders: 'Quantità Massima Pre-Ordinabili',
|
||||||
preord: 'Pre-Ordinate',
|
preord: 'Ordinate',
|
||||||
di_cui_x_in_carrello: '(nel tuo carrello: {qty})',
|
di_cui_x_in_carrello: '(nel tuo carrello: {qty})',
|
||||||
confermato: 'Ordine Confermato',
|
confermato: 'Ordine Confermato',
|
||||||
consegnato: 'Ordine Consegnato',
|
consegnato: 'Ordine Consegnato',
|
||||||
@@ -1929,6 +1929,7 @@ const msg_it = {
|
|||||||
tutti: 'Tutti',
|
tutti: 'Tutti',
|
||||||
},
|
},
|
||||||
orderscart: {
|
orderscart: {
|
||||||
|
show_which_code: 'Mostra Codice',
|
||||||
numorder: 'Ordine',
|
numorder: 'Ordine',
|
||||||
totalQty: 'totalQty',
|
totalQty: 'totalQty',
|
||||||
totalQtyPreordered: 'totalQty PreOrd',
|
totalQtyPreordered: 'totalQty PreOrd',
|
||||||
@@ -1943,6 +1944,9 @@ const msg_it = {
|
|||||||
TotalPriceProduct: 'Prezzo Totale',
|
TotalPriceProduct: 'Prezzo Totale',
|
||||||
order_confirm: 'Conferma Ordini (aggiorna Qta magazzino)',
|
order_confirm: 'Conferma Ordini (aggiorna Qta magazzino)',
|
||||||
check_invia_email: 'Abilita l\'Invio delle email (📩)',
|
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: {
|
cash: {
|
||||||
creatorUserId: 'Creatore',
|
creatorUserId: 'Creatore',
|
||||||
|
|||||||
@@ -59,6 +59,8 @@ import { PayloadMessageTypes } from '@/common'
|
|||||||
import { useNotifStore } from '@store/NotifStore'
|
import { useNotifStore } from '@store/NotifStore'
|
||||||
import { isDimensionToken } from 'html2canvas/dist/types/css/syntax/parser'
|
import { isDimensionToken } from 'html2canvas/dist/types/css/syntax/parser'
|
||||||
|
|
||||||
|
const { t } = useI18n()
|
||||||
|
|
||||||
export interface INotify {
|
export interface INotify {
|
||||||
color?: string
|
color?: string
|
||||||
textColor?: string
|
textColor?: string
|
||||||
@@ -80,6 +82,12 @@ export const tools = {
|
|||||||
COOK_SEARCH: 'SEARCH_',
|
COOK_SEARCH: 'SEARCH_',
|
||||||
COOK_SELCART: 'SELCART_',
|
COOK_SELCART: 'SELCART_',
|
||||||
COOK_SELGAS: 'SELGAS',
|
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_TAB_CIRCUIT: 'TAB_CIRC',
|
||||||
COOK_COSA_PRODOTTI: 'PROD_N',
|
COOK_COSA_PRODOTTI: 'PROD_N',
|
||||||
COOK_MAP_CENTER_LAT: 'MAP_LAT',
|
COOK_MAP_CENTER_LAT: 'MAP_LAT',
|
||||||
|
|||||||
@@ -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 { Api } from '@api'
|
||||||
import { serv_constants } from '@src/store/Modules/serv_constants'
|
import { serv_constants } from '@src/store/Modules/serv_constants'
|
||||||
@@ -162,6 +162,42 @@ export const useProducts = defineStore('Products', {
|
|||||||
return mystr
|
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 => {
|
getCatProdDescrStrByIdCatProd: (state: IProductsState) => (idCatProd: string): string => {
|
||||||
const myfirstcat = state.catprods.find((rec: ICatProd) => rec._id === idCatProd)
|
const myfirstcat = state.catprods.find((rec: ICatProd) => rec._id === idCatProd)
|
||||||
|
|
||||||
@@ -179,6 +215,7 @@ export const useProducts = defineStore('Products', {
|
|||||||
return 0
|
return 0
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
getSubCatProdsByGas: (state: IProductsState) => (idGasOrdine: string, idCatProd: string): ISubCatProd[] => {
|
getSubCatProdsByGas: (state: IProductsState) => (idGasOrdine: string, idCatProd: string): ISubCatProd[] => {
|
||||||
let arrcat = state.subcatprods
|
let arrcat = state.subcatprods
|
||||||
|
|
||||||
@@ -473,7 +510,7 @@ export const useProducts = defineStore('Products', {
|
|||||||
TotalPriceProduct: 0,
|
TotalPriceProduct: 0,
|
||||||
TotalPriceProductCalc: 0,
|
TotalPriceProductCalc: 0,
|
||||||
idProduct: product._id,
|
idProduct: product._id,
|
||||||
product, // Copia tutto l'oggetto Product !
|
product, // Copia tutto l'oggetto Product !
|
||||||
|
|
||||||
// Ordine:
|
// Ordine:
|
||||||
price: product.price,
|
price: product.price,
|
||||||
@@ -820,7 +857,7 @@ export const useProducts = defineStore('Products', {
|
|||||||
try {
|
try {
|
||||||
order.idStorehouse = globalStore.storehouses?.length ? globalStore.storehouses[0]._id : ''
|
order.idStorehouse = globalStore.storehouses?.length ? globalStore.storehouses[0]._id : ''
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1048,7 +1085,7 @@ export const useProducts = defineStore('Products', {
|
|||||||
mystr += ' + '
|
mystr += ' + '
|
||||||
}
|
}
|
||||||
if (order.quantitypreordered > 0) {
|
if (order.quantitypreordered > 0) {
|
||||||
mystr += ' ' + order.quantitypreordered + ' ' + $t('ecomm.preord');
|
mystr += ' ' + order.quantitypreordered + ' ';
|
||||||
}
|
}
|
||||||
return mystr
|
return mystr
|
||||||
},
|
},
|
||||||
@@ -1248,6 +1285,14 @@ export const useProducts = defineStore('Products', {
|
|||||||
return mystr
|
return mystr
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getGasordineNameById(idGasordine: string) {
|
||||||
|
|
||||||
|
const globalStore = useGlobalStore()
|
||||||
|
const rec = globalStore.gasordines.find((gasordine: IGasordine) => gasordine._id === idGasordine)
|
||||||
|
return rec ? rec.name : ''
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
getGasordines() {
|
getGasordines() {
|
||||||
const globalStore = useGlobalStore()
|
const globalStore = useGlobalStore()
|
||||||
|
|
||||||
@@ -1257,16 +1302,22 @@ export const useProducts = defineStore('Products', {
|
|||||||
value: ''
|
value: ''
|
||||||
}]
|
}]
|
||||||
let ind = 1
|
let ind = 1
|
||||||
globalStore.gasordines.forEach((gasordine: IGasordine) => {
|
if (globalStore.gasordines) {
|
||||||
myarr.push(
|
globalStore.gasordines.forEach((gasordine: IGasordine) => {
|
||||||
{
|
if (gasordine) {
|
||||||
id: ind,
|
myarr.push(
|
||||||
label: gasordine.name,
|
{
|
||||||
value: gasordine._id
|
id: ind,
|
||||||
})
|
label: gasordine.name
|
||||||
|
+ (gasordine.dataora_chiusura_ordini ? (' - chiusura: ' + tools.getstrDateShort(gasordine.dataora_chiusura_ordini)) : '')
|
||||||
ind++
|
+ (gasordine.dataora_ritiro ? (' - consegna ' + tools.getstrDateShort(gasordine.dataora_ritiro)) : '')
|
||||||
})
|
,
|
||||||
|
value: gasordine._id
|
||||||
|
})
|
||||||
|
ind++
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
return myarr
|
return myarr
|
||||||
},
|
},
|
||||||
@@ -1378,7 +1429,7 @@ export const useProducts = defineStore('Products', {
|
|||||||
const descr_categoria = myproduct.productInfo.catprods && myproduct.productInfo.catprods.length > 0 ? this.getCatProdDescrStrByIdCatProd(myproduct.productInfo.catprods![0].name) : ''
|
const descr_categoria = myproduct.productInfo.catprods && myproduct.productInfo.catprods.length > 0 ? this.getCatProdDescrStrByIdCatProd(myproduct.productInfo.catprods![0].name) : ''
|
||||||
const misure = myproduct.arrvariazioni![0].misure || ''
|
const misure = myproduct.arrvariazioni![0].misure || ''
|
||||||
const formato = myproduct.arrvariazioni![0].formato || ''
|
const formato = myproduct.arrvariazioni![0].formato || ''
|
||||||
const pagine = myproduct.arrvariazioni![0].pagine || ''
|
const pagine = myproduct.arrvariazioni![0].pagine || ''
|
||||||
|
|
||||||
const scale = optcatalogo.printable ? optcatalogo.areadistampa?.scale : 1
|
const scale = optcatalogo.printable ? optcatalogo.areadistampa?.scale : 1
|
||||||
// Crea una mappa di sostituzioni
|
// Crea una mappa di sostituzioni
|
||||||
@@ -1418,6 +1469,54 @@ export const useProducts = defineStore('Products', {
|
|||||||
return result.trim()
|
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());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { useGlobalStore } from '@store/globalStore'
|
|||||||
import { useProducts } from '@store/Products'
|
import { useProducts } from '@store/Products'
|
||||||
import { useI18n } from '@/boot/i18n'
|
import { useI18n } from '@/boot/i18n'
|
||||||
import { toolsext } from '@store/Modules/toolsext'
|
import { toolsext } from '@store/Modules/toolsext'
|
||||||
import { useQuasar } from 'quasar'
|
import { useQuasar, exportFile } from 'quasar'
|
||||||
import { costanti } from '@costanti'
|
import { costanti } from '@costanti'
|
||||||
import { shared_consts } from '@src/common/shared_vuejs'
|
import { shared_consts } from '@src/common/shared_vuejs'
|
||||||
// import MixinBase from '@src/mixins/mixin-base'
|
// 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 { fieldsTable } from '@store/Modules/fieldsTable'
|
||||||
|
|
||||||
import { CSingleCart } from '../../../components/CSingleCart'
|
import { CSingleCart } from '../../../components/CSingleCart'
|
||||||
|
import { CMyDialog } from '../../../components/CMyDialog'
|
||||||
|
import { COrdersCart } from '../../../components/COrdersCart'
|
||||||
import { CTitleBanner, CMyFieldDb } from '@components'
|
import { CTitleBanner, CMyFieldDb } from '@components'
|
||||||
import { ICart, IOrder, IOrderCart } from '@src/model'
|
import { ICart, IOrder, IOrderCart, ISingleProductOrdered } from '@src/model'
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'OrderInfo',
|
name: 'OrderInfo',
|
||||||
components: { CSingleCart, CTitleBanner, CMyFieldDb },
|
components: { CSingleCart, CTitleBanner, CMyFieldDb, COrdersCart, CMyDialog },
|
||||||
props: {},
|
props: {},
|
||||||
setup() {
|
setup() {
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
@@ -35,18 +37,48 @@ export default defineComponent({
|
|||||||
const templemail = ref('')
|
const templemail = ref('')
|
||||||
|
|
||||||
const cosa = ref(0)
|
const cosa = ref(0)
|
||||||
|
const showOrdersCart = ref(false)
|
||||||
|
const idOrdersCartToShow = ref('')
|
||||||
|
|
||||||
const arrout = ref(<any[]>[])
|
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 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({
|
const initialPagination = ref({
|
||||||
sortBy: 'desc',
|
sortBy: 'ind',
|
||||||
descending: false,
|
descending: false,
|
||||||
rowsPerPage: 10,
|
rowsPerPage: 10,
|
||||||
// rowsNumber: xx if getting data from a server
|
// 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_carrello = ref(false)
|
||||||
const conferma_ordine = ref(false)
|
const conferma_ordine = ref(false)
|
||||||
const endload = ref(false)
|
const endload = ref(false)
|
||||||
@@ -54,8 +86,81 @@ export default defineComponent({
|
|||||||
const storeGasordine = ref(<any>'')
|
const storeGasordine = ref(<any>'')
|
||||||
|
|
||||||
const taborders = ref(shared_consts.OrderStat.IN_CORSO.value)
|
const taborders = ref(shared_consts.OrderStat.IN_CORSO.value)
|
||||||
|
const tabpages = ref(shared_consts.OrderPages.LISTA_TOTALI.value)
|
||||||
const statusnow = ref(0)
|
const statusnow = ref(0)
|
||||||
const arrnumstatus = ref(<any[]>[])
|
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>[
|
const columns = ref(<any>[
|
||||||
{
|
{
|
||||||
name: 'ind',
|
name: 'ind',
|
||||||
@@ -191,6 +296,11 @@ export default defineComponent({
|
|||||||
})
|
})
|
||||||
|
|
||||||
watch(() => taborders.value, (newval, oldval) => {
|
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)
|
updateorders(false)
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -199,6 +309,24 @@ export default defineComponent({
|
|||||||
updateorders(true)
|
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()
|
// const { setValDb, getValDb } = MixinBase()
|
||||||
|
|
||||||
function getCols(props: any) {
|
function getCols(props: any) {
|
||||||
@@ -212,6 +340,47 @@ export default defineComponent({
|
|||||||
return ris
|
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[] {
|
function getOrdersCartWithTotals(): any[] {
|
||||||
const orderscart = getOrdersCart();
|
const orderscart = getOrdersCart();
|
||||||
|
|
||||||
@@ -256,26 +425,44 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function updateorders(updatetab: boolean) {
|
function updateorders(updatetab: boolean) {
|
||||||
arrout.value = []
|
|
||||||
|
|
||||||
myorderscart.value = getOrdersCart()
|
// Rimuovi dalla lista columns_listaTotali il record "codice_interno" se mostra_codice.value = false
|
||||||
if (myorderscart.value) {
|
columns_listafiltrati.value = columns_listaTotali.value.filter((column: any) => {
|
||||||
for (const orderscart of myorderscart.value) {
|
let show = false
|
||||||
myarrrec.value[orderscart._id] = Object.keys(orderscart)
|
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()
|
if (tabpages.value === shared_consts.OrderPages.ORDINI.value) {
|
||||||
for (const status of [15, 2, 3, 4, 5, 6, 7, 8, 10]) {
|
arrout.value = []
|
||||||
arrnumstatus.value[status] = allorders.filter((rec) => (rec.status === status)).reduce((sum, item) => sum + 1, 0)
|
|
||||||
|
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() {
|
function selectfirstavailable() {
|
||||||
@@ -291,18 +478,26 @@ export default defineComponent({
|
|||||||
|
|
||||||
async function mounted() {
|
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, '')
|
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 userStore.newsletterload(false)
|
||||||
await productStore.loadProducts()
|
await productStore.loadProducts()
|
||||||
|
|
||||||
|
|
||||||
updateorders(true)
|
updateorders(true)
|
||||||
|
|
||||||
if (taborders.value === -1)
|
if (taborders.value === -1)
|
||||||
taborders.value = shared_consts.OrderStat.IN_CORSO.value
|
taborders.value = shared_consts.OrderStat.IN_CORSO.value
|
||||||
|
|
||||||
|
if (tabpages.value === -1)
|
||||||
|
tabpages.value = shared_consts.OrderPages.LISTA_TOTALI.value
|
||||||
|
|
||||||
|
|
||||||
if (tools.isManager()) {
|
if (tools.isManager()) {
|
||||||
columns.value = [...columns_Admin.value]
|
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)
|
onMounted(mounted)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -477,6 +697,7 @@ export default defineComponent({
|
|||||||
globalStore,
|
globalStore,
|
||||||
columns,
|
columns,
|
||||||
taborders,
|
taborders,
|
||||||
|
tabpages,
|
||||||
arrnumstatus,
|
arrnumstatus,
|
||||||
clickFunz,
|
clickFunz,
|
||||||
getOrdersCart,
|
getOrdersCart,
|
||||||
@@ -497,6 +718,18 @@ export default defineComponent({
|
|||||||
arrout,
|
arrout,
|
||||||
check_send_email,
|
check_send_email,
|
||||||
ConfermaOrdini,
|
ConfermaOrdini,
|
||||||
|
mostra_codice,
|
||||||
|
mostra_cat,
|
||||||
|
mostra_solo_ordini_produttore,
|
||||||
|
listatotali,
|
||||||
|
columns_listafiltrati,
|
||||||
|
showWhichCode,
|
||||||
|
showWhichCodeOptions,
|
||||||
|
getTotaleOrdineByOrdId,
|
||||||
|
showOrdersCart,
|
||||||
|
idOrdersCartToShow,
|
||||||
|
exportListaTotali,
|
||||||
|
totalPagination,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
</q-btn-toggle>
|
</q-btn-toggle>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="endload" class="panel">
|
<div v-if="endload" class="">
|
||||||
<div>
|
<div>
|
||||||
<q-toggle
|
<q-toggle
|
||||||
v-if="tools.isManager()"
|
v-if="tools.isManager()"
|
||||||
@@ -46,22 +46,45 @@
|
|||||||
color="blue"
|
color="blue"
|
||||||
class="row q-mx-md"
|
class="row q-mx-md"
|
||||||
icon="fas fa-envelope"
|
icon="fas fa-envelope"
|
||||||
:label="$t('orderscart.check_invia_email')"
|
:label="t('orderscart.check_invia_email')"
|
||||||
></q-toggle>
|
></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>
|
</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
|
<q-select
|
||||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||||
outlined
|
outlined
|
||||||
@@ -72,346 +95,447 @@
|
|||||||
map-options
|
map-options
|
||||||
></q-select>
|
></q-select>
|
||||||
|
|
||||||
<div class="q-pa-sm">
|
<q-tabs v-model="tabpages" inline-label class="text-blue">
|
||||||
<q-table
|
<span v-for="(page, index) of shared_consts.OrderPages" :key="index">
|
||||||
v-if="taborders > 0"
|
<q-tab
|
||||||
:grid="$q.screen.lt.sm"
|
:class="page.color"
|
||||||
:hide-header="$q.screen.lt.sm"
|
:name="page.value"
|
||||||
:columns="columns"
|
:icon="page.icon"
|
||||||
row-key="numorder"
|
:label="page.label"
|
||||||
:pagination="initialPagination"
|
/>
|
||||||
:rows="arrout"
|
</span>
|
||||||
>
|
</q-tabs>
|
||||||
<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">
|
<div v-if="tabpages === shared_consts.OrderPages.ORDINI.value">
|
||||||
<q-card class="my-card-shadow yes_shadow">
|
<q-tabs v-model="taborders" inline-label class="text-blue">
|
||||||
<q-list dense>
|
<span v-for="(stat, index) of shared_consts.OrderStat" :key="index">
|
||||||
<q-item v-for="col in getCols(props)" :key="col.name">
|
<q-tab
|
||||||
<q-item-section>
|
v-if="arrnumstatus[stat.value] > 0"
|
||||||
<q-item-label>{{ col.label }}</q-item-label>
|
:class="stat.color"
|
||||||
</q-item-section>
|
:name="stat.value"
|
||||||
<q-item-section side>
|
:icon="stat.icon"
|
||||||
<q-item-label
|
:label="`(` + arrnumstatus[stat.value] + `) ` + stat.label"
|
||||||
v-if="col.name === 'created_at'"
|
/>
|
||||||
caption
|
</span>
|
||||||
>{{ tools.getstrDateTime(col.value) }}</q-item-label>
|
</q-tabs>
|
||||||
<q-item-label v-else-if="col.name === 'nameSurname'" caption>
|
|
||||||
<span v-if="props.row.user">
|
<div class="q-pa-sm">
|
||||||
<span
|
<q-table
|
||||||
:class="
|
v-if="taborders > 0"
|
||||||
props.row.user.name !== 'TOTALI' ? '' : 'totali'
|
:grid="$q.screen.lt.sm"
|
||||||
"
|
:hide-header="$q.screen.lt.sm"
|
||||||
>{{ tools.getNomeUtenteByRecUser(props.row.user) }}</span>
|
:columns="columns"
|
||||||
</span>
|
row-key="numorder"
|
||||||
</q-item-label>
|
:pagination="initialPagination"
|
||||||
<q-item-label v-else-if="col.name === 'items'" caption>
|
:rows="arrout"
|
||||||
<div v-for="(item, index) of props.row.items" :key="index">
|
>
|
||||||
|
<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
|
<div
|
||||||
v-if="
|
v-if="
|
||||||
!!item &&
|
tools.isManager() &&
|
||||||
item.order &&
|
props.row.user.name !== 'TOTALI'
|
||||||
item.order.product &&
|
|
||||||
item.order.product.productInfo
|
|
||||||
"
|
"
|
||||||
|
class="q-pa-sm"
|
||||||
>
|
>
|
||||||
<span v-html="productStore.getStrInfoOrder(t, item.order)"></span>
|
<q-btn
|
||||||
{{ item.order.product.productInfo.name }} ({{
|
v-if="
|
||||||
productStore.getQuantityByOrder(t, item.order)
|
taborders ===
|
||||||
}})
|
shared_consts.OrderStat.CONFERMATI.value
|
||||||
<br />
|
"
|
||||||
|
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>
|
||||||
</div>
|
</q-item-label>
|
||||||
</q-item-label>
|
|
||||||
<q-item-label
|
<q-item-label
|
||||||
v-else-if="col.name === 'totalPrice'"
|
v-else-if="col.name === 'apri' && props.row._id"
|
||||||
caption
|
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-btn
|
<div class="q-pa-sm">
|
||||||
v-if="
|
<q-btn
|
||||||
taborders ===
|
size="sm"
|
||||||
shared_consts.OrderStat.CONFERMATI.value
|
dense
|
||||||
"
|
icon="fas fa-filter"
|
||||||
size="sm"
|
:label="t('ecomm.apriordine')"
|
||||||
dense
|
@click="
|
||||||
color="green"
|
idOrdersCartToShow = props.row._id;
|
||||||
icon="fas fa-people-carry"
|
showOrdersCart = true;
|
||||||
:label="t('ecomm.consegna')"
|
"
|
||||||
@click="clickFunz(props.row, shared_consts.OrderStat.DELIVERED.value)"
|
></q-btn>
|
||||||
></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-btn-dropdown rounded dense label="Azioni">
|
||||||
<q-list class="text-primary">
|
<q-list class="text-primary">
|
||||||
<q-item
|
<q-item
|
||||||
v-for="(
|
v-for="(cmd, index) of shared_consts.OrderCmdStr"
|
||||||
cmd, index
|
:key="index"
|
||||||
) of shared_consts.OrderCmdStr"
|
clickable
|
||||||
:key="index"
|
v-close-popup
|
||||||
clickable
|
@click="clickFunz(props.row, cmd.value)"
|
||||||
v-close-popup
|
>
|
||||||
@click="clickFunz(props.row, cmd.value)"
|
<q-item-section avatar>
|
||||||
>
|
<q-avatar
|
||||||
<q-item-section avatar>
|
:icon="cmd.icon"
|
||||||
<q-avatar :icon="cmd.icon" :color="cmd.color" text-color="white" />
|
:color="cmd.color"
|
||||||
</q-item-section>
|
text-color="white"
|
||||||
<q-item-section>
|
/>
|
||||||
<q-item-label>{{ cmd.label }}</q-item-label>
|
</q-item-section>
|
||||||
</q-item-section>
|
<q-item-section>
|
||||||
</q-item>
|
<q-item-label>{{ cmd.label }}</q-item-label>
|
||||||
</q-list>
|
</q-item-section>
|
||||||
</q-btn-dropdown>
|
</q-item>
|
||||||
</div>
|
</q-list>
|
||||||
</q-item-label>
|
</q-btn-dropdown>
|
||||||
|
</div>
|
||||||
<q-item-label v-else-if="col.name === 'apri' && props.row._id" caption>
|
</q-td>
|
||||||
<div class="q-pa-sm">
|
<q-td key="numorder" :props="props">
|
||||||
<q-btn
|
<span v-if="props.row.numorder"
|
||||||
size="sm"
|
> n. {{ props.row.numorder }}</span
|
||||||
dense
|
>
|
||||||
icon="fas fa-filter"
|
</q-td>
|
||||||
:label="t('ecomm.apriordine')"
|
<q-td key="nameSurname" :props="props">
|
||||||
:to="`/orderscart/${props.row._id}`"
|
<span v-if="props.row.user">
|
||||||
></q-btn>
|
<span
|
||||||
</div>
|
:class="props.row.user.name !== 'TOTALI' ? '' : 'totali'"
|
||||||
</q-item-label>
|
>{{ tools.getNomeUtenteByRecUser(props.row.user) }}</span
|
||||||
<q-item-label v-else caption>
|
>
|
||||||
{{
|
</span>
|
||||||
col.value
|
</q-td>
|
||||||
}}
|
<q-td key="created_at" :props="props">
|
||||||
</q-item-label>
|
{{ tools.getstrDateTime(props.row.created_at) }}
|
||||||
</q-item-section>
|
<span
|
||||||
</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
|
|
||||||
v-if="
|
v-if="
|
||||||
taborders === shared_consts.OrderStat.CONFERMATI.value
|
taborders === shared_consts.OrderStat.COMPLETATI.value
|
||||||
"
|
"
|
||||||
size="sm"
|
>
|
||||||
dense
|
<br />Consegnato il:
|
||||||
color="green"
|
<br />
|
||||||
icon="fas fa-people-carry"
|
{{ tools.getstrDateTime(props.row.date_consegnato) }}
|
||||||
class="q-mx-sm"
|
</span>
|
||||||
:label="t('ecomm.consegna')"
|
</q-td>
|
||||||
@click="clickFunz(props.row, shared_consts.OrderStat.DELIVERED.value)"
|
<q-td key="items" :props="props">
|
||||||
></q-btn>
|
<div v-for="(item, index) of props.row.items" :key="index">
|
||||||
|
<div
|
||||||
<q-btn-dropdown rounded dense label="Azioni">
|
v-if="
|
||||||
<q-list class="text-primary">
|
!!item.order &&
|
||||||
<q-item
|
item.order.product &&
|
||||||
v-for="(cmd, index) of shared_consts.OrderCmdStr"
|
item.order.product.productInfo &&
|
||||||
:key="index"
|
((mostra_solo_ordini_produttore &&
|
||||||
clickable
|
item.order.idGasordine === storeGasordine) ||
|
||||||
v-close-popup
|
!mostra_solo_ordini_produttore)
|
||||||
@click="clickFunz(props.row, cmd.value)"
|
"
|
||||||
>
|
>
|
||||||
<q-item-section avatar>
|
{{ productStore.getQuantityByOrder(t, item.order) }}
|
||||||
<q-avatar :icon="cmd.icon" :color="cmd.color" text-color="white" />
|
{{ item.order.product.productInfo.name }}
|
||||||
</q-item-section>
|
<span v-if="mostra_cat">
|
||||||
<q-item-section>
|
({{
|
||||||
<q-item-label>{{ cmd.label }}</q-item-label>
|
productStore.getSubCatStrByProduct(
|
||||||
</q-item-section>
|
item.order.product.productInfo
|
||||||
</q-item>
|
)
|
||||||
</q-list>
|
}})
|
||||||
</q-btn-dropdown>
|
</span>
|
||||||
</div>
|
{{
|
||||||
</q-td>
|
mostra_codice
|
||||||
<q-td key="numorder" :props="props">
|
? '- [' + item.order.product.productInfo.code + ']'
|
||||||
<span v-if="props.row.numorder"> n. {{ props.row.numorder }}</span>
|
: ''
|
||||||
</q-td>
|
}}
|
||||||
<q-td key="nameSurname" :props="props">
|
<br />
|
||||||
<span v-if="props.row.user">
|
</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
|
<span
|
||||||
:class="props.row.user.name !== 'TOTALI' ? '' : 'totali'"
|
:class="props.row.user.name !== 'TOTALI' ? '' : 'totali'"
|
||||||
>{{ tools.getNomeUtenteByRecUser(props.row.user) }}</span>
|
>{{
|
||||||
</span>
|
getTotaleOrdineByOrdId(props.row._id, storeGasordine)
|
||||||
</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')
|
|
||||||
}}
|
}}
|
||||||
|
€</span
|
||||||
|
>
|
||||||
|
</q-td>
|
||||||
|
<q-td key="status" :props="props">
|
||||||
|
<span :class="props.row.status">
|
||||||
|
{{ shared_consts.getStatusStr(props.row.status) }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
<br />
|
||||||
<div v-if="props.row.pagato" class="ordstat">
|
<div v-if="props.row.confermato" class="ordstat">
|
||||||
{{ tools.getstrDateTime(props.row.date_pagato) }}:
|
{{ tools.getstrDateTime(props.row.date_confermato) }}:
|
||||||
<span
|
<span class="ordstat confermato">
|
||||||
class="ordstat"
|
{{ $t('ecomm.confermato') }}
|
||||||
>{{ $t('ecomm.pagato') }}</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="props.row.consegnato" class="ordstat">
|
<div v-if="props.row.pagato" class="ordstat">
|
||||||
{{ tools.getstrDateTime(props.row.date_consegnato) }}:
|
{{ tools.getstrDateTime(props.row.date_pagato) }}:
|
||||||
<span
|
<span class="ordstat">{{ t('ecomm.pagato') }}</span>
|
||||||
class="ordstat"
|
</div>
|
||||||
>{{ $t('ecomm.consegnato') }}</span>
|
<div v-if="props.row.consegnato" class="ordstat">
|
||||||
</div>
|
{{ tools.getstrDateTime(props.row.date_consegnato) }}:
|
||||||
<div v-if="props.row.preparato" class="ordstat">
|
<span class="ordstat">{{ t('ecomm.consegnato') }}</span>
|
||||||
{{ tools.getstrDateTime(props.row.date_preparato) }}:
|
</div>
|
||||||
<span
|
<div v-if="props.row.preparato" class="ordstat">
|
||||||
class="ordstat"
|
{{ tools.getstrDateTime(props.row.date_preparato) }}:
|
||||||
>{{ $t('ecomm.preparato') }}</span>
|
<span class="ordstat">{{ t('ecomm.preparato') }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="props.row.spedito">
|
<div v-if="props.row.spedito">
|
||||||
{{ tools.getstrDateTime(props.row.date_spedito) }}:
|
{{ tools.getstrDateTime(props.row.date_spedito) }}:
|
||||||
<span
|
<span class="ordstat">{{ t('ecomm.spedito') }}</span>
|
||||||
class="ordstat"
|
</div>
|
||||||
>{{ $t('ecomm.spedito') }}</span>
|
<div v-if="props.row.ricevuto">
|
||||||
</div>
|
{{ tools.getstrDateTime(props.row.date_ricevuto) }}:
|
||||||
<div v-if="props.row.ricevuto">
|
<span class="ordstat">{{ t('ecomm.ricevuto') }}</span>
|
||||||
{{ tools.getstrDateTime(props.row.date_ricevuto) }}:
|
</div>
|
||||||
<span
|
</q-td>
|
||||||
class="ordstat"
|
</q-tr>
|
||||||
>{{ $t('ecomm.ricevuto') }}</span>
|
</template>
|
||||||
</div>
|
</q-table>
|
||||||
</q-td>
|
</div>
|
||||||
</q-tr>
|
|
||||||
</template>
|
|
||||||
</q-table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Ordini IN CORSO -->
|
<!-- Ordini IN CORSO -->
|
||||||
<div
|
<div
|
||||||
v-if="
|
v-if="
|
||||||
tools.isManager() &&
|
tools.isManager() &&
|
||||||
taborders === shared_consts.OrderStat.IN_CORSO.value
|
taborders === shared_consts.OrderStat.IN_CORSO.value
|
||||||
"
|
"
|
||||||
class="q-ma-sm q-pa-sm row justify-center"
|
class="q-ma-sm q-pa-sm row justify-center"
|
||||||
>
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
color="positive"
|
color="positive"
|
||||||
icon="mail"
|
icon="mail"
|
||||||
:label="t('orderscart.order_confirm')"
|
:label="t('orderscart.order_confirm')"
|
||||||
@click="ConfermaOrdini"
|
@click="ConfermaOrdini"
|
||||||
></q-btn>
|
></q-btn>
|
||||||
</div>
|
</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-btn
|
||||||
<q-select
|
color="positive"
|
||||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
icon="mail"
|
||||||
rounded
|
:label="t('orderscart.sendmail', { count: arrout.length })"
|
||||||
style="width: 300px"
|
@click="sendMailToAll"
|
||||||
outlined
|
></q-btn>
|
||||||
v-model="templemail"
|
</div>
|
||||||
: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>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
<div v-for="(orderscart, index) in getOrdersCart" :key="index">
|
<div v-for="(orderscart, index) in getOrdersCart" :key="index">
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
@@ -439,8 +563,71 @@
|
|||||||
|
|
||||||
<br>
|
<br>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
|
<CMyDialog v-model="showOrdersCart" title="Ordine">
|
||||||
|
<COrdersCart :iscash="false" :idOrdersCart="idOrdersCartToShow" />
|
||||||
|
</CMyDialog>
|
||||||
</q-page>
|
</q-page>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -448,5 +635,5 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import "./orderInfo";
|
@import './orderInfo';
|
||||||
</style>
|
</style>
|
||||||
|
|||||||