Fix itemtype issue
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:
@@ -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";
|
||||
|
Reference in New Issue
Block a user