diff --git a/src/app/app.module.ts b/src/app/app.module.ts index f34c2826d..b40720476 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -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, diff --git a/src/app/centers/centers-routing.module.ts b/src/app/centers/centers-routing.module.ts index 234cee2b3..5b4a91e21 100644 --- a/src/app/centers/centers-routing.module.ts +++ b/src/app/centers/centers-routing.module.ts @@ -107,6 +107,10 @@ const routes: Routes = [ centersActionData: CenterActionsResolver } }, + { + path: 'savingsaccounts', + loadChildren: () => import('../savings/savings.module').then(m => m.SavingsModule) + } ] } ] diff --git a/src/app/centers/centers-view/centers-view.component.html b/src/app/centers/centers-view/centers-view.component.html index 2c3050387..c30c1fee5 100644 --- a/src/app/centers/centers-view/centers-view.component.html +++ b/src/app/centers/centers-view/centers-view.component.html @@ -4,7 +4,7 @@
+ src='assets/images/center_placeholder.png'>
diff --git a/src/app/centers/centers-view/general-tab/general-tab.component.html b/src/app/centers/centers-view/general-tab/general-tab.component.html index c1c4f06d3..2d0d69361 100644 --- a/src/app/centers/centers-view/general-tab/general-tab.component.html +++ b/src/app/centers/centers-view/general-tab/general-tab.component.html @@ -46,7 +46,7 @@ - + @@ -129,7 +129,7 @@ - + diff --git a/src/app/clients/clients-view/general-tab/general-tab.component.html b/src/app/clients/clients-view/general-tab/general-tab.component.html index 703af8caf..bb2ecdfd5 100644 --- a/src/app/clients/clients-view/general-tab/general-tab.component.html +++ b/src/app/clients/clients-view/general-tab/general-tab.component.html @@ -314,7 +314,7 @@ - + @@ -597,7 +597,7 @@ - + diff --git a/src/app/clients/clients-view/notes-tab/notes-tab.component.ts b/src/app/clients/clients-view/notes-tab/notes-tab.component.ts index f610efe8b..3203e8ade 100644 --- a/src/app/clients/clients-view/notes-tab/notes-tab.component.ts +++ b/src/app/clients/clients-view/notes-tab/notes-tab.component.ts @@ -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; diff --git a/src/app/core/core.module.ts b/src/app/core/core.module.ts index 4969c5c90..26666babb 100644 --- a/src/app/core/core.module.ts +++ b/src/app/core/core.module.ts @@ -46,8 +46,6 @@ import { ContentComponent } from './shell/content/content.component'; @NgModule({ imports: [ SharedModule, - SearchModule, - NotificationsModule, HttpClientModule, TranslateModule, RouterModule diff --git a/src/app/core/shell/sidenav/sidenav.component.html b/src/app/core/shell/sidenav/sidenav.component.html index 77105dc48..9e77a960c 100644 --- a/src/app/core/shell/sidenav/sidenav.component.html +++ b/src/app/core/shell/sidenav/sidenav.component.html @@ -32,14 +32,13 @@
-
-
@@ -99,6 +98,12 @@ Chart of Accounts + + + + + Keyboard Shortcuts + diff --git a/src/app/core/shell/sidenav/sidenav.component.ts b/src/app/core/shell/sidenav/sidenav.component.ts index eb7a1cb63..4cb6aa594 100644 --- a/src/app/core/shell/sidenav/sidenav.component.ts +++ b/src/app/core/shell/sidenav/sidenav.component.ts @@ -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. */ diff --git a/src/app/core/shell/toolbar/toolbar.component.html b/src/app/core/shell/toolbar/toolbar.component.html index 744a045c6..57babc698 100644 --- a/src/app/core/shell/toolbar/toolbar.component.html +++ b/src/app/core/shell/toolbar/toolbar.component.html @@ -49,10 +49,6 @@ - - diff --git a/src/app/core/shell/toolbar/toolbar.component.ts b/src/app/core/shell/toolbar/toolbar.component.ts index cc371aa7c..14453c378 100644 --- a/src/app/core/shell/toolbar/toolbar.component.ts +++ b/src/app/core/shell/toolbar/toolbar.component.ts @@ -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) => {}); - } - } diff --git a/src/app/groups/groups-routing.module.ts b/src/app/groups/groups-routing.module.ts index c0921e50c..cc069e606 100644 --- a/src/app/groups/groups-routing.module.ts +++ b/src/app/groups/groups-routing.module.ts @@ -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) - }, + } ] } ] diff --git a/src/app/groups/groups-view/general-tab/general-tab.component.html b/src/app/groups/groups-view/general-tab/general-tab.component.html index 715c53f4d..1588249ce 100644 --- a/src/app/groups/groups-view/general-tab/general-tab.component.html +++ b/src/app/groups/groups-view/general-tab/general-tab.component.html @@ -136,7 +136,7 @@ - + @@ -187,7 +187,7 @@ - + @@ -280,7 +280,7 @@ - + diff --git a/src/app/keyboards-shortcut-config.ts b/src/app/keyboards-shortcut-config.ts index 98355d9f4..80983849f 100644 --- a/src/app/keyboards-shortcut-config.ts +++ b/src/app/keyboards-shortcut-config.ts @@ -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', diff --git a/src/app/loans/loans-view/loans-view.component.html b/src/app/loans/loans-view/loans-view.component.html index 19f43f9f1..b96230451 100644 --- a/src/app/loans/loans-view/loans-view.component.html +++ b/src/app/loans/loans-view/loans-view.component.html @@ -6,8 +6,8 @@
- +
diff --git a/src/app/notifications/notifications.module.ts b/src/app/notifications/notifications.module.ts index 55fbdc935..bd5859a73 100644 --- a/src/app/notifications/notifications.module.ts +++ b/src/app/notifications/notifications.module.ts @@ -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 { } diff --git a/src/app/pipes/url-to-string.pipe.ts b/src/app/pipes/url-to-string.pipe.ts index a6b2b1678..f429d341d 100644 --- a/src/app/pipes/url-to-string.pipe.ts +++ b/src/app/pipes/url-to-string.pipe.ts @@ -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 diff --git a/src/app/search/search.module.ts b/src/app/search/search.module.ts index a13eaf117..d20b90d35 100644 --- a/src/app/search/search.module.ts +++ b/src/app/search/search.module.ts @@ -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 { } diff --git a/src/app/shared/icons.module.ts b/src/app/shared/icons.module.ts index 35998861d..7c64154f7 100644 --- a/src/app/shared/icons.module.ts +++ b/src/app/shared/icons.module.ts @@ -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 ); } diff --git a/src/app/notifications/notifications-tray/notifications-tray.component.html b/src/app/shared/notifications-tray/notifications-tray.component.html similarity index 90% rename from src/app/notifications/notifications-tray/notifications-tray.component.html rename to src/app/shared/notifications-tray/notifications-tray.component.html index 105b0e00f..d263fcd8b 100644 --- a/src/app/notifications/notifications-tray/notifications-tray.component.html +++ b/src/app/shared/notifications-tray/notifications-tray.component.html @@ -18,6 +18,4 @@ [{{ notification.createdAt }}] - - diff --git a/src/app/notifications/notifications-tray/notifications-tray.component.scss b/src/app/shared/notifications-tray/notifications-tray.component.scss similarity index 88% rename from src/app/notifications/notifications-tray/notifications-tray.component.scss rename to src/app/shared/notifications-tray/notifications-tray.component.scss index 0ca616d20..128280c57 100644 --- a/src/app/notifications/notifications-tray/notifications-tray.component.scss +++ b/src/app/shared/notifications-tray/notifications-tray.component.scss @@ -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; } } diff --git a/src/app/notifications/notifications-tray/notifications-tray.component.spec.ts b/src/app/shared/notifications-tray/notifications-tray.component.spec.ts similarity index 100% rename from src/app/notifications/notifications-tray/notifications-tray.component.spec.ts rename to src/app/shared/notifications-tray/notifications-tray.component.spec.ts diff --git a/src/app/notifications/notifications-tray/notifications-tray.component.ts b/src/app/shared/notifications-tray/notifications-tray.component.ts similarity index 97% rename from src/app/notifications/notifications-tray/notifications-tray.component.ts rename to src/app/shared/notifications-tray/notifications-tray.component.ts index 41a93e33a..b41b2c7fd 100644 --- a/src/app/notifications/notifications-tray/notifications-tray.component.ts +++ b/src/app/shared/notifications-tray/notifications-tray.component.ts @@ -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 diff --git a/src/app/search/search-tool/search-tool.component.html b/src/app/shared/search-tool/search-tool.component.html similarity index 100% rename from src/app/search/search-tool/search-tool.component.html rename to src/app/shared/search-tool/search-tool.component.html diff --git a/src/app/search/search-tool/search-tool.component.scss b/src/app/shared/search-tool/search-tool.component.scss similarity index 100% rename from src/app/search/search-tool/search-tool.component.scss rename to src/app/shared/search-tool/search-tool.component.scss diff --git a/src/app/search/search-tool/search-tool.component.spec.ts b/src/app/shared/search-tool/search-tool.component.spec.ts similarity index 100% rename from src/app/search/search-tool/search-tool.component.spec.ts rename to src/app/shared/search-tool/search-tool.component.spec.ts diff --git a/src/app/search/search-tool/search-tool.component.ts b/src/app/shared/search-tool/search-tool.component.ts similarity index 100% rename from src/app/search/search-tool/search-tool.component.ts rename to src/app/shared/search-tool/search-tool.component.ts diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts index 18d9ed304..fff7447d1 100644 --- a/src/app/shared/shared.module.ts +++ b/src/app/shared/shared.module.ts @@ -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 { } diff --git a/src/assets/images/center_placeholder.png b/src/assets/images/center_placeholder.png index 04550482d..9abac64dd 100644 Binary files a/src/assets/images/center_placeholder.png and b/src/assets/images/center_placeholder.png differ diff --git a/src/assets/images/keyboard_placeholder.png b/src/assets/images/keyboard_placeholder.png deleted file mode 100644 index 8570ba12f..000000000 Binary files a/src/assets/images/keyboard_placeholder.png and /dev/null differ diff --git a/src/assets/images/loans.png b/src/assets/images/loans.png deleted file mode 100644 index 08c1add56..000000000 Binary files a/src/assets/images/loans.png and /dev/null differ diff --git a/src/assets/images/loans_account_placeholder.png b/src/assets/images/loans_account_placeholder.png new file mode 100644 index 000000000..69a204969 Binary files /dev/null and b/src/assets/images/loans_account_placeholder.png differ