Skip to content

Commit

Permalink
Merge branch 'main' of github.com:pxlrbt/filament-activity-log
Browse files Browse the repository at this point in the history
  • Loading branch information
pxlrbt committed Dec 7, 2023
2 parents 0c54d5c + 0095a33 commit b4675bc
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 3 deletions.
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ namespace App\Filament\Resources\UserResource\Pages;

use pxlrbt\FilamentActivityLog\Pages\ListActivities;

class ListUserActivites extends ListActivities
class ListUserActivities extends ListActivities
{
protected static string $resource = UserResource::class;
}
Expand All @@ -69,7 +69,7 @@ public static function getPages(): array
return [
'index' => Pages\ListUsers::route('/'),
'create' => Pages\CreateUser::route('/create'),
'activities' => Pages\ListUserActivites::route('/{record}/activities'),
'activities' => Pages\ListUserActivities::route('/{record}/activities'),
'edit' => Pages\EditUser::route('/{record}/edit'),
];
}
Expand Down
25 changes: 25 additions & 0 deletions resources/lang/id/activities.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

return [
'breadcrumb' => 'Riwayat',

'title' => 'Riwayat :record',

'default_datetime_format' => 'd/m/Y H:i:s',

'table' => [
'field' => 'Bagian',
'old' => 'Sebelum',
'new' => 'Sesudah',
'restore' => 'Pulihkan',
],

'events' => [
'updated' => 'Terbarui',
'created' => 'Terbuat',
'deleted' => 'Terhapus',
'restored' => 'Terpulihkan',
'restore_successful' => 'Sukses memulihkan',
'restore_failed' => 'Gagal memulihkan',
],
];
25 changes: 25 additions & 0 deletions resources/lang/tr/activities.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

return [
'breadcrumb' => 'Geçmiş',

'title' => ':record Geçmişi',

'default_datetime_format' => 'd.m.Y, H:i:s',

'table' => [
'field' => 'Alan',
'old' => 'Eski Değer',
'new' => 'Yeni Değer',
'restore' => 'Geri Yükle',
],

'events' => [
'updated' => 'Güncellendi',
'created' => 'Oluşturuldu',
'deleted' => 'Silindi',
'restored' => 'Geri Yüklendi',
'restore_successful' => 'Başarıyla Geri Yüklendi',
'restore_failed' => 'Geri Yükleme Başarısız',
],
];
3 changes: 3 additions & 0 deletions resources/views/pages/list-activities.blade.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
@php
use \Illuminate\Support\Js;
@endphp
<x-filament-panels::page>
<div class="space-y-6">
@foreach($this->getActivities() as $activityItem)
Expand Down
2 changes: 1 addition & 1 deletion src/Pages/ListActivities.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function getTitle(): string
public function getActivities()
{
return $this->paginateTableQuery(
$this->record->activities()->latest()->getQuery()
$this->record->activities()->with('causer')->latest()->getQuery()
);
}

Expand Down

0 comments on commit b4675bc

Please sign in to comment.