onunez 6 éve
szülő
commit
de58180eb3

+ 1 - 1
src/app/components/plugins/maps/maps.component.ts

@@ -42,7 +42,7 @@ export class MapsComponent implements OnInit {
   };
 
   ngOnInit() {
-    this.plantsService.getAssets().subscribe(res => {
+    this.plantsService.getAllAssets().subscribe(res => {
       this.listData = res;
     });
     this.addMarkers();

+ 0 - 32
src/app/components/plugins/organization-cards/organization-cards.component.html

@@ -1,32 +0,0 @@
-<div class="row">
-  <div *ngIf="error; then thenBlock else elseBlock"></div>
-  <ng-template #thenBlock>
-    <div class="col-lg-12">
-      <div class= 'card border-danger'>
-        <div class="card-body">
-          Error en el servidor, no se pudo obtener el listado de organizaciones
-        </div>
-      </div>
-    </div>
-  </ng-template>
-  <ng-template #elseBlock>
-    <div *ngFor="let item of listOrganizations; index as i;" class="col-lg-4 col-md-4 col-sm-6">
-      <div class= 'card border-success'>
-        <div class="card-body">
-          <h5 class="card-title">{{item.name}}</h5>
-          <h6 class="card-subtitle mb-2 text-muted">{{item.city}}, {{item.country}}</h6>
-          <br>
-          <p class="card-text">
-            Nombre contacto: <b>{{item.contactName}}</b>
-            <br>
-            Numero contacto: <b>{{item.contactNumber}}</b>
-            <br>
-            Direccion: <b>{{item.address}}</b>
-          </p>
-          <a [routerLink]="['/assets']" [queryParams]="{ id: item.id }" href="#" class="btn btn-sm btn-primary float-right">Ir a plantas</a>
-        </div>
-      </div>
-    </div>
-  </ng-template>
-</div>
-<br>

+ 0 - 4
src/app/components/plugins/organization-cards/organization-cards.component.scss

@@ -1,4 +0,0 @@
-.card-title {
-  color: #ee964b;
-  font-weight: bold;
-}

+ 0 - 25
src/app/components/plugins/organization-cards/organization-cards.component.spec.ts

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

+ 0 - 35
src/app/components/plugins/organization-cards/organization-cards.component.ts

@@ -1,35 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-import { Organization } from 'src/app/models/organization';
-import { OrganizationsService } from 'src/app/services/organizations.service';
-import { RouterModule } from '@angular/router';
-
-@Component({
-  selector: 'app-organization-cards',
-  templateUrl: './organization-cards.component.html',
-  styleUrls: ['./organization-cards.component.scss']
-})
-export class OrganizationCardsComponent implements OnInit {
-  
-  listOrganizations:any;
-  error:boolean = false;
-  errorMessage:string;
-
-  constructor(private orgService: OrganizationsService) { }
-
-  ngOnInit() {
-
-    //});
-    this.orgService.getOrganizations().subscribe((res)=>{
-      this.listOrganizations = res["organizations"];
-    },
-    (err) => {
-      this.error = true;
-      this.errorMessage = err.message;
-    });
-      
-
-  }
-
-
-  
-}