From 38b8025ae713f017870860a721cf1b6851811627 Mon Sep 17 00:00:00 2001 From: punwai Date: Sun, 26 Apr 2020 19:32:03 +0100 Subject: [PATCH] feat: add bulk import component (#564) Fixes: #542 --- .../bulk-import/bulk-import-routing.module.ts | 30 ++++ .../bulk-import/bulk-import.component.html | 147 ++++++++++++++++++ .../bulk-import/bulk-import.component.scss | 0 .../bulk-import/bulk-import.component.spec.ts | 25 +++ src/app/bulk-import/bulk-import.component.ts | 19 +++ src/app/bulk-import/bulk-import.module.ts | 25 +++ .../organization-routing.module.ts | 4 + .../organization/organization.component.html | 2 +- 8 files changed, 251 insertions(+), 1 deletion(-) create mode 100644 src/app/bulk-import/bulk-import-routing.module.ts create mode 100644 src/app/bulk-import/bulk-import.component.html create mode 100644 src/app/bulk-import/bulk-import.component.scss create mode 100644 src/app/bulk-import/bulk-import.component.spec.ts create mode 100644 src/app/bulk-import/bulk-import.component.ts create mode 100644 src/app/bulk-import/bulk-import.module.ts diff --git a/src/app/bulk-import/bulk-import-routing.module.ts b/src/app/bulk-import/bulk-import-routing.module.ts new file mode 100644 index 000000000..bea83ec13 --- /dev/null +++ b/src/app/bulk-import/bulk-import-routing.module.ts @@ -0,0 +1,30 @@ +/** Angular Imports */ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +/** Translation Imports */ +import { extract } from '../core/i18n/i18n.service'; + +/** Custom Components */ +import { BulkImportComponent } from './bulk-import.component'; + +/** Bulk Import Routes */ +const routes: Routes = [ + { + path: '', + data: { title: extract('Bulk Import'), breadcrumb: 'Bulk Import' }, + component: BulkImportComponent + } +]; + +/** + * Bulk Import Routing Module + * + * Configures the bulk import routes. + */ +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule], + providers: [ ] +}) +export class BulkImportRoutingModule { } diff --git a/src/app/bulk-import/bulk-import.component.html b/src/app/bulk-import/bulk-import.component.html new file mode 100644 index 000000000..3bfa2ae89 --- /dev/null +++ b/src/app/bulk-import/bulk-import.component.html @@ -0,0 +1,147 @@ +
+ + + +
+ +
+ + + + + + + +

Offices

+
+ + + + + +

Users

+
+ + + + + +

Groups

+
+ + + + + +

Loan Accounts

+
+ + + + + +

Savings Accounts

+
+ + + + + +

Fixed Deposit Accounts

+
+ + + + + +

Chart of Accounts

+
+ + + + + +

Share Accounts

+
+ +
+ +
+ +
+ + + + + + + +

Employees

+
+ + + + + + +

Clients

+
+ + + + + +

Centers

+
+ + + + + +

Loan Repayments

+
+ + + + + +

Savings Transactions

+
+ + + + + +

Fixed Deposit Transactions

+
+ + + + + +

Recurring Deposit Transactions

+
+ + + + + +

Journal Entries

+
+ + + + + +

Guarantors

+
+ +
+ +
+ +
+ +
+ +
diff --git a/src/app/bulk-import/bulk-import.component.scss b/src/app/bulk-import/bulk-import.component.scss new file mode 100644 index 000000000..e69de29bb diff --git a/src/app/bulk-import/bulk-import.component.spec.ts b/src/app/bulk-import/bulk-import.component.spec.ts new file mode 100644 index 000000000..dc14f588f --- /dev/null +++ b/src/app/bulk-import/bulk-import.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { BulkImportComponent } from './bulk-import.component'; + +describe('BulkImportComponent', () => { + let component: BulkImportComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ BulkImportComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(BulkImportComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/bulk-import/bulk-import.component.ts b/src/app/bulk-import/bulk-import.component.ts new file mode 100644 index 000000000..5f0be7103 --- /dev/null +++ b/src/app/bulk-import/bulk-import.component.ts @@ -0,0 +1,19 @@ +/** Angular Imports */ +import { Component, OnInit } from '@angular/core'; + +/** + * Bulk Import component. + */ +@Component({ + selector: 'mifosx-bulk-import', + templateUrl: './bulk-import.component.html', + styleUrls: ['./bulk-import.component.scss'] +}) +export class BulkImportComponent implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/src/app/bulk-import/bulk-import.module.ts b/src/app/bulk-import/bulk-import.module.ts new file mode 100644 index 000000000..1a8ef5782 --- /dev/null +++ b/src/app/bulk-import/bulk-import.module.ts @@ -0,0 +1,25 @@ +/** Angular Imports */ +import { NgModule } from '@angular/core'; + +/** Custom Modules */ +import { SharedModule } from '../shared/shared.module'; +import { BulkImportRoutingModule } from './bulk-import-routing.module'; + +/** Custom Components */ +import { BulkImportComponent } from './bulk-import.component'; + +/** + * Bulk Import Module + * + * All components related to bulk import functions should be declared here. + */ +@NgModule({ + imports: [ + SharedModule, + BulkImportRoutingModule + ], + declarations: [ + BulkImportComponent + ] +}) +export class BulkImportModule { } diff --git a/src/app/organization/organization-routing.module.ts b/src/app/organization/organization-routing.module.ts index 64dd1169f..03dc1be9a 100644 --- a/src/app/organization/organization-routing.module.ts +++ b/src/app/organization/organization-routing.module.ts @@ -228,6 +228,10 @@ const routes: Routes = [ resolve: { workingDays: WorkingDaysResolver } + }, + { + path: 'bulk-import', + loadChildren: '../bulk-import/bulk-import.module#BulkImportModule' } ] } diff --git a/src/app/organization/organization.component.html b/src/app/organization/organization.component.html index 095eea70c..1782e8c7f 100644 --- a/src/app/organization/organization.component.html +++ b/src/app/organization/organization.component.html @@ -145,7 +145,7 @@

Define AdHocQuery for Organization

- +