Commit 8967b393 authored by Christopher Keim's avatar Christopher Keim
Browse files

[TOB-241,38,20,62,396,397,399,400,73,458,460,425] feat: v1.0.0



[TOB-241] feat: Add configuration page for attachment tags

* Add basic settings routing
* Add back end calls to add tags
* Add component for list of items
* Integrate component into settings page

[TOB-38] feat: Add configuration page for departments

* Add util functions to parse CSV data
* Add back end calls for departments settings
* Add store effect for departments settings
* Add pipes to convert departments data
* Add component to show department table
* Integrate components into settings page

[TOB-20] feat: Add configuration page for text blocks

* Add back end calls for text block config
* Add store effect for text block config
* Add pipe to create select options from array
* Resize text areas after rendering
* Add class for text block configuration form
* Add component to edit text blocks
* Add component to edit text block groups
* Add component to edit select lists
* Integrate components into settings page

[TOB-62] feat: Add configuration page for user

* Add back end calls for user configuration
* Add user table component
* Add user settings form component
* Add pipes to transform and filter user data
* Integrate components into settings page

[TOB-396] feat: Select position on leaflet map only via click

[TOB-397] feat: Add location search for leaflet map

* Add back end calls for Nominatim search
* Add search bar to leaflet map component
* Reorganize map module as feature module
* Integrate map store into leaflet map component

[TOB-399] feat: Show username of task that is currently claimed

[TOB-400] feat: Show confirm dialog before delete operations

[TOB-73] feat: Add configurable help url

* Add help url to app.config.json
* Use help url in header bar
* Redirect to help url on help route

[TOB-458] refactor: Auto activate search filters on value changes

* Auto activate search filter on value change for statement search
* Auto activate search filter on value change for user search

[TOB-460] feat: Open GIS merely via GET call

[TOB-425] fix: Minor bug fixes

