diff --git a/public/images/favicon.ico b/public/images/favicon.ico index d283c964..105ff16c 100644 Binary files a/public/images/favicon.ico and b/public/images/favicon.ico differ diff --git a/public/images/pcb-android-icon-144x144.png b/public/images/pcb-android-icon-144x144.png new file mode 100644 index 00000000..fdea5eb1 Binary files /dev/null and b/public/images/pcb-android-icon-144x144.png differ diff --git a/public/images/pcb-android-icon-192x192.png b/public/images/pcb-android-icon-192x192.png new file mode 100644 index 00000000..93bb5fb7 Binary files /dev/null and b/public/images/pcb-android-icon-192x192.png differ diff --git a/public/images/pcb-android-icon-36x36.png b/public/images/pcb-android-icon-36x36.png new file mode 100644 index 00000000..f700c0d2 Binary files /dev/null and b/public/images/pcb-android-icon-36x36.png differ diff --git a/public/images/pcb-android-icon-48x48.png b/public/images/pcb-android-icon-48x48.png new file mode 100644 index 00000000..4018b080 Binary files /dev/null and b/public/images/pcb-android-icon-48x48.png differ diff --git a/public/images/pcb-android-icon-72x72.png b/public/images/pcb-android-icon-72x72.png new file mode 100644 index 00000000..fdaff445 Binary files /dev/null and b/public/images/pcb-android-icon-72x72.png differ diff --git a/public/images/pcb-android-icon-96x96.png b/public/images/pcb-android-icon-96x96.png new file mode 100644 index 00000000..74ae0a32 Binary files /dev/null and b/public/images/pcb-android-icon-96x96.png differ diff --git a/public/images/pcb-apple-icon-114x114.png b/public/images/pcb-apple-icon-114x114.png new file mode 100644 index 00000000..de67dfff Binary files /dev/null and b/public/images/pcb-apple-icon-114x114.png differ diff --git a/public/images/pcb-apple-icon-120x120.png b/public/images/pcb-apple-icon-120x120.png new file mode 100644 index 00000000..5864c9c8 Binary files /dev/null and b/public/images/pcb-apple-icon-120x120.png differ diff --git a/public/images/pcb-apple-icon-144x144.png b/public/images/pcb-apple-icon-144x144.png new file mode 100644 index 00000000..fdea5eb1 Binary files /dev/null and b/public/images/pcb-apple-icon-144x144.png differ diff --git a/public/images/pcb-apple-icon-152x152.png b/public/images/pcb-apple-icon-152x152.png new file mode 100644 index 00000000..6e92509a Binary files /dev/null and b/public/images/pcb-apple-icon-152x152.png differ diff --git a/public/images/pcb-apple-icon-180x180.png b/public/images/pcb-apple-icon-180x180.png new file mode 100644 index 00000000..4d59cedc Binary files /dev/null and b/public/images/pcb-apple-icon-180x180.png differ diff --git a/public/images/pcb-apple-icon-57x57.png b/public/images/pcb-apple-icon-57x57.png new file mode 100644 index 00000000..fb201a9d Binary files /dev/null and b/public/images/pcb-apple-icon-57x57.png differ diff --git a/public/images/pcb-apple-icon-60x60.png b/public/images/pcb-apple-icon-60x60.png new file mode 100644 index 00000000..3b5f1c33 Binary files /dev/null and b/public/images/pcb-apple-icon-60x60.png differ diff --git a/public/images/pcb-apple-icon-72x72.png b/public/images/pcb-apple-icon-72x72.png new file mode 100644 index 00000000..fdaff445 Binary files /dev/null and b/public/images/pcb-apple-icon-72x72.png differ diff --git a/public/images/pcb-apple-icon-76x76.png b/public/images/pcb-apple-icon-76x76.png new file mode 100644 index 00000000..2882992b Binary files /dev/null and b/public/images/pcb-apple-icon-76x76.png differ diff --git a/public/images/pcb-apple-icon.png b/public/images/pcb-apple-icon.png new file mode 100644 index 00000000..422a8dca Binary files /dev/null and b/public/images/pcb-apple-icon.png differ diff --git a/quasar.conf.js b/quasar.conf.js index b4bf3510..5f342f74 100755 --- a/quasar.conf.js +++ b/quasar.conf.js @@ -317,54 +317,54 @@ module.exports = configure((ctx) => ({ start_url: "/?homescreen=1", icons: [ { - src: 'images/fv-android-icon-512x512.png', + src: 'images/pcb-android-icon-512x512.png', sizes: '512x512', type: 'image/png', }, { - src: 'images/fv-android-icon-384x384.png', + src: 'images/pcb-android-icon-384x384.png', sizes: '384x384', type: 'image/png', }, { - src: 'images/fv-android-icon-192x192.png', + src: 'images/pcb-android-icon-192x192.png', sizes: '192x192', type: 'image/png', }, { - src: 'images/fv-android-icon-144x144.png', + src: 'images/pcb-android-icon-144x144.png', sizes: '144x144', type: 'image/png', }, { - src: 'images/fv-android-icon-96x96.png', + src: 'images/pcb-android-icon-96x96.png', sizes: '96x96', type: 'image/png', }, { - src: 'images/fv-apple-icon-120x120.png', + src: 'images/pcb-apple-icon-120x120.png', sizes: '120x120', type: 'image/png', }, { - src: 'images/fv-apple-icon-144x144.png', + src: 'images/pcb-apple-icon-144x144.png', sizes: '144x144', type: 'image/png', }, { - src: 'images/fv-apple-icon-152x152.png', + src: 'images/pcb-apple-icon-152x152.png', sizes: '152x152', type: 'image/png', }, { - src: 'images/fv-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" }] }, }, diff --git a/src/components/CProductCard/CProductCard.ts b/src/components/CProductCard/CProductCard.ts index 2056283f..9975d1da 100755 --- a/src/components/CProductCard/CProductCard.ts +++ b/src/components/CProductCard/CProductCard.ts @@ -10,7 +10,7 @@ import { CCopyBtn } from '../CCopyBtn' import { func_tools, toolsext } from '@store/Modules/toolsext' -import { IBaseOrder, IOrder, IOrderCart, IProduct } from '@src/model' +import { IBaseOrder, IGasordine, IOrder, IOrderCart, IProduct } from '@src/model' import { tools } from '@store/Modules/tools' import { useProducts } from '@store/Products' @@ -29,6 +29,11 @@ export default defineComponent({ required: false, default: '', }, + cosa: { + type: Number, + required: false, + default: 0, + }, complete: { type: Boolean, required: false, @@ -57,6 +62,7 @@ export default defineComponent({ }) const storeSelected = ref('') + const gasordineSelected = ref('') const arrordersCart = ref([]) const openlistorders = ref(false) @@ -90,11 +96,11 @@ export default defineComponent({ globalStore.rightDrawerOpen = true return false } - + const ris = await products.addtoCartBase({ $q, t, code: myproduct.value.code!, order: myorder, addqty: add }) updateproduct() if (ris && ris.myord) { - + } } @@ -120,6 +126,19 @@ export default defineComponent({ } } + function getSingleGasordine(gasordine: IGasordine) { + try { + const mygas = gasordine + if (mygas) + return mygas.name + ' (' + mygas.city + ') ' + t('gas.dataora_chiusura_ordini') + ': ' + tools.getstrDateShort(mygas.dataora_chiusura_ordini) + + ' ' + t('gas.dataora_ritiro') + ': ' + tools.getstrDateShort(mygas.dataora_ritiro) + else + return '' + } catch (e) { + return '' + } + } + function updateproduct() { myproduct.value = products.getProductByCode(props.code) // products.updateQuantityAvailable(myproduct.value._id) @@ -146,6 +165,26 @@ export default defineComponent({ return myarr } + function getGasordines() { + if (!myproduct.value) + return [] + + const myarr: any = [] + let ind = 1 + myproduct.value.gasordines.forEach((gasordine: IGasordine) => { + myarr.push( + { + id: ind, + label: getSingleGasordine(gasordine), + value: gasordine._id + }) + + ind++ + }) + + return myarr + } + function checkifCartDisable() { // return !myorder.idStorehouse return false @@ -184,6 +223,10 @@ export default defineComponent({ myorder.idStorehouse = newval }) + watch(() => gasordineSelected.value, (newval, oldval) => { + myorder.idGasordine = newval + }) + function load() { updateproduct() // console.log('Load', myproduct.value.name) @@ -196,10 +239,19 @@ export default defineComponent({ myorder.idStorehouse = myproduct.value.storehouses[0]._id } + if (myproduct.value.gasordines && myproduct.value.gasordines.length === 1) { + myorder.idGasordine = myproduct.value.gasordines[0]._id + } + + const ord = products.getOrderProductInCart(myproduct.value._id) if (ord) { myorder.quantity = ord.quantity myorder.quantitypreordered = ord.quantitypreordered + + if (ord.idGasordine) + gasordineSelected.value = ord.idGasordine! + } } @@ -258,6 +310,7 @@ export default defineComponent({ getclimgproduct, getnumstore, getSingleStorehouse, + getSingleGasordine, getStorehouses, checkifCartDisable, myproduct, @@ -265,6 +318,7 @@ export default defineComponent({ tools, t, storeSelected, + gasordineSelected, enableSubQty, enableAddQty, getQtyAvailable, @@ -281,6 +335,7 @@ export default defineComponent({ getQtyBookableAvailable, listord, sumval, + getGasordines, } } }) diff --git a/src/components/CProductCard/CProductCard.vue b/src/components/CProductCard/CProductCard.vue index a639cb3c..56b44ce0 100755 --- a/src/components/CProductCard/CProductCard.vue +++ b/src/components/CProductCard/CProductCard.vue @@ -26,12 +26,12 @@ {{ myproduct.name }}
-   {{$t('ecomm.codice')}}: {{ myproduct.code }} +   {{ $t('ecomm.codice') }}: {{ myproduct.code }}
- -
+ +
@@ -66,6 +66,52 @@
+ + + + + + {{ t('products.weight') }} + + + + {{ myproduct.weight }} + {{ tools.getUnitsMeasure(myproduct.unit, true) }} + + +
+ + + + + + + + {{ t('products.gasordine') }} + + + + + + + {{ + getSingleGasordine(myproduct.gasordines[0]) + }} + +
@@ -90,17 +136,6 @@ {{ myproduct.producer.name }}
-
- - {{ t('products.weight') }}: - - {{ myproduct.weight }} - {{ tools.getUnitsMeasure(myproduct.unit, true) }} -
@@ -108,14 +143,15 @@
- + @@ -146,9 +182,9 @@ @@ -183,48 +219,6 @@ -
- - - - - - - - - -
+
+ + + + + + + + + +
  Totali: - {{ - sumval - }} + {{ sumval }}   diff --git a/src/components/CSingleCart/CSingleCart.scss b/src/components/CSingleCart/CSingleCart.scss index bade4da9..a83252ab 100755 --- a/src/components/CSingleCart/CSingleCart.scss +++ b/src/components/CSingleCart/CSingleCart.scss @@ -30,4 +30,8 @@ font-style: italic; color: green; font-weight: bold; +} +.gasordine { + font-style: italic; + color: blue; } \ No newline at end of file diff --git a/src/components/CSingleCart/CSingleCart.ts b/src/components/CSingleCart/CSingleCart.ts index c7cf123f..4dc56e03 100755 --- a/src/components/CSingleCart/CSingleCart.ts +++ b/src/components/CSingleCart/CSingleCart.ts @@ -42,7 +42,7 @@ export default defineComponent({ function addsubqty(addqty: boolean, subqty: boolean) { if (products.isQtyAvailableByOrder(props.order)) { if (addqty) { - if (props.order.quantity >= 20) + if (props.order.quantity >= 100) return false } @@ -54,7 +54,7 @@ export default defineComponent({ if (products.isInPreorderByOrder(props.order)) { if (addqty) { - if (props.order.quantitypreordered >= 20) + if (props.order.quantitypreordered >= 100) return false } @@ -99,6 +99,8 @@ export default defineComponent({ removeFromCard, isApplicatoSconto, getRisparmio, + tools, + products, } }, }) diff --git a/src/components/CSingleCart/CSingleCart.vue b/src/components/CSingleCart/CSingleCart.vue index bbbd758f..70973f2b 100755 --- a/src/components/CSingleCart/CSingleCart.vue +++ b/src/components/CSingleCart/CSingleCart.vue @@ -11,10 +11,15 @@
+
+ {{ products.getSingleGasordine(order, true) }}
+
{{ order.product.name }} -
+ +
@@ -48,6 +53,13 @@ @click="addsubqty(true, false)" >
+
+ {{ tools.getWeightTotalByOrder(order) }} + {{ tools.getUnitsMeasure(order.product.unit, true) }} +
0) { diff --git a/src/store/Products.ts b/src/store/Products.ts index d4d1d674..2a6de794 100755 --- a/src/store/Products.ts +++ b/src/store/Products.ts @@ -12,6 +12,8 @@ import { toolsext } from '@store/Modules/toolsext' import { useGlobalStore } from './globalStore' import { ref } from 'vue' +import translate from '@src/globalroutines/util' + export const useProducts = defineStore('Products', { state: (): IProductsState => ({ products: [], @@ -27,7 +29,7 @@ export const useProducts = defineStore('Products', { ris = state.products.filter((rec) => (rec.idGasordines && rec.idGasordines.length > 0)) } else if (cosa === shared_consts.PROD.BOTTEGA) { ris = state.products.filter((rec) => (!rec.idGasordines || (rec.idGasordines && rec.idGasordines.length === 0))) - } + } return ris ? ris : [] } else { return state.products @@ -285,11 +287,12 @@ export const useProducts = defineStore('Products', { quantity: order.quantity, quantitypreordered: order.quantitypreordered, idStorehouse: order.idStorehouse, + idGasordine: order.idGasordine, idScontisticas: product.idScontisticas, } if (product.storehouses.length === 1) { - order.idStorehouse = product.storehouses[0]._id + myorder.idStorehouse = product.storehouses[0]._id } return myorder @@ -731,7 +734,25 @@ export const useProducts = defineStore('Products', { return false; }, + getSingleGasordine(order: IOrder, short: boolean): string { + try { + const mygas = order.gasordine + if (mygas) { + if (short) + return mygas.name! + else + return mygas.name + ' (' + mygas.city + ') ' + translate('gas.dataora_chiusura_ordini') + ': ' + tools.getstrDateShort(mygas.dataora_chiusura_ordini) + + ' ' + translate('gas.dataora_ritiro') + ': ' + tools.getstrDateShort(mygas.dataora_ritiro) + } else + return '' + } catch (e) { + return '' + } + } + }, + + }) diff --git a/src/views/ecommerce/productsList/productsList.ts b/src/views/ecommerce/productsList/productsList.ts index dafcc146..36940cb6 100755 --- a/src/views/ecommerce/productsList/productsList.ts +++ b/src/views/ecommerce/productsList/productsList.ts @@ -1,4 +1,4 @@ -import { defineComponent, onMounted, ref } from 'vue' +import { defineComponent, onMounted, ref, watch } from 'vue' import { tools } from '@store/Modules/tools' import { useUserStore } from '@store/UserStore' import { useRouter } from 'vue-router' @@ -28,9 +28,14 @@ export default defineComponent({ const search = ref('') - const cosa = ref(shared_consts.PROD.GAS) + const cosa = ref(0) + + watch(() => cosa.value, (newval, oldval) => { + tools.setCookie(tools.COOK_COSA_PRODOTTI, cosa.value.toString()) + }) function mounted() { + cosa.value = tools.getCookie(tools.COOK_COSA_PRODOTTI, shared_consts.PROD.BOTTEGA, true) // Inizializza productStore.loadProducts() } @@ -47,6 +52,16 @@ export default defineComponent({ return product.code!.includes(search.value) || lowerName.includes(lowerSearchText); }); } + + function getNumQtaGas() { + const arrprod = productStore.getProducts(shared_consts.PROD.GAS) + return arrprod.length + } + + function getNumQtaBottega() { + const arrprod = productStore.getProducts(shared_consts.PROD.BOTTEGA) + return arrprod.length + } onMounted(mounted) @@ -59,6 +74,8 @@ export default defineComponent({ search, cosa, shared_consts, + getNumQtaGas, + getNumQtaBottega, } } }) diff --git a/src/views/ecommerce/productsList/productsList.vue b/src/views/ecommerce/productsList/productsList.vue index 61c4ff87..5bd676d5 100755 --- a/src/views/ecommerce/productsList/productsList.vue +++ b/src/views/ecommerce/productsList/productsList.vue @@ -3,14 +3,24 @@
- +