From 28cfc045fb87b803e1a038b96ff283de8f235a4c Mon Sep 17 00:00:00 2001 From: Peter Bastiani Date: Fri, 20 Mar 2020 11:15:47 +0100 Subject: [PATCH] AW-1084 Van der Sat: cropyear to viewer. --- .../selected-item-temporal.component.html | 2 +- .../selected-item-temporal.component.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/projects/common-map/src/fm-map/components/selected-item-temporal/selected-item-temporal.component.html b/projects/common-map/src/fm-map/components/selected-item-temporal/selected-item-temporal.component.html index 624932c..265a05a 100644 --- a/projects/common-map/src/fm-map/components/selected-item-temporal/selected-item-temporal.component.html +++ b/projects/common-map/src/fm-map/components/selected-item-temporal/selected-item-temporal.component.html @@ -35,7 +35,7 @@ diff --git a/projects/common-map/src/fm-map/components/selected-item-temporal/selected-item-temporal.component.ts b/projects/common-map/src/fm-map/components/selected-item-temporal/selected-item-temporal.component.ts index 66c70a0..e3841d7 100644 --- a/projects/common-map/src/fm-map/components/selected-item-temporal/selected-item-temporal.component.ts +++ b/projects/common-map/src/fm-map/components/selected-item-temporal/selected-item-temporal.component.ts @@ -8,6 +8,7 @@ import { ForItemType } from '../for-item/for-itemtype.decorator'; import { AbstractSelectedItemComponent } from '../selected-item/selected-item.component'; import { ITemporalItemLayer} from '../../models/item.layer'; import * as mapActions from '../../actions/map.actions'; +import { IItem } from 'dist/common/public-api'; @ForItemType("vnd.farmmaps.itemtype.temporal") @@ -73,8 +74,8 @@ export class SelectedItemTemporalComponent extends AbstractSelectedItemComponent return layers.find(l => l.index == layerIndex); } - handleGoToChart() { - this.router.navigate(['viewer/temporal/item', this.item.code]); + handleGoToChart(item: IItem) { + this.router.navigate(['/viewer', 'temporal', 'item', item.code, item.dataDate.getUTCFullYear()]); return false; } }