Commit e7a2eea2 by Ajit Thakor

added manage player with all sub component

1 parent eb652b32
......@@ -46,6 +46,7 @@ import { AppRoutes } from './app.routing';
import { AppComponent } from './app.component';
import { BreadcrumbComponent } from './core/breadcrumb/breadcrumb.component';
import { RoutePartsService } from './services/route-parts/route-parts.service';
import { ManualBalanceAdjustmentComponent } from './components/dialog/manual-balance-adjustment/manual-balance-adjustment.component';
export function createTranslateLoader(http: HttpClient) {
return new TranslateHttpLoader(http, './assets/i18n/', '.json');
......@@ -69,7 +70,7 @@ const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = {
AccordionAnchorDirective,
AccordionLinkDirective,
AccordionDirective,
BreadcrumbComponent
BreadcrumbComponent,
],
imports: [
BrowserModule,
......
<mat-toolbar color="primary">Balance Adjustment</mat-toolbar>
<div fxLayout="row wrap" fxLayoutAlign="center start">
<div fxFlex.gt-sm="55" fxFlex="100">
<mat-card class="mat-card-top">
<mat-tab-group>
<mat-tab>
<ng-template matTabLabel>Main Wallet Adjustment</ng-template>
<mat-card-content>
<form fxLayout="column">
<div fxFlex="100" fxFlex.gt-xs="50" fxFlex.gt-sm="50" class="pr-1">
<div class="pb-1">
<mat-form-field class="">
<input matInput placeholder="User Name">
</mat-form-field>
<mat-form-field class="">
<input matInput placeholder="Current Balance">
</mat-form-field>
<mat-form-field class="mb-1">
<mat-select placeholder="Adjustment Type">
<mat-option>--</mat-option>
<mat-option value="add">Add</mat-option>
<mat-option value="deduct">Deduct</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field class="">
<input matInput placeholder="Amount">
</mat-form-field>
<mat-form-field class="">
<input matInput placeholder="Remark">
</mat-form-field>
</div>
</div>
<hr>
<mat-card-actions>
<button mat-raised-button color="primary">Save</button>
<button mat-raised-button class="shadow-none">Reset</button>
</mat-card-actions>
</form>
</mat-card-content>
</mat-tab>
<mat-tab>
<ng-template matTabLabel>Provider's Wallet Adjustment</ng-template>
<mat-card-content>
<form fxLayout="column">
<div fxFlex="100" fxFlex.gt-xs="50" fxFlex.gt-sm="50" class="pr-1">
<div class="pb-1">
<mat-form-field class="">
<input matInput placeholder="User Name">
</mat-form-field>
<mat-form-field class="">
<input matInput placeholder="Current Balance">
</mat-form-field>
<mat-form-field class="mb-1">
<mat-select placeholder="From Wallet">
<mat-option>--</mat-option>
<mat-option value="ag">AG</mat-option>
<mat-option value="pt">PT</mat-option>
<mat-option value="png">PNG</mat-option>
<mat-option value="dt">DT</mat-option>
<mat-option value="gd">GD</mat-option>
<mat-option value="im">IM</mat-option>
<mat-option value="n2live">N2LIVE</mat-option>
<mat-option value="ibc">IBC</mat-option>
<mat-option value="mg">MG</mat-option>
<mat-option value="iml">IML</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field class="mb-1">
<mat-select placeholder="To Wallet">
<mat-option>--</mat-option>
<mat-option value="ag">AG</mat-option>
<mat-option value="pt">PT</mat-option>
<mat-option value="png">PNG</mat-option>
<mat-option value="dt">DT</mat-option>
<mat-option value="gd">GD</mat-option>
<mat-option value="im">IM</mat-option>
<mat-option value="n2live">N2LIVE</mat-option>
<mat-option value="ibc">IBC</mat-option>
<mat-option value="mg">MG</mat-option>
<mat-option value="iml">IML</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field class="mb-1">
<mat-select placeholder="Adjustment Type">
<mat-option>--</mat-option>
<mat-option value="add">Add</mat-option>
<mat-option value="deduct">Deduct</mat-option>
</mat-select>
</mat-form-field>
</div>
</div>
<div fxFlex="100" fxFlex.gt-xs="50" fxFlex.gt-sm="50" class="pr-1">
<div class="pb-1">
<mat-form-field class="">
<input matInput placeholder="Amount">
</mat-form-field>
<mat-form-field class="">
<input matInput placeholder="Remark">
</mat-form-field>
</div>
</div>
<hr>
<mat-card-actions>
<button mat-raised-button color="primary">Save</button>
<button mat-raised-button class="shadow-none">Reset</button>
</mat-card-actions>
</form>
</mat-card-content>
</mat-tab>
</mat-tab-group>
</mat-card>
</div>
</div>
\ No newline at end of file
import { Component, OnInit, Inject } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA, MatDialog } from '@angular/material';
@Component({
selector: 'app-balance-adjustment-dialog',
templateUrl: './balance-adjustment-dialog.component.html',
styleUrls: ['./balance-adjustment-dialog.component.scss']
})
export class BalanceAdjustmentDialogComponent implements OnInit {
actionsAlignment: string;
private _dimesionToggle = false;
constructor(public dialogRef: MatDialogRef<BalanceAdjustmentDialogComponent>,
@Inject(MAT_DIALOG_DATA) public data: any) { }
togglePosition(): void {
this._dimesionToggle = !this._dimesionToggle;
if (this._dimesionToggle) {
this.dialogRef
.updateSize('500px', '500px')
.updatePosition({ top: '25px', left: '25px' });
} else {
this.dialogRef
.updateSize()
.updatePosition();
}
}
ngOnInit() {
}
}
......@@ -9,13 +9,10 @@ import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
export class DeleteDialogComponent implements OnInit {
private _dimesionToggle = false;
constructor(
public dialogRef: MatDialogRef<DeleteDialogComponent>,
@Inject(MAT_DIALOG_DATA) public data: any) { }
constructor(public dialogRef: MatDialogRef<DeleteDialogComponent>,@Inject(MAT_DIALOG_DATA) public data: any) { }
togglePosition(): void {
this._dimesionToggle = !this._dimesionToggle;
if (this._dimesionToggle) {
this.dialogRef
.updateSize('500px', '500px')
......@@ -28,5 +25,4 @@ export class DeleteDialogComponent implements OnInit {
}
ngOnInit() {
}
}
<mat-toolbar color="primary">
User Details
</mat-toolbar>
<mat-toolbar color="primary">User Details</mat-toolbar>
<div fxLayout="row wrap" fxLayoutAlign="center start">
<div fxFlex.gt-sm="55" fxFlex="100">
<mat-card class="mat-card-top">
......@@ -18,35 +16,36 @@
<input matInput placeholder="Last name">
</mat-form-field>
<mat-form-field class="mb-1">
<input matInput placeholder="user name">
<input matInput placeholder="User Name">
</mat-form-field>
</div>
</div>
<div fxFlex="100" fxFlex.gt-xs="50" fxFlex.gt-sm="50" class="pr-1">
<div class="pb-1">
<mat-form-field class="mb-1">
<input matInput placeholder="Email address">
</mat-form-field>
<mat-form-field class="mb-1">
<input matInput placeholder="Email address">
</mat-form-field>
<input matInput placeholder="Mobile number">
</mat-form-field>
<mat-form-field class="mb-1">
<mat-select placeholder="Timezone">
<mat-option value="Hawaii">(GMT-10:00) Hawaii</mat-option>
<mat-option value="Alaska">(GMT-09:00) Alaska</mat-option>
<mat-option value="Pacific Time (US & Canada)">(GMT-08:00) Pacific Time (US & Canada)</mat-option>
<mat-option value="Arizona">(GMT-07:00) Arizona</mat-option>
<mat-option value="Mountain Time (US & Canada)">(GMT-07:00) Mountain Time (US & Canada)
</mat-option>
<mat-option value="Central Time (US & Canada)" selected="selected">(GMT-06:00) Central Time (US &
Canada)</mat-option>
<mat-option value="Eastern Time (US & Canada)">(GMT-05:00) Eastern Time (US & Canada)</mat-option>
<mat-option value="Indiana (East)">(GMT-05:00) Indiana (East)</mat-option>
<mat-select placeholder="Gender">
<mat-option>--</mat-option>
<mat-option value="male">Male</mat-option>
<mat-option value="female">Female</mat-option>
</mat-select>
</mat-form-field>
</div>
</div>
<div fxFlex="100" fxFlex.gt-xs="50" fxFlex.gt-sm="50" class="pr-1">
<div class="pb-1">
<mat-form-field class="mb-1">
<input matInput placeholder="Username">
<input matInput placeholder="Address">
</mat-form-field>
<mat-form-field class="mb-1">
<mat-select placeholder="User Level Type">
<mat-option>--</mat-option>
<mat-option value="add">NEW MEMBER</mat-option>
<mat-option value="deduct">VIP</mat-option>
<mat-option value="add">GOLD</mat-option>
<mat-option value="deduct">SILVER</mat-option>
</mat-select>
</mat-form-field>
</div>
</div>
......@@ -58,44 +57,223 @@
</form>
</mat-card-content>
</mat-tab>
<mat-tab>
<ng-template matTabLabel>Reset Password</ng-template>
<mat-card-content>
<form fxLayout="column">
<div fxFlex="100" fxFlex.gt-xs="50" fxFlex.gt-sm="50" class="pr-1">
<div class="pb-1">
<mat-form-field class="mb-1">
<input matInput placeholder="New password" type="password">
</mat-form-field>
<mat-form-field class="mb-1">
<input matInput placeholder="New password" type="password">
</mat-form-field>
<mat-form-field class="mb-1">
<input matInput placeholder="Confirm new password" type="password">
</mat-form-field>
<hr>
<mat-card-actions>
<button mat-raised-button color="primary">Update</button>
<button mat-raised-button class="shadow-none">Cancel</button>
</mat-card-actions>
<mat-form-field class="mb-1">
<input matInput placeholder="Confirm new password" type="password">
</mat-form-field>
<hr>
<mat-card-actions>
<button mat-raised-button color="primary">Update</button>
<button mat-raised-button class="shadow-none">Cancel</button>
</mat-card-actions>
</div>
</div>
</form>
</mat-card-content>
</mat-tab>
<!-- Wallet Balance -->
<mat-tab>
<ng-template matTabLabel>Balances</ng-template>
<ng-template matTabLabel>Wallet Balances</ng-template>
<div fxLayout="row" fxLayoutWrap="wrap">
<div fxFlex="100" fxFlex.gt-sm="100" fxFlex.sm="100">
<div class="mat-box-shadow">
<br>
<div fxFlex.gt-xs="50" fxFlex="100" class="text-sm-right text-xs-left">
<span fxFlex></span>
<button mat-raised-button [attr.align]="actionsAlignment" color="primary" class="mr-1"
(click)="openBalanceAdjustmentDialog()">Balance
Adjustment </button>
</div>
<ngx-datatable class="material bg-white" [columnMode]="'force'" [headerHeight]="50" [footerHeight]="50"
[rowHeight]="50" [limit]="10" [rows]="dataSource" [columns]="columns">
<ngx-datatable-column name="Wallet Name">
<ng-template let-row="row" ngx-datatable-cell-template>
{{ row?.walletName }}
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="Balance">
<ng-template let-row="row" ngx-datatable-cell-template>
{{ row?.balance }}
</ng-template>
</ngx-datatable-column>
</ngx-datatable>
</div>
</div>
</div>
</mat-tab>
<!--Payment Summary -->
<mat-tab>
<ng-template matTabLabel>Payment Summary</ng-template>
<div fxLayout="row" fxLayoutWrap="wrap">
<div fxFlex="100" fxFlex.gt-sm="100" fxFlex.sm="100">
<div class="mat-box-shadow">
<ngx-datatable class="material bg-white" [columnMode]="'force'" [headerHeight]="50" [footerHeight]="50"
[rowHeight]="50" [limit]="10" [rows]="paymentDataSource" [columns]="columns">
<ngx-datatable-column name="Deposits">
<ng-template let-row="row" ngx-datatable-cell-template>
{{ row?.deposits }}
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="Withdrawals">
<ng-template let-row="row" ngx-datatable-cell-template>
{{ row?.withdrawals }}
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="Profit / Loss">
<ng-template let-row="row" ngx-datatable-cell-template>
{{ row?.profitLoss }}
</ng-template>
</ngx-datatable-column>
</ngx-datatable>
</div>
</div>
</div>
</mat-tab>
<!--Bank A/C Summary -->
<mat-tab>
<ng-template matTabLabel>Bank A/C Summary</ng-template>
</mat-tab>
<ng-template matTabLabel>Bank A/C Summary</ng-template>
<div fxLayout="row" fxLayoutWrap="wrap">
<div fxFlex="100" fxFlex.gt-sm="100" fxFlex.sm="100">
<div class="mat-box-shadow">
<ngx-datatable class="material bg-white" [columnMode]="'force'" [headerHeight]="50" [footerHeight]="50"
[rowHeight]="50" [limit]="10" [rows]="bankDataSource" [columns]="columns">
<ngx-datatable-column name="Account Name">
<ng-template let-row="row" ngx-datatable-cell-template>
{{ row?.accountName }}
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="Bank Name">
<ng-template let-row="row" ngx-datatable-cell-template>
{{ row?.bankName }}
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="Account Number">
<ng-template let-row="row" ngx-datatable-cell-template>
{{ row?.accountNo }}
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="Status">
<ng-template let-row="row" ngx-datatable-cell-template>
{{ row?.status }}
</ng-template>
</ngx-datatable-column>
</ngx-datatable>
</div>
</div>
</div>
</mat-tab>
<!-- Note -->
<mat-tab>
<ng-template matTabLabel>Notes</ng-template>
<div fxLayout="row" fxLayoutWrap="wrap">
<div fxFlex="100" fxFlex.gt-sm="100" fxFlex.sm="100">
<div class="mat-box-shadow">
<ngx-datatable class="material bg-white" [columnMode]="'force'" [headerHeight]="50" [footerHeight]="50"
[rowHeight]="50" [limit]="10" [rows]="noteDataSource" [columns]="columns">
<ngx-datatable-column name="User ID">
<ng-template let-row="row" ngx-datatable-cell-template>
{{ row?.userId }}
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="Operator ID">
<ng-template let-row="row" ngx-datatable-cell-template>
{{ row?.operatorId }}
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="Category">
<ng-template let-row="row" ngx-datatable-cell-template>
{{ row?.category }}
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="Note">
<ng-template let-row="row" ngx-datatable-cell-template>
{{ row?.note }}
</ng-template>
</ngx-datatable-column>
</ngx-datatable>
</div>
</div>
</div>
</mat-tab>
<mat-tab>
<ng-template matTabLabel>Level</ng-template>
</mat-tab>
<!-- Document -->
<mat-tab>
<ng-template matTabLabel>Document</ng-template>
<div fxLayout="row" fxLayoutWrap="wrap">
<div fxFlex="100" fxFlex.gt-sm="100" fxFlex.sm="100">
<div class="mat-box-shadow">
<ngx-datatable class="material bg-white" [columnMode]="'force'" [headerHeight]="50" [footerHeight]="50"
[rowHeight]="50" [limit]="10" [rows]="documentDataSource" [columns]="columns">
<ngx-datatable-column name="User ID">
<ng-template let-row="row" ngx-datatable-cell-template>
{{ row?.userId }}
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="Document 1">
<ng-template let-row="row" ngx-datatable-cell-template>
<img src="{{ row?.imag01 }}" width="80px" height="80px" class="logo">
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="Document 2">
<ng-template let-row="row" ngx-datatable-cell-template>
<img src="{{ row?.imag02 }}" width="80px" height="80px" class="logo">
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="Document 3">
<ng-template let-row="row" ngx-datatable-cell-template>
<img src="{{ row?.imag03 }}" width="80px" height="80px" class="logo">
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="Document 4">
<ng-template let-row="row" ngx-datatable-cell-template>
<img src="{{ row?.imag04 }}" width="80px" height="80px" class="logo">
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="Create Time">
<ng-template let-row="row" ngx-datatable-cell-template>
{{ row?.createTime }}
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="Remote IP">
<ng-template let-row="row" ngx-datatable-cell-template>
{{ row?.remoteIp }}
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="Remark">
<ng-template let-row="row" ngx-datatable-cell-template>
{{ row?.remark }}
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="Status">
<ng-template let-row="row" ngx-datatable-cell-template>
{{ row?.status }}
</ng-template>
</ngx-datatable-column>
</ngx-datatable>
</div>
</div>
</div>
</mat-tab>
</mat-tab-group>
</mat-card>
......
import { Component, Inject, OnInit } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
import { MatDialogRef, MAT_DIALOG_DATA, MatDialog, MatDialogConfig } from '@angular/material';
import { BalanceAdjustmentDialogComponent } from '../balance-adjustment-dialog/balance-adjustment-dialog.component';
const defaultDialogConfig = new MatDialogConfig();
@Component({
selector: 'app-edit-dialog',
......@@ -9,8 +12,34 @@ import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
export class EditDialogComponent implements OnInit {
private _dimesionToggle = false;
dataSource = WALLET_DATA;
bankDataSource = BANK_DATA;
paymentDataSource = PAYMENT_DATA;
noteDataSource = NOTE_DATA;
documentDataSource = DOCUMENT_DATA;
actionsAlignment: string;
config = {
disableClose: true,
panelClass: 'custom-overlay-pane-class',
hasBackdrop: true,
backdropClass: '',
width: '',
height: '',
minWidth: '',
minHeight: '',
maxWidth: defaultDialogConfig.maxWidth,
maxHeight: '',
position: {
top: '',
bottom: '',
left: '',
right: ''
},
};
constructor(
constructor(public dialog: MatDialog,
public dialogRef: MatDialogRef<EditDialogComponent>,
@Inject(MAT_DIALOG_DATA) public data: any) { }
......@@ -30,4 +59,216 @@ export class EditDialogComponent implements OnInit {
ngOnInit() {
}
openBalanceAdjustmentDialog() {
const dialogRef = this.dialog.open(BalanceAdjustmentDialogComponent, this.config);
dialogRef.componentInstance.actionsAlignment = this.actionsAlignment;
}
}
export interface WalletElement {
walletName: string;
balance: number
}
const WALLET_DATA: WalletElement[] = [
{
walletName: 'MW',
balance: 10.00,
},
{
walletName: 'AG',
balance: 10.00,
}, {
walletName: 'PT',
balance: 10.00,
},
{
walletName: 'GD',
balance: 10.00,
}, {
walletName: 'DT',
balance: 10.00,
},
{
walletName: 'PNG',
balance: 10.00,
}
];
export interface BankSummaryElement {
accountName: string;
bankName: string;
accountNo: number,
status: number
}
const BANK_DATA: BankSummaryElement[] = [
{
accountName: 'test',
bankName: 'test',
accountNo: 1234567891,
status: 1
},
{
accountName: 'test',
bankName: 'test',
accountNo: 1234567891,
status: 1
},
{
accountName: 'test',
bankName: 'test',
accountNo: 1234567891,
status: 1
},
{
accountName: 'test',
bankName: 'test',
accountNo: 1234567891,
status: 1
},
{
accountName: 'test',
bankName: 'test',
accountNo: 1234567891,
status: 1
},
{
accountName: 'test',
bankName: 'test',
accountNo: 1234567891,
status: 1
},
{
accountName: 'test',
bankName: 'test',
accountNo: 1234567891,
status: 1
},
{
accountName: 'test',
bankName: 'test',
accountNo: 1234567891,
status: 1
}, {
accountName: 'test',
bankName: 'test',
accountNo: 1234567891,
status: 1
},
{
accountName: 'test',
bankName: 'test',
accountNo: 1234567891,
status: 1
}, {
accountName: 'test',
bankName: 'test',
accountNo: 1234567891,
status: 1
}
];
export interface PaymentSummaryElement {
deposits: number;
withdrawals: number;
profitLoss: number,
}
const PAYMENT_DATA: PaymentSummaryElement[] = [
{
deposits: 100,
withdrawals: 50,
profitLoss: 50,
}
];
export interface NoteSummaryElement {
noteId: number;
userId: number;
operatorId: number;
createTime: string
category: string;
note: string,
}
const NOTE_DATA: NoteSummaryElement[] = [
{
noteId: 1,
userId: 1,
operatorId: 1,
createTime: '13-12-1992',
category: 'category',
note: 'Add operator',
}, {
noteId: 2,
userId: 1,
operatorId: 1,
createTime: '13-12-1992',
category: 'category',
note: 'Add operator',
}, {
noteId: 3,
userId: 1,
operatorId: 1,
createTime: '13-12-1992',
category: 'category',
note: 'Add operator',
}, {
noteId: 4,
userId: 1,
operatorId: 1,
createTime: '13-12-1992',
category: 'category',
note: 'Add operator',
}, {
noteId: 5,
userId: 1,
operatorId: 1,
createTime: '13-12-1992',
category: 'category',
note: 'Add operator',
}, {
noteId: 6,
userId: 1,
operatorId: 1,
createTime: '13-12-1992',
category: 'category',
note: 'Add operator',
}, {
noteId: 7,
userId: 1,
operatorId: 1,
createTime: '13-12-1992',
category: 'category',
note: 'Add operator',
}
];
export interface DocumentElement {
documentId: number;
userId: number;
operatorId: number;
imag01: string;
imag02: string;
imag03: string;
imag04: string;
createTime: string;
remoteIp: string;
remark: string;
status: number;
}
const DOCUMENT_DATA: DocumentElement[] = [
{
documentId: 1,
userId: 1,
operatorId: 1,
imag01: '../../../../assets/images/face1.jpg',
imag02: '../../../../assets/images/face2.jpg',
imag03: '../../../../assets/images/face3.jpg',
imag04: '../../../../assets/images/face4.jpg',
createTime: '13-12-1992',
remoteIp: '0.0.0.',
remark: "Document added",
status: 1
}
];
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { MatTabsModule, MatButtonModule, MatButtonToggleModule, MatCardModule, MatDatepickerModule, MatDialogModule, MatExpansionModule, MatIconModule, MatInputModule, MatNativeDateModule, MatProgressBarModule, MatRadioModule, MatSelectModule, MatToolbarModule, MatFormFieldModule } from '@angular/material';
import { MatSlideToggleModule,MatTabsModule, MatButtonModule, MatButtonToggleModule, MatCardModule, MatDatepickerModule, MatDialogModule, MatExpansionModule, MatIconModule, MatInputModule, MatNativeDateModule, MatProgressBarModule, MatRadioModule, MatSelectModule, MatToolbarModule, MatFormFieldModule } from '@angular/material';
import { RouterModule } from '@angular/router';
import { NgxDatatableModule } from '@swimlane/ngx-datatable';
import { DeleteDialogComponent } from './delete-dialog/delete-dialog.component';
import { EditDialogComponent } from './edit-dialog/edit-dialog.component';
import { PlayersRoutes } from './players.routing';
import { ViewPlayersComponent } from './view-players/view-player.component';
import { BalanceAdjustmentDialogComponent } from './balance-adjustment-dialog/balance-adjustment-dialog.component';
@NgModule({
......@@ -38,15 +39,18 @@ import { ViewPlayersComponent } from './view-players/view-player.component';
MatTabsModule,
MatSelectModule,
MatProgressBarModule,
MatSlideToggleModule
],
declarations: [
ViewPlayersComponent,
DeleteDialogComponent,
EditDialogComponent
EditDialogComponent,
BalanceAdjustmentDialogComponent
],
entryComponents: [
DeleteDialogComponent,
EditDialogComponent
EditDialogComponent,
BalanceAdjustmentDialogComponent
],
})
......
......@@ -42,12 +42,6 @@
<div fxLayout="row" fxLayoutWrap="wrap">
<div fxFlex="100" fxFlex.gt-sm="100" fxFlex.sm="100">
<div class="pb-1">
<span fxFlex></span><button mat-raised-button color="primary" (click)="openManualDepositPopUp()">Manual Balance
Adjustment </button>
</div>
<div class="mat-box-shadow">
<ngx-datatable class="material bg-white" [columnMode]="'force'" [headerHeight]="50" [footerHeight]="50"
[rowHeight]="50" [limit]="10" [rows]="dataSource" [columns]="columns">
......@@ -114,8 +108,10 @@
<ngx-datatable-column name="Status">
<ng-template let-row="row" ngx-datatable-cell-template>
{{ row?.status }}
<!-- {{ row?.status }} -->
<mat-slide-toggle></mat-slide-toggle>
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="Action">
......
......@@ -12,13 +12,13 @@ const defaultDialogConfig = new MatDialogConfig();
styleUrls: ['./view-player.component.scss'],
})
export class ViewPlayersComponent {
displayedColumns: string[] = ['position', 'name', 'weight', 'symbol'];
dataSource = ELEMENT_DATA;
dataSource = ELEMENT_DATA;
dialogRef: MatDialogRef<any> | null;
lastAfterClosedResult: string;
lastBeforeCloseResult: string;
actionsAlignment: string;
config = {
disableClose: false,
panelClass: 'custom-overlay-pane-class',
......@@ -54,7 +54,6 @@ export class ViewPlayersComponent {
openEditDialog() {
this.dialogRef = this.dialog.open(EditDialogComponent, this.config);
this.dialogRef.beforeClose().subscribe((result: string) => {
this.lastBeforeCloseResult = result;
});
......@@ -63,9 +62,9 @@ export class ViewPlayersComponent {
this.dialogRef = null;
});
}
openDeleteDialog() {
this.dialogRef = this.dialog.open(DeleteDialogComponent, this.config);
this.dialogRef.beforeClose().subscribe((result: string) => {
this.lastBeforeCloseResult = result;
});
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!