2022-05-05 23:56:23 +02:00
|
|
|
<!--suppress ALL -->
|
2022-02-14 15:38:23 +01:00
|
|
|
<template>
|
2023-04-07 17:14:51 +02:00
|
|
|
<div
|
|
|
|
|
class="q-py-xs centermydiv cardrec"
|
|
|
|
|
:style="
|
|
|
|
|
`max-width: ` +
|
|
|
|
|
(tools.getwidth($q) - 20) +
|
|
|
|
|
`px; ` +
|
|
|
|
|
($q.screen.lt.sm
|
|
|
|
|
? `min-width: ` + (tools.getwidth($q) - (20 + margin_right)) + `px;`
|
|
|
|
|
: ``)
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
<q-item v-if="myrec" clickable v-ripple :class="`shadow-2 butt_rounded `">
|
|
|
|
|
<q-item-section
|
|
|
|
|
v-if="
|
|
|
|
|
shared_consts.TABLES_VISU_IMG.includes(table) &&
|
|
|
|
|
myrec.photos &&
|
|
|
|
|
myrec.photos.length > 0
|
|
|
|
|
"
|
|
|
|
|
avatar
|
|
|
|
|
@click="cmdExt(costanti.CMD_SHOW_PAGE, myrec)"
|
|
|
|
|
>
|
|
|
|
|
<q-badge
|
|
|
|
|
v-if="showBadge()"
|
|
|
|
|
class="q-my-xs self-center"
|
|
|
|
|
:color="fieldsTable.getColByAdType(myrec.adType)"
|
|
|
|
|
>
|
2022-03-01 23:50:47 +01:00
|
|
|
{{ fieldsTable.getValByTabAndId(table, 'adType', myrec.adType) }}
|
2023-04-07 17:14:51 +02:00
|
|
|
<q-icon
|
|
|
|
|
:name="fieldsTable.getIconByAdType(myrec.adType)"
|
|
|
|
|
color="white"
|
|
|
|
|
class="q-ml-xs"
|
|
|
|
|
/>
|
2022-03-01 23:50:47 +01:00
|
|
|
</q-badge>
|
2022-08-15 15:10:00 +02:00
|
|
|
|
2022-02-21 18:54:16 +01:00
|
|
|
<q-avatar size="60px">
|
2023-04-07 17:14:51 +02:00
|
|
|
<q-img
|
|
|
|
|
:src="
|
|
|
|
|
tools.getFullFileName(myrec.photos, table, myrec.username, '')
|
|
|
|
|
"
|
|
|
|
|
:alt="myrec.descr"
|
|
|
|
|
img-class="imgprofile"
|
|
|
|
|
height="60px"
|
|
|
|
|
/>
|
2022-02-21 18:54:16 +01:00
|
|
|
</q-avatar>
|
|
|
|
|
</q-item-section>
|
2022-08-15 15:10:00 +02:00
|
|
|
|
2022-02-21 18:54:16 +01:00
|
|
|
<q-item-section v-else avatar @click="naviga(`/my/` + myrec.username)">
|
2023-04-07 17:14:51 +02:00
|
|
|
<q-badge
|
|
|
|
|
v-if="showBadge()"
|
|
|
|
|
class="q-my-xs self-center"
|
|
|
|
|
:color="fieldsTable.getColByAdType(myrec.adType)"
|
|
|
|
|
>
|
2022-02-17 00:44:52 +01:00
|
|
|
{{ fieldsTable.getValByTabAndId(table, 'adType', myrec.adType) }}
|
2023-04-07 17:14:51 +02:00
|
|
|
<q-icon
|
|
|
|
|
:name="fieldsTable.getIconByAdType(myrec.adType)"
|
|
|
|
|
color="white"
|
|
|
|
|
class="q-ml-xs"
|
|
|
|
|
/>
|
2022-02-14 15:38:23 +01:00
|
|
|
</q-badge>
|
|
|
|
|
<q-avatar size="60px">
|
2023-04-07 17:14:51 +02:00
|
|
|
<q-img
|
|
|
|
|
:src="getImgUser(myrec)"
|
|
|
|
|
:alt="myrec.username"
|
|
|
|
|
img-class="imgprofile"
|
|
|
|
|
height="60px"
|
|
|
|
|
/>
|
2022-02-14 15:38:23 +01:00
|
|
|
</q-avatar>
|
|
|
|
|
</q-item-section>
|
|
|
|
|
|
2022-07-10 01:24:54 +02:00
|
|
|
<q-item-section @click="navigaExt(myrec)">
|
2023-04-07 17:14:51 +02:00
|
|
|
<q-item-label lines="2" class="full-width">
|
|
|
|
|
<span
|
|
|
|
|
v-for="(rec, ind) of tools.getArrSubSector(table, myrec)"
|
|
|
|
|
:key="ind"
|
|
|
|
|
>
|
|
|
|
|
<q-chip
|
|
|
|
|
dense
|
|
|
|
|
class="text-center shadow-5 glossy text-white bg-green"
|
|
|
|
|
>{{ rec.descr }}</q-chip
|
|
|
|
|
>
|
2022-08-15 15:10:00 +02:00
|
|
|
</span>
|
|
|
|
|
<span>
|
2023-04-07 17:14:51 +02:00
|
|
|
<span
|
|
|
|
|
v-for="(rec, ind) of tools.getArrSector(table, myrec)"
|
|
|
|
|
:key="ind"
|
|
|
|
|
>
|
|
|
|
|
<q-chip
|
|
|
|
|
dense
|
|
|
|
|
class="text-center shadow-5 glossy text-white bg-blue"
|
|
|
|
|
>{{ rec.descr }}</q-chip
|
|
|
|
|
></span
|
|
|
|
|
>
|
2022-08-15 15:10:00 +02:00
|
|
|
</span>
|
|
|
|
|
|
2022-02-24 19:13:06 +01:00
|
|
|
<!--<span class="dateevent" v-if="myrec.dateTimeStart">dal <span class="datainizio">{{tools.getstrVeryShortDate(myrec.dateStart) }}</span> al <span class="datafine">{{ tools.getstrVeryShortDate(myrec.dateEnd) }}</span>
|
|
|
|
|
</span>-->
|
2022-02-14 15:38:23 +01:00
|
|
|
</q-item-label>
|
2023-04-07 17:14:51 +02:00
|
|
|
<q-item-label lines="4" v-if="myrec.descr"
|
|
|
|
|
>{{ myrec.descr }}<br />
|
2022-02-14 15:38:23 +01:00
|
|
|
</q-item-label>
|
2023-04-07 17:14:51 +02:00
|
|
|
<q-item-label lines="1" style="" class="text_user_city">
|
|
|
|
|
<div class="row justify-between">
|
|
|
|
|
<div class="text-weight-bold text-italic">
|
|
|
|
|
{{ tools.getNameToShow(myrec) }}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="q-mx-sm">
|
|
|
|
|
(<span class="">{{ myrec.myfav.length }}</span>
|
|
|
|
|
<span class="q-mx-xxs"
|
|
|
|
|
><q-icon
|
|
|
|
|
dense
|
|
|
|
|
color="red"
|
|
|
|
|
:name="
|
|
|
|
|
userStore.isFavorite(myrec._id, table)
|
|
|
|
|
? 'favorite'
|
|
|
|
|
: 'far fa-heart'
|
|
|
|
|
"
|
|
|
|
|
/>
|
|
|
|
|
</span>
|
|
|
|
|
<span class="q-mx-xxs"> </span
|
|
|
|
|
><span class="">{{ myrec.mybook.length }}</span>
|
|
|
|
|
<span class="q-mx-xxs"
|
|
|
|
|
><q-icon
|
|
|
|
|
dense
|
|
|
|
|
color="teal"
|
|
|
|
|
:name="
|
|
|
|
|
userStore.isBookmarked(myrec._id, table)
|
|
|
|
|
? 'bookmark'
|
|
|
|
|
: 'far fa-bookmark'
|
|
|
|
|
"
|
|
|
|
|
/>
|
|
|
|
|
</span>
|
|
|
|
|
)
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2022-02-14 15:38:23 +01:00
|
|
|
</q-item-label>
|
2022-02-15 18:15:32 +01:00
|
|
|
|
2023-04-07 17:14:51 +02:00
|
|
|
<q-item-label
|
|
|
|
|
lines="1"
|
|
|
|
|
style="text-align: right"
|
|
|
|
|
class="text_user_city"
|
|
|
|
|
>
|
|
|
|
|
<span v-for="(rec, ind) of myrec.mycities" :key="ind"
|
|
|
|
|
><span v-if="ind > 0">, </span>{{ rec.comune }} ({{
|
|
|
|
|
rec.prov
|
|
|
|
|
}})</span
|
|
|
|
|
>
|
|
|
|
|
</q-item-label>
|
2022-02-15 18:15:32 +01:00
|
|
|
</q-item-section>
|
2022-12-07 18:16:23 +01:00
|
|
|
<q-item-section side v-if="tools.canModifyThisRec(myrec) || editOn">
|
2022-02-15 18:15:32 +01:00
|
|
|
<q-item-label>
|
2023-03-11 01:01:23 +01:00
|
|
|
<q-btn rounded dense icon="fas fa-pencil-alt">
|
2022-02-15 18:15:32 +01:00
|
|
|
<q-menu>
|
|
|
|
|
<q-list style="min-width: 150px">
|
2023-04-07 17:14:51 +02:00
|
|
|
<q-item
|
|
|
|
|
clickable
|
|
|
|
|
v-close-popup
|
|
|
|
|
@click="cmdExt(costanti.CMD_MODIFY, myrec._id)"
|
|
|
|
|
>
|
2022-02-24 19:13:06 +01:00
|
|
|
<q-item-section side>
|
2023-04-07 17:14:51 +02:00
|
|
|
<q-icon name="fas fa-pencil-alt" />
|
2022-02-24 19:13:06 +01:00
|
|
|
</q-item-section>
|
2022-02-15 18:15:32 +01:00
|
|
|
<q-item-section>{{ $t('reg.edit') }}</q-item-section>
|
|
|
|
|
</q-item>
|
|
|
|
|
</q-list>
|
|
|
|
|
<q-list style="min-width: 150px">
|
2023-04-07 17:14:51 +02:00
|
|
|
<q-item
|
|
|
|
|
clickable
|
|
|
|
|
v-close-popup
|
|
|
|
|
@click="cmdExt(costanti.CMD_DELETE, myrec._id)"
|
|
|
|
|
>
|
2022-02-24 19:13:06 +01:00
|
|
|
<q-item-section side>
|
2023-04-07 17:14:51 +02:00
|
|
|
<q-icon name="fas fa-trash-alt" />
|
2022-02-24 19:13:06 +01:00
|
|
|
</q-item-section>
|
2022-02-15 18:15:32 +01:00
|
|
|
<q-item-section>{{ $t('reg.elimina') }}</q-item-section>
|
|
|
|
|
</q-item>
|
|
|
|
|
</q-list>
|
|
|
|
|
</q-menu>
|
|
|
|
|
</q-btn>
|
|
|
|
|
</q-item-label>
|
2022-02-14 15:38:23 +01:00
|
|
|
</q-item-section>
|
|
|
|
|
</q-item>
|
2023-04-07 17:14:51 +02:00
|
|
|
<q-separator inset="item" />
|
2022-02-14 15:38:23 +01:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
2022-02-17 00:44:52 +01:00
|
|
|
<script lang="ts" src="./CMyRecCard.ts">
|
2022-02-14 15:38:23 +01:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2022-02-17 00:44:52 +01:00
|
|
|
@import './CMyRecCard.scss';
|
2022-02-14 15:38:23 +01:00
|
|
|
</style>
|