fix: multiple bugs in home/core/institution modules (#1225)

Fixes: #1224
This commit is contained in:
Karan Takalkar
2020-08-25 02:16:25 +05:30
committed by GitHub
parent 2f654ef664
commit f215e1aa96
32 changed files with 80 additions and 69 deletions
+2
View File
@@ -34,6 +34,7 @@ import { OrganizationModule } from './organization/organization.module';
import { TemplatesModule } from './templates/templates.module';
import { UsersModule } from './users/users.module';
import { ReportsModule } from './reports/reports.module';
import { SearchModule } from './search/search.module';
import { NotificationsModule } from './notifications/notifications.module';
import { CollectionsModule } from './collections/collections.module';
import { ProfileModule } from './profile/profile.module';
@@ -73,6 +74,7 @@ import { AppRoutingModule } from './app-routing.module';
TemplatesModule,
UsersModule,
NotificationsModule,
SearchModule,
CollectionsModule,
TasksModule,
AppRoutingModule,
@@ -107,6 +107,10 @@ const routes: Routes = [
centersActionData: CenterActionsResolver
}
},
{
path: 'savingsaccounts',
loadChildren: () => import('../savings/savings.module').then(m => m.SavingsModule)
}
]
}
]
@@ -4,7 +4,7 @@
<div class="profile-image-container">
<div>
<img mat-card-md-image class="profile-image"
src='../../../assets/images/center_placeholder.png'>
src='assets/images/center_placeholder.png'>
</div>
</div>
<div class="mat-typography center-card-title">
@@ -46,7 +46,7 @@
</ng-container>
<tr mat-header-row *matHeaderRowDef="groupsColumns"></tr>
<tr mat-row *matRowDef="let row; columns: groupsColumns;"></tr>
<tr mat-row *matRowDef="let row; columns: groupsColumns;" [routerLink]="['/groups', row.id, 'general']"></tr>
</table>
</ng-container>
@@ -129,7 +129,7 @@
</ng-container>
<tr mat-header-row *matHeaderRowDef="savingsAccountColumns"></tr>
<tr mat-row *matRowDef="let row; columns: savingsAccountColumns;"></tr>
<tr mat-row *matRowDef="let row; columns: savingsAccountColumns;" [routerLink]="['../', 'savingsaccounts', row.id, 'transactions']"></tr>
</table>
</ng-container>
@@ -314,7 +314,7 @@
</ng-container>
<tr mat-header-row *matHeaderRowDef="closedSavingsColumns"></tr>
<tr mat-row *matRowDef="let row; columns: closedSavingsColumns;"></tr>
<tr mat-row *matRowDef="let row; columns: closedSavingsColumns;" [routerLink]="['../', 'savingsaccounts', row.id, 'transactions']"></tr>
</table>
@@ -597,7 +597,7 @@
</ng-container>
<tr mat-header-row *matHeaderRowDef="closedSharesColumns"></tr>
<tr mat-row *matRowDef="let row; columns: closedSharesColumns;"></tr>
<tr mat-row *matRowDef="let row; columns: closedSharesColumns;" [routerLink]="['../', 'shares-accounts', row.id, 'transactions']"></tr>
</table>
@@ -6,10 +6,11 @@ import { FormGroup, FormBuilder, Validators } from '@angular/forms';
/** Custom Components */
import { DeleteDialogComponent } from '../../../shared/delete-dialog/delete-dialog.component';
import { EditNotesDialogComponent } from '../custom-dialogs/edit-notes-dialog/edit-notes-dialog.component';
/** Custom Services */
import { ClientsService } from '../../clients.service';
import { EditNotesDialogComponent } from '../custom-dialogs/edit-notes-dialog/edit-notes-dialog.component';
import { AuthenticationService } from 'app/core/authentication/authentication.service';
/**
* Notes Tab Component
@@ -37,13 +38,16 @@ export class NotesTabComponent implements OnInit {
* @param {ActivatedRoute} route Activated Route
* @param {FormBuilder} formBuilder Form Builder
* @param {ClientsService} clientsService Clients Service
* @param {AuthenticationService} authenticationService Authentication Service
* @param {MatDialog} dialog Mat Dialog
*/
constructor(private route: ActivatedRoute,
private formBuilder: FormBuilder,
private clientsService: ClientsService,
private authenticationService: AuthenticationService,
public dialog: MatDialog) {
this.username = JSON.parse(sessionStorage.getItem('mifosXCredentials')).username;
const credentials = this.authenticationService.getCredentials();
this.username = credentials.username;
this.clientId = this.route.parent.snapshot.params['clientId'];
this.route.data.subscribe((data: { clientNotes: any }) => {
this.clientNotes = data.clientNotes;
-2
View File
@@ -46,8 +46,6 @@ import { ContentComponent } from './shell/content/content.component';
@NgModule({
imports: [
SharedModule,
SearchModule,
NotificationsModule,
HttpClientModule,
TranslateModule,
RouterModule
@@ -32,14 +32,13 @@
<div class="app-sidenav">
<!-- TODO: Generate frequently accessed routes dynamically -->
<div class="mt-1 mb-1 nav-item-sep">
<mat-divider></mat-divider>
<span class="text-muted icon-menu-title">Frequently Accessed</span>
</div>
<div class="icon-menu">
<div class="icon-menu-item" *ngFor="let activity of mappedActivities">
<button mat-flat-button [matTooltip]="activity.toolTip" [routerLink]="[activity.path]">
<button mat-raised-button [matTooltip]="activity.toolTip" [routerLink]="[activity.path]">
<fa-icon [icon]="activity.icon" size="lg"></fa-icon>
</button>
</div>
@@ -99,6 +98,12 @@
</mat-icon>
<a matLine>Chart of Accounts</a>
</mat-list-item>
<mat-list-item (click)="showKeyboardShortcuts()">
<mat-icon matListIcon>
<fa-icon icon="keyboard" size="sm"></fa-icon>
</mat-icon>
<a matLine>Keyboard Shortcuts</a>
</mat-list-item>
<mat-list-item>
<mat-icon matListIcon (click)="help()">
<fa-icon icon="question-circle" size="sm"></fa-icon>
@@ -1,7 +1,11 @@
/** Angular Imports */
import { Component, OnInit, Input } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { Router } from '@angular/router';
/** Custom Components */
import { KeyboardShortcutsDialogComponent } from 'app/shared/keyboard-shortcuts-dialog/keyboard-shortcuts-dialog.component';
/** Custom Services */
import { AuthenticationService } from '../../authentication/authentication.service';
@@ -32,9 +36,11 @@ export class SidenavComponent implements OnInit {
/**
* @param {Router} router Router for navigation.
* @param {MatDialog} dialog Mat Dialog
* @param {AuthenticationService} authenticationService Authentication Service.
*/
constructor(private router: Router,
public dialog: MatDialog,
private authenticationService: AuthenticationService) {
this.userActivity = JSON.parse(localStorage.getItem('mifosXLocation'));
}
@@ -63,6 +69,14 @@ export class SidenavComponent implements OnInit {
window.open('https://mifosforge.jira.com/wiki/spaces/docs/pages/52035622/User+Manual', '_blank');
}
/**
* Opens Keyboard shortcuts dialog.
*/
showKeyboardShortcuts() {
const dialogRef = this.dialog.open(KeyboardShortcutsDialogComponent);
dialogRef.afterClosed().subscribe((response: any) => {});
}
/**
* Returns top three frequent activities.
*/
@@ -49,10 +49,6 @@
<mifosx-notifications-tray fxHide.lt-md></mifosx-notifications-tray>
<button mat-icon-button class="ml-1 img-button" matTooltip="Keyboard Shortcuts" (click)="showKeyboardShortcuts()">
<img src="assets/images/keyboard_placeholder.png">
</button>
<button mat-icon-button class="ml-1 img-button" [matMenuTriggerFor]="applicationMenu">
<img src="assets/images/user_placeholder.png">
</button>
@@ -11,7 +11,6 @@ import { map } from 'rxjs/operators';
/** Custom Services */
import { AuthenticationService } from '../../authentication/authentication.service';
import { KeyboardShortcutsDialogComponent } from 'app/shared/keyboard-shortcuts-dialog/keyboard-shortcuts-dialog.component';
/**
* Toolbar component.
@@ -88,12 +87,4 @@ export class ToolbarComponent implements OnInit {
window.open('https://mifosforge.jira.com/wiki/spaces/docs/pages/52035622/User+Manual', '_blank');
}
/**
* Opens Keyboard shortcuts dialog.
*/
showKeyboardShortcuts() {
const dialogRef = this.dialog.open(KeyboardShortcutsDialogComponent);
dialogRef.afterClosed().subscribe((response: any) => {});
}
}
+6 -1
View File
@@ -133,10 +133,15 @@ const routes: Routes = [
groupActionData: GroupActionsResolver
}
},
{
path: 'loans',
data: { title: extract('Loans'), breadcrumb: 'loans', routeParamBreadcrumb: false },
loadChildren: () => import('../loans/loans.module').then(m => m.LoansModule)
},
{
path: 'savingsaccounts',
loadChildren: () => import('../savings/savings.module').then(m => m.SavingsModule)
},
}
]
}
]
@@ -136,7 +136,7 @@
</ng-container>
<tr mat-header-row *matHeaderRowDef="openLoansColumns"></tr>
<tr mat-row *matRowDef="let row; columns: openLoansColumns;"></tr>
<tr mat-row *matRowDef="let row; columns: openLoansColumns;" [routerLink]="['../', 'loans', row.id, 'general']"></tr>
</table>
@@ -187,7 +187,7 @@
</ng-container>
<tr mat-header-row *matHeaderRowDef="closedLoansColumns"></tr>
<tr mat-row *matRowDef="let row; columns: closedLoansColumns;"></tr>
<tr mat-row *matRowDef="let row; columns: closedLoansColumns;" [routerLink]="['../', 'loans', row.id, 'general']"></tr>
</table>
@@ -280,7 +280,7 @@
</ng-container>
<tr mat-header-row *matHeaderRowDef="closedSavingsColumns"></tr>
<tr mat-row *matRowDef="let row; columns: closedSavingsColumns;"></tr>
<tr mat-row *matRowDef="let row; columns: closedSavingsColumns;" [routerLink]="['../', 'savingsaccounts', row.id, 'transactions']"></tr>
</table>
+9 -18
View File
@@ -37,21 +37,21 @@ export class KeyboardShortcutsConfiguration {
id: 'runReport'
},
// Checker Inbox & Pending Tasks - ctrl + alt + i
// {
// title: 'Checker Inbox & Pending Tasks',
// ctrlKey: true,
// shiftKey: false,
// altKey: true,
// key: 'i,
// route: ''
// },
{
title: 'Checker Inbox & Pending Tasks',
ctrlKey: true,
shiftKey: false,
altKey: true,
key: 'i',
route: 'checker-inbox-and-tasks/checker-inbox'
},
// Collection Sheet- ctrl + alt + o
// {
// title: 'Collection Sheet',
// ctrlKey: true,
// shiftKey: false,
// altKey: true,
// key: 'o,
// key: 'o',
// route: ''
// },
// Create Client - ctrl + alt + c
@@ -146,15 +146,6 @@ export class KeyboardShortcutsConfiguration {
route: '',
id: 'cancel'
},
// Search - alt + x
// {
// title: 'Search'
// ctrlKey: true,
// shiftKey: false,
// altKey: true,
// key: 88,
// route: ''
// },
// Help - ctrl + alt + h
{
title: 'Help',
@@ -6,8 +6,8 @@
<div class="profile-image-container">
<div>
<img mat-card-md-image class="profile-image" matTooltip="Recurring Deposits Account"
[src]="'assets/images/loans.png'">
<img mat-card-md-image class="profile-image" matTooltip="Loans Account"
[src]="'assets/images/loans_account_placeholder.png'">
</div>
</div>
@@ -8,23 +8,18 @@ import { NotificationsRoutingModule } from './notifications-routing.module';
/** Custom Components */
import { NotificationsPageComponent } from './notifications-page/notifications-page.component';
import { NotificationsTrayComponent } from './notifications-tray/notifications-tray.component';
/**
* Notifications Module
*/
@NgModule({
declarations: [
NotificationsPageComponent,
NotificationsTrayComponent
NotificationsPageComponent
],
imports: [
SharedModule,
PipesModule,
NotificationsRoutingModule
],
exports: [
NotificationsTrayComponent
]
})
export class NotificationsModule { }
+4
View File
@@ -12,6 +12,10 @@ export class UrlToStringPipe implements PipeTransform {
transform(url: string): any {
url = decodeURIComponent(url);
if (url.includes('search?query')) {
const query = url.substring(url.indexOf('=') + 1, url.indexOf('&'));
return 'Search ' + query;
}
const urlSubstrings: string[] = url.slice(1).split('/');
const stringRepresentation =
urlSubstrings
+1 -5
View File
@@ -6,20 +6,16 @@ import { SharedModule } from '../shared/shared.module';
import { SearchRoutingModule } from './search-routing.module';
/** Custom Components */
import { SearchToolComponent } from './search-tool/search-tool.component';
import { SearchPageComponent } from './search-page/search-page.component';
/**
* Search Module
*/
@NgModule({
declarations: [SearchToolComponent, SearchPageComponent],
declarations: [SearchPageComponent],
imports: [
SharedModule,
SearchRoutingModule
],
exports: [
SearchToolComponent
]
})
export class SearchModule { }
+4 -2
View File
@@ -95,7 +95,8 @@ import {
faArrowDown,
faFolderOpen,
faIdBadge,
faAddressCard
faAddressCard,
faKeyboard
} from '@fortawesome/free-solid-svg-icons';
/**
@@ -201,7 +202,8 @@ export class IconsModule {
faArrowDown,
faFolderOpen,
faIdBadge,
faAddressCard
faAddressCard,
faKeyboard
);
}
@@ -18,6 +18,4 @@
<span class="time">[{{ notification.createdAt }}]</span>
</button>
<button mat-menu-item class="view-all" [routerLink]="['/notifications']">View All Notifications</button>
</mat-menu>
@@ -10,10 +10,10 @@
[mat-menu-item] {
height: 5rem;
line-height: 2.2rem;
.time{
.time {
font-size: small;
}
&.unread, &.view-all {
&.unread {
background-color: #E0F7FF !important;
}
}
@@ -5,7 +5,7 @@ import { Component, OnInit, OnDestroy, ViewEncapsulation } from '@angular/core';
import { forkJoin } from 'rxjs';
/** Custom Services */
import { NotificationsService } from '../notifications.service';
import { NotificationsService } from 'app/notifications/notifications.service';
/**
* Notifications Tray Component
+9 -3
View File
@@ -16,12 +16,14 @@ import { ChangePasswordDialogComponent } from './change-password-dialog/change-p
import { EnableDialogComponent } from './enable-dialog/enable-dialog.component';
import { DisableDialogComponent } from './disable-dialog/disable-dialog.component';
import { ConfirmationDialogComponent } from './confirmation-dialog/confirmation-dialog.component';
import { ErrorDialogComponent } from './error-dialog/error-dialog.component';
import { NotificationsTrayComponent } from './notifications-tray/notifications-tray.component';
import { SearchToolComponent } from './search-tool/search-tool.component';
import { KeyboardShortcutsDialogComponent } from './keyboard-shortcuts-dialog/keyboard-shortcuts-dialog.component';
/** Custom Modules */
import { IconsModule } from './icons.module';
import { MaterialModule } from './material.module';
import { ErrorDialogComponent } from './error-dialog/error-dialog.component';
/**
* Shared Module
@@ -49,19 +51,23 @@ import { ErrorDialogComponent } from './error-dialog/error-dialog.component';
DisableDialogComponent,
ConfirmationDialogComponent,
KeyboardShortcutsDialogComponent,
ErrorDialogComponent
ErrorDialogComponent,
NotificationsTrayComponent,
SearchToolComponent
],
exports: [
FileUploadComponent,
FooterComponent,
LanguageSelectorComponent,
ThemePickerComponent,
NotificationsTrayComponent,
SearchToolComponent,
ErrorDialogComponent,
CommonModule,
IconsModule,
MaterialModule,
FormsModule,
ReactiveFormsModule,
ErrorDialogComponent
]
})
export class SharedModule { }
Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB