Add org name to moved to org success toast (#412)

This commit is contained in:
Matt Gibson 2021-06-18 07:17:42 -05:00 committed by GitHub
parent 1f83c3c1ba
commit f568c87289
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -77,12 +77,14 @@ export class ShareComponent implements OnInit {
const cipherDomain = await this.cipherService.get(this.cipherId);
const cipherView = await cipherDomain.decrypt();
const orgName = this.organizations.find(o => o.id === this.organizationId)?.name ?? this.i18nService.t('organization');
try {
this.formPromise = this.cipherService.shareWithServer(cipherView, this.organizationId,
selectedCollectionIds).then(async () => {
this.onSharedCipher.emit();
this.platformUtilsService.showToast('success', null, this.i18nService.t('sharedItem'));
this.platformUtilsService.showToast('success', null,
this.i18nService.t('movedItemToOrg', cipherView.name, orgName));
});
await this.formPromise;
return true;