cic-staff-client/src/app/pages/accounts/account-details/account-details.component.html

263 lines
12 KiB
HTML
Raw Normal View History

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-->
<div class="container-fluid" appMenuSelection>
<div class="card mb-3">
<div class="row card-body">
<h3>
<mat-icon matPrefix>portrait</mat-icon>
<strong> {{account?.name}} </strong>
</h3>
<p class="ml-auto">Balance: {{account?.balance}} RCU</p>
<p class="ml-2">Created: {{account?.created}}</p>
<p class="ml-2">Address: {{account?.address}}</p>
</div>
</div>
<app-disbursement *ngIf="isDisbursing"></app-disbursement>
<div class="card mt-3 mb-3">
<mat-card-title class="card-header">
<div class="row">
DETAILS
<button mat-raised-button type="button" class="btn btn-outline-secondary ml-auto" (click)="addTransfer()"> NEW TRANSFER </button>
<button mat-raised-button type="button" class="btn btn-outline-secondary ml-2"> SAVE </button>
</div>
</mat-card-title>
<div class="card-body">
<form>
<div class="row form-inline">
<div class="col-md-6 col-lg-4">
<mat-form-field appearance="outline">
<mat-label> STATUS </mat-label>
<mat-select id="status" [(value)]="account.status">
<mat-option value="false">Unapproved</mat-option>
<mat-option value="true">Approved</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="col-md-6 col-lg-4">
<mat-form-field appearance="outline">
<mat-label class="mr-3">Payment Cycle Start Date : </mat-label>
<input matInput type="text" id="startDate" placeholder="{{date}}" value="{{date}}">
</mat-form-field>
</div>
<div class="col-md-6 col-lg-4">
<mat-form-field appearance="outline">
<mat-label> PAYMENT CYCLE </mat-label>
<mat-select id="paymentCycle">
<mat-option value="weekly">Weekly</mat-option>
<mat-option value="daily">Daily</mat-option>
<mat-option value="monthly">Monthly</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="col-md-6 col-lg-4">
<mat-form-field appearance="outline">
<mat-label>Name(s): *</mat-label>
<input matInput type="text" id="givenNames" placeholder="{{account?.name}}" value="{{account?.name}}">
</mat-form-field>
</div>
<div class="col-md-6 col-lg-4">
<mat-form-field appearance="outline">
<mat-label>Phone Number: </mat-label>
<input matInput type="text" id="phoneNumber" placeholder="{{account?.phone}}" value="{{account?.phone}}">
</mat-form-field>
</div>
<div class="col-md-6 col-lg-4">
<mat-form-field appearance="outline">
<mat-label> ACCOUNT TYPE: </mat-label>
<mat-select id="accountType" [(value)]="account.type">
<mat-option value="user"> USER </mat-option>
<mat-option value="cashier"> CASHIER </mat-option>
<mat-option value="vendor"> VENDOR </mat-option>
<mat-option value="tokenAgent"> TOKENAGENT </mat-option>
<mat-option value="group"> GROUPACCOUNT </mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="col-md-6 col-lg-4">
<mat-form-field appearance="outline">
<mat-label>Failed Pin Attempts: </mat-label>
<input matInput type="text" id="failedPinAttempts" placeholder="{{account?.failedPinAttempts}}" value="{{account?.failedPinAttempts}}">
</mat-form-field>
</div>
<div class="col-md-6 col-lg-4">
<mat-form-field appearance="outline">
<mat-label>Bio: </mat-label>
<input matInput type="text" id="bio" placeholder="{{account?.bio}}" value="{{account?.bio}}">
</mat-form-field>
</div>
<div class="col-md-6 col-lg-4">
<mat-form-field appearance="outline">
<mat-label> GENDER: </mat-label>
<mat-select id="gender" [(value)]="account.gender">
<mat-option value="male"> MALE </mat-option>
<mat-option value="female"> FEMALE </mat-option>
<mat-option value="other"> OTHER </mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="col-md-6 col-lg-4">
<mat-form-field appearance="outline">
<mat-label> BUSINESS CATEGORY: </mat-label>
<mat-select id="businessCategory">
<mat-option value="food/water">Food/Water</mat-option>
<mat-option value="fuel/energy">Fuel/Energy</mat-option>
<mat-option value="education">Education</mat-option>
<mat-option value="health">Health</mat-option>
<mat-option value="shop">Shop</mat-option>
<mat-option value="environment">Environment</mat-option>
<mat-option value="transport">Transport</mat-option>
<mat-option value="farming/labour">Farming/Labour</mat-option>
<mat-option value="savings">Savings Group</mat-option>
<mat-option value="other">Other</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="col-md-6 col-lg-4">
<button mat-raised-button type="button" class="btn btn btn-outline-primary mb-3"> Add User KYC </button>
</div>
<div class="col-md-6 col-lg-4">
<button mat-raised-button type="button" class="btn btn btn-outline-success mb-3"> Reset Pin </button>
</div>
<div class="col-md-6 col-lg-4">
<button mat-raised-button type="button" class="btn btn-outline-danger"> Delete User </button>
</div>
</div>
</form>
</div>
</div>
<div class="card mb-3">
<mat-card-title class="card-header">
USER
</mat-card-title>
<div class="card-body">
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover">
<caption> 1 user </caption>
<thead class="thead-dark">
<tr>
<th scope="col">NAME</th>
<th scope="col">ACCOUNT TYPE</th>
<th scope="col">CREATED</th>
<th scope="col">STATUS</th>
</tr>
</thead>
<tbody>
<tr routerLink='/users/{{account.address}}'>
<td>{{account.name}}</td>
<td>{{account.type}}</td>
<td>{{account.created}}</td>
<td><span class="badge badge-primary badge-pill">{{account.status}}</span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<app-transaction-details [transaction]="transaction"></app-transaction-details>
<div class="card">
<div class="card-header">
<div class="row">
<mat-form-field appearance="outline">
<mat-label> TRANSACTION TYPE </mat-label>
<mat-select id="transferSelect">
<mat-option value="all" selected>ALL TRANSFERS</mat-option>
<mat-option value="payments">PAYMENTS</mat-option>
<mat-option value="exchange">EXCHANGE</mat-option>
<mat-option value="disbursement">DISBURSEMENT</mat-option>
<mat-option value="reclamation">RECLAMATION</mat-option>>
</mat-select>
</mat-form-field>
<p *ngIf="selection.selected.length > 0" class="ml-auto mr-3"><strong> {{selection.selected.length}} selected </strong></p>
</div>
</div>
<div class="card-body">
<mat-form-field appearance="outline">
<mat-label> Filter </mat-label>
<input matInput type="text" (keyup)="doFilter($event.target.value)" placeholder="Filter">
<mat-icon matSuffix>search</mat-icon>
</mat-form-field>
<mat-table class="mat-elevation-z10" [dataSource]="dataSource" matSort matSortActive="sender"
matSortDirection="asc" matSortDisableClear>
<ng-container matColumnDef="sender">
<mat-header-cell *matHeaderCellDef mat-sort-header> Sender </mat-header-cell>
<mat-cell *matCellDef="let transaction"> {{transaction.sender?.vcard.fn}} </mat-cell>
</ng-container>
<ng-container matColumnDef="recipient">
<mat-header-cell *matHeaderCellDef mat-sort-header> Recipient </mat-header-cell>
<mat-cell *matCellDef="let transaction"> {{transaction.recipient?.vcard.fn}} </mat-cell>
</ng-container>
<ng-container matColumnDef="token">
<mat-header-cell *matHeaderCellDef mat-sort-header> Token </mat-header-cell>
<mat-cell *matCellDef="let transaction"> {{transaction.token.name}} </mat-cell>
</ng-container>
<ng-container matColumnDef="value">
<mat-header-cell *matHeaderCellDef mat-sort-header> Value </mat-header-cell>
<mat-cell *matCellDef="let transaction"> {{transaction.token.symbol + ' ' + transaction.value}} </mat-cell>
</ng-container>
<ng-container matColumnDef="view">
<mat-header-cell *matHeaderCellDef> View Transaction </mat-header-cell>
<mat-cell *matCellDef="let transaction">
<button mat-raised-button type="button" class="btn btn-outline-primary" (click)="viewTransaction(transaction)">
<i class="fa fa-eye"> VIEW </i>
</button>
</mat-cell>
</ng-container>
<ng-container matColumnDef="select">
<mat-header-cell *matHeaderCellDef>
<mat-checkbox (change)="$event ? masterToggle() : null"
[checked]="selection.hasValue() && isAllSelected()"
[indeterminate]="selection.hasValue() && !isAllSelected()">
</mat-checkbox>
</mat-header-cell>
<mat-cell *matCellDef="let transaction">
<mat-checkbox (click)="$event.stopPropagation()"
(change)="$event ? selection.toggle(transaction) : null"
[checked]="selection.isSelected(transaction)">
</mat-checkbox>
</mat-cell>
</ng-container>
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
<mat-row *matRowDef="let transaction; columns: displayedColumns"></mat-row>
</mat-table>
<mat-paginator [pageSize]="10" [pageSizeOptions]="[10, 20, 50, 100]" showFirstLastButtons></mat-paginator>
</div>
</div>
</div>
<app-footer appMenuSelection></app-footer>
</div>
<!-- ============================================================== -->
<!-- End Page content -->
<!-- ============================================================== -->
</div>