- aggiornati anche i ContribTypes che appaiono sulla card degli annunci
This commit is contained in:
@@ -1050,7 +1050,7 @@
|
||||
>
|
||||
<q-chip
|
||||
dense
|
||||
:color="calendarStore.getColByContribType(reccontr)"
|
||||
:style="`background-color: ` + calendarStore.getColByContribType(reccontr)"
|
||||
text-color="white"
|
||||
>
|
||||
{{ calendarStore.getContribtypeById(reccontr) }}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
color: $mainColor;
|
||||
margin-bottom: $s-xs;
|
||||
letter-spacing: 0.02em;
|
||||
background: linear-gradient(135deg, $mainColor, lighten($mainColor, 12%));
|
||||
background: linear-gradient(135deg, $mainColor, color.adjust($mainColor, $lightness: 12%));
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
background-clip: text;
|
||||
|
||||
@@ -438,7 +438,8 @@
|
||||
color: rgba(44, 62, 80, 0.7); // Grigio bluastro più caldo del grigio puro
|
||||
font-size: 0.85rem;
|
||||
display: flex;
|
||||
text-align: right;
|
||||
margin-left: auto;
|
||||
flex-flow: wrap;
|
||||
gap: 4px;
|
||||
|
||||
i {
|
||||
@@ -446,6 +447,18 @@
|
||||
}
|
||||
}
|
||||
|
||||
.cities-contrib-row {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
flex-wrap: wrap;
|
||||
|
||||
@media (max-width: $mobile-breakpoint) {
|
||||
gap: 6px;
|
||||
}
|
||||
}
|
||||
|
||||
// ========================================
|
||||
// ACTIONS SECTION
|
||||
// ========================================
|
||||
|
||||
@@ -230,7 +230,11 @@
|
||||
|
||||
<!-- Preferences (solo per MYHOSPS) -->
|
||||
<q-item-label
|
||||
v-if="table === shared_consts.TABLES_MYHOSPS && myrec.preferences && myrec.preferences.length > 0"
|
||||
v-if="
|
||||
table === shared_consts.TABLES_MYHOSPS &&
|
||||
myrec.preferences &&
|
||||
myrec.preferences.length > 0
|
||||
"
|
||||
class="preferences-row"
|
||||
>
|
||||
<div class="preferences-icons-container">
|
||||
@@ -311,17 +315,35 @@
|
||||
{{ t('event.attend') }}
|
||||
</q-item-label>
|
||||
|
||||
<!-- Città -->
|
||||
<q-item-label
|
||||
lines="2"
|
||||
class="cities-text"
|
||||
<!-- Città e Contrib Type -->
|
||||
<q-item-label class="cities-contrib-row">
|
||||
<div
|
||||
v-if="myrec.idContribType && myrec.idContribType.length > 0"
|
||||
class="preferences-icons-container"
|
||||
>
|
||||
<q-avatar
|
||||
v-for="(reccontr, index) in myrec.idContribType"
|
||||
:key="index"
|
||||
size="32px"
|
||||
:style="`background-color: ${calendarStore.getColByContribType(reccontr) || 'grey'}; opacity: 0.9; cursor: pointer;`"
|
||||
class="preference-icon-avatar"
|
||||
>
|
||||
<q-icon
|
||||
:name="calendarStore.getIconByContribType(reccontr) || ''"
|
||||
size="18px"
|
||||
color="white"
|
||||
/>
|
||||
<q-tooltip>{{ calendarStore.getContribtypeById(reccontr) }}</q-tooltip>
|
||||
</q-avatar>
|
||||
</div>
|
||||
<div class="cities-text">
|
||||
<span
|
||||
v-for="(rec, ind) of myrec.mycities"
|
||||
:key="ind"
|
||||
>
|
||||
<span v-if="ind > 0">, </span>{{ rec.comune }} ({{ rec.prov }})
|
||||
</span>
|
||||
</div>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
|
||||
@@ -405,7 +427,6 @@
|
||||
|
||||
<q-card-section class="dialog-content">
|
||||
<div class="categories-grid">
|
||||
|
||||
<q-chip
|
||||
v-for="(rec, ind) of myrec.preferences"
|
||||
:key="ind"
|
||||
|
||||
@@ -840,6 +840,7 @@ const msg_it = {
|
||||
shortdescr: 'Descrizione Breve',
|
||||
descrapprof: 'Descrizione Approfondita',
|
||||
longdescr: 'Testo',
|
||||
icona: 'Icona',
|
||||
note: 'Note',
|
||||
hoursplanned: 'Ore Preventivate',
|
||||
hoursadded: 'Ore Aggiuntive',
|
||||
|
||||
@@ -122,6 +122,11 @@ export const useCalendarStore = defineStore('CalendarStore', {
|
||||
const ctrec = mystate.contribtype.find((mycontr) => mycontr._id === id)
|
||||
return (ctrec && ctrec.color) ? ctrec.color : 'green'
|
||||
|
||||
},
|
||||
getIconByContribType: (mystate: ICalendarState) => (id: string) => {
|
||||
const ctrec = mystate.contribtype.find((mycontr) => mycontr._id === id)
|
||||
return (ctrec && ctrec.icon) ? ctrec.icon : ''
|
||||
|
||||
},
|
||||
getContribtypeRecByLabel: (mystate: ICalendarState) => (label: string) => {
|
||||
const ctrec = mystate.contribtype.find((mycontr) => mycontr.label === label)
|
||||
|
||||
@@ -4692,6 +4692,8 @@ export const colTableProducts = [
|
||||
const colcontribtype = [
|
||||
AddCol({ name: '_id', label_trans: 'others.value' }),
|
||||
AddCol({ name: 'label', label_trans: 'proj.longdescr' }),
|
||||
AddCol({ name: 'icon', label_trans: 'proj.icon' }),
|
||||
AddCol({ name: 'color', label_trans: 'event.color' }),
|
||||
AddCol({
|
||||
name: 'showprice',
|
||||
label_trans: 'event.showprice',
|
||||
|
||||
Reference in New Issue
Block a user