diff --git a/src/app/modules/admin/member/partner/components/list.component.ts b/src/app/modules/admin/member/partner/components/list.component.ts index 4bf6e8a..fdc2274 100644 --- a/src/app/modules/admin/member/partner/components/list.component.ts +++ b/src/app/modules/admin/member/partner/components/list.component.ts @@ -22,6 +22,7 @@ import { startWith, Subject, switchMap, + take, takeUntil, timer, } from 'rxjs'; @@ -32,7 +33,10 @@ import { Partner } from '../models/partner'; import { PartnerPagination } from '../models/partner-pagination'; import { PartnerService } from '../services/partner.service'; import { ActivatedRoute, Router } from '@angular/router'; -import { RegistComposeComponent } from '../compose/regist-compose.component'; +import { + RegistComposeComponent, + RegistComposeResult, +} from '../compose/regist-compose.component'; import { CashComposeComponent } from '../compose/cash-compose.component'; import { CommissionComposeComponent } from '../compose/commission-compose.component'; import { CompComposeComponent } from '../compose/comp-compose.component'; @@ -242,12 +246,15 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { __onClickRegist(event: MouseEvent, partner: MemberModel): void { const dialogRef = this._matDialog.open(RegistComposeComponent, { - data: { title: '대본 등록하기', parent: partner, sites: this.sites }, + data: { title: '대본 등록', parent: partner, sites: this.sites }, }); - dialogRef.afterClosed().subscribe((result) => { - console.log('Compose dialog was closed!'); - }); + dialogRef + .afterClosed() + .pipe(take(1)) + .subscribe((result: RegistComposeResult) => { + console.log('Compose dialog was closed: ', result); + }); } __onClickCash(event: MouseEvent): void { const dialogRef = this._matDialog.open(CashComposeComponent, { diff --git a/src/app/modules/admin/member/partner/compose/regist-compose.component.html b/src/app/modules/admin/member/partner/compose/regist-compose.component.html index bc2548e..12b7408 100644 --- a/src/app/modules/admin/member/partner/compose/regist-compose.component.html +++ b/src/app/modules/admin/member/partner/compose/regist-compose.component.html @@ -3,7 +3,7 @@