Renamed prefixes in angular.json
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good

This commit is contained in:
Willem Dantuma
2019-11-04 13:43:46 +01:00
parent c32214f544
commit cec43a636c
183 changed files with 4 additions and 4 deletions

View File

@@ -0,0 +1,7 @@
<div *ngIf="items;let items" class="widget-container">
<div class="widget" *ngFor="let item of items" (click)="handleItemClick(item)">
<div class="content">
<fm-map-item-list-item-container [item]="item" class="item-container"></fm-map-item-list-item-container>
</div>
</div>
</div>

View File

@@ -0,0 +1,42 @@
@import "../../_theme.scss";
@import "~bootstrap/scss/bootstrap.scss";
.widget-container {
overflow:auto;
margin-bottom:1rem;
}
.widget {
position:relative;
border: 1px solid gray('500');
user-select: none;
display:inline-block;
width:50%;
overflow:hidden;
float:left;
}
.widget:after {
content: "";
display: block;
padding-bottom: 100%;
}
.content {
position:absolute;
width:100%;
height:100%;
}
.widget:hover {
background-color: gray('100');
}
.widget-container {
padding:1rem;
}
.item-container {
display:block;
height:100%;
}

View File

@@ -0,0 +1,43 @@
import { Component, Input, Injectable } from '@angular/core';
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,IListItem } from '@farmmaps/common';
import * as mapActions from '../../actions/map.actions';
import { Observable, from } from 'rxjs';
import { withLatestFrom } from 'rxjs/operators';
import { tassign } from 'tassign';
import { IQueryState } from '../../models';
@Injectable()
export abstract class AbstractItemListComponent {
@Input() items: Array<IListItem>
constructor(public store: Store<mapReducers.State | commonReducers.State>, public itemTypeService: ItemTypeService, private location: Location) {
}
handleItemClick(item:IListItem) {
var newQuery: any = tassign(mapReducers.initialState.query);
newQuery.itemCode = item.code;
this.store.dispatch(new mapActions.DoQuery(newQuery));
}
handleBackClick(event: MouseEvent) {
event.preventDefault();
this.location.back();
}
}
@Injectable()
@Component({
selector: 'fm-map-item-list',
templateUrl: './item-list.component.html',
styleUrls: ['./item-list.component.scss']
})
export class ItemListComponent extends AbstractItemListComponent {
constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService,location:Location) {
super(store, itemTypeService,location);
}
}