Only show prent namewhen of type ..cropfield
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good

This commit is contained in:
Willem Dantuma 2021-04-26 08:01:43 +02:00
parent b24e47e39b
commit 8a1c4b5e20
4 changed files with 7 additions and 3 deletions

View File

@ -4,7 +4,7 @@
<div class="card-body">
<fm-back-button></fm-back-button>
<div class="card menu-card">
<h2 *ngIf="parentItem">{{parentItem.name}}</h2>
<h2 *ngIf="parentOfItemType('vnd.farmmaps.itemtype.cropfield')">{{parentItem.name}}</h2>
<h1>{{item.name}}</h1>
</div>
<div class="legend-container" *ngIf="item?.data.layers;let layers">

View File

@ -4,7 +4,7 @@
<div class="card-body">
<fm-back-button></fm-back-button>
<div class="card menu-card">
<h2 *ngIf="parentItem">{{parentItem.name}}</h2>
<h2 *ngIf="parentOfItemType('vnd.farmmaps.itemtype.cropfield')">{{parentItem.name}}</h2>
<h1>{{item.name}}</h1>
</div>
<div class="legend-container" *ngIf="item?.data.layers;let layers">

View File

@ -4,7 +4,7 @@
<div class="card-body">
<fm-back-button></fm-back-button>
<div class="card menu-card">
<h2 *ngIf="parentItem">{{parentItem.name}}</h2>
<h2 *ngIf="parentOfItemType('vnd.farmmaps.itemtype.cropfield')">{{parentItem.name}}</h2>
<h1>{{item.name}}</h1>
</div>
<div class="legend-container" *ngIf="item?.data.layers;let layers">

View File

@ -62,6 +62,10 @@ export abstract class AbstractSelectedItemComponent {
this.location.back();
}
parentOfItemType(itemType:string):boolean {
if(this.parentItem && this.parentItem.itemType == itemType) return true;
return false;
}
}
@Injectable()