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
Этот коммит содержится в:
коммит произвёл
Harrison Healey
родитель
b54d134299
Коммит
ea095d6206
@@ -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;
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user