AW-1084 Van der Sat: cropyear to viewer.
Some checks failed
FarmMaps.Develop/FarmMapsLib/develop There was a failure building this commit

This commit is contained in:
Peter Bastiani 2020-03-20 11:15:47 +01:00
parent 9b98f3d91c
commit 28cfc045fb
2 changed files with 4 additions and 3 deletions

View File

@ -35,7 +35,7 @@
<ul class="p-0 mt-2"> <ul class="p-0 mt-2">
<li *ngIf="item.isEditable"><a href="#" class="mt-1 mr-1" (click)="handleOnEdit(item)" i18n><i class="fa fa-pencil" aria-hidden="true" title="Edit"></i> Edit</a></li> <li *ngIf="item.isEditable"><a href="#" class="mt-1 mr-1" (click)="handleOnEdit(item)" i18n><i class="fa fa-pencil" aria-hidden="true" title="Edit"></i> Edit</a></li>
<li *ngIf="itemTypeService.isLayer(item)"><a href="#" (click)="handleAddAsLayer(item,itemLayer.layerIndex)" class="mt-1 mr-1" i18n><i class="fa fa-eye" aria-hidden="true" title="Add as layer"></i> Add as overlay</a></li> <li *ngIf="itemTypeService.isLayer(item)"><a href="#" (click)="handleAddAsLayer(item,itemLayer.layerIndex)" class="mt-1 mr-1" i18n><i class="fa fa-eye" aria-hidden="true" title="Add as layer"></i> Add as overlay</a></li>
<li><a href="#" (click)="handleGoToChart()" i18n><i class="fa fa-line-chart" aria-hidden="true" title="Edit"></i> Show chart</a></li> <li><a href="#" (click)="handleGoToChart(item)" i18n><i class="fa fa-line-chart" aria-hidden="true" title="Edit"></i> Show chart</a></li>
</ul> </ul>
</div> </div>
</div> </div>

View File

@ -8,6 +8,7 @@ import { ForItemType } from '../for-item/for-itemtype.decorator';
import { AbstractSelectedItemComponent } from '../selected-item/selected-item.component'; import { AbstractSelectedItemComponent } from '../selected-item/selected-item.component';
import { ITemporalItemLayer} from '../../models/item.layer'; import { ITemporalItemLayer} from '../../models/item.layer';
import * as mapActions from '../../actions/map.actions'; import * as mapActions from '../../actions/map.actions';
import { IItem } from 'dist/common/public-api';
@ForItemType("vnd.farmmaps.itemtype.temporal") @ForItemType("vnd.farmmaps.itemtype.temporal")
@ -73,8 +74,8 @@ export class SelectedItemTemporalComponent extends AbstractSelectedItemComponent
return layers.find(l => l.index == layerIndex); return layers.find(l => l.index == layerIndex);
} }
handleGoToChart() { handleGoToChart(item: IItem) {
this.router.navigate(['viewer/temporal/item', this.item.code]); this.router.navigate(['/viewer', 'temporal', 'item', item.code, item.dataDate.getUTCFullYear()]);
return false; return false;
} }
} }