Explorar o código

formularios iniciales de catalogos

Alejandro Granados %!s(int64=6) %!d(string=hai) anos
pai
achega
0bf9a39c21
Modificáronse 20 ficheiros con 577 adicións e 59 borrados
  1. 26 37
      package-lock.json
  2. 3 1
      src/app/app.module.ts
  3. 100 1
      src/app/components/catalogs/companies/new-company/new-company.component.html
  4. 26 1
      src/app/components/catalogs/companies/new-company/new-company.component.ts
  5. 21 1
      src/app/components/catalogs/countries/countries.component.html
  6. 1 1
      src/app/components/catalogs/countries/countries.component.ts
  7. 100 0
      src/app/components/catalogs/countries/new-country/new-country.component.html
  8. 6 6
      src/app/components/catalogs/countries/new-country/new-country.component.spec.ts
  9. 36 0
      src/app/components/catalogs/countries/new-country/new-country.component.ts
  10. 21 0
      src/app/components/catalogs/emitters/emitters.component.html
  11. 6 6
      src/app/components/catalogs/emitters/emitters.component.spec.ts
  12. 12 0
      src/app/components/catalogs/emitters/emitters.component.ts
  13. 100 0
      src/app/components/catalogs/emitters/new-emitter/new-emitter.component.html
  14. 0 0
      src/app/components/catalogs/emitters/new-emitter/new-emitter.component.scss
  15. 25 0
      src/app/components/catalogs/emitters/new-emitter/new-emitter.component.spec.ts
  16. 40 0
      src/app/components/catalogs/emitters/new-emitter/new-emitter.component.ts
  17. 0 1
      src/app/components/investment-proposals/new-investment-proposal/new-investment-proposal.component.html
  18. 2 2
      src/app/components/shared/sidebar/sidebar.component.html
  19. 7 1
      src/app/layouts/admin/admin.module.ts
  20. 45 1
      src/app/layouts/admin/admin.routing.ts

+ 26 - 37
package-lock.json

