- Catalogo: Aggiunta di Schede

This commit is contained in:
Surya Paolo
2024-10-31 23:23:06 +01:00
parent b6f73019fe
commit 2ea6468100
123 changed files with 3382 additions and 3595327 deletions

View File

@@ -13,6 +13,8 @@ import { shared_consts } from '@/common/shared_vuejs'
import { IMyPage } from 'model'
import { useGlobalStore } from '@store/globalStore'
import objectId from '@src/js/objectId'
export default defineComponent({
name: 'editElems',
setup() {
@@ -29,26 +31,26 @@ export default defineComponent({
tools.setCookie('s_elems', newval)
})
const filtercustom = computed(() => [{ path: pageSel.value }] )
const filtercustom = computed(() => [{ idPage: pageSel.value }])
function mounted() {
arrPages.value = []
arrPages.value.push({label: '[Vuoto]', path: ''})
arrPages.value.push({ label: '[Vuoto]', path: '' })
for (const page of globalStore.mypage) {
const rec = {
// @ts-ignore
label: page.title,
// @ts-ignore
value: page.path
value: page._id
}
arrPages.value.push(rec)
}
// filtercustom.value = [{ userId: userStore.my._id }]
// filtercustom.value = [{ userId: userStore.my._id }]
}
onMounted(mounted)

View File

@@ -1,11 +1,17 @@
<template>
<CMyPage
:title="gettitle()" keywords="" description="" imgbackground="images/calendario_eventi.jpg"
sizes="max-height: 120px">
:title="gettitle()"
keywords=""
description=""
imgbackground="images/calendario_eventi.jpg"
sizes="max-height: 120px"
>
<div class="q-ma-sm q-pa-xs">
<div v-if="!showall()" class="text-h6 bg-red text-white text-center q-pa-xs shadow-max">Lista delle tue
prenotazioni agli Eventi:
<div
v-if="!showall()"
class="text-h6 bg-red text-white text-center q-pa-xs shadow-max"
>
Lista delle tue prenotazioni agli Eventi:
</div>
<q-space></q-space>
@@ -15,109 +21,163 @@
</div>
<div>
<q-markup-table wrap-cells bordered separator="horizontal" class="listaev__table">
<q-markup-table
wrap-cells
bordered
separator="horizontal"
class="listaev__table"
>
<thead>
<th>{{ $t('cal.data') }}</th>
<th>{{ $t('cal.event') }}</th>
<th v-if="!tools.isMobile()">{{ $t('cal.teachertitle') }}</th>
<th v-if="showall()">
<span v-if="!tools.isMobile()">{{ $t('cal.selnumpeople') }}</span>
<span v-else>{{ $t('cal.selnumpeople_short') }}</span>
</th>
<th v-if="showall()">
{{ $t('cal.selnumpeopleLunch') }}
</th>
<th v-if="showall()">
{{ $t('cal.selnumpeopleDinner') }}
</th>
<th v-if="showall()">
{{ $t('cal.selnumpeopleDinnerShared') }}
</th>
<th>{{ $t('cal.peoplebooked') }}</th>
<tr>
<th>{{ $t('cal.data') }}</th>
<th>{{ $t('cal.event') }}</th>
<th v-if="!tools.isMobile()">{{ $t('cal.teachertitle') }}</th>
<th v-if="showall()">
<span v-if="!tools.isMobile()">{{ $t('cal.selnumpeople') }}</span>
<span v-else>{{ $t('cal.selnumpeople_short') }}</span>
</th>
<th v-if="showall()">
{{ $t('cal.selnumpeopleLunch') }}
</th>
<th v-if="showall()">
{{ $t('cal.selnumpeopleDinner') }}
</th>
<th v-if="showall()">
{{ $t('cal.selnumpeopleDinnerShared') }}
</th>
<th>{{ $t('cal.peoplebooked') }}</th>
</tr>
</thead>
<tbody>
<tr v-for="(event, index) in getEventList()" :key="index" class="listaev listaev__table">
<td>
<div class="text-center text-blue">{{ func_tools.getDateStr(event.dateTimeStart) }}</div>
</td>
<td>
<div class="text-center boldhigh">{{ event.title }}</div>
</td>
<td v-if="!tools.isMobile()">
<div class="text-center">{{ getTeacherByUsername(event.teacher) }}
<span v-if="isValidUsername(event.teacher2)"> - {{ getTeacherByUsername(event.teacher2) }}</span>
<span v-if="isValidUsername(event.teacher3)"> - {{ getTeacherByUsername(event.teacher3) }}</span>
<span v-if="isValidUsername(event.teacher4)"> - {{ getTeacherByUsername(event.teacher4) }}</span>
</div>
</td>
<td v-if="showall()">
<div class="text-center">{{
calendarStore.getNumParticipants(event, showall, tools.peopleWhere.participants)
}}
</div>
</td>
<td v-if="showall()">
<div class="text-center">{{
calendarStore.getNumParticipants(event, showall, tools.peopleWhere.lunch)
}}
</div>
</td>
<td v-if="showall()">
<div class="text-center">{{
calendarStore.getNumParticipants(event, showall, tools.peopleWhere.dinner)
}}
</div>
</td>
<td v-if="showall()">
<div class="text-center">{{
calendarStore.getNumParticipants(event, showall, tools.peopleWhere.dinnerShared)
}}
</div>
</td>
<tr
v-for="(event, index) in getEventList()"
:key="index"
class="listaev listaev__table"
>
<td>
<div class="text-center text-blue">
{{ func_tools.getDateStr(event.dateTimeStart) }}
</div>
</td>
<td>
<div class="text-center boldhigh">{{ event.title }}</div>
</td>
<td v-if="!tools.isMobile()">
<div class="text-center">
{{ getTeacherByUsername(event.teacher) }}
<span v-if="isValidUsername(event.teacher2)">
- {{ getTeacherByUsername(event.teacher2) }}</span
>
<span v-if="isValidUsername(event.teacher3)">
- {{ getTeacherByUsername(event.teacher3) }}</span
>
<span v-if="isValidUsername(event.teacher4)">
- {{ getTeacherByUsername(event.teacher4) }}</span
>
</div>
</td>
<td v-if="showall()">
<div class="text-center">
{{
calendarStore.getNumParticipants(
event,
showall,
tools.peopleWhere.participants
)
}}
</div>
</td>
<td v-if="showall()">
<div class="text-center">
{{
calendarStore.getNumParticipants(
event,
showall,
tools.peopleWhere.lunch
)
}}
</div>
</td>
<td v-if="showall()">
<div class="text-center">
{{
calendarStore.getNumParticipants(
event,
showall,
tools.peopleWhere.dinner
)
}}
</div>
</td>
<td v-if="showall()">
<div class="text-center">
{{
calendarStore.getNumParticipants(
event,
showall,
tools.peopleWhere.dinnerShared
)
}}
</div>
</td>
<td class="text-center">
<q-btn
v-if="calendarStore.getNumParticipants(event, showall, tools.peopleWhere.participants) > 0"
flat
dense
color="positive"
rounded
icon="fas fa-user-check"
@click="showpeople = true; eventsel = event"
>
</q-btn>
<q-btn
dense
flat
rounded
:color="!!event.note ? 'positive' : 'dark'"
icon="fas fa-pencil-alt"
@click="shownote = true; eventsel = event"
>
</q-btn>
</td>
</tr>
<td class="text-center">
<q-btn
v-if="
calendarStore.getNumParticipants(
event,
showall,
tools.peopleWhere.participants
) > 0
"
flat
dense
color="positive"
rounded
icon="fas fa-user-check"
@click="
showpeople = true;
eventsel = event;
"
>
</q-btn>
<q-btn
dense
flat
rounded
:color="!!event.note ? 'positive' : 'dark'"
icon="fas fa-pencil-alt"
@click="
shownote = true;
eventsel = event;
"
>
</q-btn>
</td>
</tr>
</tbody>
</q-markup-table>
<q-dialog v-model="shownote">
<q-card v-if="eventsel" class="dialog_card">
<q-toolbar class="bg-primary text-white">
<q-toolbar-title>
Note: {{ eventsel.title }}
</q-toolbar-title>
<q-toolbar-title> Note: {{ eventsel.title }} </q-toolbar-title>
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
</q-toolbar>
<q-card-section class="q-pa-xs inset-shadow">
<q-input
v-model="eventsel.note" style="min-height: 50px; " label="Note:"
filled dense
v-model="eventsel.note"
style="min-height: 50px"
label="Note:"
filled
dense
autogrow
type="textarea" debounce="500"
type="textarea"
debounce="500"
input-class="myinput-area"
@update:model-value="change_rec(eventsel)">
@update:model-value="change_rec(eventsel)"
>
</q-input>
</q-card-section>
</q-card>
</q-dialog>
@@ -130,40 +190,78 @@
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
</q-toolbar>
<q-card-section class="q-pa-xs inset-shadow">
<q-markup-table wrap-cells bordered separator="horizontal" class="listaev__table">
<q-markup-table
wrap-cells
bordered
separator="horizontal"
class="listaev__table"
>
<thead>
<th>Data</th>
<th>Messaggio</th>
<th>Partec</th>
<th>Azione</th>
<tr>
<th>Data</th>
<th>Messaggio</th>
<th>Partec</th>
<th>Azione</th>
</tr>
</thead>
<tbody>
<tr
v-for="(eventbook, index) in calendarStore.getEventsBookedByIdEvent(eventsel._id, showall)"
:key="index"
class="listaev listaev__table">
<td class="text-center">
<div>{{ func_tools.getDateTimeShortStr(eventbook.datebooked) }}
</div>
</td>
<td class="text-center">
<strong>{{ userStore.getNameSurnameByUserId(eventbook.userId) }}</strong> <span
v-if="eventbook.msgbooking"> {{ $t('sendmsg.write') }}: </span><br>
{{ eventbook.msgbooking }}
</td>
<td class="text-center">
<span v-if="eventbook.numpeople > 0">Partecipanti: {{ eventbook.numpeople }}<br></span>
<span v-if="eventbook.numpeopleLunch > 0">Pranzo: {{ eventbook.numpeopleLunch }}<br></span>
<span v-if="eventbook.numpeopleDinner > 0">Cena: {{ eventbook.numpeopleDinner }}<br></span>
<span v-if="eventbook.numpeopleDinnerShared > 0">Cena Condivisa: {{ eventbook.numpeopleDinnerShared }}<br></span>
</td>
<td class="text-center">
<q-btn
flat round color="red" icon="fas fa-trash-alt" size="sm"
@click="tools.CancelBookingEvent($q, eventsel, eventbook._id, false)"></q-btn>
</td>
</tr>
<tr
v-for="(
eventbook, index
) in calendarStore.getEventsBookedByIdEvent(
eventsel._id,
showall
)"
:key="index"
class="listaev listaev__table"
>
<td class="text-center">
<div>
{{ func_tools.getDateTimeShortStr(eventbook.datebooked) }}
</div>
</td>
<td class="text-center">
<strong>{{
userStore.getNameSurnameByUserId(eventbook.userId)
}}</strong>
<span v-if="eventbook.msgbooking">
{{ $t('sendmsg.write') }}: </span
><br />
{{ eventbook.msgbooking }}
</td>
<td class="text-center">
<span v-if="eventbook.numpeople > 0"
>Partecipanti: {{ eventbook.numpeople }}<br
/></span>
<span v-if="eventbook.numpeopleLunch > 0"
>Pranzo: {{ eventbook.numpeopleLunch }}<br
/></span>
<span v-if="eventbook.numpeopleDinner > 0"
>Cena: {{ eventbook.numpeopleDinner }}<br
/></span>
<span v-if="eventbook.numpeopleDinnerShared > 0"
>Cena Condivisa: {{ eventbook.numpeopleDinnerShared }}<br
/></span>
</td>
<td class="text-center">
<q-btn
flat
round
color="red"
icon="fas fa-trash-alt"
size="sm"
@click="
tools.CancelBookingEvent(
$q,
eventsel,
eventbook._id,
false
)
"
></q-btn>
</td>
</tr>
</tbody>
</q-markup-table>
</q-card-section>
@@ -176,10 +274,9 @@
<div v-else class="text-blue text-center q-pa-xs shadow">
Non hai nessuna Prenotazione passata.
</div>
</div>
<br>
<br />
</div>
</CMyPage>
</template>