Merge branch 'feature/AW784_MergeFarmMapsMap_FarmMapsLibMap' into develop
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:
commit
719c699981
@ -19,10 +19,20 @@ export class SelectedItemContainerComponent {
|
|||||||
@ViewChild(WidgetHostDirective, { static: true }) widgetHost: WidgetHostDirective;
|
@ViewChild(WidgetHostDirective, { static: true }) widgetHost: WidgetHostDirective;
|
||||||
|
|
||||||
loadComponent() {
|
loadComponent() {
|
||||||
var componentFactory: ComponentFactory<AbstractSelectedItemComponent> = this.componentFactoryResolver.resolveComponentFactory(SelectedItemComponent); // default
|
let componentFactory: ComponentFactory<AbstractSelectedItemComponent> = this.componentFactoryResolver.resolveComponentFactory(SelectedItemComponent); // default
|
||||||
for (var i = 0; i < this.selectedItemComponents.length; i++) {
|
let firstComponentWithTypeAndTask = this.selectedItemComponents
|
||||||
if (this.selectedItemComponents[i]['forItemType'] == this.item.itemType) {
|
.find(value => value['forSourceTask'] == this.item.sourceTask &&
|
||||||
componentFactory = this.componentFactoryResolver.resolveComponentFactory(this.selectedItemComponents[i]['constructor'] as any);
|
value['forItemType'] == this.item.itemType
|
||||||
|
);
|
||||||
|
|
||||||
|
if (firstComponentWithTypeAndTask) {
|
||||||
|
componentFactory = this.componentFactoryResolver.resolveComponentFactory(firstComponentWithTypeAndTask['constructor'] as any);
|
||||||
|
} else {
|
||||||
|
let firstComponentWithType = this.selectedItemComponents
|
||||||
|
.find(value => value['forItemType'] == this.item.itemType);
|
||||||
|
|
||||||
|
if (firstComponentWithType) {
|
||||||
|
componentFactory = this.componentFactoryResolver.resolveComponentFactory(firstComponentWithType['constructor'] as any);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const viewContainerRef = this.widgetHost.viewContainerRef;
|
const viewContainerRef = this.widgetHost.viewContainerRef;
|
||||||
|
@ -3,11 +3,15 @@
|
|||||||
<div class="card border-0">
|
<div class="card border-0">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div><a href="#" (click)="handleBackToList($event)" i18n>Back</a></div>
|
<div><a href="#" (click)="handleBackToList($event)" i18n>Back</a></div>
|
||||||
<h4>Cropfield</h4>
|
<div class="card menu-card">
|
||||||
<h1>{{item.name}}</h1>
|
<h1>Cropfield</h1>
|
||||||
|
<h4>{{item.name}}</h4>
|
||||||
<div>{{item.data.cropTypeName}}</div>
|
<div>{{item.data.cropTypeName}}</div>
|
||||||
<div><span>{{item.data.startDate|date}}</span> - <span>{{item.data.endDate|date}}</span> </div>
|
<div><span>{{item.data.startDate|date}}</span> - <span>{{item.data.endDate|date}}</span> </div>
|
||||||
<div class="mt-1"><a href="#" (click)="handleOnEdit(item)" i18n><i class="fa fa-pencil" aria-hidden="true" title="Edit"></i> Edit</a></div>
|
<ul class="p-0 mt-2">
|
||||||
|
<li><a href="#" (click)="handleOnEdit(item)" i18n><i class="fa fa-pencil" aria-hidden="true" title="Edit"></i> Edit</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<fm-map-item-list [items]="(items|async)"></fm-map-item-list>
|
<fm-map-item-list [items]="(items|async)"></fm-map-item-list>
|
||||||
<fm-map-item-widget-list [item]="item"></fm-map-item-widget-list>
|
<fm-map-item-widget-list [item]="item"></fm-map-item-widget-list>
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
@import "../../_theme.scss";
|
@import "../../../app/theme.scss";
|
||||||
@import "~bootstrap/scss/bootstrap.scss";
|
@import "node_modules/bootstrap/scss/functions";
|
||||||
|
@import "node_modules/bootstrap/scss/variables";
|
||||||
|
@import "node_modules/bootstrap/scss/mixins";
|
||||||
|
|
||||||
.big-icon {
|
.big-icon {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -13,6 +15,10 @@
|
|||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.card-body {
|
||||||
|
padding-bottom: unset;
|
||||||
|
}
|
||||||
|
|
||||||
.spacer {
|
.spacer {
|
||||||
display: none;
|
display: none;
|
||||||
height: 4rem;
|
height: 4rem;
|
||||||
@ -23,3 +29,11 @@
|
|||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.menu-card {
|
||||||
|
margin-left: -7px;
|
||||||
|
padding-left: 7px;
|
||||||
|
margin-right: -7px;
|
||||||
|
padding-right: 7px;
|
||||||
|
margin-bottom: 7px;
|
||||||
|
}
|
||||||
|
@ -3,15 +3,20 @@
|
|||||||
<div class="card border-0">
|
<div class="card border-0">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="mb-2"><a href="#" (click)="handleBackToList($event)" i18n>Back</a></div>
|
<div class="mb-2"><a href="#" (click)="handleBackToList($event)" i18n>Back</a></div>
|
||||||
|
<div class="card menu-card">
|
||||||
<h1>{{item.name}}</h1>
|
<h1>{{item.name}}</h1>
|
||||||
|
</div>
|
||||||
<div class="legend-container" *ngIf="item?.data.layers;let layers">
|
<div class="legend-container" *ngIf="item?.data.layers;let layers">
|
||||||
|
<div class="card menu-card">
|
||||||
<div *ngIf="layers.length>1">
|
<div *ngIf="layers.length>1">
|
||||||
<select (change)="onLayerChanged($event.target.value)">
|
<select (change)="onLayerChanged($event.target.value)">
|
||||||
<option *ngFor="let l of layers;" [value]="l.index">{{l.name}}</option>
|
<option *ngFor="let l of layers;" [value]="l.index">{{l.name}}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<fm-map-layer-legend [showTitle]="layers.length==1" [layer]="layers[selectedLayer]" [histogramenabled]="false" histogramunit="ha"></fm-map-layer-legend>
|
<fm-map-layer-legend [showTitle]="layers.length==1" [layer]="layers[selectedLayer]" [histogramenabled]="true"></fm-map-layer-legend>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card menu-card">
|
||||||
<ul class="p-0 mt-2">
|
<ul class="p-0 mt-2">
|
||||||
<!--<li><a href="/api/v1/items/{{item.code}}/file" class="mt-1 mr-1" i18n><i class="fa fa-download" aria-hidden="true" title="Download"></i> Download</a></li>-->
|
<!--<li><a href="/api/v1/items/{{item.code}}/file" class="mt-1 mr-1" i18n><i class="fa fa-download" aria-hidden="true" title="Download"></i> Download</a></li>-->
|
||||||
<li><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><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>
|
||||||
@ -20,3 +25,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
@ -39,3 +39,11 @@ li {
|
|||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.menu-card {
|
||||||
|
margin-left: -7px;
|
||||||
|
padding-left: 7px;
|
||||||
|
margin-right: -7px;
|
||||||
|
padding-right: 7px;
|
||||||
|
margin-bottom: 7px;
|
||||||
|
}
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
<div *ngIf="!item.thumbnail" class="big-icon" [style.background-color]="itemTypeService.getColor(item.itemType)">
|
<div *ngIf="!item.thumbnail" class="big-icon" [style.background-color]="itemTypeService.getColor(item.itemType)">
|
||||||
<i [ngClass]="itemTypeService.getIcon(item.itemType)"></i>
|
<i [ngClass]="itemTypeService.getIcon(item.itemType)"></i>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="mb-2"><a href="#" (click)="handleBackToList($event)" i18n>Back</a></div>
|
<div class="mb-2"><a href="#" (click)="handleBackToList($event)" i18n>Back</a></div>
|
||||||
<h1 class="card-title">{{item.name}}</h1>
|
<h1 class="card-title">{{item.name}}</h1>
|
||||||
|
Loading…
Reference in New Issue
Block a user