Skip to content

Commit e976e33

Browse files
Merge pull request #63 from phamtiendungcw/dungcw
Refactor admin and client components, remove unused files
2 parents 6fbabb0 + 6c5abb5 commit e976e33

17 files changed

+71
-81
lines changed

src/MLS.Identity/DatabaseContext/MatLidStoreManagementIdentityDbContext.cs

-26
This file was deleted.

src/MLS.Identity/MLS.Identity.csproj

-33
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<div class="py-0">
2+
<app-header></app-header>
3+
</div>
4+
5+
<div>
6+
<app-dashboard></app-dashboard>
7+
</div>
8+
9+
<div class="py-3">
10+
<app-footer></app-footer>
11+
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { Component, OnInit } from '@angular/core';
2+
3+
@Component({
4+
selector: 'app-admin-home',
5+
templateUrl: './admin-home.component.html',
6+
styleUrls: ['./admin-home.component.scss']
7+
})
8+
export class AdminHomeComponent implements OnInit {
9+
10+
constructor() { }
11+
12+
ngOnInit(): void {
13+
}
14+
15+
}

src/MLS.WebUI/src/app/modules/app-admin/app-admin-routing.module.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { NgModule } from '@angular/core';
22
import { RouterModule, Routes } from '@angular/router';
3-
import { HomeComponent } from './home/home.component';
3+
import { AdminHomeComponent } from './admin-home/admin-home.component';
44

5-
const routes: Routes = [{ path: '', component: HomeComponent }];
5+
const routes: Routes = [{ path: '', component: AdminHomeComponent }];
66

77
@NgModule({
88
imports: [RouterModule.forChild(routes)],

src/MLS.WebUI/src/app/modules/app-admin/app-admin.module.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ import { NgModule } from '@angular/core';
22
import { CommonModule } from '@angular/common';
33

44
import { AppAdminRoutingModule } from './app-admin-routing.module';
5-
import { HomeComponent } from './home/home.component';
65
import { ThemeModule } from '../../theme/theme.module';
76
import { PagesModule } from '../../theme/pages/pages.module';
7+
import { AdminHomeComponent } from './admin-home/admin-home.component';
88

99
@NgModule({
10-
declarations: [HomeComponent],
10+
declarations: [AdminHomeComponent],
1111
imports: [CommonModule, AppAdminRoutingModule, ThemeModule, PagesModule],
1212
})
1313
export class AppAdminModule {}

src/MLS.WebUI/src/app/modules/app-admin/home/home.component.ts

-12
This file was deleted.

src/MLS.WebUI/src/app/modules/app-client/app-client.module.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ import { NgModule } from '@angular/core';
22
import { CommonModule } from '@angular/common';
33

44
import { AppClientRoutingModule } from './app-client-routing.module';
5+
import { ClientHomeComponent } from './client-home/client-home.component';
6+
import { PagesModule } from '../../theme/pages/pages.module';
7+
import { ThemeModule } from '../../theme/theme.module';
58

69
@NgModule({
7-
declarations: [],
8-
imports: [CommonModule, AppClientRoutingModule],
10+
declarations: [ClientHomeComponent],
11+
imports: [CommonModule, AppClientRoutingModule, PagesModule, ThemeModule],
912
})
1013
export class AppClientModule {}

src/MLS.WebUI/src/app/modules/app-client/client-home/client-home.component.scss

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { Component, OnInit } from '@angular/core';
2+
3+
@Component({
4+
selector: 'app-client-home',
5+
templateUrl: './client-home.component.html',
6+
styleUrls: ['./client-home.component.scss']
7+
})
8+
export class ClientHomeComponent implements OnInit {
9+
10+
constructor() { }
11+
12+
ngOnInit(): void {
13+
}
14+
15+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<p>dashboard works!</p>

src/MLS.WebUI/src/app/theme/pages/dashboard/dashboard.component.scss

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { Component, OnInit } from '@angular/core';
2+
3+
@Component({
4+
selector: 'app-dashboard',
5+
templateUrl: './dashboard.component.html',
6+
styleUrls: ['./dashboard.component.scss']
7+
})
8+
export class DashboardComponent implements OnInit {
9+
10+
constructor() { }
11+
12+
ngOnInit(): void {
13+
}
14+
15+
}

src/MLS.WebUI/src/app/theme/pages/login-layout/login-layout.component.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Component, inject } from '@angular/core';
22
import { Router } from '@angular/router';
33
import { AccountService } from 'src/app/core/data/account.service';
4-
import { AuthRequest, MatLidStoreServices, UserDetailsDto } from 'src/app/core/data/mls-data.service';
4+
import { AuthRequest, AuthResponse, MatLidStoreServices } from 'src/app/core/data/mls-data.service';
55

66
@Component({
77
selector: 'app-login-layout',
@@ -11,7 +11,7 @@ import { AuthRequest, MatLidStoreServices, UserDetailsDto } from 'src/app/core/d
1111
export class LoginLayoutComponent {
1212
loggedIn = false;
1313
model: AuthRequest = new AuthRequest();
14-
user: UserDetailsDto | null = null;
14+
user: AuthResponse | null = null;
1515
private matlidapi = inject(MatLidStoreServices);
1616
private router = inject(Router);
1717
private accountService = inject(AccountService);

src/MLS.WebUI/src/app/theme/pages/pages.module.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ import { PagesRoutingModule } from './pages-routing.module';
55
import { WelcomeComponent } from './welcome/welcome.component';
66
import { UserInfoComponent } from './user-info/user-info.component';
77
import { MenuComponent } from './menu/menu.component';
8+
import { DashboardComponent } from './dashboard/dashboard.component';
89

910
@NgModule({
10-
declarations: [WelcomeComponent, UserInfoComponent, MenuComponent],
11+
declarations: [WelcomeComponent, UserInfoComponent, MenuComponent, DashboardComponent],
1112
imports: [CommonModule, PagesRoutingModule],
12-
exports: [WelcomeComponent],
13+
exports: [WelcomeComponent, DashboardComponent],
1314
})
1415
export class PagesModule {}

0 commit comments

Comments
 (0)