|
@@ -1,5 +1,5 @@
|
|
|
import isArray from 'lodash/isArray';
|
|
|
-import {createStore, StoreDefinition} from 'reflux';
|
|
|
+import {createStore} from 'reflux';
|
|
|
|
|
|
import {Indicator} from 'sentry/actionCreators/indicator';
|
|
|
import {t} from 'sentry/locale';
|
|
@@ -14,6 +14,8 @@ import {
|
|
|
} from 'sentry/types';
|
|
|
import {makeSafeRefluxStore} from 'sentry/utils/makeSafeRefluxStore';
|
|
|
|
|
|
+import {CommonStoreDefinition} from './types';
|
|
|
+
|
|
|
function showAlert(msg: string, type: Indicator['type']) {
|
|
|
IndicatorStore.addMessage(msg, type, {duration: 4000});
|
|
|
}
|
|
@@ -40,7 +42,7 @@ interface InternalDefinition {
|
|
|
updateActivity: (groupId: string, id: string, data: Partial<Activity>) => void;
|
|
|
}
|
|
|
|
|
|
-interface GroupStoreDefinition extends StoreDefinition, InternalDefinition {
|
|
|
+interface GroupStoreDefinition extends CommonStoreDefinition<Item[]>, InternalDefinition {
|
|
|
add: (items: Item[]) => void;
|
|
|
addStatus: (id: string, status: string) => void;
|
|
|
clearStatus: (id: string, status: string) => void;
|
|
@@ -274,6 +276,10 @@ const storeConfig: GroupStoreDefinition = {
|
|
|
);
|
|
|
},
|
|
|
|
|
|
+ getState() {
|
|
|
+ return this.getAllItems();
|
|
|
+ },
|
|
|
+
|
|
|
onAssignTo(_changeId, itemId, _data) {
|
|
|
this.addStatus(itemId, 'assignTo');
|
|
|
this.trigger(new Set([itemId]));
|