Revert "nuova veste grafica: myskills, mygoods, mybachecas, myhosps,"
This reverts commit 6fad472211.
This commit is contained in:
@@ -68,7 +68,7 @@ export default defineComponent({
|
||||
})
|
||||
|
||||
function created() {
|
||||
// console.log('created CAccomodation', props.mylist)
|
||||
console.log('created CAccomodation', props.mylist)
|
||||
if (isValid(props.mylist)) {
|
||||
// @ts-ignore
|
||||
let myarr: any = props.mylist
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="">
|
||||
|
||||
<div class="bordo_stondato_blu">
|
||||
<CTitleBanner class="column" title="Tipi di ospitalità"></CTitleBanner>
|
||||
|
||||
<div class="">
|
||||
<q-btn
|
||||
|
||||
@@ -81,7 +81,6 @@ export default defineComponent({
|
||||
const myoptions = ref(<any>[])
|
||||
|
||||
|
||||
|
||||
const col = ref(<IColGridTable>{})
|
||||
|
||||
/*
|
||||
@@ -150,7 +149,7 @@ export default defineComponent({
|
||||
else if (props.table === toolsext.TABUSER)
|
||||
return userStore.getMypaginationMembers()
|
||||
else if (shared_consts.TABLES_ORDER_DATE_UPDATED.includes(props.table))
|
||||
return { sortBy: 'date_updated', descending: true, page: 1, rowsNumber: 0, rowsPerPage: 10 } // date_updated
|
||||
return { sortBy: 'date_created', descending: true, page: 1, rowsNumber: 0, rowsPerPage: 10 } // date_updated
|
||||
else if (shared_consts.TABLES_ORDER_DESCR.includes(props.table))
|
||||
return { sortBy: 'desc', descending: false, page: 1, rowsNumber: 0, rowsPerPage: 10 }
|
||||
|
||||
@@ -1160,8 +1159,6 @@ export default defineComponent({
|
||||
idStatusSkill: 1,
|
||||
idContribType: 1,
|
||||
'profile.username_telegram': 1,
|
||||
'profile.favorite': 1,
|
||||
'profile.bookmark': 1,
|
||||
idCity: 1,
|
||||
pub_to_share: 1,
|
||||
numLevel: 1,
|
||||
@@ -1187,7 +1184,7 @@ export default defineComponent({
|
||||
reported: 1,
|
||||
date_report: 1,
|
||||
username_who_report: 1,
|
||||
}
|
||||
}
|
||||
},
|
||||
lookup3: {
|
||||
lk_tab: 'sectorgoods',
|
||||
@@ -1231,8 +1228,6 @@ export default defineComponent({
|
||||
idStatusSkill: 1,
|
||||
idContribType: 1,
|
||||
'profile.username_telegram': 1,
|
||||
'profile.favorite': 1,
|
||||
'profile.bookmark': 1,
|
||||
idCity: 1,
|
||||
pub_to_share: 1,
|
||||
dateTimeStart: 1,
|
||||
@@ -1260,7 +1255,7 @@ export default defineComponent({
|
||||
reported: 1,
|
||||
date_report: 1,
|
||||
username_who_report: 1,
|
||||
}
|
||||
}
|
||||
},
|
||||
lookup3: {
|
||||
lk_tab: toolsext.TABSECTORS,
|
||||
@@ -1310,8 +1305,6 @@ export default defineComponent({
|
||||
preferences: 1,
|
||||
idContribType: 1,
|
||||
'profile.username_telegram': 1,
|
||||
'profile.favorite': 1,
|
||||
'profile.bookmark': 1,
|
||||
photos: 1,
|
||||
idCity: 1,
|
||||
pub_to_share: 1,
|
||||
@@ -1329,7 +1322,7 @@ export default defineComponent({
|
||||
comune: 1,
|
||||
mycities: 1,
|
||||
'profile.img': 1,
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1359,8 +1352,6 @@ export default defineComponent({
|
||||
idStatusSkill: 1,
|
||||
idContribType: 1,
|
||||
'profile.username_telegram': 1,
|
||||
'profile.favorite': 1,
|
||||
'profile.bookmark': 1,
|
||||
idCity: 1,
|
||||
pub_to_share: 1,
|
||||
numLevel: 1,
|
||||
@@ -1386,7 +1377,7 @@ export default defineComponent({
|
||||
reported: 1,
|
||||
date_report: 1,
|
||||
username_who_report: 1,
|
||||
}
|
||||
}
|
||||
},
|
||||
lookup3: {
|
||||
lk_tab: toolsext.TABSECTORS,
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
<CGridTableRec
|
||||
v-if="searchList.length > 0"
|
||||
:prop_mytable="table"
|
||||
:options="tools.optionsTable(table)"
|
||||
prop_mytitle=""
|
||||
:prop_mycolumns="col"
|
||||
:prop_colkey="prop_colkey"
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
$heightBtn: 100%;
|
||||
$grayshadow: #555;
|
||||
|
||||
.text-subtitle-gallery {
|
||||
font-size: 1rem;
|
||||
font-weight: 400;
|
||||
line-height: 1.75rem;
|
||||
letter-spacing: .00937em;
|
||||
text-shadow: .1rem .1rem .1rem $grayshadow;
|
||||
}
|
||||
|
||||
@media (max-width: 718px) {
|
||||
// PER VERSIONE MOBILE
|
||||
.text-subtitle-gallery {
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.myimg {
|
||||
border-radius: 10px !important;
|
||||
height: 200px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.myimg-modify {
|
||||
cursor: grab;
|
||||
}
|
||||
|
||||
|
||||
.barwidth{
|
||||
width: 250px !important;
|
||||
}
|
||||
|
||||
|
||||
.q-img {
|
||||
&__image {
|
||||
border-radius: 10px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.my-card-gallery {
|
||||
width: 100%;
|
||||
max-width: 300px;
|
||||
min-width: 200px;
|
||||
padding: 0.5rem 0.5rem;
|
||||
height: 350px;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.my-card-gallery-noModif {
|
||||
width: 100%;
|
||||
max-width: 300px;
|
||||
min-width: 200px;
|
||||
padding: 1rem 1rem;
|
||||
height: 220px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.my-card-gallery-view {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
padding: 0.25rem 0.25rem;
|
||||
margin: auto;
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
import { defineComponent, ref, PropType, watch, onMounted, computed } from 'vue'
|
||||
import { useI18n } from '@src/boot/i18n'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { IGallery, IImgGallery } from 'model'
|
||||
import { CMyPage } from '@/components/CMyPage'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { costanti } from '@costanti'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CGalleryImages',
|
||||
props: {
|
||||
imgGallery: {
|
||||
type: Object as PropType<IImgGallery[] | string | undefined | null>,
|
||||
required: true,
|
||||
},
|
||||
directory: {
|
||||
type: String,
|
||||
required: true,
|
||||
}
|
||||
},
|
||||
components: { CMyPage },
|
||||
setup(props, { emit }) {
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
const userStore = useUserStore()
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
const slide = ref(0)
|
||||
const autoplay = ref(5000)
|
||||
|
||||
return {
|
||||
tools,
|
||||
costanti,
|
||||
slide,
|
||||
autoplay,
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -1,30 +0,0 @@
|
||||
<template>
|
||||
<q-carousel
|
||||
swipeable
|
||||
animated
|
||||
:autoplay="autoplay"
|
||||
transition-prev="slide-right"
|
||||
transition-next="slide-left"
|
||||
@mouseenter="autoplay = false"
|
||||
@mouseleave="autoplay = 5000"
|
||||
:arrows="imgGallery.length > 1"
|
||||
v-model="slide"
|
||||
:thumbnails="imgGallery.length > 1"
|
||||
infinite
|
||||
>
|
||||
<q-carousel-slide
|
||||
v-for="(myimg, index) in imgGallery"
|
||||
:name="index"
|
||||
:key="index"
|
||||
:img-src="directory + '/' + myimg.imagefile"
|
||||
>
|
||||
</q-carousel-slide>
|
||||
</q-carousel>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CGalleryImages.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CGalleryImages.scss';
|
||||
</style>
|
||||
@@ -1 +0,0 @@
|
||||
export {default as CGalleryImages} from './CGalleryImages.vue'
|
||||
@@ -36,7 +36,6 @@ import { costanti } from '@costanti'
|
||||
import translate from '@/globalroutines/util'
|
||||
import { toolsext } from '@store/Modules/toolsext'
|
||||
import { CMyCardPopup } from '@/components/CMyCardPopup'
|
||||
import { CMyCardGood } from '@/components/CMyCardGood'
|
||||
import { CMyCardService } from '@/components/CMyCardService'
|
||||
import { CMyCardGrpPopup } from '@/components/CMyCardGrpPopup'
|
||||
import { CMyCardCircuitPopup } from '@/components/CMyCardCircuitPopup'
|
||||
@@ -289,7 +288,7 @@ export default defineComponent({
|
||||
components: {
|
||||
CMyPopupEdit, CTitleBanner, CMyFieldDb, CMySelect, CMyFriends, CMyGroups,
|
||||
CMyUser, CMyRecCard, CMyCardPopup, CMyRecGrpCard, CMyCardGrpPopup, CMyCardCircuitPopup,
|
||||
CMyRecCircuitCard, CMyCardService, CMyCardGood
|
||||
CMyRecCircuitCard, CMyCardService
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
const $q = useQuasar()
|
||||
|
||||
@@ -1088,7 +1088,6 @@
|
||||
<q-dialog
|
||||
v-model="visupagedialog"
|
||||
@hide="hidewindow"
|
||||
class="q-ma-sm"
|
||||
:maximized="$q.screen.lt.sm"
|
||||
>
|
||||
|
||||
@@ -1107,12 +1106,6 @@
|
||||
<CMyCardService v-else-if="mytable === 'myskills'"
|
||||
:table="mytable" :prop_myrec="myrecdialog">
|
||||
</CMyCardService>
|
||||
<CMyCardService v-else-if="mytable === 'mygoods'"
|
||||
:table="mytable" :prop_myrec="myrecdialog">
|
||||
</CMyCardService>
|
||||
<CMyCardService v-else-if="mytable === 'myhosps'"
|
||||
:table="mytable" :prop_myrec="myrecdialog">
|
||||
</CMyCardService>
|
||||
<CMyCardPopup v-else :table="mytable" :prop_myrec="myrecdialog">
|
||||
</CMyCardPopup>
|
||||
</q-dialog>
|
||||
|
||||
@@ -24,7 +24,7 @@ import { useI18n } from '@/boot/i18n'
|
||||
import { toolsext } from '@store/Modules/toolsext'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { costanti } from '@costanti'
|
||||
import { IBookmark, ICircuit, IFavorite, IMyCircuit, IMyGroup, IUserFields } from 'model'
|
||||
import { ICircuit, IMyCircuit, IMyGroup, IUserFields } from 'model'
|
||||
import { shared_consts } from '@/common/shared_vuejs'
|
||||
import { static_data } from '@/db/static_data'
|
||||
import { fieldsTable } from '@store/Modules/fieldsTable'
|
||||
@@ -53,7 +53,6 @@ export default defineComponent({
|
||||
const { getRefLink } = MixinUsers()
|
||||
|
||||
const animation = ref('fade')
|
||||
const mytab = ref('my')
|
||||
|
||||
const username = computed(() => $route.params.username ? $route.params.username.toString() : userStore.my.username)
|
||||
const idnotif = computed(() => $route.query.idnotif ? $route.query.idnotif.toString() : '')
|
||||
@@ -181,25 +180,6 @@ export default defineComponent({
|
||||
return ''
|
||||
}
|
||||
|
||||
function filtrofavorite(table: string) {
|
||||
const tab = tools.getNumTabByTable(table)
|
||||
if (myuser.value && myuser.value.profile.favorite) {
|
||||
let arrfav = myuser.value.profile.favorite.filter((rec: IBookmark) => rec.tab === tab)
|
||||
if (arrfav)
|
||||
return myuser.value.profile.favorite ? [{ _id: { $in: arrfav.map((rec: any) => rec.id) } }] : []
|
||||
}
|
||||
return []
|
||||
}
|
||||
function filtrobookmark(table: string) {
|
||||
const tab = tools.getNumTabByTable(table)
|
||||
if (myuser.value && myuser.value.profile.bookmark) {
|
||||
let arrfav = myuser.value.profile.bookmark.filter((rec: IBookmark) => rec.tab === tab)
|
||||
if (arrfav)
|
||||
return myuser.value.profile.bookmark ? [{ _id: { $in: arrfav.map((rec: any) => rec.id) } }] : []
|
||||
}
|
||||
return []
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
@@ -214,8 +194,6 @@ export default defineComponent({
|
||||
getLinkUserTelegram,
|
||||
getLinkWebSite,
|
||||
filtroutente,
|
||||
filtrofavorite,
|
||||
filtrobookmark,
|
||||
showPic,
|
||||
myusername,
|
||||
userStore,
|
||||
@@ -234,7 +212,6 @@ export default defineComponent({
|
||||
listcircuitsfiltered,
|
||||
optionsMainCards,
|
||||
getlinkpage,
|
||||
mytab,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -91,122 +91,55 @@
|
||||
myclass="myshad"
|
||||
:canopen="true"
|
||||
>
|
||||
<q-tabs
|
||||
v-model="mytab"
|
||||
inline-label
|
||||
dense
|
||||
class="text-black shadow-2"
|
||||
>
|
||||
<q-tab name="my" icon="far fa-user" />
|
||||
<q-tab name="favorite" icon="far fa-heart" />
|
||||
<q-tab name="bookmark" icon="far fa-bookmark" />
|
||||
</q-tabs>
|
||||
|
||||
<q-tab-panels
|
||||
v-model="mytab"
|
||||
animated
|
||||
swipeable
|
||||
vertical
|
||||
transition-prev="jump-up"
|
||||
transition-next="jump-up"
|
||||
>
|
||||
<q-tab-panel name="my">
|
||||
<div
|
||||
v-for="(card, ind) of mycards"
|
||||
:key="ind"
|
||||
:name="card.table"
|
||||
>
|
||||
<q-card class="q-my-md">
|
||||
<div v-if="card.table === 'mygroups'">
|
||||
<q-list>
|
||||
<span
|
||||
v-for="(grp, index) in listgroupsfiltered"
|
||||
:key="index"
|
||||
class="q-my-sm q-mx-none"
|
||||
clickable
|
||||
>
|
||||
<CMyGroup
|
||||
:mygrp="grp"
|
||||
:visu="costanti.USER_GROUPS"
|
||||
:noaut="true"
|
||||
>
|
||||
</CMyGroup>
|
||||
</span>
|
||||
</q-list>
|
||||
</div>
|
||||
<div v-else-if="card.table === 'circuits'">
|
||||
<div class="text-h6">{{ card.title }}</div>
|
||||
<q-list>
|
||||
<span
|
||||
v-for="(circuit, index) in listcircuitsfiltered"
|
||||
:key="index"
|
||||
class="q-my-sm q-mx-none"
|
||||
clickable
|
||||
>
|
||||
<CMyCircuit
|
||||
:mycircuit="circuit"
|
||||
:visu="costanti.USER_CIRCUITS"
|
||||
:noaut="true"
|
||||
>
|
||||
</CMyCircuit>
|
||||
</span>
|
||||
</q-list>
|
||||
</div>
|
||||
<div v-else>
|
||||
<CSkill
|
||||
:table="card.table"
|
||||
:filtercustom="filtroutente"
|
||||
:butt_modif_new="isMyRecord(myuser.username)"
|
||||
:visuinpage="true"
|
||||
<div v-for="(card, ind) of mycards" :key="ind" :name="card.table">
|
||||
<q-card class="q-my-md">
|
||||
<div v-if="card.table === 'mygroups'">
|
||||
<q-list>
|
||||
<span
|
||||
v-for="(grp, index) in listgroupsfiltered"
|
||||
:key="index"
|
||||
class="q-my-sm q-mx-none"
|
||||
clickable
|
||||
>
|
||||
<CMyGroup
|
||||
:mygrp="grp"
|
||||
:visu="costanti.USER_GROUPS"
|
||||
:noaut="true"
|
||||
:title="card.title"
|
||||
/>
|
||||
</div>
|
||||
</q-card>
|
||||
>
|
||||
</CMyGroup>
|
||||
</span>
|
||||
</q-list>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="favorite">
|
||||
<div
|
||||
v-for="(card, ind) of mycards"
|
||||
:key="ind"
|
||||
:name="card.table"
|
||||
>
|
||||
<q-card class="q-my-md">
|
||||
|
||||
<div v-if="card.showfavorite && filtrofavorite(card.table)">
|
||||
<CSkill
|
||||
:table="card.table"
|
||||
:filtercustom="filtrofavorite(card.table)"
|
||||
:butt_modif_new="false"
|
||||
:visuinpage="true"
|
||||
:noaut="false"
|
||||
:title="card.title"
|
||||
/>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="bookmark">
|
||||
<div
|
||||
v-for="(card, ind) of mycards"
|
||||
:key="ind"
|
||||
:name="card.table"
|
||||
>
|
||||
<q-card class="q-my-md">
|
||||
<div v-if="card.showfavorite && filtrobookmark(card.table)">
|
||||
<CSkill
|
||||
:table="card.table"
|
||||
:filtercustom="filtrobookmark(card.table)"
|
||||
:butt_modif_new="isMyRecord(myuser.username)"
|
||||
:visuinpage="true"
|
||||
<div v-else-if="card.table === 'circuits'">
|
||||
<div class="text-h6">{{ card.title }}</div>
|
||||
<q-list>
|
||||
<span
|
||||
v-for="(circuit, index) in listcircuitsfiltered"
|
||||
:key="index"
|
||||
class="q-my-sm q-mx-none"
|
||||
clickable
|
||||
>
|
||||
<CMyCircuit
|
||||
:mycircuit="circuit"
|
||||
:visu="costanti.USER_CIRCUITS"
|
||||
:noaut="true"
|
||||
:title="card.title"
|
||||
/>
|
||||
</div>
|
||||
</q-card>
|
||||
>
|
||||
</CMyCircuit>
|
||||
</span>
|
||||
</q-list>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
<div v-else>
|
||||
<CSkill
|
||||
:table="card.table"
|
||||
:filtercustom="filtroutente"
|
||||
:butt_modif_new="isMyRecord(myuser.username)"
|
||||
:visuinpage="true"
|
||||
:noaut="true"
|
||||
:title="card.title"
|
||||
/>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
</CTitleBanner>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -61,7 +61,7 @@ export default defineComponent({
|
||||
|
||||
function load() {
|
||||
// Carica il profilo di quest'utente
|
||||
if (props.idRec) {
|
||||
if (props.idRec && props.idRec > 0) {
|
||||
userStore.loadGeneric(props.table, props.idRec, idnotif.value).then((ris) => {
|
||||
myrec.value = ris
|
||||
notifStore.setAsRead(idnotif.value)
|
||||
|
||||
@@ -1,127 +0,0 @@
|
||||
.profile {
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
max-width: 450px;
|
||||
}
|
||||
|
||||
.myrow{
|
||||
display: flex;
|
||||
@media (max-width: 600px) {
|
||||
flex-flow: column;
|
||||
}
|
||||
}
|
||||
|
||||
.qualifica{
|
||||
border: solid 2px #4198ef;
|
||||
border-radius: 1rem;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
|
||||
.text-bacheca{
|
||||
margin: 10px;
|
||||
border: solid 2px #4198ef;
|
||||
border-radius: 1rem;
|
||||
padding: 10px;
|
||||
|
||||
}
|
||||
|
||||
.note-bacheca{
|
||||
border: solid 2px #C10015;
|
||||
border-radius: 1rem;
|
||||
padding: 10px;
|
||||
|
||||
}
|
||||
|
||||
.img {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
|
||||
max-height: 500px;
|
||||
max-width: 350px;
|
||||
@media (max-width: 500px) {
|
||||
max-height: 500px;
|
||||
max-width: 400px;
|
||||
}
|
||||
}
|
||||
|
||||
$graytext: #555;
|
||||
.cal {
|
||||
color: black;
|
||||
font-size: 1rem;
|
||||
font-weight: 400;
|
||||
line-height: 1.25rem;
|
||||
letter-spacing: 0.03333em;
|
||||
|
||||
&__title {
|
||||
color: white;
|
||||
font-weight: 700;
|
||||
font-size: 1rem;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
&__details {
|
||||
color: black;
|
||||
}
|
||||
|
||||
&__hours {
|
||||
color: blue;
|
||||
&-title {
|
||||
color: $graytext;
|
||||
}
|
||||
&-content {
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
|
||||
&__where {
|
||||
margin-top: 5px;
|
||||
color: blue;
|
||||
|
||||
&-title {
|
||||
color: $graytext;
|
||||
}
|
||||
&-content {
|
||||
color: darkblue !important;
|
||||
}
|
||||
}
|
||||
|
||||
&__when {
|
||||
margin-top: 5px;
|
||||
color: blue;
|
||||
|
||||
&-title {
|
||||
color: $graytext;
|
||||
}
|
||||
&-content {
|
||||
color: darkblue !important;;
|
||||
}
|
||||
}
|
||||
|
||||
&__teacher {
|
||||
margin-top: 5px;
|
||||
&-title {
|
||||
color: $graytext;
|
||||
}
|
||||
&-content {
|
||||
color: darkblue !important;;
|
||||
}
|
||||
}
|
||||
|
||||
&__quota {
|
||||
margin-top: 5px;
|
||||
&-title {
|
||||
color: $graytext;
|
||||
}
|
||||
&-content {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
&__img {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,136 +0,0 @@
|
||||
import { computed, defineComponent, onMounted, PropType, ref, watch } from 'vue'
|
||||
|
||||
import { CMyFieldDb } from '@/components/CMyFieldDb'
|
||||
import { CTitleBanner } from '@/components/CTitleBanner'
|
||||
import { CProfile } from '@/components/CProfile'
|
||||
import { CDateTime } from '@/components/CDateTime'
|
||||
import { CMyPage } from '@/components/CMyPage'
|
||||
import { CMyFieldRec } from '@/components/CMyFieldRec'
|
||||
import { CMyUser } from '@/components/CMyUser'
|
||||
import { CGalleryImages } from '@/components/CGalleryImages'
|
||||
import { CAccomodation } from '@/components/CAccomodation'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useCalendarStore } from '@store/CalendarStore'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { useI18n } from '@/boot/i18n'
|
||||
import { toolsext } from '@store/Modules/toolsext'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { costanti } from '@costanti'
|
||||
import { IColGridTable, IImgGallery, IUserFields } from 'model'
|
||||
import { shared_consts } from '@/common/shared_vuejs'
|
||||
import { colCitys, fieldsTable } from '@store/Modules/fieldsTable'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { useNotifStore } from '@store/NotifStore'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CMyCardGood',
|
||||
components: { CProfile, CTitleBanner,
|
||||
CMyFieldDb, CDateTime, CMyPage, CMyFieldRec, CAccomodation,
|
||||
CMyUser, CGalleryImages },
|
||||
props: {
|
||||
table: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
prop_myrec: {
|
||||
type: Object as PropType<any>,
|
||||
required: false,
|
||||
default: null,
|
||||
},
|
||||
idRec: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 0
|
||||
},
|
||||
nopopup: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
},
|
||||
},
|
||||
setup(props) {
|
||||
|
||||
const userStore = useUserStore()
|
||||
const calendarStore = useCalendarStore()
|
||||
const notifStore = useNotifStore()
|
||||
const globalStore = useGlobalStore()
|
||||
const $q = useQuasar()
|
||||
const $route = useRoute()
|
||||
const { t } = useI18n()
|
||||
|
||||
const showPic = ref(false)
|
||||
|
||||
const myrec = ref(<any>{})
|
||||
const col = ref(<IColGridTable>{})
|
||||
|
||||
const idnotif = computed(() => $route.query.idnotif ? $route.query.idnotif.toString() : '')
|
||||
|
||||
function profile() {
|
||||
return userStore.my.profile
|
||||
}
|
||||
|
||||
function load() {
|
||||
// Carica il profilo di quest'utente
|
||||
if (props.idRec) {
|
||||
userStore.loadGeneric(props.table, props.idRec, idnotif.value).then((ris) => {
|
||||
myrec.value = ris
|
||||
notifStore.setAsRead(idnotif.value)
|
||||
})
|
||||
|
||||
} else {
|
||||
myrec.value = props.prop_myrec
|
||||
}
|
||||
|
||||
col.value = fieldsTable.getArrColsByTable(props.table)
|
||||
}
|
||||
|
||||
watch(() => props.idRec, (to: any, from: any) => {
|
||||
load()
|
||||
})
|
||||
|
||||
function mounted() {
|
||||
load()
|
||||
}
|
||||
|
||||
function getlinkpage() {
|
||||
return self.location.host + tools.getPathByTable(props.table, myrec.value._id)
|
||||
}
|
||||
function condividipag() {
|
||||
const mystr = getlinkpage()
|
||||
tools.copyStringToClipboard($q, mystr, true)
|
||||
tools.sendMsgTelegramCmd($q, t, shared_consts.MsgTeleg.SHARE_TEXT, false, mystr)
|
||||
return true
|
||||
}
|
||||
|
||||
function showBadge() {
|
||||
if (shared_consts.TABLES_SHOW_ADTYPE.includes(props.table)) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
profile,
|
||||
tools,
|
||||
costanti,
|
||||
myrec,
|
||||
shared_consts,
|
||||
globalStore,
|
||||
showPic,
|
||||
userStore,
|
||||
t,
|
||||
fieldsTable,
|
||||
colCitys,
|
||||
toolsext,
|
||||
col,
|
||||
condividipag,
|
||||
showBadge,
|
||||
getlinkpage,
|
||||
calendarStore,
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -1,252 +0,0 @@
|
||||
<template>
|
||||
<div v-if="myrec._id" class="fulldiv">
|
||||
<div class="q-pa-sm row items-start q-gutter-sm full-height fulldiv">
|
||||
<q-card class="my-card fulldiv" bordered>
|
||||
<CGalleryImages
|
||||
v-if="myrec.photos.length > 0"
|
||||
:imgGallery="myrec.photos"
|
||||
:directory="'upload/' + tools.getDirectoryGall(myrec, table, '')"
|
||||
>
|
||||
</CGalleryImages>
|
||||
|
||||
<q-card-actions align="right">
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
:color="userStore.isFavorite(myrec._id, table) ? 'red' : ''"
|
||||
icon="favorite"
|
||||
@click="
|
||||
userStore.setFavorite($q, t, myrec._id, toolsext.TABMYGOODS)
|
||||
"
|
||||
/>
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
:color="userStore.isBookmarked(myrec._id, table) ? 'teal' : ''"
|
||||
icon="bookmark"
|
||||
@click="
|
||||
userStore.setBookmark($q, t, myrec._id, toolsext.TABMYGOODS)
|
||||
"
|
||||
/>
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
color="primary"
|
||||
icon="share"
|
||||
@click="tools.copyToClip($q, getlinkpage(), true)"
|
||||
/>
|
||||
</q-card-actions>
|
||||
<q-separator />
|
||||
|
||||
<q-list>
|
||||
<q-item clickable>
|
||||
<q-item-section avatar>
|
||||
<div v-if="showBadge()" class="text-center">
|
||||
<q-chip
|
||||
dense
|
||||
:color="fieldsTable.getColByAdType(myrec.adType)"
|
||||
text-color="white"
|
||||
>{{
|
||||
fieldsTable.getValByTabAndId(table, 'adType', myrec.adType)
|
||||
}}
|
||||
</q-chip>
|
||||
</div>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>
|
||||
<q-item-label class="text-bold text-h7">{{
|
||||
myrec.descr
|
||||
}}</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="blue" name="category" />
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>
|
||||
<q-item-label>
|
||||
<q-chip
|
||||
v-if="myrec.sectorGood && myrec.sectorGood[0].descr"
|
||||
class="glossy"
|
||||
color="blue"
|
||||
text-color="white"
|
||||
dense
|
||||
>
|
||||
<span class="cal__quota-content">{{
|
||||
myrec.sectorGood[0].descr
|
||||
}}</span>
|
||||
</q-chip>
|
||||
<q-chip
|
||||
v-if="myrec.recGood.length > 0 && myrec.recGood[0].descr"
|
||||
class="glossy"
|
||||
dense
|
||||
color="blue"
|
||||
text-color="white"
|
||||
>
|
||||
<span class="cal__quota-content">{{
|
||||
myrec.recGood[0].descr
|
||||
}}</span>
|
||||
</q-chip>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item-label v-if="myrec.note"
|
||||
><div v-html="myrec.note" class="clBorderService"></div
|
||||
></q-item-label>
|
||||
|
||||
<q-card class="my-card clBorderUser" bordered>
|
||||
<CMyUser
|
||||
:mycontact="myrec"
|
||||
:visu="costanti.FIND_PEOPLE"
|
||||
@setCmd="tools.setCmd"
|
||||
>
|
||||
</CMyUser>
|
||||
</q-card>
|
||||
<q-item v-if="myrec.mycities[0].comune">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="amber" name="fas fa-map-marker-alt" />
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label>
|
||||
<span v-for="(city, index) in myrec.mycities" :key="index">
|
||||
<span v-if="city.comune">
|
||||
{{ city.comune }} ({{ city.prov }})</span
|
||||
><span v-if="myrec.mycities.length > 1"> - </span>
|
||||
</span>
|
||||
</q-item-label>
|
||||
<q-item-label v-if="myrec.profile.qualifica" caption>{{
|
||||
myrec.biografia
|
||||
}}</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable v-if="myrec.website">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="blue" name="fas fa-globe" />
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>
|
||||
<q-item-label lines="1">
|
||||
<span v-html="tools.getlinkhref(myrec.website, 'Visita il Sito Web')"
|
||||
/></q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item v-if="myrec.idContribType && myrec.idContribType.length > 0">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="green" name="fas fa-hand-holding" />
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>
|
||||
<q-item-label>
|
||||
<span
|
||||
v-for="(reccontr, index) in myrec.idContribType"
|
||||
:key="index"
|
||||
>
|
||||
<q-chip
|
||||
dense
|
||||
:color="calendarStore.getColByContribType(reccontr)"
|
||||
text-color="white"
|
||||
>
|
||||
{{ calendarStore.getContribtypeById(reccontr) }}
|
||||
</q-chip>
|
||||
</span>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="blue" name="far fa-edit" />
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>
|
||||
<q-item-label
|
||||
><span v-if="myrec.date_updated">{{
|
||||
tools.getstrDateMonthLong(myrec.date_updated)
|
||||
}}</span
|
||||
><span v-else>{{
|
||||
tools.getstrDateMonthLong(myrec.date_created)
|
||||
}}</span></q-item-label
|
||||
>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable v-if="false">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="red" name="local_gas_station" />
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>
|
||||
<q-item-label></q-item-label>
|
||||
<q-item-label caption>Fill your gas tank.</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
<q-separator />
|
||||
<div class="q-mb-xl"></div>
|
||||
<q-card-actions
|
||||
v-if="$q.screen.gt.sm"
|
||||
class="text-center justify-center"
|
||||
>
|
||||
<q-btn
|
||||
v-if="myrec.profile.username_telegram"
|
||||
:label="$t('dialog.contact')"
|
||||
color="primary"
|
||||
icon="far fa-comment"
|
||||
target="_blank"
|
||||
:type="tools.isUserOk() ? 'a' : 'btn'"
|
||||
size="md"
|
||||
rounded
|
||||
:href="
|
||||
tools.isUserOk()
|
||||
? tools.getHttpForTelegram(myrec.profile.username_telegram)
|
||||
: null
|
||||
"
|
||||
/>
|
||||
<q-btn
|
||||
rounded
|
||||
outline
|
||||
:label="$t('dialog.close')"
|
||||
color="primary"
|
||||
icon="close"
|
||||
v-close-popup
|
||||
/>
|
||||
</q-card-actions>
|
||||
</q-card>
|
||||
<div
|
||||
v-if="!$q.screen.gt.sm"
|
||||
class="row absolute-bottom text-shadow custom-caption q-px-md buttons_bottom"
|
||||
>
|
||||
<q-btn
|
||||
v-if="myrec.profile.username_telegram"
|
||||
:label="$t('dialog.contact')"
|
||||
color="primary"
|
||||
icon="far fa-comment"
|
||||
target="_blank"
|
||||
:type="tools.isUserOk() ? 'a' : 'btn'"
|
||||
size="md"
|
||||
rounded
|
||||
:href="
|
||||
tools.isUserOk()
|
||||
? tools.getHttpForTelegram(myrec.profile.username_telegram)
|
||||
: null
|
||||
"
|
||||
/>
|
||||
<q-btn
|
||||
rounded
|
||||
outline
|
||||
:label="$t('dialog.close')"
|
||||
color="primary"
|
||||
icon="close"
|
||||
v-close-popup
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CMyCardGood.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CMyCardGood.scss';
|
||||
</style>
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
export { default as CMyCardGood } from './CMyCardGood.vue'
|
||||
@@ -61,7 +61,7 @@ export default defineComponent({
|
||||
|
||||
function load() {
|
||||
// Carica il profilo di quest'utente
|
||||
if (props.idRec) {
|
||||
if (props.idRec && props.idRec > 0) {
|
||||
userStore.loadGeneric(props.table, props.idRec, idnotif.value).then((ris) => {
|
||||
myrec.value = ris
|
||||
notifStore.setAsRead(idnotif.value)
|
||||
|
||||
@@ -5,10 +5,8 @@ import { CTitleBanner } from '@/components/CTitleBanner'
|
||||
import { CProfile } from '@/components/CProfile'
|
||||
import { CDateTime } from '@/components/CDateTime'
|
||||
import { CMyPage } from '@/components/CMyPage'
|
||||
import { CMyChipList } from '@/components/CMyChipList'
|
||||
import { CMyFieldRec } from '@/components/CMyFieldRec'
|
||||
import { CMyUser } from '@/components/CMyUser'
|
||||
import { CGalleryImages } from '@/components/CGalleryImages'
|
||||
import { CAccomodation } from '@/components/CAccomodation'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
@@ -21,16 +19,14 @@ import { costanti } from '@costanti'
|
||||
import { IColGridTable, IImgGallery, IUserFields } from 'model'
|
||||
import { shared_consts } from '@/common/shared_vuejs'
|
||||
import { colCitys, fieldsTable } from '@store/Modules/fieldsTable'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { useNotifStore } from '@store/NotifStore'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CMyCardService',
|
||||
components: {
|
||||
CProfile, CTitleBanner,
|
||||
components: { CProfile, CTitleBanner,
|
||||
CMyFieldDb, CDateTime, CMyPage, CMyFieldRec, CAccomodation,
|
||||
CMyUser, CGalleryImages, CMyChipList
|
||||
},
|
||||
CMyUser },
|
||||
props: {
|
||||
table: {
|
||||
type: String,
|
||||
@@ -64,10 +60,6 @@ export default defineComponent({
|
||||
|
||||
const showPic = ref(false)
|
||||
|
||||
const $router = useRouter()
|
||||
|
||||
const usersList = ref({ show: false, title: '', list: [] })
|
||||
|
||||
const myrec = ref(<any>{})
|
||||
const col = ref(<IColGridTable>{})
|
||||
|
||||
@@ -79,7 +71,7 @@ export default defineComponent({
|
||||
|
||||
function load() {
|
||||
// Carica il profilo di quest'utente
|
||||
if (props.idRec) {
|
||||
if (props.idRec > 0) {
|
||||
userStore.loadGeneric(props.table, props.idRec, idnotif.value).then((ris) => {
|
||||
myrec.value = ris
|
||||
notifStore.setAsRead(idnotif.value)
|
||||
@@ -118,54 +110,6 @@ export default defineComponent({
|
||||
return false
|
||||
}
|
||||
|
||||
function getRecGoodSkillByRec(rec: any) {
|
||||
if (props.table === 'myskills')
|
||||
return rec.recSkill
|
||||
else if (props.table === 'mygoods')
|
||||
return rec.recGood
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
function getSectorByRec(rec: any) {
|
||||
if (props.table === 'myskills')
|
||||
return rec.sector
|
||||
else if (props.table === 'mygoods')
|
||||
return rec.sectorGood
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
function clicca(tipo: any, set: any, title: string) {
|
||||
if (set && myrec.value.username !== userStore.my.username && tipo === costanti.TIPOFAVBOOK.FAVORITE) {
|
||||
userStore.setFavorite($q, t, myrec.value._id, props.table, myrec.value);
|
||||
}
|
||||
if (set && myrec.value.username !== userStore.my.username && tipo === costanti.TIPOFAVBOOK.BOOKMARK) {
|
||||
userStore.setBookmark($q, t, myrec.value._id, props.table, myrec.value);
|
||||
}
|
||||
|
||||
if (!set) {
|
||||
usersList.value.show = true;
|
||||
usersList.value.title = title;
|
||||
usersList.value.list = myrec.value.myfav;
|
||||
}
|
||||
}
|
||||
|
||||
function naviga(path: string) {
|
||||
$router.push(path)
|
||||
}
|
||||
|
||||
function getTypeHosps() {
|
||||
let obj = null
|
||||
if (myrec.value.typeHosp) {
|
||||
obj = globalStore.getRecordByTableSingle(toolsext.TABTYPEHOSP, myrec.value.typeHosp)
|
||||
if (obj)
|
||||
return obj.label
|
||||
}
|
||||
|
||||
return obj
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
@@ -186,12 +130,6 @@ export default defineComponent({
|
||||
showBadge,
|
||||
getlinkpage,
|
||||
calendarStore,
|
||||
getSectorByRec,
|
||||
getRecGoodSkillByRec,
|
||||
usersList,
|
||||
clicca,
|
||||
naviga,
|
||||
getTypeHosps,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,116 +1,23 @@
|
||||
<template>
|
||||
<div v-if="myrec && myrec._id" class="fulldiv">
|
||||
<div class="q-pa-sm row items-start q-gutter-sm full-height fulldiv">
|
||||
<q-card class="my-card fulldiv" bordered>
|
||||
<CGalleryImages
|
||||
<div v-if="myrec._id">
|
||||
<div class="q-pa-sm row items-start q-gutter-sm">
|
||||
<q-card class="my-card" bordered>
|
||||
<q-img
|
||||
v-if="myrec.photos.length > 0"
|
||||
:imgGallery="myrec.photos"
|
||||
:directory="'upload/' + tools.getDirectoryGall(myrec, table, '')"
|
||||
>
|
||||
</CGalleryImages>
|
||||
|
||||
:src="myrec.photos[0].imagefile"
|
||||
class="imgautosize"
|
||||
:alt="myrec.descr">
|
||||
</q-img>
|
||||
<q-card-actions align="right">
|
||||
<div class="">
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
:color="userStore.isFavorite(myrec._id, table) ? 'red' : ''"
|
||||
icon="favorite"
|
||||
@click="clicca(costanti.TIPOFAVBOOK.FAVORITE, true)"
|
||||
>
|
||||
<q-badge
|
||||
v-if="myrec.myfav"
|
||||
color="primary"
|
||||
:label="myrec.myfav.length"
|
||||
floating
|
||||
transparent
|
||||
/>
|
||||
</q-btn>
|
||||
</div>
|
||||
<div class="">
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
:color="userStore.isBookmarked(myrec._id, table) ? 'teal' : ''"
|
||||
icon="bookmark"
|
||||
@click="clicca(costanti.TIPOFAVBOOK.BOOKMARK, true)"
|
||||
>
|
||||
<q-badge
|
||||
v-if="myrec.mybook"
|
||||
color="primary"
|
||||
:label="myrec.mybook.length"
|
||||
floating
|
||||
transparent
|
||||
/>
|
||||
</q-btn>
|
||||
</div>
|
||||
<div>
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
color="primary"
|
||||
icon="share"
|
||||
@click="tools.copyToClip($q, getlinkpage(), true)"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<q-btn flat round icon="fas fa-ellipsis-h">
|
||||
<q-menu>
|
||||
<q-list v-if="true" style="min-width: 150px">
|
||||
<q-item
|
||||
v-if="!nopopup"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="naviga(tools.getPathByTableAndRec(table, myrec))"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="blue" name="fas fa-globe" />
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
{{ $t('event.openpage') }}
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-separator />
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="
|
||||
clicca(
|
||||
costanti.TIPOFAVBOOK.FAVORITE,
|
||||
false,
|
||||
$t('cmd.favorite')
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="red" name="favorite" />
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
{{ $t('cmd.favorite') }}
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="
|
||||
clicca(
|
||||
costanti.TIPOFAVBOOK.BOOKMARK,
|
||||
false,
|
||||
$t('cmd.bookmark')
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="teal" name="bookmark" />
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
{{ $t('cmd.bookmark') }}
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
</div>
|
||||
<q-btn flat round :color="userStore.isFavorite(myrec._id, table) ? 'red' : ''" icon="favorite" @click="userStore.setFavorite($q, t, myrec._id, shared_consts.TABMYSKILLS)" />
|
||||
<q-btn flat round :color="userStore.isBookmarked(myrec._id, table) ? 'teal' : ''" icon="bookmark" @click="userStore.setBookmark($q, t, myrec._id, shared_consts.TABMYSKILLS)"/>
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
color="primary"
|
||||
icon="share"
|
||||
@click="tools.copyToClip($q, getlinkpage(), true)"
|
||||
/>
|
||||
</q-card-actions>
|
||||
<q-separator />
|
||||
|
||||
@@ -130,19 +37,12 @@
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>
|
||||
<q-item-label v-if="myrec.typeHosp" class="text-bold text-h7">
|
||||
<q-chip dense color="green" text-color="white"
|
||||
>{{ getTypeHosps() }}
|
||||
</q-chip>
|
||||
</q-item-label>
|
||||
|
||||
<q-item-label class="text-bold text-h7">{{
|
||||
myrec.descr
|
||||
}}</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
|
||||
<q-item v-if="getSectorByRec(myrec)">
|
||||
<q-item>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="blue" name="category" />
|
||||
</q-item-section>
|
||||
@@ -150,88 +50,30 @@
|
||||
<q-item-section>
|
||||
<q-item-label>
|
||||
<q-chip
|
||||
v-if="getSectorByRec(myrec) && getSectorByRec(myrec)[0].descr"
|
||||
v-if="myrec.sector && myrec.sector[0].descr"
|
||||
class="glossy"
|
||||
color="blue"
|
||||
text-color="white"
|
||||
dense
|
||||
>
|
||||
<span class="cal__quota-content">{{
|
||||
getSectorByRec(myrec)[0].descr
|
||||
myrec.sector[0].descr
|
||||
}}</span>
|
||||
</q-chip>
|
||||
<q-chip
|
||||
v-if="
|
||||
getRecGoodSkillByRec(myrec) &&
|
||||
getRecGoodSkillByRec(myrec).length > 0 &&
|
||||
getRecGoodSkillByRec(myrec)[0].descr
|
||||
"
|
||||
v-if="myrec.recSkill.length > 0 && myrec.recSkill[0].descr"
|
||||
class="glossy"
|
||||
dense
|
||||
color="blue"
|
||||
text-color="white"
|
||||
>
|
||||
<span class="cal__quota-content">{{
|
||||
getRecGoodSkillByRec(myrec)[0].descr
|
||||
myrec.recSkill[0].descr
|
||||
}}</span>
|
||||
</q-chip>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item v-if="myrec.numMaxPeopleHosp" class="q-mt-sm">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="blue" name="fas fa-users" />
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label class="q-px-xs q-ma-xs">
|
||||
<span class="accom_maxosp">{{ myrec.numMaxPeopleHosp }}</span
|
||||
>{{ t('hosps.numMaxPeopleHosp') }}
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item v-if="!!myrec.accomodation && myrec.accomodation.length > 0">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="orange" name="fas fa-bed" />
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label>
|
||||
<CAccomodation
|
||||
v-if="!!myrec.accomodation"
|
||||
:mylist="myrec.accomodation"
|
||||
:isInModif="false"
|
||||
:edit="false"
|
||||
:canModify="false"
|
||||
>
|
||||
</CAccomodation>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item v-if="!!myrec.preferences && myrec.preferences.length > 0">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="red" name="fas fa-asterisk" />
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label>
|
||||
<CMyChipList
|
||||
:rec="myrec"
|
||||
:type="costanti.FieldType.multiselect"
|
||||
:value="myrec.preferences"
|
||||
:options="
|
||||
globalStore.getTableJoinByName(
|
||||
toolsext.TABPREF,
|
||||
false,
|
||||
false,
|
||||
null
|
||||
)
|
||||
"
|
||||
:optval="fieldsTable.getKeyByTable(toolsext.TABPREF)"
|
||||
:optlab="fieldsTable.getLabelByTable(toolsext.TABPREF)"
|
||||
:opticon="fieldsTable.getIconByTable(toolsext.TABPREF)"
|
||||
></CMyChipList>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-separator />
|
||||
<q-item-label v-if="myrec.note"
|
||||
><div v-html="myrec.note" class="clBorderService"></div
|
||||
></q-item-label>
|
||||
@@ -267,26 +109,7 @@
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>
|
||||
<q-item-label lines="1">
|
||||
<span
|
||||
v-html="
|
||||
tools.getlinkhref(myrec.website, 'Visita il Sito Web')
|
||||
"
|
||||
/></q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable v-if="myrec.link_maplocation">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="blue" name="fas fa-map-marker-alt" />
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>
|
||||
<q-item-label lines="1">
|
||||
<span
|
||||
v-html="
|
||||
tools.getlinkhref(myrec.link_maplocation, 'Apri Mappa')
|
||||
"
|
||||
/></q-item-label>
|
||||
<q-item-label>{{ myrec.website }}</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item v-if="myrec.idContribType && myrec.idContribType.length > 0">
|
||||
@@ -339,11 +162,7 @@
|
||||
</q-item>
|
||||
</q-list>
|
||||
<q-separator />
|
||||
<div class="q-mb-xl"></div>
|
||||
<q-card-actions
|
||||
v-if="$q.screen.gt.sm || nopopup"
|
||||
class="text-center justify-center"
|
||||
>
|
||||
<q-card-actions align="center">
|
||||
<q-btn
|
||||
v-if="myrec.profile.username_telegram"
|
||||
:label="$t('dialog.contact')"
|
||||
@@ -353,14 +172,9 @@
|
||||
:type="tools.isUserOk() ? 'a' : 'btn'"
|
||||
size="md"
|
||||
rounded
|
||||
:href="
|
||||
tools.isUserOk()
|
||||
? tools.getHttpForTelegram(myrec.profile.username_telegram)
|
||||
: null
|
||||
"
|
||||
:href="tools.isUserOk() ? tools.getHttpForTelegram(myrec.profile.username_telegram) : null"
|
||||
/>
|
||||
<q-btn
|
||||
v-if="!nopopup"
|
||||
rounded
|
||||
outline
|
||||
:label="$t('dialog.close')"
|
||||
@@ -370,58 +184,169 @@
|
||||
/>
|
||||
</q-card-actions>
|
||||
</q-card>
|
||||
<div
|
||||
v-if="!$q.screen.gt.sm || !nopopup"
|
||||
class="row absolute-bottom text-shadow custom-caption q-px-md buttons_bottom"
|
||||
>
|
||||
<q-btn
|
||||
v-if="myrec.profile.username_telegram"
|
||||
:label="$t('dialog.contact')"
|
||||
color="primary"
|
||||
icon="far fa-comment"
|
||||
target="_blank"
|
||||
:type="tools.isUserOk() ? 'a' : 'btn'"
|
||||
size="md"
|
||||
rounded
|
||||
:href="
|
||||
tools.isUserOk()
|
||||
? tools.getHttpForTelegram(myrec.profile.username_telegram)
|
||||
: null
|
||||
"
|
||||
/>
|
||||
<q-btn
|
||||
v-if="!nopopup"
|
||||
rounded
|
||||
outline
|
||||
:label="$t('dialog.close')"
|
||||
color="primary"
|
||||
icon="close"
|
||||
v-close-popup
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<q-dialog v-model="usersList.show">
|
||||
<q-card class="dialog_card">
|
||||
<q-toolbar class="bg-primary text-white">
|
||||
<q-toolbar-title>
|
||||
{{ usersList.title }}
|
||||
</q-toolbar-title>
|
||||
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
|
||||
</q-toolbar>
|
||||
|
||||
<q-card-section class="inset-shadow">
|
||||
<div v-for="(rec, i) in usersList.list" :key="i">
|
||||
<CMyUser
|
||||
:mycontact="rec"
|
||||
:visu="costanti.FIND_PEOPLE"
|
||||
@setCmd="tools.setCmd"
|
||||
<q-card class="dialog_card q-mb-lg" v-if="myrec._id && false">
|
||||
<q-footer
|
||||
v-if="!nopopup"
|
||||
:class="
|
||||
($q.dark.isActive ? `bg-black` : `bg-white`) +
|
||||
` small-screen-only text-center`
|
||||
"
|
||||
bordered
|
||||
>
|
||||
<q-btn
|
||||
push
|
||||
rounded
|
||||
color="primary"
|
||||
icon="close"
|
||||
label="Chiudi"
|
||||
v-close-popup
|
||||
></q-btn>
|
||||
</q-footer>
|
||||
<q-bar v-if="!nopopup" dense class="bg-primary text-white">
|
||||
{{ myrec.username }}
|
||||
<q-space />
|
||||
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
|
||||
</q-bar>
|
||||
<q-card-section class="inset-shadow">
|
||||
<!-- Per ora visualizzo solo la Prima Immagine -->
|
||||
<div class="text-center">
|
||||
<q-img
|
||||
v-if="tools.getValue(myrec, 'photos', '')"
|
||||
:src="
|
||||
tools.getFullFileName(
|
||||
tools.getValue(myrec, 'photos', ''),
|
||||
table,
|
||||
myrec.username,
|
||||
myrec.groupname
|
||||
)
|
||||
"
|
||||
class="img"
|
||||
alt="immagine bene"
|
||||
></q-img>
|
||||
</div>
|
||||
|
||||
<div v-if="showBadge()" class="text-center">
|
||||
<q-chip
|
||||
:icon="fieldsTable.getIconByAdType(myrec.adType)"
|
||||
:color="fieldsTable.getColByAdType(myrec.adType)"
|
||||
text-color="white"
|
||||
>{{ fieldsTable.getValByTabAndId(table, 'adType', myrec.adType) }}
|
||||
</q-chip>
|
||||
</div>
|
||||
|
||||
<!--:title="t(mycol.label_trans)"-->
|
||||
<div v-for="(mycol, index) of col" :key="index">
|
||||
<div
|
||||
v-if="
|
||||
mycol.visible &&
|
||||
tools.checkIfShowField(
|
||||
mycol,
|
||||
tools.TIPOVIS_SHOW_RECORD,
|
||||
false,
|
||||
tools.getValue(myrec, mycol.field, mycol.subfield)
|
||||
)
|
||||
"
|
||||
>
|
||||
<div v-if="mycol.fieldtype === costanti.FieldType.html">
|
||||
<div
|
||||
class="note-bacheca"
|
||||
v-html="tools.getValue(myrec, mycol.field, mycol.subfield)"
|
||||
></div>
|
||||
</div>
|
||||
<div v-else-if="mycol.name === 'descr'">
|
||||
<div class="text-bacheca">
|
||||
{{ tools.getValue(myrec, mycol.field, mycol.subfield) }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="mycol.name === 'numMaxPeopleHosp'">
|
||||
<div class="text-bacheca">
|
||||
<span class="accom_maxosp">{{
|
||||
tools.getValue(myrec, mycol.field, mycol.subfield)
|
||||
}}</span
|
||||
>{{ t('hosps.numMaxPeopleHosp') }}
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-else-if="mycol.name === 'dateTimeStart'"
|
||||
class="text-center cal"
|
||||
>
|
||||
</CMyUser>
|
||||
<div v-if="myrec.dateTimeStart" class="cal__when">
|
||||
<span class="cal__where-title">{{ $t('cal.when') }}:</span>
|
||||
<span v-html="tools.getstrDateTimeEvent(t, myrec, true)"></span>
|
||||
</div>
|
||||
<!--
|
||||
<span class="dateevent" v-if="myrec.dateTimeStart">dal <span class="datainizio">{{
|
||||
tools.getstrVeryShortDate(myrec.dateTimeStart)
|
||||
}}</span> al <span class="datafine">{{ tools.getstrVeryShortDate(myrec.dateTimeEnd) }}</span>
|
||||
</span>--->
|
||||
</div>
|
||||
<div v-else-if="mycol.name === 'accomodation'">
|
||||
<CAccomodation
|
||||
v-if="!!myrec.accomodation"
|
||||
:mylist="myrec.accomodation"
|
||||
:isInModif="false"
|
||||
:edit="false"
|
||||
:canModify="false"
|
||||
>
|
||||
</CAccomodation>
|
||||
</div>
|
||||
<div v-else-if="mycol.name === 'dateTimeEnd'"></div>
|
||||
<CMyFieldRec
|
||||
v-else
|
||||
:table="table"
|
||||
:id="myrec._id"
|
||||
:rec="myrec"
|
||||
:field="mycol.field"
|
||||
:canEdit="false"
|
||||
:canModify="false"
|
||||
>
|
||||
</CMyFieldRec>
|
||||
</div>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div v-if="myrec.date_created" class="row justify-center">
|
||||
<span class="cal__where-title"> {{ $t('reg.pub_created') }}:</span>
|
||||
<span v-html="tools.getstrDate(myrec.date_created)"></span>
|
||||
</div>
|
||||
<div
|
||||
v-if="
|
||||
tools.getstrDate(myrec.date_updated) !==
|
||||
tools.getstrDate(myrec.date_created)
|
||||
"
|
||||
class="row justify-center"
|
||||
>
|
||||
<span class="cal__where-title"> {{ $t('reg.pub_updated') }}:</span>
|
||||
<span v-html="tools.getstrDate(myrec.date_updated)"></span>
|
||||
</div>
|
||||
|
||||
<div v-if="!nopopup" class="row q-ma-sm q-pa-sm justify-center">
|
||||
<div class="q-ma-sm">
|
||||
<q-btn
|
||||
icon="far fa-file-alt"
|
||||
label="Apri"
|
||||
color="primary"
|
||||
text-color="white"
|
||||
:to="tools.getToByCol(col, table, myrec)"
|
||||
/>
|
||||
</div>
|
||||
<div class="q-ma-sm">
|
||||
<q-btn
|
||||
v-if="myrec._id"
|
||||
:text-color="$q.dark.isActive ? `white` : `black`"
|
||||
icon="fas fa-link"
|
||||
label="Condividi"
|
||||
@click="condividipag"
|
||||
></q-btn>
|
||||
</div>
|
||||
</div>
|
||||
<br /><br />
|
||||
myrec: {{ myrec }}
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CMyCardService.ts">
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<q-item-label v-if="labelFooter" lines="1"
|
||||
><em>{{ labelFooter }}</em></q-item-label
|
||||
>
|
||||
<span v-if="contact.profile && contact.profile.resid_province" class="show_province_title">Prov: <span class="show_province">{{ contact.profile.resid_province }}</span></span>
|
||||
<span v-if="contact.profile.resid_province" class="show_province_title">Prov: <span class="show_province">{{ contact.profile.resid_province }}</span></span>
|
||||
<q-item-label v-if="contact.account" caption lines="2">
|
||||
<CSaldo
|
||||
:small="true"
|
||||
|
||||
@@ -115,8 +115,6 @@ export default defineComponent({
|
||||
idStatusSkill: 1,
|
||||
idContribType: 1,
|
||||
'profile.username_telegram': 1,
|
||||
'profile.favorite': 1,
|
||||
'profile.bookmark': 1,
|
||||
idCity: 1,
|
||||
pub_to_share: 1,
|
||||
numLevel: 1,
|
||||
@@ -157,8 +155,6 @@ export default defineComponent({
|
||||
idStatusSkill: 1,
|
||||
idContribType: 1,
|
||||
'profile.username_telegram': 1,
|
||||
'profile.favorite': 1,
|
||||
'profile.bookmark': 1,
|
||||
idCity: 1,
|
||||
pub_to_share: 1,
|
||||
numLevel: 1,
|
||||
@@ -199,8 +195,6 @@ export default defineComponent({
|
||||
idStatusSkill: 1,
|
||||
idContribType: 1,
|
||||
'profile.username_telegram': 1,
|
||||
'profile.favorite': 1,
|
||||
'profile.bookmark': 1,
|
||||
idCity: 1,
|
||||
pub_to_share: 1,
|
||||
numLevel: 1,
|
||||
@@ -265,8 +259,6 @@ export default defineComponent({
|
||||
idStatusSkill: 1,
|
||||
idContribType: 1,
|
||||
'profile.username_telegram': 1,
|
||||
'profile.favorite': 1,
|
||||
'profile.bookmark': 1,
|
||||
idCity: 1,
|
||||
pub_to_share: 1,
|
||||
numLevel: 1,
|
||||
@@ -308,8 +300,6 @@ export default defineComponent({
|
||||
idStatusSkill: 1,
|
||||
idContribType: 1,
|
||||
'profile.username_telegram': 1,
|
||||
'profile.favorite': 1,
|
||||
'profile.bookmark': 1,
|
||||
idCity: 1,
|
||||
pub_to_share: 1,
|
||||
numLevel: 1,
|
||||
@@ -351,8 +341,6 @@ export default defineComponent({
|
||||
idStatusSkill: 1,
|
||||
idContribType: 1,
|
||||
'profile.username_telegram': 1,
|
||||
'profile.favorite': 1,
|
||||
'profile.bookmark': 1,
|
||||
idCity: 1,
|
||||
pub_to_share: 1,
|
||||
numLevel: 1,
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
:prop_mytitle="title"
|
||||
:prop_mycolumns="col"
|
||||
:prop_colkey="prop_colkey"
|
||||
:options="tools.optionsTable(table)"
|
||||
:col_title="col_title"
|
||||
:col_footer="col_footer"
|
||||
:vertical="costanti.VISUTABLE_LISTA"
|
||||
|
||||
Reference in New Issue
Block a user