Skip to content

Commit 8586c6d

Browse files
author
dante
committed
Adding custom title for unread/all notifications
1 parent e0f3f56 commit 8586c6d

4 files changed

Lines changed: 8 additions & 7 deletions

File tree

‎ProcessMaker/Http/Controllers/Api/NotificationController.php‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class NotificationController extends Controller
2626
* summary="Returns all notifications that the user has access to",
2727
* operationId="getNotifications",
2828
* tags={"Notifications"},
29+
* @OA\Parameter(ref="#/components/parameters/status"),
2930
* @OA\Parameter(ref="#/components/parameters/filter"),
3031
* @OA\Parameter(ref="#/components/parameters/order_by"),
3132
* @OA\Parameter(ref="#/components/parameters/order_direction"),

‎ProcessMaker/Http/Controllers/NotificationController.php‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ class NotificationController extends Controller
1717
public function index(Request $request)
1818
{
1919
$status = $request->input('status');
20-
return view('notifications.index', compact('status'));
20+
$title = $status === 'unread'
21+
? __('Unread notifications inbox')
22+
: __('Notifications inbox');
23+
return view('notifications.index', compact('status', 'title'));
2124
}
2225
}

‎resources/js/notifications/components/NotificationsList.vue‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@
66
pagination-path="meta">
77

88
<template slot="subject" slot-scope="props">
9-
<i class="fas fa-ban" v-if="props.rowData.type==='PROCESS_CANCELED'"></i>
10-
<i class="fas fa-check-circle" v-if="props.rowData.type==='PROCESS_COMPLETED'"></i>
11-
<i class="fas fa-play-circle" v-if="props.rowData.type==='TASK_CREATED'"></i>
12-
<i class="fas fa-comment-alt" v-if="props.rowData.type==='MESSAGE'"></i>
13-
&nbsp;<a v-bind:href="props.rowData.url">{{props.rowData.name}}</a>
9+
<a v-bind:href="props.rowData.url">{{props.rowData.name}}</a>
1410
</template>
1511

1612
<template slot="changeStatus" slot-scope="props">
@@ -145,3 +141,4 @@
145141
padding: 6px 0px 0px 12px;
146142
}
147143
</style>
144+

‎resources/views/notifications/index.blade.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
@section('content')
1212
<div class="container page-content" id="notifications">
13-
<h1>{{__('Notifications inbox')}}</h1>
13+
<h1>{{$title}}</h1>
1414
<div class="row">
1515
<div class="col">
1616
<div class="input-group">

0 commit comments

Comments
 (0)