diff --git a/src/app/modules/admin/member/unconnected/components/list.component.html b/src/app/modules/admin/member/unconnected/components/list.component.html
index a808524..f61fb9f 100644
--- a/src/app/modules/admin/member/unconnected/components/list.component.html
+++ b/src/app/modules/admin/member/unconnected/components/list.component.html
@@ -252,6 +252,7 @@
mat-flat-button
class="bet-mat-small-8"
[color]="'primary'"
+ (click)="__onClickMessage($event)"
>
diff --git a/src/app/modules/admin/member/unconnected/components/list.component.ts b/src/app/modules/admin/member/unconnected/components/list.component.ts
index 5a4d6ba..a0e9730 100644
--- a/src/app/modules/admin/member/unconnected/components/list.component.ts
+++ b/src/app/modules/admin/member/unconnected/components/list.component.ts
@@ -33,6 +33,8 @@ import { Unconnected } from '../models/unconnected';
import { UnconnectedPagination } from '../models/unconnected-pagination';
import { UnconnectedService } from '../services/unconnected.service';
import { Router } from '@angular/router';
+import { MatDialog } from '@angular/material/dialog';
+import { MessageComposeComponent } from '../compose/message-compose.component';
@Component({
selector: 'unconnected-list',
@@ -87,7 +89,8 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
private _fuseConfirmationService: FuseConfirmationService,
private _formBuilder: FormBuilder,
private _unconnectedService: UnconnectedService,
- private router: Router
+ private router: Router,
+ private _matDialog: MatDialog
) {}
// -----------------------------------------------------------------------------------------------------
@@ -206,4 +209,13 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy {
__trackByFn(index: number, item: any): any {
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!');
+ });
+ }
}
diff --git a/src/app/modules/admin/member/unconnected/compose/index.ts b/src/app/modules/admin/member/unconnected/compose/index.ts
new file mode 100644
index 0000000..409003d
--- /dev/null
+++ b/src/app/modules/admin/member/unconnected/compose/index.ts
@@ -0,0 +1,3 @@
+import { MessageComposeComponent } from './message-compose.component';
+
+export const COMPOSE = [MessageComposeComponent];
diff --git a/src/app/modules/admin/member/unconnected/compose/message-compose.component.html b/src/app/modules/admin/member/unconnected/compose/message-compose.component.html
new file mode 100644
index 0000000..1d55301
--- /dev/null
+++ b/src/app/modules/admin/member/unconnected/compose/message-compose.component.html
@@ -0,0 +1,89 @@
+
diff --git a/src/app/modules/admin/member/unconnected/compose/message-compose.component.ts b/src/app/modules/admin/member/unconnected/compose/message-compose.component.ts
new file mode 100644
index 0000000..6a4639e
--- /dev/null
+++ b/src/app/modules/admin/member/unconnected/compose/message-compose.component.ts
@@ -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,
+ @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 {}
+}
diff --git a/src/app/modules/admin/member/unconnected/unconnected.module.ts b/src/app/modules/admin/member/unconnected/unconnected.module.ts
index c5d187a..dd74106 100644
--- a/src/app/modules/admin/member/unconnected/unconnected.module.ts
+++ b/src/app/modules/admin/member/unconnected/unconnected.module.ts
@@ -19,11 +19,12 @@ import { TranslocoModule } from '@ngneat/transloco';
import { SharedModule } from 'app/shared/shared.module';
import { COMPONENTS } from './components';
+import { COMPOSE } from './compose';
import { unconnectedRoutes } from './unconnected.routing';
@NgModule({
- declarations: [COMPONENTS],
+ declarations: [COMPONENTS, COMPOSE],
imports: [
TranslocoModule,
SharedModule,