change export directory
This commit is contained in:
@@ -95,12 +95,10 @@ export class DataSet extends Base {
|
||||
})
|
||||
})
|
||||
}
|
||||
static parseGoogleSheet(sheetId: string, _http: HttpClient): Promise<any> {
|
||||
static parseGoogleSheet(sheetId: string, _http: HttpClient): Promise<DataSet> {
|
||||
return new Promise((resolve, reject) => {
|
||||
_http.get<any>(`${environment.api.url}/datasets/parseGoogleSheet/${sheetId}`,
|
||||
).pipe(map(data => {
|
||||
data.dataRows = data.dataRows.map((x: any) => new DataRow().deserialize(x))
|
||||
}))
|
||||
_http.get<DataSet>(`${environment.api.url}/datasets/parseGoogleSheet/${sheetId}`,
|
||||
).pipe(map(data => new DataSet().deserialize(data)))
|
||||
.subscribe({
|
||||
next: (data) => {
|
||||
resolve(data);
|
||||
|
||||
@@ -65,7 +65,8 @@ export class DataSetEditComponent implements OnInit {
|
||||
}
|
||||
async parseGoogleSheet() {
|
||||
const id = this.form.get('sheetId')?.value;
|
||||
this.document.dataRows = await DataSet.parseGoogleSheet(id, this.http$);
|
||||
this.document = await DataSet.parseGoogleSheet(id, this.http$);
|
||||
this.document.fillForm(this.form);
|
||||
this.dataSource = new MatTableDataSource(this.document.dataRows);
|
||||
this.dataSource.paginator = this.paginator;
|
||||
this.dataSource.sort = this.sort;
|
||||
|
||||
Reference in New Issue
Block a user