Add file uploader support

This commit is contained in:
garrettmills
2020-02-09 04:37:52 -06:00
parent f4c86a06e2
commit 813f4b094b
13 changed files with 172 additions and 23 deletions

View File

@@ -35,17 +35,19 @@ export class DatabaseComponent implements OnInit {
rowData = [];
ngOnInit() {
this.loader.create({message: 'Loading database...'}).then(loader => {
loader.present().then(() => {
// this.loader.create({message: 'Loading database...'}).then(loader => {
// setTimeout(() => {
// loader.present().then(() => {
this.getInitObservable().subscribe(() => {
this.getColumnLoadObservable().subscribe(() => {
this.getDataLoadObservable().subscribe(() => {
loader.dismiss();
// loader.dismiss();
});
});
});
});
});
// });
// }, 100);
// });
}
onCellValueChanged() {
@@ -80,7 +82,7 @@ export class DatabaseComponent implements OnInit {
});
const endpoint = `/db/${this.hostRecord.PageId}/${this.hostRecord.UUID}/set/${this.hostRecord.Value.Value}/columns`
this.api.post(endpoint, {columns: this.columnDefs}).subscribe(res => {
this.columnDefs = res.data;
// this.columnDefs = res.data;
});
}
});
@@ -202,7 +204,7 @@ export class DatabaseComponent implements OnInit {
getInitObservable(): Observable<any> {
return new Observable<any>(sub => {
if ( this.hostRecord && this.pendingSetup ) {
if ( this.hostRecord.UUID && this.pendingSetup ) {
if ( !this.hostRecord.Value ) {
this.hostRecord.Value = {};
}