-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor personal accounts related code & add list view
- Loading branch information
1 parent
cf1100d
commit b05d9cb
Showing
9 changed files
with
78 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<svg data-slot="icon" fill="none" width="20" height="20" stroke-width="1.5" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"> | ||
<path stroke-linecap="round" stroke-linejoin="round" d="M6 6.878V6a2.25 2.25 0 0 1 2.25-2.25h7.5A2.25 2.25 0 0 1 18 6v.878m-12 0c.235-.083.487-.128.75-.128h10.5c.263 0 .515.045.75.128m-12 0A2.25 2.25 0 0 0 4.5 9v.878m13.5-3A2.25 2.25 0 0 1 19.5 9v.878m0 0a2.246 2.246 0 0 0-.75-.128H5.25c-.263 0-.515.045-.75.128m15 0A2.25 2.25 0 0 1 21 12v6a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 18v-6c0-.98.626-1.813 1.5-2.122"></path> | ||
</svg> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<x-app-layout> | ||
<div class="py-12"> | ||
<div class="w-full mx-auto sm:px-6 lg:px-8"> | ||
|
||
@include('personal_account.partials.personal-accounts-list', ['personalAccounts' => $personalAccounts]) | ||
|
||
</div> | ||
</div> | ||
</x-app-layout> |
35 changes: 35 additions & 0 deletions
35
resources/views/personal_account/partials/personal-accounts-list.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
@if(count($personalAccounts) > 0) | ||
<div class="p-4"> | ||
<h2 class="text-3xl font-bold mb-4">{{ __('Personal accounts') }}</h2> | ||
<table class="min-w-full divide-y divide-gray-200"> | ||
<thead> | ||
<tr class="bg-gray-200"> | ||
<th class="px-6 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"> | ||
{{ __('Name') }} | ||
</th> | ||
<th class="px-6 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"> | ||
{{ __('Transactions count') }} | ||
</th> | ||
<th class="px-6 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"> | ||
{{ __('Created at') }} | ||
</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
@foreach ($personalAccounts as $personalAccount) | ||
<tr class="divide-y divide-gray-200"> | ||
<td class="px-4 py-2"> | ||
{{ $personalAccount->name }} | ||
</td> | ||
<td class="px-4 py-2"> | ||
{{ $personalAccount->transactions_count }} | ||
</td> | ||
<td class="px-4 py-2">{{ $personalAccount->created_at->format('d.m.Y H:i') }}</td> | ||
</tr> | ||
@endforeach | ||
</tbody> | ||
</table> | ||
</div> | ||
@else | ||
<h2 class="font-semibold text-2xl">{{ __('No personal accounts') }}</h2> | ||
@endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters