fino a eventi e report prima del tipo di eventi
This commit is contained in:
+25
-3
@@ -127,7 +127,15 @@ class Evento extends Model
|
||||
|
||||
public function getOccorrenzeMensiliList(): array
|
||||
{
|
||||
$giorni = ['Lunedì', 'Martedì', 'Mercoledì', 'Giovedì', 'Venerdì', 'Sabato', 'Domenica'];
|
||||
$giorni = [
|
||||
0 => 'Domenica',
|
||||
1 => 'Lunedì',
|
||||
2 => 'Martedì',
|
||||
3 => 'Mercoledì',
|
||||
4 => 'Giovedì',
|
||||
5 => 'Venerdì',
|
||||
6 => 'Sabato',
|
||||
];
|
||||
$list = [];
|
||||
for ($occ = 1; $occ <= 4; $occ++) {
|
||||
foreach ($giorni as $idx => $giorno) {
|
||||
@@ -153,7 +161,15 @@ class Evento extends Model
|
||||
$occorrenza = (int) $parts[0];
|
||||
$giorno = (int) $parts[1];
|
||||
|
||||
$giorni = ['Lunedì', 'Martedì', 'Mercoledì', 'Giovedì', 'Venerdì', 'Sabato', 'Domenica'];
|
||||
$giorni = [
|
||||
0 => 'Domenica',
|
||||
1 => 'Lunedì',
|
||||
2 => 'Martedì',
|
||||
3 => 'Mercoledì',
|
||||
4 => 'Giovedì',
|
||||
5 => 'Venerdì',
|
||||
6 => 'Sabato',
|
||||
];
|
||||
|
||||
return $occorrenza . '° ' . ($giorni[$giorno] ?? '-');
|
||||
}
|
||||
@@ -199,7 +215,13 @@ class Evento extends Model
|
||||
}
|
||||
|
||||
$mesiLabels = $this->getMesiList();
|
||||
return $mesiLabels[$this->mese_annuale]['label'] ?? '-';
|
||||
$label = $mesiLabels[$this->mese_annuale]['label'] ?? '-';
|
||||
|
||||
if ($this->giorno_mese) {
|
||||
$label .= ' (giorno ' . $this->giorno_mese . ')';
|
||||
}
|
||||
|
||||
return $label;
|
||||
}
|
||||
|
||||
public function getPeriodicitaLabelAttribute(): string
|
||||
|
||||
Reference in New Issue
Block a user