diff --git a/src/app/pages/accounts/accounts-routing.module.ts b/src/app/pages/accounts/accounts-routing.module.ts index 37c379f..25ef7d1 100644 --- a/src/app/pages/accounts/accounts-routing.module.ts +++ b/src/app/pages/accounts/accounts-routing.module.ts @@ -3,7 +3,6 @@ import { Routes, RouterModule } from '@angular/router'; import { AccountsComponent } from '@pages/accounts/accounts.component'; import {CreateAccountComponent} from '@pages/accounts/create-account/create-account.component'; -import {ExportAccountsComponent} from '@pages/accounts/export-accounts/export-accounts.component'; import {AccountDetailsComponent} from '@pages/accounts/account-details/account-details.component'; import {AccountSearchComponent} from '@pages/accounts/account-search/account-search.component'; @@ -11,7 +10,6 @@ const routes: Routes = [ { path: '', component: AccountsComponent }, { path: 'search', component: AccountSearchComponent }, // { path: 'create', component: CreateAccountComponent }, - { path: 'export', component: ExportAccountsComponent }, { path: ':id', component: AccountDetailsComponent }, { path: '**', redirectTo: '', pathMatch: 'full' } ]; diff --git a/src/app/pages/accounts/accounts.module.ts b/src/app/pages/accounts/accounts.module.ts index 1428d15..0fa3d31 100644 --- a/src/app/pages/accounts/accounts.module.ts +++ b/src/app/pages/accounts/accounts.module.ts @@ -7,8 +7,6 @@ import {SharedModule} from '@app/shared/shared.module'; import { AccountDetailsComponent } from '@pages/accounts/account-details/account-details.component'; import {DataTablesModule} from 'angular-datatables'; import { CreateAccountComponent } from '@pages/accounts/create-account/create-account.component'; -import { DisbursementComponent } from '@pages/accounts/disbursement/disbursement.component'; -import { ExportAccountsComponent } from '@pages/accounts/export-accounts/export-accounts.component'; import {MatTableModule} from '@angular/material/table'; import {MatSortModule} from '@angular/material/sort'; import {MatCheckboxModule} from '@angular/material/checkbox'; @@ -33,8 +31,6 @@ import {MatSnackBarModule} from '@angular/material/snack-bar'; AccountsComponent, AccountDetailsComponent, CreateAccountComponent, - DisbursementComponent, - ExportAccountsComponent, AccountSearchComponent ], imports: [ diff --git a/src/app/pages/accounts/disbursement/disbursement.component.html b/src/app/pages/accounts/disbursement/disbursement.component.html deleted file mode 100644 index 137a153..0000000 --- a/src/app/pages/accounts/disbursement/disbursement.component.html +++ /dev/null @@ -1,36 +0,0 @@ -
- -
- NEW TRANSFER - -
-
-
-
-
- - TRANSACTION TYPE - - DISBURSEMENT - TRANSFER - DEPOSIT - RECLAMATION - - Transaction type is required. - - - Enter Recipient: - - - - Enter Amount: - - Amount is required. - - -
-
-
-
diff --git a/src/app/pages/accounts/disbursement/disbursement.component.scss b/src/app/pages/accounts/disbursement/disbursement.component.scss deleted file mode 100644 index e69de29..0000000 diff --git a/src/app/pages/accounts/disbursement/disbursement.component.spec.ts b/src/app/pages/accounts/disbursement/disbursement.component.spec.ts deleted file mode 100644 index e22fee6..0000000 --- a/src/app/pages/accounts/disbursement/disbursement.component.spec.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { DisbursementComponent } from '@pages/accounts/disbursement/disbursement.component'; -import {AccountsModule} from '@pages/accounts/accounts.module'; -import {AppModule} from '@app/app.module'; -import {FooterStubComponent, SidebarStubComponent, TopbarStubComponent} from '@src/testing'; - -describe('DisbursementComponent', () => { - let component: DisbursementComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [ - DisbursementComponent, - FooterStubComponent, - SidebarStubComponent, - TopbarStubComponent - ], - imports: [ - AccountsModule, - AppModule - ] - }) - .compileComponents(); - }); - - beforeEach(() => { - fixture = TestBed.createComponent(DisbursementComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/pages/accounts/disbursement/disbursement.component.ts b/src/app/pages/accounts/disbursement/disbursement.component.ts deleted file mode 100644 index 4c6820a..0000000 --- a/src/app/pages/accounts/disbursement/disbursement.component.ts +++ /dev/null @@ -1,51 +0,0 @@ -import {Component, OnInit, EventEmitter, Output, Input, ChangeDetectionStrategy} from '@angular/core'; -import {FormBuilder, FormGroup, Validators} from '@angular/forms'; -import {CustomErrorStateMatcher} from '@app/_helpers'; -import {TransactionService} from '@app/_services'; - -@Component({ - selector: 'app-disbursement', - templateUrl: './disbursement.component.html', - styleUrls: ['./disbursement.component.scss'], - changeDetection: ChangeDetectionStrategy.OnPush -}) -export class DisbursementComponent implements OnInit { - @Input() account; - @Output() cancelDisbursmentEvent = new EventEmitter(); - disbursementForm: FormGroup; - matcher = new CustomErrorStateMatcher(); - submitted: boolean = false; - - constructor( - private formBuilder: FormBuilder, - private transactionService: TransactionService - ) { } - - ngOnInit(): void { - this.disbursementForm = this.formBuilder.group({ - transactionType: ['', Validators.required], - recipient: '', - amount: ['', Validators.required] - }); - } - - get disbursementFormStub(): any { return this.disbursementForm.controls; } - - async createTransfer(): Promise { - this.submitted = true; - if (this.disbursementForm.invalid || !confirm('Make transfer?')) { return; } - if (this.disbursementFormStub.transactionType.value === 'transfer') { - await this.transactionService.transferRequest( - this.account.token, - this.account.address, - this.disbursementFormStub.recipient.value, - this.disbursementFormStub.amount.value - ); - } - this.submitted = false; - } - - cancel(): void { - this.cancelDisbursmentEvent.emit(); - } -} diff --git a/src/app/pages/accounts/export-accounts/export-accounts.component.html b/src/app/pages/accounts/export-accounts/export-accounts.component.html deleted file mode 100644 index 4f98e6c..0000000 --- a/src/app/pages/accounts/export-accounts/export-accounts.component.html +++ /dev/null @@ -1,53 +0,0 @@ - -
- - - - - - -
- - -
- -
- - EXPORT ACCOUNTS - -
-
-
- - Export : - - VENDORS - PARTNERS - SELECTED - - Account Type is required. - -
-
-
- - -
-
- -
-
-
-
- -
- - - -
diff --git a/src/app/pages/accounts/export-accounts/export-accounts.component.scss b/src/app/pages/accounts/export-accounts/export-accounts.component.scss deleted file mode 100644 index e69de29..0000000 diff --git a/src/app/pages/accounts/export-accounts/export-accounts.component.spec.ts b/src/app/pages/accounts/export-accounts/export-accounts.component.spec.ts deleted file mode 100644 index f78e9d4..0000000 --- a/src/app/pages/accounts/export-accounts/export-accounts.component.spec.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { ExportAccountsComponent } from '@pages/accounts/export-accounts/export-accounts.component'; -import {AccountsModule} from '@pages/accounts/accounts.module'; -import {AppModule} from '@app/app.module'; -import {FooterStubComponent, SidebarStubComponent, TopbarStubComponent} from '@src/testing'; - -describe('ExportAccountsComponent', () => { - let component: ExportAccountsComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [ - ExportAccountsComponent, - FooterStubComponent, - SidebarStubComponent, - TopbarStubComponent - ], - imports: [ - AccountsModule, - AppModule - ] - }) - .compileComponents(); - }); - - beforeEach(() => { - fixture = TestBed.createComponent(ExportAccountsComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/pages/accounts/export-accounts/export-accounts.component.ts b/src/app/pages/accounts/export-accounts/export-accounts.component.ts deleted file mode 100644 index b0fa3cc..0000000 --- a/src/app/pages/accounts/export-accounts/export-accounts.component.ts +++ /dev/null @@ -1,34 +0,0 @@ -import {ChangeDetectionStrategy, Component, OnInit} from '@angular/core'; -import {FormBuilder, FormGroup, Validators} from '@angular/forms'; -import {CustomErrorStateMatcher} from '@app/_helpers'; - -@Component({ - selector: 'app-export-accounts', - templateUrl: './export-accounts.component.html', - styleUrls: ['./export-accounts.component.scss'], - changeDetection: ChangeDetectionStrategy.OnPush -}) -export class ExportAccountsComponent implements OnInit { - exportForm: FormGroup; - matcher = new CustomErrorStateMatcher(); - submitted: boolean = false; - - constructor( - private formBuilder: FormBuilder - ) { } - - ngOnInit(): void { - this.exportForm = this.formBuilder.group({ - accountType: ['', Validators.required], - transfers: [''] - }); - } - - get exportFormStub(): any { return this.exportForm.controls; } - - export(): void { - this.submitted = true; - if (this.exportForm.invalid || !confirm('Export accounts?')) { return; } - this.submitted = false; - } -} diff --git a/src/app/pages/settings/invite/invite.component.html b/src/app/pages/settings/invite/invite.component.html deleted file mode 100644 index 3f3d458..0000000 --- a/src/app/pages/settings/invite/invite.component.html +++ /dev/null @@ -1,51 +0,0 @@ - -
- - - - - - -
- - -
- -
-
- - INVITE NEW USERS - -
-
- - Email Address: - - Email is required. -
- - Superadmin
- Admin
- Subadmin
- View
-
- Role is required. - -
-
-
-
-
- -
- - - -
diff --git a/src/app/pages/settings/invite/invite.component.scss b/src/app/pages/settings/invite/invite.component.scss deleted file mode 100644 index e69de29..0000000 diff --git a/src/app/pages/settings/invite/invite.component.spec.ts b/src/app/pages/settings/invite/invite.component.spec.ts deleted file mode 100644 index 45cd81e..0000000 --- a/src/app/pages/settings/invite/invite.component.spec.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { InviteComponent } from '@pages/settings/invite/invite.component'; -import {FooterStubComponent, SidebarStubComponent, TopbarStubComponent} from '@src/testing'; -import {SettingsModule} from '@pages/settings/settings.module'; -import {AppModule} from '@app/app.module'; - -describe('InviteComponent', () => { - let component: InviteComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [ - InviteComponent, - FooterStubComponent, - SidebarStubComponent, - TopbarStubComponent - ], - imports: [ - AppModule, - SettingsModule, - ] - }) - .compileComponents(); - }); - - beforeEach(() => { - fixture = TestBed.createComponent(InviteComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/pages/settings/invite/invite.component.ts b/src/app/pages/settings/invite/invite.component.ts deleted file mode 100644 index cb8dc2f..0000000 --- a/src/app/pages/settings/invite/invite.component.ts +++ /dev/null @@ -1,34 +0,0 @@ -import {ChangeDetectionStrategy, Component, OnInit} from '@angular/core'; -import {FormBuilder, FormGroup, Validators} from '@angular/forms'; -import {CustomErrorStateMatcher} from '@app/_helpers'; - -@Component({ - selector: 'app-invite', - templateUrl: './invite.component.html', - styleUrls: ['./invite.component.scss'], - changeDetection: ChangeDetectionStrategy.OnPush -}) -export class InviteComponent implements OnInit { - inviteForm: FormGroup; - submitted: boolean = false; - matcher = new CustomErrorStateMatcher(); - - constructor( - private formBuilder: FormBuilder - ) { } - - ngOnInit(): void { - this.inviteForm = this.formBuilder.group({ - email: ['', Validators.required], - role: ['', Validators.required] - }); - } - - get inviteFormStub(): any { return this.inviteForm.controls; } - - invite(): void { - this.submitted = true; - if (this.inviteForm.invalid || !confirm('Invite user?')) { return; } - this.submitted = false; - } -} diff --git a/src/app/pages/settings/settings-routing.module.ts b/src/app/pages/settings/settings-routing.module.ts index 9e9597a..22d32ef 100644 --- a/src/app/pages/settings/settings-routing.module.ts +++ b/src/app/pages/settings/settings-routing.module.ts @@ -2,12 +2,10 @@ import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import { SettingsComponent } from '@pages/settings/settings.component'; -import {InviteComponent} from '@pages/settings/invite/invite.component'; import {OrganizationComponent} from '@pages/settings/organization/organization.component'; const routes: Routes = [ { path: '', component: SettingsComponent }, - { path: 'invite', component: InviteComponent }, { path: 'organization', component: OrganizationComponent }, { path: '**', redirectTo: '', pathMatch: 'full' } ]; diff --git a/src/app/pages/settings/settings.module.ts b/src/app/pages/settings/settings.module.ts index 9e4da32..fe35fd6 100644 --- a/src/app/pages/settings/settings.module.ts +++ b/src/app/pages/settings/settings.module.ts @@ -4,7 +4,6 @@ import { CommonModule } from '@angular/common'; import { SettingsRoutingModule } from '@pages/settings/settings-routing.module'; import { SettingsComponent } from '@pages/settings/settings.component'; import {SharedModule} from '@app/shared/shared.module'; -import { InviteComponent } from '@pages/settings/invite/invite.component'; import { OrganizationComponent } from '@pages/settings/organization/organization.component'; import {MatTableModule} from '@angular/material/table'; import {MatSortModule} from '@angular/material/sort'; @@ -22,7 +21,7 @@ import {ReactiveFormsModule} from '@angular/forms'; @NgModule({ - declarations: [SettingsComponent, InviteComponent, OrganizationComponent], + declarations: [SettingsComponent, OrganizationComponent], imports: [ CommonModule, SettingsRoutingModule,