Skip to content

Commit

Permalink
Develop (#168)
Browse files Browse the repository at this point in the history
* Bump commons-csv from 1.9.0 to 1.10.0 in /api

Bumps [commons-csv](https://github.com/apache/commons-csv) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/apache/commons-csv/releases)
- [Changelog](https://github.com/apache/commons-csv/blob/master/RELEASE-NOTES.txt)
- [Commits](apache/commons-csv@rel/commons-csv-1.9.0...rel/commons-csv-1.10.0)

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-csv
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* commons-csv returning different error code

* Added new CHangelog template, still needs content update from current state of main:

At least these things, I think:
SNOMED-496 .. DONE
SNOMED-475 .. DONE
SNOMED-470 .. DONE / On Develop branch / finished
SNOMED-408 .. DONE / On Develop branch / finished
SNOMED-405
SNOMED-489 Select all .. DONE

* error messages changed in lib

* Bump aws-mysql-jdbc from 1.1.2 to 1.1.4

Bumps [aws-mysql-jdbc](https://github.com/awslabs/aws-mysql-jdbc) from 1.1.2 to 1.1.4.
- [Release notes](https://github.com/awslabs/aws-mysql-jdbc/releases)
- [Changelog](https://github.com/awslabs/aws-mysql-jdbc/blob/main/CHANGELOG.md)
- [Commits](awslabs/aws-mysql-jdbc@1.1.2...1.1.4)

---
updated-dependencies:
- dependency-name: software.aws.rds:aws-mysql-jdbc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* adding some detail to changelog

* Bump hashicorp/aws from 4.58.0 to 4.59.0 in /terraform

Bumps [hashicorp/aws](https://github.com/hashicorp/terraform-provider-aws) from 4.58.0 to 4.59.0.
- [Release notes](https://github.com/hashicorp/terraform-provider-aws/releases)
- [Changelog](https://github.com/hashicorp/terraform-provider-aws/blob/main/CHANGELOG.md)
- [Commits](hashicorp/terraform-provider-aws@v4.58.0...v4.59.0)

---
updated-dependencies:
- dependency-name: hashicorp/aws
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump sentry.version from 6.15.0 to 6.16.0

Bumps `sentry.version` from 6.15.0 to 6.16.0.

Updates `sentry-spring-boot-starter` from 6.15.0 to 6.16.0
- [Release notes](https://github.com/getsentry/sentry-java/releases)
- [Changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md)
- [Commits](getsentry/sentry-java@6.15.0...6.16.0)

Updates `sentry-logback` from 6.15.0 to 6.16.0
- [Release notes](https://github.com/getsentry/sentry-java/releases)
- [Changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md)
- [Commits](getsentry/sentry-java@6.15.0...6.16.0)

---
updated-dependencies:
- dependency-name: io.sentry:sentry-spring-boot-starter
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.sentry:sentry-logback
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump maven-help-plugin from 3.3.0 to 3.4.0

Bumps [maven-help-plugin](https://github.com/apache/maven-help-plugin) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/apache/maven-help-plugin/releases)
- [Commits](apache/maven-help-plugin@maven-help-plugin-3.3.0...maven-help-plugin-3.4.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-help-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* include test fixture

* store failed lookups in session storage so they aren't repeated (clogs up the console and is added network traffic)

* Bump spring-boot-starter-parent from 2.6.14 to 3.0.5 in /api

Bumps [spring-boot-starter-parent](https://github.com/spring-projects/spring-boot) from 2.6.14 to 3.0.5.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](spring-projects/spring-boot@v2.6.14...v3.0.5)

---
updated-dependencies:
- dependency-name: org.springframework.boot:spring-boot-starter-parent
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* now exporting additional source columns

* fix dependency issue

* Revert "Bump spring-boot-starter-parent from 2.6.14 to 3.0.5 in /api"

This reverts commit cad7279.

* Revert "fix dependency issue"

This reverts commit 4912e70.

* resolving trivy issue

* this is required to complete the java upgrade when deploy is run in azure

* implementing extended export

* fixing tsv test

* fixing csv test

* fix csv test file

* fix up tsv file

* debug

* fixing xlsx test

* reverting to original format in case it makes a difference

* testing line feed issues

* lf changes?

* new file

* tests need work

* revert to previous BOM code

* fix typo

* updated changelog

* adding dual map mode

* Source set CodeSystem URI and ValueSet URI

* hide FHIR URI config by default

* tidy

* merged mapview for dual mapping.  yet to be fully tested

* add reconcile task

* add reconcile task (first stage, yet to implement in api)
remove child/master MapRow approach
add in code to handle movement of dual map rows into reconcile state / mapped state after dual map completed

* further implementing reconcile

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* fixing tests - dual map mode is mandatory

* merging in non-blaze functionality from blaze branch

* add missing rowid and put in a temporary hack to get things kinda working as the siblingRowAuthor is preventing rows from returning if there isn't one

* include dual map queries

* fix introduced mistake

* fix tests complaining about missing blind map flag

* getting tests working for now, revisit this mysql issue later

* fix date issue in tests

* remove not null restrictions on the audit tables for the new columns

* changes to get tests working .. still need to revisit

* update query suitable for mysql

* revert query to original form to get build working .. the (select * from map_row) doesn't seem to be compatible

* keep UI tests happy

* further fixes for UI tests

* trialing removal of #dualMapMode

* add reconcile tab

* trialing ngDefaultControl

* trivy fixes

* fix up miscopy of fixed version

* further version changes required to make trivy happy

* making queries work with mysql in dev environment (fingers crossed)

* fix typo

* blindmapflag logic is in the view

* fix up equivalent logic

* allow same target code to be used twice in dual mapping

* make dual mapping work for same concept in the details view

* don't show review tab unless in dual map mode

* only add reconcile column if in dual map mode
reconcile is only a task type if in dual map mode

* colour task in drop down list

* prevent multiple reconciler columns

* further changes necessary to support reconciler column

* make reconcile task table show rows

* always display map type (not just hidden behind edit button)

* fix tests

* implement default sorting for dual map view
implement sorting for dbmapview

* fix up available status choices in reconcile task

* fix up icon for reconcile

* sort reconcile task table

* remove annoying console log

* add reconcile task type

* adding in translations for dual / single map mode indicator on table screens

* make query do a left outer join so we can see rows even when there is no second author yet

* reinstate sibiling row author now that left outer join is working again

* fix note delete tooltip

* fix typo

* fleshing out reconcile task

* use nativeQuery to write a query to get around both mysql and hibernate quirks / incompatibilities

* sourceIndex was incorrect, is actually source id but that is not available from MapView

* missed translation from earlier commit

* id needs to come from the api, only have index locally

* fix tests

* fix issue that prevents user bubble from showing up for both entries

* finishing off reconcile task

* fix the tab that activates when a reconcile task is created

* fix limiting of author task to 2

* further fixes for the reconcile task creation / delete / update

* reviewed

* fix view so it doesn't join different maps together

* prevent "unmapped | draft | mapped | in review .." showing up when the second dual map is put into mapped mode

* remove full stops, added automatically

* upgrade mockserver

* removing entry as upgraded mock-server

* work around trivy issue with guava until mock-server updates dependency

* - create a note on each row to keep track of the dual mapper
- merge notes
- merge targets on reconcile

* fix issue where selecting no map in a dual map reconcile would not do anything due to a server side error complaining about the map row target not being found

* category for system notes
some changes to get table editing of reconcile working better

* fixing tests

* Test commit

* make map copy work for dual maps

* further changes to handle reconcile in the table

* prevent editing of reconcile table

* fix typo

* don't disable checkbox in details view

* bump version in hopes of a trivvy resolution

* don't go into mapped state if problem exist in reconcile

* fix status message logic .. was returning too early

* changing due to drop being prevented in the table

* change code to deal with reconcile state

* create a lastAuthor for a MapRowTarget so we can keep track of each target .. before the only mechanism was on the maprow which was overwritten as soon a change to any MapRowTarget was made.

* remove debug logs

* fix tests

* add missing migration

* initial commit.  Discussion to be held with how to handle the workflow of displaying / accepting replacement and if what is proposed is enough.

* getting versions up to date on develop branch

* updates to fix trivy issues

* trivy issues

* updating hapi version to get rid of okio and its trivy issue

* updating hapi version to get rid of okio and its trivy issue

* fix merge problems

* fix expected test output and copy-paste error

* implement in details view. makes sure concept is active and in scope

* sort entries in a rolegroup

* remove update inactives button from view screen

* remove code that didn't end up getting used

* fix tests broken by refactoring

* fix issue due to refactoring

* remove placeholder

* add copyright notice

* add in the dual mapping sql migration files (and move the migration file for this change) as the db migration has already happened in develop for dual mapping

* fix order

* add copyright notices

* set a default because it is the easiest way to deal with the confusion of develop having migrations from a branch that is yet to be merged to the develop branch

* change file name after adding an extra dual mapping migration

* renamed

* format and return cards to their original order

* remove code tidy as it introduced an error where selection is only possible if the row has a target

* change to formControlGroup to keep tests happy

* disable the ability to import into a dual map

* make export work for dual mapping

* make oos count update when table view contents altered.
make oos count update when entries removed from detailed view

* make sort work again for view / author / reconcile

* don't show import warning message in dual mode where you can't import a file

* update copyright date displayed in app

* fixing up sort and filter so it works for the view and map_row

* api support for new version of a dual map

* new version dual map ui changes

* changes to bulk change UI for dual mapping

* missed a required file for bulk change ui

* another missed file

* tweaks to labels

* add reconcile status info message

* info to only show for dual mapping

* tweak following feedback

* after discussion, don't reset reconcile on a new version

* ensure blind targets are not exposed in REVIEW task

* fix missing targets in certain task views

* fix subscription bugs - subscription inside callback; redundant backend requests

* remove temporary logging change from April 2022

* remove circle as looks like a radio button and not overly useful in this context anyway

* bulk change / maintenance through reconcile / prevent export of deleted comments

* fix builder issues with null

* make bulk updates work for rows in reconcile state from dual mapping

* fix up issues with selecting custom ECL

* fix issue where one author selecting no map would remove the mapping the other author had done

* add userguide link in footer

* add translate capability to test

* clear the error message in the details screen on a details screen close or next/previous

* add in HttpClientTestingModule import

* change over to the translation

* fixing issues raised by SI testing

* Fix problem with creating new version of the map where if one reconcile row was blank, it would result in the other reconcile row being duplicated

* prevent reviewer from getting inactive suggestions and point them in the right direction

* fix logic changes to allow for sibling rows to have the no map flag or target

* cater for case where two targets get moved into the same relationship

* properly fix two issues that were previously "fixed" but has introduced futher errors

* code cleanup

* stop next skipping a row in reconcile after placing a row into the mapped state

* fixing issues:
prevent edit and drag in reconcile task after changed into mapping status
only check for duplicated target if target is not null

* adding info

* Bump hashicorp/aws from 4.58.0 to 5.23.1 in /terraform

Bumps [hashicorp/aws](https://github.com/hashicorp/terraform-provider-aws) from 4.58.0 to 5.23.1.
- [Release notes](https://github.com/hashicorp/terraform-provider-aws/releases)
- [Changelog](https://github.com/hashicorp/terraform-provider-aws/blob/main/CHANGELOG.md)
- [Commits](hashicorp/terraform-provider-aws@v4.58.0...v5.23.1)

---
updated-dependencies:
- dependency-name: hashicorp/aws
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump com.github.eirslett:frontend-maven-plugin in /ui

Bumps [com.github.eirslett:frontend-maven-plugin](https://github.com/eirslett/frontend-maven-plugin) from 1.12.1 to 1.14.2.
- [Changelog](https://github.com/eirslett/frontend-maven-plugin/blob/master/CHANGELOG.md)
- [Commits](eirslett/frontend-maven-plugin@frontend-plugins-1.12.1...frontend-plugins-1.14.2)

---
updated-dependencies:
- dependency-name: com.github.eirslett:frontend-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump org.yaml:snakeyaml from 2.0 to 2.2 in /ui

Bumps [org.yaml:snakeyaml](https://bitbucket.org/snakeyaml/snakeyaml) from 2.0 to 2.2.
- [Commits](https://bitbucket.org/snakeyaml/snakeyaml/branches/compare/snakeyaml-2.2..snakeyaml-2.0)

---
updated-dependencies:
- dependency-name: org.yaml:snakeyaml
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump org.mariadb.jdbc:mariadb-java-client from 3.1.2 to 3.2.0 in /api

Bumps [org.mariadb.jdbc:mariadb-java-client](https://github.com/mariadb-corporation/mariadb-connector-j) from 3.1.2 to 3.2.0.
- [Release notes](https://github.com/mariadb-corporation/mariadb-connector-j/releases)
- [Changelog](https://github.com/mariadb-corporation/mariadb-connector-j/blob/master/CHANGELOG.md)
- [Commits](mariadb-corporation/mariadb-connector-j@3.1.2...3.2.0)

---
updated-dependencies:
- dependency-name: org.mariadb.jdbc:mariadb-java-client
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Merge branch 'develop' into feature/SNOMED-4-dual-authoring-process

* Revert "Merge branch 'develop' into feature/SNOMED-4-dual-authoring-process"

This reverts commit f1c4aeb.

* Bump sentry.version from 6.16.0 to 6.32.0 in /api

Bumps `sentry.version` from 6.16.0 to 6.32.0.

Updates `io.sentry:sentry-spring-boot-starter` from 6.16.0 to 6.32.0
- [Release notes](https://github.com/getsentry/sentry-java/releases)
- [Changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md)
- [Commits](getsentry/sentry-java@6.16.0...6.32.0)

Updates `io.sentry:sentry-logback` from 6.16.0 to 6.32.0
- [Release notes](https://github.com/getsentry/sentry-java/releases)
- [Changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md)
- [Commits](getsentry/sentry-java@6.16.0...6.32.0)

---
updated-dependencies:
- dependency-name: io.sentry:sentry-spring-boot-starter
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: io.sentry:sentry-logback
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump org.springframework.security:spring-security-core in /api

Bumps [org.springframework.security:spring-security-core](https://github.com/spring-projects/spring-security) from 6.0.5 to 6.1.5.
- [Release notes](https://github.com/spring-projects/spring-security/releases)
- [Changelog](https://github.com/spring-projects/spring-security/blob/main/RELEASE.adoc)
- [Commits](spring-projects/spring-security@6.0.5...6.1.5)

---
updated-dependencies:
- dependency-name: org.springframework.security:spring-security-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump com.google.guava:guava from 32.1.1-jre to 32.1.3-jre in /api

Bumps [com.google.guava:guava](https://github.com/google/guava) from 32.1.1-jre to 32.1.3-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump org.apache.maven.plugins:maven-resources-plugin from 3.3.0 to 3.3.1

Bumps [org.apache.maven.plugins:maven-resources-plugin](https://github.com/apache/maven-resources-plugin) from 3.3.0 to 3.3.1.
- [Release notes](https://github.com/apache/maven-resources-plugin/releases)
- [Commits](apache/maven-resources-plugin@maven-resources-plugin-3.3.0...maven-resources-plugin-3.3.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-resources-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump software.aws.rds:aws-mysql-jdbc from 1.1.4 to 1.1.10

Bumps [software.aws.rds:aws-mysql-jdbc](https://github.com/awslabs/aws-mysql-jdbc) from 1.1.4 to 1.1.10.
- [Release notes](https://github.com/awslabs/aws-mysql-jdbc/releases)
- [Changelog](https://github.com/awslabs/aws-mysql-jdbc/blob/main/CHANGELOG.md)
- [Commits](awslabs/aws-mysql-jdbc@1.1.4...1.1.10)

---
updated-dependencies:
- dependency-name: software.aws.rds:aws-mysql-jdbc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* terraform commands failing in azure .. rolling back version of hashicorp/aws

* fix issue with select all not working for bulk dual mapping resets

* fix issues with bulk data dialog ..
 1) make the right statues show up for dual maps (view table)
 2) don't allow reset in table view, should be the normal dialog

* refresh out of scope count on map version change

* Set DB log level to info by default

* include mapid in the view

* less calls to refresh page

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Deanne Ukovich <[email protected]>
Co-authored-by: Michael Lawley <[email protected]>
Co-authored-by: Attila Edelenyi <[email protected]>
  • Loading branch information
5 people authored Nov 16, 2023
1 parent 9f420fa commit 0364b4b
Show file tree
Hide file tree
Showing 9 changed files with 83 additions and 17 deletions.
4 changes: 4 additions & 0 deletions api/src/main/java/org/snomed/snap2snomed/model/DbMapView.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.snomed.snap2snomed.model;


import org.hibernate.annotations.Fetch;
import org.hibernate.annotations.FetchMode;
import org.hibernate.annotations.Immutable;
Expand Down Expand Up @@ -28,6 +29,9 @@ public class DbMapView implements Serializable {
@Column
private String mapRowId;

@Column
private Long mapId;

@Column
private MapStatus status;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ protected JPAQuery<MappedRowDetailsDto> getQueryMappedRowDetailsForMap(Long mapI
}

private BooleanExpression getMapViewWhereClause(Long mapId, Task task, MapViewFilter filter) {
BooleanExpression whereClause = mapView.mapRow.map.id.eq(mapId);
BooleanExpression whereClause = mapView.mapId.eq(mapId);//mapView.mapRow.map.id.eq(mapId);

if (filter != null) {
final BooleanExpression filterExpression = filter.getExpression(true);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Copyright © 2023 SNOMED International
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

CREATE OR REPLACE VIEW map_view AS
SELECT UUID() as 'id', map_row.id AS map_row_id, map_row.map_id, status, blind_map_flag, null as sibling_row_author_task_id
FROM map_row, map, project
WHERE map_row.blind_map_flag = false
AND map_row.map_id = map.id
AND map.project_id = project.id
AND project.dual_map_mode = 1
UNION
SELECT UUID() as 'id', mr1.id AS map_row_id, mr1.map_id, (CASE WHEN mr1.status != mr2.status THEN '1' ELSE mr1.status END), mr1.blind_map_flag, mr2.author_task_id
FROM map_row mr1, map_row mr2, map, project
WHERE mr1.source_code_id = mr2.source_code_id
AND mr1.id < mr2.id
and mr1.map_id = mr2.map_id
AND mr1.blind_map_flag = true
AND mr1.map_id = map.id
AND map.project_id = project.id
AND project.dual_map_mode = 1;
2 changes: 1 addition & 1 deletion terraform/api/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ locals {
api_ecs_environment = [
{
name = "logging.level.org.hibernate.SQL"
value = "DEBUG"
value = var.db_log_level
},
{
name = "spring.datasource.url"
Expand Down
5 changes: 5 additions & 0 deletions terraform/api/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -196,3 +196,8 @@ variable "force_dex_deployment" {
description = "Force DEX ECS service redeployment"
type = bool
}

variable "db_log_level" {
description = "Database log level"
type = string
}
1 change: 1 addition & 0 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ module "api" {
database_backup_retention_period = var.database_backup_retention_period
jumpbox_ami_id = var.jumpbox_ami_id
identity_provider = var.identity_provider
db_log_level = var.db_log_level
}

module "ui" {
Expand Down
5 changes: 5 additions & 0 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -274,3 +274,8 @@ variable "loki_url" {
type = string
sensitive = true
}

variable "db_log_level" {
type = string
default = "INFO"
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export class MappingDetailsCardComponent {
ngOnChanges(changes: SimpleChanges): void {
if (changes.mapping?.currentValue && !changes.mapping?.isFirstChange()) {
this.mapping = changes.mapping.currentValue;
this.updateNumOutOfScopeTargets();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import {
} from '../../_models/map_row';
import {TranslateService} from '@ngx-translate/core';
import {MapService} from '../../_services/map.service';
import {debounceTime, distinctUntilChanged, tap} from 'rxjs/operators';
import {debounceTime, startWith, tap} from 'rxjs/operators';
import {merge, Subscription} from 'rxjs';
import {MatSort} from '@angular/material/sort';
import {Task, TaskType} from '../../_models/task';
Expand Down Expand Up @@ -321,16 +321,22 @@ export class MappingViewComponent implements OnInit, AfterViewInit, OnDestroy {
} else {
this.translate.get('ERROR.LOAD_MAP').subscribe((msg) => this.error = msg);
}
}));

this.subscription.add(this.route.queryParams.subscribe(qparams => {
this.filterEntity = ServiceUtils.paramsToFilterEntity(qparams);
if (this.filterEntity.hasFilters()) {
this._filterEnabled = true;
}
this.filterParams = ServiceUtils.filtersToParam(this.filterEntity);
this.paging = ServiceUtils.pagingParamsToMapViewPaging(qparams);
this.refreshPage();
}));

this.subscription.add(this.route.queryParams
.subscribe(qparams => {
// subscription emits a value immediately .. ignore if empty
// note that you can't simply ignore the first value here as it may be a page refresh and the
// value may be the selected filters
if (Object.keys(qparams).length > 0) {
this.filterEntity = ServiceUtils.paramsToFilterEntity(qparams);
if (this.filterEntity.hasFilters()) {
this._filterEnabled = true;
}
this.filterParams = ServiceUtils.filtersToParam(this.filterEntity);
this.paging = ServiceUtils.pagingParamsToMapViewPaging(qparams);
this.refreshPage();
}
}));
}

Expand Down Expand Up @@ -556,11 +562,20 @@ export class MappingViewComponent implements OnInit, AfterViewInit, OnDestroy {

loadTaskList(): void {
const self = this;
this.subscription.add(self.store.select(selectTaskList).pipe(debounceTime(200)).subscribe(
this.subscription.add(self.store.select(selectTaskList).pipe(startWith(null), debounceTime(200)).subscribe(
data => {
this.refreshPage();
self.myTasks = data.filter(task => task.assignee?.id === self.currentUser?.id)
.sort((a, b) => AssignedWorkComponent.sortTasks(a, b));
if (data) { // cannot ignore empty lists here as it could indicate all tasks being removed

const newTasks = data.filter(task => task.assignee?.id === self.currentUser?.id)
.sort((a, b) => AssignedWorkComponent.sortTasks(a, b));
// TODO this equals checking is not working due to a slight time difference in times reported
// it would remove unnecessry calls to refreshpage and improve responsiveness
// if it could be fixed
if (JSON.stringify(self.myTasks) !== JSON.stringify(newTasks)) {
self.myTasks = newTasks;
this.refreshPage();
}
}
},
(error) => self.translate.get('TASK.FAILED_TO_LOAD_TASKS').subscribe((err) => {
self.error.message = err;
Expand All @@ -576,6 +591,7 @@ export class MappingViewComponent implements OnInit, AfterViewInit, OnDestroy {
this.constantFilteredColumns.push("filter-assignedReconciler");
this.constantHideShowColumns.push("assignedReconciler");
this.constantColumns.push({columnId: 'assignedReconciler', columnDisplay: 'TABLE.RECONCILER', displayed: true});
this.refreshPage();
}

}
Expand Down Expand Up @@ -769,6 +785,7 @@ export class MappingViewComponent implements OnInit, AfterViewInit, OnDestroy {
refreshTable($event: string): void {
if (this.mapping_id) {
// this.store.dispatch(new LoadMapping({id: this.mapping_id}));
console.log("refresh table");
this.refreshPage();
}
}
Expand Down

0 comments on commit 0364b4b

Please sign in to comment.