[PM-14002] Fix username generator from vault item (#11714)
* Fix "Forwarded email alias" not showing in drop-down * Fixed username and forwarder options not showing Options were being translated twice --------- Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
This commit is contained in:
parent
ab98bef28f
commit
10a662cc35
|
@ -108,7 +108,7 @@ export class UsernameGeneratorComponent implements OnInit, OnDestroy {
|
||||||
map((algorithms) => {
|
map((algorithms) => {
|
||||||
const usernames = algorithms.filter((a) => !isForwarderIntegration(a.id));
|
const usernames = algorithms.filter((a) => !isForwarderIntegration(a.id));
|
||||||
const usernameOptions = this.toOptions(usernames);
|
const usernameOptions = this.toOptions(usernames);
|
||||||
usernameOptions.push({ value: FORWARDER, label: this.i18nService.t("forwarder") });
|
usernameOptions.push({ value: FORWARDER, label: this.i18nService.t("forwardedEmail") });
|
||||||
|
|
||||||
const forwarders = algorithms.filter((a) => isForwarderIntegration(a.id));
|
const forwarders = algorithms.filter((a) => isForwarderIntegration(a.id));
|
||||||
const forwarderOptions = this.toOptions(forwarders);
|
const forwarderOptions = this.toOptions(forwarders);
|
||||||
|
@ -413,7 +413,7 @@ export class UsernameGeneratorComponent implements OnInit, OnDestroy {
|
||||||
private toOptions(algorithms: AlgorithmInfo[]) {
|
private toOptions(algorithms: AlgorithmInfo[]) {
|
||||||
const options: Option<string>[] = algorithms.map((algorithm) => ({
|
const options: Option<string>[] = algorithms.map((algorithm) => ({
|
||||||
value: JSON.stringify(algorithm.id),
|
value: JSON.stringify(algorithm.id),
|
||||||
label: this.i18nService.t(algorithm.name),
|
label: algorithm.name,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
return options;
|
return options;
|
||||||
|
|
Loading…
Reference in New Issue