diff --git a/src/app/admin/admin.module.ts b/src/app/admin/admin.module.ts index 5a470702fa2c40519629cf8f692e6eeaa5cebf06..31d3b6efb4b864e11461954bc16c4748971a886c 100644 --- a/src/app/admin/admin.module.ts +++ b/src/app/admin/admin.module.ts @@ -20,9 +20,9 @@ import { DeleteJobsGroupComponent } from './components/manage-jobs/delete-jobs-g import { ManageJobsComponent } from './components/manage-jobs/manage-jobs.component'; import { ValidateJobComponent } from './components/manage-jobs/validate-job/validate-job.component'; import { ManageOrientationsComponent } from './components/manage-orientations/manage-orientations.component'; -import { AdministredStructuresComponent } from './components/manage-users/administred-structures/administred-structures.component'; import { DeleteUserComponent } from './components/manage-users/delete-user/delete-user.component'; import { ManageUsersComponent } from './components/manage-users/manage-users.component'; +import { StructuresCellRendererComponent } from './components/structures-cell-renderer/structures-cell-renderer.component'; import { AdminStructuresListComponent } from './components/structures-list/admin-structures-list.component'; // Since version 33.0 of ag-grid, the modules need to be registered in order to keep the legacy behavior @@ -41,7 +41,7 @@ provideGlobalGridOptions({ theme: 'legacy' }); DeleteJobComponent, DeleteJobsGroupComponent, DeleteEmployerComponent, - AdministredStructuresComponent, + StructuresCellRendererComponent, AttachedUsersComponent, AttachedJobsComponent, ManageJobsComponent, diff --git a/src/app/admin/components/manage-users/administred-structures/administred-structures.component.ts b/src/app/admin/components/manage-users/administred-structures/administred-structures.component.ts deleted file mode 100644 index 3ea76eb873355a8f4fca820c2134da4313d2a171..0000000000000000000000000000000000000000 --- a/src/app/admin/components/manage-users/administred-structures/administred-structures.component.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-administred-structures', - templateUrl: './administred-structures.component.html', - styleUrls: ['./administred-structures.component.scss'], -}) -export class AdministredStructuresComponent { - public structures: any; - - public agInit(params: any): void { - this.structures = params; - } -} diff --git a/src/app/admin/components/manage-users/manage-users.component.ts b/src/app/admin/components/manage-users/manage-users.component.ts index e2f0755650a4c009c37dc930e13821264546460b..a1c28e4af65483fe1fc89c125f20b2c01753b3ac 100644 --- a/src/app/admin/components/manage-users/manage-users.component.ts +++ b/src/app/admin/components/manage-users/manage-users.component.ts @@ -16,7 +16,7 @@ import { NotificationService } from '../../../services/notification.service'; import { TempUserService } from '../../../services/temp-user.service'; import { AdminService } from '../../services/admin.service'; import { BooleanCellRendererComponent } from '../boolean-cell-renderer/boolean-cell-renderer'; -import { AdministredStructuresComponent } from './administred-structures/administred-structures.component'; +import { StructuresCellRendererComponent } from '../structures-cell-renderer/structures-cell-renderer.component'; import { DeleteUserComponent } from './delete-user/delete-user.component'; type UsersStatus = 'attached' | 'unattached'; @@ -116,7 +116,7 @@ export class ManageUsersComponent { }, { headerName: 'Structures administrées', - cellRenderer: 'administredStructuresComponent', + cellRenderer: 'structuresCellRendererComponent', cellRendererParams: { structures: 'structures', }, @@ -210,7 +210,7 @@ export class ManageUsersComponent { }, { headerName: 'Structure(s)', - cellRenderer: 'administredStructuresComponent', + cellRenderer: 'structuresCellRendererComponent', cellRendererParams: { structures: 'structures', }, @@ -254,7 +254,7 @@ export class ManageUsersComponent { this.components = { deleteUserComponent: DeleteUserComponent, isReferent: BooleanCellRendererComponent, - administredStructuresComponent: AdministredStructuresComponent, + structuresCellRendererComponent: StructuresCellRendererComponent, }; this.findAttachedUsers(); this.findUnAttachedUsers(); @@ -485,7 +485,7 @@ export class ManageUsersComponent { } switch (cellRenderer) { - case 'administredStructuresComponent': + case 'structuresCellRendererComponent': return this.formatStructureCell(params.value); default: return params.value; diff --git a/src/app/admin/components/manage-users/administred-structures/administred-structures.component.html b/src/app/admin/components/structures-cell-renderer/structures-cell-renderer.component.html similarity index 100% rename from src/app/admin/components/manage-users/administred-structures/administred-structures.component.html rename to src/app/admin/components/structures-cell-renderer/structures-cell-renderer.component.html diff --git a/src/app/admin/components/manage-users/administred-structures/administred-structures.component.scss b/src/app/admin/components/structures-cell-renderer/structures-cell-renderer.component.scss similarity index 100% rename from src/app/admin/components/manage-users/administred-structures/administred-structures.component.scss rename to src/app/admin/components/structures-cell-renderer/structures-cell-renderer.component.scss diff --git a/src/app/admin/components/structures-cell-renderer/structures-cell-renderer.component.ts b/src/app/admin/components/structures-cell-renderer/structures-cell-renderer.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..0b1dd30e284e83906baff388a47f76512b4dc085 --- /dev/null +++ b/src/app/admin/components/structures-cell-renderer/structures-cell-renderer.component.ts @@ -0,0 +1,14 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-structures-cell-renderer', + templateUrl: './structures-cell-renderer.component.html', + styleUrls: ['./structures-cell-renderer.component.scss'], +}) +export class StructuresCellRendererComponent { + public structures: any; + + public agInit(params: any): void { + this.structures = params; + } +}