Se aggiungo un campo nuovo, non viene visualizzato il campo, sistemare il cookie come viene gestito

Aggiungere campo Offro/Cerco
Aggiungere HOME con pulsantoni grandi
Aggiunto Link per condividere la APP ai propri Amici
This commit is contained in:
paoloar77
2022-02-12 17:02:10 +01:00
parent b21a7d1885
commit 02048b58ad
37 changed files with 483 additions and 25 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

View File

View File

@@ -0,0 +1,45 @@
import { defineComponent, ref, computed, PropType, toRef } from 'vue'
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: 'CBigBtn',
components: {},
props: {
label: {
type: String,
required: true
},
to: {
type: String,
required: false,
default: ''
},
icon: {
type: String,
required: false,
default: ''
},
color: {
type: String,
required: false,
default: 'grey'
},
},
setup(props, { emit }) {
const userStore = useUserStore()
const $router = useRouter()
const globalStore = useGlobalStore()
const { t } = useI18n();
return {
userStore,
tools,
}
}
})

View File

@@ -0,0 +1,17 @@
<template>
<div class="q-pa-xs col-xs-6 col-sm-6 col-md-4 col-lg-2">
<div class="q-ma-sm">
<q-btn :color="color" rounded :to="to" v-bind="$attrs">
<q-icon class="q-ma-sm" size="4em" :name="icon"/>
<div class="q-ma-sm text-h5">{{ label }}</div>
</q-btn>
</div>
</div>
</template>
<script lang="ts" src="./CBigBtn.ts">
</script>
<style lang="scss" scoped>
@import './CBigBtn.scss';
</style>

View File

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

View File

@@ -343,7 +343,7 @@
</q-form> </q-form>
</q-card-section> </q-card-section>
<q-card-actions align="right"> <q-card-actions align="right">
<q-btn flat :label="$t('dialog.ok')" color="primary" @click="saveEvent"></q-btn> <q-btn :label="$t('dialog.ok')" color="primary" @click="saveEvent"></q-btn>
<q-btn flat :label="$t('dialog.cancel')" color="primary" v-close-popup></q-btn> <q-btn flat :label="$t('dialog.cancel')" color="primary" v-close-popup></q-btn>
</q-card-actions> </q-card-actions>
</q-card> </q-card>

View File

