This commit is contained in:
Park Byung Eun 2022-08-31 03:30:15 +00:00
parent 5838b6d7c5
commit bd7a3fc739
2 changed files with 16 additions and 10 deletions

View File

@ -144,7 +144,7 @@
<div class="flex flex-auto overflow-hidden"> <div class="flex flex-auto overflow-hidden">
<!-- Products list --> <!-- Products list -->
<div <div
class="flex flex-col flex-auto sm:mb-18 overflow-hidden sm:overflow-y-auto" class="flex flex-col flex-auto sm:mb-18 overflow-hidden sm:overflow-y-auto overflow-x-auto"
> >
<ng-container *ngIf="casinos$ | async as casinos"> <ng-container *ngIf="casinos$ | async as casinos">
<ng-container *ngIf="casinos.length > 0; else noCasino"> <ng-container *ngIf="casinos.length > 0; else noCasino">

View File

@ -98,6 +98,8 @@ export class ViewComponent implements OnInit, AfterViewInit, OnDestroy {
isLoading = false; isLoading = false;
searchInputControl = new FormControl(); searchInputControl = new FormControl();
preMatSelectMeberState!: { value: number; label: string };
memberStateOptions = [ memberStateOptions = [
{ {
value: 1, value: 1,
@ -742,6 +744,11 @@ export class ViewComponent implements OnInit, AfterViewInit, OnDestroy {
} }
onSelectionChangeState(event: MatSelectChange) { onSelectionChangeState(event: MatSelectChange) {
this.showConfirmAlert(
this.alertTitle,
'회원 상태를 수정하시겠습니까?'
).then((result) => {
if (!!result) {
const state = event.value; const state = event.value;
if (!state) { if (!state) {
@ -751,11 +758,6 @@ export class ViewComponent implements OnInit, AfterViewInit, OnDestroy {
return; return;
} }
this.showConfirmAlert(
this.alertTitle,
'회원 상태를 수정하시겠습니까?'
).then((result) => {
if (!!result) {
const req = new UpdateMemberForStateRequest(); const req = new UpdateMemberForStateRequest();
req.setId(this.currentMember!.getId()); req.setId(this.currentMember!.getId());
req.setState(state); req.setState(state);
@ -769,6 +771,10 @@ export class ViewComponent implements OnInit, AfterViewInit, OnDestroy {
this.showAlert('error', '회원 상태 변경이 실패하였습니다.'); this.showAlert('error', '회원 상태 변경이 실패하였습니다.');
}) })
.finally(() => this.closeChangePasswordAlert()); .finally(() => this.closeChangePasswordAlert());
} else {
this.memberDefaultForm
.get('state')
?.setValue(this.currentMember?.getState());
} }
}); });
} }