diff --git a/src/routes/console/project-[project]/messaging/topics/store.ts b/src/routes/console/project-[project]/messaging/topics/store.ts index a0f832d2b..742f0a432 100644 --- a/src/routes/console/project-[project]/messaging/topics/store.ts +++ b/src/routes/console/project-[project]/messaging/topics/store.ts @@ -6,6 +6,9 @@ export const showCreate = writable(false); export const columns = writable([ { id: '$id', title: 'Topic ID', type: 'string', show: true, width: 140 }, { id: 'name', title: 'Name', type: 'string', show: true, width: 140 }, - { id: 'total', title: 'Subscribers', type: 'integer', show: true, width: 140 }, + { id: 'emailTotal', title: 'Email Subscribers', type: 'integer', show: false, width: 140 }, + { id: 'smsTotal', title: 'SMS Subscribers', type: 'integer', show: false, width: 140 }, + { id: 'pushTotal', title: 'Push Subscribers', type: 'integer', show: false, width: 140 }, + { id: 'total', title: 'Subscribers', type: 'integer', show: true, filter: false, width: 140 }, { id: '$createdAt', title: 'Created', type: 'datetime', show: true, width: 140 } ]); diff --git a/src/routes/console/project-[project]/messaging/topics/table.svelte b/src/routes/console/project-[project]/messaging/topics/table.svelte index 8118edbf1..8e611a83b 100644 --- a/src/routes/console/project-[project]/messaging/topics/table.svelte +++ b/src/routes/console/project-[project]/messaging/topics/table.svelte @@ -90,6 +90,10 @@ {toLocaleDateTime(topic[column.id])} {/if} + {:else if column.id === 'total'} + + {topic.emailTotal + topic.smsTotal + topic.pushTotal} + {:else} {topic[column.id]} diff --git a/src/routes/console/project-[project]/messaging/topicsModal.svelte b/src/routes/console/project-[project]/messaging/topicsModal.svelte index de5620db3..e549b4796 100644 --- a/src/routes/console/project-[project]/messaging/topicsModal.svelte +++ b/src/routes/console/project-[project]/messaging/topicsModal.svelte @@ -1,6 +1,7 @@ - +

Select existing topics you want to send this message to its subscribers. The message will be sent only to {$providerType} targets. @@ -91,27 +92,35 @@ bind:value={search} /> {#if Object.keys(topicResultsById).length > 0} - {#each Object.entries(topicResultsById) as [topicId, topic]} - onTopicSelection(event, topic)}> - - - - - {topic.name} - - - ({getTotal(topic)} subscribers) - - - - - {/each} + + + {#each Object.entries(topicResultsById) as [topicId, topic]} + + + onTopicSelection(event, topic)}> + + + + + {topic.name} + + + ({getTotal(topic)} subscribers) + + + + + + + {/each} + +
-

+

Total results: {totalResults}