From db8003c847b5e3c9185f45a8a94955ac5713f9a5 Mon Sep 17 00:00:00 2001 From: Elblinator Date: Fri, 1 Nov 2024 14:56:21 +0100 Subject: [PATCH 1/3] Fix underline of new paragraphs --- .../amendment-create-wizard.component.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.scss b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.scss index f753416445..ef15fd4d99 100644 --- a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.scss +++ b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.scss @@ -25,6 +25,10 @@ } .paragraph-text { flex: 1; + + .insert { + text-decoration: underline !important; + } } } From 2cf687b41e1a0c950275d25e7f97837e917bfe18 Mon Sep 17 00:00:00 2001 From: Elblinator Date: Fri, 1 Nov 2024 14:56:32 +0100 Subject: [PATCH 2/3] Add line numbers --- .../amendment-create-wizard.component.html | 34 +++++++++++++------ .../amendment-create-wizard.component.ts | 2 +- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.html b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.html index 1e3495d74f..a167a9f1c1 100644 --- a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.html +++ b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.html @@ -68,16 +68,30 @@

{{ 'New amendment' | translate }}

}
- @if (paragraph.lineFrom >= paragraph.lineTo) { - - {{ 'Line' | translate }} {{ paragraph.lineFrom }}: - - } - @if (paragraph.lineFrom < paragraph.lineTo) { - - {{ 'Line' | translate }} {{ paragraph.lineFrom }} - - {{ paragraph.lineTo }}: - + @if (isAmendmentOfAmendment) { + @if (diffedParagraphs[i].lineFrom >= diffedParagraphs[i].lineTo) { + + {{ 'Line' | translate }} {{ diffedParagraphs[i].lineFrom }}: + + } + @if (diffedParagraphs[i].lineFrom < diffedParagraphs[i].lineTo) { + + {{ 'Line' | translate }} {{ diffedParagraphs[i].lineFrom }} - + {{ diffedParagraphs[i].lineTo }}: + + } + } @else { + @if (paragraph.lineFrom >= paragraph.lineTo) { + + {{ 'Line' | translate }} {{ paragraph.lineFrom }}: + + } + @if (paragraph.lineFrom < paragraph.lineTo) { + + {{ 'Line' | translate }} {{ paragraph.lineFrom }} - + {{ paragraph.lineTo }}: + + } }
diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.ts b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.ts index 7d14f84fff..c7f0e6b060 100644 --- a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.ts +++ b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.ts @@ -46,7 +46,7 @@ export class AmendmentCreateWizardComponent extends BaseMeetingComponent impleme /** * determine if we are in the amendment of amendment mode */ - private isAmendmentOfAmendment = false; + public isAmendmentOfAmendment = false; /** * Change recommendation content. From a306a250cdbc74d29111e45d238b681f6af8650a Mon Sep 17 00:00:00 2001 From: Elblinator Date: Thu, 7 Nov 2024 10:51:15 +0100 Subject: [PATCH 3/3] Use @let --- .../amendment-create-wizard.component.html | 38 +++++++------------ 1 file changed, 14 insertions(+), 24 deletions(-) diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.html b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.html index a167a9f1c1..b716d9a1fd 100644 --- a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.html +++ b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.html @@ -68,30 +68,20 @@

{{ 'New amendment' | translate }}

}
- @if (isAmendmentOfAmendment) { - @if (diffedParagraphs[i].lineFrom >= diffedParagraphs[i].lineTo) { - - {{ 'Line' | translate }} {{ diffedParagraphs[i].lineFrom }}: - - } - @if (diffedParagraphs[i].lineFrom < diffedParagraphs[i].lineTo) { - - {{ 'Line' | translate }} {{ diffedParagraphs[i].lineFrom }} - - {{ diffedParagraphs[i].lineTo }}: - - } - } @else { - @if (paragraph.lineFrom >= paragraph.lineTo) { - - {{ 'Line' | translate }} {{ paragraph.lineFrom }}: - - } - @if (paragraph.lineFrom < paragraph.lineTo) { - - {{ 'Line' | translate }} {{ paragraph.lineFrom }} - - {{ paragraph.lineTo }}: - - } + @let currentParagraphLineFrom = + isAmendmentOfAmendment ? diffedParagraphs[i].lineFrom : paragraph.lineFrom; + @let currentParagraphLineTo = + isAmendmentOfAmendment ? diffedParagraphs[i].lineTo : paragraph.lineTo; + @if (currentParagraphLineFrom >= currentParagraphLineTo) { + + {{ 'Line' | translate }} {{ currentParagraphLineFrom }}: + + } + @if (currentParagraphLineFrom < currentParagraphLineTo) { + + {{ 'Line' | translate }} {{ currentParagraphLineFrom }} - + {{ currentParagraphLineTo }}: + }