Enhancement for accounting view in back button (#1618)
Co-authored-by: Jose Alberto Hernandez <alberto@MacBook-Pro.local>
This commit is contained in:
co-authored by
Jose Alberto Hernandez
parent
da5d1371e6
commit
9d19d1b061
@@ -265,7 +265,7 @@ const routes: Routes = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'accounting-rules',
|
path: 'accounting-rules',
|
||||||
data: { title: extract('Accounting Rules'), breadcrumb: 'Rules' },
|
data: { title: extract('Accounting Rules'), breadcrumb: 'Accounting Rules' },
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
|
|||||||
@@ -106,7 +106,7 @@
|
|||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
|
|
||||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||||
<button type="button" mat-raised-button [routerLink]="['../']">Cancel</button>
|
<button type="button" mat-raised-button [routerLink]="['../../']">Cancel</button>
|
||||||
<button mat-raised-button color="primary" [disabled]="!accountingRuleForm.valid" *mifosxHasPermission="'CREATE_ACCOUNTINGRULE'">Submit</button>
|
<button mat-raised-button color="primary" [disabled]="!accountingRuleForm.valid" *mifosxHasPermission="'CREATE_ACCOUNTINGRULE'">Submit</button>
|
||||||
</mat-card-actions>
|
</mat-card-actions>
|
||||||
|
|
||||||
|
|||||||
@@ -106,7 +106,7 @@
|
|||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
|
|
||||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||||
<button type="button" mat-raised-button [routerLink]="['../']">Cancel</button>
|
<button type="button" mat-raised-button [routerLink]="['../../']">Cancel</button>
|
||||||
<button mat-raised-button color="primary" [disabled]="accountingRuleForm.pristine || !accountingRuleForm.valid" *mifosxHasPermission="'UPDATE_ACCOUNTINGRULE'">Submit</button>
|
<button mat-raised-button color="primary" [disabled]="accountingRuleForm.pristine || !accountingRuleForm.valid" *mifosxHasPermission="'UPDATE_ACCOUNTINGRULE'">Submit</button>
|
||||||
</mat-card-actions>
|
</mat-card-actions>
|
||||||
|
|
||||||
|
|||||||
@@ -167,7 +167,7 @@
|
|||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
|
|
||||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||||
<button type="button" mat-raised-button [routerLink]="['../']">Cancel</button>
|
<button type="button" mat-raised-button [routerLink]="['../../']">Cancel</button>
|
||||||
<button mat-raised-button color="primary" [disabled]="!journalEntryForm.valid" *mifosxHasPermission="'CREATE_JOURNALENTRY'">Submit</button>
|
<button mat-raised-button color="primary" [disabled]="!journalEntryForm.valid" *mifosxHasPermission="'CREATE_JOURNALENTRY'">Submit</button>
|
||||||
</mat-card-actions>
|
</mat-card-actions>
|
||||||
|
|
||||||
|
|||||||
@@ -181,7 +181,7 @@
|
|||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
|
|
||||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||||
<button type="button" mat-raised-button [routerLink]="['../']">Cancel</button>
|
<button type="button" mat-raised-button [routerLink]="['../../']">Cancel</button>
|
||||||
<button mat-raised-button color="primary" [disabled]="!frequentPostingsForm.valid" *mifosxHasPermission="'CREATE_JOURNALENTRY'">Submit</button>
|
<button mat-raised-button color="primary" [disabled]="!frequentPostingsForm.valid" *mifosxHasPermission="'CREATE_JOURNALENTRY'">Submit</button>
|
||||||
</mat-card-actions>
|
</mat-card-actions>
|
||||||
|
|
||||||
|
|||||||
@@ -118,14 +118,19 @@
|
|||||||
<td mat-cell *matCellDef="let journalEntry"> {{ journalEntry.glAccountName }} </td>
|
<td mat-cell *matCellDef="let journalEntry"> {{ journalEntry.glAccountName }} </td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
|
<ng-container matColumnDef="currency">
|
||||||
|
<th mat-header-cell *matHeaderCellDef mat-sort-header> Currency </th>
|
||||||
|
<td mat-cell *matCellDef="let journalEntry">{{ journalEntry.currency.code }}</td>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="debit">
|
<ng-container matColumnDef="debit">
|
||||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Debit </th>
|
<th mat-header-cell *matHeaderCellDef mat-sort-header> Debit </th>
|
||||||
<td mat-cell *matCellDef="let journalEntry"><span *ngIf="journalEntry.entryType.value === 'DEBIT'"> {{ (journalEntry.currency.displaySymbol || journalEntry.currency.code) + ' ' + journalEntry.amount | number }} </span></td>
|
<td mat-cell *matCellDef="let journalEntry"><span *ngIf="journalEntry.entryType.value === 'DEBIT'"> {{ journalEntry.amount | number }} </span></td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="credit">
|
<ng-container matColumnDef="credit">
|
||||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Credit </th>
|
<th mat-header-cell *matHeaderCellDef mat-sort-header> Credit </th>
|
||||||
<td mat-cell *matCellDef="let journalEntry"><span *ngIf="journalEntry.entryType.value === 'CREDIT'"> {{ (journalEntry.currency.displaySymbol || journalEntry.currency.code) + ' ' + journalEntry.amount | number }} </span></td>
|
<td mat-cell *matCellDef="let journalEntry"><span *ngIf="journalEntry.entryType.value === 'CREDIT'"> {{ journalEntry.amount | number }} </span></td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||||
@@ -133,6 +138,6 @@
|
|||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<mat-paginator [length]="dataSource?.records$ | async" [pageSize]="25" [pageSizeOptions]="[10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
<mat-paginator [length]="dataSource?.records$ | async" [pageSize]="50" [pageSizeOptions]="[10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ export class SearchJournalEntryComponent implements OnInit, AfterViewInit {
|
|||||||
/** Submitted on date to form control. */
|
/** Submitted on date to form control. */
|
||||||
submittedOnDateTo = new FormControl();
|
submittedOnDateTo = new FormControl();
|
||||||
/** Columns to be displayed in journal entries table. */
|
/** Columns to be displayed in journal entries table. */
|
||||||
displayedColumns: string[] = ['id', 'officeName', 'transactionId', 'transactionDate', 'glAccountType', 'createdByUserName', 'submittedOnDate', 'glAccountCode', 'glAccountName', 'debit', 'credit'];
|
displayedColumns: string[] = ['id', 'officeName', 'transactionId', 'transactionDate', 'glAccountType', 'createdByUserName', 'submittedOnDate', 'glAccountCode', 'glAccountName', 'currency', 'debit', 'credit'];
|
||||||
/** Data source for journal entries table. */
|
/** Data source for journal entries table. */
|
||||||
dataSource: JournalEntriesDataSource;
|
dataSource: JournalEntriesDataSource;
|
||||||
/** Journal entries filter. */
|
/** Journal entries filter. */
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ export class ClientsComponent implements OnInit {
|
|||||||
constructor(private searchService: SearchService) { }
|
constructor(private searchService: SearchService) { }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
this.getClients('');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -44,12 +45,16 @@ export class ClientsComponent implements OnInit {
|
|||||||
*/
|
*/
|
||||||
search(value: string) {
|
search(value: string) {
|
||||||
if (value !== '') {
|
if (value !== '') {
|
||||||
this.searchService.getSearchResults(value, 'clients').subscribe((data: any) => {
|
this.getClients(value);
|
||||||
this.dataSource = new MatTableDataSource(data);
|
|
||||||
this.existsClientsToFilter = (data.length > 0);
|
|
||||||
this.notExistsClientsToFilter = !this.existsClientsToFilter;
|
|
||||||
this.moreClientsToFilter = (data.length > 50);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private getClients(value: string) {
|
||||||
|
this.searchService.getSearchResults(value, 'clients').subscribe((data: any) => {
|
||||||
|
this.dataSource = new MatTableDataSource(data);
|
||||||
|
this.existsClientsToFilter = (data.length > 0);
|
||||||
|
this.notExistsClientsToFilter = !this.existsClientsToFilter;
|
||||||
|
this.moreClientsToFilter = (data.length > 50);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -112,7 +112,8 @@
|
|||||||
"texts": {
|
"texts": {
|
||||||
"Welcome": "Welcome",
|
"Welcome": "Welcome",
|
||||||
"Version": "Version",
|
"Version": "Version",
|
||||||
"by": "by"
|
"by": "by",
|
||||||
|
"Login into Tenant": "Login into Tenant"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"errors": {
|
"errors": {
|
||||||
|
|||||||
@@ -112,7 +112,8 @@
|
|||||||
"texts": {
|
"texts": {
|
||||||
"Welcome": "Bienvenido",
|
"Welcome": "Bienvenido",
|
||||||
"Version": "Versión",
|
"Version": "Versión",
|
||||||
"by": "por"
|
"by": "por",
|
||||||
|
"Login into Tenant": "Iniciar sesión en"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"errors": {
|
"errors": {
|
||||||
|
|||||||
Reference in New Issue
Block a user