-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a28a329
commit 4cdcd61
Showing
16 changed files
with
168 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
35 changes: 35 additions & 0 deletions
35
src/app/components/dashboard/route-controller/routes-public/routes-public.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<div class="example-container mat-elevation-z8" style="margin-top: 5px;"> | ||
<mat-table #table [dataSource]="dataSource"> | ||
|
||
<ng-container matColumnDef="date"> | ||
<mat-header-cell *matHeaderCellDef> Data </mat-header-cell> | ||
<mat-cell *matCellDef="let element"> {{element.date}} </mat-cell> | ||
</ng-container> | ||
|
||
<!-- Name Column --> | ||
<ng-container matColumnDef="distance"> | ||
<mat-header-cell *matHeaderCellDef> Distanta </mat-header-cell> | ||
<mat-cell *matCellDef="let element"> {{element.distance}} </mat-cell> | ||
</ng-container> | ||
|
||
<ng-container matColumnDef="trees"> | ||
<mat-header-cell *matHeaderCellDef> Pomi </mat-header-cell> | ||
<mat-cell *matCellDef="let element"> {{element.trees}} </mat-cell> | ||
</ng-container> | ||
|
||
<ng-container matColumnDef="halts"> | ||
<mat-header-cell *matHeaderCellDef> Popasuri </mat-header-cell> | ||
<mat-cell *matCellDef="let element"> {{element.halts}} </mat-cell> | ||
</ng-container> | ||
|
||
<ng-container matColumnDef="action"> | ||
<mat-header-cell *matHeaderCellDef> Actiune </mat-header-cell> | ||
<mat-cell *matCellDef="let element"> | ||
<button mat-button color="primary" >Detalii</button> | ||
</mat-cell> | ||
</ng-container> | ||
|
||
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row> | ||
<mat-row *matRowDef="let row; columns: displayedColumns;"></mat-row> | ||
</mat-table> | ||
</div> |
25 changes: 25 additions & 0 deletions
25
src/app/components/dashboard/route-controller/routes-public/routes-public.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { RoutesPublicComponent } from './routes-public.component'; | ||
|
||
describe('RoutesPublicComponent', () => { | ||
let component: RoutesPublicComponent; | ||
let fixture: ComponentFixture<RoutesPublicComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ RoutesPublicComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(RoutesPublicComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
31 changes: 31 additions & 0 deletions
31
src/app/components/dashboard/route-controller/routes-public/routes-public.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { MapService } from '../../../../services/map.service'; | ||
import { UserService } from '../../../../services/user.service'; | ||
|
||
@Component({ | ||
selector: 'routes-public', | ||
templateUrl: './routes-public.component.html', | ||
styleUrls: ['./routes-public.component.css'] | ||
}) | ||
export class RoutesPublicComponent implements OnInit { | ||
|
||
isUserAuthenticated: boolean; | ||
publicRoutes = []; | ||
displayedColumns = ['date', 'distance', 'trees', 'halts', 'action']; | ||
dataSource = []; | ||
|
||
constructor(private _mapService: MapService) { } | ||
|
||
ngOnInit() { | ||
this._mapService.getPublicRoutes().subscribe(value => { | ||
this.publicRoutes = Object.keys(value).map(function(key) { | ||
return value[key]; | ||
}); | ||
|
||
this.dataSource = this.publicRoutes; | ||
|
||
}); | ||
|
||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ agm-map { | |
|
||
img { | ||
max-width: 200px !important; | ||
max-height: 200px !important; | ||
} | ||
|
||
h5 { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters