Skip to content
Snippets Groups Projects
Commit 83662102 authored by Jérémie BRISON's avatar Jérémie BRISON
Browse files

refacto(structure) : change model of structure

parent 13e5b816
No related branches found
No related tags found
2 merge requests!4Dev,!3refacto(structure) : change model of structure
...@@ -112,22 +112,10 @@ export class Structure { ...@@ -112,22 +112,10 @@ export class Structure {
cultureEtSecuriteNumerique: string[]; cultureEtSecuriteNumerique: string[];
@Prop() @Prop()
wifiEnAccesLibre: boolean; equipementsEtServicesProposes: string[];
@Prop() @Prop()
ordinateurs: boolean; ordinateurs: number;
@Prop()
nombre: string;
@Prop()
tablettes: boolean;
@Prop()
bornesNumeriques: boolean;
@Prop()
imprimantes: boolean;
@Prop() @Prop()
precisionsSiNecessaire: string; precisionsSiNecessaire: string;
......
...@@ -35,11 +35,7 @@ export class StructuresController { ...@@ -35,11 +35,7 @@ export class StructuresController {
this.structureService.countByStructureKey('publicsAcceptes'), this.structureService.countByStructureKey('publicsAcceptes'),
this.structureService.countByStructureKey('modalitesDacces'), this.structureService.countByStructureKey('modalitesDacces'),
this.structureService.countByStructureKey('lesCompetencesDeBase'), this.structureService.countByStructureKey('lesCompetencesDeBase'),
this.structureService.countByEquipmentsKey('wifiEnAccesLibre', 'Wifi en accès libre'), this.structureService.countByStructureKey('equipementsEtServicesProposes'),
this.structureService.countByEquipmentsKey('ordinateurs', 'Ordinateurs'),
this.structureService.countByEquipmentsKey('tablettes', 'Tablettes'),
this.structureService.countByEquipmentsKey('bornesNumeriques', 'Bornes numériques'),
this.structureService.countByEquipmentsKey('imprimantes', 'Imprimantes'),
]); ]);
// Return a concat of all arrays // Return a concat of all arrays
return data.reduce((a, b) => [...a, ...b]); return data.reduce((a, b) => [...a, ...b]);
......
...@@ -105,10 +105,6 @@ export class StructuresService { ...@@ -105,10 +105,6 @@ export class StructuresService {
); );
} }
public async countByEquipmentsKey(key: string, displayKey: string): Promise<any> {
return [{ id: displayKey, count: await this.structureModel.countDocuments({ [key]: true }).exec() }];
}
public getCoord(numero: string, address: string, zipcode: string): Observable<AxiosResponse<any>> { public getCoord(numero: string, address: string, zipcode: string): Observable<AxiosResponse<any>> {
const req = const req =
'https://download.data.grandlyon.com/geocoding/photon/api' + '?q=' + numero + ' ' + address + ' ' + zipcode; 'https://download.data.grandlyon.com/geocoding/photon/api' + '?q=' + numero + ' ' + address + ' ' + zipcode;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment