Add common-map library
Some checks failed
FarmMaps.Develop/FarmMapsLib/develop There was a failure building this commit
Some checks failed
FarmMaps.Develop/FarmMapsLib/develop There was a failure building this commit
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
.head {
|
||||
color: grey;
|
||||
font-weight: bold;
|
||||
/*border-bottom:1px solid black;*/
|
||||
}
|
||||
|
||||
.body {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.tpvocmet {
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
font-size: 1.9rem;
|
||||
line-height: 7.2rem;
|
||||
color: deeppink;
|
||||
/*border-right:1px solid black;*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
.widget {
|
||||
display: block;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.unit {
|
||||
font-size: 0.8rem;
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.dateformat {
|
||||
font-size: 0.8rem;
|
||||
}
|
@@ -0,0 +1,13 @@
|
||||
<div class="widget">
|
||||
<div class="d-flex flex-column justify-content-center w-100 h-100">
|
||||
<div class="head h-20 p-1" i18n>WatBal (<span class="unit">kg/ha</span>)</div>
|
||||
<div class="body d-flex flex-column h-100 w-100">
|
||||
<small i18n>Date:{{TPVOCMET?.Datum | date : 'shortDate'}}</small>
|
||||
<small i18n>Bedrijf/Perceel:{{TPVOCMET?.BedrijfID}}/{{TPVOCMET?.PerceelID}}</small>
|
||||
<small i18n>GewichtZonder:{{TPVOCMET?.GewichtZonder | number:'0.1-2'}}</small>
|
||||
<small i18n>GewichtGroDro:{{TPVOCMET?.GewichtGroDro | number:'0.1-2'}}</small>
|
||||
<small i18n>GewichtGroNat:{{TPVOCMET?.GewichtGroNat | number:'0.1-2'}}</small>
|
||||
</div>
|
||||
<widget-status [stage]="stage" [info]="'WatBal is expected in spring 2020.'" i18n></widget-status>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,34 @@
|
||||
import { Observable, of } from 'rxjs';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Input, Injectable } from '@angular/core';
|
||||
import { Store } from '@ngrx/store';
|
||||
import * as mapReducers from '../../reducers/map.reducer';
|
||||
import { commonReducers, ItemTypeService, IItem, Item, ItemService, IListItem } from '@farmmaps/common';
|
||||
import { ForItemType } from '../for-item/for-itemtype.decorator';
|
||||
import { ForSourceTask } from '../for-item/for-sourcetask.decorator';
|
||||
import { AbstractItemListItemComponent } from '../item-list-item/item-list-item.component'
|
||||
import { Stage } from '../widget-status/widget-status.component';
|
||||
|
||||
@ForItemType("vnd.farmmaps.itemtype.watbal")
|
||||
@ForSourceTask("vnd.farmmaps.task.watbal")
|
||||
@Injectable()
|
||||
@Component({
|
||||
selector: 'item-list-item-watbal',
|
||||
templateUrl: './item-list-item-watbal.component.html',
|
||||
styleUrls: ['./item-list-item-watbal.component.css']
|
||||
})
|
||||
export class ItemListItemWatBalComponent extends AbstractItemListItemComponent implements OnInit {
|
||||
@Input() item: IListItem;
|
||||
TPVOCMET;
|
||||
stage = Stage.DevelopmentPreAlpha;
|
||||
|
||||
constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService, private itemService$: ItemService) {
|
||||
super(store, itemTypeService);
|
||||
}
|
||||
ngOnInit() {
|
||||
this.itemService$.getItem(this.item.code).subscribe(i => {
|
||||
var data = i.data.HTAKKER_Input.TPVOCMET;
|
||||
this.TPVOCMET = data[data.length - 1];
|
||||
});
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user