2021-04-13 21:53:58 +02:00
|
|
|
|
<div class="container">
|
|
|
|
|
<div class="mb-5 row">
|
|
|
|
|
<div class="col">
|
|
|
|
|
<h3 class="d-flex justify-content-center mb-3" i18n>
|
|
|
|
|
Admin Control Panel
|
|
|
|
|
</h3>
|
|
|
|
|
<mat-card class="mb-3">
|
|
|
|
|
<mat-card-content>
|
|
|
|
|
<div class="d-flex my-3">
|
|
|
|
|
<div class="w-50" i18n>Exchange Rates</div>
|
|
|
|
|
<div class="w-50">
|
|
|
|
|
<div *ngFor="let exchangeRate of exchangeRates" class="mb-1">
|
|
|
|
|
1 {{ exchangeRate.label1 }} = {{ exchangeRate.value | number :
|
|
|
|
|
'1.5-5' }} {{ exchangeRate.label2 }}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="d-flex my-3">
|
|
|
|
|
<div class="w-50" i18n>Last Data Gathering</div>
|
|
|
|
|
<div class="w-50">
|
|
|
|
|
<div>
|
|
|
|
|
<ng-container *ngIf="lastDataGathering"
|
|
|
|
|
>{{ lastDataGathering }}</ng-container
|
|
|
|
|
>
|
|
|
|
|
<ng-container *ngIf="dataGatheringInProgress" i18n
|
|
|
|
|
>In Progress</ng-container
|
|
|
|
|
>
|
|
|
|
|
</div>
|
2021-04-21 21:13:38 +02:00
|
|
|
|
<div class="mt-2 overflow-hidden">
|
2021-07-24 21:13:48 +02:00
|
|
|
|
<div class="mb-2">
|
|
|
|
|
<button
|
|
|
|
|
class="mw-100"
|
|
|
|
|
color="accent"
|
|
|
|
|
mat-flat-button
|
|
|
|
|
(click)="onFlushCache()"
|
|
|
|
|
>
|
|
|
|
|
<ion-icon
|
|
|
|
|
class="mr-1"
|
|
|
|
|
name="close-circle-outline"
|
|
|
|
|
></ion-icon>
|
|
|
|
|
<span i18n>Reset Data Gathering</span>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mb-2">
|
|
|
|
|
<button
|
|
|
|
|
class="mw-100"
|
|
|
|
|
color="warn"
|
|
|
|
|
mat-flat-button
|
|
|
|
|
[disabled]="dataGatheringInProgress"
|
|
|
|
|
(click)="onGatherMax()"
|
|
|
|
|
>
|
|
|
|
|
<ion-icon class="mr-1" name="warning-outline"></ion-icon>
|
|
|
|
|
<span i18n>Gather All Data</span>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<button
|
|
|
|
|
class="mb-2 mr-2 mw-100"
|
|
|
|
|
color="accent"
|
|
|
|
|
mat-flat-button
|
|
|
|
|
(click)="onGatherProfileData()"
|
|
|
|
|
>
|
|
|
|
|
<ion-icon
|
|
|
|
|
class="mr-1"
|
|
|
|
|
name="cloud-download-outline"
|
|
|
|
|
></ion-icon>
|
|
|
|
|
<span i18n>Gather Profile Data</span>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
2021-04-13 21:53:58 +02:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="d-flex my-3">
|
|
|
|
|
<div class="w-50" i18n>User Count</div>
|
|
|
|
|
<div class="w-50">{{ userCount }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="d-flex my-3">
|
|
|
|
|
<div class="w-50" i18n>Transaction Count</div>
|
|
|
|
|
<div class="w-50">
|
|
|
|
|
<ng-container *ngIf="transactionCount">
|
|
|
|
|
{{ transactionCount }} ({{ transactionCount / userCount | number
|
|
|
|
|
: '1.2-2' }} <span i18n>per User</span>)
|
|
|
|
|
</ng-container>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</mat-card-content>
|
|
|
|
|
</mat-card>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col">
|
2021-04-18 20:12:58 +02:00
|
|
|
|
<h3 class="mb-3 text-center" i18n>Users</h3>
|
2021-05-12 20:32:34 +02:00
|
|
|
|
<div class="users">
|
|
|
|
|
<table class="gf-table">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr class="mat-header-row">
|
2021-06-14 14:02:25 +02:00
|
|
|
|
<th class="mat-header-cell px-1 py-2 text-right" i18n>#</th>
|
2021-05-12 20:32:34 +02:00
|
|
|
|
<th class="mat-header-cell px-1 py-2" i18n>User</th>
|
2021-06-14 14:02:25 +02:00
|
|
|
|
<th class="mat-header-cell px-1 py-2 text-right" i18n>
|
2021-08-14 11:12:08 +02:00
|
|
|
|
Registration
|
2021-05-22 10:17:12 +02:00
|
|
|
|
</th>
|
2021-06-14 14:02:25 +02:00
|
|
|
|
<th class="mat-header-cell px-1 py-2 text-right" i18n>
|
2021-05-22 10:17:12 +02:00
|
|
|
|
Accounts
|
|
|
|
|
</th>
|
2021-06-14 14:02:25 +02:00
|
|
|
|
<th class="mat-header-cell px-1 py-2 text-right" i18n>
|
2021-05-22 10:17:12 +02:00
|
|
|
|
Transactions
|
|
|
|
|
</th>
|
2021-06-14 14:02:25 +02:00
|
|
|
|
<th class="mat-header-cell px-1 py-2 text-right" i18n>
|
2021-08-14 11:12:08 +02:00
|
|
|
|
Engagement per Day
|
2021-05-22 10:17:12 +02:00
|
|
|
|
</th>
|
2021-05-12 20:32:34 +02:00
|
|
|
|
<th class="mat-header-cell px-1 py-2" i18n>Last Activitiy</th>
|
|
|
|
|
<th class="mat-header-cell px-1 py-2"></th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
2021-05-22 10:17:12 +02:00
|
|
|
|
<tr *ngFor="let userItem of users; let i = index" class="mat-row">
|
|
|
|
|
<td class="mat-cell px-1 py-2 text-right">{{ i + 1 }}</td>
|
2021-05-12 20:32:34 +02:00
|
|
|
|
<td class="mat-cell px-1 py-2">
|
2021-08-22 22:11:05 +02:00
|
|
|
|
<div class="d-flex align-items-center">
|
|
|
|
|
<span class="d-none d-sm-inline-block"
|
|
|
|
|
>{{ userItem.alias || userItem.id }}</span
|
|
|
|
|
>
|
|
|
|
|
<span class="d-inline-block d-sm-none"
|
|
|
|
|
>{{ userItem.alias || (userItem.id | slice:0:5) +
|
|
|
|
|
'...' }}</span
|
|
|
|
|
>
|
|
|
|
|
<ion-icon
|
|
|
|
|
*ngIf="userItem?.subscription?.type === 'Premium'"
|
|
|
|
|
class="ml-1 text-muted"
|
|
|
|
|
name="diamond-outline"
|
|
|
|
|
></ion-icon>
|
|
|
|
|
</div>
|
2021-05-12 20:32:34 +02:00
|
|
|
|
</td>
|
2021-05-22 10:17:12 +02:00
|
|
|
|
<td class="mat-cell px-1 py-2 text-right">
|
2021-08-14 11:12:08 +02:00
|
|
|
|
{{ formatDistanceToNow(userItem.createdAt) }}
|
2021-05-12 20:32:34 +02:00
|
|
|
|
</td>
|
2021-05-22 10:17:12 +02:00
|
|
|
|
<td class="mat-cell px-1 py-2 text-right">
|
2021-08-14 11:12:08 +02:00
|
|
|
|
{{ userItem.accountCount }}
|
2021-05-22 10:17:12 +02:00
|
|
|
|
</td>
|
|
|
|
|
<td class="mat-cell px-1 py-2 text-right">
|
2021-08-14 11:12:08 +02:00
|
|
|
|
{{ userItem.transactionCount }}
|
2021-05-22 10:17:12 +02:00
|
|
|
|
</td>
|
|
|
|
|
<td class="mat-cell px-1 py-2 text-right">
|
2021-08-14 11:12:08 +02:00
|
|
|
|
{{ userItem.engagement | number: '1.0-0' }}
|
2021-05-12 20:32:34 +02:00
|
|
|
|
</td>
|
|
|
|
|
<td class="mat-cell px-1 py-2">
|
2021-08-14 11:12:08 +02:00
|
|
|
|
{{ formatDistanceToNow(userItem.lastActivity) }}
|
2021-05-12 20:32:34 +02:00
|
|
|
|
</td>
|
|
|
|
|
<td class="mat-cell px-1 py-2">
|
|
|
|
|
<button
|
|
|
|
|
class="mx-1 no-min-width px-2"
|
|
|
|
|
mat-button
|
|
|
|
|
[matMenuTriggerFor]="accountMenu"
|
|
|
|
|
(click)="$event.stopPropagation()"
|
|
|
|
|
>
|
|
|
|
|
<ion-icon name="ellipsis-vertical"></ion-icon>
|
|
|
|
|
</button>
|
|
|
|
|
<mat-menu #accountMenu="matMenu" xPosition="before">
|
2021-05-03 21:23:00 +02:00
|
|
|
|
<button
|
2021-05-12 20:32:34 +02:00
|
|
|
|
i18n
|
|
|
|
|
mat-menu-item
|
|
|
|
|
[disabled]="userItem.id === user?.id"
|
|
|
|
|
(click)="onDeleteUser(userItem.id)"
|
2021-05-03 21:23:00 +02:00
|
|
|
|
>
|
2021-05-12 20:32:34 +02:00
|
|
|
|
Delete
|
2021-05-03 21:23:00 +02:00
|
|
|
|
</button>
|
2021-05-12 20:32:34 +02:00
|
|
|
|
</mat-menu>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
2021-04-13 21:53:58 +02:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|