@@ -110,6 +110,57 @@ export default defineComponent({
|
||||
return false
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
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
|
||||
}
|
||||
|
||||
>>>>>>> parent of 701e1f1 (Aggiornamento a 0.6.1)
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
:alt="myrec.descr">
|
||||
</q-img>
|
||||
<q-card-actions align="right">
|
||||
<<<<<<< HEAD
|
||||
<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
|
||||
@@ -18,6 +19,109 @@
|
||||
icon="share"
|
||||
@click="tools.copyToClip($q, getlinkpage(), true)"
|
||||
/>
|
||||
=======
|
||||
<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>
|
||||
>>>>>>> parent of 701e1f1 (Aggiornamento a 0.6.1)
|
||||
</q-card-actions>
|
||||
<q-separator />
|
||||
|
||||
@@ -42,7 +146,12 @@
|
||||
}}</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<<<<<<< HEAD
|
||||
<q-item>
|
||||
=======
|
||||
|
||||
<q-item v-if="getSectorByRec(myrec)">
|
||||
>>>>>>> parent of 701e1f1 (Aggiornamento a 0.6.1)
|
||||
<q-item-section avatar>
|
||||
<q-icon color="blue" name="category" />
|
||||
</q-item-section>
|
||||
@@ -184,6 +293,38 @@
|
||||
/>
|
||||
</q-card-actions>
|
||||
</q-card>
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
<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>
|
||||
>>>>>>> parent of 701e1f1 (Aggiornamento a 0.6.1)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user