Skip to content
Snippets Groups Projects
Commit e2f756bd authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FEAT #14790 TIME 0:15 add param in route roles

parent 90ccb5a6
No related branches found
No related tags found
No related merge requests found
......@@ -103,7 +103,6 @@ export class DiffusionsListComponent implements OnInit {
) { }
async ngOnInit(): Promise<void> {
await this.initParams();
await this.initRoles();
if (this.resId !== null && this.resId != 0 && this.target !== 'redirect') {
this.loadListinstance(this.resId);
......@@ -332,11 +331,12 @@ export class DiffusionsListComponent implements OnInit {
return new Promise((resolve, reject) => {
this.http.get(`../rest/roles?context=${this.target}`).pipe(
map((data: any) => {
this.keepDiffusionRoleInOutgoingIndexation = data.parameters['keepDiffusionRoleInOutgoingIndexation'];
data.roles = data.roles.map((role: any) => {
return {
...role,
id: role.id,
}
};
});
return data.roles;
}),
......@@ -362,18 +362,6 @@ export class DiffusionsListComponent implements OnInit {
});
}
initParams() {
return new Promise((resolve, reject) => {
this.http.get('../rest/parameters/keepDiffusionRoleInOutgoingIndexation')
.subscribe((data: any) => {
this.keepDiffusionRoleInOutgoingIndexation = data.parameter.param_value_int;
resolve(true);
}, (err) => {
this.notify.handleSoftErrors(err);
});
});
}
deleteItem(roleId: string, index: number) {
this.diffList[roleId].items.splice(index, 1);
if (this.diffFormControl !== undefined) {
......
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