Fix thumbnail source
FarmMaps.Develop/FarmMapsLib/develop This commit looks good Details

pull/1/head
Willem Dantuma 2019-12-11 18:03:37 +01:00
parent 8e5383b0f2
commit f44b079cde
2 changed files with 72 additions and 72 deletions

View File

@ -1,6 +1,6 @@
<div *ngIf="item;let item">
<div class="card border-0">
<img *ngIf="item.thumbnail" class="card-img-top" [src]="'/api/v1/items/'+item.code+'/thumbnail?v='+item.updated.getTime()" />
<img *ngIf="item.thumbnail" class="card-img-top" [src]="config.getConfig('apiEndPoint') +'/api/v1/items/'+item.code+'/thumbnail?v='+item.updated.getTime()" />
<div *ngIf="!item.thumbnail" class="big-icon" [style.background-color]="itemTypeService.getColor(item.itemType)">
<i [ngClass]="itemTypeService.getIcon(item.itemType)"></i>
</div>

View File

@ -3,7 +3,7 @@ import { Location } from '@angular/common';
import { Feature } from 'ol';
import { Store } from '@ngrx/store';
import * as mapReducers from '../../reducers/map.reducer';
import { commonReducers,ItemTypeService, IItem, Item } from '@farmmaps/common';
import { commonReducers,ItemTypeService, IItem, Item,AppConfig } from '@farmmaps/common';
import * as mapActions from '../../actions/map.actions';
import { Router, ActivatedRoute, ParamMap, Event } from '@angular/router';
@ -50,7 +50,7 @@ export abstract class AbstractSelectedItemComponent {
})
export class SelectedItemComponent extends AbstractSelectedItemComponent {
constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService, location: Location, router: Router) {
constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService, location: Location, router: Router, public config:AppConfig) {
super(store, itemTypeService,location,router);
}
}