Fix/update admin (WIP)
This commit is contained in:
parent
5d67b8a9dc
commit
4994d8314a
1 changed files with 16 additions and 13 deletions
|
@ -2,9 +2,8 @@ import { Injectable, Input } from '@angular/core'
|
|||
import { Observable, of as observableOf } from 'rxjs'
|
||||
import { map } from 'rxjs/operators'
|
||||
|
||||
// import { Apollo, gql } from 'apollo-angular'
|
||||
|
||||
import { Store } from './admin-manage/data.service'
|
||||
import { ApiService, SurveyMeta } from '../openapi'
|
||||
|
||||
export class Project {
|
||||
constructor(
|
||||
|
@ -27,17 +26,17 @@ export class Equipment {
|
|||
) {}
|
||||
}
|
||||
|
||||
export class SurveyMeta {
|
||||
constructor(
|
||||
public projects: Project[],
|
||||
public surveyors: Surveyor[],
|
||||
public equipments: Equipment[],
|
||||
public statuses: string[],
|
||||
public stores_misc: Store[],
|
||||
public stores_line_work: Store[],
|
||||
public defaults: Object
|
||||
) {}
|
||||
}
|
||||
// export class SurveyMeta {
|
||||
// constructor(
|
||||
// public projects: Project[],
|
||||
// public surveyors: Surveyor[],
|
||||
// public equipments: Equipment[],
|
||||
// public statuses: string[],
|
||||
// public stores_misc: Store[],
|
||||
// public stores_line_work: Store[],
|
||||
// public defaults: Object
|
||||
// ) {}
|
||||
// }
|
||||
|
||||
// const getSurveyMeta = gql`
|
||||
// query survey_meta {
|
||||
|
@ -83,6 +82,7 @@ export class AdminDataService {
|
|||
|
||||
constructor(
|
||||
// private apollo: Apollo,
|
||||
public apiService: ApiService,
|
||||
) {}
|
||||
|
||||
getModelsMenuBar(): Observable<object[]> {
|
||||
|
@ -96,6 +96,9 @@ export class AdminDataService {
|
|||
}
|
||||
|
||||
getSurveyMeta(): Observable<SurveyMeta> {
|
||||
return this.apiService.getSurveyMetaApiSurveyMetaGet().pipe(map(
|
||||
surveyMeta => this.surveyMeta = surveyMeta
|
||||
))
|
||||
console.warn('Migrate Graphql')
|
||||
return observableOf()
|
||||
// return this.apollo.query({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue