Skip to content

Commit acd441c

Browse files
committed
added notifications
1 parent 2941718 commit acd441c

File tree

1 file changed

+41
-1
lines changed

1 file changed

+41
-1
lines changed

src/Exceptionless.Web/ClientApp/src/lib/features/stacks/components/StacksBulkActionsDropdownMenu.svelte

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,25 @@
6060
6161
async function markOpen() {
6262
await changeStatus.mutateAsync(StackStatus.Open);
63+
64+
if (ids.length === 1) {
65+
toast.success('Successfully marked stack as open.');
66+
} else {
67+
toast.success(`Successfully marked ${Intl.NumberFormat().format(ids.length)} stacks as open.`);
68+
}
69+
6370
table.resetRowSelection();
6471
}
6572
6673
async function markFixed(version?: string) {
6774
await updateMarkFixed.mutateAsync(version);
75+
76+
if (ids.length === 1) {
77+
toast.success('Successfully marked stack as fixed.');
78+
} else {
79+
toast.success(`Successfully marked ${Intl.NumberFormat().format(ids.length)} stacks as fixed.`);
80+
}
81+
6882
table.resetRowSelection();
6983
}
7084
@@ -87,22 +101,48 @@
87101
}
88102
89103
await updateMarkSnoozed.mutateAsync(snoozeUntilUtc);
104+
105+
if (ids.length === 1) {
106+
toast.success('Successfully marked stack as snoozed.');
107+
} else {
108+
toast.success(`Successfully marked ${Intl.NumberFormat().format(ids.length)} stacks as snoozed.`);
109+
}
90110
table.resetRowSelection();
91111
}
92112
93113
async function markIgnored() {
94114
await changeStatus.mutateAsync(StackStatus.Ignored);
115+
116+
if (ids.length === 1) {
117+
toast.success('Successfully marked stack as ignored.');
118+
} else {
119+
toast.success(`Successfully marked ${Intl.NumberFormat().format(ids.length)} stacks as ignored.`);
120+
}
121+
95122
table.resetRowSelection();
96123
}
97124
98125
async function markDiscarded() {
99126
await changeStatus.mutateAsync(StackStatus.Discarded);
127+
128+
if (ids.length === 1) {
129+
toast.success('Successfully marked stack as discarded.');
130+
} else {
131+
toast.success(`Successfully marked ${Intl.NumberFormat().format(ids.length)} stacks as discarded.`);
132+
}
133+
100134
table.resetRowSelection();
101135
}
102136
103137
async function remove() {
104138
await removeStack.mutateAsync();
105-
toast.success('Successfully queued the stack for deletion.');
139+
140+
if (ids.length === 1) {
141+
toast.success('Successfully deleted stack.');
142+
} else {
143+
toast.success(`Successfully deleted ${Intl.NumberFormat().format(ids.length)} stacks.`);
144+
}
145+
106146
table.resetRowSelection();
107147
}
108148
</script>

0 commit comments

Comments
 (0)