From c99533c151fd636a50bddcac0b0b971d09f6f9e1 Mon Sep 17 00:00:00 2001 From: Thomas Fransolet Date: Tue, 10 Mar 2020 12:15:55 +0100 Subject: [PATCH] CP Update app routing module by adding dashboard module for better visibility --- package-lock.json | 46 +++++++++---- src/app/app-routing.module.ts | 17 ++--- src/app/app.module.ts | 32 +++------ .../automation/automation.component.css | 0 .../automation/automation.component.html | 0 .../automation/automation.component.spec.ts | 0 .../automation/automation.component.ts | 4 +- .../edit-automation.component.css | 0 .../edit-automation.component.html | 0 .../edit-automation.component.spec.ts | 0 .../edit-automation.component.ts | 2 +- .../dashboard/dashboard-routing.module.ts | 16 +++++ .../dashboard/dashboard.component.css | 0 .../dashboard/dashboard.component.html | 0 .../dashboard/dashboard.component.spec.ts | 0 .../dashboard/dashboard.component.ts | 0 .../dashboard/dashboard.module.ts | 68 +++++++++++++++++++ .../electricity/electricity.component.css | 0 .../electricity/electricity.component.html | 0 .../electricity/electricity.component.spec.ts | 0 .../electricity/electricity.component.ts | 0 .../dashboard/energy/energy.component.css | 0 .../dashboard/energy/energy.component.html | 0 .../dashboard/energy/energy.component.spec.ts | 0 .../dashboard/energy/energy.component.ts | 0 .../dashboard/energy/gas/gas.component.css | 0 .../dashboard/energy/gas/gas.component.html | 0 .../energy/gas/gas.component.spec.ts | 0 .../dashboard/energy/gas/gas.component.ts | 0 .../energy/water/water.component.css | 0 .../energy/water/water.component.html | 0 .../energy/water/water.component.spec.ts | 0 .../dashboard/energy/water/water.component.ts | 0 .../sidebar/sidebarDashboard.component.html | 0 .../sidebar/sidebarDashboard.component.scss | 0 .../sidebarDashboard.component.spec.ts | 0 .../sidebar/sidebarDashboard.component.ts | 6 +- .../devices/devices.component.css | 0 .../devices/devices.component.html | 0 .../devices/devices.component.spec.ts | 0 .../devices/devices.component.ts | 0 41 files changed, 141 insertions(+), 50 deletions(-) rename src/app/control-panel/{profile => }/automation/automation.component.css (100%) rename src/app/control-panel/{profile => }/automation/automation.component.html (100%) rename src/app/control-panel/{profile => }/automation/automation.component.spec.ts (100%) rename src/app/control-panel/{profile => }/automation/automation.component.ts (87%) rename src/app/control-panel/{profile => }/automation/edit-automation/edit-automation.component.css (100%) rename src/app/control-panel/{profile => }/automation/edit-automation/edit-automation.component.html (100%) rename src/app/control-panel/{profile => }/automation/edit-automation/edit-automation.component.spec.ts (100%) rename src/app/control-panel/{profile => }/automation/edit-automation/edit-automation.component.ts (89%) create mode 100644 src/app/control-panel/dashboard/dashboard-routing.module.ts rename src/app/control-panel/{profile => }/dashboard/dashboard.component.css (100%) rename src/app/control-panel/{profile => }/dashboard/dashboard.component.html (100%) rename src/app/control-panel/{profile => }/dashboard/dashboard.component.spec.ts (100%) rename src/app/control-panel/{profile => }/dashboard/dashboard.component.ts (100%) create mode 100644 src/app/control-panel/dashboard/dashboard.module.ts rename src/app/control-panel/{profile => }/dashboard/energy/electricity/electricity.component.css (100%) rename src/app/control-panel/{profile => }/dashboard/energy/electricity/electricity.component.html (100%) rename src/app/control-panel/{profile => }/dashboard/energy/electricity/electricity.component.spec.ts (100%) rename src/app/control-panel/{profile => }/dashboard/energy/electricity/electricity.component.ts (100%) rename src/app/control-panel/{profile => }/dashboard/energy/energy.component.css (100%) rename src/app/control-panel/{profile => }/dashboard/energy/energy.component.html (100%) rename src/app/control-panel/{profile => }/dashboard/energy/energy.component.spec.ts (100%) rename src/app/control-panel/{profile => }/dashboard/energy/energy.component.ts (100%) rename src/app/control-panel/{profile => }/dashboard/energy/gas/gas.component.css (100%) rename src/app/control-panel/{profile => }/dashboard/energy/gas/gas.component.html (100%) rename src/app/control-panel/{profile => }/dashboard/energy/gas/gas.component.spec.ts (100%) rename src/app/control-panel/{profile => }/dashboard/energy/gas/gas.component.ts (100%) rename src/app/control-panel/{profile => }/dashboard/energy/water/water.component.css (100%) rename src/app/control-panel/{profile => }/dashboard/energy/water/water.component.html (100%) rename src/app/control-panel/{profile => }/dashboard/energy/water/water.component.spec.ts (100%) rename src/app/control-panel/{profile => }/dashboard/energy/water/water.component.ts (100%) rename src/app/control-panel/{profile => }/dashboard/sidebar/sidebarDashboard.component.html (100%) rename src/app/control-panel/{profile => }/dashboard/sidebar/sidebarDashboard.component.scss (100%) rename src/app/control-panel/{profile => }/dashboard/sidebar/sidebarDashboard.component.spec.ts (100%) rename src/app/control-panel/{profile => }/dashboard/sidebar/sidebarDashboard.component.ts (95%) rename src/app/control-panel/{profile => }/devices/devices.component.css (100%) rename src/app/control-panel/{profile => }/devices/devices.component.html (100%) rename src/app/control-panel/{profile => }/devices/devices.component.spec.ts (100%) rename src/app/control-panel/{profile => }/devices/devices.component.ts (100%) diff --git a/package-lock.json b/package-lock.json index b732835..0bffb4a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1137,7 +1137,8 @@ "abbrev": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", - "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=" + "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=", + "optional": true }, "accepts": { "version": "1.3.5", @@ -4717,7 +4718,8 @@ }, "ansi-regex": { "version": "2.1.1", - "bundled": true + "bundled": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -4735,11 +4737,13 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true + "bundled": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -4752,15 +4756,18 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "concat-map": { "version": "0.0.1", - "bundled": true + "bundled": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -4863,7 +4870,8 @@ }, "inherits": { "version": "2.0.3", - "bundled": true + "bundled": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -4873,6 +4881,7 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -4885,17 +4894,20 @@ "minimatch": { "version": "3.0.4", "bundled": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "bundled": true + "bundled": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -4912,6 +4924,7 @@ "mkdirp": { "version": "0.5.1", "bundled": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -4984,7 +4997,8 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true + "bundled": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -4994,6 +5008,7 @@ "once": { "version": "1.4.0", "bundled": true, + "optional": true, "requires": { "wrappy": "1" } @@ -5069,7 +5084,8 @@ }, "safe-buffer": { "version": "5.1.2", - "bundled": true + "bundled": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -5099,6 +5115,7 @@ "string-width": { "version": "1.0.2", "bundled": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -5116,6 +5133,7 @@ "strip-ansi": { "version": "3.0.1", "bundled": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -5154,11 +5172,13 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true + "bundled": true, + "optional": true }, "yallist": { "version": "3.0.3", - "bundled": true + "bundled": true, + "optional": true } } }, @@ -9988,7 +10008,7 @@ "resolved": "https://registry.npmjs.org/rijs.sync/-/rijs.sync-2.3.5.tgz", "integrity": "sha512-tcbhmjLyWb+2s2gdiSmROEoD/OQPFeKC9xBnKgs0H+umY8CaVrVPGFdr1y1qovm7HxUbdk/BKqi94GQDc5XB3A==", "requires": { - "buble": "github:pemrouz/buble#4e639aeeb64712ac95dc30a52750d1ee4432c9c8", + "buble": "github:pemrouz/buble", "express": "^4.14.0", "lru_map": "^0.3.3", "platform": "^1.3.4", diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 54029fc..22d08c1 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -1,14 +1,13 @@ import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import { HomeComponent } from './control-panel/home/home.component'; -import { AutomationComponent } from './control-panel/profile/automation/automation.component'; +import { AutomationComponent } from './control-panel/automation/automation.component'; import { AuthGuard } from './_helpers/auth.guard'; import { NotFoundComponent } from './control-panel/not-found/not-found.component'; import { ProfileComponent } from './control-panel/profile/profile/profile.component'; import { EditProfileComponent } from './control-panel/profile/edit-profile/edit-profile.component'; -import { EditAutomationComponent } from './control-panel/profile/automation/edit-automation/edit-automation.component'; -import { DevicesComponent } from './control-panel/profile/devices/devices.component'; -import { DashboardComponent } from './control-panel/profile/dashboard/dashboard.component'; +import { EditAutomationComponent } from './control-panel/automation/edit-automation/edit-automation.component'; +import { DevicesComponent } from './control-panel/devices/devices.component'; import { BetComponent } from './control-panel/bet/bet.component'; const routes: Routes = @@ -17,14 +16,16 @@ const routes: Routes = { path : 'home', component: HomeComponent }, { path: 'profile', - canActivate: [AuthGuard], + canActivate: [ AuthGuard ], children: [ { path: '', component: ProfileComponent}, { path: ':profileId', children: [ { path: '', component: ProfileComponent}, - { path: 'dashboard', component: DashboardComponent, children: [ - { path: '**', component: DashboardComponent} - ]}, + { path: 'dashboard', + loadChildren: () => + import('../app/control-panel/dashboard/dashboard.module').then(m => m.DashboardModule), + canActivate: [ AuthGuard ] + }, { path: 'edit', component: EditProfileComponent}, { path: 'automation', children: [ { path: '', component: AutomationComponent}, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 725955b..5444740 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -1,6 +1,6 @@ import { BrowserModule } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; -import { NgModule, Provider, APP_INITIALIZER } from '@angular/core'; +import { NgModule, CUSTOM_ELEMENTS_SCHEMA, Provider, APP_INITIALIZER } from '@angular/core'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; @@ -27,7 +27,7 @@ import { ConfirmationService, MessageService, MenuItem } from 'primeng/api'; import { TranslateModule, TranslateLoader } from '@ngx-translate/core'; import { TranslateHttpLoader } from '@ngx-translate/http-loader'; import { AuthenticationService } from './_services/authentication.service'; -import { AutomationComponent } from './control-panel/profile/automation/automation.component'; +import { AutomationComponent } from './control-panel/automation/automation.component'; import { NotFoundComponent } from './control-panel/not-found/not-found.component'; import { ProfileComponent } from './control-panel/profile/profile/profile.component'; import { EditProfileComponent } from './control-panel/profile/edit-profile/edit-profile.component'; @@ -36,18 +36,10 @@ import { ErrorInterceptor } from './_helpers/error.interceptor'; import { NotificationsService } from './_services/notifications.service'; import { ToastModule } from 'primeng/toast'; import { DropdownModule } from 'primeng/dropdown'; -import { EditAutomationComponent } from './control-panel/profile/automation/edit-automation/edit-automation.component'; -import { DevicesComponent } from './control-panel/profile/devices/devices.component'; -import { DashboardComponent } from './control-panel/profile/dashboard/dashboard.component'; +import { EditAutomationComponent } from './control-panel/automation/edit-automation/edit-automation.component'; +import { DevicesComponent } from './control-panel/devices/devices.component'; import { BetComponent } from './control-panel/bet/bet.component'; import { PanelMenuModule } from 'primeng/panelmenu'; -import { EnergyComponent } from './control-panel/profile/dashboard/energy/energy.component'; -import { SidebarDashboardComponent, SidebarNavItemComponent, SidebarNavDropItemComponent } from './control-panel/profile/dashboard/sidebar/sidebarDashboard.component'; -import { ElectricityComponent } from './control-panel/profile/dashboard/energy/electricity/electricity.component'; -import { GasComponent } from './control-panel/profile/dashboard/energy/gas/gas.component'; -import { WaterComponent } from './control-panel/profile/dashboard/energy/water/water.component'; -import { ChartModule } from 'primeng/chart'; - @@ -81,15 +73,7 @@ export function HttpLoaderFactory(http: HttpClient) { EditProfileComponent, EditAutomationComponent, DevicesComponent, - DashboardComponent, - BetComponent, - EnergyComponent, - SidebarDashboardComponent, - SidebarNavItemComponent, - SidebarNavDropItemComponent, - ElectricityComponent, - GasComponent, - WaterComponent + BetComponent ], imports: [ BrowserModule, @@ -111,7 +95,6 @@ export function HttpLoaderFactory(http: HttpClient) { ToastModule, DropdownModule, PanelMenuModule, - ChartModule, TranslateModule.forRoot({ loader: { provide: TranslateLoader, @@ -130,6 +113,9 @@ export function HttpLoaderFactory(http: HttpClient) { { provide: HTTP_INTERCEPTORS, useClass: JwtInterceptor, multi: true }, { provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptor, multi: true }, ], - bootstrap: [AppComponent] + bootstrap: [AppComponent], + schemas: [ + CUSTOM_ELEMENTS_SCHEMA + ] }) export class AppModule { } diff --git a/src/app/control-panel/profile/automation/automation.component.css b/src/app/control-panel/automation/automation.component.css similarity index 100% rename from src/app/control-panel/profile/automation/automation.component.css rename to src/app/control-panel/automation/automation.component.css diff --git a/src/app/control-panel/profile/automation/automation.component.html b/src/app/control-panel/automation/automation.component.html similarity index 100% rename from src/app/control-panel/profile/automation/automation.component.html rename to src/app/control-panel/automation/automation.component.html diff --git a/src/app/control-panel/profile/automation/automation.component.spec.ts b/src/app/control-panel/automation/automation.component.spec.ts similarity index 100% rename from src/app/control-panel/profile/automation/automation.component.spec.ts rename to src/app/control-panel/automation/automation.component.spec.ts diff --git a/src/app/control-panel/profile/automation/automation.component.ts b/src/app/control-panel/automation/automation.component.ts similarity index 87% rename from src/app/control-panel/profile/automation/automation.component.ts rename to src/app/control-panel/automation/automation.component.ts index b80d4ff..4199d06 100644 --- a/src/app/control-panel/profile/automation/automation.component.ts +++ b/src/app/control-panel/automation/automation.component.ts @@ -1,8 +1,8 @@ import { Component, OnInit } from '@angular/core'; import { Router, ActivatedRoute } from '@angular/router'; import { ConfirmationService } from 'primeng/api'; -import { NotificationsService } from '../../../_services/notifications.service'; -import { UserInfo } from '../../../_api/models'; +import { NotificationsService } from '../../_services/notifications.service'; +import { UserInfo } from '../../_api/models'; @Component({ selector: 'app-automation', diff --git a/src/app/control-panel/profile/automation/edit-automation/edit-automation.component.css b/src/app/control-panel/automation/edit-automation/edit-automation.component.css similarity index 100% rename from src/app/control-panel/profile/automation/edit-automation/edit-automation.component.css rename to src/app/control-panel/automation/edit-automation/edit-automation.component.css diff --git a/src/app/control-panel/profile/automation/edit-automation/edit-automation.component.html b/src/app/control-panel/automation/edit-automation/edit-automation.component.html similarity index 100% rename from src/app/control-panel/profile/automation/edit-automation/edit-automation.component.html rename to src/app/control-panel/automation/edit-automation/edit-automation.component.html diff --git a/src/app/control-panel/profile/automation/edit-automation/edit-automation.component.spec.ts b/src/app/control-panel/automation/edit-automation/edit-automation.component.spec.ts similarity index 100% rename from src/app/control-panel/profile/automation/edit-automation/edit-automation.component.spec.ts rename to src/app/control-panel/automation/edit-automation/edit-automation.component.spec.ts diff --git a/src/app/control-panel/profile/automation/edit-automation/edit-automation.component.ts b/src/app/control-panel/automation/edit-automation/edit-automation.component.ts similarity index 89% rename from src/app/control-panel/profile/automation/edit-automation/edit-automation.component.ts rename to src/app/control-panel/automation/edit-automation/edit-automation.component.ts index f3638bf..dc0dda2 100644 --- a/src/app/control-panel/profile/automation/edit-automation/edit-automation.component.ts +++ b/src/app/control-panel/automation/edit-automation/edit-automation.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { Router, ActivatedRoute } from '@angular/router'; import { ConfirmationService } from 'primeng/api'; -import { NotificationsService } from '../../../../_services/notifications.service'; +import { NotificationsService } from '../../../_services/notifications.service'; @Component({ selector: 'app-edit-automation', diff --git a/src/app/control-panel/dashboard/dashboard-routing.module.ts b/src/app/control-panel/dashboard/dashboard-routing.module.ts new file mode 100644 index 0000000..4c6ed88 --- /dev/null +++ b/src/app/control-panel/dashboard/dashboard-routing.module.ts @@ -0,0 +1,16 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; +import { EnergyComponent } from './energy/energy.component'; +import { DashboardComponent } from './dashboard.component'; + +const routes: Routes = +[ + { path: '', component: DashboardComponent}, + { path: 'energy', component: EnergyComponent } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [ RouterModule] +}) +export class DashboardRoutingModule { } diff --git a/src/app/control-panel/profile/dashboard/dashboard.component.css b/src/app/control-panel/dashboard/dashboard.component.css similarity index 100% rename from src/app/control-panel/profile/dashboard/dashboard.component.css rename to src/app/control-panel/dashboard/dashboard.component.css diff --git a/src/app/control-panel/profile/dashboard/dashboard.component.html b/src/app/control-panel/dashboard/dashboard.component.html similarity index 100% rename from src/app/control-panel/profile/dashboard/dashboard.component.html rename to src/app/control-panel/dashboard/dashboard.component.html diff --git a/src/app/control-panel/profile/dashboard/dashboard.component.spec.ts b/src/app/control-panel/dashboard/dashboard.component.spec.ts similarity index 100% rename from src/app/control-panel/profile/dashboard/dashboard.component.spec.ts rename to src/app/control-panel/dashboard/dashboard.component.spec.ts diff --git a/src/app/control-panel/profile/dashboard/dashboard.component.ts b/src/app/control-panel/dashboard/dashboard.component.ts similarity index 100% rename from src/app/control-panel/profile/dashboard/dashboard.component.ts rename to src/app/control-panel/dashboard/dashboard.component.ts diff --git a/src/app/control-panel/dashboard/dashboard.module.ts b/src/app/control-panel/dashboard/dashboard.module.ts new file mode 100644 index 0000000..da92449 --- /dev/null +++ b/src/app/control-panel/dashboard/dashboard.module.ts @@ -0,0 +1,68 @@ +import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { DropdownModule } from 'primeng/dropdown'; + +import { PanelMenuModule } from 'primeng/panelmenu'; +import { EnergyComponent } from './energy/energy.component'; +import { SidebarDashboardComponent, SidebarNavItemComponent, SidebarNavDropItemComponent } from './sidebar/sidebarDashboard.component'; +import { ElectricityComponent } from './energy/electricity/electricity.component'; +import { GasComponent } from './energy/gas/gas.component'; +import { WaterComponent } from './energy/water/water.component'; +import { ChartModule } from 'primeng/chart'; +import { DashboardRoutingModule } from './dashboard-routing.module'; +import { CommonModule } from '@angular/common'; +import { ToolbarModule } from 'primeng/toolbar'; +import { ButtonModule } from 'primeng/button'; +import { DialogModule } from 'primeng/dialog'; +import { InputTextModule } from 'primeng/inputtext'; +import { HttpClientModule } from '@angular/common/http'; +import { FormsModule } from '@angular/forms'; +import { CalendarModule } from 'primeng/calendar'; +import { ConfirmDialogModule } from 'primeng/confirmdialog'; +import { ToastModule } from 'primeng/toast'; +import { SplitButtonModule } from 'primeng/splitbutton'; +import { DashboardComponent } from './dashboard.component'; + +@NgModule({ + declarations: [ + DashboardComponent, + EnergyComponent, + SidebarDashboardComponent, + SidebarNavItemComponent, + SidebarNavDropItemComponent, + ElectricityComponent, + GasComponent, + WaterComponent + ], + imports: [ + DashboardRoutingModule, + DropdownModule, + PanelMenuModule, + ChartModule, + CommonModule, + ToolbarModule, + ButtonModule, + SplitButtonModule, + DialogModule, + InputTextModule, + HttpClientModule, + FormsModule, + CalendarModule, + ConfirmDialogModule, + ToastModule, + DropdownModule, + PanelMenuModule + ], + exports: [ + EnergyComponent, + SidebarDashboardComponent, + SidebarNavItemComponent, + SidebarNavDropItemComponent, + ElectricityComponent, + GasComponent, + WaterComponent + ], + schemas: [ + CUSTOM_ELEMENTS_SCHEMA + ] +}) +export class DashboardModule { } diff --git a/src/app/control-panel/profile/dashboard/energy/electricity/electricity.component.css b/src/app/control-panel/dashboard/energy/electricity/electricity.component.css similarity index 100% rename from src/app/control-panel/profile/dashboard/energy/electricity/electricity.component.css rename to src/app/control-panel/dashboard/energy/electricity/electricity.component.css diff --git a/src/app/control-panel/profile/dashboard/energy/electricity/electricity.component.html b/src/app/control-panel/dashboard/energy/electricity/electricity.component.html similarity index 100% rename from src/app/control-panel/profile/dashboard/energy/electricity/electricity.component.html rename to src/app/control-panel/dashboard/energy/electricity/electricity.component.html diff --git a/src/app/control-panel/profile/dashboard/energy/electricity/electricity.component.spec.ts b/src/app/control-panel/dashboard/energy/electricity/electricity.component.spec.ts similarity index 100% rename from src/app/control-panel/profile/dashboard/energy/electricity/electricity.component.spec.ts rename to src/app/control-panel/dashboard/energy/electricity/electricity.component.spec.ts diff --git a/src/app/control-panel/profile/dashboard/energy/electricity/electricity.component.ts b/src/app/control-panel/dashboard/energy/electricity/electricity.component.ts similarity index 100% rename from src/app/control-panel/profile/dashboard/energy/electricity/electricity.component.ts rename to src/app/control-panel/dashboard/energy/electricity/electricity.component.ts diff --git a/src/app/control-panel/profile/dashboard/energy/energy.component.css b/src/app/control-panel/dashboard/energy/energy.component.css similarity index 100% rename from src/app/control-panel/profile/dashboard/energy/energy.component.css rename to src/app/control-panel/dashboard/energy/energy.component.css diff --git a/src/app/control-panel/profile/dashboard/energy/energy.component.html b/src/app/control-panel/dashboard/energy/energy.component.html similarity index 100% rename from src/app/control-panel/profile/dashboard/energy/energy.component.html rename to src/app/control-panel/dashboard/energy/energy.component.html diff --git a/src/app/control-panel/profile/dashboard/energy/energy.component.spec.ts b/src/app/control-panel/dashboard/energy/energy.component.spec.ts similarity index 100% rename from src/app/control-panel/profile/dashboard/energy/energy.component.spec.ts rename to src/app/control-panel/dashboard/energy/energy.component.spec.ts diff --git a/src/app/control-panel/profile/dashboard/energy/energy.component.ts b/src/app/control-panel/dashboard/energy/energy.component.ts similarity index 100% rename from src/app/control-panel/profile/dashboard/energy/energy.component.ts rename to src/app/control-panel/dashboard/energy/energy.component.ts diff --git a/src/app/control-panel/profile/dashboard/energy/gas/gas.component.css b/src/app/control-panel/dashboard/energy/gas/gas.component.css similarity index 100% rename from src/app/control-panel/profile/dashboard/energy/gas/gas.component.css rename to src/app/control-panel/dashboard/energy/gas/gas.component.css diff --git a/src/app/control-panel/profile/dashboard/energy/gas/gas.component.html b/src/app/control-panel/dashboard/energy/gas/gas.component.html similarity index 100% rename from src/app/control-panel/profile/dashboard/energy/gas/gas.component.html rename to src/app/control-panel/dashboard/energy/gas/gas.component.html diff --git a/src/app/control-panel/profile/dashboard/energy/gas/gas.component.spec.ts b/src/app/control-panel/dashboard/energy/gas/gas.component.spec.ts similarity index 100% rename from src/app/control-panel/profile/dashboard/energy/gas/gas.component.spec.ts rename to src/app/control-panel/dashboard/energy/gas/gas.component.spec.ts diff --git a/src/app/control-panel/profile/dashboard/energy/gas/gas.component.ts b/src/app/control-panel/dashboard/energy/gas/gas.component.ts similarity index 100% rename from src/app/control-panel/profile/dashboard/energy/gas/gas.component.ts rename to src/app/control-panel/dashboard/energy/gas/gas.component.ts diff --git a/src/app/control-panel/profile/dashboard/energy/water/water.component.css b/src/app/control-panel/dashboard/energy/water/water.component.css similarity index 100% rename from src/app/control-panel/profile/dashboard/energy/water/water.component.css rename to src/app/control-panel/dashboard/energy/water/water.component.css diff --git a/src/app/control-panel/profile/dashboard/energy/water/water.component.html b/src/app/control-panel/dashboard/energy/water/water.component.html similarity index 100% rename from src/app/control-panel/profile/dashboard/energy/water/water.component.html rename to src/app/control-panel/dashboard/energy/water/water.component.html diff --git a/src/app/control-panel/profile/dashboard/energy/water/water.component.spec.ts b/src/app/control-panel/dashboard/energy/water/water.component.spec.ts similarity index 100% rename from src/app/control-panel/profile/dashboard/energy/water/water.component.spec.ts rename to src/app/control-panel/dashboard/energy/water/water.component.spec.ts diff --git a/src/app/control-panel/profile/dashboard/energy/water/water.component.ts b/src/app/control-panel/dashboard/energy/water/water.component.ts similarity index 100% rename from src/app/control-panel/profile/dashboard/energy/water/water.component.ts rename to src/app/control-panel/dashboard/energy/water/water.component.ts diff --git a/src/app/control-panel/profile/dashboard/sidebar/sidebarDashboard.component.html b/src/app/control-panel/dashboard/sidebar/sidebarDashboard.component.html similarity index 100% rename from src/app/control-panel/profile/dashboard/sidebar/sidebarDashboard.component.html rename to src/app/control-panel/dashboard/sidebar/sidebarDashboard.component.html diff --git a/src/app/control-panel/profile/dashboard/sidebar/sidebarDashboard.component.scss b/src/app/control-panel/dashboard/sidebar/sidebarDashboard.component.scss similarity index 100% rename from src/app/control-panel/profile/dashboard/sidebar/sidebarDashboard.component.scss rename to src/app/control-panel/dashboard/sidebar/sidebarDashboard.component.scss diff --git a/src/app/control-panel/profile/dashboard/sidebar/sidebarDashboard.component.spec.ts b/src/app/control-panel/dashboard/sidebar/sidebarDashboard.component.spec.ts similarity index 100% rename from src/app/control-panel/profile/dashboard/sidebar/sidebarDashboard.component.spec.ts rename to src/app/control-panel/dashboard/sidebar/sidebarDashboard.component.spec.ts diff --git a/src/app/control-panel/profile/dashboard/sidebar/sidebarDashboard.component.ts b/src/app/control-panel/dashboard/sidebar/sidebarDashboard.component.ts similarity index 95% rename from src/app/control-panel/profile/dashboard/sidebar/sidebarDashboard.component.ts rename to src/app/control-panel/dashboard/sidebar/sidebarDashboard.component.ts index ea8823c..405e293 100644 --- a/src/app/control-panel/profile/dashboard/sidebar/sidebarDashboard.component.ts +++ b/src/app/control-panel/dashboard/sidebar/sidebarDashboard.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit, Input } from '@angular/core'; -import { LayoutService } from '../../../../_api/services'; -import { PanelSection } from '../../../../_api/models'; +import { LayoutService } from '../../../_api/services'; +import { PanelSection } from '../../../_api/models'; import { Router, Route, ActivatedRoute } from '@angular/router'; @Component({ @@ -16,7 +16,7 @@ export class SidebarDashboardComponent implements OnInit { UrlRegex = /.*dashboard/; - constructor(private _layoutService: LayoutService, + constructor(private _layoutService: LayoutService, private _router: Router, private _route: ActivatedRoute ) { } diff --git a/src/app/control-panel/profile/devices/devices.component.css b/src/app/control-panel/devices/devices.component.css similarity index 100% rename from src/app/control-panel/profile/devices/devices.component.css rename to src/app/control-panel/devices/devices.component.css diff --git a/src/app/control-panel/profile/devices/devices.component.html b/src/app/control-panel/devices/devices.component.html similarity index 100% rename from src/app/control-panel/profile/devices/devices.component.html rename to src/app/control-panel/devices/devices.component.html diff --git a/src/app/control-panel/profile/devices/devices.component.spec.ts b/src/app/control-panel/devices/devices.component.spec.ts similarity index 100% rename from src/app/control-panel/profile/devices/devices.component.spec.ts rename to src/app/control-panel/devices/devices.component.spec.ts diff --git a/src/app/control-panel/profile/devices/devices.component.ts b/src/app/control-panel/devices/devices.component.ts similarity index 100% rename from src/app/control-panel/profile/devices/devices.component.ts rename to src/app/control-panel/devices/devices.component.ts