@@ -252,6 +252,7 @@ export default defineComponent({
let returnedData: any = ref([]) let returnedData: any = ref([])
let returnedCount = 0 let returnedCount = 0
const colVisib: any = ref([]) const colVisib: any = ref([])
const colNotVisib: any = ref([])
const colExtra: any = ref([]) const colExtra: any = ref([])
const rowclicksel = ref(<any>null) const rowclicksel = ref(<any>null)
@@ -816,6 +817,7 @@ export default defineComponent({
// console.log('updatedcol') // console.log('updatedcol')
if (mycolumns.value) { if (mycolumns.value) {
colVisib.value = [] colVisib.value = []
colNotVisib.value = []
colExtra.value = [] colExtra.value = []
mycolumns.value.forEach((elem: IColGridTable) => { mycolumns.value.forEach((elem: IColGridTable) => {
@@ -824,6 +826,8 @@ export default defineComponent({
if (elem.field !== costanti.NOFIELD) { if (elem.field !== costanti.NOFIELD) {
if (checkIfColShow(elem.field)) { if (checkIfColShow(elem.field)) {
colVisib.value.push(elem.field + mysub) colVisib.value.push(elem.field + mysub)
} else {
colNotVisib.value.push(elem.field + mysub)
} }
} }
@@ -1041,7 +1045,23 @@ export default defineComponent({
function changeCol(newval: any) { function changeCol(newval: any) {
// console.log('changecol', mytable.value) // console.log('changecol', mytable.value)
if (!!mytable.value) { if (!!mytable.value) {
tools.setCookie(mytable.value, colVisib.value.join('|')) let arrcol = []
let col: IColGridTable = {name: ''}
for (col of mycolumns.value) {
if (col.field !== costanti.NOFIELD) {
let obj = {
n: col.field + (col.subfield ? col.subfield : ''),
v: 0
}
obj.v = colVisib.value.includes(obj.n) ? 1 : 0
if (obj.v === 0) {
// scrive solo quelli da nascondere !
arrcol.push(obj.n + ',' + obj.v)
}
}
}
tools.setCookie(mytable.value + '_', arrcol.join('|'))
} }
} }
@@ -1100,17 +1120,46 @@ export default defineComponent({
updatedcol() updatedcol()
if (!!mytable.value) { if (!!mytable.value) {
const myselcol = tools.getCookie(mytable.value, '') // Leggi la lista delle colonne visibili:
const myselcol = tools.getCookie(mytable.value + '_', '')
colVisib.value = []
let elem: IColGridTable
for (elem of mycolumns.value) {
if (elem.field !== costanti.NOFIELD) {
if (checkIfColShow(elem.field)) {
colVisib.value.push(elem.field! + elem.subfield!)
}
}
}
if (!!myselcol && myselcol.length > 0) { if (!!myselcol && myselcol.length > 0) {
colVisib.value = myselcol.split('|') const arrselcol = myselcol.split('|')
} else {
mycolumns.value.forEach((elem: any) => { for (const col of arrselcol) {
if (elem.field !== costanti.NOFIELD) { const arrv = col.split(',')
if (checkIfColShow(elem.field)) { if (arrv.length > 1) {
colVisib.value.push(elem.field + elem.subfield) let field = arrv[0]
let visib = arrv[1]
const rec = mycolumns.value.find((rec: any) => (rec.field + rec.subfield) === field)
if (rec) {
if (field) {
if (visib === '1') {
if (!colVisib.value.includes(field))
colVisib.value.push(field) // se non incluso allora lo aggiungi
} else if (visib === '0') {
// Se da togliere, lo togli
if (colVisib.value.includes(field))
colVisib.value = colVisib.value.filter((rec: any) => rec !== field)
}
}
} }
} }
}) }
} }
} }

View File

@@ -349,7 +349,10 @@
<q-card :class="props.selected ? 'bg-grey-2 my-card-withshadow no-padding' : 'my-card-withshadow no-padding'" <q-card :class="props.selected ? 'bg-grey-2 my-card-withshadow no-padding' : 'my-card-withshadow no-padding'"
style="background: radial-gradient(circle, #ffffff 0%, #bbddff 100%)"> style="background: radial-gradient(circle, #ffffff 0%, #bbddff 100%)">
<q-bar v-if="!visuinpage && canModifyThisRec(props.row)" dense class="bg-primary text-white full-height"> <q-bar v-if="!visuinpage && canModifyThisRec(props.row)" dense class="bg-primary text-white full-height">
<span v-if="props.row['username']">{{props.row['username']}}</span> <q-badge v-if="props.row['adType']" :color="props.row['adType'] === 1 ? 'green' : 'red'">
{{ fieldsTable.getValByTabAndId(tablesel, 'adType', props.row['adType']) }}<q-icon :name="props.row['adType'] === 1 ? 'fas fa-street-view' : 'fas fa-search'" color="white" class="q-ml-xs" />
</q-badge>
<q-space/> <q-space/>
<q-btn <q-btn
@@ -464,7 +467,7 @@
<div <div
v-for="col in mycolumns" :key="col.name" class="newrec_fields"> v-for="col in mycolumns" :key="col.name" class="newrec_fields">
<div <div
v-if="showColCheck(col, tools.TIPOVIS_NEW_RECORD, true, 0, newRecord) && col.foredit"> v-if="showColCheck(col, tools.TIPOVIS_NEW_RECORD, true, 0, newRecord) && col.foredit ">
<div class=""> <div class="">
<CMyPopupEdit <CMyPopupEdit
:table="mytable" :table="mytable"
@@ -490,7 +493,7 @@
</div> </div>
</q-card-section> </q-card-section>
<q-card-actions align="center"> <q-card-actions align="center">
<q-btn flat :label="$t('dialog.ok')" color="primary" @click="saveNewRecord"></q-btn> <q-btn :label="$t('dialog.ok')" color="primary" @click="saveNewRecord"></q-btn>
<q-btn flat :label="$t('dialog.cancel')" color="primary" v-close-popup @click="annulla"></q-btn> <q-btn flat :label="$t('dialog.cancel')" color="primary" v-close-popup @click="annulla"></q-btn>
</q-card-actions> </q-card-actions>
</q-card> </q-card>
@@ -530,7 +533,7 @@
</div> </div>
</q-card-section> </q-card-section>
<q-card-actions align="center"> <q-card-actions align="center">
<q-btn flat :label="$t('dialog.ok')" color="primary" @click="saverecModif"></q-btn> <q-btn :label="$t('dialog.ok')" color="primary" @click="saverecModif"></q-btn>
<q-btn flat :label="$t('dialog.cancel')" color="primary" @click="cancelrecModif"></q-btn> <q-btn flat :label="$t('dialog.cancel')" color="primary" @click="cancelrecModif"></q-btn>
</q-card-actions> </q-card-actions>
</q-card> </q-card>

View File

View File

@@ -0,0 +1,26 @@
import { defineComponent, ref, computed, PropType, toRef } from 'vue'
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'
import { CBigBtn } from '@/components/CBigBtn'
export default defineComponent({
name: 'CMainView',
components: { CBigBtn },
props: {},
setup(props, { emit }) {
const userStore = useUserStore()
const $router = useRouter()
const globalStore = useGlobalStore()
const { t } = useI18n()
return {
userStore,
tools,
}
}
})

View File

@@ -0,0 +1,34 @@
<template>
<div>
<div class="row q-ma-sm shadow" style="border-radius: 4px;border: 1px solid rgba(0, 0, 0, 0.12);">
<CBigBtn
label="Lavoro" to="/work" icon="fas fa-bullhorn" color="blue">
</CBigBtn>
<CBigBtn
label="Scuola" to="/school" icon="fas fa-book-reader" color="orange" disable>
</CBigBtn>
<CBigBtn
label="Luoghi" to="/places" icon="fas fa-map-marker-alt" color="blue-grey" disable>
</CBigBtn>
<CBigBtn
label="Mobilità" to="/mobility" icon="fas fa-car-side" color="red" disable>
</CBigBtn>
<CBigBtn
label="Alimentari" to="/grocery" icon="fas fa-utensils" color="green" disable>
</CBigBtn>
<CBigBtn
label="Socializza" to="/socialising" icon="fas fa-users" color="purple" disable>
</CBigBtn>
</div>
<div class="text-center">P.S: Attualmente è attivo solo il bottone <b>Lavoro</b>.<br>
Gli altri verranno attivati nei prossimi giorni.</div>
</div>
</template>
<script lang="ts" src="./CMainView.ts">
</script>
<style lang="scss" scoped>
@import './CMainView.scss';
</style>

View File

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

View File

@@ -40,7 +40,7 @@
</form> </form>
</q-card-section> </q-card-section>
<q-card-actions v-if="showButtons" align="center"> <q-card-actions v-if="showButtons" align="center">
<q-btn v-if="canModify" flat :label="$t('dialog.ok')" color="primary" @click="saveval"></q-btn> <q-btn v-if="canModify" :label="$t('dialog.ok')" color="primary" @click="saveval"></q-btn>
<q-btn v-if="canModify" flat :label="$t('dialog.cancel')" color="primary" v-close-popup @click="annulla"></q-btn> <q-btn v-if="canModify" flat :label="$t('dialog.cancel')" color="primary" v-close-popup @click="annulla"></q-btn>
<q-btn v-if="!canModify" :label="$t('dialog.ok')" color="primary" v-close-popup></q-btn> <q-btn v-if="!canModify" :label="$t('dialog.ok')" color="primary" v-close-popup></q-btn>
</q-card-actions> </q-card-actions>

View File

@@ -705,6 +705,7 @@ export default defineComponent({
noPopupeditByCol, noPopupeditByCol,
getTitleEditor, getTitleEditor,
getToByCol, getToByCol,
t,
} }
} }
}) })

View File

@@ -417,9 +417,10 @@
</div> </div>
<div v-else-if="col.fieldtype === costanti.FieldType.html"> <div v-else-if="col.fieldtype === costanti.FieldType.html">
<div v-if="isInModif"> <div v-if="isInModif">
<p v-if="isInModif" class="text-center"> <q-bar v-if="isInModif" dense class="bg-primary text-white">
{{ $t('event.testo_di_spiegazione') }}: <span v-if="col.label_trans">{{t(col.label_trans)}}</span><span v-else> {{ $t('event.testo_di_spiegazione') }}: </span>
</p> <q-space/>
</q-bar>
<div v-if="!isFieldDb()"> <div v-if="!isFieldDb()">
<CMyEditor <CMyEditor
v-model:value="myvalue" :title="!isInModif ? getTitleEditor(col, row) : ''" @keyup.enter.stop v-model:value="myvalue" :title="!isInModif ? getTitleEditor(col, row) : ''" @keyup.enter.stop

View File

@@ -40,4 +40,6 @@ export * from './CVerifyTelegram'
export * from './CMyFriends' export * from './CMyFriends'
export * from './CMyGroups' export * from './CMyGroups'
export * from './CDashboard' export * from './CDashboard'
export * from './CMainView'
export * from './CBigBtn'
// export * from './CPreloadImages' // export * from './CPreloadImages'

View File

@@ -374,7 +374,8 @@ const baseroutes: IListRoutes[] = [
path: '/', path: '/',
materialIcon: 'home', materialIcon: 'home',
name: 'pages.home', name: 'pages.home',
component: () => import('@src/root/home_pdnm/home_pdnm.vue'), //component: () => import('@src/root/home_pdnm/home_pdnm.vue'),
component: () => import('@src/root/mainview/mainview.vue'),
reqauth: false, reqauth: false,
inmenu: true, inmenu: true,
infooter: true, infooter: true,
@@ -423,6 +424,17 @@ const baseroutes: IListRoutes[] = [
inmenu: true, inmenu: true,
infooter: true, infooter: true,
}, },
{
active: true,
order: 130,
path: '/work',
materialIcon: 'fas fa-bullhorn',
name: 'mypages.work',
component: () => import('@/root/work/work.vue'),
meta: { requiresAuth: true },
inmenu: true,
infooter: true,
},
{ {
active: functionality.ENABLE_GROUPS, active: functionality.ENABLE_GROUPS,
order: 132, order: 132,

View File

@@ -193,5 +193,6 @@ export default function () {
TelegVerificato, TelegVerificato,
isVerified, isVerified,
paotest, paotest,
getRefLink,
} }
} }

View File

70
src/root/mainview/mainview.ts Executable file
View File

@@ -0,0 +1,70 @@
import {
defineComponent, ref, computed,
} from 'vue'
import { tools } from '@src/store/Modules/tools'
import { CSkill } from '@/components/CSkill'
import { CMainView } from '@/components/CMainView'
import { CDashboard } from '@/components/CDashboard'
import { CChartMap } from '@src/components/CChartMap'
import { CUserNonVerif } from '@/components/CUserNonVerif'
import { CCopyBtn } from '@/components/CCopyBtn'
import { CMapsEsempio } from '@src/components/CMapsEsempio'
import { CVerifyEmail } from '@src/components/CVerifyEmail'
import { CVerifyTelegram } from '@src/components/CVerifyTelegram'
import { useGlobalStore } from '@store/globalStore'
import { useUserStore } from '@store/UserStore'
import { static_data } from '@/db/static_data'
import MixinBase from '@/mixins/mixin-base'
import MixinUsers from '@/mixins/mixin-users'
export default defineComponent({
name: 'mainview',
components: { CSkill, CChartMap, CMapsEsempio, CVerifyEmail, CVerifyTelegram, CDashboard, CUserNonVerif, CMainView, CCopyBtn },
setup() {
const globalStore = useGlobalStore()
const userStore = useUserStore()
const { getValDb } = MixinBase()
const { isEmailVerified, TelegVerificato } = MixinUsers()
const { getRefLink } = MixinUsers()
function TelegCode() {
return userStore.my.profile.teleg_checkcode
}
function openrighttoolbar() {
globalStore.rightDrawerOpen = true
}
function isLogged() {
return userStore.isLogged
}
function isUserOk() {
return userStore.isUserOk()
}
function getLinkBotTelegram(): string {
if ( tools.isTest() && !process.env.DEV) {
return getValDb('TELEG_BOT_LINK_TEST', false)
} else{
return getValDb('TELEG_BOT_LINK', false)
}
}
return {
tools,
static_data,
isEmailVerified,
TelegCode,
TelegVerificato,
isLogged,
openrighttoolbar,
isUserOk,
getLinkBotTelegram,
getRefLink,
userStore,
}
},
})

77
src/root/mainview/mainview.vue Executable file
View File

@@ -0,0 +1,77 @@
<template>
<q-page class="">
<!--<CChartMap
title="Mappa"
subtitle="cartina..."
serie1="Serie 1"
>
</CChartMap>-->
<!--<CMapsEsempio></CMapsEsempio>-->
<div v-if="isLogged()">
<CVerifyTelegram v-if="TelegCode() || !TelegVerificato()">
</CVerifyTelegram>
<CVerifyEmail v-if="!isEmailVerified()">
</CVerifyEmail>
<div v-if="isUserOk()">
<CMainView></CMainView>
<CDashboard></CDashboard>
<CCopyBtn v-if="userStore.my.username" :title="$t('reg.link_reg')" :texttocopy="getRefLink(userStore.my.username)">
</CCopyBtn>
</div>
<div v-else>
<CUserNonVerif></CUserNonVerif>
</div>
</div>
<div v-else>
<div class="q-pa-md q-gutter-sm">
<q-banner rounded class="bg-primary text-white">
<div class="text-h6 text-center">
Accedi al menu inserendo le tue credenziali 🔑<br><br>
📝 Non sei <strong>Registrato</strong>?<br>
👉🏻 Chiedi in chat il link a chi ti ha <strong>invitato</strong>.<br>
</div>
<template v-slot:action>
<q-btn flat color="white" label="Accedi al Login" @click="openrighttoolbar"/>
</template>
</q-banner>
</div>
<div
v-if="!isLogged() && static_data.functionality.ENABLE_REGISTRATION && static_data.functionality.SHOW_REG_BUTTON"
style="margin:20px; text-align: center;">
<q-btn rounded size="lg" color="primary" @click="openrighttoolbar">{{ $t('login.enter') }}
</q-btn>
</div>
<!--
<div v-if="!isLogged && static_data.functionality.ENABLE_REGISTRATION" align="center" style="margin:20px;">
<q-btn rounded size="lg" color="primary" to="/signup">{{$t('reg.submit')}}
</q-btn>
</div>
-->
</div>
</q-page>
</template>
<script lang="ts" src="./mainview.ts">
</script>
<style lang="scss" scoped>
@import './mainview.scss';
</style>

0
src/root/work/work.scss Executable file
View File

65
src/root/work/work.ts Executable file
View File

@@ -0,0 +1,65 @@
import {
defineComponent, ref, computed,
} from 'vue'
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 { CUserNonVerif } from '@/components/CUserNonVerif'
import { CMapsEsempio } from '@src/components/CMapsEsempio'
import { CVerifyEmail } from '@src/components/CVerifyEmail'
import { CVerifyTelegram } from '@src/components/CVerifyTelegram'
import { useGlobalStore } from '@store/globalStore'
import { useUserStore } from '@store/UserStore'
import { static_data } from '@/db/static_data'
import MixinBase from '@/mixins/mixin-base'
import MixinUsers from '@/mixins/mixin-users'
export default defineComponent({
name: 'work',
components: { CSkill, CChartMap, CMapsEsempio, CFinder, CVerifyEmail, CVerifyTelegram, CDashboard, CUserNonVerif },
setup() {
const globalStore = useGlobalStore()
const userStore = useUserStore()
const { getValDb } = MixinBase()
const { isEmailVerified, TelegVerificato } = MixinUsers()
function TelegCode() {
return userStore.my.profile.teleg_checkcode
}
function openrighttoolbar() {
globalStore.rightDrawerOpen = true
}
function isLogged() {
return userStore.isLogged
}
function isUserOk() {
return userStore.isUserOk()
}
function getLinkBotTelegram(): string {
if ( tools.isTest() && !process.env.DEV) {
return getValDb('TELEG_BOT_LINK_TEST', false)
} else{
return getValDb('TELEG_BOT_LINK', false)
}
}
return {
tools,
static_data,
isEmailVerified,
TelegCode,
TelegVerificato,
isLogged,
openrighttoolbar,
isUserOk,
getLinkBotTelegram,
}
},
})

28
src/root/work/work.vue Executable file
View File

@@ -0,0 +1,28 @@
<template>
<q-page class="">
<div v-if="isLogged()">
<div v-if="isUserOk()">
<CFinder>
</CFinder>
<CDashboard></CDashboard>
</div>
<div v-else>
<CUserNonVerif></CUserNonVerif>
</div>
</div>
</q-page>
</template>
<script lang="ts" src="./work.ts">
</script>
<style lang="scss" scoped>
@import './work.scss';
</style>

View File

@@ -431,6 +431,7 @@ const msg_it = {
teleg_id_old: 'OLD Tel ID', teleg_id_old: 'OLD Tel ID',
teleg_auth: 'Codice Autorizzazione', teleg_auth: 'Codice Autorizzazione',
click_per_copiare: 'Cliccaci sopra per copiarlo sugli appunti', click_per_copiare: 'Cliccaci sopra per copiarlo sugli appunti',
link_reg: 'Clicca per copiare il link da condividere agli Amici',
copia_messaggio: 'Copia Messaggio', copia_messaggio: 'Copia Messaggio',
teleg_torna_sul_bot: '1) Copia il codice cliccando sul bottone qui sopra<br>2) torna su {botname} cliccando qui sotto 👇 ed incolla (o scrivi) il codice', teleg_torna_sul_bot: '1) Copia il codice cliccando sul bottone qui sopra<br>2) torna su {botname} cliccando qui sotto 👇 ed incolla (o scrivi) il codice',
teleg_checkcode: 'Codice Telegram', teleg_checkcode: 'Codice Telegram',
@@ -874,6 +875,7 @@ const msg_it = {
follow_groups: 'Gruppi che Seguo', follow_groups: 'Gruppi che Seguo',
create_group: 'Crea Gruppo', create_group: 'Crea Gruppo',
friends: 'Amici', friends: 'Amici',
work: 'Lavoro',
groups: 'Gruppi', groups: 'Gruppi',
request_friends: 'Rich. Amicizia', request_friends: 'Rich. Amicizia',
request_sent_friends: 'Rich. Inviate', request_sent_friends: 'Rich. Inviate',
@@ -911,6 +913,9 @@ const msg_it = {
finder: { finder: {
search_skill: 'Cerca una specializzazione' search_skill: 'Cerca una specializzazione'
}, },
adTypes: {
name: 'Tipo',
}
}, },
}; };

View File

@@ -2,6 +2,7 @@ import { IColGridTable } from '@model'
import { useUserStore } from '@store/UserStore' import { useUserStore } from '@store/UserStore'
import { lists } from './lists' import { lists } from './lists'
import { costanti } from './costanti' import { costanti } from './costanti'
import { useGlobalStore } from '@store/globalStore'
const DeleteRec = { const DeleteRec = {
name: 'deleterec', name: 'deleterec',
@@ -531,14 +532,14 @@ export const colmySkills = [
// AddCol({ name: 'subTitle', label_trans: 'event.title', fieldtype: costanti.FieldType.string, // AddCol({ name: 'subTitle', label_trans: 'event.title', fieldtype: costanti.FieldType.string,
// showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit , maxlength: 70, noshowlabel: true }), // showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit , maxlength: 70, noshowlabel: true }),
AddCol({ AddCol({
name: 'adTypes', name: 'adType',
label_trans: 'adTypes.name', label_trans: 'adTypes.name',
fieldtype: costanti.FieldType.select, fieldtype: costanti.FieldType.select,
required: true, required: true,
jointable: 'adtypes', jointable: 'adtypes',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist, showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit,
icon: 'fas fa-bullhorn',
noshowlabel: true, noshowlabel: true,
icon: 'grading',
}), }),
AddCol({ name: 'descr', label_trans: 'proj.shortdescr', fieldtype: costanti.FieldType.string, AddCol({ name: 'descr', label_trans: 'proj.shortdescr', fieldtype: costanti.FieldType.string,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist, noshowlabel: true, maxlength: 200 }), showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist, noshowlabel: true, maxlength: 200 }),
@@ -1068,6 +1069,15 @@ export const fieldsTable = {
} }
return 'label' return 'label'
}, },
getValByTabAndId(table: string, field: string, idvalue: any) {
const globalStore = useGlobalStore()
const col = fieldsTable.getColByTable(table, field)
if (col) {
return globalStore.getValueByTable(col, idvalue)
}
return ''
},
getTitleByTable(mytable: string): string { getTitleByTable(mytable: string): string {
const myrec = this.getrecTableList(mytable) const myrec = this.getrecTableList(mytable)
if (myrec) return myrec.label if (myrec) return myrec.label

View File

@@ -1332,8 +1332,8 @@ export const useGlobalStore = defineStore('GlobalStore', {
} }
if (key === 'username') { if (key === 'username') {
console.log('key=', key, 'collab', collab, 'val', val) // console.log('key=', key, 'collab', collab, 'val', val)
console.log('myris', risultato) // console.log('myris', risultato)
} }
return risultato return risultato

View File

@@ -1,6 +1,7 @@
import { CMyFieldDb } from '@/components/CMyFieldDb' import { CMyFieldDb } from '@/components/CMyFieldDb'
import { CTitleBanner } from '@/components/CTitleBanner' import { CTitleBanner } from '@/components/CTitleBanner'
import { CProfile } from '@/components/CProfile' import { CProfile } from '@/components/CProfile'
import { CCopyBtn } from '@/components/CCopyBtn'
import { CSkill } from '@/components/CSkill' import { CSkill } from '@/components/CSkill'
import { CDateTime } from '@/components/CDateTime' import { CDateTime } from '@/components/CDateTime'
import { tools } from '@store/Modules/tools' import { tools } from '@store/Modules/tools'
@@ -15,11 +16,12 @@ import { costanti } from '@costanti'
import { IUserFields } from 'model' import { IUserFields } from 'model'
import { shared_consts } from '@/common/shared_vuejs' import { shared_consts } from '@/common/shared_vuejs'
import { static_data } from '@/db/static_data' import { static_data } from '@/db/static_data'
import MixinUsers from '@/mixins/mixin-users'
export default defineComponent({ export default defineComponent({
name: 'myprofile', name: 'myprofile',
components: { CProfile, CTitleBanner, CMyFieldDb, CSkill, CDateTime }, components: { CProfile, CTitleBanner, CMyFieldDb, CSkill, CDateTime, CCopyBtn },
props: {}, props: {},
setup() { setup() {
const userStore = useUserStore() const userStore = useUserStore()
@@ -27,6 +29,8 @@ export default defineComponent({
const $q = useQuasar() const $q = useQuasar()
const { t } = useI18n() const { t } = useI18n()
const { getRefLink } = MixinUsers()
const animation = ref('fade') const animation = ref('fade')
const username = computed(() => $route.params.username ? $route.params.username.toString() : userStore.my.username) const username = computed(() => $route.params.username ? $route.params.username.toString() : userStore.my.username)
@@ -114,6 +118,7 @@ export default defineComponent({
static_data, static_data,
animation, animation,
isMyRecord, isMyRecord,
getRefLink,
} }
} }
}) })

View File

@@ -81,6 +81,11 @@
:href="getLinkWebSite()" target="__blank"> :href="getLinkWebSite()" target="__blank">
</q-btn> </q-btn>
</div> </div>
<CCopyBtn :title="$t('reg.link_reg')" :texttocopy="getRefLink(username)">
</CCopyBtn>
</div> </div>
</div> </div>
<div v-else class="fit column no-wrap justify-evenly items-center content-start"> <div v-else class="fit column no-wrap justify-evenly items-center content-start">