Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Praful Makani
/
bo-livebillionbet-ui
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e7a2eea2
authored
May 27, 2019
by
Ajit Thakor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added manage player with all sub component
1 parent
eb652b32
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
407 additions
and
22 deletions
src/app/app.module.ts
src/app/components/players/balance-adjustment-dialog/balance-adjustment-dialog.component.html
src/app/components/players/balance-adjustment-dialog/balance-adjustment-dialog.component.scss
src/app/components/players/balance-adjustment-dialog/balance-adjustment-dialog.component.ts
src/app/components/players/delete-dialog/delete-dialog.component.ts
src/app/components/players/edit-dialog/edit-dialog.component.html
src/app/components/players/edit-dialog/edit-dialog.component.ts
src/app/components/players/players.module.ts
src/app/components/players/view-players/view-player.component.html
src/app/components/players/view-players/view-player.component.ts
src/app/app.module.ts
View file @
e7a2eea
...
...
@@ -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
,
...
...
src/app/components/players/balance-adjustment-dialog/balance-adjustment-dialog.component.html
0 → 100644
View file @
e7a2eea
<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
src/app/components/players/balance-adjustment-dialog/balance-adjustment-dialog.component.scss
0 → 100644
View file @
e7a2eea
File mode changed
src/app/components/players/balance-adjustment-dialog/balance-adjustment-dialog.component.ts
0 → 100644
View file @
e7a2eea
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
()
{
}
}
src/app/components/players/delete-dialog/delete-dialog.component.ts
View file @
e7a2eea
...
...
@@ -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
()
{
}
}
src/app/components/players/edit-dialog/edit-dialog.component.html
View file @
e7a2eea
This diff is collapsed.
Click to expand it.
src/app/components/players/edit-dialog/edit-dialog.component.ts
View file @
e7a2eea
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
}
];
src/app/components/players/players.module.ts
View file @
e7a2eea
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
{
Mat
SlideToggleModule
,
Mat
TabsModule
,
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
],
})
...
...
src/app/components/players/view-players/view-player.component.html
View file @
e7a2eea
...
...
@@ -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"
>
...
...
src/app/components/players/view-players/view-player.component.ts
View file @
e7a2eea
...
...
@@ -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
;
});
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment