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,20 +744,20 @@ export class ViewComponent implements OnInit, AfterViewInit, OnDestroy {
} }
onSelectionChangeState(event: MatSelectChange) { onSelectionChangeState(event: MatSelectChange) {
const state = event.value;
if (!state) {
this.showAlert('error', '상태값이 선택 되지 않았습니다.');
this.closeChangePasswordAlert();
return;
}
this.showConfirmAlert( this.showConfirmAlert(
this.alertTitle, this.alertTitle,
'회원 상태를 수정하시겠습니까?' '회원 상태를 수정하시겠습니까?'
).then((result) => { ).then((result) => {
if (!!result) { if (!!result) {
const state = event.value;
if (!state) {
this.showAlert('error', '상태값이 선택 되지 않았습니다.');
this.closeChangePasswordAlert();
return;
}
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());
} }
}); });
} }