Version 0.2.7 (2)

This commit is contained in:
paoloar77
2022-02-21 18:54:16 +01:00
parent 36f53334ed
commit 3f81f85bd4
8 changed files with 22 additions and 14 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

View File

@@ -326,9 +326,9 @@ export default defineComponent({
},
{
label: 'Offro/Cerco',
table: 'adtypegoods',
table: 'adtypes',
key: 'adType',
value: tools.getCookie(tools.COOK_SEARCH + 'adtypegoods', costanti.FILTER_TUTTI),
value: tools.getCookie(tools.COOK_SEARCH + 'adtypes', costanti.FILTER_TUTTI),
arrvalue: [],
addall: true,
type: costanti.FieldType.select,

View File

@@ -74,14 +74,6 @@ export default defineComponent({
load()
}
function getFullFileName(arrimage: IImgGallery[], username: string){
if (arrimage && arrimage.length > 0) {
return 'upload/profile/' + username + '/' + props.table + '/' + arrimage[0].imagefile
} else {
return ''
}
}
onMounted(mounted)
return {
@@ -98,7 +90,6 @@ export default defineComponent({
colCitys,
toolsext,
col,
getFullFileName,
}
}
})

View File

@@ -18,7 +18,7 @@
<q-img
v-if="tools.getValue(myrec, 'photos', '')"
:src="getFullFileName(tools.getValue(myrec, 'photos', ''), myrec.username)" class="img" alt="immagine bene"></q-img>
:src="tools.getFullFileName(tools.getValue(myrec, 'photos', ''), table, myrec.username)" class="img" alt="immagine bene"></q-img>
</div>
<div class="text-center">

View File

@@ -5,6 +5,7 @@ import { costanti } from '@costanti'
import { shared_consts } from '@/common/shared_vuejs'
import { fieldsTable } from '@store/Modules/fieldsTable'
import { tools } from '@store/Modules/tools'
import { toolsext } from '@store/Modules/toolsext'
import { useQuasar } from 'quasar'
import { useI18n } from '@/boot/i18n'
import { CMyCardPopup } from '@/components/CMyCardPopup'
@@ -76,6 +77,7 @@ export default defineComponent({
shared_consts,
userStore,
tools,
toolsext,
fieldsTable,
cmdExt,
visupage,

View File

@@ -1,7 +1,13 @@
<template>
<div class="q-py-xs centermydiv" :style="`min-width: `+ (tools.getwidth($q) - 20) +`px;`">
<q-item v-if="myrec" clickable v-ripple class="shadow-2 q-btn--rounded bg-teal-1">
<q-item-section avatar @click="naviga(`/my/` + myrec.username)">
<q-item-section v-if="(table === toolsext.TABMYGOODS) && (myrec.photos.length > 0)" avatar @click="cmdExt(costanti.CMD_SHOW_PAGE, myrec)">
<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 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

@@ -619,7 +619,7 @@ export const colmyGoods = [
label_trans: 'adTypes.name',
fieldtype: costanti.FieldType.select,
required: true,
jointable: 'adtypegoods',
jointable: 'adtypes',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit,
icon: 'fas fa-bullhorn',
noshowlabel: true,

View File

@@ -5012,6 +5012,15 @@ export const tools = {
return ''
},
getFullFileName(arrimage: IImgGallery[], table: string, username: string) {
if (arrimage && arrimage.length > 0) {
return 'upload/profile/' + username + '/' + table + '/' + arrimage[0].imagefile
} else {
return ''
}
},
// getLocale() {
// if (navigator.languages && navigator.languages.length > 0) {
// return navigator.languages[0]