-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cascading delete #2041
Merged
cascading delete #2041
Changes from 1 commit
Commits
Show all changes
65 commits
Select commit
Hold shift + click to select a range
f7ab6ed
add test cases for cascading delete
sleidig abd5dbb
implement recursive delete of related entities
sleidig 11d1f86
undo for all affected entities
sleidig 0f4c0f6
add entity-schema-field flag for aggregate / composite association ty…
sleidig 11fc6e0
mark some entity types as not hasPII, to exclude them from anonymization
sleidig 6e00719
Update src/app/core/entity/entity-remove.service.spec.ts
sleidig 5eca25f
Merge branch 'master' into anon-3
sleidig 3076004
Update src/app/core/entity/schema/entity-schema-field.ts
sleidig 288720c
make hasPII default "false"
sleidig 58f9920
remove duplicate copy in cascading logic
sleidig 6ae2f4c
reduce un-related changes in this PR
sleidig 0dcf73b
update docs
sleidig c2dac7b
refactor: split entity-remove service into separate parts and create …
sleidig 3c63872
Merge remote-tracking branch 'origin/master' into anon-3
sleidig 4f49897
tests
sleidig eb30ff3
fixed tests to correctly check for status of entity
TheSlimvReal 61a81bb
Update src/app/child-dev-project/schools/model/school.ts
sleidig 2053c9f
clarify explanation comment
sleidig ee9ba6a
feat(*): allow to export only displayed, filtered data (#2059)
brajesh-lab 498387f
feat(*): duplicate records from list views (#2042)
brajesh-lab e18cb08
refactor: lint check for prettier formatting (#2039)
rudresh 995e85b
Merge branch 'master' into anon-3
sleidig b629b4d
fix test side-effects
sleidig 2dc7d88
fix cascading tests
sleidig 8a45a8e
simplify undo test setup
sleidig e651353
popup to warn user if some PII may need manual review
sleidig 1fd139b
fix problems with advance multi-ref cascades
sleidig 641df62
fine tuning from real-life testing
sleidig 5fa37c7
fix prettier
sleidig c085c24
removed unnecessary overrides
TheSlimvReal 474d3b1
Merge branch 'master' into anon-3
sleidig d3553d7
fix undo actions
sleidig 5dfbeed
refactor: remove custom implementation for activities-overview
sleidig 86448de
fix(core): subrecord lists update for external changes in real-time
sleidig 71190b6
Merge branch 'subrecord-update-subscr' into anon-3
sleidig 13e9752
progress dialog while (long-running) delete and anonymize actions are…
sleidig c84bf51
fix(ui): tooltip explaining disabled report calculation button (#2072)
sleidig 025e4fc
fix: panels are only initialized once (#2071)
TheSlimvReal 7f5841b
deps: upgrade multiple dependencies with Snyk (#2070)
sleidig 0fa6b6b
build(deps-dev): bump axios from 1.5.1 to 1.6.1 (#2074)
dependabot[bot] 91999c0
Merge branch 'master' into anon-3
sleidig fe622d0
fix forceOverwrite implementation return value for putAll
sleidig 1712d11
fix tests
sleidig 1cda158
properly anonymize ASER and Todo entities
sleidig 9dc8ff5
only show one toggle for archived todos
sleidig c069b3b
don't display "no active entries" button while still loading
sleidig 8848621
exclude archived participants from roll call
sleidig 5e5947c
display indicator if date partially anonymized
sleidig 8b7447f
simplified anon warning text (a little bit)
sleidig df1ecf2
Merge remote-tracking branch 'origin/master' into anon-3
sleidig 63d4a2b
adapted delete warning text
sleidig 1357bda
Merge branch 'master' into anon-3
sleidig 56c4e41
correct position for code comment
sleidig 3895d38
fix: upgrade keycloak-js from 22.0.4 to 22.0.5 (#2079)
sleidig 7835e87
fix: controls correctly detect edited state (#2076)
TheSlimvReal 843addc
deps: upgrade multiple dependencies with Snyk (#2082)
TheSlimvReal e7c0225
fix: upgrade @sentry/browser from 7.75.0 to 7.75.1 (#2083)
TheSlimvReal 9f37db6
fix: upgrade flag-icons from 6.11.1 to 6.11.2 (#2084)
TheSlimvReal 4e9f6a3
fix(dashboard): attendance weeks only start from Monday
sleidig 2c3691a
fix: notes have attachments
TheSlimvReal 4d20a42
fix: file attachments can be viewed in edit mode also
sleidig 830bc9d
fix(forms): create new dropdown options from popup config window (#2040)
sadaf895 42fc02e
fix: new columns correctly trigger input update (#2085)
TheSlimvReal 9bcfbb0
show inactive for anonymized
sleidig 7b39f5d
Merge branch 'master' into anon-3
sleidig File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
src/app/core/basic-datatypes/date/display-date/display-date.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<ng-container | ||
*ngIf="!(displayAsAnonymized || isPartiallyAnonymized); else anonymized" | ||
> | ||
{{ value | date: config }} | ||
</ng-container> | ||
|
||
<ng-template #anonymized> | ||
{{ value | date: "YYYY" }} | ||
<fa-icon | ||
icon="warning" | ||
matTooltip="This data has been partially anonymized." | ||
i18n-matTooltip | ||
></fa-icon> | ||
</ng-template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 8 additions & 3 deletions
11
src/app/core/basic-datatypes/month/display-month/display-month.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
import { Component } from "@angular/core"; | ||
import { DatePipe } from "@angular/common"; | ||
import { DatePipe, NgIf } from "@angular/common"; | ||
import { ViewDirective } from "../../../entity/default-datatype/view.directive"; | ||
import { DisplayDateComponent } from "../../date/display-date/display-date.component"; | ||
|
||
@Component({ | ||
selector: "app-display-month", | ||
standalone: true, | ||
template: `{{ value | date: "YYYY-MM" }}`, | ||
imports: [DatePipe], | ||
template: `<app-display-date | ||
[value]="value" | ||
[config]="'YYYY-MM'" | ||
[displayAsAnonymized]="isPartiallyAnonymized" | ||
></app-display-date>`, | ||
imports: [DatePipe, NgIf, DisplayDateComponent], | ||
}) | ||
export class DisplayMonthComponent extends ViewDirective<Date> {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
import { Entity } from "../model/entity"; | ||
import { Directive, Input } from "@angular/core"; | ||
import { Directive, Input, OnChanges } from "@angular/core"; | ||
|
||
@Directive() | ||
export abstract class ViewDirective<T, C = any> { | ||
export abstract class ViewDirective<T, C = any> implements OnChanges { | ||
@Input() entity: Entity; | ||
@Input() id: string; | ||
@Input() tooltip: string; | ||
@Input() value: T; | ||
@Input() config: C; | ||
|
||
/** indicating that the value is not in its original state, so that components can explain this to the user */ | ||
isPartiallyAnonymized: boolean; | ||
|
||
ngOnChanges() { | ||
this.isPartiallyAnonymized = | ||
this.entity?.anonymized && | ||
this.entity?.getSchema()?.get(this.id)?.anonymize === "retain-anonymized"; | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit annoying, that both of these properties are necessary. Every component that is also used in templates will have to implement both which is a bit against the idea that they can be used everywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, agreed. I wanted to reuse date-component's template for how month-component is displaying. Unfortunately isPartiallyAnonymized doubling as an
@Input
just gets overwritten ...