1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-10 21:33:27 +00:00

Fix ModalService refactor bugs (#1168)

This commit is contained in:
Oscar Hinton
2021-08-31 16:42:43 +02:00
committed by GitHub
parent f08b6e7975
commit 2235664bed
4 changed files with 11 additions and 4 deletions

View File

@@ -124,7 +124,7 @@ export class ClientsComponent implements OnInit {
}
async addExistingOrganization() {
const [modal, childComponent] = await this.modalService.openViewRef(AddOrganizationComponent, this.addModalRef, comp => {
const [modal] = await this.modalService.openViewRef(AddOrganizationComponent, this.addModalRef, comp => {
comp.providerId = this.providerId;
comp.organizations = this.addableOrganizations;
comp.onAddedOrganization.subscribe(async () => {

View File

@@ -1,7 +1,10 @@
import { CommonModule } from '@angular/common';
import { ComponentFactoryResolver } from '@angular/core';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { ModalService } from 'jslib-angular/services/modal.service';
import { ProviderGuardService } from './services/provider-guard.service';
import { ProviderTypeGuardService } from './services/provider-type-guard.service';
import { ProviderService } from './services/provider.service';
@@ -59,4 +62,8 @@ import { OssModule } from 'src/app/oss.module';
ProviderTypeGuardService,
],
})
export class ProvidersModule {}
export class ProvidersModule {
constructor(modalService: ModalService, componentFactoryResolver: ComponentFactoryResolver) {
modalService.registerComponentFactoryResolver(AddOrganizationComponent, componentFactoryResolver);
}
}

2
jslib

Submodule jslib updated: f02720a1c6...d50531886b

View File

@@ -72,7 +72,7 @@ export class SendComponent extends BaseSendComponent {
async editSend(send: SendView) {
const [modal, childComponent] = await this.modalService.openViewRef(AddEditComponent, this.sendAddEditModalRef, comp => {
childComponent.sendId = send == null ? null : send.id;
comp.sendId = send == null ? null : send.id;
comp.onSavedSend.subscribe(async (s: SendView) => {
modal.close();
await this.load();