Skip to content

Commit e30df7b

Browse files
committed
2 parents f21c672 + 9290c15 commit e30df7b

28 files changed

+204
-156
lines changed

eFormAPI/eFormAPI/Global.asax.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using System.Data.Entity.Infrastructure;
44
using System.Data.Entity.Migrations;
55
using System.Diagnostics;
6+
using System.Web;
67
using System.Web.Configuration;
78
using System.Web.Http;
89
using System.Web.Mvc;
@@ -49,5 +50,11 @@ protected void Application_Start()
4950
throw new Exception($"Error while migrate database: {exception.Message}");
5051
}
5152
}
53+
54+
protected void Application_BeginRequest()
55+
{
56+
Context.Response.Cache.SetLastModifiedFromFileDependencies();
57+
// Context.Response.Cache.SetCacheability(HttpCacheability.NoCache);
58+
}
5259
}
5360
}

eform-client/protractor.conf.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ var SpecReporter = require('jasmine-spec-reporter');
66
exports.config = {
77
allScriptsTimeout: 20000,
88
specs: [
9-
'./e2e/settings.site-header.e2e-spec.ts',
10-
// './e2e/settings.login-page.e2e-spec.ts'
9+
'./e2e/settings.site-header.e2e-spec.ts'
1110
],
1211
capabilities: {
1312
'browserName': 'chrome'

eform-client/src/app/app.module.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ import {FullLayoutComponent} from './layouts/fulllayout/fulllayout.component';
1313
import {SettingsModule} from './modules/settings/settings.module';
1414
import {DndModule} from 'ng2-dnd';
1515
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
16-
import {AdminModule} from 'app/modules/admin/admin.module';
16+
import {AccountManagementModule} from 'app/modules/account-management/account-management.module';
1717
import {AuthComponent} from 'app/components/auth/auth.component';
1818
import {SimpleLayoutComponent} from 'app/layouts/simple-layout/simple-layout.component';
1919
import {SimpleSitesModule} from 'app/modules/simple-sites/simple-sites.module';
2020
import {EFormService} from 'app/services/eform/eform.service';
2121
import {
22-
AdminService, EntitySearchService,EntitySelectService, SettingsService, SitesService, UnitsService,
22+
AdminService, EntitySearchService, EntitySelectService, SettingsService, SitesService, UnitsService,
2323
WorkersService
2424
} from 'app/services';
2525
import {SimpleSitesService} from 'app/services/simple-sites.service';
@@ -69,7 +69,7 @@ import {EformTagService} from 'app/services/eform/eform-tag.service';
6969
SettingsModule,
7070
NgxGalleryModule,
7171
HelpersModule,
72-
AdminModule,
72+
AccountManagementModule,
7373
BrowserAnimationsModule,
7474
CommonModule,
7575
DndModule.forRoot()

eform-client/src/app/app.routing.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ export const routes: Routes = [
4040
loadChildren: './modules/settings/settings.module#SettingsModule'
4141
},
4242
{
43-
path: 'admin',
43+
path: 'account-management',
4444
canActivate: [AuthGuard],
45-
loadChildren: './modules/admin/admin.module#AdminModule'
45+
loadChildren: './modules/account-management/account-management.module#AccountManagementModule'
4646
}
4747
]
4848
},

eform-client/src/app/components/navigation/navigation.component.html

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@
77
{{userInfo.lastName || 'name'}}</a>
88
<ul class="dropdown-menu dropdown-menu-right">
99
<li *ngIf="userInfo.role == 'admin'">
10-
<a routerLink="/admin/users" routerLinkActive="active">User Management</a>
10+
<a routerLink="/account-management/users" routerLinkActive="active">User Management</a>
1111
</li>
1212
<li>
13-
<a routerLink="/admin/change-password" routerLinkActive="active">Change password</a>
13+
<a routerLink="/account-management/google-authenticator" routerLinkActive="active">Google Authenticator</a>
14+
</li>
15+
<li>
16+
<a routerLink="/account-management/change-password" routerLinkActive="active">Change password</a>
1417
</li>
1518
<li>
1619
<a (click)="signOut()" id="sign-out">Sign out</a>
@@ -71,7 +74,7 @@
7174
</a>
7275
</li>
7376
<li class="">
74-
<a routerLink="/settings" routerLinkActive="active">
77+
<a routerLink="/settings" routerLinkActive="active" *ngIf="userInfo.role == 'admin'">
7578
Settings
7679
</a>
7780
</li>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import {NgModule} from '@angular/core';
2+
import {RouterModule, Routes} from '@angular/router';
3+
import {ChangePasswordComponent} from './components/change-password/change-password.component';
4+
import {UserComponent} from './components/user/user.component';
5+
import {GoogleAuthenticatorComponent} from "./components/google-authenticator/google-authenticator.component";
6+
7+
const routes: Routes = [
8+
{
9+
path: 'users',
10+
component: UserComponent,
11+
},
12+
{
13+
path: 'change-password',
14+
component: ChangePasswordComponent,
15+
},
16+
{
17+
path: 'google-authenticator',
18+
component: GoogleAuthenticatorComponent,
19+
}
20+
];
21+
22+
@NgModule({
23+
imports: [RouterModule.forChild(routes)],
24+
exports: [RouterModule]
25+
})
26+
export class AccountManagementRoutingModule {
27+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import {HelpersModule} from '../helpers/helpers.module';
2+
import {FormsModule} from '@angular/forms';
3+
import {AccountManagementRoutingModule} from './account-management-routing.module';
4+
import {NgModule} from '@angular/core';
5+
import {CommonModule} from '@angular/common';
6+
import {Ng2Bs3ModalModule} from 'ng2-bs3-modal/ng2-bs3-modal';
7+
import {TooltipModule} from 'ngx-bootstrap';
8+
import {AdminComponent} from './components/admin.component';
9+
import {UserGridComponent} from './components/user-grid/user-grid.component';
10+
import {UserComponent} from './components/user/user.component';
11+
import {UserPaginationComponent} from './components/user-pagination/user-pagination.component';
12+
import {UserEditComponent} from './components/user-edit/user-edit.component';
13+
import {ChangePasswordComponent} from './components/change-password/change-password.component';
14+
import {GoogleAuthenticatorComponent} from './components/google-authenticator/google-authenticator.component';
15+
16+
17+
@NgModule({
18+
imports: [
19+
CommonModule,
20+
FormsModule,
21+
AccountManagementRoutingModule,
22+
TooltipModule.forRoot(),
23+
Ng2Bs3ModalModule,
24+
HelpersModule
25+
],
26+
declarations: [
27+
AdminComponent,
28+
UserGridComponent,
29+
ChangePasswordComponent,
30+
UserComponent,
31+
UserPaginationComponent,
32+
UserEditComponent,
33+
GoogleAuthenticatorComponent
34+
],
35+
})
36+
export class AccountManagementModule {
37+
}

eform-client/src/app/modules/admin/components/admin.component.css renamed to eform-client/src/app/modules/account-management/components/admin.component.css

File renamed without changes.

eform-client/src/app/modules/admin/components/admin.component.ts renamed to eform-client/src/app/modules/account-management/components/admin.component.ts

File renamed without changes.

eform-client/src/app/modules/admin/components/change-password/change-password.component.html renamed to eform-client/src/app/modules/account-management/components/change-password/change-password.component.html

File renamed without changes.

0 commit comments

Comments
 (0)