feat: add UI for settings and app configuration (#90)
Add settings and app configuration UI for web app and self service applications.
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
<button mat-button (click)="inputFile.click()">
|
||||
<mat-icon>file_upload</mat-icon>
|
||||
Upload an image
|
||||
</button>
|
||||
{{ filename }}
|
||||
<input type="file" #inputFile (change)="onFileSelected($event)" [style.display]="'none'" />
|
||||
@@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { FileUploadComponent } from './file-upload.component';
|
||||
|
||||
describe('FileUploadComponent', () => {
|
||||
let component: FileUploadComponent;
|
||||
let fixture: ComponentFixture<FileUploadComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ FileUploadComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(FileUploadComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,21 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'mifosx-file-upload',
|
||||
templateUrl: './file-upload.component.html',
|
||||
styleUrls: ['./file-upload.component.scss']
|
||||
})
|
||||
export class FileUploadComponent implements OnInit {
|
||||
|
||||
filename: string;
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
onFileSelected($event: any) {
|
||||
this.filename = $event.target.files[0].name;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,16 +2,21 @@ import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
|
||||
import { LoaderComponent } from './loader/loader.component';
|
||||
import { FileUploadComponent } from './file-upload/file-upload.component';
|
||||
import { CoreModule } from '../core/core.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule
|
||||
CommonModule,
|
||||
CoreModule
|
||||
],
|
||||
declarations: [
|
||||
LoaderComponent
|
||||
LoaderComponent,
|
||||
FileUploadComponent
|
||||
],
|
||||
exports: [
|
||||
LoaderComponent
|
||||
LoaderComponent,
|
||||
FileUploadComponent
|
||||
]
|
||||
})
|
||||
export class SharedModule { }
|
||||
|
||||
Reference in New Issue
Block a user