Files
cbsnexora/src/app/accounting/financial-activity-mappings/financial-activity-mappings.component.html
T

102 lines
4.2 KiB
HTML

<!--
Copyright since 2025 Mifos Initiative
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<div class="layout-row align-end container m-b-20">
<div #buttonDefineMapping>
<button
mat-raised-button
color="primary"
[routerLink]="['create']"
*mifosxHasPermission="'CREATE_FINANCIALACTIVITYACCOUNT'"
>
<fa-icon icon="plus" class="m-r-10"></fa-icon>
{{ 'labels.buttons.Define New Mapping' | translate }}
</button>
</div>
</div>
<div #activitiesTable class="mat-elevation-z8 container">
<table mat-table [dataSource]="dataSource" matSort>
<ng-container matColumnDef="financialActivity">
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Financial Activity' | translate }}</th>
<td mat-cell *matCellDef="let financialActivityAccount">
({{ financialActivityAccount.financialActivityData.id }})
{{ 'labels.accounting.financialActivity.' + financialActivityAccount.financialActivityData.name | translate }}
</td>
</ng-container>
<ng-container matColumnDef="glAccountType">
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Account Type' | translate }}</th>
<td mat-cell *matCellDef="let financialActivityAccount">
{{
'labels.inputs.accounting.' + financialActivityAccount.financialActivityData.mappedGLAccountType | translate
}}
</td>
</ng-container>
<ng-container matColumnDef="glAccountCode">
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Account Code' | translate }}</th>
<td mat-cell *matCellDef="let financialActivityAccount">{{ financialActivityAccount.glAccountData.glCode }}</td>
</ng-container>
<ng-container matColumnDef="glAccountName">
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Account Name' | translate }}</th>
<td mat-cell *matCellDef="let financialActivityAccount">{{ financialActivityAccount.glAccountData.name }}</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns" [routerLink]="['view', row.id]" class="select-row"></tr>
</table>
<mat-paginator [pageSizeOptions]="[10, 25]" showFirstLastButtons></mat-paginator>
</div>
<ng-template #templateButtonDefineMapping let-popover="popover">
<h2>{{ 'labels.heading.Define New Mapping' | translate }}</h2>
<p class="mw300">{{ 'labels.text.To define new mapping.' | translate }}</p>
<div class="layout-row align-end gap-2px responsive-column">
<button mat-raised-button color="warn" (click)="popover.close(); configurationWizardService.closeConfigWizard()">
{{ 'labels.buttons.Close' | translate }}
</button>
<button mat-raised-button color="primary" (click)="popover.close(); previousStep()">
{{ 'labels.buttons.Back' | translate }}
</button>
<button
mat-raised-button
color="primary"
(click)="popover.close(); showPopover(templateActivitiesTable, activitiesTable, 'top', true)"
>
{{ 'labels.buttons.Next' | translate }}
</button>
</div>
</ng-template>
<ng-template #templateActivitiesTable let-popover="popover">
<h4 class="mw300">
{{ 'labels.heading.Account Linked Financial' | translate }}
<a [href]="'financialActivityMappings' | documentationLink" target="_blank" rel="noopener noreferrer">{{
'labels.heading.Accounts linked to Financial Activities' | translate
}}</a>
</h4>
<div class="layout-row align-end gap-2px responsive-column">
<button mat-raised-button color="warn" (click)="popover.close(); configurationWizardService.closeConfigWizard()">
{{ 'labels.buttons.Close' | translate }}
</button>
<button
mat-raised-button
color="primary"
(click)="popover.close(); showPopover(templateButtonDefineMapping, buttonDefineMapping, 'bottom', true)"
>
{{ 'labels.buttons.Back' | translate }}
</button>
<button mat-raised-button color="primary" (click)="popover.close(); nextStep()">
{{ 'labels.buttons.Next' | translate }}
</button>
</div>
</ng-template>