Skip to content

Commit

Permalink
šŸ”Š absage wird geloggt
Browse files Browse the repository at this point in the history
  • Loading branch information
P1tt187 committed Jun 24, 2023
1 parent 02dc727 commit eccbf08
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 9 deletions.
4 changes: 4 additions & 0 deletions app/Logging.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,10 @@ public static function eventSubtitleChanged($event)
self::attributeChanged($event, "evnt_subtitle", "revisions.eventSubtitleChanged");
}

public static function eventeventCancelledChanged($event){
self::attributeChanged($event, "cancelled", "revisions.cancelledChanged");
}


public static function shiftStatisticalWeightChanged($shift)
{
Expand Down
15 changes: 9 additions & 6 deletions app/Observers/ClubEventObserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ClubEventObserver
/**
* Listen to the ClubEvent saving event.
* Could also put this into the 'updating' method.
* This way, manually created events will also receive the
* This way, manually created events will also receive the
* 'was_manually_edited' flag, which seems consistent.
*
* @param \Lara\ClubEvent $event
Expand All @@ -31,7 +31,7 @@ public function saving(ClubEvent $event)
}
}

public function created(ClubEvent $event)
public function created(ClubEvent $event)
{
$user = Auth::user();

Expand All @@ -44,7 +44,7 @@ public function created(ClubEvent $event)
CacheUtility::forgetMonthTable($event);
}

public function updating(ClubEvent $event)
public function updating(ClubEvent $event)
{
if ($event->isDirty('evnt_time_start')) {
Logging::eventStartChanged($event);
Expand All @@ -69,14 +69,17 @@ public function updating(ClubEvent $event)
if ($event->isDirty('evnt_private_details')) {
Logging::logEventRevision($event, "revisions.eventPrivateDetailsChanged");
}
if($event->isDirty('canceled')){
Logging::eventeventCancelledChanged($event);
}
CacheUtility::forgetMonthTable($event);
}


public function updated(ClubEvent $event)
public function updated(ClubEvent $event)
{
$user = Auth::user();

if ($user) {
Log::info('Event edited: ' . $user->name . ' (' . $user->person->prsn_ldap_id . ', '
. ') edited event "' . $event->evnt_title . '" (eventID: ' . $event->id . ') on ' . $event->evnt_date_start . '.');
Expand All @@ -86,7 +89,7 @@ public function updated(ClubEvent $event)
CacheUtility::forgetMonthTable($event);
}

public function deleted(ClubEvent $event)
public function deleted(ClubEvent $event)
{
$user = Auth::user();
if ($user) {
Expand Down
3 changes: 2 additions & 1 deletion resources/lang/de/revisions.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@
'shiftWeightChanged' => 'Gewichtung geƤndert',
'shiftOptionalChanged' => 'Optional geƤndert',
'shiftStartChanged' => 'Startzeit geƤndert',
'shiftEndChanged' => 'Endzeit geƤndert'
'shiftEndChanged' => 'Endzeit geƤndert',
'cancelledChanged' => 'Abgesagt'
];
3 changes: 2 additions & 1 deletion resources/lang/en/revisions.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@
'shiftWeightChanged' => 'Statistical weight changed',
'shiftOptionalChanged' => 'Optional changed',
'shiftStartChanged' => 'Start changed',
'shiftEndChanged' => 'End changed'
'shiftEndChanged' => 'End changed',
'cancelledChanged' => 'Cancelled changed'
];
3 changes: 2 additions & 1 deletion resources/lang/pirate/revisions.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@
'shiftWeightChanged' => 'Gewichtung geƤndert',
'shiftOptionalChanged' => 'Optional geƤndert',
'shiftStartChanged' => 'Startzeit geƤndert',
'shiftEndChanged' => 'Endzeit geƤndert'
'shiftEndChanged' => 'Endzeit geƤndert',
'cancelledChanged' => 'Keelhauled geƤndert'
];

0 comments on commit eccbf08

Please sign in to comment.