Implement select_as_mapitem
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:
parent
e8493ef0bd
commit
7a27df60c2
12
package-lock.json
generated
12
package-lock.json
generated
@ -3477,9 +3477,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@farmmaps/common": {
|
"@farmmaps/common": {
|
||||||
"version": "0.0.1-prerelease.180",
|
"version": "0.0.1-prerelease.183",
|
||||||
"resolved": "https://repository.akkerweb.nl/repository/npm-group/@farmmaps/common/-/common-0.0.1-prerelease.180.tgz",
|
"resolved": "https://repository.akkerweb.nl/repository/npm-group/@farmmaps/common/-/common-0.0.1-prerelease.183.tgz",
|
||||||
"integrity": "sha512-CUojHUj+QR+N1+cBELqArqctCf6CklWKyHQ5QF0mutX9cHdUeWHF9bwzPlvatAqHCNogPJh62/r1oerq1ELoQw==",
|
"integrity": "sha512-/M4HffRHRKCRzkU9BJmxhfdDybKrKcWoD3NbofGEShcfGy9TPyeEdnrzb/RuWVNe3EWcpjz1xCuUsOIslxlFqg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"angular-oauth2-oidc": "^8.0.2",
|
"angular-oauth2-oidc": "^8.0.2",
|
||||||
"ngx-uploadx": "^3.3.2",
|
"ngx-uploadx": "^3.3.2",
|
||||||
@ -3487,9 +3487,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@farmmaps/common-map": {
|
"@farmmaps/common-map": {
|
||||||
"version": "0.0.1-prerelease.180",
|
"version": "0.0.1-prerelease.183",
|
||||||
"resolved": "https://repository.akkerweb.nl/repository/npm-group/@farmmaps/common-map/-/common-map-0.0.1-prerelease.180.tgz",
|
"resolved": "https://repository.akkerweb.nl/repository/npm-group/@farmmaps/common-map/-/common-map-0.0.1-prerelease.183.tgz",
|
||||||
"integrity": "sha512-w2kDYiAf/cCbLdeBf24zSWzwPinjtAz2/tIsQm+vStGHICEDmj4eHkAphJuEefe0KIbu91N7pNcCc9ttI9ZOpQ==",
|
"integrity": "sha512-wRkXnpjvEInRbZL642GBCpgNuFMY8r1uoObftGbDHHL/t5CnWkF/F5cWA3kn+qSKvIeHqy6xshQnEo9SKK8lXA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"ngx-openlayers": "1.0.0-next.13",
|
"ngx-openlayers": "1.0.0-next.13",
|
||||||
"ol": "6.1.1",
|
"ol": "6.1.1",
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
"@angular/platform-browser-dynamic": "~8.2.14",
|
"@angular/platform-browser-dynamic": "~8.2.14",
|
||||||
"@angular/router": "~8.2.14",
|
"@angular/router": "~8.2.14",
|
||||||
"@aspnet/signalr": "^1.1.4",
|
"@aspnet/signalr": "^1.1.4",
|
||||||
"@farmmaps/common": ">=0.0.1-prerelease.180 <0.0.1",
|
"@farmmaps/common": ">=0.0.1-prerelease.183 <0.0.1",
|
||||||
"@farmmaps/common-map": ">=0.0.1-prerelease.180 <0.0.1",
|
"@farmmaps/common-map": ">=0.0.1-prerelease.183 <0.0.1",
|
||||||
"@ng-bootstrap/ng-bootstrap": "^4.2.1",
|
"@ng-bootstrap/ng-bootstrap": "^4.2.1",
|
||||||
"@ngrx/effects": "^8.6.0",
|
"@ngrx/effects": "^8.6.0",
|
||||||
"@ngrx/router-store": "^8.6.0",
|
"@ngrx/router-store": "^8.6.0",
|
||||||
|
@ -13,6 +13,8 @@ import { UserService } from '../services/user.service';
|
|||||||
import { IItemTypes } from '../models/item.types';
|
import { IItemTypes } from '../models/item.types';
|
||||||
import { IListItem } from '../models/list.item';
|
import { IListItem } from '../models/list.item';
|
||||||
import { IUser } from '../models/user';
|
import { IUser } from '../models/user';
|
||||||
|
import {IQueryState} from '../models/query.state';
|
||||||
|
import {StateSerializerService} from '../services/state-serializer.service';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class AppCommonEffects {
|
export class AppCommonEffects {
|
||||||
@ -101,7 +103,24 @@ export class AppCommonEffects {
|
|||||||
var a = action as appCommonActions.EditItem;
|
var a = action as appCommonActions.EditItem;
|
||||||
var itemType = itemtypes[a.item.itemType];
|
var itemType = itemtypes[a.item.itemType];
|
||||||
var viewer = itemType.viewer;
|
var viewer = itemType.viewer;
|
||||||
|
if(viewer == 'select_as_mapitem') {
|
||||||
|
let queryState = {
|
||||||
|
itemCode: a.item.code,
|
||||||
|
parentCode: null,
|
||||||
|
level: 1,
|
||||||
|
itemType: null,
|
||||||
|
bboxFilter: false,
|
||||||
|
query: null,
|
||||||
|
tags: null,
|
||||||
|
endDate: null,
|
||||||
|
startDate: null,
|
||||||
|
bbox: []
|
||||||
|
};
|
||||||
|
let query = this.stateSerializerService$.serialize(queryState);
|
||||||
|
this.router$.navigate(['/map', query ])
|
||||||
|
} else {
|
||||||
this.router$.navigate(['/viewer', viewer, 'item', a.item.code])
|
this.router$.navigate(['/viewer', viewer, 'item', a.item.code])
|
||||||
|
}
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
@ -116,7 +135,7 @@ export class AppCommonEffects {
|
|||||||
return null;
|
return null;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
constructor(private actions$: Actions, private store$: Store<appCommonReducers.State>, private oauthService$: OAuthService, private itemService$: ItemService, private folderService$:FolderService, private userService$: UserService, private router$: Router) {
|
constructor(private actions$: Actions, private store$: Store<appCommonReducers.State>, private oauthService$: OAuthService, private itemService$: ItemService, private folderService$:FolderService, private userService$: UserService, private router$: Router, private stateSerializerService$:StateSerializerService) {
|
||||||
store$.dispatch(new appCommonActions.LoadItemTypes());
|
store$.dispatch(new appCommonActions.LoadItemTypes());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {Router} from '@angular/router';
|
import {Router} from '@angular/router';
|
||||||
import {mapReducers,StateSerializerService} from '@farmmaps/common-map';
|
import {mapReducers} from '@farmmaps/common-map';
|
||||||
|
import {StateSerializerService} from '@farmmaps/common';
|
||||||
import { tassign } from 'tassign';
|
import { tassign } from 'tassign';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
Loading…
Reference in New Issue
Block a user