Share Product and Share Account views updated

This commit is contained in:
Jose Alberto Hernandez
2024-05-19 00:22:51 -06:00
committed by Jose Alberto Hernandez
parent fafdd0dd20
commit a41df49a3e
83 changed files with 1017 additions and 544 deletions
@@ -1,4 +1,4 @@
<mat-card class="shares-account-card">
<mat-card class="account-card">
<mat-card-header fxLayout="column" class="header">
@@ -6,119 +6,110 @@
<div class="profile-image-container">
<div>
<img mat-card-md-image class="profile-image"
matTooltip="{{ 'tooltips.Shares Account' | translate}}"
<img mat-card-md-image class="profile-image" matTooltip="{{ 'tooltips.Shares Account' | translate}}"
src="assets/images/shares_account_placeholder.png">
</div>
</div>
<div class="mat-typography account-card-title">
<mat-card-title>
<h3>
<i class="fa fa-stop" [ngClass]="sharesAccountData.status.code | statusLookup" [matTooltip]="sharesAccountData.status.value"></i>
{{'labels.heading.Account Name' | translate}} : {{sharesAccountData.productName}}
</h3>
<div fxLayout="row" fxLayout.lt-md="column">
<div fxFlex="60%">
<h3>
<i class="fa fa-stop" [ngClass]="sharesAccountData.status.code | statusLookup"
[matTooltip]="sharesAccountData.status.value"></i>
<span class="m-r-5">{{'labels.inputs.Share Product' | translate}} :</span>
<span class="m-r-5"><mifosx-long-text
textValue="{{sharesAccountData.productName}}"></mifosx-long-text></span>
<mifosx-account-number accountNo="{{sharesAccountData.accountNo}}"
display="left"></mifosx-account-number>
</h3>
<span class="shares-overview">
<span class="m-r-10">{{'labels.text.' + entityType | translate}} {{"labels.inputs.name" | translate}}
:</span>{{sharesAccountData.clientName || sharesAccountData.groupName}}
<span class="m-l-10" *ngIf="sharesAccountData.clientAccountNo">
<mifosx-account-number accountNo="{{sharesAccountData.clientAccountNo}}"></mifosx-account-number>
</span>
</span>
<div>
<table class="account-overview">
<tbody>
<tr>
<td>{{"labels.inputs.Current Market Price" | translate}} :</td>
<td>{{sharesAccountData.currentMarketPrice | formatNumber}}</td>
</tr>
<tr *ngIf="sharesAccountData.lockinPeriod">
<td>{{"labels.inputs.Lockin Period" | translate}} :</td>
<td>
{{sharesAccountData.lockinPeriod}} {{sharesAccountData.lockPeriodTypeEnum.value | translateCatalog}}
</td>
</tr>
</tbody>
</table>
</div>
</div>
<span fxFlex="auto"></span>
<div fxFlex="4%">
<button mat-icon-button [matMenuTriggerFor]="accountMenu" aria-label="Share account actions"
yPosition="below" *ngIf="buttonConfig.singleButtons.length > 0">
<mat-icon matListIcon class="actions-menu">
<fa-icon icon="bars" size="sm"></fa-icon>
</mat-icon>
</button>
</div>
</div>
</mat-card-title>
<mat-card-subtitle>
<p>
{{'labels.inputs.Account' | translate}} #: {{sharesAccountData.accountNo}} | {{'labels.inputs.Client Name' | translate}}: {{sharesAccountData.clientName}}<br/>
{{'labels.inputs.Current Market Price' | translate}}: {{sharesAccountData.currency.displaySymbol}}&nbsp;{{sharesAccountData.currentMarketPrice}}<br/>
{{'labels.inputs.Lockin Period' | translate}}: {{sharesAccountData.lockinPeriod ? sharesAccountData.lockinPeriod : 'N/A'}}
{{sharesAccountData.lockinPeriod ? sharesAccountData.lockPeriodTypeEnum.value : ''}}
</p>
</mat-card-subtitle>
</div>
</mat-card-title-group>
<mat-card-actions class="account-actions">
<mat-menu #accountMenu="matMenu">
<ng-container *ngFor="let button of buttonConfig.singleButtons">
<button mat-raised-button *mifosxHasPermission="button.taskPermissionName" (click)="doAction(button.name)">
<i class="{{button.icon}}"></i> {{button.name}}</button>
<ng-container *ngFor="let item of buttonConfig.singleButtons">
<button mat-menu-item *mifosxHasPermission="item.taskPermissionName" (click)="doAction(item.name)">
<mat-icon matListIcon>
<fa-icon icon="{{item.icon}}" size="sm"></fa-icon>
</mat-icon>
<span>{{'labels.menus.' + item.name | translate}}</span>
</button>
</ng-container>
<ng-container *ngIf="buttonConfig.options.length">
<button mat-raised-button [matMenuTriggerFor]="More">{{'labels.heading.More' | translate}}</button>
<button mat-menu-item [matMenuTriggerFor]="More">{{'labels.menus.More' | translate}}</button>
<mat-menu #More="matMenu">
<span *ngFor="let option of buttonConfig.options">
<button mat-menu-item *mifosxHasPermission="option.taskPermissionName" (click)="doAction(option.name)">{{option.name}}</button>
</span>
<span *ngFor="let option of buttonConfig.options">
<button mat-menu-item *mifosxHasPermission="option.taskPermissionName"
(click)="doAction(option.name)">{{'labels.menus.' + option.name | translate}}</button>
</span>
</mat-menu>
</ng-container>
</mat-card-actions>
</mat-menu>
</mat-card-header>
<mat-card-content class="content">
<div class="shares-account-tables" fxLayout="row" fxLayoutGap="2%">
<div fxFlex="49%">
<h4 class="table-headers">{{'labels.heading.Shares Details' | translate}}</h4>
<table>
<tbody>
<tr>
<td>{{'labels.inputs.Activated On' | translate}}</td>
<td>{{sharesAccountData.timeline.activatedOnDate ? (sharesAccountData.timeline.activatedOnDate | dateFormat) : 'Not Activated'}}</td>
</tr>
<tr>
<td>{{'labels.inputs.Currency' | translate}}</td>
<td>{{sharesAccountData.currency.name}} [{{sharesAccountData.currency.code}}]</td>
</tr>
<tr>
<td>{{'labels.inputs.External Id' | translate}}</td>
<td *ngIf="sharesAccountData.externalId">
<mifosx-external-identifier externalId="{{sharesAccountData.externalId}}"></mifosx-external-identifier>
</td>
<td *ngIf="!sharesAccountData.externalId">
{{'labels.inputs.Unassigned' | translate}}
</td>
</tr>
<tr>
<td>{{'labels.inputs.Linked Savings Account(Dividend Posting)' | translate}}</td>
<td *ngIf="sharesAccountData.savingsAccountNumber">
<mifosx-account-number accountNo="{{sharesAccountData.savingsAccountNumber}}"></mifosx-account-number>
</td>
<td *ngIf="!sharesAccountData.savingsAccountNumber">
{{'labels.inputs.Unassigned' | translate}}
</td>
</tr>
</tbody>
</table>
</div>
<div fxFlex="49%">
<h4 class="table-headers">{{'labels.heading.Account Summary' | translate}}</h4>
<table>
<tbody>
<tr>
<td>{{'labels.inputs.Approved Shares' | translate}}</td>
<td>{{sharesAccountData.summary.totalApprovedShares}}</td>
</tr>
<tr>
<td>{{'labels.inputs.Pending for Approval Shares' | translate}}</td>
<td>{{sharesAccountData.summary.totalPendingForApprovalShares}}</td>
</tr>
</tbody>
</table>
</div>
</div>
<nav mat-tab-nav-bar class="navigation-tabs">
<a mat-tab-link [routerLink]="['./general']" routerLinkActive #general="routerLinkActive"
[active]="general.isActive" *mifosxHasPermission="'READ_SHAREACCOUNTPURCHASE'">
{{'labels.inputs.General' | translate}}
</a>
<a mat-tab-link [routerLink]="['./transactions']" routerLinkActive #transactions="routerLinkActive"
[active]="transactions.isActive" *mifosxHasPermission="'READ_SHAREACCOUNTPURCHASE'">
{{'labels.inputs.Transactions' | translate}}
[active]="transactions.isActive" *mifosxHasPermission="'READ_SHAREACCOUNTPURCHASE'">
{{'labels.inputs.Transactions' | translate}}
</a>
<a mat-tab-link [routerLink]="['./charges']" routerLinkActive #charges="routerLinkActive"
[active]="charges.isActive" *mifosxHasPermission="'READ_SHAREACCOUNTCHARGE'">
{{'labels.inputs.Charges' | translate}}
[active]="charges.isActive" *mifosxHasPermission="'READ_SHAREACCOUNTCHARGE'">
{{'labels.inputs.Charges' | translate}}
</a>
<a mat-tab-link [routerLink]="['./dividends']" routerLinkActive #dividends="routerLinkActive"
[active]="dividends.isActive" *mifosxHasPermission="'READ_SHAREACCOUNTDIVIDENDS'">
{{'labels.inputs.Dividends' | translate}}
[active]="dividends.isActive" *mifosxHasPermission="'READ_SHAREACCOUNTDIVIDENDS'">
{{'labels.inputs.Dividends' | translate}}
</a>
</nav>
@@ -126,4 +117,4 @@
</mat-card-content>
</mat-card>
</mat-card>