Some checks failed
		
		
	
	FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
				
			This reverts commit 3b3c2768d3.
		
	
		
			
				
	
	
		
			54 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			54 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import { Component, Input, Injectable,Directive} from '@angular/core';
 | |
| import { Store } from '@ngrx/store';
 | |
| import * as mapReducers from '../../reducers/map.reducer';
 | |
| import { commonReducers,ItemTypeService,IListItem } from '@farmmaps/common';
 | |
| 
 | |
| 
 | |
| 
 | |
| @Injectable()
 | |
| @Directive()
 | |
| export abstract class AbstractItemListItemComponent {
 | |
|   @Input() item: IListItem
 | |
| 
 | |
|   constructor(public store: Store<mapReducers.State | commonReducers.State>, public itemTypeService: ItemTypeService) {
 | |
|   } 
 | |
| 
 | |
|   getScaledValue(value:number,scale:number = 0):number {
 | |
|     let v = value;
 | |
|     if(scale && scale != 0) {
 | |
|       v=scale*value;
 | |
|     }
 | |
|     return v;
 | |
|   }
 | |
| }
 | |
| 
 | |
| @Injectable()
 | |
| @Directive()
 | |
| export abstract class AbstractItemWidgetComponent {
 | |
|   @Input() item: IListItem
 | |
| 
 | |
|   constructor(public store: Store<mapReducers.State | commonReducers.State>, public itemTypeService: ItemTypeService) {
 | |
|   }
 | |
| 
 | |
|   getScaledValue(value:number,scale:number = 0):number {
 | |
|     let v = value;
 | |
|     if(scale && scale != 0) {
 | |
|       v=scale*value;
 | |
|     }
 | |
|     return v;
 | |
|   }
 | |
| }
 | |
| 
 | |
| @Injectable()
 | |
| @Component({
 | |
|     selector: 'fm-map-item-list-item',
 | |
|   templateUrl: './item-list-item.component.html',
 | |
|     styleUrls: ['./item-list-item.component.scss']
 | |
| })
 | |
| export class ItemListItemComponent extends AbstractItemListItemComponent {
 | |
| 
 | |
|   constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService) {
 | |
|     super(store, itemTypeService);
 | |
|   } 
 | |
| }
 |