Import notification file and updated other file..

This commit is contained in:
Cüneyt Şentürk
2021-06-19 22:30:14 +03:00
parent 4687185f4a
commit 5c5b890942
12 changed files with 182 additions and 27 deletions

View File

@@ -7,6 +7,7 @@ return [
'notifications' => [
'counter' => '{0} You have no notification|{1} You have :count notification|[2,*] You have :count notifications',
'new_apps' => '{1} :count published app|[2,*] :count published apps',
'overdue_invoices' => '{1} :count overdue invoice|[2,*] :count overdue invoices',
'upcoming_bills' => '{1} :count upcoming bill|[2,*] :count upcoming bills',
'view_all' => 'View All',

View File

@@ -10,6 +10,7 @@ return [
'read_all' => 'Read All',
'mark_read' => 'Mark Read',
'mark_read_all' => 'Mark Read All',
'new_apps' => 'New App|New Apps',
'upcoming_bills' => 'Upcoming Bills',
'recurring_invoices' => 'Recurring Invoices',
'recurring_bills' => 'Recurring Bills',
@@ -61,6 +62,8 @@ return [
'messages' => [
'mark_read' => ':type is read this notification!',
'mark_read_all' => ':type is read all notification!',
'export' => ':type export is ready! The export file is ready to download from the following <a href=":url" target="_blank">:file_name</a>'
'new_app' => ':type app published.',
'export' => ':type export is ready! The export file is ready to download from the following <a href=":url" target="_blank">:file_name</a>',
'import' => ':type import finished! Added :count :type rows.'
],
];

View File

@@ -1,9 +1,9 @@
@if ($notifications->total())
<div class="card" id="export">
<div class="card" id="import">
<div class="card-header">
<div class="row align-items-center">
<div class="col-8">
<h5 class="h3 mb-0">{{ trans('general.export') }}</h5>
<h5 class="h3 mb-0">{{ trans('import.import') }}</h5>
</div>
<div class="col-4 text-right">
@@ -20,16 +20,15 @@
</div>
<div class="table-responsive">
<table class="table table-flush table-hover" id="tbl-export">
<table class="table table-flush table-hover" id="tbl-import">
<tbody>
@foreach ($notifications as $notification)
<tr class="row align-items-center border-top-1">
<td class="col-xs-8 col-sm-10 col-md-10 col-lg-11 col-xl-11 text-left">
@if (empty($notification->message))
{!! trans('notifications.messages.export', [
{!! trans('notifications.messages.import', [
'type' => $notification->translation,
'file_name' => $notification->file_name,
'url' => $notification->download_url
'count' => $notification->total_rows
]) !!}
@else
{!! $notification->message !!}

View File

@@ -1,7 +1,27 @@
<div class="card">
<div class="card-header"></div>
<div class="card-body">
@if ($notifications)
<div class="accordion" id="new-apps">
<div class="card">
<div class="card-header" id="heading-new-apps" data-toggle="collapse" data-target="#collapse-new-apps" aria-expanded="true" aria-controls="collapse-new-apps">
<div class="align-items-center">
<h4 class="mb-0">{{ trans_choice('notifications.new_apps', 2) }}</h4>
</div>
</div>
<div id="collapse-new-apps" class="collapse show" aria-labelledby="heading-new-apps" data-parent="#new-apps">
<div class="table-responsive">
<table class="table table-flush table-hover" id="tbl-export">
<tbody>
@foreach ($notifications as $notification)
<tr class="row align-items-center border-top-1">
<td class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12 text-left">
{!! $notification->message !!}
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
@endif

View File

@@ -127,6 +127,25 @@
@endif
<div class="list-group list-group-flush">
@stack('notification_new_apps_start')
@if (!empty($new_apps) && count($new_apps))
<a href="{{ route('notifications.index') . '#new-apps' }}" class="list-group-item list-group-item-action">
<div class="row align-items-center">
<div class="col-auto">
<i class="fa fa-rocket"></i>
</div>
<div class="col ml--2">
<div class="d-flex justify-content-between align-items-center">
<h4 class="mb-0 text-sm">{{ trans_choice('header.notifications.new_apps', count($new_apps), ['count' => count($new_apps)]) }}</h4>
</div>
</div>
</div>
</a>
@endif
@stack('notification_new_apps_end')
@stack('notification_exports_completed_start')
@if (!empty($exports['completed']) && count($exports['completed']))