From d6e5be3fe1302e166afec112ac8e30aa7e474717 Mon Sep 17 00:00:00 2001 From: apuente Date: Mon, 30 Sep 2024 19:23:01 +0200 Subject: [PATCH] refs #798 Merge all active branches into develop --- ogWebconsole/src/app/app-routing.module.ts | 2 + ogWebconsole/src/app/app.module.ts | 34 +++++++------ .../add-role-modal.component.html | 18 +++---- .../add-role-modal.component.ts | 49 +++++++++++++++++-- .../admin/roles/roles/roles.component.ts | 10 ++-- .../admin-general.component.css} | 0 .../admin-general.component.html | 1 + .../admin-general.component.spec.ts | 23 +++++++++ .../admin-general/admin-general.component.ts | 10 ++++ .../advanced-search.component.css} | 0 .../advanced-search.component.html | 1 + .../advanced-search.component.spec.ts | 23 +++++++++ .../advanced-search.component.ts | 10 ++++ .../app/components/groups/groups.component.ts | 24 ++++----- .../components/groups/{ => model}/model.ts | 0 .../groups/{ => services}/data.service.ts | 2 +- .../acctions-modal.component.css | 0 .../acctions-modal.component.html | 0 .../acctions-modal.component.spec.ts | 0 .../acctions-modal.component.ts | 4 +- .../classroom-view/classroom-view-modal.ts | 0 .../classroom-view.component.css | 0 .../classroom-view.component.html | 0 .../classroom-view.component.spec.ts | 0 .../classroom-view.component.ts | 0 .../client-tab-view.component.css | 0 .../client-tab-view.component.html | 0 .../client-tab-view.component.spec.ts | 0 .../client-tab-view.component.ts | 2 +- .../client-tab-view/data.service.ts | 0 .../client-view/client-view.component.css | 0 .../client-view/client-view.component.html | 0 .../client-view/client-view.component.spec.ts | 0 .../client-view/client-view.component.ts | 0 .../create-client/create-client.component.css | 0 .../create-client.component.html | 0 .../create-client.component.spec.ts | 0 .../create-client/create-client.component.ts | 2 +- .../edit-client/edit-client.component.css | 0 .../edit-client/edit-client.component.html | 0 .../edit-client/edit-client.component.spec.ts | 0 .../edit-client/edit-client.component.ts | 2 +- .../groups/shared/legend/legend.component.css | 0 .../{ => shared}/legend/legend.component.html | 0 .../legend/legend.component.spec.ts | 0 .../{ => shared}/legend/legend.component.ts | 0 .../create-organizational-unit.component.css | 0 .../create-organizational-unit.component.html | 0 ...eate-organizational-unit.component.spec.ts | 0 .../create-organizational-unit.component.ts | 2 +- .../edit-organizational-unit.component.css | 0 .../edit-organizational-unit.component.html | 0 ...edit-organizational-unit.component.spec.ts | 0 .../edit-organizational-unit.component.ts | 2 +- .../show-organizational-unit.component.css | 0 .../show-organizational-unit.component.html | 0 ...show-organizational-unit.component.spec.ts | 0 .../show-organizational-unit.component.ts | 0 .../save-filters-dialog.component.css | 0 .../save-filters-dialog.component.html | 0 .../save-filters-dialog.component.spec.ts | 0 .../save-filters-dialog.component.ts | 0 .../tree-view/tree-view.component.css | 0 .../tree-view/tree-view.component.html | 0 .../tree-view/tree-view.component.spec.ts | 0 .../tree-view/tree-view.component.ts | 0 .../app/components/login/login.component.ts | 2 +- 67 files changed, 167 insertions(+), 56 deletions(-) rename ogWebconsole/src/app/components/groups/{legend/legend.component.css => components/admin-general/admin-general.component.css} (100%) create mode 100644 ogWebconsole/src/app/components/groups/components/admin-general/admin-general.component.html create mode 100644 ogWebconsole/src/app/components/groups/components/admin-general/admin-general.component.spec.ts create mode 100644 ogWebconsole/src/app/components/groups/components/admin-general/admin-general.component.ts rename ogWebconsole/src/app/components/groups/{save-filters-dialog/save-filters-dialog.component.css => components/advanced-search/advanced-search.component.css} (100%) create mode 100644 ogWebconsole/src/app/components/groups/components/advanced-search/advanced-search.component.html create mode 100644 ogWebconsole/src/app/components/groups/components/advanced-search/advanced-search.component.spec.ts create mode 100644 ogWebconsole/src/app/components/groups/components/advanced-search/advanced-search.component.ts rename ogWebconsole/src/app/components/groups/{ => model}/model.ts (100%) rename ogWebconsole/src/app/components/groups/{ => services}/data.service.ts (99%) rename ogWebconsole/src/app/components/groups/{ => shared}/acctions-modal/acctions-modal.component.css (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/acctions-modal/acctions-modal.component.html (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/acctions-modal/acctions-modal.component.spec.ts (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/acctions-modal/acctions-modal.component.ts (89%) rename ogWebconsole/src/app/components/groups/{ => shared}/classroom-view/classroom-view-modal.ts (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/classroom-view/classroom-view.component.css (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/classroom-view/classroom-view.component.html (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/classroom-view/classroom-view.component.spec.ts (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/classroom-view/classroom-view.component.ts (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/client-tab-view/client-tab-view.component.css (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/client-tab-view/client-tab-view.component.html (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/client-tab-view/client-tab-view.component.spec.ts (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/client-tab-view/client-tab-view.component.ts (97%) rename ogWebconsole/src/app/components/groups/{ => shared}/client-tab-view/data.service.ts (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/client-view/client-view.component.css (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/client-view/client-view.component.html (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/client-view/client-view.component.spec.ts (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/client-view/client-view.component.ts (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/clients/create-client/create-client.component.css (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/clients/create-client/create-client.component.html (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/clients/create-client/create-client.component.spec.ts (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/clients/create-client/create-client.component.ts (98%) rename ogWebconsole/src/app/components/groups/{ => shared}/clients/edit-client/edit-client.component.css (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/clients/edit-client/edit-client.component.html (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/clients/edit-client/edit-client.component.spec.ts (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/clients/edit-client/edit-client.component.ts (98%) create mode 100644 ogWebconsole/src/app/components/groups/shared/legend/legend.component.css rename ogWebconsole/src/app/components/groups/{ => shared}/legend/legend.component.html (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/legend/legend.component.spec.ts (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/legend/legend.component.ts (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/organizational-units/create-organizational-unit/create-organizational-unit.component.css (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/organizational-units/create-organizational-unit/create-organizational-unit.component.html (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/organizational-units/create-organizational-unit/create-organizational-unit.component.spec.ts (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/organizational-units/create-organizational-unit/create-organizational-unit.component.ts (99%) rename ogWebconsole/src/app/components/groups/{ => shared}/organizational-units/edit-organizational-unit/edit-organizational-unit.component.css (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/organizational-units/edit-organizational-unit/edit-organizational-unit.component.html (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/organizational-units/edit-organizational-unit/edit-organizational-unit.component.spec.ts (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/organizational-units/edit-organizational-unit/edit-organizational-unit.component.ts (99%) rename ogWebconsole/src/app/components/groups/{ => shared}/organizational-units/show-organizational-unit/show-organizational-unit.component.css (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/organizational-units/show-organizational-unit/show-organizational-unit.component.html (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/organizational-units/show-organizational-unit/show-organizational-unit.component.spec.ts (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/organizational-units/show-organizational-unit/show-organizational-unit.component.ts (100%) create mode 100644 ogWebconsole/src/app/components/groups/shared/save-filters-dialog/save-filters-dialog.component.css rename ogWebconsole/src/app/components/groups/{ => shared}/save-filters-dialog/save-filters-dialog.component.html (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/save-filters-dialog/save-filters-dialog.component.spec.ts (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/save-filters-dialog/save-filters-dialog.component.ts (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/tree-view/tree-view.component.css (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/tree-view/tree-view.component.html (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/tree-view/tree-view.component.spec.ts (100%) rename ogWebconsole/src/app/components/groups/{ => shared}/tree-view/tree-view.component.ts (100%) diff --git a/ogWebconsole/src/app/app-routing.module.ts b/ogWebconsole/src/app/app-routing.module.ts index e1f456c..fc0ea8a 100644 --- a/ogWebconsole/src/app/app-routing.module.ts +++ b/ogWebconsole/src/app/app-routing.module.ts @@ -37,6 +37,8 @@ const routes: Routes = [ { path: 'dhcp', component: OgdhcpComponent }, { path: 'dhcp-subnets', component: OgDhcpSubnetsComponent }, { path: 'commands', component: CommandsComponent }, + { path: 'commands-groups', component: CommandsGroupsComponent }, + { path: 'commands-task', component: CommandsTaskComponent }, { path: 'calendars', component: CalendarComponent }, ], }, diff --git a/ogWebconsole/src/app/app.module.ts b/ogWebconsole/src/app/app.module.ts index abfb8b6..0b7ed93 100644 --- a/ogWebconsole/src/app/app.module.ts +++ b/ogWebconsole/src/app/app.module.ts @@ -33,27 +33,27 @@ import { AddRoleModalComponent } from './components/admin/roles/roles/add-role-m import { ChangePasswordModalComponent } from './components/admin/users/users/change-password-modal/change-password-modal.component'; import { GroupsComponent } from './components/groups/groups.component'; import { MatDividerModule } from '@angular/material/divider'; -import { CreateOrganizationalUnitComponent } from './components/groups/organizational-units/create-organizational-unit/create-organizational-unit.component'; +import { CreateOrganizationalUnitComponent } from './components/groups/shared/organizational-units/create-organizational-unit/create-organizational-unit.component'; import { MatStepperModule } from '@angular/material/stepper'; import { MatSlideToggleModule } from '@angular/material/slide-toggle'; -import { CreateClientComponent } from './components/groups/clients/create-client/create-client.component'; +import { CreateClientComponent } from './components/groups/shared/clients/create-client/create-client.component'; import { DeleteModalComponent } from './shared/delete_modal/delete-modal/delete-modal.component'; -import { EditOrganizationalUnitComponent } from './components/groups/organizational-units/edit-organizational-unit/edit-organizational-unit.component'; -import { EditClientComponent } from './components/groups/clients/edit-client/edit-client.component'; -import { ClassroomViewComponent } from './components/groups/classroom-view/classroom-view.component'; +import { EditOrganizationalUnitComponent } from './components/groups/shared/organizational-units/edit-organizational-unit/edit-organizational-unit.component'; +import { EditClientComponent } from './components/groups/shared/clients/edit-client/edit-client.component'; +import { ClassroomViewComponent } from './components/groups/shared/classroom-view/classroom-view.component'; import { MatProgressSpinner } from "@angular/material/progress-spinner"; import { MatMenu, MatMenuItem, MatMenuTrigger } from "@angular/material/menu"; import { MatAutocomplete } from "@angular/material/autocomplete"; import { MatChip, MatChipListbox, MatChipOption, MatChipSet, MatChipsModule } from "@angular/material/chips"; -import { ClientViewComponent } from './components/groups/client-view/client-view.component'; +import { ClientViewComponent } from './components/groups/shared/client-view/client-view.component'; import { MatTab, MatTabGroup } from "@angular/material/tabs"; import { MatTooltip } from "@angular/material/tooltip"; import { MatExpansionModule } from '@angular/material/expansion'; import { DragDropModule } from '@angular/cdk/drag-drop'; import { ToastrModule } from 'ngx-toastr'; -import { ShowOrganizationalUnitComponent } from './components/groups/organizational-units/show-organizational-unit/show-organizational-unit.component'; +import { ShowOrganizationalUnitComponent } from './components/groups/shared/organizational-units/show-organizational-unit/show-organizational-unit.component'; import { MatGridList, MatGridTile } from "@angular/material/grid-list"; -import { TreeViewComponent } from './components/groups/tree-view/tree-view.component'; +import { TreeViewComponent } from './components/groups/shared/tree-view/tree-view.component'; import { MatNestedTreeNode, MatTree, @@ -62,11 +62,11 @@ import { MatTreeNodePadding, MatTreeNodeToggle } from "@angular/material/tree"; -import { LegendComponent } from './components/groups/legend/legend.component'; -import { ClassroomViewDialogComponent } from './components/groups/classroom-view/classroom-view-modal'; +import { LegendComponent } from './components/groups/shared/legend/legend.component'; +import { ClassroomViewDialogComponent } from './components/groups/shared/classroom-view/classroom-view-modal'; import { MatPaginator } from "@angular/material/paginator"; -import { SaveFiltersDialogComponent } from './components/groups/save-filters-dialog/save-filters-dialog.component'; -import { AcctionsModalComponent } from './components/groups/acctions-modal/acctions-modal.component'; +import { SaveFiltersDialogComponent } from './components/groups/shared/save-filters-dialog/save-filters-dialog.component'; +import { AcctionsModalComponent } from './components/groups/shared/acctions-modal/acctions-modal.component'; import { ImagesComponent } from './components/ogboot/images/images.component'; import { CreateImageComponent } from './components/ogboot/images/create-image/create-image/create-image.component'; import { InfoImageComponent } from './components/ogboot/images/info-image/info-image/info-image.component'; @@ -97,7 +97,9 @@ import { CreateCommandGroupComponent } from './components/commands/commands-grou import { DetailCommandGroupComponent } from './components/commands/commands-groups/detail-command-group/detail-command-group.component'; import { CreateTaskComponent } from './components/commands/commands-task/create-task/create-task.component'; import { DetailTaskComponent } from './components/commands/commands-task/detail-task/detail-task.component'; -import { ClientTabViewComponent } from './components/groups/client-tab-view/client-tab-view.component'; +import { ClientTabViewComponent } from './components/groups/shared/client-tab-view/client-tab-view.component'; +import { AdminGeneralComponent } from './components/groups/components/admin-general/admin-general.component'; +import { AdvancedSearchComponent } from './components/groups/components/advanced-search/advanced-search.component'; @NgModule({ declarations: [ AppComponent, @@ -145,14 +147,16 @@ import { ClientTabViewComponent } from './components/groups/client-tab-view/clie CreateCommandComponent, CalendarComponent, CreateCalendarComponent, - CreateCalendarRuleComponent + CreateCalendarRuleComponent, CommandsGroupsComponent, CommandsTaskComponent, CreateCommandGroupComponent, DetailCommandGroupComponent, CreateTaskComponent, DetailTaskComponent, - ClientTabViewComponent + ClientTabViewComponent, + AdminGeneralComponent, + AdvancedSearchComponent ], bootstrap: [AppComponent], imports: [BrowserModule, diff --git a/ogWebconsole/src/app/components/admin/roles/roles/add-role-modal/add-role-modal.component.html b/ogWebconsole/src/app/components/admin/roles/roles/add-role-modal/add-role-modal.component.html index 9423d7a..344162f 100644 --- a/ogWebconsole/src/app/components/admin/roles/roles/add-role-modal/add-role-modal.component.html +++ b/ogWebconsole/src/app/components/admin/roles/roles/add-role-modal/add-role-modal.component.html @@ -1,24 +1,22 @@

