Skip to content

Commit eccbf08

Browse files
committed
🔊 absage wird geloggt
1 parent 02dc727 commit eccbf08

File tree

5 files changed

+19
-9
lines changed

5 files changed

+19
-9
lines changed

app/Logging.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,10 @@ public static function eventSubtitleChanged($event)
217217
self::attributeChanged($event, "evnt_subtitle", "revisions.eventSubtitleChanged");
218218
}
219219

220+
public static function eventeventCancelledChanged($event){
221+
self::attributeChanged($event, "cancelled", "revisions.cancelledChanged");
222+
}
223+
220224

221225
public static function shiftStatisticalWeightChanged($shift)
222226
{

app/Observers/ClubEventObserver.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class ClubEventObserver
1414
/**
1515
* Listen to the ClubEvent saving event.
1616
* Could also put this into the 'updating' method.
17-
* This way, manually created events will also receive the
17+
* This way, manually created events will also receive the
1818
* 'was_manually_edited' flag, which seems consistent.
1919
*
2020
* @param \Lara\ClubEvent $event
@@ -31,7 +31,7 @@ public function saving(ClubEvent $event)
3131
}
3232
}
3333

34-
public function created(ClubEvent $event)
34+
public function created(ClubEvent $event)
3535
{
3636
$user = Auth::user();
3737

@@ -44,7 +44,7 @@ public function created(ClubEvent $event)
4444
CacheUtility::forgetMonthTable($event);
4545
}
4646

47-
public function updating(ClubEvent $event)
47+
public function updating(ClubEvent $event)
4848
{
4949
if ($event->isDirty('evnt_time_start')) {
5050
Logging::eventStartChanged($event);
@@ -69,14 +69,17 @@ public function updating(ClubEvent $event)
6969
if ($event->isDirty('evnt_private_details')) {
7070
Logging::logEventRevision($event, "revisions.eventPrivateDetailsChanged");
7171
}
72+
if($event->isDirty('canceled')){
73+
Logging::eventeventCancelledChanged($event);
74+
}
7275
CacheUtility::forgetMonthTable($event);
7376
}
7477

7578

76-
public function updated(ClubEvent $event)
79+
public function updated(ClubEvent $event)
7780
{
7881
$user = Auth::user();
79-
82+
8083
if ($user) {
8184
Log::info('Event edited: ' . $user->name . ' (' . $user->person->prsn_ldap_id . ', '
8285
. ') edited event "' . $event->evnt_title . '" (eventID: ' . $event->id . ') on ' . $event->evnt_date_start . '.');
@@ -86,7 +89,7 @@ public function updated(ClubEvent $event)
8689
CacheUtility::forgetMonthTable($event);
8790
}
8891

89-
public function deleted(ClubEvent $event)
92+
public function deleted(ClubEvent $event)
9093
{
9194
$user = Auth::user();
9295
if ($user) {

resources/lang/de/revisions.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@
2727
'shiftWeightChanged' => 'Gewichtung geändert',
2828
'shiftOptionalChanged' => 'Optional geändert',
2929
'shiftStartChanged' => 'Startzeit geändert',
30-
'shiftEndChanged' => 'Endzeit geändert'
30+
'shiftEndChanged' => 'Endzeit geändert',
31+
'cancelledChanged' => 'Abgesagt'
3132
];

resources/lang/en/revisions.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@
2727
'shiftWeightChanged' => 'Statistical weight changed',
2828
'shiftOptionalChanged' => 'Optional changed',
2929
'shiftStartChanged' => 'Start changed',
30-
'shiftEndChanged' => 'End changed'
30+
'shiftEndChanged' => 'End changed',
31+
'cancelledChanged' => 'Cancelled changed'
3132
];

resources/lang/pirate/revisions.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@
2727
'shiftWeightChanged' => 'Gewichtung geändert',
2828
'shiftOptionalChanged' => 'Optional geändert',
2929
'shiftStartChanged' => 'Startzeit geändert',
30-
'shiftEndChanged' => 'Endzeit geändert'
30+
'shiftEndChanged' => 'Endzeit geändert',
31+
'cancelledChanged' => 'Keelhauled geändert'
3132
];

0 commit comments

Comments
 (0)