Compare commits
No commits in common. "39c15d6519af319e700f9d13cb89c9941b61e469" and "4f78c67f309643aca1291e18acc95f3c72e0fc3e" have entirely different histories.
39c15d6519
...
4f78c67f30
1257
package-lock.json
generated
1257
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -66,11 +66,11 @@
|
||||
"@types/arcgis-rest-api": "^10.4.5",
|
||||
"@types/jasmine": "~2.8.8",
|
||||
"@types/jasminewd2": "^2.0.9",
|
||||
"@types/node": "^18.11.6",
|
||||
"@types/node": "^12.20.15",
|
||||
"@typescript-eslint/eslint-plugin": "^6.18.0",
|
||||
"@typescript-eslint/eslint-plugin-tslint": "^6.18.0",
|
||||
"@typescript-eslint/parser": "^6.18.0",
|
||||
"codelyzer": "^6.0.2",
|
||||
"codelyzer": "^0.0.28",
|
||||
"eslint": "^8.35.0",
|
||||
"eslint-config-prettier": "^8.6.0",
|
||||
"eslint-plugin-import": "^2.27.5",
|
||||
|
@ -9,7 +9,7 @@ import { ActionReducer, MetaReducer, StoreModule } from '@ngrx/store';
|
||||
import { AngularOpenlayersModule } from 'ng-openlayers';
|
||||
|
||||
//common modules
|
||||
import { AppCommonModule } from '@farmmaps/common';
|
||||
import { AppCommonModule, ItemService, ItemTypeService, FolderService } from '@farmmaps/common';
|
||||
|
||||
import * as mapActions from './actions/map.actions';
|
||||
import * as mapEffects from './effects/map.effects';
|
||||
@ -212,6 +212,9 @@ export {
|
||||
GeolocationService,
|
||||
DeviceOrientationService,
|
||||
TemporalService,
|
||||
ItemTypeService,
|
||||
ItemService,
|
||||
FolderService,
|
||||
{ provide: AbstractFeatureListComponent, useClass: FeatureListCroppingschemeComponent, multi: true },
|
||||
{ provide: AbstractFeatureListComponent, useClass: FeatureListCropfieldComponent, multi: true },
|
||||
{ provide: AbstractFeatureListFeatureComponent, useClass: FeatureListFeatureComponent, multi: true },
|
||||
|
@ -23,7 +23,7 @@ export class SelectedItemCropfieldComponent extends AbstractSelectedItemComponen
|
||||
|
||||
public items: Observable<IListItem[]>;
|
||||
|
||||
constructor(store: Store<mapReducers.State | commonReducers.State>, @Inject('itemTypeService') itemTypeService: ItemTypeService, location: Location, router: Router, private itemService$: ItemService, private folderService$: FolderService) {
|
||||
constructor(store: Store<mapReducers.State | commonReducers.State>, @Inject('itemTypeService') itemTypeService: ItemTypeService, location: Location, router: Router, @Inject('itemService$') private itemService$: ItemService,@Inject('folderService$') private folderService$: FolderService) {
|
||||
super(store, itemTypeService,location,router);
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ export class SelectedItemCropfieldComponent extends AbstractSelectedItemComponen
|
||||
const atLocationItems = this.itemService$.getItemList(null,null,null,this.item.code,true);
|
||||
this.items = childItems.pipe(
|
||||
combineLatest(atLocationItems),
|
||||
switchMap(([ci, ali]) => {
|
||||
switchMap(([ci,ali]) => {
|
||||
const retVal:IListItem[] = [];
|
||||
const codes = {};
|
||||
ci.forEach((listItem) => {
|
||||
|
@ -15,37 +15,37 @@ export class ItemTypeService {
|
||||
|
||||
getIcon(itemType: string) {
|
||||
let icon = "fal fa-file";
|
||||
if (this.itemTypes && this.itemTypes[itemType]) icon = this.itemTypes[itemType].icon;
|
||||
if (this.itemTypes[itemType]) icon = this.itemTypes[itemType].icon;
|
||||
return icon;
|
||||
}
|
||||
|
||||
getColor(itemType: string) {
|
||||
let color = "#000000";
|
||||
if (this.itemTypes && this.itemTypes[itemType]) color = this.itemTypes[itemType].iconColor;
|
||||
if (this.itemTypes[itemType]) color = this.itemTypes[itemType].iconColor;
|
||||
return color;
|
||||
}
|
||||
|
||||
getExtraAttributes(itemType: string) {
|
||||
let extraAttributes = null;
|
||||
if (this.itemTypes && this.itemTypes[itemType] && this.itemTypes[itemType].extraAttributes) extraAttributes = this.itemTypes[itemType].extraAttributes;
|
||||
if (this.itemTypes[itemType] && this.itemTypes[itemType].extraAttributes) extraAttributes = this.itemTypes[itemType].extraAttributes;
|
||||
return extraAttributes;
|
||||
}
|
||||
|
||||
getSchema(itemType: string): string {
|
||||
let schema = null;
|
||||
if (this.itemTypes && this.itemTypes[itemType]) schema = this.itemTypes[itemType].schema;
|
||||
if (this.itemTypes[itemType]) schema = this.itemTypes[itemType].schema;
|
||||
return schema;
|
||||
}
|
||||
|
||||
hasViewer(item: IItem) {
|
||||
const itemType: string = item.itemType;
|
||||
if (this.itemTypes && this.itemTypes[itemType]) return this.itemTypes[itemType].viewer !== undefined;
|
||||
if (this.itemTypes[itemType]) return this.itemTypes[itemType].viewer !== undefined;
|
||||
return false;
|
||||
}
|
||||
|
||||
hasEditor(item: IItem) {
|
||||
const itemType: string = item.itemType;
|
||||
if (this.itemTypes && this.itemTypes[itemType]) return this.itemTypes[itemType].editor !== undefined;
|
||||
if (this.itemTypes[itemType]) return this.itemTypes[itemType].editor !== undefined;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1,16 +1,16 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, UrlSegment } from '@angular/router';
|
||||
import { RouterModule, UrlSegment, ExtraOptions } from '@angular/router';
|
||||
|
||||
import { AuthGuard, FullScreenGuard } from '@farmmaps/common';
|
||||
//import { MapComponent } from '@farmmaps/common-map';
|
||||
//import { Switch2D3DComponent } from '@farmmaps/common-map3d';
|
||||
import { NotImplementedComponent } from '@farmmaps/common';
|
||||
import { NavBarGuard } from 'projects/common/src/public-api';
|
||||
import { LandingpageComponent } from './landingpage/landingpage.component';
|
||||
import { LogoComponent } from './logo/logo.component';
|
||||
import { MenuComponent } from './menu/menu.component';
|
||||
import { RegisterDeviceComponent } from './registerdevice/registerdevice.component';
|
||||
import { NotImplementedComponent } from '@farmmaps/common';
|
||||
import { NavBarGuard } from 'projects/common/src/public-api';
|
||||
import { TestComponent } from './test/test.component';
|
||||
import { LandingpageComponent } from './landingpage/landingpage.component';
|
||||
|
||||
export function urlMatcher(url: UrlSegment[]) {
|
||||
return { consumed: url };
|
||||
|
@ -1,27 +1,28 @@
|
||||
import {
|
||||
APP_BOOTSTRAP_LISTENER,
|
||||
Inject,
|
||||
InjectionToken,
|
||||
NgModule,
|
||||
Type,
|
||||
Inject,
|
||||
APP_BOOTSTRAP_LISTENER,
|
||||
InjectionToken, Type,
|
||||
} from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
|
||||
import { AppCommonModule, AppCommonServiceModule, AuthConfigFactory, FM_COMMON_STARTPAGE } from '@farmmaps/common';
|
||||
import { AppCommonModule,AppCommonServiceModule,AuthConfigFactory,FM_COMMON_STARTPAGE } from '@farmmaps/common';
|
||||
|
||||
import { AppRootComponent } from './app.component';
|
||||
import {AppRootComponent} from './app.component';
|
||||
|
||||
import { EffectSources, EffectsModule } from '@ngrx/effects';
|
||||
import { StoreRouterConnectingModule, routerReducer } from '@ngrx/router-store';
|
||||
import { ActionReducer, MetaReducer, StoreModule } from '@ngrx/store';
|
||||
import {StoreModule, ActionReducer,MetaReducer} from '@ngrx/store';
|
||||
import {EffectsModule, EffectSources} from '@ngrx/effects';
|
||||
import { StoreRouterConnectingModule,routerReducer} from '@ngrx/router-store';
|
||||
|
||||
import { AppRoutingModule } from './app-routing.module';
|
||||
import { Id4AuthconfigFactory } from './id4AuthconfigFactory';
|
||||
import { LandingpageComponent } from './landingpage/landingpage.component';
|
||||
import {AppRoutingModule} from './app-routing.module';
|
||||
import { LogoComponent } from './logo/logo.component';
|
||||
import { MenuComponent } from './menu/menu.component';
|
||||
import { RegisterDeviceComponent } from './registerdevice/registerdevice.component';
|
||||
import {RegisterDeviceComponent} from './registerdevice/registerdevice.component';
|
||||
import { SecureOAuthStorage} from '@farmmaps/common';
|
||||
import { OAuthStorage } from 'angular-oauth2-oidc';
|
||||
import {Id4AuthconfigFactory} from './id4AuthconfigFactory';
|
||||
import { TestComponent } from './test/test.component';
|
||||
import { LandingpageComponent } from './landingpage/landingpage.component';
|
||||
|
||||
export const BOOTSTRAP_EFFECTS = new InjectionToken('Bootstrap Effects');
|
||||
|
||||
|
@ -1,4 +1,6 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ItemService} from '@farmmaps/common';
|
||||
import { Observable} from 'rxjs';
|
||||
|
||||
@Component({
|
||||
selector: 'app-test',
|
||||
@ -9,7 +11,7 @@ export class LandingpageComponent implements OnInit {
|
||||
|
||||
//public gradientItems:Observable<any[]>
|
||||
|
||||
constructor() {
|
||||
constructor(private itemService$:ItemService) {
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
|
@ -20,7 +20,7 @@ export class TestComponent implements OnInit {
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
onTest() {
|
||||
onTest(Event) {
|
||||
const a = {"unread":"1"}
|
||||
this.store$.dispatch(new commonActions.NotificationEvent(a));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user