Skip to content

Commit 1f6bece

Browse files
authored
[ENG-9478] Feat/configure citation addons redirect (#798)
- Ticket: [https://openscience.atlassian.net/browse/ENG-9478] - Feature flag: n/a ## Purpose Fix configuring citation addons to redirect a user to the proper page
1 parent b3bef66 commit 1f6bece

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

src/app/features/project/project-addons/components/connect-configured-addon/connect-configured-addon.component.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,13 @@ export class ConnectConfiguredAddonComponent {
192192
complete: () => {
193193
const createdAddon = this.createdConfiguredAddon();
194194
if (createdAddon) {
195-
this.router.navigate([`${this.baseUrl()}/addons`]);
195+
const addonType = this.addonTypeString()?.toLowerCase();
196+
this.router.navigate([`${this.baseUrl()}/addons`], {
197+
queryParams: {
198+
activeTab: 1,
199+
addonType: addonType,
200+
},
201+
});
196202
this.toastService.showSuccess('settings.addons.toast.createSuccess', {
197203
addonName: AddonServiceNames[addon.externalServiceName as keyof typeof AddonServiceNames],
198204
});

src/app/features/settings/settings-addons/components/connect-addon/connect-addon.component.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,13 @@ export class ConnectAddonComponent {
122122
}
123123

124124
private showSuccessAndRedirect(createdAddon: AuthorizedAccountModel | null): void {
125-
this.router.navigate([`${this.baseUrl()}/addons`]);
125+
const addonType = this.addonTypeString()?.toLowerCase();
126+
this.router.navigate([`${this.baseUrl()}/addons`], {
127+
queryParams: {
128+
activeTab: 1,
129+
addonType: addonType,
130+
},
131+
});
126132
this.toastService.showSuccess('settings.addons.toast.createSuccess', {
127133
addonName: AddonServiceNames[createdAddon?.externalServiceName as keyof typeof AddonServiceNames],
128134
});

0 commit comments

Comments
 (0)