2020-11-25 08:57:17 +01:00
|
|
|
<!-- Begin page -->
|
|
|
|
<div class="wrapper">
|
|
|
|
<app-sidebar></app-sidebar>
|
|
|
|
|
|
|
|
<!-- ============================================================== -->
|
|
|
|
<!-- Start Page Content here -->
|
|
|
|
<!-- ============================================================== -->
|
|
|
|
|
|
|
|
<div id="content">
|
|
|
|
<app-topbar></app-topbar>
|
|
|
|
<!-- Start Content-->
|
2021-03-06 07:28:29 +01:00
|
|
|
<div class="container-fluid" appMenuSelection>
|
2020-12-05 07:30:30 +01:00
|
|
|
<nav aria-label="breadcrumb">
|
|
|
|
<ol class="breadcrumb">
|
|
|
|
<li class="breadcrumb-item"><a routerLink="/home">Home</a></li>
|
|
|
|
<li class="breadcrumb-item"><a routerLink="/accounts">Accounts</a></li>
|
2021-06-15 18:37:33 +02:00
|
|
|
<li *ngIf="account" class="breadcrumb-item active" aria-current="page">
|
|
|
|
{{ account?.vcard?.fn[0].value }}
|
|
|
|
</li>
|
2020-12-05 07:30:30 +01:00
|
|
|
</ol>
|
|
|
|
</nav>
|
|
|
|
<div *ngIf="!account" class="text-center">
|
2021-06-15 18:37:33 +02:00
|
|
|
<div class="spinner-grow text-primary m-1" role="status" style="width: 3rem; height: 3rem">
|
2020-12-05 07:30:30 +01:00
|
|
|
<span class="sr-only">Loading...</span>
|
|
|
|
</div>
|
2021-06-15 18:37:33 +02:00
|
|
|
<div class="spinner-grow text-primary m-1" role="status" style="width: 3rem; height: 3rem">
|
2020-12-05 07:30:30 +01:00
|
|
|
<span class="sr-only">Loading...</span>
|
|
|
|
</div>
|
2021-06-15 18:37:33 +02:00
|
|
|
<div class="spinner-grow text-primary m-1" role="status" style="width: 3rem; height: 3rem">
|
2020-12-05 07:30:30 +01:00
|
|
|
<span class="sr-only">Loading...</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-03-14 09:23:20 +01:00
|
|
|
<div *ngIf="account" class="card mb-3">
|
|
|
|
<div class="row card-body">
|
|
|
|
<h3>
|
2021-06-15 18:37:33 +02:00
|
|
|
<strong> {{ account?.vcard?.fn[0].value }} </strong>
|
2021-03-14 09:23:20 +01:00
|
|
|
</h3>
|
2021-06-15 18:37:33 +02:00
|
|
|
<span class="ml-auto"
|
|
|
|
><strong>Balance:</strong> {{ account?.balance | tokenRatio }}
|
|
|
|
{{ tokenSymbol | uppercase }}</span
|
|
|
|
>
|
|
|
|
<span class="ml-2"
|
|
|
|
><strong>Created:</strong> {{ account?.date_registered | unixDate }}</span
|
|
|
|
>
|
|
|
|
<span class="ml-2"
|
|
|
|
><strong>Address:</strong>
|
|
|
|
<a href="{{ bloxbergLink }}" target="_blank"> {{ accountAddress }} </a>
|
|
|
|
<img
|
|
|
|
src="assets/images/checklist.svg"
|
|
|
|
class="ml-2"
|
|
|
|
height="20rem"
|
|
|
|
(click)="copyAddress()"
|
|
|
|
alt="Copy"
|
|
|
|
/>
|
2021-04-26 12:14:36 +02:00
|
|
|
</span>
|
2021-03-10 10:47:01 +01:00
|
|
|
</div>
|
2021-03-14 09:23:20 +01:00
|
|
|
</div>
|
|
|
|
<div *ngIf="account" class="card mt-3 mb-3">
|
2020-11-25 08:57:17 +01:00
|
|
|
<div class="card-body">
|
2021-02-08 12:47:07 +01:00
|
|
|
<form [formGroup]="accountInfoForm" (ngSubmit)="saveInfo()">
|
2020-11-25 08:57:17 +01:00
|
|
|
<div class="row form-inline">
|
|
|
|
<div class="col-md-6 col-lg-4">
|
|
|
|
<mat-form-field appearance="outline">
|
2021-06-02 11:10:28 +02:00
|
|
|
<mat-label>First Name: *</mat-label>
|
2021-06-15 18:37:33 +02:00
|
|
|
<input
|
|
|
|
matInput
|
|
|
|
type="text"
|
|
|
|
id="firstName"
|
|
|
|
placeholder="{{ account?.vcard?.fn[0].value.split(' ')[0] }}"
|
|
|
|
value="{{ account?.vcard?.fn[0].value.split(' ')[0] }}"
|
|
|
|
formControlName="firstName"
|
|
|
|
[errorStateMatcher]="matcher"
|
|
|
|
/>
|
|
|
|
<mat-error *ngIf="submitted && accountInfoFormStub.firstName.errors"
|
|
|
|
>First Name is required.</mat-error
|
|
|
|
>
|
2021-06-02 11:10:28 +02:00
|
|
|
</mat-form-field>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-md-6 col-lg-4">
|
|
|
|
<mat-form-field appearance="outline">
|
|
|
|
<mat-label>Last Name(s): *</mat-label>
|
2021-06-15 18:37:33 +02:00
|
|
|
<input
|
|
|
|
matInput
|
|
|
|
type="text"
|
|
|
|
id="lastName"
|
|
|
|
placeholder="{{ account?.vcard?.fn[0].value.split(' ').slice(1).join(' ') }}"
|
|
|
|
value="{{ account?.vcard?.fn[0].value.split(' ').slice(1).join(' ') }}"
|
|
|
|
formControlName="lastName"
|
|
|
|
[errorStateMatcher]="matcher"
|
|
|
|
/>
|
|
|
|
<mat-error *ngIf="submitted && accountInfoFormStub.lastName.errors"
|
|
|
|
>Last Name is required.</mat-error
|
|
|
|
>
|
2020-11-25 08:57:17 +01:00
|
|
|
</mat-form-field>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-md-6 col-lg-4">
|
|
|
|
<mat-form-field appearance="outline">
|
|
|
|
<mat-label>Phone Number: </mat-label>
|
2021-06-15 18:37:33 +02:00
|
|
|
<input
|
|
|
|
matInput
|
|
|
|
type="text"
|
|
|
|
id="phoneNumber"
|
|
|
|
placeholder="{{ account?.vcard?.tel[0].value }}"
|
|
|
|
value="{{ account?.vcard?.tel[0].value }}"
|
|
|
|
formControlName="phoneNumber"
|
|
|
|
[errorStateMatcher]="matcher"
|
|
|
|
/>
|
|
|
|
<mat-error *ngIf="submitted && accountInfoFormStub.phoneNumber.errors"
|
|
|
|
>Phone Number is required.</mat-error
|
|
|
|
>
|
2020-11-25 08:57:17 +01:00
|
|
|
</mat-form-field>
|
|
|
|
</div>
|
|
|
|
|
2021-02-23 13:32:02 +01:00
|
|
|
<div class="col-md-6 col-lg-4">
|
|
|
|
<mat-form-field appearance="outline">
|
|
|
|
<mat-label>Age: </mat-label>
|
2021-06-15 18:37:33 +02:00
|
|
|
<input
|
|
|
|
matInput
|
|
|
|
type="text"
|
|
|
|
id="age"
|
|
|
|
placeholder="{{ account?.age }}"
|
|
|
|
value="{{ account?.age }}"
|
|
|
|
formControlName="age"
|
|
|
|
[errorStateMatcher]="matcher"
|
|
|
|
/>
|
|
|
|
<mat-error *ngIf="submitted && accountInfoFormStub.age.errors"
|
|
|
|
>Age is required.</mat-error
|
|
|
|
>
|
2021-02-23 13:32:02 +01:00
|
|
|
</mat-form-field>
|
|
|
|
</div>
|
|
|
|
|
2020-11-25 08:57:17 +01:00
|
|
|
<div class="col-md-6 col-lg-4">
|
|
|
|
<mat-form-field appearance="outline">
|
|
|
|
<mat-label> ACCOUNT TYPE: </mat-label>
|
2021-06-15 18:37:33 +02:00
|
|
|
<mat-select
|
|
|
|
id="accountType"
|
|
|
|
[(value)]="account.type"
|
|
|
|
formControlName="type"
|
|
|
|
[errorStateMatcher]="matcher"
|
|
|
|
>
|
2021-04-28 19:24:25 +02:00
|
|
|
<mat-option *ngFor="let accountType of accountTypes" [value]="accountType">
|
2021-06-15 18:37:33 +02:00
|
|
|
{{ accountType | uppercase }}
|
2021-04-28 19:24:25 +02:00
|
|
|
</mat-option>
|
2020-11-25 08:57:17 +01:00
|
|
|
</mat-select>
|
2021-06-15 18:37:33 +02:00
|
|
|
<mat-error *ngIf="submitted && accountInfoFormStub.type.errors"
|
|
|
|
>Type is required.</mat-error
|
|
|
|
>
|
2020-11-25 08:57:17 +01:00
|
|
|
</mat-form-field>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-md-6 col-lg-4">
|
|
|
|
<mat-form-field appearance="outline">
|
|
|
|
<mat-label>Bio: </mat-label>
|
2021-06-15 18:37:33 +02:00
|
|
|
<input
|
|
|
|
matInput
|
|
|
|
type="text"
|
|
|
|
id="bio"
|
|
|
|
placeholder="{{ account?.products }}"
|
|
|
|
value="{{ account?.products }}"
|
|
|
|
formControlName="bio"
|
|
|
|
[errorStateMatcher]="matcher"
|
|
|
|
/>
|
|
|
|
<mat-error *ngIf="submitted && accountInfoFormStub.bio.errors"
|
|
|
|
>Bio is required.</mat-error
|
|
|
|
>
|
2020-11-25 08:57:17 +01:00
|
|
|
</mat-form-field>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-md-6 col-lg-4">
|
|
|
|
<mat-form-field appearance="outline">
|
|
|
|
<mat-label> GENDER: </mat-label>
|
2021-06-15 18:37:33 +02:00
|
|
|
<mat-select
|
|
|
|
id="gender"
|
|
|
|
[(value)]="account.gender"
|
|
|
|
formControlName="gender"
|
|
|
|
[errorStateMatcher]="matcher"
|
|
|
|
>
|
2021-04-28 19:24:25 +02:00
|
|
|
<mat-option *ngFor="let gender of genders" [value]="gender">
|
2021-06-15 18:37:33 +02:00
|
|
|
{{ gender | uppercase }}
|
2021-04-28 19:24:25 +02:00
|
|
|
</mat-option>
|
2020-11-25 08:57:17 +01:00
|
|
|
</mat-select>
|
2021-06-15 18:37:33 +02:00
|
|
|
<mat-error *ngIf="submitted && accountInfoFormStub.gender.errors"
|
|
|
|
>Gender is required.</mat-error
|
|
|
|
>
|
2020-11-25 08:57:17 +01:00
|
|
|
</mat-form-field>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-md-6 col-lg-4">
|
|
|
|
<mat-form-field appearance="outline">
|
|
|
|
<mat-label> BUSINESS CATEGORY: </mat-label>
|
2021-06-15 18:37:33 +02:00
|
|
|
<mat-select
|
|
|
|
id="businessCategory"
|
|
|
|
[(value)]="account.category"
|
|
|
|
formControlName="businessCategory"
|
|
|
|
[errorStateMatcher]="matcher"
|
|
|
|
>
|
2021-04-28 14:53:25 +02:00
|
|
|
<mat-option *ngFor="let category of categories" [value]="category">
|
2021-06-15 18:37:33 +02:00
|
|
|
{{ category | titlecase }}
|
2021-04-28 14:53:25 +02:00
|
|
|
</mat-option>
|
2020-11-25 08:57:17 +01:00
|
|
|
</mat-select>
|
2021-02-08 12:47:07 +01:00
|
|
|
<mat-error *ngIf="submitted && accountInfoFormStub.businessCategory.errors">
|
|
|
|
Category is required.
|
|
|
|
</mat-error>
|
2020-11-25 08:57:17 +01:00
|
|
|
</mat-form-field>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-md-6 col-lg-4">
|
2020-12-05 07:30:30 +01:00
|
|
|
<mat-form-field appearance="outline">
|
|
|
|
<mat-label>User Location: </mat-label>
|
2021-06-15 18:37:33 +02:00
|
|
|
<input
|
|
|
|
matInput
|
|
|
|
type="text"
|
|
|
|
id="userLocation"
|
|
|
|
placeholder="{{ account?.location.area_name }}"
|
|
|
|
value="{{ account?.location.area_name }}"
|
|
|
|
formControlName="userLocation"
|
|
|
|
[errorStateMatcher]="matcher"
|
|
|
|
/>
|
2021-02-08 12:47:07 +01:00
|
|
|
<mat-error *ngIf="submitted && accountInfoFormStub.userLocation.errors">
|
|
|
|
User Location is required.
|
|
|
|
</mat-error>
|
2020-12-05 07:30:30 +01:00
|
|
|
</mat-form-field>
|
2020-11-25 08:57:17 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-md-6 col-lg-4">
|
2020-12-05 07:30:30 +01:00
|
|
|
<mat-form-field appearance="outline">
|
|
|
|
<mat-label> LOCATION: </mat-label>
|
2021-06-15 18:37:33 +02:00
|
|
|
<mat-select
|
|
|
|
id="location"
|
|
|
|
[(value)]="account.location.area"
|
|
|
|
formControlName="location"
|
|
|
|
[errorStateMatcher]="matcher"
|
|
|
|
>
|
2021-04-28 14:53:25 +02:00
|
|
|
<mat-option *ngFor="let area of areaNames" [value]="area">
|
2021-06-15 18:37:33 +02:00
|
|
|
{{ area | uppercase }}
|
2021-04-28 14:53:25 +02:00
|
|
|
</mat-option>
|
2020-12-05 07:30:30 +01:00
|
|
|
</mat-select>
|
2021-06-15 18:37:33 +02:00
|
|
|
<mat-error *ngIf="submitted && accountInfoFormStub.location.errors"
|
|
|
|
>Location is required.</mat-error
|
|
|
|
>
|
2020-12-05 07:30:30 +01:00
|
|
|
</mat-form-field>
|
|
|
|
</div>
|
|
|
|
|
2021-02-23 13:32:02 +01:00
|
|
|
<div class="col-md-6 col-lg-4">
|
|
|
|
<mat-form-field appearance="outline">
|
|
|
|
<mat-label> LOCATION TYPE: </mat-label>
|
2021-06-15 18:37:33 +02:00
|
|
|
<mat-select
|
|
|
|
id="locationType"
|
|
|
|
[(value)]="account.location.area_type"
|
|
|
|
formControlName="locationType"
|
|
|
|
[errorStateMatcher]="matcher"
|
|
|
|
>
|
2021-04-28 14:53:25 +02:00
|
|
|
<mat-option *ngFor="let type of areaTypes" [value]="type">
|
2021-06-15 18:37:33 +02:00
|
|
|
{{ type | uppercase }}
|
2021-04-28 14:53:25 +02:00
|
|
|
</mat-option>
|
2021-02-23 13:32:02 +01:00
|
|
|
</mat-select>
|
2021-06-15 18:37:33 +02:00
|
|
|
<mat-error *ngIf="submitted && accountInfoFormStub.locationType.errors"
|
|
|
|
>Location Type is required.</mat-error
|
|
|
|
>
|
2021-02-23 13:32:02 +01:00
|
|
|
</mat-form-field>
|
|
|
|
</div>
|
|
|
|
|
2020-12-05 07:30:30 +01:00
|
|
|
<div class="col-md-6 col-lg-4">
|
2021-06-15 18:37:33 +02:00
|
|
|
<button
|
|
|
|
mat-raised-button
|
|
|
|
color="primary"
|
|
|
|
type="button"
|
|
|
|
class="btn btn-outline-primary mb-3"
|
|
|
|
>
|
2021-02-08 12:47:07 +01:00
|
|
|
Add User KYC
|
|
|
|
</button>
|
2020-12-05 07:30:30 +01:00
|
|
|
</div>
|
|
|
|
|
2021-03-15 12:58:18 +01:00
|
|
|
<div class="col-md-6 col-lg-4">
|
2021-06-15 18:37:33 +02:00
|
|
|
<button
|
|
|
|
mat-raised-button
|
|
|
|
color="primary"
|
|
|
|
type="button"
|
|
|
|
class="btn btn-outline-success mb-3"
|
|
|
|
(click)="resetPin()"
|
|
|
|
>
|
2021-02-08 12:47:07 +01:00
|
|
|
Reset Pin
|
|
|
|
</button>
|
2020-11-25 08:57:17 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-md-6 col-lg-4">
|
2021-06-15 18:37:33 +02:00
|
|
|
<button
|
|
|
|
mat-raised-button
|
|
|
|
color="warn"
|
|
|
|
type="button"
|
|
|
|
class="btn btn-outline-danger mb-3"
|
|
|
|
>
|
2021-02-08 12:47:07 +01:00
|
|
|
Delete User
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-md-6 col-lg-4">
|
2021-06-15 18:37:33 +02:00
|
|
|
<button
|
|
|
|
mat-raised-button
|
|
|
|
color="primary"
|
|
|
|
type="submit"
|
|
|
|
class="btn btn-outline-primary"
|
|
|
|
>
|
2021-02-17 11:00:38 +01:00
|
|
|
SAVE DETAILS
|
2021-02-08 12:47:07 +01:00
|
|
|
</button>
|
2020-11-25 08:57:17 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-12-05 07:30:30 +01:00
|
|
|
|
2020-11-25 08:57:17 +01:00
|
|
|
<div class="card mb-3">
|
2021-06-15 18:37:33 +02:00
|
|
|
<mat-card-title class="card-header"> USER </mat-card-title>
|
2020-11-25 08:57:17 +01:00
|
|
|
<div class="card-body">
|
|
|
|
<div class="table-responsive">
|
|
|
|
<table class="table table-striped table-bordered table-hover">
|
2021-06-15 18:37:33 +02:00
|
|
|
<caption>
|
|
|
|
1 user
|
|
|
|
</caption>
|
2020-11-25 08:57:17 +01:00
|
|
|
<thead class="thead-dark">
|
2021-06-15 18:37:33 +02:00
|
|
|
<tr>
|
|
|
|
<th scope="col">NAME</th>
|
|
|
|
<th scope="col">BALANCE</th>
|
|
|
|
<th scope="col">CREATED</th>
|
|
|
|
<th scope="col">STATUS</th>
|
|
|
|
</tr>
|
2020-11-25 08:57:17 +01:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
2021-06-15 18:37:33 +02:00
|
|
|
<tr>
|
|
|
|
<td>{{ account?.vcard?.fn[0].value }}</td>
|
|
|
|
<td>{{ account?.balance | tokenRatio }} {{ tokenSymbol | uppercase }}</td>
|
|
|
|
<td>{{ account?.date_registered | unixDate }}</td>
|
|
|
|
<td>
|
|
|
|
<span class="badge badge-success badge-pill">
|
|
|
|
{{ accountStatus }}
|
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2020-11-25 08:57:17 +01:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2021-04-25 12:32:23 +02:00
|
|
|
<mat-tab-group *ngIf="account" dynamicHeight mat-align-tabs="start">
|
2020-12-05 07:30:30 +01:00
|
|
|
<mat-tab label="Transactions">
|
2021-06-15 18:37:33 +02:00
|
|
|
<app-transaction-details
|
|
|
|
[transaction]="transaction"
|
|
|
|
(closeWindow)="transaction = $event"
|
|
|
|
></app-transaction-details>
|
2020-12-05 07:30:30 +01:00
|
|
|
<div class="card mt-1">
|
|
|
|
<div class="card-header">
|
|
|
|
<div class="row">
|
|
|
|
<mat-form-field appearance="outline">
|
|
|
|
<mat-label> TRANSACTION TYPE </mat-label>
|
2021-06-15 18:37:33 +02:00
|
|
|
<mat-select
|
|
|
|
id="transferSelect"
|
|
|
|
[(value)]="transactionsType"
|
|
|
|
(selectionChange)="filterTransactions()"
|
|
|
|
>
|
2020-12-05 07:30:30 +01:00
|
|
|
<mat-option value="all">ALL TRANSFERS</mat-option>
|
2021-06-15 18:37:33 +02:00
|
|
|
<mat-option
|
|
|
|
*ngFor="let transactionType of transactionsTypes"
|
|
|
|
[value]="transactionType"
|
|
|
|
>
|
|
|
|
{{ transactionType | uppercase }}
|
2021-04-28 19:24:25 +02:00
|
|
|
</mat-option>
|
2020-12-05 07:30:30 +01:00
|
|
|
</mat-select>
|
|
|
|
</mat-form-field>
|
2021-06-15 18:37:33 +02:00
|
|
|
<button
|
|
|
|
mat-raised-button
|
|
|
|
color="primary"
|
|
|
|
type="button"
|
|
|
|
class="btn btn-outline-primary ml-auto mr-2"
|
|
|
|
(click)="downloadCsv(transactions, 'transactions')"
|
|
|
|
>
|
|
|
|
EXPORT
|
|
|
|
</button>
|
2020-12-05 07:30:30 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="card-body">
|
|
|
|
<mat-form-field appearance="outline">
|
|
|
|
<mat-label> Filter </mat-label>
|
2021-06-15 18:37:33 +02:00
|
|
|
<input
|
|
|
|
matInput
|
|
|
|
type="text"
|
|
|
|
(keyup)="doTransactionFilter($event.target.value)"
|
|
|
|
placeholder="Filter"
|
|
|
|
/>
|
2020-12-05 07:30:30 +01:00
|
|
|
<mat-icon matSuffix>search</mat-icon>
|
|
|
|
</mat-form-field>
|
|
|
|
|
2021-06-15 18:37:33 +02:00
|
|
|
<table
|
|
|
|
mat-table
|
|
|
|
class="mat-elevation-z10"
|
|
|
|
[dataSource]="transactionsDataSource"
|
|
|
|
matSort
|
|
|
|
matSortActive="created"
|
|
|
|
#TransactionTableSort="matSort"
|
|
|
|
matSortDirection="asc"
|
|
|
|
matSortDisableClear
|
|
|
|
>
|
2020-12-05 07:30:30 +01:00
|
|
|
<ng-container matColumnDef="sender">
|
2021-06-15 18:37:33 +02:00
|
|
|
<th mat-header-cell *matHeaderCellDef mat-sort-header>Sender</th>
|
|
|
|
<td mat-cell *matCellDef="let transaction">
|
|
|
|
{{ transaction?.sender?.vcard.fn[0].value || transaction.from }}
|
|
|
|
</td>
|
2020-12-05 07:30:30 +01:00
|
|
|
</ng-container>
|
|
|
|
|
|
|
|
<ng-container matColumnDef="recipient">
|
2021-06-15 18:37:33 +02:00
|
|
|
<th mat-header-cell *matHeaderCellDef mat-sort-header>Recipient</th>
|
|
|
|
<td mat-cell *matCellDef="let transaction">
|
|
|
|
{{ transaction?.recipient?.vcard.fn[0].value || transaction.to }}
|
|
|
|
</td>
|
2020-12-05 07:30:30 +01:00
|
|
|
</ng-container>
|
|
|
|
|
|
|
|
<ng-container matColumnDef="value">
|
2021-06-15 18:37:33 +02:00
|
|
|
<th mat-header-cell *matHeaderCellDef mat-sort-header>Value</th>
|
2021-03-15 12:58:18 +01:00
|
|
|
<td mat-cell *matCellDef="let transaction">
|
2021-06-15 18:37:33 +02:00
|
|
|
<span *ngIf="transaction.type == 'transaction'"
|
|
|
|
>{{ transaction?.value | tokenRatio }} {{ tokenSymbol | uppercase }}</span
|
|
|
|
>
|
|
|
|
<span *ngIf="transaction.type == 'conversion'"
|
|
|
|
>{{ transaction?.toValue | tokenRatio }} {{ tokenSymbol | uppercase }}</span
|
|
|
|
>
|
2021-03-15 12:58:18 +01:00
|
|
|
</td>
|
2020-12-05 07:30:30 +01:00
|
|
|
</ng-container>
|
|
|
|
|
|
|
|
<ng-container matColumnDef="created">
|
2021-06-15 18:37:33 +02:00
|
|
|
<th mat-header-cell *matHeaderCellDef mat-sort-header>Created</th>
|
|
|
|
<td mat-cell *matCellDef="let transaction">
|
|
|
|
{{ transaction?.tx.timestamp | unixDate }}
|
|
|
|
</td>
|
2020-12-05 07:30:30 +01:00
|
|
|
</ng-container>
|
|
|
|
|
|
|
|
<ng-container matColumnDef="type">
|
2021-06-15 18:37:33 +02:00
|
|
|
<th mat-header-cell *matHeaderCellDef mat-sort-header>TYPE</th>
|
2021-03-15 12:58:18 +01:00
|
|
|
<td mat-cell *matCellDef="let transaction">
|
2021-06-15 18:37:33 +02:00
|
|
|
<span class="badge badge-success badge-pill"> {{ transaction?.type }} </span>
|
2021-03-15 12:58:18 +01:00
|
|
|
</td>
|
2020-12-05 07:30:30 +01:00
|
|
|
</ng-container>
|
|
|
|
|
2021-05-19 09:56:39 +02:00
|
|
|
<tr mat-header-row *matHeaderRowDef="transactionsDisplayedColumns"></tr>
|
2021-06-15 18:37:33 +02:00
|
|
|
<tr
|
|
|
|
mat-row
|
|
|
|
*matRowDef="let transaction; columns: transactionsDisplayedColumns"
|
|
|
|
matRipple
|
|
|
|
(click)="viewTransaction(transaction)"
|
|
|
|
></tr>
|
2021-05-19 09:56:39 +02:00
|
|
|
</table>
|
2020-12-05 07:30:30 +01:00
|
|
|
|
2021-06-15 18:37:33 +02:00
|
|
|
<mat-paginator
|
|
|
|
#TransactionTablePaginator="matPaginator"
|
|
|
|
[pageSize]="transactionsDefaultPageSize"
|
|
|
|
[pageSizeOptions]="transactionsPageSizeOptions"
|
|
|
|
showFirstLastButtons
|
|
|
|
></mat-paginator>
|
2020-12-05 07:30:30 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</mat-tab>
|
|
|
|
|
|
|
|
<mat-tab label="Users">
|
|
|
|
<div class="card mt-1">
|
2021-06-15 18:37:33 +02:00
|
|
|
<mat-card-title class="card-header"> Accounts </mat-card-title>
|
2020-12-05 07:30:30 +01:00
|
|
|
<div class="card-body">
|
|
|
|
<div class="row card-header">
|
|
|
|
<mat-form-field appearance="outline">
|
|
|
|
<mat-label> ACCOUNT TYPE </mat-label>
|
2021-06-15 18:37:33 +02:00
|
|
|
<mat-select
|
|
|
|
id="typeSelect"
|
|
|
|
[(value)]="accountsType"
|
|
|
|
(selectionChange)="filterAccounts()"
|
|
|
|
>
|
2020-12-05 07:30:30 +01:00
|
|
|
<mat-option value="all">ALL</mat-option>
|
2021-04-28 19:24:25 +02:00
|
|
|
<mat-option *ngFor="let accountType of accountTypes" [value]="accountType">
|
2021-06-15 18:37:33 +02:00
|
|
|
{{ accountType | uppercase }}
|
2021-04-28 19:24:25 +02:00
|
|
|
</mat-option>
|
2020-12-05 07:30:30 +01:00
|
|
|
</mat-select>
|
|
|
|
</mat-form-field>
|
2021-06-15 18:37:33 +02:00
|
|
|
<button
|
|
|
|
mat-raised-button
|
|
|
|
color="primary"
|
|
|
|
type="button"
|
|
|
|
class="btn btn-outline-primary ml-auto mr-2"
|
|
|
|
(click)="downloadCsv(accounts, 'accounts')"
|
|
|
|
>
|
|
|
|
EXPORT
|
|
|
|
</button>
|
2020-12-05 07:30:30 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<mat-form-field appearance="outline">
|
|
|
|
<mat-label> Filter </mat-label>
|
2021-06-15 18:37:33 +02:00
|
|
|
<input
|
|
|
|
matInput
|
|
|
|
type="text"
|
|
|
|
(keyup)="doUserFilter($event.target.value)"
|
|
|
|
placeholder="Filter"
|
|
|
|
/>
|
2020-12-05 07:30:30 +01:00
|
|
|
<mat-icon matSuffix>search</mat-icon>
|
|
|
|
</mat-form-field>
|
|
|
|
|
2021-06-15 18:37:33 +02:00
|
|
|
<mat-table
|
|
|
|
class="mat-elevation-z10"
|
|
|
|
[dataSource]="userDataSource"
|
|
|
|
matSort
|
|
|
|
#UserTableSort="matSort"
|
|
|
|
matSortActive="created"
|
|
|
|
matSortDirection="desc"
|
|
|
|
matSortDisableClear
|
|
|
|
>
|
2020-12-05 07:30:30 +01:00
|
|
|
<ng-container matColumnDef="name">
|
|
|
|
<mat-header-cell *matHeaderCellDef mat-sort-header> NAME </mat-header-cell>
|
2021-06-15 18:37:33 +02:00
|
|
|
<mat-cell *matCellDef="let user"> {{ user?.vcard.fn[0].value }} </mat-cell>
|
2020-12-05 07:30:30 +01:00
|
|
|
</ng-container>
|
|
|
|
|
|
|
|
<ng-container matColumnDef="phone">
|
2021-06-15 18:37:33 +02:00
|
|
|
<mat-header-cell *matHeaderCellDef mat-sort-header>
|
|
|
|
PHONE NUMBER
|
|
|
|
</mat-header-cell>
|
|
|
|
<mat-cell *matCellDef="let user"> {{ user?.vcard.tel[0].value }} </mat-cell>
|
2020-12-05 07:30:30 +01:00
|
|
|
</ng-container>
|
|
|
|
|
|
|
|
<ng-container matColumnDef="created">
|
|
|
|
<mat-header-cell *matHeaderCellDef mat-sort-header> CREATED </mat-header-cell>
|
2021-06-15 18:37:33 +02:00
|
|
|
<mat-cell *matCellDef="let user">
|
|
|
|
{{ user?.date_registered | unixDate }}
|
|
|
|
</mat-cell>
|
2020-12-05 07:30:30 +01:00
|
|
|
</ng-container>
|
|
|
|
|
|
|
|
<ng-container matColumnDef="balance">
|
|
|
|
<mat-header-cell *matHeaderCellDef mat-sort-header> BALANCE </mat-header-cell>
|
2021-06-15 18:37:33 +02:00
|
|
|
<mat-cell *matCellDef="let user">
|
|
|
|
{{ user?.balance | tokenRatio }} {{ tokenSymbol | uppercase }}
|
|
|
|
</mat-cell>
|
2020-12-05 07:30:30 +01:00
|
|
|
</ng-container>
|
|
|
|
|
|
|
|
<ng-container matColumnDef="location">
|
|
|
|
<mat-header-cell *matHeaderCellDef mat-sort-header> LOCATION </mat-header-cell>
|
2021-06-15 18:37:33 +02:00
|
|
|
<mat-cell *matCellDef="let user"> {{ user?.location.area_name }} </mat-cell>
|
2020-12-05 07:30:30 +01:00
|
|
|
</ng-container>
|
|
|
|
|
2021-06-15 18:37:33 +02:00
|
|
|
<mat-header-row *matHeaderRowDef="userDisplayedColumns"></mat-header-row>
|
|
|
|
<mat-row
|
|
|
|
*matRowDef="let account; columns: userDisplayedColumns"
|
|
|
|
(click)="viewAccount(account)"
|
|
|
|
matRipple
|
|
|
|
></mat-row>
|
2020-12-05 07:30:30 +01:00
|
|
|
</mat-table>
|
|
|
|
|
2021-06-15 18:37:33 +02:00
|
|
|
<mat-paginator
|
|
|
|
#UserTablePaginator="matPaginator"
|
|
|
|
[pageSize]="usersDefaultPageSize"
|
|
|
|
[pageSizeOptions]="usersPageSizeOptions"
|
|
|
|
showFirstLastButtons
|
|
|
|
></mat-paginator>
|
2020-12-05 07:30:30 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</mat-tab>
|
|
|
|
</mat-tab-group>
|
2020-11-25 08:57:17 +01:00
|
|
|
</div>
|
|
|
|
<app-footer appMenuSelection></app-footer>
|
|
|
|
</div>
|
|
|
|
<!-- ============================================================== -->
|
|
|
|
<!-- End Page content -->
|
|
|
|
<!-- ============================================================== -->
|
|
|
|
</div>
|