Settore se compariva "Tutti", veniva selezionato erroneamente di default -100

Risolto caricamento immagini
Cliccando sull'immagine del profilo, nella Card, non si apre il Profilo
Aggiunto "Estero" e "On Line" sul campo Comune.
Orientamento dell'Immagine. viene storta una volta ridimensionata.
Al momento della registrazione, dal BOT, in automatico viene presa l'immagine di Telegram e salvata sul proprio profilo della APP.
This commit is contained in:
paoloar77
2022-03-01 23:50:47 +01:00
parent d8b5bda0ce
commit 1c22d5e8d4
39 changed files with 467 additions and 282 deletions

View File

@@ -0,0 +1,29 @@
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 { costanti } from '@store/Modules/costanti'
import { static_data } from '@src/db/static_data'
export default defineComponent({
name: 'CCheckIfIsLogged',
components: { },
props: {},
setup(props, { emit }) {
const userStore = useUserStore()
const $router = useRouter()
const globalStore = useGlobalStore()
const { t } = useI18n()
return {
userStore,
tools,
costanti,
static_data,
}
}
})

View File

@@ -0,0 +1,31 @@
<template>
<div v-if="!tools.isLogged()">
<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="!tools.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>
</template>
<script lang="ts" src="./CCheckIfIsLogged.ts">
</script>
<style lang="scss" scoped>
@import './CCheckIfIsLogged.scss';
</style>

View File

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

View File

@@ -343,7 +343,7 @@ export default defineComponent({
function getUrl() {
const myurl = tools.geturlupload() + getParamDir()
// console.log('myurl', myurl)
console.log('myurl', myurl)
return myurl
}

View File

@@ -5,6 +5,7 @@ import { CTitleBanner } from '@/components/CTitleBanner'
import { CProfile } from '@/components/CProfile'
import { CDateTime } from '@/components/CDateTime'
import { CMyPage } from '@/components/CMyPage'
import { CCheckIfIsLogged } from '@/components/CCheckIfIsLogged'
import { CMyFieldRec } from '@/components/CMyFieldRec'
import { tools } from '@store/Modules/tools'
import { useUserStore } from '@store/UserStore'
@@ -19,7 +20,7 @@ import { colCitys, fieldsTable } from '@store/Modules/fieldsTable'
export default defineComponent({
name: 'CMyCardGrpPopup',
components: { CProfile, CTitleBanner, CMyFieldDb, CDateTime, CMyPage, CMyFieldRec },
components: { CProfile, CTitleBanner, CMyFieldDb, CDateTime, CMyPage, CMyFieldRec, CCheckIfIsLogged },
props: {
table: {
type: String,
@@ -54,7 +55,7 @@ export default defineComponent({
function load() {
// Carica il profilo di quest'utente
if (props.idRec > 0) {
if (props.idRec && props.idRec > 0) {
userStore.loadGeneric(props.table, props.idRec).then((ris) => {
myrec.value = ris
})

View File

@@ -1,4 +1,7 @@
<template>
<div v-if="!tools.isLogged()">
<CCheckIfIsLogged></CCheckIfIsLogged>
</div>
<q-card class="dialog_card q-mb-lg" v-if="myrec">
<q-footer

View File

@@ -627,8 +627,18 @@ export default defineComponent({
}
function getDirectoryGall() {
let ris = ''
let username = myrow.value.hasOwnProperty('username') ? myrow.value['username'] : ''
let userId = myrow.value.hasOwnProperty('userId') ? myrow.value['userId'] : ''
if (username === '') {
if (userId === userStore.my._id)
username = userStore.my.username
}
if (username === '') {
username = userStore.my.username
}
if (fieldsTable.tableForUsers.includes(props.table)) {
ris = 'profile/' + myrow.value['username'] + '/' + props.table
ris = 'profile/' + username + '/' + props.table
}else if (props.table === 'users') {
ris = 'profile/' + userStore.my.username
}else if (props.table === 'mygroups') {
@@ -637,6 +647,7 @@ export default defineComponent({
} else {
ris = props.table
}
console.log('getDirectoryGall', ris)
return ris
}

View File

@@ -9,7 +9,7 @@ import { toolsext } from '@store/Modules/toolsext'
import { useQuasar } from 'quasar'
import { useI18n } from '@/boot/i18n'
import { CMyCardPopup } from '@/components/CMyCardPopup'
// import { useRouter } from 'vue-router'
import { useRouter } from 'vue-router'
export default defineComponent({
name: 'CMyRecCard',
@@ -32,7 +32,7 @@ export default defineComponent({
const userStore = useUserStore()
// const $q = useQuasar()
const { t } = useI18n()
// const $router = useRouter()
const $router = useRouter()
const myrec = ref(<any | null>null)
@@ -61,9 +61,9 @@ export default defineComponent({
return userStore.getImgByProfile(profile)
}
/*function naviga(path: string) {
function naviga(path: string) {
$router.push(path)
}*/
}
function setCmd($q: any, cmd: number, myusername: string, value: any, groupname: string) {
emit('setCmd', $q, cmd, myusername, value, groupname)
@@ -80,7 +80,7 @@ export default defineComponent({
myrec,
costanti,
getImgUser,
// naviga,
naviga,
setCmd,
shared_consts,
userStore,

View File

@@ -3,14 +3,21 @@
<q-item v-if="myrec" clickable v-ripple class="shadow-2 q-btn--rounded bg-teal-1">
<q-item-section v-if="(shared_consts.TABLES_VISU_IMG.includes(table)) && (myrec.photos.length > 0)" avatar
@click="cmdExt(costanti.CMD_SHOW_PAGE, myrec)">
<q-badge v-if="showBadge" class="q-my-xs self-center" :color="fieldsTable.getColByAdType(myrec.adType)">
{{ fieldsTable.getValByTabAndId(table, 'adType', myrec.adType) }}
<q-icon :name="fieldsTable.getIconByAdType(myrec.adType)" color="white"
class="q-ml-xs"/>
</q-badge>
<q-avatar size="60px">
<q-img :src="tools.getFullFileName(myrec.photos, table, myrec.username, '')" :alt="myrec.descr"
img-class="imgprofile" height="60px"/>
</q-avatar>
</q-item-section>
<q-item-section v-else avatar @click="naviga(`/my/` + myrec.username)">
<q-badge v-if="showBadge" class="q-my-xs self-center" :color="fieldsTable.getColByAdType(myrec.adType)">
{{ fieldsTable.getValByTabAndId(table, 'adType', myrec.adType) }}
<q-icon :name="fieldsTable.getIconByAdType(myrec.adType)" color="white"

View File

@@ -21,6 +21,7 @@ export * from './CProfile'
export * from './CProvaPao'
export * from './CSignIn'
export * from './CSigninNoreg'
export * from './CCheckIfIsLogged'
export * from './CSignUp'
export * from './CSingleCart'
export * from './CTitle'