Fix itemtype issue
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good

This commit is contained in:
Willem Dantuma
2019-11-07 16:54:58 +01:00
parent ce8cde20b2
commit ef8f029e17
4 changed files with 1840 additions and 1547 deletions

View File

@@ -1,8 +1,7 @@
import { Component, Injectable } from '@angular/core';
import { Store } from '@ngrx/store';
import * as appCommonReducer from '../reducers/app-common.reducer'
import { Injectable } from '@angular/core';
import {IItemTypes} from '../models/item.types'
import {IItem} from '../models/item'
import {ItemService} from '../services/item.service';
@Injectable({
providedIn: 'root',
@@ -10,11 +9,11 @@ import {IItem} from '../models/item'
export class ItemTypeService {
public itemTypes: IItemTypes;
constructor(private store: Store<appCommonReducer.State> ) {
this.store.select(appCommonReducer.selectGetItemTypes).subscribe((itemTypes) => {
this.itemTypes = itemTypes;
});
}
constructor(itemService:ItemService) {
itemService.getItemTypes().subscribe((itemTypes) => {
this.itemTypes = itemTypes;
});
}
getIcon(itemType: string) {
var icon = "fa fa-file-o";