Skip to content

Commit

Permalink
Frontend: get profile #1105
Browse files Browse the repository at this point in the history
  • Loading branch information
TheoLechemia committed Oct 27, 2020
1 parent 2de640e commit e71de3e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
10 changes: 7 additions & 3 deletions frontend/src/app/GN2CommonModule/form/data-form.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const FormatMapMime = new Map([
@Injectable()
export class DataFormService {
private _blob: Blob;
constructor(private _http: HttpClient) {}
constructor(private _http: HttpClient) { }

getNomenclature(
codeNomenclatureType: string,
Expand Down Expand Up @@ -484,8 +484,8 @@ export class DataFormService {
application === 'GeoNature'
? `${AppConfig.API_ENDPOINT}/${api}`
: application === 'TaxHub'
? `${AppConfig.API_TAXHUB}/${api}`
: api;
? `${AppConfig.API_TAXHUB}/${api}`
: api;

return this._http.get<any>(url, { params: queryString });
}
Expand Down Expand Up @@ -545,4 +545,8 @@ export class DataFormService {
addPlace(place) {
return this._http.post<any>(`${AppConfig.API_ENDPOINT}/gn_commons/place`, place);
}

getProfile(cdRef) {
return this._http.get(`${AppConfig.API_ENDPOINT}/gn_profiles/valid_profile/${cdRef}`)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,12 @@ <h5 class="underlined underlined-sm main-color"> Médias
<td> {{row.comment}} </td>
</tr>
</tbody>
</table>
</table>

<h3> Profil </h3>

<p>
$ </p>
</mat-tab>

<mat-tab-group>
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export class SyntheseInfoObsComponent implements OnInit {
public isLoading = false;
public email;
public mailto: String;
public profile: any;
public validationColor = {
'0': '#FFFFFF',
'1': '#8BC34A',
Expand All @@ -45,6 +46,9 @@ export class SyntheseInfoObsComponent implements OnInit {
ngOnInit() {
this.loadOneSyntheseReleve(this.idSynthese);
this.loadValidationHistory(this.uuidSynthese);
this._gnDataService.getProfile(60577).subscribe(profil => {
this.profile = profil;
});
}

loadOneSyntheseReleve(idSynthese) {
Expand Down

0 comments on commit e71de3e

Please sign in to comment.