현재접속자 - 쪽지보내기
This commit is contained in:
parent
f0510ed120
commit
12e95bc1f9
|
@ -132,6 +132,7 @@
|
||||||
mat-flat-button
|
mat-flat-button
|
||||||
class="bet-mat-small-8"
|
class="bet-mat-small-8"
|
||||||
[color]="'primary'"
|
[color]="'primary'"
|
||||||
|
(click)="__onClickMessage($event)"
|
||||||
>
|
>
|
||||||
<mat-icon svgIcon="email-outline"> </mat-icon>
|
<mat-icon svgIcon="email-outline"> </mat-icon>
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -33,6 +33,8 @@ import { CurrentUser } from '../models/current-user';
|
||||||
import { CurrentUserPagination } from '../models/current-user-pagination';
|
import { CurrentUserPagination } from '../models/current-user-pagination';
|
||||||
import { CurrentUserService } from '../services/current-user.service';
|
import { CurrentUserService } from '../services/current-user.service';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
|
import { MatDialog } from '@angular/material/dialog';
|
||||||
|
import { MessageComposeComponent } from '../compose/message-compose.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'current-user-list',
|
selector: 'current-user-list',
|
||||||
|
@ -102,7 +104,8 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||||
private _fuseConfirmationService: FuseConfirmationService,
|
private _fuseConfirmationService: FuseConfirmationService,
|
||||||
private _formBuilder: FormBuilder,
|
private _formBuilder: FormBuilder,
|
||||||
private _currentUserService: CurrentUserService,
|
private _currentUserService: CurrentUserService,
|
||||||
private router: Router
|
private router: Router,
|
||||||
|
private _matDialog: MatDialog
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------------------------
|
||||||
|
@ -230,4 +233,13 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||||
__trackByFn(index: number, item: any): any {
|
__trackByFn(index: number, item: any): any {
|
||||||
return item.id || index;
|
return item.id || index;
|
||||||
}
|
}
|
||||||
|
__onClickMessage(event: MouseEvent): void {
|
||||||
|
const dialogRef = this._matDialog.open(MessageComposeComponent, {
|
||||||
|
data: { price: '', memo: '' },
|
||||||
|
});
|
||||||
|
|
||||||
|
dialogRef.afterClosed().subscribe((result) => {
|
||||||
|
console.log('Compose dialog was closed!');
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
import { MessageComposeComponent } from './message-compose.component';
|
||||||
|
|
||||||
|
export const COMPOSE = [MessageComposeComponent];
|
|
@ -0,0 +1,89 @@
|
||||||
|
<div class="flex flex-col max-w-240 md:min-w-160 max-h-screen -m-6">
|
||||||
|
<!-- Header -->
|
||||||
|
<div
|
||||||
|
class="flex flex-0 items-center justify-between h-16 pr-3 sm:pr-5 pl-6 sm:pl-8 bg-primary text-on-primary"
|
||||||
|
>
|
||||||
|
<div class="text-lg font-medium">쪽지보내기</div>
|
||||||
|
<button mat-icon-button (click)="saveAndClose()" [tabIndex]="-1">
|
||||||
|
<mat-icon
|
||||||
|
class="text-current"
|
||||||
|
[svgIcon]="'heroicons_outline:x'"
|
||||||
|
></mat-icon>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Compose form -->
|
||||||
|
<form
|
||||||
|
class="flex flex-col flex-auto p-6 sm:p-8 overflow-y-auto"
|
||||||
|
[formGroup]="composeForm"
|
||||||
|
>
|
||||||
|
<div class="flex">
|
||||||
|
<mat-form-field class="w-1/3 pr-2">
|
||||||
|
<mat-label>제목</mat-label>
|
||||||
|
<input matInput [required]="true" />
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
<div class="mt-8">
|
||||||
|
<mat-form-field
|
||||||
|
class="fuse-mat-dense fuse-mat-no-subscript fuse-mat-rounded fuse-mat-bold w-full"
|
||||||
|
>
|
||||||
|
<mat-label>글쓴이</mat-label>
|
||||||
|
<input matInput [required]="true" [formControlName]="'writer'" />
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
<div class="mt-8">
|
||||||
|
<mat-form-field
|
||||||
|
class="fuse-mat-dense fuse-mat-no-subscript fuse-mat-rounded fuse-mat-bold w-full"
|
||||||
|
>
|
||||||
|
<mat-label>받는이</mat-label>
|
||||||
|
<input matInput [required]="true" [formControlName]="'writer'" />
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
<mat-form-field
|
||||||
|
class="mt-8 fuse-mat-dense fuse-mat-no-subscript fuse-mat-rounded fuse-mat-bold w-full"
|
||||||
|
>
|
||||||
|
<textarea
|
||||||
|
matInput
|
||||||
|
[required]="true"
|
||||||
|
[rows]="5"
|
||||||
|
matTextareaAutosize
|
||||||
|
[formControlName]="'content'"
|
||||||
|
></textarea>
|
||||||
|
<mat-label>내용</mat-label>
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field
|
||||||
|
class="mt-8 fuse-mat-dense fuse-mat-no-subscript fuse-mat-rounded fuse-mat-bold w-full"
|
||||||
|
>
|
||||||
|
<textarea
|
||||||
|
matInput
|
||||||
|
[rows]="5"
|
||||||
|
matTextareaAutosize
|
||||||
|
[formControlName]="'content'"
|
||||||
|
></textarea>
|
||||||
|
<mat-label>선택</mat-label>
|
||||||
|
--선택--5008\n**입금계좌문의시(가상계좌1)****출금비밀번호문의시**----탈퇴,졸업관련----**졸업안내----입금관련문의---->>타인명의입금시----환전관련문의----**환전지연안내(환전량
|
||||||
|
증가)**은행점검(뱅킹장애)등으로 충환전지연안내서버점검안내서버점검완료안내
|
||||||
|
</mat-form-field>
|
||||||
|
|
||||||
|
<!-- Actions -->
|
||||||
|
<div
|
||||||
|
class="flex flex-col sm:flex-row sm:items-center justify-between mt-4 sm:mt-6"
|
||||||
|
>
|
||||||
|
<div class="flex items-center mt-4 sm:mt-0">
|
||||||
|
<!-- Send -->
|
||||||
|
<button
|
||||||
|
class="order-first sm:order-last"
|
||||||
|
mat-flat-button
|
||||||
|
[color]="'primary'"
|
||||||
|
(click)="send()"
|
||||||
|
>
|
||||||
|
쪽지보내기
|
||||||
|
</button>
|
||||||
|
<!-- Save as draft -->
|
||||||
|
<button class="sm:mx-3" mat-stroked-button (click)="saveAsDraft()">
|
||||||
|
<span>닫기</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
|
@ -0,0 +1,94 @@
|
||||||
|
import {
|
||||||
|
ChangeDetectorRef,
|
||||||
|
Component,
|
||||||
|
Inject,
|
||||||
|
OnInit,
|
||||||
|
ViewEncapsulation,
|
||||||
|
} from '@angular/core';
|
||||||
|
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||||
|
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||||
|
import { SiteService } from 'app/modules/polyglot/site/services/site.service';
|
||||||
|
import { IdentityService } from 'app/modules/polyglot/identity/services/identity.service';
|
||||||
|
import { Site } from 'app/modules/proto/models/site_pb';
|
||||||
|
|
||||||
|
export interface MessageComposeData {
|
||||||
|
price: string;
|
||||||
|
memo: string;
|
||||||
|
}
|
||||||
|
export interface MessageComposeResult {
|
||||||
|
price: string;
|
||||||
|
memo: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-message-compose',
|
||||||
|
templateUrl: './message-compose.component.html',
|
||||||
|
encapsulation: ViewEncapsulation.None,
|
||||||
|
})
|
||||||
|
export class MessageComposeComponent implements OnInit {
|
||||||
|
composeForm!: FormGroup;
|
||||||
|
sites: any[] = [];
|
||||||
|
// quillModules: any = {
|
||||||
|
// toolbar: [
|
||||||
|
// ['bold', 'italic', 'underline'],
|
||||||
|
// [{ align: [] }, { list: 'ordered' }, { list: 'bullet' }],
|
||||||
|
// ['clean'],
|
||||||
|
// ],
|
||||||
|
// };
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*/
|
||||||
|
constructor(
|
||||||
|
public matDialogRef: MatDialogRef<MessageComposeComponent>,
|
||||||
|
@Inject(MAT_DIALOG_DATA) public data: MessageComposeData,
|
||||||
|
private _formBuilder: FormBuilder,
|
||||||
|
private _identityService: IdentityService,
|
||||||
|
private _changeDetectorRef: ChangeDetectorRef
|
||||||
|
) {}
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------------------------------------
|
||||||
|
// @ Lifecycle hooks
|
||||||
|
// -----------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* On init
|
||||||
|
*/
|
||||||
|
ngOnInit(): void {
|
||||||
|
// Create the form
|
||||||
|
this.composeForm = this._formBuilder.group({
|
||||||
|
price: ['', [Validators.required]],
|
||||||
|
memo: ['', [Validators.required]],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------------------------------------
|
||||||
|
// @ Public methods
|
||||||
|
// -----------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Save and close
|
||||||
|
*/
|
||||||
|
saveAndClose(): void {
|
||||||
|
// Save the message as a draft
|
||||||
|
this.saveAsDraft();
|
||||||
|
|
||||||
|
// Close the dialog
|
||||||
|
this.matDialogRef.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Discard the message
|
||||||
|
*/
|
||||||
|
discard(): void {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Save the message as a draft
|
||||||
|
*/
|
||||||
|
saveAsDraft(): void {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send the message
|
||||||
|
*/
|
||||||
|
send(): void {}
|
||||||
|
}
|
|
@ -18,16 +18,18 @@ import { MatGridListModule } from '@angular/material/grid-list';
|
||||||
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
||||||
import { MatRadioModule } from '@angular/material/radio';
|
import { MatRadioModule } from '@angular/material/radio';
|
||||||
import { MatCardModule } from '@angular/material/card';
|
import { MatCardModule } from '@angular/material/card';
|
||||||
|
import { MatDialogModule } from '@angular/material/dialog';
|
||||||
|
|
||||||
import { TranslocoModule } from '@ngneat/transloco';
|
import { TranslocoModule } from '@ngneat/transloco';
|
||||||
|
|
||||||
import { SharedModule } from 'app/shared/shared.module';
|
import { SharedModule } from 'app/shared/shared.module';
|
||||||
|
|
||||||
|
import { COMPOSE } from './compose';
|
||||||
import { COMPONENTS } from './components';
|
import { COMPONENTS } from './components';
|
||||||
|
|
||||||
import { currentUserRoutes } from './current-user.routing';
|
import { currentUserRoutes } from './current-user.routing';
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [COMPONENTS],
|
declarations: [COMPONENTS, COMPOSE],
|
||||||
imports: [
|
imports: [
|
||||||
TranslocoModule,
|
TranslocoModule,
|
||||||
SharedModule,
|
SharedModule,
|
||||||
|
@ -50,6 +52,7 @@ import { currentUserRoutes } from './current-user.routing';
|
||||||
MatSlideToggleModule,
|
MatSlideToggleModule,
|
||||||
MatRadioModule,
|
MatRadioModule,
|
||||||
MatCardModule,
|
MatCardModule,
|
||||||
|
MatDialogModule,
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
export class CurrentUserModule {}
|
export class CurrentUserModule {}
|
||||||
|
|
|
@ -236,7 +236,7 @@
|
||||||
<button mat-menu-item (click)="__onClickMessage($event)">
|
<button mat-menu-item (click)="__onClickMessage($event)">
|
||||||
쪽지보내기
|
쪽지보내기
|
||||||
</button>
|
</button>
|
||||||
<button mat-menu-item (click)="__onClickSignout($event)">
|
<button mat-menu-item (click)="viewSlot(user.id!)">
|
||||||
배팅리스트
|
배팅리스트
|
||||||
</button>
|
</button>
|
||||||
<button mat-menu-item (click)="__onClickSignout($event)">
|
<button mat-menu-item (click)="__onClickSignout($event)">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user