1 |
b5525aef
|
hlavja
|
<p-dialog [visible]="isVisible" [modal]="true" [closable]="false" [draggable]="false" header="Add position to unit!" [style]="{width: '70vw'}"
|
2 |
|
|
[baseZIndex]="10000" (onShow)="clearFormArray()">
|
3 |
|
|
|
4 |
|
|
<form [formGroup]="insertForm">
|
5 |
|
|
<div class="input-group form-group">
|
6 |
|
|
<div class="input-group-prepend">
|
7 |
|
|
<span class="input-group-text">Latitude</span>
|
8 |
|
|
</div>
|
9 |
|
|
<input type="number" formControlName="lat" class="form-control" id="lat"
|
10 |
|
|
placeholder="Latitude WGS-84 coordinates" step="0.0001" min="-90" max="90"/>
|
11 |
|
|
<div *ngIf="insertForm.get('lat').invalid &&
|
12 |
|
|
insertForm.get('lat').errors &&
|
13 |
|
|
(insertForm.get('lat').dirty || insertForm.get('lat').touched)">
|
14 |
|
|
<small class="text-danger"
|
15 |
|
|
*ngIf="insertForm.get('lat').hasError('required')">
|
16 |
|
|
This field is required.
|
17 |
|
|
</small>
|
18 |
|
|
<small class="text-danger"
|
19 |
|
|
*ngIf="insertForm.get('lat').hasError('min')">
|
20 |
|
|
The minimum value for this field is -90.
|
21 |
|
|
</small>
|
22 |
|
|
<small class="text-danger"
|
23 |
|
|
*ngIf="insertForm.get('lat').hasError('max')">
|
24 |
|
|
The minimum value for this field is 90.
|
25 |
|
|
</small>
|
26 |
|
|
</div>
|
27 |
|
|
</div>
|
28 |
|
|
<div class="input-group form-group">
|
29 |
|
|
<div class="input-group-prepend">
|
30 |
|
|
<span class="input-group-text">Longitude</span>
|
31 |
|
|
</div>
|
32 |
|
|
<input type="number" formControlName="lon" class="form-control" id="lon"
|
33 |
|
|
placeholder="Longitude WGS-84 coordinates" step="0.0001" min="-180" max="180"/>
|
34 |
|
|
<div *ngIf="insertForm.get('lon').invalid &&
|
35 |
|
|
insertForm.get('lon').errors &&
|
36 |
|
|
(insertForm.get('lon').dirty || insertForm.get('lon').touched)">
|
37 |
|
|
<small class="text-danger"
|
38 |
|
|
*ngIf="insertForm.get('lon').hasError('required')">
|
39 |
|
|
This field is required.
|
40 |
|
|
</small>
|
41 |
|
|
<small class="text-danger"
|
42 |
|
|
*ngIf="insertForm.get('lon').hasError('min')">
|
43 |
|
|
The minimum value for this field is -180.
|
44 |
|
|
</small>
|
45 |
|
|
<small class="text-danger"
|
46 |
|
|
*ngIf="insertForm.get('lon').hasError('max')">
|
47 |
|
|
The minimum value for this field is 180.
|
48 |
|
|
</small>
|
49 |
|
|
</div>
|
50 |
|
|
</div>
|
51 |
|
|
<hr>
|
52 |
|
|
<div class="input-group form-group">
|
53 |
|
|
<div class="input-group-prepend">
|
54 |
|
|
<span class="input-group-text">Altitude</span>
|
55 |
|
|
</div>
|
56 |
|
|
<input type="number" formControlName="alt" class="form-control" id="alt"
|
57 |
|
|
placeholder="Altitude in meters"/>
|
58 |
|
|
</div>
|
59 |
|
|
<div class="input-group form-group">
|
60 |
|
|
<div class="input-group-prepend">
|
61 |
|
|
<span class="input-group-text">Speed</span>
|
62 |
|
|
</div>
|
63 |
|
|
<input type="number" formControlName="speed" class="form-control" id="speed"
|
64 |
|
|
placeholder="Speed of the unit"/>
|
65 |
|
|
</div>
|
66 |
|
|
<div class="input-group form-group">
|
67 |
|
|
<div class="input-group-prepend">
|
68 |
|
|
<span class="input-group-text">Dilution</span>
|
69 |
|
|
</div>
|
70 |
|
|
<input type="number" formControlName="dop" class="form-control" id="dop"
|
71 |
|
|
placeholder="Dilution of precision"/>
|
72 |
|
|
</div>
|
73 |
|
|
</form>
|
74 |
|
|
|
75 |
|
|
<p-footer>
|
76 |
|
|
<div class="row justify-content-end align-items-center">
|
77 |
|
|
<div>
|
78 |
|
|
<p-button icon="pi pi-times" (click)="close()" label="Close" class="pr-2"></p-button>
|
79 |
|
|
<p-button icon="pi pi-check" (click)="processInsertion()" type="submit" label="Save" class="pr-2"></p-button>
|
80 |
|
|
</div>
|
81 |
|
|
</div>
|
82 |
|
|
</p-footer>
|
83 |
|
|
</p-dialog>
|