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 { Observable, of as observableOf } from 'rxjs'
|
||||||
import { map } from 'rxjs/operators'
|
import { map } from 'rxjs/operators'
|
||||||
|
|
||||||
// import { Apollo, gql } from 'apollo-angular'
|
|
||||||
|
|
||||||
import { Store } from './admin-manage/data.service'
|
import { Store } from './admin-manage/data.service'
|
||||||
|
import { ApiService, SurveyMeta } from '../openapi'
|
||||||
|
|
||||||
export class Project {
|
export class Project {
|
||||||
constructor(
|
constructor(
|
||||||
|
@ -27,17 +26,17 @@ export class Equipment {
|
||||||
) {}
|
) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class SurveyMeta {
|
// export class SurveyMeta {
|
||||||
constructor(
|
// constructor(
|
||||||
public projects: Project[],
|
// public projects: Project[],
|
||||||
public surveyors: Surveyor[],
|
// public surveyors: Surveyor[],
|
||||||
public equipments: Equipment[],
|
// public equipments: Equipment[],
|
||||||
public statuses: string[],
|
// public statuses: string[],
|
||||||
public stores_misc: Store[],
|
// public stores_misc: Store[],
|
||||||
public stores_line_work: Store[],
|
// public stores_line_work: Store[],
|
||||||
public defaults: Object
|
// public defaults: Object
|
||||||
) {}
|
// ) {}
|
||||||
}
|
// }
|
||||||
|
|
||||||
// const getSurveyMeta = gql`
|
// const getSurveyMeta = gql`
|
||||||
// query survey_meta {
|
// query survey_meta {
|
||||||
|
@ -83,6 +82,7 @@ export class AdminDataService {
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
// private apollo: Apollo,
|
// private apollo: Apollo,
|
||||||
|
public apiService: ApiService,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
getModelsMenuBar(): Observable<object[]> {
|
getModelsMenuBar(): Observable<object[]> {
|
||||||
|
@ -96,6 +96,9 @@ export class AdminDataService {
|
||||||
}
|
}
|
||||||
|
|
||||||
getSurveyMeta(): Observable<SurveyMeta> {
|
getSurveyMeta(): Observable<SurveyMeta> {
|
||||||
|
return this.apiService.getSurveyMetaApiSurveyMetaGet().pipe(map(
|
||||||
|
surveyMeta => this.surveyMeta = surveyMeta
|
||||||
|
))
|
||||||
console.warn('Migrate Graphql')
|
console.warn('Migrate Graphql')
|
||||||
return observableOf()
|
return observableOf()
|
||||||
// return this.apollo.query({
|
// return this.apollo.query({
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue