GH-6452 Migrate installed_command.jsx to be pure and use Redux (#6903)

* Migrate installed_command.jsx to be pure and use Redux

* Add test for InstalledCommand component

* Fix failing test and typo

* Whoops. Revert back deleted filter

* Add filter test

* Remove commands related code from /stores/integration_store.jsx
Этот коммит содержится в:
94117nl
2017-08-03 08:25:07 -05:00
коммит произвёл Harrison Healey
родитель b54d134299
Коммит ea095d6206
6 изменённых файлов: 230 добавлений и 57 удалений

Просмотреть файл

@@ -91,36 +91,6 @@ class IntegrationStore extends EventEmitter {
return store.getState().entities.integrations.outgoingHooks[id];
}
hasReceivedCommands(teamId) {
const commands = store.getState().entities.integrations.commands;
let hasTeam = false;
Object.values(commands).forEach((command) => {
if (command.team_id === teamId) {
hasTeam = true;
}
});
return hasTeam;
}
getCommands(teamId) {
const commands = store.getState().entities.integrations.commands;
const teamCommands = [];
Object.values(commands).forEach((command) => {
if (command.team_id === teamId) {
teamCommands.push(command);
}
});
return teamCommands;
}
getCommand(teamId, id) {
return store.getState().entities.integrations.commands[id];
}
hasReceivedOAuthApps() {
return Object.keys(store.getState().entities.integrations.oauthApps).length > 0;
}