- nella lista circuiti ora si vedono tutti gli annunci del circuito stesso
This commit is contained in:
@@ -656,6 +656,7 @@ export default defineComponent({
|
||||
|
||||
searchList.value = [
|
||||
{
|
||||
visible: true,
|
||||
label: 'Ricerca',
|
||||
table: 'products',
|
||||
key: 'titolo',
|
||||
|
||||
@@ -11,6 +11,7 @@ import { CSendCoins } from '@/components/CSendCoins'
|
||||
import { CUserNonVerif } from '@/components/CUserNonVerif'
|
||||
import { CTitleSec } from '@/components/CTitleSec'
|
||||
import { CSkill } from '@/components/CSkill'
|
||||
import { CFinder } from '@/components/CFinder'
|
||||
import { CDateTime } from '@/components/CDateTime'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { computed, defineComponent, onMounted, ref, watch } from 'vue'
|
||||
@@ -34,7 +35,7 @@ export default defineComponent({
|
||||
components: {
|
||||
CProfile, CTitleBanner, CMyFieldRec, CSkill, CTitleSec, CDateTime, CMyFriends,
|
||||
CGridTableRec, CMyUser, CCheckIfIsLogged, CCurrencyValue, CSaldo, CNotifAtTop,
|
||||
CSendCoins, CUserNonVerif,
|
||||
CSendCoins, CUserNonVerif, CFinder,
|
||||
},
|
||||
props: {},
|
||||
setup() {
|
||||
@@ -70,6 +71,8 @@ export default defineComponent({
|
||||
const showPic = ref(false)
|
||||
const loadSaldo = ref(false)
|
||||
|
||||
const card = ref(<any>{})
|
||||
|
||||
const circuit = ref({} as ICircuit | null)
|
||||
const account = ref(<IAccount | null>null)
|
||||
const mystatus = ref(0 as number)
|
||||
@@ -100,6 +103,10 @@ export default defineComponent({
|
||||
const fidoConcesso = ref(<any>0)
|
||||
const qtaMax = ref(<any>0)
|
||||
|
||||
const mycards_annunci = computed(() => {
|
||||
return costanti.MAINCARDS.filter((rec: any) => rec.table && rec.annuncio)
|
||||
})
|
||||
|
||||
watch(() => path.value, (to: any, from: any) => {
|
||||
if (circuitpath_loaded.value !== path.value)
|
||||
loadCircuit()
|
||||
@@ -348,6 +355,9 @@ export default defineComponent({
|
||||
|
||||
loadCircuit()
|
||||
|
||||
if (mycards_annunci.value)
|
||||
card.value = mycards_annunci.value[0]
|
||||
|
||||
}
|
||||
|
||||
function getImgCircuit() {
|
||||
@@ -502,6 +512,7 @@ export default defineComponent({
|
||||
loadSaldo.value = false
|
||||
}
|
||||
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
@@ -571,6 +582,8 @@ export default defineComponent({
|
||||
optionsmov,
|
||||
globalStore,
|
||||
saldo_pend,
|
||||
mycards_annunci,
|
||||
card,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
userStore.my.username,
|
||||
circuit.name,
|
||||
true,
|
||||
groupnameSel ? groupnameSel.groupname : '',
|
||||
groupnameSel ? groupnameSel.groupname : ''
|
||||
);
|
||||
"
|
||||
/>
|
||||
@@ -339,7 +339,11 @@
|
||||
v-if="userStore.IsMyCircuitByName(circuit.name)"
|
||||
:label="t('circuit.movements_made')"
|
||||
@click="showMov = !showMov"
|
||||
:icon="tools.getSymbolByCircuit(circuit) === 'RIS' ? 'img: images/1ris_rosso_100.png' : undefined"
|
||||
:icon="
|
||||
tools.getSymbolByCircuit(circuit) === 'RIS'
|
||||
? 'img: images/1ris_rosso_100.png'
|
||||
: undefined
|
||||
"
|
||||
rounded
|
||||
color="primary"
|
||||
></q-btn>
|
||||
@@ -394,7 +398,8 @@
|
||||
<br />
|
||||
</q-banner>
|
||||
<q-banner
|
||||
v-if="false &&
|
||||
v-if="
|
||||
false &&
|
||||
userStore.my.profile &&
|
||||
userStore.my.profile.calc &&
|
||||
!circuit.circuitoIndipendente &&
|
||||
@@ -420,8 +425,8 @@
|
||||
globalStore.site.confpages.showRIS &&
|
||||
!circuit.circuitoIndipendente &&
|
||||
userStore.my.profile.calc &&
|
||||
userStore.my.profile.calc.numGoodsAndServices <= 0
|
||||
&& false
|
||||
userStore.my.profile.calc.numGoodsAndServices <= 0 &&
|
||||
false
|
||||
"
|
||||
rounded
|
||||
class="bg-deep-purple text-white"
|
||||
@@ -442,8 +447,9 @@
|
||||
<br />
|
||||
</q-banner>
|
||||
|
||||
<div class="centermydiv q-mt-md">
|
||||
<div class="centermydiv">
|
||||
<q-btn
|
||||
class="q-mt-md"
|
||||
v-if="
|
||||
!userStore.IsMyCircuitByName(circuit.name) &&
|
||||
!userStore.IsAskedCircuitByName(circuit.name) &&
|
||||
@@ -511,6 +517,11 @@
|
||||
name="gruppicollettivi"
|
||||
icon="fas fa-users"
|
||||
></q-tab>
|
||||
<q-tab
|
||||
:label="t('profile.annunci')"
|
||||
name="annunci"
|
||||
icon="fas fa-pencil-alt"
|
||||
></q-tab>
|
||||
<q-tab
|
||||
:label="t('circuit.comunitario')"
|
||||
name="comunitario"
|
||||
@@ -525,6 +536,7 @@
|
||||
</q-tabs>
|
||||
|
||||
<q-tab-panels v-model="tabcircuit" animated keep-alive>
|
||||
<q-tab-panel name="annunci" style="max-width: 500px"> </q-tab-panel>
|
||||
<q-tab-panel
|
||||
name="gruppicollettivi"
|
||||
style="max-width: 500px"
|
||||
@@ -753,7 +765,10 @@
|
||||
<q-separator />
|
||||
|
||||
<q-card-section>
|
||||
<div v-if="tools.getSymbolByCircuit(circuit) === 'RIS'" class="text-h8 q-mb-sm">
|
||||
<div
|
||||
v-if="tools.getSymbolByCircuit(circuit) === 'RIS'"
|
||||
class="text-h8 q-mb-sm"
|
||||
>
|
||||
<div v-html="$t('circuit.aggiuntive')"></div>
|
||||
</div>
|
||||
<q-card-section>
|
||||
@@ -974,7 +989,9 @@
|
||||
|
||||
<q-card v-if="circuit.name">
|
||||
<q-card-section>
|
||||
<div class="text-h8">{{ t('circuit.regulation') }} {{ circuit.name }}: </div>
|
||||
<div class="text-h8">
|
||||
{{ t('circuit.regulation') }} {{ circuit.name }}:
|
||||
</div>
|
||||
</q-card-section>
|
||||
<q-separator />
|
||||
|
||||
@@ -1205,6 +1222,38 @@
|
||||
: costanti.FIND_PEOPLE
|
||||
"
|
||||
></CGridTableRec>
|
||||
|
||||
<div v-if="tabcircuit === 'annunci'">
|
||||
<q-select
|
||||
v-model="card"
|
||||
map-options
|
||||
option-label="title"
|
||||
filled
|
||||
icon="fas fa-pencil-alt"
|
||||
label="Tipo di Annuncio"
|
||||
:options="mycards_annunci"
|
||||
></q-select>
|
||||
<q-card class="q-my-md">
|
||||
<div v-if="card">
|
||||
<div class="row text-h6 text-bold">{{ card.title }}</div>
|
||||
|
||||
<div
|
||||
v-for="(cardrec, ind) of mycards_annunci"
|
||||
:key="ind"
|
||||
:name="cardrec.table"
|
||||
>
|
||||
<CFinder
|
||||
v-show="cardrec.table === card.table"
|
||||
:ind="tools.getIndMainCardsByTable(cardrec.table)"
|
||||
:table="cardrec.table"
|
||||
:filtrocircuito="circuit.name"
|
||||
:showBarSelection="false"
|
||||
:noButtAdd="true"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
|
||||
@@ -31,19 +31,21 @@ export default defineComponent({
|
||||
|
||||
searchList.value = [
|
||||
{
|
||||
visible: true,
|
||||
label: 'Filtra per',
|
||||
table: shared_consts.TABFILTRI_UTENTE,
|
||||
key: '',
|
||||
type: costanti.FieldType.multiselect,
|
||||
value: 0,
|
||||
keycookie: '_fu',
|
||||
keycookie: '_filu',
|
||||
addall: false,
|
||||
arrvalue: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + 'users' + costanti.FILTER_SEP + shared_consts.TABFILTRI_UTENTE + '_fu', []),
|
||||
arrvalue: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + 'users' + costanti.FILTER_SEP + shared_consts.TABFILTRI_UTENTE + '_filu', []),
|
||||
filter: null,
|
||||
useinput: false,
|
||||
icon: 'fas fa-filter'
|
||||
},
|
||||
{
|
||||
visible: true,
|
||||
label: 'Regione',
|
||||
table: 'regions',
|
||||
key: 'idReg',
|
||||
@@ -57,6 +59,7 @@ export default defineComponent({
|
||||
icon: 'fas fa-globe-europe'
|
||||
},
|
||||
{
|
||||
visible: true,
|
||||
label: 'Provincia',
|
||||
table: 'provinces',
|
||||
key: 'profile.resid_province',
|
||||
@@ -101,6 +104,7 @@ export default defineComponent({
|
||||
username: 1,
|
||||
name: 1,
|
||||
surname: 1,
|
||||
perm: 1,
|
||||
verified_by_aportador: 1,
|
||||
'profile.handshake': 1,
|
||||
'profile.img': 1,
|
||||
|
||||
@@ -222,6 +222,25 @@ export default defineComponent({
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
function savePerm() {
|
||||
const globalStore = useGlobalStore()
|
||||
const { t } = useI18n()
|
||||
|
||||
const mydatatosave = {
|
||||
id: userStore.userprofile._id,
|
||||
table: 'users',
|
||||
fieldsvalue: { 'perm': userStore.userprofile.perm }
|
||||
}
|
||||
|
||||
globalStore.saveFieldValue(mydatatosave).then((esito) => {
|
||||
if (esito) {
|
||||
tools.showPositiveNotif($q, t('db.recupdated'))
|
||||
} else {
|
||||
tools.showNegativeNotif($q, t('db.recfailed'))
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
return {
|
||||
@@ -270,6 +289,7 @@ export default defineComponent({
|
||||
mostranota,
|
||||
salvaUserProv,
|
||||
saveDaContattare,
|
||||
savePerm,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
"
|
||||
class="col-12 text-h8 q-mt-sm"
|
||||
>
|
||||
Note del Facilitatore:<br />
|
||||
Note:<br />
|
||||
{{ userStore.userprofile.profile.note }}
|
||||
</div>
|
||||
</div>
|
||||
@@ -224,6 +224,7 @@
|
||||
<div
|
||||
v-if="
|
||||
userStore.userprofile &&
|
||||
userStore.userprofile.profile &&
|
||||
userStore.userprofile.profile.da_contattare &&
|
||||
(userStore.isFacilitatore || userStore.isAdmin)
|
||||
"
|
||||
@@ -231,6 +232,24 @@
|
||||
>
|
||||
<q-icon name="fas fa-comment"></q-icon> Da Contattare
|
||||
</div>
|
||||
<div
|
||||
v-if="
|
||||
userStore.userprofile &&
|
||||
tools.isBitActive(
|
||||
userStore.userprofile.perm,
|
||||
shared_consts.Permissions.Facilitatore.value
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-chip
|
||||
class="glossy"
|
||||
color="orange"
|
||||
text-color="white"
|
||||
icon-right="star"
|
||||
>
|
||||
Facilitatore RISO
|
||||
</q-chip>
|
||||
</div>
|
||||
<div
|
||||
v-if="
|
||||
userStore.userprofile &&
|
||||
@@ -240,11 +259,7 @@
|
||||
class="col-12 text-h8 q-mt-sm"
|
||||
>
|
||||
<div v-if="!mostranota" class="text-center">
|
||||
<q-btn
|
||||
label="Note del Facilitatore"
|
||||
@click="mostranota = true"
|
||||
color="green"
|
||||
>
|
||||
<q-btn label="Note" @click="mostranota = true" color="green">
|
||||
<q-badge color="red" floating>1</q-badge>
|
||||
</q-btn>
|
||||
</div>
|
||||
@@ -663,7 +678,10 @@
|
||||
|
||||
<q-tab-panels v-model="tab" animated keep-alive>
|
||||
<q-tab-panel name="attivita">
|
||||
<CMyActivities :introUser="false"></CMyActivities>
|
||||
<CMyActivities
|
||||
:username_prop="userStore.userprofile.username"
|
||||
:introUser="false"
|
||||
></CMyActivities>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="info">
|
||||
<div
|
||||
@@ -824,6 +842,42 @@
|
||||
saveDaContattare();
|
||||
"
|
||||
/>
|
||||
<q-fab-action
|
||||
label-position="right"
|
||||
v-if="userStore.isFacilitatore || userStore.isAdmin"
|
||||
color="orange"
|
||||
:icon="
|
||||
tools.isBitActive(
|
||||
userStore.userprofile.perm,
|
||||
shared_consts.Permissions.Facilitatore.value
|
||||
)
|
||||
? 'fas fa-user-slash'
|
||||
: 'fas fa-star'
|
||||
"
|
||||
:label="
|
||||
tools.isBitActive(
|
||||
userStore.userprofile.perm,
|
||||
shared_consts.Permissions.Facilitatore.value
|
||||
)
|
||||
? $t('profile.togli_facilitatore')
|
||||
: $t('profile.facilitatore')
|
||||
"
|
||||
@click="
|
||||
!tools.isBitActive(
|
||||
userStore.userprofile.perm,
|
||||
shared_consts.Permissions.Facilitatore.value
|
||||
)
|
||||
? (userStore.userprofile.perm = tools.SetBit(
|
||||
userStore.userprofile.perm,
|
||||
shared_consts.Permissions.Facilitatore.value
|
||||
))
|
||||
: (userStore.userprofile.perm = tools.UnSetBit(
|
||||
userStore.userprofile.perm,
|
||||
shared_consts.Permissions.Facilitatore.value
|
||||
));
|
||||
savePerm();
|
||||
"
|
||||
/>
|
||||
</q-fab>
|
||||
</q-page-sticky>
|
||||
<q-dialog v-model="showPic" full-height full-width>
|
||||
|
||||
Reference in New Issue
Block a user