Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jacquesfize committed Jan 23, 2024
1 parent 7d6730e commit fa0d765
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
1 change: 0 additions & 1 deletion backend/geonature/core/gn_synthese/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,6 @@ def general_stats(permissions):
select(func.count("*"))
.select_from(TDatasets)
.where(TDatasets.filter_by_readable().whereclause)

)
query = select(
func.count(Synthese.id_synthese),
Expand Down
18 changes: 9 additions & 9 deletions frontend/src/app/userModule/user.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { DataFormService } from '@geonature_common/form/data-form.service';
styleUrls: ['./user.component.scss'],
})
export class UserComponent implements OnInit, AfterViewInit {

private roleForm: UntypedFormGroup;

form: UntypedFormGroup;
Expand All @@ -23,23 +22,25 @@ export class UserComponent implements OnInit, AfterViewInit {
private userService: UserDataService,
private dataService: DataFormService,
private config: ConfigService
) { }
) {}

ngOnInit() {
//recupération des infos custom depuis la config de GN
this.additionalFieldsForm = [...this.config.ACCOUNT_MANAGEMENT.ACCOUNT_FORM]
.map(form_element => {
this.additionalFieldsForm = [...this.config.ACCOUNT_MANAGEMENT.ACCOUNT_FORM].map(
(form_element) => {
//on desactive les elements customs
form_element['disable'] = true;
return form_element;
});
}
);
this.initForm();
this.form.disable();
}

ngAfterViewInit() {
//patch du formulaire à partir des infos de l'utilisateur connecté
this.dataService.getRole(this.authService.getCurrentUser().id_role)
this.dataService
.getRole(this.authService.getCurrentUser().id_role)
.subscribe((user) => this.form.patchValue(user));
}

Expand All @@ -53,14 +54,13 @@ export class UserComponent implements OnInit, AfterViewInit {
[Validators.pattern('^[a-z0-9._-]+@[a-z0-9._-]{2,}.[a-z]{2,4}$'), Validators.required],
],
remarques: ['', null],
champs_addi: this.fb.group({})
champs_addi: this.fb.group({}),
});
}

save() {
if (this.form.valid) {
this.userService.putRole(this.form.value)
.subscribe((res) => this.form.disable());
this.userService.putRole(this.form.value).subscribe((res) => this.form.disable());
}
}

Expand Down

0 comments on commit fa0d765

Please sign in to comment.