diff options
author | Stefan Malzner <stefan@adlk.io> | 2017-10-22 22:43:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-22 22:43:04 +0200 |
commit | 633482ac4001a39e34717f847a60471bd686d8ad (patch) | |
tree | 712f676f4e65b71f9fd2af78726e3e2f0794b944 | |
parent | Merge pull request #44 from phmigotto/develop (diff) | |
parent | fix(Onboarding): Fix service import (diff) | |
download | ferdium-app-633482ac4001a39e34717f847a60471bd686d8ad.tar.gz ferdium-app-633482ac4001a39e34717f847a60471bd686d8ad.tar.zst ferdium-app-633482ac4001a39e34717f847a60471bd686d8ad.zip |
Merge pull request #65 from meetfranz/feature/service-import
Fix service import
-rw-r--r-- | src/components/auth/Import.js | 1 | ||||
-rw-r--r-- | src/stores/UserStore.js | 9 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/components/auth/Import.js b/src/components/auth/Import.js index cf83aa9c8..06493a0fd 100644 --- a/src/components/auth/Import.js +++ b/src/components/auth/Import.js | |||
@@ -99,7 +99,6 @@ export default class Import extends Component { | |||
99 | <tr | 99 | <tr |
100 | key={service.id} | 100 | key={service.id} |
101 | className="service-table__row" | 101 | className="service-table__row" |
102 | onClick={() => service.$('add').set(!service.$('add').value)} | ||
103 | > | 102 | > |
104 | <td className="service-table__toggle"> | 103 | <td className="service-table__toggle"> |
105 | <Toggle | 104 | <Toggle |
diff --git a/src/stores/UserStore.js b/src/stores/UserStore.js index 4927d615f..1cb2ecac3 100644 --- a/src/stores/UserStore.js +++ b/src/stores/UserStore.js | |||
@@ -192,6 +192,15 @@ export default class UserStore extends Store { | |||
192 | @action async _importLegacyServices({ services }) { | 192 | @action async _importLegacyServices({ services }) { |
193 | this.isImportLegacyServicesExecuting = true; | 193 | this.isImportLegacyServicesExecuting = true; |
194 | 194 | ||
195 | // Reduces recipe duplicates | ||
196 | const recipes = services.filter((obj, pos, arr) => arr.map(mapObj => mapObj.recipe.id).indexOf(obj.recipe.id) === pos).map(s => s.recipe.id); | ||
197 | |||
198 | // Install recipes | ||
199 | for (const recipe of recipes) { | ||
200 | // eslint-disable-next-line | ||
201 | await this.stores.recipes._install({ recipeId: recipe }); | ||
202 | } | ||
203 | |||
195 | for (const service of services) { | 204 | for (const service of services) { |
196 | this.actions.service.createFromLegacyService({ | 205 | this.actions.service.createFromLegacyService({ |
197 | data: service, | 206 | data: service, |