@@ -6941,7 +6941,8 @@
             "code-point-at": {
               "version": "1.1.0",
               "bundled": true,
-              "dev": true
+              "dev": true,
+              "optional": true
             },
             "concat-map": {
               "version": "0.0.1",
@@ -6952,7 +6953,8 @@
             "console-control-strings": {
               "version": "1.1.0",
               "bundled": true,
-              "dev": true
+              "dev": true,
+              "optional": true
             },
             "core-util-is": {
               "version": "1.0.2",
@@ -7069,7 +7071,8 @@
             "inherits": {
               "version": "2.0.4",
               "bundled": true,
-              "dev": true
+              "dev": true,
+              "optional": true
             },
             "ini": {
               "version": "1.3.5",
@@ -7081,6 +7084,7 @@
               "version": "1.0.0",
               "bundled": true,
               "dev": true,
+              "optional": true,
               "requires": {
                 "number-is-nan": "^1.0.0"
               }
@@ -7110,6 +7114,7 @@
               "version": "2.9.0",
               "bundled": true,
               "dev": true,
+              "optional": true,
               "requires": {
                 "safe-buffer": "^5.1.2",
                 "yallist": "^3.0.0"
@@ -7128,6 +7133,7 @@
               "version": "0.5.1",
               "bundled": true,
               "dev": true,
+              "optional": true,
               "requires": {
                 "minimist": "0.0.8"
               }
@@ -7217,7 +7223,8 @@
             "number-is-nan": {
               "version": "1.0.1",
               "bundled": true,
-              "dev": true
+              "dev": true,
+              "optional": true
             },
             "object-assign": {
               "version": "4.1.1",
@@ -7229,6 +7236,7 @@
               "version": "1.4.0",
               "bundled": true,
               "dev": true,
+              "optional": true,
               "requires": {
                 "wrappy": "1"
               }
@@ -7350,6 +7358,7 @@
               "version": "1.0.2",
               "bundled": true,
               "dev": true,
+              "optional": true,
               "requires": {
                 "code-point-at": "^1.0.0",
                 "is-fullwidth-code-point": "^1.0.0",
@@ -8348,8 +8357,7 @@
             },
             "console-control-strings": {
               "version": "1.1.0",
-              "bundled": true,
-              "optional": true
+              "bundled": true
             },
             "core-util-is": {
               "version": "1.0.2",
@@ -8452,8 +8460,7 @@
             },
             "inherits": {
               "version": "2.0.4",
-              "bundled": true,
-              "optional": true
+              "bundled": true
             },
             "ini": {
               "version": "1.3.5",
@@ -8488,7 +8495,6 @@
             "minipass": {
               "version": "2.9.0",
               "bundled": true,
-              "optional": true,
               "requires": {
                 "safe-buffer": "^5.1.2",
                 "yallist": "^3.0.0"
@@ -8596,7 +8602,6 @@
             "once": {
               "version": "1.4.0",
               "bundled": true,
-              "optional": true,
               "requires": {
                 "wrappy": "1"
               }
@@ -8672,8 +8677,7 @@
             },
             "safe-buffer": {
               "version": "5.1.2",
-              "bundled": true,
-              "optional": true
+              "bundled": true
             },
             "safer-buffer": {
               "version": "2.1.2",
@@ -8703,7 +8707,6 @@
             "string-width": {
               "version": "1.0.2",
               "bundled": true,
-              "optional": true,
               "requires": {
                 "code-point-at": "^1.0.0",
                 "is-fullwidth-code-point": "^1.0.0",
@@ -8760,13 +8763,11 @@
             },
             "wrappy": {
               "version": "1.0.2",
-              "bundled": true,
-              "optional": true
+              "bundled": true
             },
             "yallist": {
               "version": "3.1.1",
-              "bundled": true,
-              "optional": true
+              "bundled": true
             }
           }
         },
@@ -12633,8 +12634,7 @@
             "ansi-regex": {
               "version": "2.1.1",
               "bundled": true,
-              "dev": true,
-              "optional": true
+              "dev": true
             },
             "aproba": {
               "version": "1.2.0",
@@ -12677,8 +12677,7 @@
             "code-point-at": {
               "version": "1.1.0",
               "bundled": true,
-              "dev": true,
-              "optional": true
+              "dev": true
             },
             "concat-map": {
               "version": "0.0.1",
@@ -12689,8 +12688,7 @@
             "console-control-strings": {
               "version": "1.1.0",
               "bundled": true,
-              "dev": true,
-              "optional": true
+              "dev": true
             },
             "core-util-is": {
               "version": "1.0.2",
@@ -12807,8 +12805,7 @@
             "inherits": {
               "version": "2.0.4",
               "bundled": true,
-              "dev": true,
-              "optional": true
+              "dev": true
             },
             "ini": {
               "version": "1.3.5",
@@ -12820,7 +12817,6 @@
               "version": "1.0.0",
               "bundled": true,
               "dev": true,
-              "optional": true,
               "requires": {
                 "number-is-nan": "^1.0.0"
               }
@@ -12850,7 +12846,6 @@
               "version": "2.9.0",
               "bundled": true,
               "dev": true,
-              "optional": true,
               "requires": {
                 "safe-buffer": "^5.1.2",
                 "yallist": "^3.0.0"
@@ -12869,7 +12864,6 @@
               "version": "0.5.1",
               "bundled": true,
               "dev": true,
-              "optional": true,
               "requires": {
                 "minimist": "0.0.8"
               }
@@ -12972,7 +12966,6 @@
               "version": "1.4.0",
               "bundled": true,
               "dev": true,
-              "optional": true,
               "requires": {
                 "wrappy": "1"
               }
@@ -13058,8 +13051,7 @@
             "safe-buffer": {
               "version": "5.1.2",
               "bundled": true,
-              "dev": true,
-              "optional": true
+              "dev": true
             },
             "safer-buffer": {
               "version": "2.1.2",
@@ -13095,7 +13087,6 @@
               "version": "1.0.2",
               "bundled": true,
               "dev": true,
-              "optional": true,
               "requires": {
                 "code-point-at": "^1.0.0",
                 "is-fullwidth-code-point": "^1.0.0",
@@ -13115,7 +13106,6 @@
               "version": "3.0.1",
               "bundled": true,
               "dev": true,
-              "optional": true,
               "requires": {
                 "ansi-regex": "^2.0.0"
               }
@@ -13159,14 +13149,12 @@
             "wrappy": {
               "version": "1.0.2",
               "bundled": true,
-              "dev": true,
-              "optional": true
+              "dev": true
             },
             "yallist": {
               "version": "3.1.1",
               "bundled": true,
-              "dev": true,
-              "optional": true
+              "dev": true
             }
           }
         },
@@ -13663,6 +13651,7 @@
               "version": "3.0.4",
               "bundled": true,
               "dev": true,
+              "optional": true,
               "requires": {
                 "brace-expansion": "^1.1.7"
               }

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

@@ -30,12 +30,14 @@ import { TokenInterceptor } from "@app/services/token.interceptor";
 import { ConfirmAccountComponent } from "./components/confirm-account/confirm-account.component";
 import { MatPasswordStrengthModule } from "@angular-material-extensions/password-strength";
 
+
 @NgModule({
   declarations: [
     AppComponent,
     AdminComponent,
     LoginComponent,
-    ConfirmAccountComponent
+    ConfirmAccountComponent,
+ 
   ],
   imports: [
     BrowserModule,

+ 100 - 1
src/app/components/catalogs/companies/new-company/new-company.component.html

@@ -1 +1,100 @@
-<p>new-company works!</p>
+<h2 class="floating-title">{{ title }}</h2>
+
+<div class="main-content">
+  <div class="container-fluid">
+    <div class="row">
+      <div class="col-12 align-right">
+        <div class="align-container">
+          <nav aria-label="breadcrumb">
+            <ol class="breadcrumb">
+              <li class="breadcrumb-item">
+                <a [routerLink]="['/']">Dashboard</a>
+              </li>
+              <li class="breadcrumb-item">
+                <a [routerLink]="['/companies']">
+                  Empresas
+                </a>
+              </li>
+              <li class="breadcrumb-item">Nuevo</li>
+            </ol>
+          </nav>
+        </div>
+      </div>
+      <br />
+    </div>
+    <br />
+    <div class="row justify-content-center">
+      <div class="col-12">
+        <div class="align-container">
+          <div class="card">
+            <div class="card-header card-header-icon card-header-rose">
+              <div class="card-icon"><i class="material-icons">map</i></div>
+              <h4 class="card-title">
+                Nueva Empresa
+                <small class="category">- Complete la información</small>
+              </h4>
+            </div>
+            <div class="card-body">
+              <div class="align-container">
+                <form
+                  class="form-auth-small ng-untouched ng-pristine ng-valid"
+                  [formGroup]="companyForm"
+                  (ngSubmit)="createCompany()"
+                >
+                  <div class="row">
+                    <div class=" col-sm-12">
+                      <div class="form-group">
+                        <label for="name">Nombre: </label>
+                        <input
+                          type="text"
+                          formControlName="name"
+                          class="form-control"
+                          [ngClass]="{
+                            'is-invalid': submitted && f.name.errors
+                          }"
+                        />
+                        <div
+                          *ngIf="submitted && f.name.errors"
+                          class="invalid-feedback"
+                        >
+                          <div *ngIf="f.name.errors.required">
+                            Campo requerido
+                          </div>
+                        </div>
+                      </div>
+
+                      <div class="form-group">
+                        <label for="description">Descripcion: </label>
+                        <input
+                          type="text"
+                          formControlName="description"
+                          class="form-control"
+                          [ngClass]="{
+                            'is-invalid': submitted && f.description.errors
+                          }"
+                        />
+                        <div
+                          *ngIf="submitted && f.description.errors"
+                          class="invalid-feedback"
+                        >
+                          <div *ngIf="f.description.errors.required">
+                            Campo requerido
+                          </div>
+                        </div>
+                      </div>
+                    </div>
+                  </div>
+                  <br />
+                  <button class="btn btn-primary">
+                    Guardar
+                  </button>
+                  <!--<div *ngIf="error" class="alert alert-danger mt-3 mb-0">{{error}}</div>-->
+                </form>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+</div>

+ 26 - 1
src/app/components/catalogs/companies/new-company/new-company.component.ts

@@ -1,4 +1,5 @@
 import { Component, OnInit } from '@angular/core';
+import { FormBuilder, FormGroup, Validators } from "@angular/forms";
 
 @Component({
   selector: 'app-new-company',
@@ -7,9 +8,33 @@ import { Component, OnInit } from '@angular/core';
 })
 export class NewCompanyComponent implements OnInit {
 
-  constructor() { }
+
+  title: string = "Nueva empresa";
+  companyForm: FormGroup;
+  submitted: boolean = false;
+  role_number: any;
+
+  constructor(private formBuilder: FormBuilder) {}
+
 
   ngOnInit() {
+    this.companyForm = this.formBuilder.group({
+      name: ["", Validators.required],
+      description: ["", Validators.required],
+    });
   }
 
+  get f() {
+    return this.companyForm.controls;
+  }
+
+  createCompany(){
+    this.submitted = true;
+
+    // stop here if form is invalid
+    if (this.companyForm.invalid) {
+      return;
+    }
+    console.log("compania");
+  }
 }

+ 21 - 1
src/app/components/catalogs/countries/countries.component.html

@@ -1 +1,21 @@
-<p>countries works!</p>
+<h2 class="floating-title">{{ title }}</h2>
+
+<div class="main-content">
+  <div class="container-fluid">
+    <div class="col-12 align-right">
+      <div class="align-container">
+        <nav aria-label="breadcrumb">
+          <ol class="breadcrumb">
+            <li class="breadcrumb-item">
+              <a [routerLink]="['/']">Dashboard</a>
+            </li>
+            <li class="breadcrumb-item">Paises</li>
+          </ol>
+        </nav>
+        <a class="btn btn-primary" [routerLink]="['/countries/new']">
+          Nuevo registro
+        </a>
+      </div>
+    </div>
+  </div>
+</div>

+ 1 - 1
src/app/components/catalogs/countries/countries.component.ts

@@ -6,7 +6,7 @@ import { Component, OnInit } from '@angular/core';
   styleUrls: ['./countries.component.scss']
 })
 export class CountriesComponent implements OnInit {
-
+  title: string = "Paises";
   constructor() { }
 
   ngOnInit() {

+ 100 - 0
src/app/components/catalogs/countries/new-country/new-country.component.html

@@ -0,0 +1,100 @@
+<h2 class="floating-title">{{ title }}</h2>
+
+<div class="main-content">
+  <div class="container-fluid">
+    <div class="row">
+      <div class="col-12 align-right">
+        <div class="align-container">
+          <nav aria-label="breadcrumb">
+            <ol class="breadcrumb">
+              <li class="breadcrumb-item">
+                <a [routerLink]="['/']">Dashboard</a>
+              </li>
+              <li class="breadcrumb-item">
+                <a [routerLink]="['/countries']">
+                  Paises
+                </a>
+              </li>
+              <li class="breadcrumb-item">Nuevo</li>
+            </ol>
+          </nav>
+        </div>
+      </div>
+      <br />
+    </div>
+    <br />
+    <div class="row justify-content-center">
+      <div class="col-12">
+        <div class="align-container">
+          <div class="card">
+            <div class="card-header card-header-icon card-header-rose">
+              <div class="card-icon"><i class="material-icons">map</i></div>
+              <h4 class="card-title">
+                Nuevo País
+                <small class="category">- Complete la información</small>
+              </h4>
+            </div>
+            <div class="card-body">
+              <div class="align-container">
+                <form
+                  class="form-auth-small ng-untouched ng-pristine ng-valid"
+                  [formGroup]="countryForm"
+                  (ngSubmit)="createCountry()"
+                >
+                  <div class="row">
+                    <div class=" col-sm-12">
+                      <div class="form-group">
+                        <label for="name">Nombre: </label>
+                        <input
+                          type="text"
+                          formControlName="name"
+                          class="form-control"
+                          [ngClass]="{
+                            'is-invalid': submitted && f.name.errors
+                          }"
+                        />
+                        <div
+                          *ngIf="submitted && f.name.errors"
+                          class="invalid-feedback"
+                        >
+                          <div *ngIf="f.name.errors.required">
+                            Campo requerido
+                          </div>
+                        </div>
+                      </div>
+
+                      <div class="form-group">
+                        <label for="description">Descripcion: </label>
+                        <input
+                          type="text"
+                          formControlName="description"
+                          class="form-control"
+                          [ngClass]="{
+                            'is-invalid': submitted && f.description.errors
+                          }"
+                        />
+                        <div
+                          *ngIf="submitted && f.description.errors"
+                          class="invalid-feedback"
+                        >
+                          <div *ngIf="f.description.errors.required">
+                            Campo requerido
+                          </div>
+                        </div>
+                      </div>
+                    </div>
+                  </div>
+                  <br />
+                  <button class="btn btn-primary">
+                    Guardar
+                  </button>
+                  <!--<div *ngIf="error" class="alert alert-danger mt-3 mb-0">{{error}}</div>-->
+                </form>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+</div>

+ 6 - 6
src/app/components/catalogs/companies/new-company/new-company.component.spec.ts → src/app/components/catalogs/countries/new-country/new-country.component.spec.ts

@@ -1,20 +1,20 @@
 import { async, ComponentFixture, TestBed } from '@angular/core/testing';
 
-import { NewCompanyComponent } from './new-company.component';
+import { NewCountryComponent } from './new-country.component';
 
-describe('NewCompanyComponent', () => {
-  let component: NewCompanyComponent;
-  let fixture: ComponentFixture<NewCompanyComponent>;
+describe('NewCountryComponent', () => {
+  let component: NewCountryComponent;
+  let fixture: ComponentFixture<NewCountryComponent>;
 
   beforeEach(async(() => {
     TestBed.configureTestingModule({
-      declarations: [ NewCompanyComponent ]
+      declarations: [ NewCountryComponent ]
     })
     .compileComponents();
   }));
 
   beforeEach(() => {
-    fixture = TestBed.createComponent(NewCompanyComponent);
+    fixture = TestBed.createComponent(NewCountryComponent);
     component = fixture.componentInstance;
     fixture.detectChanges();
   });

+ 36 - 0
src/app/components/catalogs/countries/new-country/new-country.component.ts

@@ -0,0 +1,36 @@
+import { Component, OnInit } from "@angular/core";
+import { FormBuilder, FormGroup, Validators } from "@angular/forms";
+
+@Component({
+  selector: "app-new-country",
+  templateUrl: "./new-country.component.html"
+})
+export class NewCountryComponent implements OnInit {
+  title: string = "Nuevo país";
+  countryForm: FormGroup;
+  submitted: boolean = false;
+  role_number: any;
+
+  constructor(private formBuilder: FormBuilder) {}
+
+  ngOnInit() {
+    this.countryForm = this.formBuilder.group({
+      name: ["", Validators.required],
+      description: ["", Validators.required]
+    });
+  }
+
+  get f() {
+    return this.countryForm.controls;
+  }
+
+  createCountry() {
+    this.submitted = true;
+
+    // stop here if form is invalid
+    if (this.countryForm.invalid) {
+      return;
+    }
+    console.log("país");
+  }
+}

+ 21 - 0
src/app/components/catalogs/emitters/emitters.component.html

@@ -0,0 +1,21 @@
+<h2 class="floating-title">{{ title }}</h2>
+
+<div class="main-content">
+  <div class="container-fluid">
+    <div class="col-12 align-right">
+      <div class="align-container">
+        <nav aria-label="breadcrumb">
+          <ol class="breadcrumb">
+            <li class="breadcrumb-item">
+              <a [routerLink]="['/']">Dashboard</a>
+            </li>
+            <li class="breadcrumb-item">Emisores</li>
+          </ol>
+        </nav>
+        <a class="btn btn-primary" [routerLink]="['/emitters/new']">
+          Nuevo registro
+        </a>
+      </div>
+    </div>
+  </div>
+</div>

+ 6 - 6
src/app/components/catalogs/companies/companies.component.spec.ts → src/app/components/catalogs/emitters/emitters.component.spec.ts

@@ -1,20 +1,20 @@
 import { async, ComponentFixture, TestBed } from '@angular/core/testing';
 
-import { CompaniesComponent } from './companies.component';
+import { EmittersComponent } from './emitters.component';
 
-describe('CompaniesComponent', () => {
-  let component: CompaniesComponent;
-  let fixture: ComponentFixture<CompaniesComponent>;
+describe('EmittersComponent', () => {
+  let component: EmittersComponent;
+  let fixture: ComponentFixture<EmittersComponent>;
 
   beforeEach(async(() => {
     TestBed.configureTestingModule({
-      declarations: [ CompaniesComponent ]
+      declarations: [ EmittersComponent ]
     })
     .compileComponents();
   }));
 
   beforeEach(() => {
-    fixture = TestBed.createComponent(CompaniesComponent);
+    fixture = TestBed.createComponent(EmittersComponent);
     component = fixture.componentInstance;
     fixture.detectChanges();
   });

+ 12 - 0
src/app/components/catalogs/emitters/emitters.component.ts

@@ -0,0 +1,12 @@
+import { Component, OnInit } from "@angular/core";
+
+@Component({
+  selector: "app-emitters",
+  templateUrl: "./emitters.component.html"
+})
+export class EmittersComponent implements OnInit {
+  title: string = "Emisores";
+  constructor() {}
+
+  ngOnInit() {}
+}

+ 100 - 0
src/app/components/catalogs/emitters/new-emitter/new-emitter.component.html

@@ -0,0 +1,100 @@
+<h2 class="floating-title">{{ title }}</h2>
+
+<div class="main-content">
+  <div class="container-fluid">
+    <div class="row">
+      <div class="col-12 align-right">
+        <div class="align-container">
+          <nav aria-label="breadcrumb">
+            <ol class="breadcrumb">
+              <li class="breadcrumb-item">
+                <a [routerLink]="['/']">Dashboard</a>
+              </li>
+              <li class="breadcrumb-item">
+                <a [routerLink]="['/emitters']">
+                  Emisores
+                </a>
+              </li>
+              <li class="breadcrumb-item">Nuevo</li>
+            </ol>
+          </nav>
+        </div>
+      </div>
+      <br />
+    </div>
+    <br />
+    <div class="row justify-content-center">
+      <div class="col-12">
+        <div class="align-container">
+          <div class="card">
+            <div class="card-header card-header-icon card-header-rose">
+              <div class="card-icon"><i class="material-icons">map</i></div>
+              <h4 class="card-title">
+                Nuevo Emisor
+                <small class="category">- Complete la información</small>
+              </h4>
+            </div>
+            <div class="card-body">
+              <div class="align-container">
+                <form
+                  class="form-auth-small ng-untouched ng-pristine ng-valid"
+                  [formGroup]="emitterForm"
+                  (ngSubmit)="createEmitter()"
+                >
+                  <div class="row">
+                    <div class=" col-sm-12">
+                      <div class="form-group">
+                        <label for="name">Nombre: </label>
+                        <input
+                          type="text"
+                          formControlName="name"
+                          class="form-control"
+                          [ngClass]="{
+                            'is-invalid': submitted && f.name.errors
+                          }"
+                        />
+                        <div
+                          *ngIf="submitted && f.name.errors"
+                          class="invalid-feedback"
+                        >
+                          <div *ngIf="f.name.errors.required">
+                            Campo requerido
+                          </div>
+                        </div>
+                      </div>
+
+                      <div class="form-group">
+                        <label for="description">Descripcion: </label>
+                        <input
+                          type="text"
+                          formControlName="description"
+                          class="form-control"
+                          [ngClass]="{
+                            'is-invalid': submitted && f.description.errors
+                          }"
+                        />
+                        <div
+                          *ngIf="submitted && f.description.errors"
+                          class="invalid-feedback"
+                        >
+                          <div *ngIf="f.description.errors.required">
+                            Campo requerido
+                          </div>
+                        </div>
+                      </div>
+                    </div>
+                  </div>
+                  <br />
+                  <button class="btn btn-primary">
+                    Guardar
+                  </button>
+                  <!--<div *ngIf="error" class="alert alert-danger mt-3 mb-0">{{error}}</div>-->
+                </form>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+</div>

+ 0 - 0
src/app/components/catalogs/emitters/new-emitter/new-emitter.component.scss


+ 25 - 0
src/app/components/catalogs/emitters/new-emitter/new-emitter.component.spec.ts

@@ -0,0 +1,25 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { NewEmitterComponent } from './new-emitter.component';
+
+describe('NewEmitterComponent', () => {
+  let component: NewEmitterComponent;
+  let fixture: ComponentFixture<NewEmitterComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ NewEmitterComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(NewEmitterComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 40 - 0
src/app/components/catalogs/emitters/new-emitter/new-emitter.component.ts

@@ -0,0 +1,40 @@
+import { Component, OnInit } from '@angular/core';
+import { FormBuilder, FormGroup, Validators } from "@angular/forms";
+
+@Component({
+  selector: 'app-new-emitter',
+  templateUrl: './new-emitter.component.html',
+  styleUrls: ['./new-emitter.component.scss']
+})
+export class NewEmitterComponent implements OnInit {
+
+  title: string = "Nuevo emisor";
+  emitterForm: FormGroup;
+  submitted: boolean = false;
+  role_number: any;
+
+  constructor(private formBuilder: FormBuilder) {}
+
+
+  ngOnInit() {
+    this.emitterForm = this.formBuilder.group({
+      name: ["", Validators.required],
+      description: ["", Validators.required],
+    });
+  }
+
+  get f() {
+    return this.emitterForm.controls;
+  }
+
+  createEmitter(){
+    this.submitted = true;
+
+    // stop here if form is invalid
+    if (this.emitterForm.invalid) {
+      return;
+    }
+    console.log("emisor");
+  }
+
+}

+ 0 - 1
src/app/components/investment-proposals/new-investment-proposal/new-investment-proposal.component.html

@@ -20,7 +20,6 @@
           </nav>
         </div>
       </div>
-
       <br />
     </div>
     <br />

+ 2 - 2
src/app/components/shared/sidebar/sidebar.component.html

@@ -47,13 +47,13 @@
             </a>
           </li>
           <li class="nav-item" routerlinkactive="active">
-            <a class="nav-link" href="#">
+            <a class="nav-link" href="#/countries">
               <span class="sidebar-mini">PAI</span>
               <span class="sidebar-normal">Países</span>
             </a>
           </li>
           <li class="nav-item" routerlinkactive="active">
-            <a class="nav-link" href="#">
+            <a class="nav-link" href="#/emitters">
               <span class="sidebar-mini">EMI</span>
               <span class="sidebar-normal">Emisores</span>
             </a>

+ 7 - 1
src/app/layouts/admin/admin.module.ts

@@ -40,6 +40,9 @@ import { NewUserComponent } from "@app/components/users/new-user/new-user.compon
 import { CountriesComponent } from "@app/components/catalogs/countries/countries.component";
 import { CompaniesComponent } from "@app/components/catalogs/companies/companies.component";
 import { NewCompanyComponent } from "@app/components/catalogs/companies/new-company/new-company.component";
+import { EmittersComponent } from "../../components/catalogs/emitters/emitters.component";
+import { NewEmitterComponent } from "../../components/catalogs/emitters/new-emitter/new-emitter.component";
+import { NewCountryComponent } from "../../components/catalogs/countries/new-country/new-country.component";
 
 @NgModule({
   imports: [
@@ -76,7 +79,10 @@ import { NewCompanyComponent } from "@app/components/catalogs/companies/new-comp
     NewUserComponent,
     CountriesComponent,
     CompaniesComponent,
-    NewCompanyComponent
+    NewCompanyComponent,
+    EmittersComponent,
+    NewEmitterComponent,
+    NewCountryComponent
   ]
 })
 export class AdminModule {}

+ 45 - 1
src/app/layouts/admin/admin.routing.ts

@@ -17,6 +17,10 @@ import { NewUserComponent } from "@app/components/users/new-user/new-user.compon
 import { CountriesComponent } from "@app/components/catalogs/countries/countries.component";
 import { CompaniesComponent } from "@app/components/catalogs/companies/companies.component";
 import { NewCompanyComponent } from "@app/components/catalogs/companies/new-company/new-company.component";
+import { EmittersComponent } from '@app/components/catalogs/emitters/emitters.component';
+import { NewEmitterComponent } from '@app/components/catalogs/emitters/new-emitter/new-emitter.component';
+import { NewCountryComponent } from '@app/components/catalogs/countries/new-country/new-country.component';
+
 
 export const AdminLayoutRoutes: Routes = [
   {
@@ -119,5 +123,45 @@ export const AdminLayoutRoutes: Routes = [
       breadcrumb: "Nueva empresa",
       roles: [3]
     }
-  }
+  },
+  {
+    path: "emitters",
+    component: EmittersComponent,
+    //canActivate: [AuthGuard],
+    data: {
+      title: "Emisores",
+      breadcrumb: "Emisores",
+      roles: [3]
+    }
+  },
+  {
+    path: "emitters/new",
+    component: NewEmitterComponent,
+    //canActivate: [AuthGuard],
+    data: {
+      title: "Nuevo Emisor",
+      breadcrumb: "Nuevo Emisor",
+      roles: [3]
+    }
+  },
+  {
+    path: "countries",
+    component: CountriesComponent,
+    //canActivate: [AuthGuard],
+    data: {
+      title: "Paises",
+      breadcrumb: "Paises",
+      roles: [3]
+    }
+  },
+  {
+    path: "countries/new",
+    component:  NewCountryComponent,
+    //canActivate: [AuthGuard],
+    data: {
+      title: "Nuevo País",
+      breadcrumb: "Nuevo País",
+      roles: [3]
+    }
+  },
 ];