blob: b9d258595435c9ad89497dc41dea061ba2c0158a [file] [log] [blame]
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<fims-layout-card-over [title]="definition.name" [subTitle]="definition.description" [navigateBackTo]="['../../../']">
<fims-layout-card-over-header-menu>
<button mat-icon-button (click)="deleteProduct()" title="{{'Delete this product' | translate}}" *hasPermission="{ id: 'deposit_definitions', accessLevel: 'DELETE'}"><mat-icon>delete</mat-icon></button>
</fims-layout-card-over-header-menu>
<td-message *ngIf="!definition.active" label="{{'Product not enabled' | translate }}"
sublabel="{{'To assign this product to a member it needs to be enabled first' | translate }}"
color="warn" icon="error">
<button td-message-actions mat-button (click)="enableProduct()" *hasPermission="{ id: 'deposit_definitions', accessLevel: 'CHANGE'}" translate>ENABLE PRODUCT</button>
</td-message>
<td-message *ngIf="definition.active" label="{{'Product enabled' | translate }}"
sublabel="{{'This product can be assigned to a member ' | translate }}" color="accent" icon="check">
<button td-message-actions mat-button (click)="disableProduct()" *hasPermission="{ id: 'deposit_definitions', accessLevel: 'CHANGE'}" translate>DISABLE PRODUCT</button>
</td-message>
<fims-two-column-layout>
<mat-nav-list left *ngIf="canDistributeDividends$ | async">
<h3 mat-subheader translate>Management</h3>
<a mat-list-item [routerLink]="['./dividends']">
<mat-icon matListAvatar>zoom_out_map</mat-icon>
<h3 matLine translate>Dividends</h3>
<p matLine translate>View and distribute dividends</p>
</a>
</mat-nav-list>
<ng-container right>
<div layout="row">
<mat-list dense>
<mat-list-item>
<h3 matLine translate>Type</h3>
<p matLine>{{definition.type}}</p>
</mat-list-item>
<mat-list-item *ngIf="hasTerm(definition)">
<h3 matLine translate>Term</h3>
<p matLine>{{definition.term?.period + ' ' + definition.term?.timeUnit}}</p>
</mat-list-item>
<mat-list-item>
<h3 matLine translate>Interest payable</h3>
<p matLine>{{definition.term?.interestPayable}}</p>
</mat-list-item>
<mat-list-item>
<h3 matLine translate>Minimum balance</h3>
<p matLine>{{definition.minimumBalance | number:numberFormat}}</p>
</mat-list-item>
<mat-list-item>
<h3 matLine translate>Interest</h3>
<p matLine>{{definition.interest | number:numberFormat}}</p>
</mat-list-item>
<mat-list-item>
<h3 matLine translate>Currency</h3>
<p matLine>{{definition.currency.code}}</p>
</mat-list-item>
<mat-list-item>
<h3 matLine translate>Cash account</h3>
<p matLine>{{definition.cashAccountIdentifier}}</p>
</mat-list-item>
<mat-list-item>
<h3 matLine translate>Expense account</h3>
<p matLine>{{definition.expenseAccountIdentifier}}</p>
</mat-list-item>
<mat-list-item *ngIf="definition.accrueAccountIdentifier">
<h3 matLine translate>Accrue account</h3>
<p matLine>{{definition.accrueAccountIdentifier}}</p>
</mat-list-item>
<mat-list-item>
<h3 matLine translate>Equity ledger</h3>
<p matLine>{{definition.equityLedgerIdentifier}}</p>
</mat-list-item>
</mat-list>
</div>
<div layout="column">
<h4>Fees</h4>
<fims-data-table flex [data]="charges" [columns]="columns" [actionColumn]="false"></fims-data-table>
</div>
</ng-container>
</fims-two-column-layout>
</fims-layout-card-over>
<fims-fab-button title="{{'Edit product' | translate}}" icon="mode_edit" [link]="['edit']" [permission]="{ id: 'deposit_definitions', accessLevel: 'CHANGE'}"></fims-fab-button>