* Fix minor styling issues
* Hide contribution status in task create negative response
Signed-off-by: Christopher Keim's avatarChristopher Keim <keim@develop-group.de>
parent a48ee2af
......@@ -25,6 +25,7 @@ served
* `routes.portal`: Route on which the main portal is served
* `routes.contactDataBase`: Route on which the contact data base
module is served
* `routes.userDocu`: Route on which the user documentation is served
* `leaflet.urlTemplate`: URL template to the map tile server
required by [Leaflet](https://leafletjs.com)
* `leaflet.attribution`: Attribution which is added to all
......
......@@ -18,6 +18,7 @@
"routes": {
"spaBackend": "/statementpaBE",
"portal": "/portalFE",
"contactDataBase": "/contactdatabase"
"contactDataBase": "/contactdatabase",
"userDocu": "./assets/docu/userDocumentation.pdf"
}
}
{
"name": "openkonsequenz-statement-public-affairs",
"version": "0.9.0",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
......@@ -4649,9 +4649,9 @@
}
},
"bl": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/bl/-/bl-4.0.2.tgz",
"integrity": "sha512-j4OH8f6Qg2bGuWfRiltT2HYGx0e1QcBTrK9KAHNMwMZdQnDZFk0ZSYIpADjYCB3U12nicC5tVJwSIhwOWjb4RQ==",
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/bl/-/bl-4.0.3.tgz",
"integrity": "sha512-fs4G6/Hu4/EE+F75J8DuN/0IpQqNjAdC7aEQv7Qt8MHGUH7Ckv2MwTEEeN9QehD0pfIDkMI1bkHYkKy7xHyKIg==",
"dev": true,
"requires": {
"buffer": "^5.5.0",
......@@ -4660,13 +4660,13 @@
},
"dependencies": {
"buffer": {
"version": "5.6.0",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz",
"integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==",
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
"integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
"dev": true,
"requires": {
"base64-js": "^1.0.2",
"ieee754": "^1.1.4"
"base64-js": "^1.3.1",
"ieee754": "^1.1.13"
}
},
"readable-stream": {
......@@ -11789,9 +11789,9 @@
}
},
"node-fetch": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz",
"integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==",
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
"integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==",
"dev": true
},
"node-fetch-npm": {
......@@ -11806,9 +11806,9 @@
}
},
"node-forge": {
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.9.0.tgz",
"integrity": "sha512-7ASaDa3pD+lJ3WvXFsxekJQelBKRpne+GOVbLbtHYdd7pFspyeuJHnWfLplGf3SwKGbfs/aYl5V/JCIaHVUKKQ==",
"version": "0.10.0",
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz",
"integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==",
"dev": true
},
"node-libs-browser": {
......@@ -16121,12 +16121,12 @@
}
},
"selfsigned": {
"version": "1.10.7",
"resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.7.tgz",
"integrity": "sha512-8M3wBCzeWIJnQfl43IKwOmC4H/RAp50S8DF60znzjW5GVqTcSe2vWclt7hmYVPkKPlHWOu5EaWOMZ2Y6W8ZXTA==",
"version": "1.10.8",
"resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.8.tgz",
"integrity": "sha512-2P4PtieJeEwVgTU9QEcwIRDQ/mXJLX8/+I3ur+Pg16nS8oNbrGxEso9NyYWy8NAmXiNl4dlAp5MwoNeCWzON4w==",
"dev": true,
"requires": {
"node-forge": "0.9.0"
"node-forge": "^0.10.0"
}
},
"semver": {
......
{
"name": "openkonsequenz-statement-public-affairs",
"version": "0.9.0",
"version": "1.0.0",
"description": "Statement Public Affairs",
"license": "Eclipse Public License - v 2.0",
"repository": {
......
......@@ -104,7 +104,7 @@ describe("AppRoutingModule", () => {
it("should navigate to /settings", async () => {
const isRoutingSuccessful = await callInZone(() => router.navigate(["settings"]));
expect(isRoutingSuccessful).toBeTruthy();
expect(location.path()).toBe("/settings");
expect(location.path()).toBe("/settings/text-blocks");
});
});
......@@ -13,6 +13,7 @@
import {NgModule} from "@angular/core";
import {PreloadAllModules, RouterModule, Routes} from "@angular/router";
import {RedirectRouteGuard} from "./core";
export const appRoutes: Routes = [
{
......@@ -50,6 +51,14 @@ export const appRoutes: Routes = [
loadChildren: () => import("./features/settings/settings-routing.module")
.then((m) => m.SettingsRoutingModule)
},
{
path: "help",
canActivate: [RedirectRouteGuard],
component: RedirectRouteGuard,
data: {
externalUrl: "help"
}
},
// The wildcard has to be placed as the last item (otherwise, its overriding routes)
{
path: "**",
......
......@@ -11,16 +11,25 @@
* SPDX-License-Identifier: EPL-2.0
********************************************************************************/
/**
* Attachment tags that cannot be set manually. Those are automatically set on specified task steps.
* E.g. attachments tranferred from a mail are automatically assigned the "email" tag.
*/
export enum EAPIStaticAttachmentTagIds {
// Used for the attachment generated from the mail body.
EMAIL_TEXT = "email-text",
// Used for the transferred mail attachments.
EMAIL = "email",
// Used for all attachments that will be send with the generated statement pdf.
OUTBOX = "outbox",
// Used for the attachments uploaded after the statement has been finished.
CONSIDERATION = "consideration",
// Used for the generated statement pdf from text block arrangement.
STATEMENT = "statement",
COVER_LETTER = "cover-letter"
......
......@@ -85,8 +85,9 @@ export class AttachmentsApiService {
* Creates a new tag in the back end data base.
*/
public addNewTag(label: string) {
const params = {label};
const endPoint = `/tags`;
return this.httpClient.put(urlJoin(this.baseUrl, endPoint), {label});
return this.httpClient.put(urlJoin(this.baseUrl, endPoint), {}, {params});
}
}
......@@ -11,6 +11,9 @@
* SPDX-License-Identifier: EPL-2.0
********************************************************************************/
/**
* Interface which represents the model of all basic information of a specific contact.
*/
export interface IAPIContactPerson {
companyId: string;
companyName: string;
......
......@@ -11,6 +11,10 @@
* SPDX-License-Identifier: EPL-2.0
********************************************************************************/
/**
* Interface which represents all data accessible for a specific contact.
* This contains additional values to IAPIContactPerson.
*/
export interface IAPIContactPersonDetails {
community: string;
communitySuffix: string;
......
......@@ -16,7 +16,8 @@ export enum EAPIUserRoles {
ROLE_SPA_ACCESS = "ROLE_SPA_ACCESS",
SPA_APPROVER = "ROLE_SPA_APPROVER",
SPA_OFFICIAL_IN_CHARGE = "ROLE_SPA_OFFICIAL_IN_CHARGE",
SPA_ADMIN = "ROLE_SPA_ADMIN"
SPA_ADMIN = "ROLE_SPA_ADMIN",
SPA_CUSTOMER = "ROLE_SPA_CUSTOMER"
}
export const ALL_NON_TRIVIAL_USER_ROLES = [
......
......@@ -13,6 +13,9 @@
import {EAPIUserRoles} from "./EAPIUserRoles";
/**
* Interface which represents basic information of a specific user.
*/
export interface IAPIUserInfo {
firstName: string;
lastName: string;
......
......@@ -11,6 +11,9 @@
* SPDX-License-Identifier: EPL-2.0
********************************************************************************/
/**
* Interface which represents version information.
*/
export interface IAPIVersion {
buildVersion: string;
applicationName: string;
......
......@@ -11,6 +11,9 @@
* SPDX-License-Identifier: EPL-2.0
********************************************************************************/
/**
* Multiple geo positions as object properties.
*/
export interface IAPIGeographicPositions {
[key: string]: {
x: number;
......
/********************************************************************************
* Copyright (c) 2020 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
********************************************************************************/
/**
* Search result from nominatim server. Includes information about a specific place like coordinates and name/description.
*/
export interface IAPINominatimSearchResult {
place_id: number;
licence: string;
osm_type: string;
osm_id: number;
boundingbox: [string, string, string, string];
lat: string;
lon: string;
display_name: string;
place_rank: number;
category: string;
type: string;
importance: number;
geojson: {
type: string;
coordinates: [
[string, string],
[string, string],
[string, string],
[string, string]
]
};
}
......@@ -15,23 +15,38 @@ import {HttpClient} from "@angular/common/http";
import {Inject, Injectable} from "@angular/core";
import {Observable} from "rxjs";
import {objectToHttpParams, urlJoin} from "../../../util/http";
import {APP_CONFIGURATION, IAppConfiguration} from "../../configuration";
import {SPA_BACKEND_ROUTE} from "../../external-routes";
import {IAPIGeographicPositions} from "./IAPIGeographicPositions";
import {IAPINominatimSearchResult} from "./IAPINominatimSearchResult";
@Injectable({providedIn: "root"})
export class GeoApiService {
public constructor(
protected readonly httpClient: HttpClient,
@Inject(SPA_BACKEND_ROUTE) protected readonly baseUrl: string
@Inject(SPA_BACKEND_ROUTE) protected readonly baseUrl: string,
@Inject(APP_CONFIGURATION) protected readonly configuration: IAppConfiguration
) {
}
/**
* Sends geo positions and input + output format and receives the transformed positions back.
*/
public transform(geographicPositions: IAPIGeographicPositions, from: string, to: string): Observable<IAPIGeographicPositions> {
const params = objectToHttpParams({from, to});
const endPoint = `/geo-coordinate-transform`;
return this.httpClient.post<IAPIGeographicPositions>(urlJoin(this.baseUrl, endPoint), geographicPositions, {params});
}
/**
* Searches for a specific place to retrieve coordinates to display.
*/
public search(searchQuery: string) {
const endPoint = `search`;
const params = objectToHttpParams({q: this.configuration.nominatim.searchQueryPrefix + " " + searchQuery, format: "json"});
return this.httpClient.get<IAPINominatimSearchResult[]>(urlJoin(this.configuration.nominatim.url, endPoint), {params});
}
}
......@@ -12,4 +12,5 @@
********************************************************************************/
export * from "./IAPIGeographicPositions";
export * from "./IAPINominatimSearchResult";
export * from "./geo-api.service";
......@@ -11,6 +11,9 @@
* SPDX-License-Identifier: EPL-2.0
********************************************************************************/
/**
* Interface which represents the model of an email attachment.
*/
export interface IAPIEmailAttachmentModel {
name: string;
size: string;
......
......@@ -13,6 +13,9 @@
import {IAPIEmailAttachmentModel} from "./IAPIEmailAttachmentModel";
/**
* Interface which represents the model of an email. Contains meta data and mail content as text or html.
*/
export interface IAPIEmailModel {
identifier: string;
subject: string;
......
......@@ -11,6 +11,9 @@
* SPDX-License-Identifier: EPL-2.0
********************************************************************************/
/**
* Interface which represents the model of the statement history as saved in the back end database.
*/
export interface IAPIStatementHistory {
processName: string;
processVersion: number;
......@@ -18,6 +21,9 @@ export interface IAPIStatementHistory {
currentProcessActivities: IAPIProcessActivity[];
}
/**
* Interface which represents the model of a single process activity.
*/
export interface IAPIProcessActivity {
id: string;
activityId: string;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment