Hima лет назад: 5
Родитель
Сommit
347cf29606

+ 1 - 1
src/app/@theme/components/footer/footer.component.ts

@@ -4,7 +4,7 @@ import { Component } from '@angular/core';
   selector: 'ngx-footer',
   styleUrls: ['./footer.component.scss'],
   template: `
-    <span class="created-by">Created with ♥ by <b><a href="https://akveo.com" target="_blank">Akveo</a></b> 2017</span>
+    <span class="created-by">Created with ♥ by <b><a href="https://rabbittec.com" target="_blank">Rabbit Tech</a></b> 2017</span>
     <div class="socials">
       <a href="#" target="_blank" class="ion ion-social-github"></a>
       <a href="#" target="_blank" class="ion ion-social-facebook"></a>

+ 16 - 0
src/app/@theme/styles/styles.scss

@@ -154,6 +154,11 @@
       margin: 30px 20px;
     }
 
+    .spanReqired-w {
+      color: red;
+      padding: 0 5px;
+    }
+
   }
 
   @include nb-for-theme(corporate) {
@@ -275,6 +280,11 @@
       margin: 30px 20px;
     }
 
+    .spanReqired-w {
+      color: red;
+      padding: 0 5px;
+    }
+
   }
 
   @include nb-for-theme(cosmic) {
@@ -446,6 +456,12 @@
       border-radius: 10px !important;
       margin: 30px 20px;
     }
+
+    .spanReqired-w {
+      color: red;
+      padding: 0 5px;
+    }
+
   }
 
 };

+ 1 - 1
src/app/app-routing.module.ts

@@ -15,7 +15,7 @@ const routes: Routes = [
   {path: '', redirectTo: 'pages', pathMatch: 'full'},
   { path: 'auth', loadChildren: './auth/auth.module#NgxAuthModule'},
   { path: 'pages', loadChildren: 'app/pages/pages.module#PagesModule', canActivate: [AuthGuard]},
-  { path: '**', redirectTo: 'pages' },
+  // { path: '**', redirectTo: 'pages' },
 ];
 
 const config: ExtraOptions = {

+ 1 - 1
src/app/pages/customers/customer-routing.module.ts

@@ -10,7 +10,7 @@ import { CustomersAddEditThreeComponent } from './customers-add-edit-three/custo
 
 const routes: Routes = [
     {path: '',  component: CustomerComponent, children: [
-      //{path: '', redirectTo: 'listView', pathMatch: 'full'},
+      {path: '', redirectTo: 'listView', pathMatch: 'full'},
       {path: 'listView', component: CustomersListComponent},
       {path: 'register', component: CustomersAddEditComponent},
       {path: 'registerTwo', component: CustomersAddEditTwoComponent},

+ 5 - 4
src/app/pages/customers/customers-add-edit-two/customers-add-edit-two.component.ts

@@ -1,5 +1,5 @@
 import { Component, OnInit } from '@angular/core';
-import { Router } from '@angular/router';
+import { Router, ActivatedRoute } from '@angular/router';
 
 @Component({
   selector: 'ngx-customers-add-edit-two',
@@ -9,7 +9,8 @@ import { Router } from '@angular/router';
 export class CustomersAddEditTwoComponent implements OnInit {
 
   constructor(
-    private router: Router
+    private router: Router,
+    private route: ActivatedRoute,
   ) { }
 
   admins =[{
@@ -23,10 +24,10 @@ export class CustomersAddEditTwoComponent implements OnInit {
   }
 
   previous(){
-    this.router.navigate[('pages/register')];
+    this.router.navigate(['../register'], {relativeTo: this.route});
   }
   next(){
-    this.router.navigate[('pages/registerThree')];
+    this.router.navigate(['../registerThree'], {relativeTo: this.route});
   }
   plusAdmin(){
     this.admins.push({

+ 1 - 1
src/app/pages/customers/customers-add-edit/customers-add-edit.component.html

@@ -3,7 +3,7 @@
     <div class="row">
       <div class="col-12">
       <ul class="list-unstyled titilList">
-          <li class="headingText-w"> Register New User </li>
+          <li class="headingText-w"> Register New User /</li>
           <li class="headingText-w activeLi-w" style="margin-right:5px">Company general information</li>
         </ul>
       </div>

+ 3 - 3
src/app/pages/customers/customers-add-edit/customers-add-edit.component.ts

@@ -1,5 +1,5 @@
 import { Component, OnInit } from '@angular/core';
-import { Router } from '@angular/router';
+import { Router, ActivatedRoute } from '@angular/router';
 
 @Component({
   selector: 'ngx-customers-add-edit',
@@ -10,12 +10,12 @@ export class CustomersAddEditComponent implements OnInit {
 
   constructor(
     private router: Router,
-  ) { }
+    private route: ActivatedRoute,) { }
 
   ngOnInit() {
   }
  
   next(){
-    this.router.navigate[('pages/registerTwo')];
+    this.router.navigate(['../registerTwo'], {relativeTo: this.route});
   }
 }

+ 1 - 1
src/app/pages/customers/customers-list/customers-list.component.ts

@@ -183,7 +183,7 @@ export class CustomersListComponent implements OnInit {
   }
   }
   onAdding(){
-    this.router.navigate(['pages/register']);
+    this.router.navigate(['../register'], {relativeTo: this.route});
   }
 
   onEdit(editId: number) {

+ 1 - 187
src/app/pages/pages-menu.ts

@@ -4,7 +4,7 @@ export const MENU_ITEMS: NbMenuItem[] = [
   {
     title: 'System Admins',
     icon: 'fa fa-user-shield',
-    link: '/pages/system-admins/listView',
+    link: '/pages/system-admins',
     home: true,
   },
   {
@@ -12,190 +12,4 @@ export const MENU_ITEMS: NbMenuItem[] = [
     icon: 'fa fa-users',
     link: '/pages/customers'
   },
-  
-  // {
-  //   title: 'Forms',
-  //   icon: 'nb-compose',
-  //   children: [
-  //     {
-  //       title: 'Form Inputs',
-  //       link: '/pages/forms/inputs',
-  //     },
-  //     {
-  //       title: 'Form Layouts',
-  //       link: '/pages/forms/layouts',
-  //     },
-  //     {
-  //       title: 'Buttons',
-  //       link: '/pages/forms/buttons',
-  //     },
-  //     {
-  //       title: 'Datepicker',
-  //       link: '/pages/forms/datepicker',
-  //     },
-  //   ],
-  // },
-  // {
-  //   title: 'UI Features',
-  //   icon: 'nb-keypad',
-  //   link: '/pages/ui-features',
-  //   children: [
-  //     {
-  //       title: 'Grid',
-  //       link: '/pages/ui-features/grid',
-  //     },
-  //     {
-  //       title: 'Icons',
-  //       link: '/pages/ui-features/icons',
-  //     },
-  //     {
-  //       title: 'Typography',
-  //       link: '/pages/ui-features/typography',
-  //     },
-  //     {
-  //       title: 'Animated Searches',
-  //       link: '/pages/ui-features/search-fields',
-  //     },
-  //   ],
-  // },
-  // {
-  //   title: 'Modal & Overlays',
-  //   icon: 'nb-layout-default',
-  //   children: [
-  //     {
-  //       title: 'Dialog',
-  //       link: '/pages/modal-overlays/dialog',
-  //     },
-  //     {
-  //       title: 'Window',
-  //       link: '/pages/modal-overlays/window',
-  //     },
-  //     {
-  //       title: 'Popover',
-  //       link: '/pages/modal-overlays/popover',
-  //     },
-  //     {
-  //       title: 'Toastr',
-  //       link: '/pages/modal-overlays/toastr',
-  //     },
-  //     {
-  //       title: 'Tooltip',
-  //       link: '/pages/modal-overlays/tooltip',
-  //     },
-  //   ],
-  // },
-  // {
-  //   title: 'Bootstrap',
-  //   icon: 'nb-gear',
-  //   children: [
-  //     {
-  //       title: 'Form Inputs',
-  //       link: '/pages/bootstrap/inputs',
-  //     },
-  //     {
-  //       title: 'Buttons',
-  //       link: '/pages/bootstrap/buttons',
-  //     },
-  //     {
-  //       title: 'Modal',
-  //       link: '/pages/bootstrap/modal',
-  //     },
-  //   ],
-  // },
-  // {
-  //   title: 'Maps',
-  //   icon: 'nb-location',
-  //   children: [
-  //     {
-  //       title: 'Google Maps',
-  //       link: '/pages/maps/gmaps',
-  //     },
-  //     {
-  //       title: 'Leaflet Maps',
-  //       link: '/pages/maps/leaflet',
-  //     },
-  //     {
-  //       title: 'Bubble Maps',
-  //       link: '/pages/maps/bubble',
-  //     },
-  //     {
-  //       title: 'Search Maps',
-  //       link: '/pages/maps/searchmap',
-  //     },
-  //   ],
-  // },
-  // {
-  //   title: 'Charts',
-  //   icon: 'nb-bar-chart',
-  //   children: [
-  //     {
-  //       title: 'Echarts',
-  //       link: '/pages/charts/echarts',
-  //     },
-  //     {
-  //       title: 'Charts.js',
-  //       link: '/pages/charts/chartjs',
-  //     },
-  //     {
-  //       title: 'D3',
-  //       link: '/pages/charts/d3',
-  //     },
-  //   ],
-  // },
-  // {
-  //   title: 'Editors',
-  //   icon: 'nb-title',
-  //   children: [
-  //     {
-  //       title: 'TinyMCE',
-  //       link: '/pages/editors/tinymce',
-  //     },
-  //     {
-  //       title: 'CKEditor',
-  //       link: '/pages/editors/ckeditor',
-  //     },
-  //   ],
-  // },
-  // {
-  //   title: 'Tables',
-  //   icon: 'nb-tables',
-  //   children: [
-  //     {
-  //       title: 'Smart Table',
-  //       link: '/pages/tables/smart-table',
-  //     },
-  //   ],
-  // },
-  // {
-  //   title: 'Miscellaneous',
-  //   icon: 'nb-shuffle',
-  //   children: [
-  //     {
-  //       title: '404',
-  //       link: '/pages/miscellaneous/404',
-  //     },
-  //   ],
-  // },
-  // {
-  //   title: 'Auth',
-  //   icon: 'nb-locked',
-  //   children: [
-  //     {
-  //       title: 'Login',
-  //       link: '/auth/login',
-  //     },
-  //     {
-  //       title: 'Register',
-  //       link: '/auth/register',
-  //     },
-  //     {
-  //       title: 'Request Password',
-  //       link: '/auth/request-password',
-  //     },
-  //     {
-  //       title: 'Reset Password',
-  //       link: '/auth/reset-password',
-  //     },
-  //   ],
-  // },
 ];

+ 1 - 1
src/app/pages/pages-routing.module.ts

@@ -8,7 +8,7 @@ import { NotFoundComponent } from './miscellaneous/not-found/not-found.component
 
 const routes: Routes = [
   { path: '', component: PagesComponent, children: [
-  { path: '', redirectTo: 'system-admins' }, 
+  { path: '', redirectTo: 'system-admins', pathMatch: 'full' }, 
   { path: 'customers', loadChildren: './customers/customer.module#CustomersModule'},
   { path: 'system-admins', loadChildren: './system-admins/system-admins.module#SystemAdminsModule'},
   { path: '**', component: NotFoundComponent},

+ 2 - 2
src/app/pages/system-admins/system-admins-list/system-admins-list.component.ts

@@ -140,11 +140,11 @@ export class SystemAdminsListComponent implements OnInit {
   
  
   onAdding(){
-    this.router.navigate(['pages/system-admins/add']);
+    this.router.navigate(['../add'], {relativeTo: this.route});
   }
 
   onEdit(editId: number) {
-  this.router.navigate(['edit/' + editId]);
+  this.router.navigate(['../edit/' + editId], {relativeTo: this.route});
   console.log(editId);
   
 }

+ 1 - 1
src/app/pages/system-admins/system-admins-routing.module.ts

@@ -6,10 +6,10 @@ import { SystemAdminsAddComponent } from './system-admins-add/system-admins-add.
 
 const routes: Routes = [
     {path: '',  component: SystemAdminsComponent, children: [
+        {path: '', redirectTo: 'listView', pathMatch: 'full'},
         {path: 'listView', component: SystemAdminsListComponent},
         {path: 'add', component: SystemAdminsAddComponent},
         {path: 'edit/:adminId', component: SystemAdminsAddComponent},
-        //{path: '', redirectTo: 'listView'},
         {path: '**', redirectTo: 'listView', pathMatch: 'full'},
       ]},
 ];

+ 1 - 0
src/app/pages/system-admins/system-admins.component.html

@@ -1 +1,2 @@
+
 <router-outlet></router-outlet>

+ 1 - 1
src/index.html

@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta charset="utf-8">
-  <title>ngx-admin Demo Application</title>
+  <title>HSEQ</title>
 
   <meta name="viewport" content="width=device-width, initial-scale=1">
   <link rel="icon" type="image/png" href="favicon.png">