Fixed: le reactions devono stare in una tabella a parte (reactions).

- cambiata la gestione dei seen, fav, book, attend
This commit is contained in:
Surya Paolo
2023-09-27 18:39:05 +02:00
parent f88b753f26
commit 2b359d5260
18 changed files with 4166 additions and 131 deletions

View File

@@ -2,6 +2,7 @@
<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>
idRec: {{ idRec }}
<CGalleryImages
v-if="myrec.photos.length > 0"
:imgGallery="myrec.photos"
@@ -40,9 +41,8 @@
<div class="">
<q-btn flat round color="blue" icon="far fa-eye">
<q-badge
v-if="myrec.myseen"
color="primary"
:label="myrec.myseen.length"
:label="myrec.myreact.numseen ? myrec.myreact.numseen : 0"
floating
transparent
/>
@@ -61,9 +61,8 @@
@click="clicca(costanti.TIPOFAVBOOK.FAVORITE, true, '')"
>
<q-badge
v-if="myrec.myfav"
color="primary"
:label="myrec.myfav.length"
:label="myrec.myreact.numfav ? myrec.myreact.numfav : 0"
floating
transparent
/>
@@ -82,9 +81,8 @@
@click="clicca(costanti.TIPOFAVBOOK.BOOKMARK, true, '')"
>
<q-badge
v-if="myrec.mybook"
color="primary"
:label="myrec.mybook.length"
:label="myrec.myreact.numbook ? myrec.myreact.numbook : 0"
floating
transparent
/>
@@ -104,7 +102,7 @@
<q-menu>
<q-list v-if="true" style="min-width: 200px">
<q-item
v-if="myrec.profile.username_telegram"
v-if="myrec.profile && myrec.profile.username_telegram"
clickable
v-close-popup
>
@@ -113,6 +111,7 @@
</q-item-section>
<q-item-section>
<a
v-if="myrec.profile && myrec.profile.username_telegram"
:href="
tools.getHttpForTelegram(
myrec.profile.username_telegram
@@ -146,7 +145,9 @@
costanti.TIPOFAVBOOK.SEEN,
false,
$t('cmd.seen', {
num: myrec.myseen ? myrec.myseen.length : 0,
num: myrec.myreact.numseen
? myrec.myreact.numseen
: 0,
})
)
"
@@ -157,7 +158,9 @@
<q-item-section>
{{
$t('cmd.seen', {
num: myrec.myseen ? myrec.myseen.length : 0,
num: myrec.myreact.numseen
? myrec.myreact.numseen
: 0,
})
}}
</q-item-section>
@@ -170,7 +173,7 @@
costanti.TIPOFAVBOOK.FAVORITE,
false,
$t('cmd.favorite', {
num: myrec.myfav ? myrec.myfav.length : 0,
num: myrec.myreact.numfav ? myrec.myreact.numfav : 0,
})
)
"
@@ -181,12 +184,13 @@
<q-item-section>
{{
$t('cmd.favorite', {
num: myrec.myfav ? myrec.myfav.length : 0,
num: myrec.myreact.numfav ? myrec.myreact.numfav : 0,
})
}}
</q-item-section>
</q-item>
<q-item
v-if="table === shared_consts.TABLES_MYBACHECAS"
clickable
v-close-popup
@click="
@@ -226,7 +230,9 @@
costanti.TIPOFAVBOOK.BOOKMARK,
false,
$t('cmd.bookmark', {
num: myrec.mybook ? myrec.mybook.length : 0,
num: myrec.myreact.numbook
? myrec.myreact.numbook
: 0,
})
)
"
@@ -237,7 +243,9 @@
<q-item-section>
{{
$t('cmd.bookmark', {
num: myrec.mybook ? myrec.mybook.length : 0,
num: myrec.myreact.numbook
? myrec.myreact.numbook
: 0,
})
}}
</q-item-section>
@@ -695,7 +703,10 @@
class="row absolute-bottom text-shadow custom-caption q-px-md buttons_bottom"
>
<q-btn
v-if="myrec.profile.username_telegram || myrec.contact_telegram"
v-if="
(myrec.profile && myrec.profile.username_telegram) ||
myrec.contact_telegram
"
:label="$t('dialog.contact')"
color="primary"
icon="far fa-comment"
@@ -751,7 +762,7 @@
/>
</div>
</div>
<q-dialog v-model="usersList.show">
<q-dialog v-model="usersList.loadfromDb">
<q-card class="dialog_card">
<q-toolbar class="bg-primary text-white">
<q-toolbar-title>
@@ -761,13 +772,43 @@
</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"
<div v-if="usersList.loadfromDb">
<CGridTableUser
prop_mytable="reactions"
prop_mytitle=""
:prop_mycolumns="colmyUserPeople"
prop_colkey="_id"
col_title="username"
:vertical="costanti.VISUTABLE_LISTA"
nodataLabel=" "
:prop_search="false"
:prop_showfilter="false"
hint=""
:finder="false"
:choose_visutype="false"
:finder_noNull="false"
:finder_noNullFilters="false"
:options="shared_consts.OPTIONS_SEARCH_USER_ALL_WORDS"
:butt_modif_new="false"
noresultLabel="Username o nome non trovato"
:arrfilters="arrfilterand"
:filtercustom="filtercustom"
:prop_searchList="searchList"
:showType="costanti.SHOW_USERINFO"
:showCol="false"
:extraparams="extraparams()"
>
</CMyUser>
</CGridTableUser>
</div>
<div v-else>
<div v-for="(rec, i) in usersList.list" :key="i">
<CMyUser
:mycontact="rec"
:visu="costanti.FIND_PEOPLE"
@setCmd="tools.setCmd"
>
</CMyUser>
</div>
</div>
</q-card-section>
</q-card>
@@ -903,7 +944,8 @@
<div class="q-pa-xs">
<q-card class="windowcol" style="display: block">
<q-card-section class="q-pa-xs">
<div>{{ $t('cal.infoprenota') }}</div><br>
<div>{{ $t('cal.infoprenota') }}</div>
<br />
<div style="display: inline-flex" class="q-px-xs centermydiv">
<q-checkbox
style="color: black"