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-04-13 21:53:58 +02:00
|
|
|
|
<button
|
2021-04-21 21:13:38 +02:00
|
|
|
|
class="mb-2 mr-2 mw-100"
|
2021-04-13 21:53:58 +02:00
|
|
|
|
color="accent"
|
|
|
|
|
mat-flat-button
|
|
|
|
|
(click)="onFlushCache()"
|
|
|
|
|
>
|
|
|
|
|
<ion-icon class="mr-1" name="close-circle-outline"></ion-icon>
|
2021-04-18 19:06:54 +02:00
|
|
|
|
<span i18n>Reset Data Gathering</span>
|
2021-04-13 21:53:58 +02:00
|
|
|
|
</button>
|
2021-04-18 19:06:54 +02:00
|
|
|
|
<button
|
2021-04-21 21:13:38 +02:00
|
|
|
|
class="mw-100"
|
2021-04-18 19:06:54 +02:00
|
|
|
|
color="warn"
|
|
|
|
|
mat-flat-button
|
|
|
|
|
[disabled]="dataGatheringInProgress"
|
|
|
|
|
(click)="onGatherMax()"
|
|
|
|
|
>
|
2021-04-13 21:53:58 +02:00
|
|
|
|
<ion-icon class="mr-1" name="warning-outline"></ion-icon>
|
2021-04-18 19:06:54 +02:00
|
|
|
|
<span i18n>Gather All Data</span>
|
2021-04-13 21:53:58 +02:00
|
|
|
|
</button>
|
|
|
|
|
</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>
|
|
|
|
|
<mat-card class="px-0">
|
2021-04-25 21:25:23 +02:00
|
|
|
|
<mat-card-content class="users">
|
|
|
|
|
<table>
|
2021-04-13 21:53:58 +02:00
|
|
|
|
<thead>
|
|
|
|
|
<tr class="mat-header-row">
|
2021-04-26 21:54:19 +02:00
|
|
|
|
<th class="mat-header-cell pl-3 py-2" i18n>User</th>
|
2021-04-25 21:25:23 +02:00
|
|
|
|
<th class="mat-header-cell pr-2 py-2" i18n>
|
2021-04-13 21:53:58 +02:00
|
|
|
|
Registration Date
|
|
|
|
|
</th>
|
2021-04-25 21:25:23 +02:00
|
|
|
|
<th class="mat-header-cell pr-2 py-2" i18n>Accounts</th>
|
|
|
|
|
<th class="mat-header-cell pr-2 py-2" i18n>Transactions</th>
|
|
|
|
|
<th class="mat-header-cell pr-2 py-2" i18n>Engagement</th>
|
2021-04-26 21:54:19 +02:00
|
|
|
|
<th class="mat-header-cell pr-3 py-2" i18n>Last Activitiy</th>
|
2021-05-03 21:23:00 +02:00
|
|
|
|
<th class="mat-header-cell pr-3 py-2"></th>
|
2021-04-13 21:53:58 +02:00
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
2021-04-18 20:12:58 +02:00
|
|
|
|
<tr *ngFor="let userItem of users" class="mat-row">
|
2021-04-26 21:54:19 +02:00
|
|
|
|
<td class="mat-cell pl-3 py-2">
|
2021-04-18 20:12:58 +02:00
|
|
|
|
{{ userItem.alias || userItem.id }}
|
|
|
|
|
</td>
|
2021-04-25 21:25:23 +02:00
|
|
|
|
<td class="mat-cell pr-2 py-2">
|
2021-04-18 20:12:58 +02:00
|
|
|
|
{{ userItem.createdAt | date: defaultDateFormat }}
|
2021-04-13 21:53:58 +02:00
|
|
|
|
</td>
|
2021-04-25 21:25:23 +02:00
|
|
|
|
<td class="mat-cell pr-2 py-2">
|
|
|
|
|
{{ userItem._count?.Account }}
|
2021-04-13 21:53:58 +02:00
|
|
|
|
</td>
|
2021-04-25 21:25:23 +02:00
|
|
|
|
<td class="mat-cell pr-2 py-2">{{ userItem._count?.Order }}</td>
|
|
|
|
|
<td class="mat-cell pr-2 py-2">
|
2021-04-18 20:49:57 +02:00
|
|
|
|
{{ userItem.Analytics?.activityCount }}
|
2021-04-13 21:53:58 +02:00
|
|
|
|
</td>
|
2021-04-26 21:54:19 +02:00
|
|
|
|
<td class="mat-cell pr-3 py-2">
|
2021-04-18 20:49:57 +02:00
|
|
|
|
{{ formatDistanceToNow(userItem.Analytics?.updatedAt) }}
|
2021-04-13 21:53:58 +02:00
|
|
|
|
</td>
|
2021-05-03 21:23:00 +02:00
|
|
|
|
<td class="mat-cell pr-3 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">
|
|
|
|
|
<button
|
|
|
|
|
i18n
|
|
|
|
|
mat-menu-item
|
|
|
|
|
[disabled]="userItem.id === user?.id"
|
|
|
|
|
(click)="onDeleteUser(userItem.id)"
|
|
|
|
|
>
|
|
|
|
|
Delete
|
|
|
|
|
</button>
|
|
|
|
|
</mat-menu>
|
|
|
|
|
</td>
|
2021-04-13 21:53:58 +02:00
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</mat-card-content>
|
|
|
|
|
</mat-card>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|