120 lines
4.6 KiB
HTML
120 lines
4.6 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="container">
|
|
<div class="layout-row-wrap responsive-column gap-2percent">
|
|
<div class="flex-48">
|
|
<mat-card class="layout-column">
|
|
<mat-card-content class="layout-column">
|
|
@if (!(officeData === undefined || officeData === null)) {
|
|
<mat-form-field *mifosxHasPermission="'READ_OFFICES'">
|
|
<mat-label>{{ 'labels.inputs.Office' | translate }}</mat-label>
|
|
<mat-select [formControl]="officeSelector">
|
|
@for (office of officeData; track office) {
|
|
<mat-option [value]="office.id">
|
|
{{ office.name }}
|
|
</mat-option>
|
|
}
|
|
</mat-select>
|
|
</mat-form-field>
|
|
}
|
|
|
|
@if (!(employeeData === undefined || employeeData === null)) {
|
|
<mat-form-field *mifosxHasPermission="'READ_STAFF'">
|
|
<mat-label>{{ employeeData.length ? 'Officer' : 'No Associated Officers' }}</mat-label>
|
|
<mat-select [formControl]="employeeSelector">
|
|
@for (employee of employeeData; track employee) {
|
|
<mat-option [value]="employee.id">
|
|
{{ employee.displayName }}
|
|
</mat-option>
|
|
}
|
|
</mat-select>
|
|
</mat-form-field>
|
|
}
|
|
|
|
@if (!(centerData === undefined || centerData === null)) {
|
|
<mat-form-field *mifosxHasPermission="'READ_CENTERS'">
|
|
<mat-label>{{ centerData.length ? 'Center' : 'No Associated Centers' }}</mat-label>
|
|
<mat-select [formControl]="centerSelector">
|
|
@for (center of centerData; track center) {
|
|
<mat-option [value]="center.id">
|
|
{{ center.name }}
|
|
</mat-option>
|
|
}
|
|
</mat-select>
|
|
</mat-form-field>
|
|
}
|
|
|
|
@if (!(groupData === undefined || groupData === null)) {
|
|
<mat-form-field *mifosxHasPermission="'READ_GROUPS'">
|
|
<mat-label>{{ groupData.length ? 'Group' : 'No Associated Groups' }}</mat-label>
|
|
<mat-select [formControl]="groupSelector">
|
|
@for (group of groupData; track group) {
|
|
<mat-option [value]="group.id">
|
|
{{ group.name }}
|
|
</mat-option>
|
|
}
|
|
</mat-select>
|
|
</mat-form-field>
|
|
}
|
|
|
|
@if (!(clientData === undefined || clientData === null)) {
|
|
<mat-form-field *mifosxHasPermission="'READ_CLIENTS'">
|
|
<mat-label>{{ clientData.length ? 'Client' : 'No Associated Clients' }}</mat-label>
|
|
<mat-select [formControl]="clientSelector">
|
|
@for (client of clientData; track client) {
|
|
<mat-option [value]="client.id">
|
|
{{ client.displayName }}
|
|
</mat-option>
|
|
}
|
|
</mat-select>
|
|
</mat-form-field>
|
|
}
|
|
</mat-card-content>
|
|
</mat-card>
|
|
</div>
|
|
|
|
<div class="flex-48">
|
|
@if (selectedItem) {
|
|
<mat-card class="layout-column">
|
|
@if (selectedItem.itemType === 'office') {
|
|
<mifosx-office-navigation
|
|
[officeData]="selectedItem"
|
|
[employeeData]="employeeData"
|
|
></mifosx-office-navigation>
|
|
}
|
|
@if (selectedItem.itemType === 'employee') {
|
|
<mifosx-staff-navigation [employeeData]="selectedItem" [centerData]="centerData"></mifosx-staff-navigation>
|
|
}
|
|
@if (selectedItem.itemType === 'center') {
|
|
<mifosx-center-navigation
|
|
[centerData]="selectedItem"
|
|
[groupData]="groupData"
|
|
[centerAccountsData]="selectedItemAccounts"
|
|
[centerSummaryData]="selectedItemSummary"
|
|
></mifosx-center-navigation>
|
|
}
|
|
@if (selectedItem.itemType === 'group') {
|
|
<mifosx-group-navigation
|
|
[groupData]="selectedItem"
|
|
[clientData]="clientData"
|
|
[groupAccountsData]="selectedItemAccounts"
|
|
></mifosx-group-navigation>
|
|
}
|
|
@if (selectedItem.itemType === 'client') {
|
|
<mifosx-client-navigation
|
|
[clientData]="selectedItem"
|
|
[clientAccountsData]="selectedItemAccounts"
|
|
></mifosx-client-navigation>
|
|
}
|
|
</mat-card>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|