Commit b2f03b5d authored by ndurand's avatar ndurand
Browse files

suppression fonction inutile

parent c342e156
......@@ -84,14 +84,14 @@
</div>
</ng-container>
<ng-container *ngSwitchCase="'USER-DEFINED'">
<div *ngIf="structure.udt_name" class="form-group row">
<div *ngIf="structure.udt_name && enumerations[structure.udt_name ]" class="form-group row">
<label [for]="structure.column_name" class="col-sm-3 col-form-label">{{structure.column_name}}</label>
<div class="col-sm-5">
<select class="form-control " [(ngModel)]="feature.properties[ structure.column_name ]"
[required]="!structure.is_nullable" [name]="structure.column_name">
<option hidden selected disabled>Sélectionnez un ou plusieurs paramètres</option>
<option
*ngFor="let item of getEnumByUdtName(structure.udt_name)" [ngValue]="item">
*ngFor="let item of enumerations[structure.udt_name ]" [ngValue]="item">
<span>{{ item }}</span>
</option>
</select>
......@@ -99,13 +99,13 @@
</div>
</ng-container>
<ng-container *ngSwitchCase="'ARRAY'">
<div *ngIf="structure.udt_name" class="form-group row">
<div *ngIf="structure.udt_name && enumerations[structure.udt_name ]" class="form-group row">
<label [for]="structure.column_name" class="col-sm-3 col-form-label">{{structure.column_name}}</label>
<div class="col-sm-8">
<ng-multiselect-dropdown
[placeholder]="'Sélectionnez un ou plusieurs paramètres'"
class=""
[data]="getEnumByUdtName(structure.udt_name)"
[data]="enumerations[structure.udt_name ]"
[(ngModel)]="feature.properties[ structure.column_name ]"
[settings]="dropdownSettings"
[required]="!structure.is_nullable"
......
......@@ -76,10 +76,5 @@ export class EditDataComponent implements OnInit {
saveData(): void {
this.dataService.postData([this.feature]);
}
/** */
getEnumByUdtName(udtName: string): Array<string> {
return this.enumerations[udtName] ? this.enumerations[udtName] : [];
}
}
import { Component, OnInit, ViewChildren, QueryList, Input } from '@angular/core';
import { DataService } from '../../services/data.service';
import { FeatureCollection, Feature } from '../../models/layer-type';
import { ActivatedRoute } from '@angular/router';
import { SortableHeaderDirective, SortEvent } from 'src/app/directives/sortable-header.directive';
import { Observable } from 'rxjs';
import { DecimalPipe } from '@angular/common';
import { TableViewDataService } from 'src/app/services/table-view-data.service';
import { EnvService } from 'src/app/services/env.service';
import { Structure } from 'src/app/models/structure';
@Component({
......
......@@ -5,7 +5,7 @@ import {BehaviorSubject, Observable, of, Subject} from 'rxjs';
import {DecimalPipe} from '@angular/common';
import {debounceTime, delay, switchMap, tap} from 'rxjs/operators';
import { Feature } from '../models/layer-type';
import { SortDirection, SortEvent } from 'src/app/directives/sortable-header.directive';
import { SortDirection } from 'src/app/directives/sortable-header.directive';
import { EnvService } from './env.service';
import { Structure } from '../models/structure';
......@@ -64,16 +64,17 @@ export class TableViewDataService {
this.search$.next();
}
getStructures$(): Observable<Structure[]> {return this.structures$.asObservable(); }
getEnumerations$(): Observable<{}> {return this.enumerations$.asObservable(); }
getFeatures$(): Observable<Feature[]> { return this.features$.asObservable(); }
getTotal$(): Observable<number> { return this.total$.asObservable(); }
getLoading$(): Observable<boolean> { return this.loading$.asObservable(); }
getLoading$(): Observable<boolean> { return this.loading$.asObservable(); }
getEnumerations$(): Observable<{}> {return this.enumerations$.asObservable(); }
getEnumerations(): {} { return this.enumerations; }
getStructures(): Structure[] { return this.structures; }
getStructures$(): Observable<Structure[]> {return this.structures$.asObservable(); }
getFeatures$(): Observable<Feature[]> { return this.features$.asObservable(); }
get page(): number { return this.state.page; }
set page(page: number) { this._set({page}); }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment