new version Visualizzazione Service
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.5.83"
|
||||
APP_VERSION="0.5.84"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.5.83"
|
||||
APP_VERSION="0.5.84"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.5.83"
|
||||
APP_VERSION="0.5.84"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.5.83"
|
||||
APP_VERSION="0.5.84"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.5.83"
|
||||
APP_VERSION="0.5.84"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.5.83"
|
||||
APP_VERSION="0.5.84"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="14"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
14
package.json
14
package.json
@@ -123,16 +123,16 @@
|
||||
"crypto": false
|
||||
},
|
||||
"browserslist": [
|
||||
"last 20 Chrome versions",
|
||||
"last 20 Firefox versions",
|
||||
"last 40 Chrome versions",
|
||||
"last 40 Firefox versions",
|
||||
"last 10 Edge versions",
|
||||
"last 15 Safari versions",
|
||||
"last 35 Safari versions",
|
||||
"last 60 Android versions",
|
||||
"last 180 ChromeAndroid versions",
|
||||
"last 40 FirefoxAndroid versions",
|
||||
"last 20 iOS versions",
|
||||
"last 250 ChromeAndroid versions",
|
||||
"last 60 FirefoxAndroid versions",
|
||||
"last 30 iOS versions",
|
||||
"last 10 Opera versions",
|
||||
"> 0.1%",
|
||||
"> 0.05%",
|
||||
"not dead"
|
||||
],
|
||||
"engines": {
|
||||
|
||||
@@ -170,6 +170,14 @@ export const shared_consts = {
|
||||
TABLES_MYGOODS: 'mygoods',
|
||||
TABLES_MYEVENTS: 'myevents',
|
||||
|
||||
MYTABS: [{id: 0, table: 'none' },
|
||||
{id: 1, table: 'myskills'},
|
||||
{id: 2, table: 'mybachecas' },
|
||||
{id: 3, table: 'myhosps'} ,
|
||||
{id: 4, table: 'mygoods'},
|
||||
{id: 5, table: 'myevents'}
|
||||
],
|
||||
|
||||
TABLES_ENABLE_GETREC_BYID: ['mybachecas', 'myhosps'],
|
||||
|
||||
TABLES_USER_INCLUDE_MY: ['mygroups'],
|
||||
|
||||
@@ -1158,6 +1158,7 @@ export default defineComponent({
|
||||
mygood: 1,
|
||||
idStatusSkill: 1,
|
||||
idContribType: 1,
|
||||
'profile.username_telegram': 1,
|
||||
idCity: 1,
|
||||
pub_to_share: 1,
|
||||
numLevel: 1,
|
||||
@@ -1179,6 +1180,7 @@ export default defineComponent({
|
||||
'profile.img': 1,
|
||||
'profile.mygroups': 1,
|
||||
'profile.qualifica': 1,
|
||||
'profile.resid_province': 1,
|
||||
reported: 1,
|
||||
date_report: 1,
|
||||
username_who_report: 1,
|
||||
@@ -1225,6 +1227,7 @@ export default defineComponent({
|
||||
myskill: 1,
|
||||
idStatusSkill: 1,
|
||||
idContribType: 1,
|
||||
'profile.username_telegram': 1,
|
||||
idCity: 1,
|
||||
pub_to_share: 1,
|
||||
dateTimeStart: 1,
|
||||
@@ -1248,6 +1251,7 @@ export default defineComponent({
|
||||
'profile.img': 1,
|
||||
'profile.mygroups': 1,
|
||||
'profile.qualifica': 1,
|
||||
'profile.resid_province': 1,
|
||||
reported: 1,
|
||||
date_report: 1,
|
||||
username_who_report: 1,
|
||||
@@ -1300,6 +1304,7 @@ export default defineComponent({
|
||||
accomodation: 1,
|
||||
preferences: 1,
|
||||
idContribType: 1,
|
||||
'profile.username_telegram': 1,
|
||||
photos: 1,
|
||||
idCity: 1,
|
||||
pub_to_share: 1,
|
||||
@@ -1346,6 +1351,7 @@ export default defineComponent({
|
||||
myskill: 1,
|
||||
idStatusSkill: 1,
|
||||
idContribType: 1,
|
||||
'profile.username_telegram': 1,
|
||||
idCity: 1,
|
||||
pub_to_share: 1,
|
||||
numLevel: 1,
|
||||
@@ -1367,6 +1373,7 @@ export default defineComponent({
|
||||
'profile.img': 1,
|
||||
'profile.mygroups': 1,
|
||||
'profile.qualifica': 1,
|
||||
'profile.resid_province': 1,
|
||||
reported: 1,
|
||||
date_report: 1,
|
||||
username_who_report: 1,
|
||||
|
||||
@@ -36,6 +36,7 @@ import { costanti } from '@costanti'
|
||||
import translate from '@/globalroutines/util'
|
||||
import { toolsext } from '@store/Modules/toolsext'
|
||||
import { CMyCardPopup } from '@/components/CMyCardPopup'
|
||||
import { CMyCardService } from '@/components/CMyCardService'
|
||||
import { CMyCardGrpPopup } from '@/components/CMyCardGrpPopup'
|
||||
import { CMyCardCircuitPopup } from '@/components/CMyCardCircuitPopup'
|
||||
import { useRouter } from 'vue-router'
|
||||
@@ -287,7 +288,7 @@ export default defineComponent({
|
||||
components: {
|
||||
CMyPopupEdit, CTitleBanner, CMyFieldDb, CMySelect, CMyFriends, CMyGroups,
|
||||
CMyUser, CMyRecCard, CMyCardPopup, CMyRecGrpCard, CMyCardGrpPopup, CMyCardCircuitPopup,
|
||||
CMyRecCircuitCard
|
||||
CMyRecCircuitCard, CMyCardService
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
const $q = useQuasar()
|
||||
@@ -661,7 +662,7 @@ export default defineComponent({
|
||||
for (const item of searchList.value) {
|
||||
if (!item.notinsearch) {
|
||||
if (item.value && item.value !== -100) {
|
||||
console.log(item.label, item.value)
|
||||
// console.log(item.label, item.value)
|
||||
numfilter++
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1090,6 +1090,7 @@
|
||||
@hide="hidewindow"
|
||||
:maximized="$q.screen.lt.sm"
|
||||
>
|
||||
|
||||
<CMyCardGrpPopup
|
||||
v-if="mytable === toolsext.TABMYGROUPS"
|
||||
:table="mytable"
|
||||
@@ -1102,6 +1103,9 @@
|
||||
:prop_myrec="myrecdialog"
|
||||
>
|
||||
</CMyCardCircuitPopup>
|
||||
<CMyCardService v-else-if="mytable === 'myskills'"
|
||||
:table="mytable" :prop_myrec="myrecdialog">
|
||||
</CMyCardService>
|
||||
<CMyCardPopup v-else :table="mytable" :prop_myrec="myrecdialog">
|
||||
</CMyCardPopup>
|
||||
</q-dialog>
|
||||
|
||||
@@ -34,9 +34,9 @@ export default defineComponent({
|
||||
default: null,
|
||||
},
|
||||
idRec: {
|
||||
type: Number,
|
||||
type: String,
|
||||
required: false,
|
||||
default: 0
|
||||
default: ''
|
||||
},
|
||||
nopopup: {
|
||||
type: Boolean,
|
||||
@@ -66,7 +66,7 @@ export default defineComponent({
|
||||
|
||||
function load() {
|
||||
// Carica il profilo di quest'utente
|
||||
if (props.idRec > 0) {
|
||||
if (props.idRec) {
|
||||
userStore.loadGeneric(props.table, props.idRec, idnotif.value).then((ris) => {
|
||||
myrec.value = ris
|
||||
notifStore.setAsRead(idnotif.value)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
|
||||
<q-card class="dialog_card q-mb-lg" v-if="myrec._id">
|
||||
<q-card class="dialog_card q-mb-lg" v-if="myrec && myrec._id">
|
||||
|
||||
<q-footer
|
||||
v-if="!nopopup"
|
||||
|
||||
127
src/components/CMyCardService/CMyCardService.scss
Normal file
127
src/components/CMyCardService/CMyCardService.scss
Normal file
@@ -0,0 +1,127 @@
|
||||
.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;
|
||||
}
|
||||
|
||||
}
|
||||
135
src/components/CMyCardService/CMyCardService.ts
Normal file
135
src/components/CMyCardService/CMyCardService.ts
Normal file
@@ -0,0 +1,135 @@
|
||||
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 { 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: 'CMyCardService',
|
||||
components: { CProfile, CTitleBanner,
|
||||
CMyFieldDb, CDateTime, CMyPage, CMyFieldRec, CAccomodation,
|
||||
CMyUser },
|
||||
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 > 0) {
|
||||
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,
|
||||
}
|
||||
}
|
||||
})
|
||||
358
src/components/CMyCardService/CMyCardService.vue
Normal file
358
src/components/CMyCardService/CMyCardService.vue
Normal file
@@ -0,0 +1,358 @@
|
||||
<template>
|
||||
<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"
|
||||
:src="myrec.photos[0].imagefile"
|
||||
class="imgautosize"
|
||||
:alt="myrec.descr">
|
||||
</q-img>
|
||||
<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, 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 />
|
||||
|
||||
<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.sector && myrec.sector[0].descr"
|
||||
class="glossy"
|
||||
color="blue"
|
||||
text-color="white"
|
||||
dense
|
||||
>
|
||||
<span class="cal__quota-content">{{
|
||||
myrec.sector[0].descr
|
||||
}}</span>
|
||||
</q-chip>
|
||||
<q-chip
|
||||
v-if="myrec.recSkill.length > 0 && myrec.recSkill[0].descr"
|
||||
class="glossy"
|
||||
dense
|
||||
color="blue"
|
||||
text-color="white"
|
||||
>
|
||||
<span class="cal__quota-content">{{
|
||||
myrec.recSkill[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>{{ myrec.website }}</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 />
|
||||
<q-card-actions align="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>
|
||||
</div>
|
||||
|
||||
<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"
|
||||
>
|
||||
<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>
|
||||
</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">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CMyCardService.scss';
|
||||
</style>
|
||||
|
||||
1
src/components/CMyCardService/index.ts
Normal file
1
src/components/CMyCardService/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export { default as CMyCardService } from './CMyCardService.vue'
|
||||
@@ -88,7 +88,7 @@ export default defineComponent({
|
||||
})
|
||||
|
||||
function load() {
|
||||
console.log('load', mypathin.value)
|
||||
// console.log('load', mypathin.value)
|
||||
|
||||
if (mypathin.value !== '') {
|
||||
globalStore.loadPage('/' + mypathin.value, 'cmypageelem').then(ris => {
|
||||
@@ -102,7 +102,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
watch(() => props.mypath, (to: string, from: string) => {
|
||||
console.log('... load', mypathin.value, props.mypath)
|
||||
// console.log('... load', mypathin.value, props.mypath)
|
||||
selElem.value = {}
|
||||
load()
|
||||
})
|
||||
@@ -116,7 +116,7 @@ export default defineComponent({
|
||||
})
|
||||
|
||||
function selElemClick(myelem: IMyElem) {
|
||||
console.log('mypageelem selElemClick', myelem)
|
||||
// console.log('mypageelem selElemClick', myelem)
|
||||
selElem.value = {}
|
||||
selElem.value = myelem
|
||||
visuEditor.value = !!myelem
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
:optlab="fieldsTable.getLabelByTable(jointable)"
|
||||
:options="globalStore.getTableJoinByName(jointable, false, false, '')"
|
||||
:useinput="false"
|
||||
:dark="true"
|
||||
:dark="$q.dark.isActive"
|
||||
@update:value="changevalRec"
|
||||
>
|
||||
</CMySelect>
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
<q-item-label v-if="labelFooter" lines="1"
|
||||
><em>{{ labelFooter }}</em></q-item-label
|
||||
>
|
||||
<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"
|
||||
|
||||
@@ -114,6 +114,7 @@ export default defineComponent({
|
||||
myskill: 1,
|
||||
idStatusSkill: 1,
|
||||
idContribType: 1,
|
||||
'profile.username_telegram': 1,
|
||||
idCity: 1,
|
||||
pub_to_share: 1,
|
||||
numLevel: 1,
|
||||
@@ -135,6 +136,7 @@ export default defineComponent({
|
||||
'profile.img': 1,
|
||||
'profile.mygroups': 1,
|
||||
'profile.qualifica': 1,
|
||||
'profile.resid_province': 1,
|
||||
reported: 1,
|
||||
}
|
||||
},
|
||||
@@ -152,6 +154,7 @@ export default defineComponent({
|
||||
myskill: 1,
|
||||
idStatusSkill: 1,
|
||||
idContribType: 1,
|
||||
'profile.username_telegram': 1,
|
||||
idCity: 1,
|
||||
pub_to_share: 1,
|
||||
numLevel: 1,
|
||||
@@ -173,6 +176,7 @@ export default defineComponent({
|
||||
'profile.img': 1,
|
||||
'profile.mygroups': 1,
|
||||
'profile.qualifica': 1,
|
||||
'profile.resid_province': 1,
|
||||
reported: 1,
|
||||
}
|
||||
},
|
||||
@@ -190,6 +194,7 @@ export default defineComponent({
|
||||
myskill: 1,
|
||||
idStatusSkill: 1,
|
||||
idContribType: 1,
|
||||
'profile.username_telegram': 1,
|
||||
idCity: 1,
|
||||
pub_to_share: 1,
|
||||
numLevel: 1,
|
||||
@@ -210,6 +215,7 @@ export default defineComponent({
|
||||
'profile.img': 1,
|
||||
'profile.mygroups': 1,
|
||||
'profile.qualifica': 1,
|
||||
'profile.resid_province': 1,
|
||||
reported: 1,
|
||||
}
|
||||
},
|
||||
@@ -252,6 +258,7 @@ export default defineComponent({
|
||||
myskill: 1,
|
||||
idStatusSkill: 1,
|
||||
idContribType: 1,
|
||||
'profile.username_telegram': 1,
|
||||
idCity: 1,
|
||||
pub_to_share: 1,
|
||||
numLevel: 1,
|
||||
@@ -272,6 +279,7 @@ export default defineComponent({
|
||||
'profile.img': 1,
|
||||
'profile.mygroups': 1,
|
||||
'profile.qualifica': 1,
|
||||
'profile.resid_province': 1,
|
||||
reported: 1,
|
||||
}
|
||||
},
|
||||
@@ -291,6 +299,7 @@ export default defineComponent({
|
||||
myskill: 1,
|
||||
idStatusSkill: 1,
|
||||
idContribType: 1,
|
||||
'profile.username_telegram': 1,
|
||||
idCity: 1,
|
||||
pub_to_share: 1,
|
||||
numLevel: 1,
|
||||
@@ -311,6 +320,7 @@ export default defineComponent({
|
||||
'profile.img': 1,
|
||||
'profile.mygroups': 1,
|
||||
'profile.qualifica': 1,
|
||||
'profile.resid_province': 1,
|
||||
reported: 1,
|
||||
}
|
||||
},
|
||||
@@ -330,6 +340,7 @@ export default defineComponent({
|
||||
myskill: 1,
|
||||
idStatusSkill: 1,
|
||||
idContribType: 1,
|
||||
'profile.username_telegram': 1,
|
||||
idCity: 1,
|
||||
pub_to_share: 1,
|
||||
numLevel: 1,
|
||||
@@ -351,6 +362,7 @@ export default defineComponent({
|
||||
'profile.img': 1,
|
||||
'profile.mygroups': 1,
|
||||
'profile.qualifica': 1,
|
||||
'profile.resid_province': 1,
|
||||
}
|
||||
},
|
||||
lookup4: {
|
||||
|
||||
@@ -679,6 +679,18 @@ h3 {
|
||||
border: #666cf6 solid 5px;
|
||||
}
|
||||
|
||||
.clBorderService {
|
||||
border-radius: 16px;
|
||||
font-size: 1rem;
|
||||
padding: 6px;
|
||||
}
|
||||
.clBorderUser {
|
||||
border-radius: 16px;
|
||||
font-size: 1rem;
|
||||
margin-top: 2px;
|
||||
padding: 0px !important;
|
||||
}
|
||||
|
||||
.clBorderTutor {
|
||||
border-radius: 16px;
|
||||
border: #f634b5 solid 2px;
|
||||
@@ -1570,3 +1582,16 @@ h3 {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.show_province_title{
|
||||
font-size: 0.85rem;
|
||||
font-style: italic;
|
||||
text-align: right;
|
||||
color:#A0A0A0;
|
||||
}
|
||||
.show_province{
|
||||
font-size: 0.85rem;
|
||||
font-style: italic;
|
||||
text-align: right;
|
||||
color: grey;
|
||||
}
|
||||
|
||||
@@ -69,6 +69,7 @@ export interface IContribtype {
|
||||
_id: any
|
||||
label: string
|
||||
showprice: boolean
|
||||
color: string
|
||||
}
|
||||
|
||||
export interface ILabelValue {
|
||||
|
||||
@@ -955,7 +955,7 @@ export interface IProvince {
|
||||
}
|
||||
|
||||
export interface IMySkill extends IMyMain {
|
||||
_id: number
|
||||
_id: string
|
||||
idSector: number
|
||||
idSkill: number
|
||||
// idSubSkill: number[]
|
||||
@@ -980,7 +980,7 @@ export interface IMyMain {
|
||||
}
|
||||
|
||||
export interface IMyGoods extends IMyMain {
|
||||
_id: number
|
||||
_id: string
|
||||
idSector: number
|
||||
idSkill: number
|
||||
idShipping: number[]
|
||||
@@ -1000,7 +1000,7 @@ export interface IMyGoods extends IMyMain {
|
||||
}
|
||||
|
||||
export interface IMyBacheca extends IMyMain {
|
||||
_id: number
|
||||
_id: string
|
||||
idSector: number
|
||||
idSkill: number
|
||||
// idSubSkill: number[]
|
||||
@@ -1027,7 +1027,7 @@ export interface IAccomodation {
|
||||
}
|
||||
|
||||
export interface IMyHosp extends IMyMain {
|
||||
_id: number
|
||||
_id: string
|
||||
visibile: boolean
|
||||
typeHosp: number
|
||||
numMaxPeopleHosp: number
|
||||
|
||||
@@ -57,6 +57,16 @@ export interface IUserNotifType {
|
||||
value: number
|
||||
}
|
||||
|
||||
export interface IBookmark {
|
||||
id: string
|
||||
tab: number
|
||||
}
|
||||
|
||||
export interface IFavorite {
|
||||
id: string
|
||||
tab: number
|
||||
}
|
||||
|
||||
|
||||
export interface IUserProfile {
|
||||
img?: string
|
||||
@@ -117,6 +127,8 @@ export interface IUserProfile {
|
||||
noNameSurname: boolean
|
||||
noCircuit: boolean
|
||||
noFoto: boolean
|
||||
bookmark: IBookmark[]
|
||||
favorite: IFavorite[]
|
||||
|
||||
// in memory
|
||||
asked_friends: any[]
|
||||
|
||||
@@ -193,6 +193,7 @@ const msg_it = {
|
||||
indietro: 'Indietro',
|
||||
finish: 'Fine',
|
||||
sendmsg: 'Invia Messaggio',
|
||||
contact: 'Messaggia',
|
||||
sendonlymsg: 'Invia solo un Msg',
|
||||
msg: {
|
||||
titledeleteTask: 'Elimina Task',
|
||||
@@ -1482,6 +1483,13 @@ const msg_it = {
|
||||
step_fine_title: 'Fine',
|
||||
step_fine: 'Hai completato l\'aggiornamento del tuo Profilo. Ricorda che potrai modificarlo, cliccando sulla prima icona in alto a destra 🙎🏻♂️ .',
|
||||
},
|
||||
|
||||
cmd: {
|
||||
favorite_set: 'Aggiunto ai Preferiti',
|
||||
favorite_unset: 'Rimosso dai Preferiti',
|
||||
bookmark_set: 'Aggiunto ai Segnalibri',
|
||||
bookmark_unset: 'Rimosso dai Segnalibri',
|
||||
},
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
@@ -88,6 +88,11 @@ export const useCalendarStore = defineStore('CalendarStore', {
|
||||
const ctrec = mystate.contribtype.find((mycontr) => mycontr._id === id)
|
||||
return (ctrec) ? ctrec.label : ''
|
||||
|
||||
},
|
||||
getColByContribType: (mystate: ICalendarState) => (id: string) => {
|
||||
const ctrec = mystate.contribtype.find((mycontr) => mycontr._id === id)
|
||||
return (ctrec && ctrec.color) ? ctrec.color : 'green'
|
||||
|
||||
},
|
||||
getContribtypeRecByLabel: (mystate: ICalendarState) => (label: string) => {
|
||||
const ctrec = mystate.contribtype.find((mycontr) => mycontr.label === label)
|
||||
|
||||
@@ -3177,6 +3177,17 @@ export const tools = {
|
||||
return ''
|
||||
},
|
||||
|
||||
getstrDateMonthTimeLong(mytimestamp: Date | number | string | undefined) {
|
||||
// console.log('getstrDate', mytimestamp)
|
||||
if (mytimestamp) return date.formatDate(mytimestamp, 'DD MMM YY - HH:mm')
|
||||
return ''
|
||||
},
|
||||
getstrDateMonthLong(mytimestamp: Date | number | string | undefined) {
|
||||
// console.log('getstrDate', mytimestamp)
|
||||
if (mytimestamp) return date.formatDate(mytimestamp, 'DD MMMM YYYY')
|
||||
return ''
|
||||
},
|
||||
|
||||
getstrDateMonthWeekTimeShort(mytimestamp: Date | number | string | undefined) {
|
||||
// console.log('getstrDate', mytimestamp)
|
||||
if (mytimestamp) return `${this.getDayOfWeek(mytimestamp)} ${date.formatDate(mytimestamp, 'DD MMM - HH:mm')}`
|
||||
@@ -6827,7 +6838,6 @@ export const tools = {
|
||||
getdefaultnewrec_MySkill(): any {
|
||||
|
||||
return {
|
||||
_id: 0,
|
||||
idSector: tools.getSelectionByTable('sectors', 0, true),
|
||||
idSkill: tools.getSelectionByTable('skills', 0, true),
|
||||
idStatusSkill: tools.getSelectionByTable('statusSkills', [1]),
|
||||
@@ -6846,8 +6856,6 @@ export const tools = {
|
||||
|
||||
getdefaultnewrec_MyGoods(): any {
|
||||
return {
|
||||
_id: 0,
|
||||
|
||||
// idSectorGood: 0,
|
||||
// idGood: 0,
|
||||
// idStatusSkill: [],
|
||||
@@ -6877,7 +6885,6 @@ export const tools = {
|
||||
|
||||
getdefaultnewrec_MyGroup(): any {
|
||||
return {
|
||||
_id: 0,
|
||||
groupname: '',
|
||||
photos: [],
|
||||
visibility: 0,
|
||||
@@ -6912,7 +6919,6 @@ export const tools = {
|
||||
|
||||
getdefaultnewrec_MyBacheca(): any {
|
||||
return {
|
||||
_id: 0,
|
||||
idSector: tools.getSelectionByTable('sectors', 0, true),
|
||||
idSkill: tools.getSelectionByTable('skills', 0, true),
|
||||
idStatusSkill: tools.getSelectionByTable('statusSkills', []),
|
||||
@@ -6935,7 +6941,6 @@ export const tools = {
|
||||
getdefaultnewrec_MyHosp(): any {
|
||||
return {
|
||||
visibile: true,
|
||||
_id: 0,
|
||||
typeHosp: tools.getSelectionByTable(toolsext.TABTYPEHOSP, 2),
|
||||
idContribType: tools.getSelectionByTable('contribtypes', []),
|
||||
idCity: this.getCitySel(),
|
||||
@@ -7749,6 +7754,18 @@ export const tools = {
|
||||
|
||||
getPagination(table: string): IPagination {
|
||||
return { sortBy: 'desc', descending: true, page: 1, rowsNumber: 0, rowsPerPage: 10 }
|
||||
},
|
||||
|
||||
getNumTabByTable(table: string) {
|
||||
return shared_consts.MYTABS.findIndex((rec: any) => rec.table === table)
|
||||
},
|
||||
|
||||
removeItemOnce(arr: any, value: any) {
|
||||
const index = arr.indexOf(value)
|
||||
if (index > -1) {
|
||||
arr.splice(index, 1)
|
||||
}
|
||||
return arr;
|
||||
}
|
||||
|
||||
// FINE !
|
||||
|
||||
@@ -35,12 +35,17 @@ import { Router } from 'vue-router'
|
||||
import { useProjectStore } from '@store/Projects'
|
||||
import { shared_consts } from '@/common/shared_vuejs'
|
||||
import { costanti } from '@costanti'
|
||||
import { IGroupShort, IMyGroup, IUserAdmins } from '@model/UserStore'
|
||||
import { IBookmark, IGroupShort, IMyGroup, IUserAdmins } from '@model/UserStore'
|
||||
|
||||
import globalroutines from '../globalroutines/index'
|
||||
import { useNotifStore } from '@store/NotifStore'
|
||||
import { useCircuitStore } from './CircuitStore'
|
||||
|
||||
export const CMD_USER = {
|
||||
SET_FAVORITE: 1,
|
||||
SET_BOOKMARK: 2,
|
||||
}
|
||||
|
||||
export const DefaultUser: IUserFields = {
|
||||
_id: '',
|
||||
email: '',
|
||||
@@ -76,6 +81,8 @@ export const DefaultUser: IUserFields = {
|
||||
asked_groups: [],
|
||||
refused_groups: [],
|
||||
notifs: [],
|
||||
bookmark: [],
|
||||
favorite: [],
|
||||
notif_idCities: [],
|
||||
notif_provinces: [],
|
||||
notif_regions: [],
|
||||
@@ -141,6 +148,8 @@ export const DefaultProfile: IUserProfile = {
|
||||
asked_groups: [],
|
||||
refused_groups: [],
|
||||
notifs: [],
|
||||
bookmark: [],
|
||||
favorite: [],
|
||||
notif_idCities: [],
|
||||
notif_provinces: [],
|
||||
notif_regions: [],
|
||||
@@ -1472,7 +1481,7 @@ export const useUserStore = defineStore('UserStore', {
|
||||
|
||||
},
|
||||
|
||||
async loadGeneric(table: string, id: number, idnotif: string) {
|
||||
async loadGeneric(table: string, id: any, idnotif: string) {
|
||||
const data = {
|
||||
table,
|
||||
id,
|
||||
@@ -1629,6 +1638,59 @@ export const useUserStore = defineStore('UserStore', {
|
||||
return {}
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
async setFavorite($q: any, t: any, id: any, table: string) {
|
||||
let value = {}
|
||||
|
||||
const tab = tools.getNumTabByTable(table)
|
||||
|
||||
return await Api.SendReq('/users/cmd', 'POST', { cmd: CMD_USER.SET_FAVORITE, id, tab, value })
|
||||
.then((res) => {
|
||||
if (res && res.data.state === 1) {
|
||||
this.my.profile.favorite.push({ id, tab })
|
||||
tools.showPositiveNotif($q, t('cmd.favorite_set'))
|
||||
} else if (res && res.data.state === -1) {
|
||||
this.my.profile.favorite = tools.removeItemOnce(this.my.profile.favorite, { id, tab })
|
||||
tools.showPositiveNotif($q, t('db.favorite_unset'))
|
||||
}
|
||||
}).catch((error) => {
|
||||
tools.showNegativeNotif($q, t('db.recfailed'))
|
||||
return {}
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
isBookmarked(id: string, table: string) {
|
||||
const tab = tools.getNumTabByTable(table)
|
||||
const mybookmark = this.my.profile.bookmark.find((rec: IBookmark) => ((rec.id === id) && (rec.tab === tab)))
|
||||
return mybookmark
|
||||
},
|
||||
|
||||
isFavorite(id: string, table: string) {
|
||||
const tab = tools.getNumTabByTable(table)
|
||||
const myfavorite = this.my.profile.favorite.find((rec: IBookmark) => ((rec.id === id) && (rec.tab === tab)))
|
||||
return myfavorite
|
||||
},
|
||||
|
||||
async setBookmark($q: any, t: any, id: any, table: string) {
|
||||
let value = {}
|
||||
|
||||
const tab = tools.getNumTabByTable(table)
|
||||
|
||||
return await Api.SendReq('/users/cmd', 'POST', { cmd: CMD_USER.SET_BOOKMARK, id, tab, value })
|
||||
.then((res) => {
|
||||
if (res && res.data.state === 1) {
|
||||
tools.showPositiveNotif($q, t('cmd.bookmark_set'))
|
||||
} else if (res && res.data.state === -1) {
|
||||
tools.showPositiveNotif($q, t('db.bookmark_unset'))
|
||||
}
|
||||
}).catch((error) => {
|
||||
tools.showNegativeNotif($q, t('db.recfailed'))
|
||||
return {}
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
},
|
||||
})
|
||||
|
||||
@@ -1025,7 +1025,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
path = path.substring(1)
|
||||
const mypage = this.getPage(`/${path}`)
|
||||
|
||||
console.log('mypage', mypage)
|
||||
// console.log('mypage', mypage)
|
||||
|
||||
// Controlla se l'ho già caricato
|
||||
if (!!mypage && (!!mypage.content || mypage.loadFirst || mypage.loaded)) {
|
||||
|
||||
@@ -127,7 +127,9 @@
|
||||
</CMyFieldDb>
|
||||
|
||||
<div class="myrow">
|
||||
|
||||
<CMyFieldDb
|
||||
v-if="false"
|
||||
:title="$t('reg.nationality')"
|
||||
table="users"
|
||||
tablesel="countries"
|
||||
|
||||
@@ -330,6 +330,7 @@ export default defineComponent({
|
||||
'profile.img': 1,
|
||||
'profile.mycircuits': 1,
|
||||
'profile.qualifica': 1,
|
||||
'profile.resid_province': 1,
|
||||
'account._id': 1,
|
||||
'account.saldo': 1,
|
||||
'account.fidoConcesso': 1,
|
||||
|
||||
@@ -197,6 +197,7 @@ export default defineComponent({
|
||||
'profile.img': 1,
|
||||
'profile.mygroups': 1,
|
||||
'profile.qualifica': 1,
|
||||
'profile.resid_province': 1,
|
||||
reported: 1,
|
||||
date_report: 1,
|
||||
username_who_report: 1,
|
||||
|
||||
@@ -619,9 +619,7 @@
|
||||
<div
|
||||
v-if="
|
||||
userStore.userprofile &&
|
||||
userStore.userprofile._id &&
|
||||
(userStore.IsMyFriendByUsername(userStore.userprofile.username) ||
|
||||
isMyRecord(userStore.userprofile.username))
|
||||
userStore.userprofile._id
|
||||
"
|
||||
>
|
||||
<CTitleBanner
|
||||
@@ -637,6 +635,13 @@
|
||||
class="fit column no-wrap justify-evenly content-start"
|
||||
>
|
||||
<div class="col-md-6 col-sm-6 q-ma-xs col-xs-12">
|
||||
<CLabel
|
||||
v-if="!!userStore.userprofile.profile.resid_province"
|
||||
v-bind="$attrs"
|
||||
:copy="false"
|
||||
:value="globalStore.getProvinceByProv(userStore.userprofile.profile.resid_province)"
|
||||
label="Provincia"
|
||||
/>
|
||||
<CDateTime
|
||||
v-if="
|
||||
checkifShow('profile.dateofbirth') &&
|
||||
@@ -657,13 +662,6 @@
|
||||
"
|
||||
label="Cellulare"
|
||||
/>
|
||||
<CLabel
|
||||
v-if="!!userStore.userprofile.profile.resid_province"
|
||||
v-bind="$attrs"
|
||||
:copy="true"
|
||||
:value="globalStore.getProvinceByProv(userStore.userprofile.profile.resid_province)"
|
||||
label="Provincia"
|
||||
/>
|
||||
|
||||
<!--
|
||||
<CMyFieldRec
|
||||
|
||||
@@ -37,7 +37,7 @@ export default defineComponent({
|
||||
|
||||
const table = ref(toolsext.TABMYSKILLS)
|
||||
|
||||
const idSkill = computed(() => $route.params.idSkill ? $route.params.idSkill.toString() : 0)
|
||||
const idSkill = computed(() => $route.params.idSkill ? $route.params.idSkill.toString() : '')
|
||||
|
||||
const filtroutente = ref(<any[]>[])
|
||||
const showPic = ref(false)
|
||||
@@ -57,7 +57,7 @@ export default defineComponent({
|
||||
function loadSkill() {
|
||||
// Carica il profilo di quest'utente
|
||||
if (idSkill.value) {
|
||||
/*
|
||||
|
||||
userStore.loadSkill(idSkill.value).then((ris) => {
|
||||
myskill.value = ris
|
||||
if (ris.userId) {
|
||||
@@ -65,7 +65,7 @@ export default defineComponent({
|
||||
|
||||
}
|
||||
})
|
||||
*/
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user