From 7c0c2fef39636faab3c09c360c152d53000198bf Mon Sep 17 00:00:00 2001 From: paoloar77 Date: Fri, 11 Feb 2022 01:07:46 +0100 Subject: [PATCH] - Aggiungere numero di persone registrate, e num di competenze, e numGruppi --- quasar.conf.js | 2 +- src/components/CDashboard/CDashboard.scss | 74 ++++++ src/components/CDashboard/CDashboard.ts | 30 +++ src/components/CDashboard/CDashboard.vue | 100 ++++++++ src/components/CDashboard/index.ts | 1 + src/components/index.ts | 1 + src/model/UserStore.ts | 7 + src/root/home_freeplanet/home_freeplanet.ts | 3 +- src/root/home_freeplanet/home_freeplanet.vue | 2 + .../home_insiemesipuo/home_insiemesipuo.ts | 3 +- .../home_insiemesipuo/home_insiemesipuo.vue | 2 + src/root/home_pdnm/home_pdnm.ts | 3 +- src/root/home_pdnm/home_pdnm.vue | 2 + src/views/user/myprofile/myprofile.vue | 220 ++++++++++-------- 14 files changed, 344 insertions(+), 106 deletions(-) create mode 100755 src/components/CDashboard/CDashboard.scss create mode 100755 src/components/CDashboard/CDashboard.ts create mode 100755 src/components/CDashboard/CDashboard.vue create mode 100755 src/components/CDashboard/index.ts diff --git a/quasar.conf.js b/quasar.conf.js index cfcf4095..414ca655 100755 --- a/quasar.conf.js +++ b/quasar.conf.js @@ -57,6 +57,7 @@ module.exports = configure((ctx) => ({ 'fontawesome-v5', 'roboto-font', // optional, you are not bound to it 'material-icons', // optional, you are not bound to it + 'material-icons-outlined' ], aliases: { @@ -154,7 +155,6 @@ module.exports = configure((ctx) => ({ framework: { config: {}, - // iconSet: 'material-icons', // Quasar icon set // lang: 'en-US', // Quasar language pack // For special cases outside of where the auto-import strategy can have an impact diff --git a/src/components/CDashboard/CDashboard.scss b/src/components/CDashboard/CDashboard.scss new file mode 100755 index 00000000..27bf74b5 --- /dev/null +++ b/src/components/CDashboard/CDashboard.scss @@ -0,0 +1,74 @@ +.box_1 { + color: #0dceec; +} + +.box_2 { + color: #fe434f; +} + +.box_3 { + color: #15ca20; +} + +.box_4 { + color: #ff9700; +} + +.shadow { + -webkit-box-shadow: 0 0 10px #bfbfbf !important; + box-shadow: 0 0 10px #bfbfbf !important; +} + +.progress-base { + height: 8px; + border-radius: 3px; + background-color: #e9ecef; +} + +.progress-bar-1 { + height: 8px; + border-radius: 3px; + background: #17ead9; + background: -webkit-linear-gradient(45deg, #17ead9, #6078ea) !important; + background: linear-gradient(45deg, #17ead9, #6078ea) !important; +} + +.progress-bar-2 { + height: 8px; + border-radius: 3px; + background: #f54ea2; + background: -webkit-linear-gradient(45deg, #f54ea2, #ff7676) !important; + background: linear-gradient(45deg, #f54ea2, #ff7676) !important; +} + +.progress-bar-3 { + height: 8px; + border-radius: 3px; + background: #42e695; + background: -webkit-linear-gradient(45deg, #42e695, #3bb2b8) !important; + background: linear-gradient(45deg, #42e695, #3bb2b8) !important; +} + +.progress-bar-4 { + height: 8px; + border-radius: 3px; + background: #ffdf40; + background: -webkit-linear-gradient(45deg, #ffdf40, #ff8359) !important; + background: linear-gradient(45deg, #ffdf40, #ff8359) !important; +} + +.border-top { + border-top: 1px solid #efefef; +} + +.chip_pending { + background: #ffdf40; + background: -webkit-linear-gradient(45deg, #ffdf40, #ff8359) !important; + background: linear-gradient(45deg, #ffdf40, #ff8359) !important; +} + +.chip_completed { + background: #42e695; + background: -webkit-linear-gradient(45deg, #42e695, #3bb2b8) !important; + background: linear-gradient(45deg, #42e695, #3bb2b8) !important; +} diff --git a/src/components/CDashboard/CDashboard.ts b/src/components/CDashboard/CDashboard.ts new file mode 100755 index 00000000..e1378647 --- /dev/null +++ b/src/components/CDashboard/CDashboard.ts @@ -0,0 +1,30 @@ +import { computed, defineComponent, PropType, ref } from 'vue' + +import { ICalcStat, IOperators } from '../../model' +import { useUserStore } from '../../store/UserStore' +import { useRouter } from 'vue-router' +import { useGlobalStore } from '../../store/globalStore' +import { useI18n } from '../../boot/i18n' + +import { tools } from '@store/Modules/tools' + +export default defineComponent({ + name: 'CDashboard', + props: { + }, + setup(props) { + + const userStore = useUserStore() + const $router = useRouter() + const globalStore = useGlobalStore() + const { t } = useI18n(); + + const calcstat = computed(() => userStore.my.calcstat ? userStore.my.calcstat : {numUsersReg: 0, numMySkills: 0} ) + + return { + userStore, + tools, + calcstat + } + }, +}) diff --git a/src/components/CDashboard/CDashboard.vue b/src/components/CDashboard/CDashboard.vue new file mode 100755 index 00000000..b046e8ef --- /dev/null +++ b/src/components/CDashboard/CDashboard.vue @@ -0,0 +1,100 @@ + + + + + diff --git a/src/components/CDashboard/index.ts b/src/components/CDashboard/index.ts new file mode 100755 index 00000000..da7384fe --- /dev/null +++ b/src/components/CDashboard/index.ts @@ -0,0 +1 @@ +export {default as CDashboard} from './CDashboard.vue' diff --git a/src/components/index.ts b/src/components/index.ts index 43ece151..f934b5a1 100755 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -39,4 +39,5 @@ export * from './CMyUser' export * from './CVerifyTelegram' export * from './CMyFriends' export * from './CMyGroups' +export * from './CDashboard' // export * from './CPreloadImages' diff --git a/src/model/UserStore.ts b/src/model/UserStore.ts index 342fd29e..1d5bc60d 100755 --- a/src/model/UserStore.ts +++ b/src/model/UserStore.ts @@ -30,6 +30,12 @@ export interface IMyGroup { date_blocked?: Date } +export interface ICalcStat { + numUsersReg: number + numMySkills: number + numGroups: number +} + export interface IUserProfile { img?: string nationality?: string @@ -110,6 +116,7 @@ export interface IUserFields { numinvitatiattivi?: number cart?: ICart ordercart?: IOrderCart + calcstat?: ICalcStat|null } /* diff --git a/src/root/home_freeplanet/home_freeplanet.ts b/src/root/home_freeplanet/home_freeplanet.ts index 40521a32..6b88f973 100755 --- a/src/root/home_freeplanet/home_freeplanet.ts +++ b/src/root/home_freeplanet/home_freeplanet.ts @@ -5,6 +5,7 @@ import { import { tools } from '@src/store/Modules/tools' import { CSkill } from '@/components/CSkill' import { CFinder } from '@/components/CFinder' +import { CDashboard } from '@/components/CDashboard' import { CChartMap } from '@src/components/CChartMap' import { CMapsEsempio } from '@src/components/CMapsEsempio' import { CVerifyEmail } from '@src/components/CVerifyEmail' @@ -17,7 +18,7 @@ import MixinBase from '@/mixins/mixin-base' export default defineComponent({ name: 'Home', - components: { CSkill, CChartMap, CMapsEsempio, CFinder, CVerifyEmail, CVerifyTelegram }, + components: { CSkill, CChartMap, CMapsEsempio, CFinder, CVerifyEmail, CVerifyTelegram, CDashboard }, setup() { const globalStore = useGlobalStore() const userStore = useUserStore() diff --git a/src/root/home_freeplanet/home_freeplanet.vue b/src/root/home_freeplanet/home_freeplanet.vue index d38329c1..f89530ce 100755 --- a/src/root/home_freeplanet/home_freeplanet.vue +++ b/src/root/home_freeplanet/home_freeplanet.vue @@ -27,6 +27,8 @@ + + diff --git a/src/root/home_insiemesipuo/home_insiemesipuo.ts b/src/root/home_insiemesipuo/home_insiemesipuo.ts index 40521a32..01af5883 100755 --- a/src/root/home_insiemesipuo/home_insiemesipuo.ts +++ b/src/root/home_insiemesipuo/home_insiemesipuo.ts @@ -6,6 +6,7 @@ import { tools } from '@src/store/Modules/tools' import { CSkill } from '@/components/CSkill' import { CFinder } from '@/components/CFinder' import { CChartMap } from '@src/components/CChartMap' +import { CDashboard } from '@/components/CDashboard' import { CMapsEsempio } from '@src/components/CMapsEsempio' import { CVerifyEmail } from '@src/components/CVerifyEmail' import { CVerifyTelegram } from '@src/components/CVerifyTelegram' @@ -17,7 +18,7 @@ import MixinBase from '@/mixins/mixin-base' export default defineComponent({ name: 'Home', - components: { CSkill, CChartMap, CMapsEsempio, CFinder, CVerifyEmail, CVerifyTelegram }, + components: { CSkill, CChartMap, CMapsEsempio, CFinder, CVerifyEmail, CVerifyTelegram, CDashboard }, setup() { const globalStore = useGlobalStore() const userStore = useUserStore() diff --git a/src/root/home_insiemesipuo/home_insiemesipuo.vue b/src/root/home_insiemesipuo/home_insiemesipuo.vue index a0205069..292b2a67 100755 --- a/src/root/home_insiemesipuo/home_insiemesipuo.vue +++ b/src/root/home_insiemesipuo/home_insiemesipuo.vue @@ -28,6 +28,8 @@ + + diff --git a/src/root/home_pdnm/home_pdnm.ts b/src/root/home_pdnm/home_pdnm.ts index 40521a32..01af5883 100755 --- a/src/root/home_pdnm/home_pdnm.ts +++ b/src/root/home_pdnm/home_pdnm.ts @@ -6,6 +6,7 @@ import { tools } from '@src/store/Modules/tools' import { CSkill } from '@/components/CSkill' import { CFinder } from '@/components/CFinder' import { CChartMap } from '@src/components/CChartMap' +import { CDashboard } from '@/components/CDashboard' import { CMapsEsempio } from '@src/components/CMapsEsempio' import { CVerifyEmail } from '@src/components/CVerifyEmail' import { CVerifyTelegram } from '@src/components/CVerifyTelegram' @@ -17,7 +18,7 @@ import MixinBase from '@/mixins/mixin-base' export default defineComponent({ name: 'Home', - components: { CSkill, CChartMap, CMapsEsempio, CFinder, CVerifyEmail, CVerifyTelegram }, + components: { CSkill, CChartMap, CMapsEsempio, CFinder, CVerifyEmail, CVerifyTelegram, CDashboard }, setup() { const globalStore = useGlobalStore() const userStore = useUserStore() diff --git a/src/root/home_pdnm/home_pdnm.vue b/src/root/home_pdnm/home_pdnm.vue index 67648826..85c8cad8 100755 --- a/src/root/home_pdnm/home_pdnm.vue +++ b/src/root/home_pdnm/home_pdnm.vue @@ -27,6 +27,8 @@ + +
Accedi al Bot Telegram
diff --git a/src/views/user/myprofile/myprofile.vue b/src/views/user/myprofile/myprofile.vue index 73b77aef..726fa242 100755 --- a/src/views/user/myprofile/myprofile.vue +++ b/src/views/user/myprofile/myprofile.vue @@ -1,87 +1,125 @@