DataSet - createdBy & createdAt
This commit is contained in:
@@ -10,6 +10,7 @@ export class DataSet extends Base {
|
||||
source?: string;
|
||||
name?: string;
|
||||
dataRows: DataRow[] = [];
|
||||
created?: string;
|
||||
|
||||
constructor(data: Partial<DataSet> = {}) {
|
||||
super();
|
||||
@@ -34,6 +35,8 @@ export class DataSet extends Base {
|
||||
modifiedAt: '',
|
||||
createdBy: '',
|
||||
modifiedBy: '',
|
||||
modified: '',
|
||||
created: ''
|
||||
});
|
||||
}
|
||||
fillForm(form: UntypedFormGroup) {
|
||||
@@ -92,10 +95,12 @@ export class DataSet extends Base {
|
||||
})
|
||||
})
|
||||
}
|
||||
static parseGoogleSheet(sheetId: string, _http: HttpClient): Promise<DataRow[]> {
|
||||
static parseGoogleSheet(sheetId: string, _http: HttpClient): Promise<any> {
|
||||
return new Promise((resolve, reject) => {
|
||||
_http.get<DataRow[]>(`${environment.api.url}/datasets/parseGoogleSheet/${sheetId}`,
|
||||
).pipe(map(data => data.map(x => new DataRow().deserialize(x))))
|
||||
_http.get<any>(`${environment.api.url}/datasets/parseGoogleSheet/${sheetId}`,
|
||||
).pipe(map(data => {
|
||||
data.dataRows = data.dataRows.map((x: any) => new DataRow().deserialize(x))
|
||||
}))
|
||||
.subscribe({
|
||||
next: (data) => {
|
||||
resolve(data);
|
||||
|
||||
Reference in New Issue
Block a user