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;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user