Skip to content

Commit

Permalink
Include number of records on notifications for some export types
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanseymour committed May 7, 2024
1 parent 7264111 commit 9e57eb4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/list/NotificationList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ interface Notification {
is_seen: boolean;
export?: {
type: string;
num_records: number;
};
import?: {
type: string;
Expand Down Expand Up @@ -90,16 +91,16 @@ export class NotificationList extends TembaList {
} else if (notification.type === 'export:finished') {
if (notification.export.type === 'contact') {
icon = Icon.contact_export;
body = 'Exported contacts';
body = `Exported ${notification.export.num_records.toLocaleString()} contacts`;

Check warning on line 94 in src/list/NotificationList.ts

View check run for this annotation

Codecov / codecov/patch

src/list/NotificationList.ts#L94

Added line #L94 was not covered by tests
} else if (notification.export.type === 'message') {
icon = Icon.message_export;
body = 'Exported messages';
body = `Exported ${notification.export.num_records.toLocaleString()} messages`;

Check warning on line 97 in src/list/NotificationList.ts

View check run for this annotation

Codecov / codecov/patch

src/list/NotificationList.ts#L97

Added line #L97 was not covered by tests
} else if (notification.export.type === 'results') {
icon = Icon.results_export;
body = 'Exported flow results';
} else if (notification.export.type === 'ticket') {
icon = Icon.tickets_export;
body = 'Exported tickets';
body = `Exported ${notification.export.num_records.toLocaleString()} tickets`;

Check warning on line 103 in src/list/NotificationList.ts

View check run for this annotation

Codecov / codecov/patch

src/list/NotificationList.ts#L103

Added line #L103 was not covered by tests
} else if (notification.export.type === 'definition') {
icon = Icon.definitions_export;
body = 'Exported definitions';
Expand Down

0 comments on commit 9e57eb4

Please sign in to comment.