start creating usersModule

pull/7/head
Florian Hartwich 2017-08-26 22:46:59 +02:00
parent c22256f2aa
commit 164f4543c7
7 changed files with 43 additions and 6 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "opt-cc",
"version": "1.1.2",
"version": "1.3.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -523,6 +523,12 @@
"integrity": "sha1-dMt3+2BS7a/yqJhN2v2I1BnyXKw=",
"dev": true
},
"@types/systemjs": {
"version": "0.20.4",
"resolved": "https://registry.npmjs.org/@types/systemjs/-/systemjs-0.20.4.tgz",
"integrity": "sha512-LpX7BmY9KuCZnxJ0XYBofrLwJ+0BL/FyAvfLxpejUUjzBwOqU03L9CLF6SILxWw8aWhcavFpu1b7M2bLbg1irQ==",
"dev": true
},
"abbrev": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz",

View File

@ -41,6 +41,7 @@
"devDependencies": {
"@types/jasmine": "2.5.38",
"@types/node": "~6.0.60",
"@types/systemjs": "^0.20.4",
"codelyzer": "~2.0.0-beta.1",
"jasmine-core": "^2.5.2",
"jasmine-spec-reporter": "^3.2.0",

View File

@ -50,7 +50,6 @@ import {AccordionModule} from "ngx-bootstrap";
AppUserService,
AppUserStore,
UserService,
UserStore,
SquadService,
SquadStore,
DecorationService,
@ -72,7 +71,6 @@ import {AccordionModule} from "ngx-bootstrap";
DecorationItemComponent,
RankItemComponent,
FilterRankPipe,
UserItemComponent,
SquadItemComponent,
ShowErrorComponent,
APPLICATION_VALIDATORS],

View File

@ -15,6 +15,7 @@ import {ConfirmPromotionComponent} from "./request/confirm-promotion/confirm-pro
import {ConfirmAwardComponent} from "./request/confirm-award/confirm-award.component";
import {RouteConfig} from "./app.config";
import {statsRoutes, statsRoutingComponents} from "./statistic/stats.routing";
import UsersModule from "./users/users.module";
export const appRoutes: Routes = [
@ -31,7 +32,7 @@ export const appRoutes: Routes = [
{path: RouteConfig.confirmAwardPath, component: ConfirmAwardComponent, canActivate: [LoginGuardHL]},
{path: RouteConfig.confirmPromotionPath, component: ConfirmPromotionComponent, canActivate: [LoginGuardHL]},
{path: RouteConfig.userPath, children: usersRoutes, canActivate: [LoginGuardHL]},
{path: RouteConfig.userPath, loadChildren: './users/users.module', canActivate: [LoginGuardHL]},
{path: RouteConfig.squadPath, children: squadsRoutes, canActivate: [LoginGuardHL]},
{path: RouteConfig.decorationPath, children: decorationsRoutes, canActivate: [LoginGuardHL]},
{path: RouteConfig.rankPath, children: ranksRoutes, canActivate: [LoginGuardHL]},
@ -46,7 +47,7 @@ export const appRoutes: Routes = [
export const appRouting = RouterModule.forRoot(appRoutes);
export const routingComponents = [LoginComponent, SignupComponent, RequestAwardComponent, RequestPromotionComponent, ConfirmAwardComponent,
ConfirmPromotionComponent, AdminComponent, ...armyRoutingComponents, NotFoundComponent, ...usersRoutingComponents,
ConfirmPromotionComponent, AdminComponent, ...armyRoutingComponents, NotFoundComponent,
...squadsRoutingComponents, ...decorationsRoutingComponents, ...ranksRoutingComponents, ...statsRoutingComponents];
export const routingProviders = [LoginGuardSQL, LoginGuardHL, LoginGuardMT, LoginGuardAdmin];

View File

@ -0,0 +1,28 @@
import { NgModule } from '@angular/core';
import {routes, usersRoutingComponents} from './users.routing';
import {UserStore} from "../services/stores/user.store";
import {UserService} from "../services/user-service/user.service";
import {BrowserModule} from "@angular/platform-browser";
import {FormsModule, ReactiveFormsModule} from "@angular/forms";
import {HttpModule} from "@angular/http";
import {AccordionModule} from "ngx-bootstrap";
import {NgxChartsModule} from "@swimlane/ngx-charts";
import {BrowserAnimationsModule} from "@angular/platform-browser/animations";
import {DataTableModule} from "angular2-datatable";
import {ClipboardModule} from "ngx-clipboard/dist";
import {UsersComponent} from "./users.component";
import {UserItemComponent} from "./user-list/user-item.component";
import {UserListComponent} from "./user-list/user-list.component";
import {EditUserComponent} from "./edit-user/edit-user.component";
import {AwardUserComponent} from "./award-user/award-user.component";
import {ShowErrorComponent} from "../common/show-error/show-error.component";
@NgModule({
declarations: [ UsersComponent, UserListComponent, UserItemComponent, EditUserComponent, AwardUserComponent, ShowErrorComponent ],
imports: [ BrowserModule, FormsModule, ReactiveFormsModule, HttpModule, ClipboardModule, DataTableModule,
BrowserAnimationsModule, NgxChartsModule, AccordionModule.forRoot(), routes ],
providers: [ UserStore, UserService ]
})
export default class UsersModule {
static routes = routes;
};

View File

@ -1,8 +1,9 @@
import {Routes} from "@angular/router";
import {RouterModule, Routes} from "@angular/router";
import {UsersComponent} from "./users.component";
import {EditUserComponent} from "./edit-user/edit-user.component";
import {UserListComponent} from "./user-list/user-list.component";
import {AwardUserComponent} from "./award-user/award-user.component";
import {ModuleWithProviders} from "@angular/core";
export const usersRoutes: Routes = [{
path: '', component: UsersComponent,
@ -30,4 +31,6 @@ export const usersRoutes: Routes = [{
}
];
export const routes: ModuleWithProviders = RouterModule.forChild(usersRoutes);
export const usersRoutingComponents = [UsersComponent, UserListComponent, EditUserComponent, AwardUserComponent];