start creating usersModule
parent
c22256f2aa
commit
164f4543c7
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "opt-cc",
|
"name": "opt-cc",
|
||||||
"version": "1.1.2",
|
"version": "1.3.1",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -523,6 +523,12 @@
|
||||||
"integrity": "sha1-dMt3+2BS7a/yqJhN2v2I1BnyXKw=",
|
"integrity": "sha1-dMt3+2BS7a/yqJhN2v2I1BnyXKw=",
|
||||||
"dev": true
|
"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": {
|
"abbrev": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz",
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jasmine": "2.5.38",
|
"@types/jasmine": "2.5.38",
|
||||||
"@types/node": "~6.0.60",
|
"@types/node": "~6.0.60",
|
||||||
|
"@types/systemjs": "^0.20.4",
|
||||||
"codelyzer": "~2.0.0-beta.1",
|
"codelyzer": "~2.0.0-beta.1",
|
||||||
"jasmine-core": "^2.5.2",
|
"jasmine-core": "^2.5.2",
|
||||||
"jasmine-spec-reporter": "^3.2.0",
|
"jasmine-spec-reporter": "^3.2.0",
|
||||||
|
|
|
@ -50,7 +50,6 @@ import {AccordionModule} from "ngx-bootstrap";
|
||||||
AppUserService,
|
AppUserService,
|
||||||
AppUserStore,
|
AppUserStore,
|
||||||
UserService,
|
UserService,
|
||||||
UserStore,
|
|
||||||
SquadService,
|
SquadService,
|
||||||
SquadStore,
|
SquadStore,
|
||||||
DecorationService,
|
DecorationService,
|
||||||
|
@ -72,7 +71,6 @@ import {AccordionModule} from "ngx-bootstrap";
|
||||||
DecorationItemComponent,
|
DecorationItemComponent,
|
||||||
RankItemComponent,
|
RankItemComponent,
|
||||||
FilterRankPipe,
|
FilterRankPipe,
|
||||||
UserItemComponent,
|
|
||||||
SquadItemComponent,
|
SquadItemComponent,
|
||||||
ShowErrorComponent,
|
ShowErrorComponent,
|
||||||
APPLICATION_VALIDATORS],
|
APPLICATION_VALIDATORS],
|
||||||
|
|
|
@ -15,6 +15,7 @@ import {ConfirmPromotionComponent} from "./request/confirm-promotion/confirm-pro
|
||||||
import {ConfirmAwardComponent} from "./request/confirm-award/confirm-award.component";
|
import {ConfirmAwardComponent} from "./request/confirm-award/confirm-award.component";
|
||||||
import {RouteConfig} from "./app.config";
|
import {RouteConfig} from "./app.config";
|
||||||
import {statsRoutes, statsRoutingComponents} from "./statistic/stats.routing";
|
import {statsRoutes, statsRoutingComponents} from "./statistic/stats.routing";
|
||||||
|
import UsersModule from "./users/users.module";
|
||||||
|
|
||||||
export const appRoutes: Routes = [
|
export const appRoutes: Routes = [
|
||||||
|
|
||||||
|
@ -31,7 +32,7 @@ export const appRoutes: Routes = [
|
||||||
{path: RouteConfig.confirmAwardPath, component: ConfirmAwardComponent, canActivate: [LoginGuardHL]},
|
{path: RouteConfig.confirmAwardPath, component: ConfirmAwardComponent, canActivate: [LoginGuardHL]},
|
||||||
{path: RouteConfig.confirmPromotionPath, component: ConfirmPromotionComponent, 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.squadPath, children: squadsRoutes, canActivate: [LoginGuardHL]},
|
||||||
{path: RouteConfig.decorationPath, children: decorationsRoutes, canActivate: [LoginGuardHL]},
|
{path: RouteConfig.decorationPath, children: decorationsRoutes, canActivate: [LoginGuardHL]},
|
||||||
{path: RouteConfig.rankPath, children: ranksRoutes, 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 appRouting = RouterModule.forRoot(appRoutes);
|
||||||
|
|
||||||
export const routingComponents = [LoginComponent, SignupComponent, RequestAwardComponent, RequestPromotionComponent, ConfirmAwardComponent,
|
export const routingComponents = [LoginComponent, SignupComponent, RequestAwardComponent, RequestPromotionComponent, ConfirmAwardComponent,
|
||||||
ConfirmPromotionComponent, AdminComponent, ...armyRoutingComponents, NotFoundComponent, ...usersRoutingComponents,
|
ConfirmPromotionComponent, AdminComponent, ...armyRoutingComponents, NotFoundComponent,
|
||||||
...squadsRoutingComponents, ...decorationsRoutingComponents, ...ranksRoutingComponents, ...statsRoutingComponents];
|
...squadsRoutingComponents, ...decorationsRoutingComponents, ...ranksRoutingComponents, ...statsRoutingComponents];
|
||||||
|
|
||||||
export const routingProviders = [LoginGuardSQL, LoginGuardHL, LoginGuardMT, LoginGuardAdmin];
|
export const routingProviders = [LoginGuardSQL, LoginGuardHL, LoginGuardMT, LoginGuardAdmin];
|
||||||
|
|
|
@ -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;
|
||||||
|
};
|
|
@ -1,8 +1,9 @@
|
||||||
import {Routes} from "@angular/router";
|
import {RouterModule, Routes} from "@angular/router";
|
||||||
import {UsersComponent} from "./users.component";
|
import {UsersComponent} from "./users.component";
|
||||||
import {EditUserComponent} from "./edit-user/edit-user.component";
|
import {EditUserComponent} from "./edit-user/edit-user.component";
|
||||||
import {UserListComponent} from "./user-list/user-list.component";
|
import {UserListComponent} from "./user-list/user-list.component";
|
||||||
import {AwardUserComponent} from "./award-user/award-user.component";
|
import {AwardUserComponent} from "./award-user/award-user.component";
|
||||||
|
import {ModuleWithProviders} from "@angular/core";
|
||||||
|
|
||||||
export const usersRoutes: Routes = [{
|
export const usersRoutes: Routes = [{
|
||||||
path: '', component: UsersComponent,
|
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];
|
export const usersRoutingComponents = [UsersComponent, UserListComponent, EditUserComponent, AwardUserComponent];
|
||||||
|
|
Loading…
Reference in New Issue