Añadir Rol (TBD)

-
+ Nombre - +

Permisos:

-

Gestionar los usuarios

-

Configuración PXE

-

Imágenes de la consola web

-

Gestionar los distintos componentes

-

Crear imágenes

-

script de configuración del servidor

-

...

+

Super Admin

+

Admin de Unidad Organizativa

+

Operador de Unidad Organizativa

+

Unidad Organizativa Mínima

+

Usuario

- +
diff --git a/ogWebconsole/src/app/components/admin/roles/roles/add-role-modal/add-role-modal.component.ts b/ogWebconsole/src/app/components/admin/roles/roles/add-role-modal/add-role-modal.component.ts index 2e4540a..b38a0d8 100644 --- a/ogWebconsole/src/app/components/admin/roles/roles/add-role-modal/add-role-modal.component.ts +++ b/ogWebconsole/src/app/components/admin/roles/roles/add-role-modal/add-role-modal.component.ts @@ -1,19 +1,62 @@ import { HttpClient } from '@angular/common/http'; import { Component, Inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { FormBuilder, FormGroup } from '@angular/forms'; @Component({ selector: 'app-add-role-modal', templateUrl: './add-role-modal.component.html', - styleUrl: './add-role-modal.component.css' + styleUrls: ['./add-role-modal.component.css'] }) export class AddRoleModalComponent { + roleForm: FormGroup; + constructor( public dialogRef: MatDialogRef, @Inject(MAT_DIALOG_DATA) public data: any, - private http: HttpClient - ) {} + private http: HttpClient, + private fb: FormBuilder + ) { + this.roleForm = this.fb.group({ + name: [''], + superAdmin: [false], + orgAdmin: [false], + orgOperator: [false], + orgMinimal: [false], + userRole: [false] + }); + } + onNoClick(): void { this.dialogRef.close(); } + + onSubmit(): void { + if (this.roleForm.valid) { + const formValues = this.roleForm.value; + + const selectedPermissions: string[] = []; + if (formValues.superAdmin) selectedPermissions.push('ROLE_SUPER_ADMIN'); + if (formValues.orgAdmin) selectedPermissions.push('ROLE_ORGANIZATIONAL_UNIT_ADMIN'); + if (formValues.orgOperator) selectedPermissions.push('ROLE_ORGANIZATIONAL_UNIT_OPERATOR'); + if (formValues.orgMinimal) selectedPermissions.push('ROLE_ORGANIZATIONAL_UNIT_MINIMAL'); + if (formValues.userRole) selectedPermissions.push('ROLE_USER'); + + + const payload = { + name: formValues.name, + permissions: selectedPermissions, + enabled: true + }; + + this.http.post('http://127.0.0.1:8001/user-groups', payload).subscribe( + (response) => { + this.dialogRef.close(); + }, + (error) => { + console.error('Error al añadir rol', error); + } + ); + } + } } diff --git a/ogWebconsole/src/app/components/admin/roles/roles/roles.component.ts b/ogWebconsole/src/app/components/admin/roles/roles/roles.component.ts index 07d9eab..2541a97 100644 --- a/ogWebconsole/src/app/components/admin/roles/roles/roles.component.ts +++ b/ogWebconsole/src/app/components/admin/roles/roles/roles.component.ts @@ -51,10 +51,9 @@ export class RolesComponent implements OnInit { addUser() { const dialogRef = this.dialog.open(AddRoleModalComponent); - /* dialogRef.componentInstance.roleAdded.subscribe(() => { + dialogRef.afterClosed().subscribe((result) => { this.loadRoles(); - }); */ - + }); } deleteRole(role: any): void { @@ -69,16 +68,13 @@ export class RolesComponent implements OnInit { this.http.delete(apiUrl).subscribe({ next: () => { - console.log('Role deleted successfully'); this.loadRoles(); this.toastService.success('Role deleted successfully'); }, error: (error) => { - console.error('Error deleting role:', error); + this.toastService.error('Error deleting role:', error); } }); - } else { - console.log('Role deletion cancelled'); } }); } diff --git a/ogWebconsole/src/app/components/groups/legend/legend.component.css b/ogWebconsole/src/app/components/groups/components/admin-general/admin-general.component.css similarity index 100% rename from ogWebconsole/src/app/components/groups/legend/legend.component.css rename to ogWebconsole/src/app/components/groups/components/admin-general/admin-general.component.css diff --git a/ogWebconsole/src/app/components/groups/components/admin-general/admin-general.component.html b/ogWebconsole/src/app/components/groups/components/admin-general/admin-general.component.html new file mode 100644 index 0000000..8ead471 --- /dev/null +++ b/ogWebconsole/src/app/components/groups/components/admin-general/admin-general.component.html @@ -0,0 +1 @@ +

