feat: Show last modified by user on document viewer

- Display updater name next to update time
- Fall back to creator if no updater is set
- Add modified_by translation for all 8 languages
This commit is contained in:
2025-11-29 12:12:17 +09:00
parent d47c3a456f
commit 5519c311ad
9 changed files with 18 additions and 6 deletions

View File

@@ -20,15 +20,19 @@ class="inline-flex items-center px-4 py-2 bg-indigo-600 text-white text-sm font-
</div>
<div class="flex items-center text-sm text-gray-500 space-x-4">
@if($document->created_by)
<span>
{{ __('messages.documents.created_by') }} {{ $document->creator->name }}
</span>
@endif
<span>
{{ __('messages.documents.updated') }} {{ $document->updated_at->diffForHumans() }}
</span>
@if($document->updated_by && $document->updater)
<span>
{{ __('messages.documents.modified_by') }} {{ $document->updater->name }}
</span>
@elseif($document->created_by && $document->creator)
<span>
{{ __('messages.documents.modified_by') }} {{ $document->creator->name }}
</span>
@endif
</div>
</div>