aggiunto "Seen"

This commit is contained in:
Surya Paolo
2023-04-13 14:27:06 +02:00
parent 35db79b479
commit 6f1f962c0a
10 changed files with 107 additions and 2 deletions

View File

@@ -1161,6 +1161,7 @@ export default defineComponent({
'profile.username_telegram': 1,
'profile.favorite': 1,
'profile.bookmark': 1,
'profile.seen': 1,
idCity: 1,
pub_to_share: 1,
numLevel: 1,
@@ -1232,6 +1233,7 @@ export default defineComponent({
'profile.username_telegram': 1,
'profile.favorite': 1,
'profile.bookmark': 1,
'profile.seen': 1,
idCity: 1,
pub_to_share: 1,
dateTimeStart: 1,
@@ -1311,6 +1313,7 @@ export default defineComponent({
'profile.username_telegram': 1,
'profile.favorite': 1,
'profile.bookmark': 1,
'profile.seen': 1,
photos: 1,
idCity: 1,
pub_to_share: 1,
@@ -1360,6 +1363,7 @@ export default defineComponent({
'profile.username_telegram': 1,
'profile.favorite': 1,
'profile.bookmark': 1,
'profile.seen': 1,
idCity: 1,
pub_to_share: 1,
numLevel: 1,

View File

@@ -89,6 +89,9 @@ export default defineComponent({
myrec.value = props.prop_myrec
}
if (myrec.value)
clicca(costanti.TIPOFAVBOOK.SEEN, true, myrec.value._id)
col.value = fieldsTable.getArrColsByTable(props.table)
}
@@ -148,6 +151,11 @@ export default defineComponent({
userStore.setBookmark($q, t, myrec.value._id, props.table, myrec.value);
}
mylist = myrec.value.mybook
} else if (tipo === costanti.TIPOFAVBOOK.SEEN) {
if (myset) {
userStore.setSeen($q, t, myrec.value._id, props.table, myrec.value);
}
mylist = myrec.value.myseen
}
if (!myset && mylist && mylist.length > 0) {

View File

@@ -10,6 +10,22 @@
</CGalleryImages>
<q-card-actions align="right">
<div class="">
<q-btn
flat
round
color="blue"
icon="far fa-eye"
>
<q-badge
v-if="myrec.myseen"
color="primary"
:label="myrec.myseen.length"
floating
transparent
/>
</q-btn>
</div>
<div class="">
<q-btn
flat
@@ -83,6 +99,24 @@
</q-item-section>
</q-item>
<q-separator />
<q-item
clickable
v-close-popup
@click="
clicca(
costanti.TIPOFAVBOOK.SEEN,
false,
$t('cmd.seen', {num: myrec.myseen ? myrec.myseen.length : 0})
)
"
>
<q-item-section avatar>
<q-icon color="blue" name="fas fa-eye" />
</q-item-section>
<q-item-section>
{{ $t('cmd.seen', {num: myrec.myseen ? myrec.myseen.length : 0}) }}
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup

View File

@@ -106,7 +106,17 @@
{{ tools.getNameToShow(myrec) }}
</div>
<div class="q-mx-sm">
(<span class="">{{ myrec.myfav.length }}</span>
(
<span class="q-mx-xxs">{{ myrec.myseen.length }}</span>
<span class="q-mx-xxs"
><q-icon
dense
color="blue"
name="far fa-eye"
/>
</span>
<span class="q-mx-xxs">&nbsp;</span>
<span class="">{{ myrec.myfav.length }}</span>
<span class="q-mx-xxs"
><q-icon
dense

View File

@@ -117,6 +117,7 @@ export default defineComponent({
'profile.username_telegram': 1,
'profile.favorite': 1,
'profile.bookmark': 1,
'profile.seen': 1,
idCity: 1,
pub_to_share: 1,
numLevel: 1,
@@ -159,6 +160,7 @@ export default defineComponent({
'profile.username_telegram': 1,
'profile.favorite': 1,
'profile.bookmark': 1,
'profile.seen': 1,
idCity: 1,
pub_to_share: 1,
numLevel: 1,
@@ -201,6 +203,7 @@ export default defineComponent({
'profile.username_telegram': 1,
'profile.favorite': 1,
'profile.bookmark': 1,
'profile.seen': 1,
idCity: 1,
pub_to_share: 1,
numLevel: 1,
@@ -267,6 +270,7 @@ export default defineComponent({
'profile.username_telegram': 1,
'profile.favorite': 1,
'profile.bookmark': 1,
'profile.seen': 1,
idCity: 1,
pub_to_share: 1,
numLevel: 1,
@@ -310,6 +314,7 @@ export default defineComponent({
'profile.username_telegram': 1,
'profile.favorite': 1,
'profile.bookmark': 1,
'profile.seen': 1,
idCity: 1,
pub_to_share: 1,
numLevel: 1,
@@ -353,6 +358,7 @@ export default defineComponent({
'profile.username_telegram': 1,
'profile.favorite': 1,
'profile.bookmark': 1,
'profile.seen': 1,
idCity: 1,
pub_to_share: 1,
numLevel: 1,