Skip to content

Commit

Permalink
add actionpoint validation
Browse files Browse the repository at this point in the history
  • Loading branch information
kcinay055679 committed Jan 28, 2025
1 parent b65441f commit b3a4277
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 28 deletions.
54 changes: 33 additions & 21 deletions frontend/src/app/components/action-plan/action-plan.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
id="action-list"
>
<div
class="action-point-item"
class="container-fluid action-point-item"
*ngFor="let item of getFormControlArray().controls!; index as i; trackBy: trackByFn"
[formGroupName]="i"
cdkDrag
Expand All @@ -23,27 +23,37 @@
alt="Drag indicator"
/>
</div>
<input
#listItem
(keydown.arrowUp)="changeItemPosition(i, i - 1)"
(keydown.arrowDown)="changeItemPosition(i, i + 1)"
class="action-input"
formControlName="item"
[attr.data-testId]="'action-input'"
/>
<button
(keydown.enter)="removeAction(i)"
(click)="removeAction(i)"
class="btn btn-link"
*ngIf="onDelete"
<span class="row">
<input
#listItem
(keydown.arrowUp)="changeItemPosition(i, i - 1)"
(keydown.arrowDown)="changeItemPosition(i, i + 1)"
class="action-input col"
formControlName="item"
[attr.data-testId]="'action-input'"
/>

><img
<button
(keydown.enter)="removeAction(i)"
(click)="removeAction(i)"
class="btn btn-link col-auto"
*ngIf="onDelete"

><img

class="icons bin-icon cursor-pointer focus-outline"
src="assets/icons/delete-icon.svg"
alt="Delete bin"
/>
</button>
</span>

<app-error
[controlPath]="['actionList.'+i, 'item']"
[name]="'Element'"
class="col-12"
></app-error>

class="icons bin-icon cursor-pointer focus-outline"
src="assets/icons/delete-icon.svg"
alt="Delete bin"
/>
</button>
</div>
</div>

Expand All @@ -63,7 +73,9 @@
class="add-cross-button"
id="add-action-icon"
/>
Weitere Action hinzufügen
<ng-content select="add-text">Weitere Action hinzufügen</ng-content>

<ng-content/>

Check failure on line 78 in frontend/src/app/components/action-plan/action-plan.component.html

View workflow job for this annotation

GitHub Actions / frontend

Unexpected self closing tag for ng-content
</span>
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
.action-point-item {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
font-size: 14px;
height: 32px;
}

.cdk-drag-preview {
Expand Down Expand Up @@ -51,8 +46,8 @@
}

.action-input {
width: 100%;
height: 100%;
//width: 100%;
height: 32px;
padding: 0.437rem 0.625rem 0.375rem 0.625rem !important;
}

Expand Down

0 comments on commit b3a4277

Please sign in to comment.