admin-general works!

diff --git a/ogWebconsole/src/app/components/groups/components/admin-general/admin-general.component.spec.ts b/ogWebconsole/src/app/components/groups/components/admin-general/admin-general.component.spec.ts new file mode 100644 index 0000000..ef42d9a --- /dev/null +++ b/ogWebconsole/src/app/components/groups/components/admin-general/admin-general.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { AdminGeneralComponent } from './admin-general.component'; + +describe('AdminGeneralComponent', () => { + let component: AdminGeneralComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [AdminGeneralComponent] + }) + .compileComponents(); + + fixture = TestBed.createComponent(AdminGeneralComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ogWebconsole/src/app/components/groups/components/admin-general/admin-general.component.ts b/ogWebconsole/src/app/components/groups/components/admin-general/admin-general.component.ts new file mode 100644 index 0000000..ae28976 --- /dev/null +++ b/ogWebconsole/src/app/components/groups/components/admin-general/admin-general.component.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-admin-general', + templateUrl: './admin-general.component.html', + styleUrl: './admin-general.component.css' +}) +export class AdminGeneralComponent { + +} diff --git a/ogWebconsole/src/app/components/groups/save-filters-dialog/save-filters-dialog.component.css b/ogWebconsole/src/app/components/groups/components/advanced-search/advanced-search.component.css similarity index 100% rename from ogWebconsole/src/app/components/groups/save-filters-dialog/save-filters-dialog.component.css rename to ogWebconsole/src/app/components/groups/components/advanced-search/advanced-search.component.css diff --git a/ogWebconsole/src/app/components/groups/components/advanced-search/advanced-search.component.html b/ogWebconsole/src/app/components/groups/components/advanced-search/advanced-search.component.html new file mode 100644 index 0000000..fdd7cb5 --- /dev/null +++ b/ogWebconsole/src/app/components/groups/components/advanced-search/advanced-search.component.html @@ -0,0 +1 @@ +

advanced-search works!

diff --git a/ogWebconsole/src/app/components/groups/components/advanced-search/advanced-search.component.spec.ts b/ogWebconsole/src/app/components/groups/components/advanced-search/advanced-search.component.spec.ts new file mode 100644 index 0000000..6846920 --- /dev/null +++ b/ogWebconsole/src/app/components/groups/components/advanced-search/advanced-search.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { AdvancedSearchComponent } from './advanced-search.component'; + +describe('AdvancedSearchComponent', () => { + let component: AdvancedSearchComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [AdvancedSearchComponent] + }) + .compileComponents(); + + fixture = TestBed.createComponent(AdvancedSearchComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/ogWebconsole/src/app/components/groups/components/advanced-search/advanced-search.component.ts b/ogWebconsole/src/app/components/groups/components/advanced-search/advanced-search.component.ts new file mode 100644 index 0000000..f9fc410 --- /dev/null +++ b/ogWebconsole/src/app/components/groups/components/advanced-search/advanced-search.component.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-advanced-search', + templateUrl: './advanced-search.component.html', + styleUrl: './advanced-search.component.css' +}) +export class AdvancedSearchComponent { + +} diff --git a/ogWebconsole/src/app/components/groups/groups.component.ts b/ogWebconsole/src/app/components/groups/groups.component.ts index 5cd48ea..3cda9da 100644 --- a/ogWebconsole/src/app/components/groups/groups.component.ts +++ b/ogWebconsole/src/app/components/groups/groups.component.ts @@ -1,22 +1,22 @@ import { Component, OnInit } from '@angular/core'; -import { DataService } from './data.service'; -import { ClientCollection, UnidadOrganizativa } from './model'; +import { DataService } from './services/data.service'; +import { ClientCollection, UnidadOrganizativa } from './model/model'; import { MatDialog } from '@angular/material/dialog'; -import { CreateOrganizationalUnitComponent } from './organizational-units/create-organizational-unit/create-organizational-unit.component'; +import { CreateOrganizationalUnitComponent } from './shared/organizational-units/create-organizational-unit/create-organizational-unit.component'; import { DeleteModalComponent } from '../../shared/delete_modal/delete-modal/delete-modal.component'; -import { CreateClientComponent } from './clients/create-client/create-client.component'; -import { EditOrganizationalUnitComponent } from './organizational-units/edit-organizational-unit/edit-organizational-unit.component'; -import { EditClientComponent } from './clients/edit-client/edit-client.component'; -import { ShowOrganizationalUnitComponent} from "./organizational-units/show-organizational-unit/show-organizational-unit.component"; +import { CreateClientComponent } from './shared/clients/create-client/create-client.component'; +import { EditOrganizationalUnitComponent } from './shared/organizational-units/edit-organizational-unit/edit-organizational-unit.component'; +import { EditClientComponent } from './shared/clients/edit-client/edit-client.component'; +import { ShowOrganizationalUnitComponent} from "./shared/organizational-units/show-organizational-unit/show-organizational-unit.component"; import {ToastrService} from "ngx-toastr"; -import {TreeViewComponent} from "./tree-view/tree-view.component"; +import {TreeViewComponent} from "./shared/tree-view/tree-view.component"; import {MatBottomSheet} from "@angular/material/bottom-sheet"; -import {LegendComponent} from "./legend/legend.component"; -import { ClassroomViewDialogComponent } from './classroom-view/classroom-view-modal'; +import {LegendComponent} from "./shared/legend/legend.component"; +import { ClassroomViewDialogComponent } from './shared/classroom-view/classroom-view-modal'; import {HttpClient} from "@angular/common/http"; import {PageEvent} from "@angular/material/paginator"; -import { SaveFiltersDialogComponent } from './save-filters-dialog/save-filters-dialog.component'; -import { AcctionsModalComponent } from './acctions-modal/acctions-modal.component'; +import { SaveFiltersDialogComponent } from './shared/save-filters-dialog/save-filters-dialog.component'; +import { AcctionsModalComponent } from './shared/acctions-modal/acctions-modal.component'; import {MatTableDataSource} from "@angular/material/table"; import {DatePipe} from "@angular/common"; diff --git a/ogWebconsole/src/app/components/groups/model.ts b/ogWebconsole/src/app/components/groups/model/model.ts similarity index 100% rename from ogWebconsole/src/app/components/groups/model.ts rename to ogWebconsole/src/app/components/groups/model/model.ts diff --git a/ogWebconsole/src/app/components/groups/data.service.ts b/ogWebconsole/src/app/components/groups/services/data.service.ts similarity index 99% rename from ogWebconsole/src/app/components/groups/data.service.ts rename to ogWebconsole/src/app/components/groups/services/data.service.ts index 70336a2..ffc42f2 100644 --- a/ogWebconsole/src/app/components/groups/data.service.ts +++ b/ogWebconsole/src/app/components/groups/services/data.service.ts @@ -2,7 +2,7 @@ import { Injectable } from '@angular/core'; import {HttpClient, HttpParams} from '@angular/common/http'; import { Observable, throwError } from 'rxjs'; import { catchError, map } from 'rxjs/operators'; -import { UnidadOrganizativa } from './model'; +import { UnidadOrganizativa } from '../model/model'; @Injectable({ providedIn: 'root' diff --git a/ogWebconsole/src/app/components/groups/acctions-modal/acctions-modal.component.css b/ogWebconsole/src/app/components/groups/shared/acctions-modal/acctions-modal.component.css similarity index 100% rename from ogWebconsole/src/app/components/groups/acctions-modal/acctions-modal.component.css rename to ogWebconsole/src/app/components/groups/shared/acctions-modal/acctions-modal.component.css diff --git a/ogWebconsole/src/app/components/groups/acctions-modal/acctions-modal.component.html b/ogWebconsole/src/app/components/groups/shared/acctions-modal/acctions-modal.component.html similarity index 100% rename from ogWebconsole/src/app/components/groups/acctions-modal/acctions-modal.component.html rename to ogWebconsole/src/app/components/groups/shared/acctions-modal/acctions-modal.component.html diff --git a/ogWebconsole/src/app/components/groups/acctions-modal/acctions-modal.component.spec.ts b/ogWebconsole/src/app/components/groups/shared/acctions-modal/acctions-modal.component.spec.ts similarity index 100% rename from ogWebconsole/src/app/components/groups/acctions-modal/acctions-modal.component.spec.ts rename to ogWebconsole/src/app/components/groups/shared/acctions-modal/acctions-modal.component.spec.ts diff --git a/ogWebconsole/src/app/components/groups/acctions-modal/acctions-modal.component.ts b/ogWebconsole/src/app/components/groups/shared/acctions-modal/acctions-modal.component.ts similarity index 89% rename from ogWebconsole/src/app/components/groups/acctions-modal/acctions-modal.component.ts rename to ogWebconsole/src/app/components/groups/shared/acctions-modal/acctions-modal.component.ts index 8474ff9..e94012e 100644 --- a/ogWebconsole/src/app/components/groups/acctions-modal/acctions-modal.component.ts +++ b/ogWebconsole/src/app/components/groups/shared/acctions-modal/acctions-modal.component.ts @@ -2,9 +2,9 @@ import { Component, Inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA, MatDialog } from '@angular/material/dialog'; import { ToastrService } from 'ngx-toastr'; -import { CreatePxeBootFileComponent } from '../../ogboot/pxe-boot-files/create-pxeBootFile/create-pxe-boot-file/create-pxe-boot-file.component'; +import { CreatePxeBootFileComponent } from '../../../ogboot/pxe-boot-files/create-pxeBootFile/create-pxe-boot-file/create-pxe-boot-file.component'; import { HttpClient } from '@angular/common/http'; -import { CommandDetailComponent } from '../../commands/main-commands/detail-command/command-detail.component'; +import { CommandDetailComponent } from '../../../commands/main-commands/detail-command/command-detail.component'; @Component({ selector: 'app-acctions-modal', templateUrl: './acctions-modal.component.html', diff --git a/ogWebconsole/src/app/components/groups/classroom-view/classroom-view-modal.ts b/ogWebconsole/src/app/components/groups/shared/classroom-view/classroom-view-modal.ts similarity index 100% rename from ogWebconsole/src/app/components/groups/classroom-view/classroom-view-modal.ts rename to ogWebconsole/src/app/components/groups/shared/classroom-view/classroom-view-modal.ts diff --git a/ogWebconsole/src/app/components/groups/classroom-view/classroom-view.component.css b/ogWebconsole/src/app/components/groups/shared/classroom-view/classroom-view.component.css similarity index 100% rename from ogWebconsole/src/app/components/groups/classroom-view/classroom-view.component.css rename to ogWebconsole/src/app/components/groups/shared/classroom-view/classroom-view.component.css diff --git a/ogWebconsole/src/app/components/groups/classroom-view/classroom-view.component.html b/ogWebconsole/src/app/components/groups/shared/classroom-view/classroom-view.component.html similarity index 100% rename from ogWebconsole/src/app/components/groups/classroom-view/classroom-view.component.html rename to ogWebconsole/src/app/components/groups/shared/classroom-view/classroom-view.component.html diff --git a/ogWebconsole/src/app/components/groups/classroom-view/classroom-view.component.spec.ts b/ogWebconsole/src/app/components/groups/shared/classroom-view/classroom-view.component.spec.ts similarity index 100% rename from ogWebconsole/src/app/components/groups/classroom-view/classroom-view.component.spec.ts rename to ogWebconsole/src/app/components/groups/shared/classroom-view/classroom-view.component.spec.ts diff --git a/ogWebconsole/src/app/components/groups/classroom-view/classroom-view.component.ts b/ogWebconsole/src/app/components/groups/shared/classroom-view/classroom-view.component.ts similarity index 100% rename from ogWebconsole/src/app/components/groups/classroom-view/classroom-view.component.ts rename to ogWebconsole/src/app/components/groups/shared/classroom-view/classroom-view.component.ts diff --git a/ogWebconsole/src/app/components/groups/client-tab-view/client-tab-view.component.css b/ogWebconsole/src/app/components/groups/shared/client-tab-view/client-tab-view.component.css similarity index 100% rename from ogWebconsole/src/app/components/groups/client-tab-view/client-tab-view.component.css rename to ogWebconsole/src/app/components/groups/shared/client-tab-view/client-tab-view.component.css diff --git a/ogWebconsole/src/app/components/groups/client-tab-view/client-tab-view.component.html b/ogWebconsole/src/app/components/groups/shared/client-tab-view/client-tab-view.component.html similarity index 100% rename from ogWebconsole/src/app/components/groups/client-tab-view/client-tab-view.component.html rename to ogWebconsole/src/app/components/groups/shared/client-tab-view/client-tab-view.component.html diff --git a/ogWebconsole/src/app/components/groups/client-tab-view/client-tab-view.component.spec.ts b/ogWebconsole/src/app/components/groups/shared/client-tab-view/client-tab-view.component.spec.ts similarity index 100% rename from ogWebconsole/src/app/components/groups/client-tab-view/client-tab-view.component.spec.ts rename to ogWebconsole/src/app/components/groups/shared/client-tab-view/client-tab-view.component.spec.ts diff --git a/ogWebconsole/src/app/components/groups/client-tab-view/client-tab-view.component.ts b/ogWebconsole/src/app/components/groups/shared/client-tab-view/client-tab-view.component.ts similarity index 97% rename from ogWebconsole/src/app/components/groups/client-tab-view/client-tab-view.component.ts rename to ogWebconsole/src/app/components/groups/shared/client-tab-view/client-tab-view.component.ts index 9ca1503..e838898 100644 --- a/ogWebconsole/src/app/components/groups/client-tab-view/client-tab-view.component.ts +++ b/ogWebconsole/src/app/components/groups/shared/client-tab-view/client-tab-view.component.ts @@ -8,7 +8,7 @@ import {HttpClient} from "@angular/common/http"; import {DataService} from "./data.service"; import {EditClientComponent} from "../clients/edit-client/edit-client.component"; import {CreateClientComponent} from "../clients/create-client/create-client.component"; -import {DeleteModalComponent} from "../../../shared/delete_modal/delete-modal/delete-modal.component"; +import {DeleteModalComponent} from "../../../../shared/delete_modal/delete-modal/delete-modal.component"; import { throwError } from 'rxjs'; import { catchError } from 'rxjs/operators'; @Component({ diff --git a/ogWebconsole/src/app/components/groups/client-tab-view/data.service.ts b/ogWebconsole/src/app/components/groups/shared/client-tab-view/data.service.ts similarity index 100% rename from ogWebconsole/src/app/components/groups/client-tab-view/data.service.ts rename to ogWebconsole/src/app/components/groups/shared/client-tab-view/data.service.ts diff --git a/ogWebconsole/src/app/components/groups/client-view/client-view.component.css b/ogWebconsole/src/app/components/groups/shared/client-view/client-view.component.css similarity index 100% rename from ogWebconsole/src/app/components/groups/client-view/client-view.component.css rename to ogWebconsole/src/app/components/groups/shared/client-view/client-view.component.css diff --git a/ogWebconsole/src/app/components/groups/client-view/client-view.component.html b/ogWebconsole/src/app/components/groups/shared/client-view/client-view.component.html similarity index 100% rename from ogWebconsole/src/app/components/groups/client-view/client-view.component.html rename to ogWebconsole/src/app/components/groups/shared/client-view/client-view.component.html diff --git a/ogWebconsole/src/app/components/groups/client-view/client-view.component.spec.ts b/ogWebconsole/src/app/components/groups/shared/client-view/client-view.component.spec.ts similarity index 100% rename from ogWebconsole/src/app/components/groups/client-view/client-view.component.spec.ts rename to ogWebconsole/src/app/components/groups/shared/client-view/client-view.component.spec.ts diff --git a/ogWebconsole/src/app/components/groups/client-view/client-view.component.ts b/ogWebconsole/src/app/components/groups/shared/client-view/client-view.component.ts similarity index 100% rename from ogWebconsole/src/app/components/groups/client-view/client-view.component.ts rename to ogWebconsole/src/app/components/groups/shared/client-view/client-view.component.ts diff --git a/ogWebconsole/src/app/components/groups/clients/create-client/create-client.component.css b/ogWebconsole/src/app/components/groups/shared/clients/create-client/create-client.component.css similarity index 100% rename from ogWebconsole/src/app/components/groups/clients/create-client/create-client.component.css rename to ogWebconsole/src/app/components/groups/shared/clients/create-client/create-client.component.css diff --git a/ogWebconsole/src/app/components/groups/clients/create-client/create-client.component.html b/ogWebconsole/src/app/components/groups/shared/clients/create-client/create-client.component.html similarity index 100% rename from ogWebconsole/src/app/components/groups/clients/create-client/create-client.component.html rename to ogWebconsole/src/app/components/groups/shared/clients/create-client/create-client.component.html diff --git a/ogWebconsole/src/app/components/groups/clients/create-client/create-client.component.spec.ts b/ogWebconsole/src/app/components/groups/shared/clients/create-client/create-client.component.spec.ts similarity index 100% rename from ogWebconsole/src/app/components/groups/clients/create-client/create-client.component.spec.ts rename to ogWebconsole/src/app/components/groups/shared/clients/create-client/create-client.component.spec.ts diff --git a/ogWebconsole/src/app/components/groups/clients/create-client/create-client.component.ts b/ogWebconsole/src/app/components/groups/shared/clients/create-client/create-client.component.ts similarity index 98% rename from ogWebconsole/src/app/components/groups/clients/create-client/create-client.component.ts rename to ogWebconsole/src/app/components/groups/shared/clients/create-client/create-client.component.ts index 9393784..f5aa5cd 100644 --- a/ogWebconsole/src/app/components/groups/clients/create-client/create-client.component.ts +++ b/ogWebconsole/src/app/components/groups/shared/clients/create-client/create-client.component.ts @@ -4,7 +4,7 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; import { ToastrService } from 'ngx-toastr'; -import { DataService } from '../../data.service'; +import { DataService } from '../../../services/data.service'; @Component({ selector: 'app-create-client', diff --git a/ogWebconsole/src/app/components/groups/clients/edit-client/edit-client.component.css b/ogWebconsole/src/app/components/groups/shared/clients/edit-client/edit-client.component.css similarity index 100% rename from ogWebconsole/src/app/components/groups/clients/edit-client/edit-client.component.css rename to ogWebconsole/src/app/components/groups/shared/clients/edit-client/edit-client.component.css diff --git a/ogWebconsole/src/app/components/groups/clients/edit-client/edit-client.component.html b/ogWebconsole/src/app/components/groups/shared/clients/edit-client/edit-client.component.html similarity index 100% rename from ogWebconsole/src/app/components/groups/clients/edit-client/edit-client.component.html rename to ogWebconsole/src/app/components/groups/shared/clients/edit-client/edit-client.component.html diff --git a/ogWebconsole/src/app/components/groups/clients/edit-client/edit-client.component.spec.ts b/ogWebconsole/src/app/components/groups/shared/clients/edit-client/edit-client.component.spec.ts similarity index 100% rename from ogWebconsole/src/app/components/groups/clients/edit-client/edit-client.component.spec.ts rename to ogWebconsole/src/app/components/groups/shared/clients/edit-client/edit-client.component.spec.ts diff --git a/ogWebconsole/src/app/components/groups/clients/edit-client/edit-client.component.ts b/ogWebconsole/src/app/components/groups/shared/clients/edit-client/edit-client.component.ts similarity index 98% rename from ogWebconsole/src/app/components/groups/clients/edit-client/edit-client.component.ts rename to ogWebconsole/src/app/components/groups/shared/clients/edit-client/edit-client.component.ts index 2a5da08..047ea8e 100644 --- a/ogWebconsole/src/app/components/groups/clients/edit-client/edit-client.component.ts +++ b/ogWebconsole/src/app/components/groups/shared/clients/edit-client/edit-client.component.ts @@ -3,7 +3,7 @@ import { Component, Inject } from '@angular/core'; import { FormGroup, FormBuilder, Validators } from '@angular/forms'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; import { CreateClientComponent } from '../create-client/create-client.component'; -import { DataService } from '../../data.service'; +import { DataService } from '../../../services/data.service'; import { ToastrService } from 'ngx-toastr'; @Component({ diff --git a/ogWebconsole/src/app/components/groups/shared/legend/legend.component.css b/ogWebconsole/src/app/components/groups/shared/legend/legend.component.css new file mode 100644 index 0000000..e69de29 diff --git a/ogWebconsole/src/app/components/groups/legend/legend.component.html b/ogWebconsole/src/app/components/groups/shared/legend/legend.component.html similarity index 100% rename from ogWebconsole/src/app/components/groups/legend/legend.component.html rename to ogWebconsole/src/app/components/groups/shared/legend/legend.component.html diff --git a/ogWebconsole/src/app/components/groups/legend/legend.component.spec.ts b/ogWebconsole/src/app/components/groups/shared/legend/legend.component.spec.ts similarity index 100% rename from ogWebconsole/src/app/components/groups/legend/legend.component.spec.ts rename to ogWebconsole/src/app/components/groups/shared/legend/legend.component.spec.ts diff --git a/ogWebconsole/src/app/components/groups/legend/legend.component.ts b/ogWebconsole/src/app/components/groups/shared/legend/legend.component.ts similarity index 100% rename from ogWebconsole/src/app/components/groups/legend/legend.component.ts rename to ogWebconsole/src/app/components/groups/shared/legend/legend.component.ts diff --git a/ogWebconsole/src/app/components/groups/organizational-units/create-organizational-unit/create-organizational-unit.component.css b/ogWebconsole/src/app/components/groups/shared/organizational-units/create-organizational-unit/create-organizational-unit.component.css similarity index 100% rename from ogWebconsole/src/app/components/groups/organizational-units/create-organizational-unit/create-organizational-unit.component.css rename to ogWebconsole/src/app/components/groups/shared/organizational-units/create-organizational-unit/create-organizational-unit.component.css diff --git a/ogWebconsole/src/app/components/groups/organizational-units/create-organizational-unit/create-organizational-unit.component.html b/ogWebconsole/src/app/components/groups/shared/organizational-units/create-organizational-unit/create-organizational-unit.component.html similarity index 100% rename from ogWebconsole/src/app/components/groups/organizational-units/create-organizational-unit/create-organizational-unit.component.html rename to ogWebconsole/src/app/components/groups/shared/organizational-units/create-organizational-unit/create-organizational-unit.component.html diff --git a/ogWebconsole/src/app/components/groups/organizational-units/create-organizational-unit/create-organizational-unit.component.spec.ts b/ogWebconsole/src/app/components/groups/shared/organizational-units/create-organizational-unit/create-organizational-unit.component.spec.ts similarity index 100% rename from ogWebconsole/src/app/components/groups/organizational-units/create-organizational-unit/create-organizational-unit.component.spec.ts rename to ogWebconsole/src/app/components/groups/shared/organizational-units/create-organizational-unit/create-organizational-unit.component.spec.ts diff --git a/ogWebconsole/src/app/components/groups/organizational-units/create-organizational-unit/create-organizational-unit.component.ts b/ogWebconsole/src/app/components/groups/shared/organizational-units/create-organizational-unit/create-organizational-unit.component.ts similarity index 99% rename from ogWebconsole/src/app/components/groups/organizational-units/create-organizational-unit/create-organizational-unit.component.ts rename to ogWebconsole/src/app/components/groups/shared/organizational-units/create-organizational-unit/create-organizational-unit.component.ts index 4d55383..744f925 100644 --- a/ogWebconsole/src/app/components/groups/organizational-units/create-organizational-unit/create-organizational-unit.component.ts +++ b/ogWebconsole/src/app/components/groups/shared/organizational-units/create-organizational-unit/create-organizational-unit.component.ts @@ -3,7 +3,7 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; import { HttpClient, HttpHeaders } from '@angular/common/http'; import { ToastrService } from 'ngx-toastr'; -import { DataService } from '../../data.service'; +import { DataService } from '../../../services/data.service'; @Component({ selector: 'app-create-organizational-unit', diff --git a/ogWebconsole/src/app/components/groups/organizational-units/edit-organizational-unit/edit-organizational-unit.component.css b/ogWebconsole/src/app/components/groups/shared/organizational-units/edit-organizational-unit/edit-organizational-unit.component.css similarity index 100% rename from ogWebconsole/src/app/components/groups/organizational-units/edit-organizational-unit/edit-organizational-unit.component.css rename to ogWebconsole/src/app/components/groups/shared/organizational-units/edit-organizational-unit/edit-organizational-unit.component.css diff --git a/ogWebconsole/src/app/components/groups/organizational-units/edit-organizational-unit/edit-organizational-unit.component.html b/ogWebconsole/src/app/components/groups/shared/organizational-units/edit-organizational-unit/edit-organizational-unit.component.html similarity index 100% rename from ogWebconsole/src/app/components/groups/organizational-units/edit-organizational-unit/edit-organizational-unit.component.html rename to ogWebconsole/src/app/components/groups/shared/organizational-units/edit-organizational-unit/edit-organizational-unit.component.html diff --git a/ogWebconsole/src/app/components/groups/organizational-units/edit-organizational-unit/edit-organizational-unit.component.spec.ts b/ogWebconsole/src/app/components/groups/shared/organizational-units/edit-organizational-unit/edit-organizational-unit.component.spec.ts similarity index 100% rename from ogWebconsole/src/app/components/groups/organizational-units/edit-organizational-unit/edit-organizational-unit.component.spec.ts rename to ogWebconsole/src/app/components/groups/shared/organizational-units/edit-organizational-unit/edit-organizational-unit.component.spec.ts diff --git a/ogWebconsole/src/app/components/groups/organizational-units/edit-organizational-unit/edit-organizational-unit.component.ts b/ogWebconsole/src/app/components/groups/shared/organizational-units/edit-organizational-unit/edit-organizational-unit.component.ts similarity index 99% rename from ogWebconsole/src/app/components/groups/organizational-units/edit-organizational-unit/edit-organizational-unit.component.ts rename to ogWebconsole/src/app/components/groups/shared/organizational-units/edit-organizational-unit/edit-organizational-unit.component.ts index 074d484..9188b59 100644 --- a/ogWebconsole/src/app/components/groups/organizational-units/edit-organizational-unit/edit-organizational-unit.component.ts +++ b/ogWebconsole/src/app/components/groups/shared/organizational-units/edit-organizational-unit/edit-organizational-unit.component.ts @@ -3,7 +3,7 @@ import { Component, EventEmitter, Inject, OnInit, Output } from '@angular/core'; import { FormGroup, FormBuilder, Validators } from '@angular/forms'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { CreateOrganizationalUnitComponent } from '../create-organizational-unit/create-organizational-unit.component'; -import {DataService} from "../../data.service"; +import {DataService} from "../../../services/data.service"; import {ToastrService} from "ngx-toastr"; @Component({ diff --git a/ogWebconsole/src/app/components/groups/organizational-units/show-organizational-unit/show-organizational-unit.component.css b/ogWebconsole/src/app/components/groups/shared/organizational-units/show-organizational-unit/show-organizational-unit.component.css similarity index 100% rename from ogWebconsole/src/app/components/groups/organizational-units/show-organizational-unit/show-organizational-unit.component.css rename to ogWebconsole/src/app/components/groups/shared/organizational-units/show-organizational-unit/show-organizational-unit.component.css diff --git a/ogWebconsole/src/app/components/groups/organizational-units/show-organizational-unit/show-organizational-unit.component.html b/ogWebconsole/src/app/components/groups/shared/organizational-units/show-organizational-unit/show-organizational-unit.component.html similarity index 100% rename from ogWebconsole/src/app/components/groups/organizational-units/show-organizational-unit/show-organizational-unit.component.html rename to ogWebconsole/src/app/components/groups/shared/organizational-units/show-organizational-unit/show-organizational-unit.component.html diff --git a/ogWebconsole/src/app/components/groups/organizational-units/show-organizational-unit/show-organizational-unit.component.spec.ts b/ogWebconsole/src/app/components/groups/shared/organizational-units/show-organizational-unit/show-organizational-unit.component.spec.ts similarity index 100% rename from ogWebconsole/src/app/components/groups/organizational-units/show-organizational-unit/show-organizational-unit.component.spec.ts rename to ogWebconsole/src/app/components/groups/shared/organizational-units/show-organizational-unit/show-organizational-unit.component.spec.ts diff --git a/ogWebconsole/src/app/components/groups/organizational-units/show-organizational-unit/show-organizational-unit.component.ts b/ogWebconsole/src/app/components/groups/shared/organizational-units/show-organizational-unit/show-organizational-unit.component.ts similarity index 100% rename from ogWebconsole/src/app/components/groups/organizational-units/show-organizational-unit/show-organizational-unit.component.ts rename to ogWebconsole/src/app/components/groups/shared/organizational-units/show-organizational-unit/show-organizational-unit.component.ts diff --git a/ogWebconsole/src/app/components/groups/shared/save-filters-dialog/save-filters-dialog.component.css b/ogWebconsole/src/app/components/groups/shared/save-filters-dialog/save-filters-dialog.component.css new file mode 100644 index 0000000..e69de29 diff --git a/ogWebconsole/src/app/components/groups/save-filters-dialog/save-filters-dialog.component.html b/ogWebconsole/src/app/components/groups/shared/save-filters-dialog/save-filters-dialog.component.html similarity index 100% rename from ogWebconsole/src/app/components/groups/save-filters-dialog/save-filters-dialog.component.html rename to ogWebconsole/src/app/components/groups/shared/save-filters-dialog/save-filters-dialog.component.html diff --git a/ogWebconsole/src/app/components/groups/save-filters-dialog/save-filters-dialog.component.spec.ts b/ogWebconsole/src/app/components/groups/shared/save-filters-dialog/save-filters-dialog.component.spec.ts similarity index 100% rename from ogWebconsole/src/app/components/groups/save-filters-dialog/save-filters-dialog.component.spec.ts rename to ogWebconsole/src/app/components/groups/shared/save-filters-dialog/save-filters-dialog.component.spec.ts diff --git a/ogWebconsole/src/app/components/groups/save-filters-dialog/save-filters-dialog.component.ts b/ogWebconsole/src/app/components/groups/shared/save-filters-dialog/save-filters-dialog.component.ts similarity index 100% rename from ogWebconsole/src/app/components/groups/save-filters-dialog/save-filters-dialog.component.ts rename to ogWebconsole/src/app/components/groups/shared/save-filters-dialog/save-filters-dialog.component.ts diff --git a/ogWebconsole/src/app/components/groups/tree-view/tree-view.component.css b/ogWebconsole/src/app/components/groups/shared/tree-view/tree-view.component.css similarity index 100% rename from ogWebconsole/src/app/components/groups/tree-view/tree-view.component.css rename to ogWebconsole/src/app/components/groups/shared/tree-view/tree-view.component.css diff --git a/ogWebconsole/src/app/components/groups/tree-view/tree-view.component.html b/ogWebconsole/src/app/components/groups/shared/tree-view/tree-view.component.html similarity index 100% rename from ogWebconsole/src/app/components/groups/tree-view/tree-view.component.html rename to ogWebconsole/src/app/components/groups/shared/tree-view/tree-view.component.html diff --git a/ogWebconsole/src/app/components/groups/tree-view/tree-view.component.spec.ts b/ogWebconsole/src/app/components/groups/shared/tree-view/tree-view.component.spec.ts similarity index 100% rename from ogWebconsole/src/app/components/groups/tree-view/tree-view.component.spec.ts rename to ogWebconsole/src/app/components/groups/shared/tree-view/tree-view.component.spec.ts diff --git a/ogWebconsole/src/app/components/groups/tree-view/tree-view.component.ts b/ogWebconsole/src/app/components/groups/shared/tree-view/tree-view.component.ts similarity index 100% rename from ogWebconsole/src/app/components/groups/tree-view/tree-view.component.ts rename to ogWebconsole/src/app/components/groups/shared/tree-view/tree-view.component.ts diff --git a/ogWebconsole/src/app/components/login/login.component.ts b/ogWebconsole/src/app/components/login/login.component.ts index ba945b1..29bbcbd 100644 --- a/ogWebconsole/src/app/components/login/login.component.ts +++ b/ogWebconsole/src/app/components/login/login.component.ts @@ -53,7 +53,7 @@ export class LoginComponent { localStorage.setItem('refreshToken', res.refreshToken); localStorage.setItem('username', this.loginObj.username); this.openSnackBar(false, 'Bienvenido ' + this.loginObj.username); - this.router.navigateByUrl('/dashboard'); + this.router.navigateByUrl('/groups'); } this.isLoading = false; },