From ce86dd51a8c43cbf2b2e9a530462d52fd3566fb3 Mon Sep 17 00:00:00 2001 From: Surya Paolo Date: Tue, 17 Dec 2024 21:38:21 +0100 Subject: [PATCH] - risolto Ordinamento Bestseller (a 6 mesi ora) - EditOn anche per gli Editori --- .../abitaregliiblei.it/db/static_data.ts | 12 +----------- src/components/CCatalogoCard/CCatalogoCard.vue | 18 +++++++++++++++--- src/components/CGridTableRec/CGridTableRec.vue | 2 +- src/components/MyHeader/MyHeader.ts | 4 ++++ src/components/MyHeader/MyHeader.vue | 8 +++++++- src/db/static_data.ts | 18 ++++-------------- src/model/Products.ts | 3 ++- src/store/Products.ts | 6 ++++-- src/views/ecommerce/catalogo/catalogo.ts | 2 +- src/views/ecommerce/catalogo/catalogo.vue | 4 ++-- 10 files changed, 41 insertions(+), 36 deletions(-) diff --git a/_ALL_SITES/abitaregliiblei.it/db/static_data.ts b/_ALL_SITES/abitaregliiblei.it/db/static_data.ts index fcc1a07a..60322f6c 100755 --- a/_ALL_SITES/abitaregliiblei.it/db/static_data.ts +++ b/_ALL_SITES/abitaregliiblei.it/db/static_data.ts @@ -167,7 +167,7 @@ function getDynamicPages(site: ISites): IListRoutes[] { infooter: true, }, { - active: true, + active: site.confpages && site.confpages.showProfile, order: 120, path: '/editprofile', materialIcon: 'fas fa-user', @@ -273,16 +273,6 @@ function getDynamicPages(site: ISites): IListRoutes[] { inmenu: false, infooter: false, }, - { - active: true, - order: 150, - path: '/fundraising', - materialIcon: 'fas fa-hand-holding-heart', - name: 'pages.fundraising', - component: () => import('@src/root/fundraising/fundraising.vue'), - inmenu: false, - infooter: false, - }, { active: true, order: 80, diff --git a/src/components/CCatalogoCard/CCatalogoCard.vue b/src/components/CCatalogoCard/CCatalogoCard.vue index 8bb70daa..a819ce17 100755 --- a/src/components/CCatalogoCard/CCatalogoCard.vue +++ b/src/components/CCatalogoCard/CCatalogoCard.vue @@ -120,7 +120,7 @@ -
testo: "{{ getTesto_Bottom }}"
+ @@ -729,7 +729,7 @@ table="productinfos" :id="myproduct.productInfo._id" :rec="myproduct.productInfo" - mykey="vLastM" + mykey="vLast3M" debounce="1000" :save="updateproductmodif()" :type="costanti.FieldType.number" @@ -747,6 +747,18 @@ :type="costanti.FieldType.number" > +
Venduti Ultimo Anno:
+ +
userStore.my.profile.socio) @@ -630,6 +633,7 @@ export default defineComponent({ products, userStore, clickMenu3Orizz, + isEditor, } }, diff --git a/src/components/MyHeader/MyHeader.vue b/src/components/MyHeader/MyHeader.vue index 9d3bbf34..f7f4ee58 100755 --- a/src/components/MyHeader/MyHeader.vue +++ b/src/components/MyHeader/MyHeader.vue @@ -71,7 +71,7 @@
@@ -346,6 +346,12 @@ > Segreteria
+
+ Editore +
import('@src/root/fundraising/fundraising.vue'), - inmenu: false, - infooter: false, - }, { active: true, order: 80, diff --git a/src/model/Products.ts b/src/model/Products.ts index a6a506c7..d846ea3d 100755 --- a/src/model/Products.ts +++ b/src/model/Products.ts @@ -45,7 +45,7 @@ export interface IProductInfo { short_descr: string totVen?: number, - vLastM?: number, + vLast3M?: number, vLast6M?: number, vLastY?: number, vLast2Y?: number, @@ -71,6 +71,7 @@ export interface IVariazione { availability?: number formato?: string misure?: string + pagine?: number tipologia?: string edizione?: string preOrderDate?: Date diff --git a/src/store/Products.ts b/src/store/Products.ts index 293be39d..2dfa4926 100755 --- a/src/store/Products.ts +++ b/src/store/Products.ts @@ -1279,12 +1279,14 @@ export const useProducts = defineStore('Products', { const description = myproduct.productInfo.short_descr || ''; const long_descr = myproduct.productInfo.description || ''; const date_pub = tools.getstrDateShort(myproduct.productInfo.date_pub) || ''; - const ranking_globale = myproduct.productInfo.rank1Y! || 0; + const vLast3M = myproduct.productInfo.vLast3M! || 0; + const vLast6M = myproduct.productInfo.vLast6M! || 0; + const ranking_globale = myproduct.productInfo.rank3M! || 0; const ranking = myproduct.indiceRanking! || 0; const venduti = myproduct.productInfo.totVen! || 0; const linkvenduti = ''+venduti+'' - const debugstr = " Rank=" + ranking + "
1Y=" + (myproduct.productInfo.rank1Y! || '') + '
Venduti=' + linkvenduti + '
Data Pubb=' + date_pub + const debugstr = " Rank=" + ranking + "
Rank3M=" + (myproduct.productInfo.rank3M! || '') + '
Venduti=' + linkvenduti + '
vLast3M= ' + vLast3M + '
vLast6M= ' + vLast6M + '
Data Pubb=' + date_pub const truncatedDescription = description.length > maxDescriptionLength ? description.substring(0, description.lastIndexOf(' ', maxDescriptionLength)) + '...' diff --git a/src/views/ecommerce/catalogo/catalogo.ts b/src/views/ecommerce/catalogo/catalogo.ts index cf8d8286..1183d843 100755 --- a/src/views/ecommerce/catalogo/catalogo.ts +++ b/src/views/ecommerce/catalogo/catalogo.ts @@ -431,7 +431,7 @@ export default defineComponent({ } else if (sort === costanti.SORT_BESTSELLER) { arrprod = arrprod.sort((a: IProduct, b: IProduct) => { - return b.productInfo.rank3M! - a.productInfo.rank3M! + return b.productInfo.vLast6M! - a.productInfo.vLast6M! }) arrprod = arrprod.map((product, index) => { diff --git a/src/views/ecommerce/catalogo/catalogo.vue b/src/views/ecommerce/catalogo/catalogo.vue index c322c95c..7ec15601 100755 --- a/src/views/ecommerce/catalogo/catalogo.vue +++ b/src/views/ecommerce/catalogo/catalogo.vue @@ -1,7 +1,7 @@