Skip to content

Commit

Permalink
show shift complete
Browse files Browse the repository at this point in the history
  • Loading branch information
eranhd committed Jun 17, 2017
1 parent 64478a9 commit 5ea703e
Show file tree
Hide file tree
Showing 10 changed files with 267 additions and 163 deletions.
10 changes: 5 additions & 5 deletions Web/src/app/pages/maps/maps.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@



<nav *ngIf='!showSpesific'>
<nav *ngIf='!_choosen'>
<button class='btn_select' id='reportLable' (click)='select(1)'>
{{reportLable}}
</button>
Expand All @@ -17,15 +17,15 @@
{{showAllLabel}}
</button>
</nav>
<div class='map_div' *ngIf='showSpesific'>
<sebm-google-map [latitude]="showSpesific.lat" [longitude]="showSpesific.lng" [zoom]='zoom'>
<sebm-google-map-marker [latitude]="showSpesific.lat" [longitude]="showSpesific.lng">
<div class='map_div' *ngIf='_choosen'>
<sebm-google-map [latitude]="_choosen.lat" [longitude]="_choosen.lng" [zoom]='zoom'>
<sebm-google-map-marker [latitude]="_choosen.lat" [longitude]="_choosen.lng">
</sebm-google-map-marker>
</sebm-google-map>
</div>


<div class='map_div' *ngIf='!showSpesific'>
<div class='map_div' *ngIf='!_choosen'>

