blob: 088502f4fe41f8fe01f3abe39da18ed32492f99f [file] [log] [blame]
kumaran.m3b4814a2020-05-01 19:48:54 +05301/*
2 Copyright 2020 TATA ELXSI
3
4 Licensed under the Apache License, Version 2.0 (the 'License');
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15
16 Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.in), BARATH KUMAR R (barath.r@tataelxsi.co.in)
17*/
18/**
19 * @file WIM Account module.
20 */
21import { CommonModule } from '@angular/common';
22import { HttpClientModule } from '@angular/common/http';
23import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
24import { FormsModule } from '@angular/forms';
25import { ReactiveFormsModule } from '@angular/forms';
26import { RouterModule, Routes } from '@angular/router';
27import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
28import { NgSelectModule } from '@ng-select/ng-select';
29import { TranslateModule } from '@ngx-translate/core';
30import { DataService } from 'DataService';
31import { LoaderModule } from 'LoaderModule';
32import { NewWIMAccountComponent } from 'NewWIMAccount';
33import { Ng2SmartTableModule } from 'ng2-smart-table';
34import { PagePerRowModule } from 'PagePerRowModule';
35import { PageReloadModule } from 'PageReloadModule';
36import { WIMAccountDetailsComponent } from 'WIMAccountDetails';
37import { WIMAccountInfoComponent } from 'WIMAccountInfo';
38import { WIMAccountsComponent } from 'WIMAccountsComponent';
39
40/** To halndle project information */
41const projectInfo: {} = { title: '{project}', url: '/' };
42
43/** const values for dashboard Routes */
44const routes: Routes = [
45 {
46 path: '',
47 component: WIMAccountsComponent,
48 children: [
49 {
50 path: 'details',
51 data: {
52 breadcrumb: [{ title: 'PAGE.DASHBOARD.DASHBOARD', url: '/' }, { title: 'PAGE.DASHBOARD.PROJECTS', url: '/projects' },
53 projectInfo, { title: 'WIMACCOUNTS', url: null }]
54 },
55 component: WIMAccountDetailsComponent
56 }
57 ]
58 }
59];
60
61/**
62 * Creating @NgModule component for Modules
63 */
64@NgModule({
65 imports: [ReactiveFormsModule.withConfig({ warnOnNgModelWithFormControl: 'never' }), FormsModule, CommonModule,
66 HttpClientModule, NgSelectModule, Ng2SmartTableModule, TranslateModule, RouterModule.forChild(routes), NgbModule,
67 PagePerRowModule, LoaderModule, PageReloadModule],
68 declarations: [WIMAccountsComponent, WIMAccountInfoComponent, WIMAccountDetailsComponent, NewWIMAccountComponent],
69 providers: [DataService],
70 schemas: [CUSTOM_ELEMENTS_SCHEMA],
71 entryComponents: [WIMAccountInfoComponent, NewWIMAccountComponent]
72})
73/** Exporting a class @exports WIMAccountsModule */
74export class WIMAccountsModule {
75 /** Variables declared to avoid state-less class */
76 private wimModule: string;
77}