|
60 | 60 |
|
61 | 61 | async function markOpen() {
|
62 | 62 | 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 | +
|
63 | 70 | table.resetRowSelection();
|
64 | 71 | }
|
65 | 72 |
|
66 | 73 | async function markFixed(version?: string) {
|
67 | 74 | 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 | +
|
68 | 82 | table.resetRowSelection();
|
69 | 83 | }
|
70 | 84 |
|
|
87 | 101 | }
|
88 | 102 |
|
89 | 103 | 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 | + } |
90 | 110 | table.resetRowSelection();
|
91 | 111 | }
|
92 | 112 |
|
93 | 113 | async function markIgnored() {
|
94 | 114 | 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 | +
|
95 | 122 | table.resetRowSelection();
|
96 | 123 | }
|
97 | 124 |
|
98 | 125 | async function markDiscarded() {
|
99 | 126 | 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 | +
|
100 | 134 | table.resetRowSelection();
|
101 | 135 | }
|
102 | 136 |
|
103 | 137 | async function remove() {
|
104 | 138 | 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 | +
|
106 | 146 | table.resetRowSelection();
|
107 | 147 | }
|
108 | 148 | </script>
|
|
0 commit comments