<sebm-google-map *ngIf='showAll' [latitude]="lat" [longitude]="lng" [zoom]='zoom'>
<div *ngIf='reports'>
Expand Down
19 changes: 17 additions & 2 deletions Web/src/app/pages/maps/maps.component.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Component, OnInit, Input } from "@angular/core";
import { MapsService } from "../../service/maps/maps.service";
import { SebmGoogleMap, SebmGoogleMapPolygon, LatLngLiteral , SebmGoogleMapMarker} from "angular2-google-maps/core";
import { SebmGoogleMap, SebmGoogleMapInfoWindow, SebmGoogleMapPolygon, LatLngLiteral , SebmGoogleMapMarker} from "angular2-google-maps/core";
import { UserService } from "../../service/user/user.service";
import { ReportService } from "../../service/report/report.service";
import { Report } from "../../models/Report";
Expand All @@ -18,7 +18,8 @@ export class MapsComponent implements OnInit {
@Input() reports: Report[] = null;
@Input() hot: Report[] = null;
@Input() cold: Location[] = null;

@Input() reportChoosen: Report = null;
@Input() choosen: any = null;

lat: number;
lng: number;
Expand Down Expand Up @@ -71,6 +72,20 @@ export class MapsComponent implements OnInit {
this.showAll = false;
}

get _choosen(){
if(this.choosen)
if(!this.choosen.lat)
this.choosen = this.choosen.location;
return this.choosen;
}

set _choosen(c){
if(c.lat)
this.choosen = c;
else
this.choosen = c.location;
}

ngOnInit() {
}

Expand Down
Empty file.
14 changes: 14 additions & 0 deletions Web/src/app/pages/show-report/show-report.component.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
<main *ngIf='report'>
<<div class='title'>
<!--<span>{{report.summary}}</span>-->
<span>{{report.date | date:'dd.MM.yy'}}</span>
<span>{{report.date | date:'HH:mm'}}</span>
<span>{{report.location | locationName}}</span>
</div>


<div class='body'>
<div class='report-fields' *ngFor='let item of report.fields'>
<span>{{item.name}}</span>
<span>: {{item.data}} </span>
</div>
</div>
</main>
52 changes: 52 additions & 0 deletions Web/src/app/pages/show-report/show-report.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
main{
position: relative;
width: 100%;
height: 100%;
direction: rtl;
font-size: 16px;
.title{
position: absolute;
top: 0;
right: 0;
width: 100%;
height: 20%;
background-color: #004381;
color: white;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
span{
margin: 0 2px;
}
}
.body{
position: absolute;
top: 20%;
right: 0;
width: 100%;
height: 80%;
background-color: white;
color: black;
white-space: nowrap;
overflow: scroll;
text-overflow: ellipsis;
.report-fields{
display: block;
height: 20%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 100%;
span{
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

}
}
}

::-webkit-scrollbar{
visibility: hidden;
}
2 changes: 1 addition & 1 deletion Web/src/app/pages/show-report/show-report.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Report } from "../../models/Report";
@Component({
selector: "show-report",
templateUrl: "./show-report.component.html",
styleUrls: ["./show-report.component.css"]
styleUrls: ["./show-report.component.scss"]
})
export class ShowReportComponent implements OnInit {

Expand Down
96 changes: 65 additions & 31 deletions Web/src/app/pages/show-shift/show-shift.component.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
<main class='container' fxLayout=row>
<main *ngIf='canShow' class='container' fxLayout=row>
<aside class='shift_details' fxFlex=45>
<div>
<div *ngIf='shift.stratShift'>
<span class="label">תאריך משמרת:</span>
<span>{{shift.stratShift.date | date:'dd.MM.yyyy'}}</span>
<br>
<span class="label">שעת התחלה:</span>
<span>{{shift.stratShift.date | date:'HH:mm:ss'}}</span>
<br>
<span *ngIf='shift.stratShift.location'>
<span class="label">מיקום התחלה:</span> {{shift.stratShift.location | locationName}}
<span class="label">מיקום התחלה:</span> {{shift.stratShift.location | locationName}}
</span>
</div>
<div *ngIf='shift.endShift'>
<span class="label">שעת סיום משמרת:</span>
<span>{{shift.endShift.date | date:'hh:mm:ss'}}</span>
<br>
<span *ngIf='shift.stratShift.location'>

<span class="label">מיקום סיום:</span> {{shift.endShift.location | locationName}}

<span *ngIf='!shift.stratShift.location'>
<span class="label">מיקום סיום:</span> דוח סיום לא הוזן
</span>
</div>
<br>
Expand All @@ -30,48 +33,79 @@
<span class="label">שמות המתנדבים בסיור:</span>
<span *ngFor='let member of shift.team.members'>{{member.name}} , </span>
<br>
<span>תחושת הצוות:</span>
<span>{{shift.endShift.filling}}</span>
<span *ngIf='shift.stratShift.filling'>
<span>תחושת הצוות:</span>
<span>{{shift.endShift.filling}}</span>
</span>
</div>

<div>
<table>
<tr class='table_head'>
<th>
נקודות קרות
</th>
<th>
נקודות חמות
</th>
<th>
דיווחים
</th>
</tr>

<tr class='table_body' *ngFor='let shift of data' >

<td>
{{show-shift.coldSpotArr[i].location| locationName}}
</td>
<td>
<table>
<tr class='table_head'>
<th>
נקודות קרות
</th>
<th>
נקודות חמות
</th>
<th>
דיווחים
</th>
</tr>

<tr class='table_body'>

<td>
<table>
<tr *ngFor='let item of coldSpotArr' (click)='choosen = item;'>
<td>{{item | locationName}}</td>
</tr>
</table>
<!--{{show-shift.coldSpotArr[i].location| locationName}}-->
</td>
<td>
<table>
<tr *ngFor='let item of hotSpotArr' (click)='choosen = item; reportChoose = item;'>
<td>
{{item.date | date:'HH:mm'}}
</td>
<td>
{{item.location | locationName}}
</td>
</tr>
</table>
</td>
<td>
<table>
<tr *ngFor='let item of reportArr' (click)='choosen = item; reportChoose = item;'>
<td>
{{item.date | date:'HH:mm'}}
</td>
<td>
{{item.location | locationName}}
</td>
</tr>
</table>
</td>
<!--<td>
{{show-shift.hotSpotArr[i].date | date:'dd.MM.yyyy'}}
{{show-shift.hotSpotArr[i].location| locationName}}
</td>
<td>
{{show-shift.reportArr[i].date | date:'dd.MM.yyyy'}}
{{show-shift.reportArr[i].location| locationName}}
</td>
</tr>
</table>
</div>
</td>-->
</tr>
</table>
</div>
</aside>

<aside class='container details' fxLayout=column fxFlex=45>
<section class='choose_details' fxFlex>
<show-report [report]='reportChoose'></show-report>
<show-report *ngIf='showReport' [report]='reportChoose'></show-report>
</section>
<section class='maps' fxFlex>
<app-maps [reports]='reports' [cold]='colds' [hot]='hots'>
<app-maps [reports]='reportArr' [cold]='coldSpotArr' [hot]='hotSpotArr' [choosen]='choosen'>
<!--choosen היה פה משהו עם -->
</app-maps>
</section>
Expand Down
5 changes: 5 additions & 0 deletions Web/src/app/pages/show-shift/show-shift.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,8 @@ header{
font-size: 15px;

}


show-report{
overflow: auto;
}
Loading

0 comments on commit 5ea703e

Please sign in to comment.