Renamed prefixes in angular.json
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
<div *ngIf="feature;let feature" class="row m-0">
|
||||
<div class="col-3 m-0 p-2 thumbnail">
|
||||
<img *ngIf="feature.get('thumbnail')" [src]="config.getConfig('apiEndPoint') + '/api/v1/items/'+feature.get('code')+'/thumbnail'" />
|
||||
<div *ngIf="!feature.get('thumbnail')" [style.background-color]="itemTypeService.getColor(feature.get('itemType'))">
|
||||
<i [ngClass]="itemTypeService.getIcon(feature.get('itemType'))"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col p-2">
|
||||
<h1 class="card-title" title="{{feature.get('name')}}"><i [ngClass]="itemTypeService.getIcon(feature.get('itemType'))" [style.color]="itemTypeService.getColor(feature.get('itemType'))"></i> {{feature.get('name')}}</h1>
|
||||
<div class="card-text">{{feature.get('datadate')|date:'shortDate'}}</div>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,30 @@
|
||||
@import "../../_theme.scss";
|
||||
@import "~bootstrap/scss/bootstrap.scss";
|
||||
|
||||
|
||||
|
||||
.card-title {
|
||||
font-size: 1rem;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.thumbnail > img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.thumbnail > div {
|
||||
width: 100%;
|
||||
font-size: 2rem;
|
||||
text-align: center;
|
||||
min-height: 3rem;
|
||||
color: white;
|
||||
padding-top: 0.5rem;
|
||||
}
|
||||
|
||||
.col {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
@@ -0,0 +1,28 @@
|
||||
import { Component, Input, Injectable} from '@angular/core';
|
||||
import { Feature } from 'ol';
|
||||
import { Store } from '@ngrx/store';
|
||||
import * as mapReducers from '../../reducers/map.reducer';
|
||||
import { commonReducers,ItemTypeService,AppConfig } from '@farmmaps/common';
|
||||
|
||||
|
||||
|
||||
@Injectable()
|
||||
export abstract class AbstractFeatureListFeatureComponent {
|
||||
@Input() feature: Feature
|
||||
|
||||
constructor(public store: Store<mapReducers.State | commonReducers.State>, public itemTypeService: ItemTypeService,public config:AppConfig) {
|
||||
}
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
@Component({
|
||||
selector: 'fm-map-feature-list-feature',
|
||||
templateUrl: './feature-list-feature.component.html',
|
||||
styleUrls: ['./feature-list-feature.component.scss']
|
||||
})
|
||||
export class FeatureListFeatureComponent extends AbstractFeatureListFeatureComponent {
|
||||
|
||||
constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService, config:AppConfig) {
|
||||
super(store, itemTypeService,config);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user