Fix ModalService refactor bugs (#1168)
This commit is contained in:
parent
f08b6e7975
commit
2235664bed
|
@ -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 () => {
|
||||
|
|
|
@ -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
2
jslib
|
@ -1 +1 @@
|
|||
Subproject commit f02720a1c654adeb73d68b73bb61fcf7415041f4
|
||||
Subproject commit d50531886bb8a797e98a3aeea08a7ed54e768788
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue