From 4eaa9beb7bd2a55742dbdc8e14b9612e6cc9f438 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Radek=20Pu=C5=A1?= <pusradek@fit.cvut.cz>
Date: Wed, 30 Oct 2019 18:29:16 +0100
Subject: [PATCH] created new module from account-properties.component

---
 .../account-properties.module.ts              | 39 +++++++++++++++++++
 .../ClientApp/src/app/home/home.module.ts     | 22 ++---------
 Core/Core/Core.csproj                         |  4 ++
 3 files changed, 46 insertions(+), 19 deletions(-)
 create mode 100644 Core/Core/ClientApp/src/app/home/components/account-properties/account-properties.module.ts

diff --git a/Core/Core/ClientApp/src/app/home/components/account-properties/account-properties.module.ts b/Core/Core/ClientApp/src/app/home/components/account-properties/account-properties.module.ts
new file mode 100644
index 0000000..155cc39
--- /dev/null
+++ b/Core/Core/ClientApp/src/app/home/components/account-properties/account-properties.module.ts
@@ -0,0 +1,39 @@
+import { CommonModule } from "@angular/common";
+import { NgModule } from "@angular/core";
+import { HTTP_INTERCEPTORS } from "@angular/common/http";
+import { MatFormFieldModule, MatDialogModule, MatInputModule } from '@angular/material'
+import { FormsModule, ReactiveFormsModule } from '@angular/forms';
+import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
+
+import { JwtInterceptor } from "../../../helpers/jwt.interceptor";
+import { AccountPropertiesComponent } from "./account-properties.component";
+import { ChangePasswordComponent } from "./change-password/change-password.component";
+
+
+
+
+@NgModule({
+  declarations: [
+    AccountPropertiesComponent,
+    ChangePasswordComponent
+  ],
+  imports: [
+    CommonModule,
+    FormsModule,
+    ReactiveFormsModule,
+    MatDialogModule,
+    MatFormFieldModule,
+    MatInputModule,
+    BrowserAnimationsModule
+  ],
+  exports: [
+    AccountPropertiesComponent
+  ],
+  entryComponents: [
+    ChangePasswordComponent
+  ],
+  providers: [
+    { provide: HTTP_INTERCEPTORS, useClass: JwtInterceptor, multi: true }
+  ]
+})
+export class AccountPropertiesModule { }
diff --git a/Core/Core/ClientApp/src/app/home/home.module.ts b/Core/Core/ClientApp/src/app/home/home.module.ts
index f43cf84..2ee8d12 100644
--- a/Core/Core/ClientApp/src/app/home/home.module.ts
+++ b/Core/Core/ClientApp/src/app/home/home.module.ts
@@ -2,45 +2,29 @@ import { CommonModule } from "@angular/common";
 import { NgModule } from "@angular/core";
 import { ChartModule } from "angular-highcharts";
 import { HTTP_INTERCEPTORS } from "@angular/common/http";
-import { MatFormFieldModule, MatDialogModule, MatInputModule } from '@angular/material'
 import { FormsModule, ReactiveFormsModule } from '@angular/forms';
-import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
-
 import { JwtInterceptor } from "../helpers/jwt.interceptor";
 
 import { HomeComponent } from "./home.component";
-import { AccountPropertiesComponent } from "./components/account-properties/account-properties.component";
 import { ExpensesComponent } from "./components/expenses/expenses.component";
 import { ExpensesService } from "./components/expenses/expenses.service";
 import { ImportComponent } from "./components/import/import.component";
 import { ImportService } from "./components/import/import.service";
-import { ChangePasswordComponent } from "./components/account-properties/change-password/change-password.component";
-
+import { AccountPropertiesModule } from "./components/account-properties/account-properties.module";
 
 
 @NgModule({
   declarations: [
     HomeComponent,
-    AccountPropertiesComponent,
     ExpensesComponent,
-    ImportComponent,
-    ChangePasswordComponent
+    ImportComponent
   ],
   imports: [
     CommonModule,
     ChartModule,
-    MatDialogModule,
     FormsModule,
     ReactiveFormsModule,
-    MatFormFieldModule,
-    MatInputModule,
-    BrowserAnimationsModule
-  ],
-  exports: [
-    ChangePasswordComponent
-  ],
-  entryComponents: [
-    ChangePasswordComponent
+    AccountPropertiesModule
   ],
   providers: [
     ExpensesService,
diff --git a/Core/Core/Core.csproj b/Core/Core/Core.csproj
index 438fb9a..b065240 100644
--- a/Core/Core/Core.csproj
+++ b/Core/Core/Core.csproj
@@ -39,6 +39,7 @@
   <ItemGroup>
     <None Remove="ClientApp\src\app\app.routing.module.ts" />
     <None Remove="ClientApp\src\app\helpers\jwt.interceptor.ts" />
+    <None Remove="ClientApp\src\app\home\components\account-properties\account-properties.module.ts" />
     <None Remove="ClientApp\src\app\home\home.module.ts" />
     <None Remove="ClientApp\src\app\home\components\import\import.service.ts" />
     <None Remove="ClientApp\src\app\login\login.service.ts" />
@@ -47,6 +48,9 @@
 
   <ItemGroup>
     <TypeScriptCompile Include="ClientApp\src\app\helpers\jwt.interceptor.ts" />
+    <TypeScriptCompile Include="ClientApp\src\app\home\components\account-properties\account-properties.module.ts">
+      <SubType>Code</SubType>
+    </TypeScriptCompile>
     <TypeScriptCompile Include="ClientApp\src\app\home\home.module.ts" />
     <TypeScriptCompile Include="ClientApp\src\app\home\components\import\import.service.ts" />
     <TypeScriptCompile Include="ClientApp\src\app\login\login.service.ts">
-- 
GitLab