Compare commits
No commits in common. "92b3df335a5d90a14a447f660f3fbb158292cd5c" and "164f4543c7fd45413881ff0e9624ae68d2d0e007" have entirely different histories.
92b3df335a
...
164f4543c7
|
@ -1,10 +1,16 @@
|
||||||
import {NgModule} from '@angular/core';
|
import {NgModule} from '@angular/core';
|
||||||
import {BrowserModule} from "@angular/platform-browser";
|
import {Title, BrowserModule} from "@angular/platform-browser";
|
||||||
|
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
|
||||||
import {HttpModule} from '@angular/http';
|
import {HttpModule} from '@angular/http';
|
||||||
import {AppComponent} from './app.component';
|
import {AppComponent} from './app.component';
|
||||||
import {LoginService} from "./services/login-service/login-service";
|
import {LoginService} from "./services/login-service/login-service";
|
||||||
|
import {UserStore} from "./services/stores/user.store";
|
||||||
|
import {ShowErrorComponent} from './common/show-error/show-error.component';
|
||||||
|
import {APPLICATION_VALIDATORS} from './models/app-validators';
|
||||||
import {appRouting, routingComponents, routingProviders} from './app.routing';
|
import {appRouting, routingComponents, routingProviders} from './app.routing';
|
||||||
import {AUTH_ENABLED} from './app.tokens';
|
import {AUTH_ENABLED} from './app.tokens';
|
||||||
|
import {UserService} from "./services/user-service/user.service";
|
||||||
|
import {UserItemComponent} from "./users/user-list/user-item.component";
|
||||||
import {SquadService} from "./services/squad-service/squad.service";
|
import {SquadService} from "./services/squad-service/squad.service";
|
||||||
import {SquadStore} from "./services/stores/squad.store";
|
import {SquadStore} from "./services/stores/squad.store";
|
||||||
import {DecorationStore} from "./services/stores/decoration.store";
|
import {DecorationStore} from "./services/stores/decoration.store";
|
||||||
|
@ -20,17 +26,20 @@ import {LoginGuardAdmin, LoginGuardHL, LoginGuardSQL} from "./login/login.guard"
|
||||||
import {AwardingService} from "./services/awarding-service/awarding.service";
|
import {AwardingService} from "./services/awarding-service/awarding.service";
|
||||||
import {HttpClient} from "./services/http-client";
|
import {HttpClient} from "./services/http-client";
|
||||||
import {ArmyService} from "./services/army-service/army.service";
|
import {ArmyService} from "./services/army-service/army.service";
|
||||||
import {ClipboardModule} from 'ngx-clipboard';
|
import { ClipboardModule } from 'ngx-clipboard';
|
||||||
import {AppUserService} from "./services/app-user-service/app-user.service";
|
import {AppUserService} from "./services/app-user-service/app-user.service";
|
||||||
import {AppUserStore} from "./services/stores/app-user.store";
|
import {AppUserStore} from "./services/stores/app-user.store";
|
||||||
import {PromotionService} from "./services/promotion-service/promotion.service";
|
import {PromotionService} from "./services/promotion-service/promotion.service";
|
||||||
import {FilterRankPipe} from "./filter/filter.pipe";
|
import {FilterRankPipe} from "./filter/filter.pipe";
|
||||||
import {WarService} from "./services/war-service/war.service";
|
import {WarService} from "./services/war-service/war.service";
|
||||||
import {SharedModule} from "./shared.module";
|
import {DataTableModule} from "angular2-datatable";
|
||||||
|
import {NgxChartsModule} from "@swimlane/ngx-charts";
|
||||||
import {BrowserAnimationsModule} from "@angular/platform-browser/animations";
|
import {BrowserAnimationsModule} from "@angular/platform-browser/animations";
|
||||||
|
import {AccordionModule} from "ngx-bootstrap";
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [SharedModule, BrowserModule, BrowserAnimationsModule, appRouting, HttpModule, ClipboardModule],
|
imports: [BrowserModule, FormsModule, ReactiveFormsModule, appRouting, HttpModule, ClipboardModule, DataTableModule,
|
||||||
|
BrowserAnimationsModule, NgxChartsModule, AccordionModule.forRoot()],
|
||||||
providers: [
|
providers: [
|
||||||
HttpClient,
|
HttpClient,
|
||||||
LoginService,
|
LoginService,
|
||||||
|
@ -40,6 +49,7 @@ import {BrowserAnimationsModule} from "@angular/platform-browser/animations";
|
||||||
ArmyService,
|
ArmyService,
|
||||||
AppUserService,
|
AppUserService,
|
||||||
AppUserStore,
|
AppUserStore,
|
||||||
|
UserService,
|
||||||
SquadService,
|
SquadService,
|
||||||
SquadStore,
|
SquadStore,
|
||||||
DecorationService,
|
DecorationService,
|
||||||
|
@ -48,7 +58,9 @@ import {BrowserAnimationsModule} from "@angular/platform-browser/animations";
|
||||||
RankStore,
|
RankStore,
|
||||||
AwardingService,
|
AwardingService,
|
||||||
PromotionService,
|
PromotionService,
|
||||||
|
WarService,
|
||||||
AppConfig,
|
AppConfig,
|
||||||
|
Title,
|
||||||
routingProviders,
|
routingProviders,
|
||||||
{provide: AUTH_ENABLED, useValue: true}
|
{provide: AUTH_ENABLED, useValue: true}
|
||||||
],
|
],
|
||||||
|
@ -59,7 +71,9 @@ import {BrowserAnimationsModule} from "@angular/platform-browser/animations";
|
||||||
DecorationItemComponent,
|
DecorationItemComponent,
|
||||||
RankItemComponent,
|
RankItemComponent,
|
||||||
FilterRankPipe,
|
FilterRankPipe,
|
||||||
SquadItemComponent],
|
SquadItemComponent,
|
||||||
|
ShowErrorComponent,
|
||||||
|
APPLICATION_VALIDATORS],
|
||||||
bootstrap: [AppComponent]
|
bootstrap: [AppComponent]
|
||||||
})
|
})
|
||||||
export class AppModule {
|
export class AppModule {
|
||||||
|
|
|
@ -2,6 +2,7 @@ import {RouterModule, Routes} from "@angular/router";
|
||||||
import {LoginComponent} from "./login/index";
|
import {LoginComponent} from "./login/index";
|
||||||
import {NotFoundComponent} from "./common/not-found/not-found.component";
|
import {NotFoundComponent} from "./common/not-found/not-found.component";
|
||||||
import {LoginGuardAdmin, LoginGuardHL, LoginGuardMT, LoginGuardSQL} from "./login/login.guard";
|
import {LoginGuardAdmin, LoginGuardHL, LoginGuardMT, LoginGuardSQL} from "./login/login.guard";
|
||||||
|
import {usersRoutes, usersRoutingComponents} from "./users/users.routing";
|
||||||
import {squadsRoutes, squadsRoutingComponents} from "./squads/squads.routing";
|
import {squadsRoutes, squadsRoutingComponents} from "./squads/squads.routing";
|
||||||
import {decorationsRoutes, decorationsRoutingComponents} from "./decorations/decoration.routing";
|
import {decorationsRoutes, decorationsRoutingComponents} from "./decorations/decoration.routing";
|
||||||
import {ranksRoutes, ranksRoutingComponents} from "./ranks/ranks.routing";
|
import {ranksRoutes, ranksRoutingComponents} from "./ranks/ranks.routing";
|
||||||
|
@ -13,14 +14,15 @@ import {RequestPromotionComponent} from "./request/promotion/req-promotion.compo
|
||||||
import {ConfirmPromotionComponent} from "./request/confirm-promotion/confirm-promotion.component";
|
import {ConfirmPromotionComponent} from "./request/confirm-promotion/confirm-promotion.component";
|
||||||
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 {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 = [
|
||||||
|
|
||||||
{path: RouteConfig.overviewPath, children: armyRoutes},
|
{path: RouteConfig.overviewPath, children: armyRoutes},
|
||||||
{path: '', redirectTo: RouteConfig.overviewPath, pathMatch: 'full'},
|
{path: '', redirectTo: RouteConfig.overviewPath, pathMatch: 'full'},
|
||||||
|
|
||||||
{path: RouteConfig.statsPath, loadChildren: './statistic/stats.module#StatsModule'},
|
{path: RouteConfig.statsPath, children: statsRoutes},
|
||||||
|
|
||||||
{path: RouteConfig.loginPath, component: LoginComponent},
|
{path: RouteConfig.loginPath, component: LoginComponent},
|
||||||
{path: RouteConfig.signUpPath, component: SignupComponent},
|
{path: RouteConfig.signUpPath, component: SignupComponent},
|
||||||
|
@ -30,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, loadChildren: './users/users.module#UsersModule', 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,6 +48,6 @@ 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,
|
ConfirmPromotionComponent, AdminComponent, ...armyRoutingComponents, NotFoundComponent,
|
||||||
...squadsRoutingComponents, ...decorationsRoutingComponents, ...ranksRoutingComponents];
|
...squadsRoutingComponents, ...decorationsRoutingComponents, ...ranksRoutingComponents, ...statsRoutingComponents];
|
||||||
|
|
||||||
export const routingProviders = [LoginGuardSQL, LoginGuardHL, LoginGuardMT, LoginGuardAdmin];
|
export const routingProviders = [LoginGuardSQL, LoginGuardHL, LoginGuardMT, LoginGuardAdmin];
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
import {NgModule} from '@angular/core';
|
|
||||||
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
|
|
||||||
import {ShowErrorComponent} from "./common/show-error/show-error.component";
|
|
||||||
import {CommonModule} from "@angular/common";
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
declarations: [ShowErrorComponent],
|
|
||||||
imports: [CommonModule, FormsModule, ReactiveFormsModule],
|
|
||||||
exports: [FormsModule, ReactiveFormsModule, ShowErrorComponent]
|
|
||||||
})
|
|
||||||
export class SharedModule {
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
import {NgModule} from '@angular/core';
|
|
||||||
import {CommonModule} from "@angular/common";
|
|
||||||
import {SharedModule} from "../shared.module";
|
|
||||||
import {statsRouterModule, statsRoutingComponents} from "./stats.routing";
|
|
||||||
import {WarService} from "../services/war-service/war.service";
|
|
||||||
import {DataTableModule} from "angular2-datatable";
|
|
||||||
import {NgxChartsModule} from "@swimlane/ngx-charts";
|
|
||||||
import {AccordionModule} from "ngx-bootstrap";
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
declarations: statsRoutingComponents,
|
|
||||||
imports: [CommonModule, SharedModule, statsRouterModule, NgxChartsModule, AccordionModule.forRoot(), DataTableModule],
|
|
||||||
providers: [WarService]
|
|
||||||
})
|
|
||||||
export class StatsModule {
|
|
||||||
static routes = statsRouterModule;
|
|
||||||
}
|
|
|
@ -1,11 +1,10 @@
|
||||||
import {RouterModule, Routes} from "@angular/router";
|
import {Routes} from "@angular/router";
|
||||||
import {StatisticComponent} from "./stats.component";
|
import {StatisticComponent} from "./stats.component";
|
||||||
import {WarDetailComponent} from "./war-detail/war-detail.component";
|
import {WarDetailComponent} from "./war-detail/war-detail.component";
|
||||||
import {WarSubmitComponent} from "./war-submit/war-submit.component";
|
import {WarSubmitComponent} from "./war-submit/war-submit.component";
|
||||||
import {WarListComponent} from "./war-list/war-list.component";
|
import {WarListComponent} from "./war-list/war-list.component";
|
||||||
import {StatisticOverviewComponent} from "./overview/stats-overview.component";
|
import {StatisticOverviewComponent} from "./overview/stats-overview.component";
|
||||||
import {WarItemComponent} from "./war-list/war-item.component";
|
import {WarItemComponent} from "./war-list/war-item.component";
|
||||||
import {ModuleWithProviders} from "@angular/core";
|
|
||||||
|
|
||||||
|
|
||||||
export const statsRoutes: Routes = [{
|
export const statsRoutes: Routes = [{
|
||||||
|
@ -33,8 +32,6 @@ export const statsRoutes: Routes = [{
|
||||||
outlet: 'right'
|
outlet: 'right'
|
||||||
}];
|
}];
|
||||||
|
|
||||||
export const statsRouterModule: ModuleWithProviders = RouterModule.forChild(statsRoutes);
|
|
||||||
|
|
||||||
export const statsRoutingComponents = [StatisticComponent, StatisticOverviewComponent, WarListComponent,
|
export const statsRoutingComponents = [StatisticComponent, StatisticOverviewComponent, WarListComponent,
|
||||||
WarSubmitComponent, WarDetailComponent, WarItemComponent];
|
WarSubmitComponent, WarDetailComponent, WarItemComponent];
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,28 @@
|
||||||
import {NgModule} from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import {routes, usersRoutingComponents} from './users.routing';
|
import {routes, usersRoutingComponents} from './users.routing';
|
||||||
import {UserStore} from "../services/stores/user.store";
|
import {UserStore} from "../services/stores/user.store";
|
||||||
import {UserService} from "../services/user-service/user.service";
|
import {UserService} from "../services/user-service/user.service";
|
||||||
import {CommonModule} from "@angular/common";
|
import {BrowserModule} from "@angular/platform-browser";
|
||||||
import {SharedModule} from "../shared.module";
|
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({
|
@NgModule({
|
||||||
declarations: usersRoutingComponents,
|
declarations: [ UsersComponent, UserListComponent, UserItemComponent, EditUserComponent, AwardUserComponent, ShowErrorComponent ],
|
||||||
imports: [CommonModule, SharedModule, routes],
|
imports: [ BrowserModule, FormsModule, ReactiveFormsModule, HttpModule, ClipboardModule, DataTableModule,
|
||||||
providers: [UserStore, UserService]
|
BrowserAnimationsModule, NgxChartsModule, AccordionModule.forRoot(), routes ],
|
||||||
|
providers: [ UserStore, UserService ]
|
||||||
})
|
})
|
||||||
export class UsersModule {
|
export default class UsersModule {
|
||||||
static routes = routes;
|
static routes = routes;
|
||||||
}
|
};
|
||||||
|
|
|
@ -4,7 +4,6 @@ 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";
|
import {ModuleWithProviders} from "@angular/core";
|
||||||
import {UserItemComponent} from "./user-list/user-item.component";
|
|
||||||
|
|
||||||
export const usersRoutes: Routes = [{
|
export const usersRoutes: Routes = [{
|
||||||
path: '', component: UsersComponent,
|
path: '', component: UsersComponent,
|
||||||
|
@ -34,4 +33,4 @@ export const usersRoutes: Routes = [{
|
||||||
|
|
||||||
export const routes: ModuleWithProviders = RouterModule.forChild(usersRoutes);
|
export const routes: ModuleWithProviders = RouterModule.forChild(usersRoutes);
|
||||||
|
|
||||||
export const usersRoutingComponents = [UserItemComponent, UsersComponent, UserListComponent, EditUserComponent, AwardUserComponent];
|
export const usersRoutingComponents = [UsersComponent, UserListComponent, EditUserComponent, AwardUserComponent];
|
||||||
|
|
Loading…
Reference in New Issue