|
|
@@ -72,6 +72,28 @@ class Calendar extends Component
|
|
|
$data['color'] = "#808080";
|
|
|
$this->records[] = $data;
|
|
|
}
|
|
|
+
|
|
|
+ for ($anno = 2025; $anno <= 2040; $anno++) {
|
|
|
+
|
|
|
+ $color = "grey";
|
|
|
+ $this->records[] = array('id' => 0, 'title' => 'Capodanno', 'start' => "$anno-01-01 00:00:00", 'end' => "$anno-01-01 23:59:59", 'color' => $color);
|
|
|
+ $this->records[] = array('id' => 0, 'title' => 'Epifania', 'start' => "$anno-01-06 00:00:00", 'end' => "$anno-01-06 23:59:59", 'color' => $color);
|
|
|
+ $this->records[] = array('id' => 0, 'title' => 'Festa della Liberazione', 'start' => "$anno-04-25 00:00:00", 'end' => "$anno-04-25 23:59:59", 'color' => $color);
|
|
|
+ $this->records[] = array('id' => 0, 'title' => 'Festa del Lavoro', 'start' => "$anno-05-01 00:00:00", 'end' => "$anno-05-01 23:59:59", 'color' => $color);
|
|
|
+ $this->records[] = array('id' => 0, 'title' => 'Festa della Repubblica', 'start' => "$anno-06-02 00:00:00", 'end' => "$anno-06-02 23:59:59", 'color' => $color);
|
|
|
+ $this->records[] = array('id' => 0, 'title' => 'Ferragosto', 'start' => "$anno-08-15 00:00:00", 'end' => "$anno-08-15 23:59:59", 'color' => $color);
|
|
|
+ $this->records[] = array('id' => 0, 'title' => 'Ognissanti', 'start' => "$anno-11-01 00:00:00", 'end' => "$anno-11-01 23:59:59", 'color' => $color);
|
|
|
+ $this->records[] = array('id' => 0, 'title' => 'Immacolata Concezione', 'start' => "$anno-12-08 00:00:00", 'end' => "$anno-12-08 23:59:59", 'color' => $color);
|
|
|
+ $this->records[] = array('id' => 0, 'title' => 'Natale', 'start' => "$anno-12-25 00:00:00", 'end' => "$anno-12-25 23:59:59", 'color' => $color);
|
|
|
+ $this->records[] = array('id' => 0, 'title' => 'Santo Stefano', 'start' => "$anno-12-26 00:00:00", 'end' => "$anno-12-26 23:59:59", 'color' => $color);
|
|
|
+
|
|
|
+ $pasqua = date("Y-m-d", easter_date($anno));
|
|
|
+ $this->records[] = array('id' => 0, 'title' => 'Pasqua', 'start' => "$pasqua 00:00:00", 'end' => "$pasqua 23:59:59", 'color' => $color);
|
|
|
+ $pasquetta = date("Y-m-d", strtotime("$pasqua +1 day"));
|
|
|
+ $this->records[] = array('id' => 0, 'title' => 'Pasquetta', 'start' => "$pasquetta 00:00:00", 'end' => "$pasquetta 23:59:59", 'color' => $color);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
if ($reload)
|
|
|
$this->emit('reload-calendar', ["'" . json_encode($this->records) . "'"]);
|
|
|
return view('livewire.calendar');
|