-
Notifications
You must be signed in to change notification settings - Fork 4
[NAE-2412] EnumerationMap, MultichoiceMap with 'caseref' component are editable on unassigned task #330
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
base: release/6.5.0
Are you sure you want to change the base?
[NAE-2412] EnumerationMap, MultichoiceMap with 'caseref' component are editable on unassigned task #330
Changes from all commits
2a31271
6d543ba
4d1a638
2bd1f60
620478e
6aa5158
dd06dcd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| export enum SelectionBehavior { | ||
| EDITABLE, | ||
| VISIBLE, | ||
| HIDDEN | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,7 +1,10 @@ | ||||||||||||||||||||||||||
| <div fxLayout="row" fxFlex="100" fxLayoutAlign="start center" class="netgrif-input netgrif-header-input netgrif-input-fix netgrif-zero-field-wrapper"> | ||||||||||||||||||||||||||
| <mat-checkbox *ngIf="approval && typeApproval === 'multichoice'" [formControl]="approvalFormControl" [indeterminate]="indeterminate" | ||||||||||||||||||||||||||
| (click)="$event.stopPropagation();" color='primary' class="checkbox-padding"></mat-checkbox> | ||||||||||||||||||||||||||
| <mat-icon *ngIf="approval && typeApproval === 'enumeration'" color="warn" (click)="setValue();$event.stopPropagation();" class="checkbox-padding cursor-fix">close</mat-icon> | ||||||||||||||||||||||||||
| <mat-checkbox *ngIf="isInSelectionMode() && typeApproval === 'multichoice'" [formControl]="approvalFormControl" [indeterminate]="indeterminate" | ||||||||||||||||||||||||||
| (click)="$event.stopPropagation();" color='primary' class="checkbox-padding" [disabled]="isSelectionDisabled()"></mat-checkbox> | ||||||||||||||||||||||||||
| <button *ngIf="isInSelectionMode() && typeApproval === 'enumeration'" mat-icon-button type="button" aria-label="Clear selected" | ||||||||||||||||||||||||||
| class="checkbox-padding cursor-fix" [disabled]="isSelectionDisabled()" (click)="setValue(); $event.stopPropagation();" [disableRipple]="true"> | ||||||||||||||||||||||||||
| <mat-icon color="warn">close</mat-icon> | ||||||||||||||||||||||||||
| </button> | ||||||||||||||||||||||||||
|
Comment on lines
+2
to
+7
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial | 💤 Low value Consider making aria-label translatable. The selection controls correctly implement disabled behavior per past reviews. The hardcoded ♻️ Optional i18n enhancement- <button *ngIf="isInSelectionMode() && typeApproval === 'enumeration'" mat-icon-button type="button" aria-label="Clear selected"
+ <button *ngIf="isInSelectionMode() && typeApproval === 'enumeration'" mat-icon-button type="button" [attr.aria-label]="'headers.clearSelection' | translate"📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||
| <mat-form-field *ngFor="let header of this.headerService.selectedHeaders$ | async; let i = index" fxLayout="row" | ||||||||||||||||||||||||||
| fxLayoutAlign=" center" fxFlex [ngStyle]="{'min-width': getMinWidth()}" appearance="outline" | ||||||||||||||||||||||||||
| [fxHide.lt-xl]="i >= 4 && this.headerService.responsiveHeaders && !this.headerService.overflowMode" | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,10 @@ | ||
| <div fxFlex="100" fxLayout="row" fxLayoutAlign=" center"> | ||
| <mat-checkbox *ngIf="approval && typeApproval === 'multichoice'" [formControl]="approvalFormControl" [indeterminate]="indeterminate" | ||
| (click)="$event.stopPropagation();" color='primary' class="checkbox-padding"></mat-checkbox> | ||
| <mat-icon *ngIf="approval && typeApproval === 'enumeration'" color="warn" (click)="setValue();$event.stopPropagation();" class="checkbox-padding cursor-fix">close</mat-icon> | ||
| <mat-checkbox *ngIf="isInSelectionMode() && typeApproval === 'multichoice'" [formControl]="approvalFormControl" [indeterminate]="indeterminate" | ||
| (click)="$event.stopPropagation();" color='primary' class="checkbox-padding" [disabled]="isSelectionDisabled()"></mat-checkbox> | ||
| <button *ngIf="isInSelectionMode() && typeApproval === 'enumeration'" mat-icon-button type="button" aria-label="Clear selected" | ||
| class="checkbox-padding cursor-fix" [disabled]="isSelectionDisabled()" (click)="setValue(); $event.stopPropagation();" [disableRipple]="true"> | ||
| <mat-icon color="warn">close</mat-icon> | ||
| </button> | ||
|
Comment on lines
+2
to
+7
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial | ⚖️ Poor tradeoff Consider extracting duplicated selection controls into a shared component. The selection control markup in lines 2-7 is identical to edit-mode and sort-mode templates. Extracting this into a reusable component would improve maintainability. 🤖 Prompt for AI Agents |
||
| <div *ngFor="let header of this.headerService.selectedHeaders$ | async; let i = index" | ||
| [fxHide.lt-xl]="i >= 4 && this.headerService.responsiveHeaders && !this.headerService.overflowMode" | ||
| [fxHide.lt-lg]="i >= 3 && this.headerService.responsiveHeaders && !this.headerService.overflowMode" | ||
|
|
||
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.
🧹 Nitpick | 🔵 Trivial | 💤 Low value
Consider using string enum values.
Numeric enums reverse-map and serialize as integers, which makes logs and any persisted/config representation harder to read (e.g.,
0vs"EDITABLE"). Since this enum is part of the public API and likely to appear in template-facing inputs, string values are easier to debug and safer to refactor (no accidental positional dependency).♻️ Proposed change
export enum SelectionBehavior { - EDITABLE, - VISIBLE, - HIDDEN + EDITABLE = 'EDITABLE', + VISIBLE = 'VISIBLE', + HIDDEN = 'HIDDEN' }📝 Committable suggestion
🤖 Prompt for AI Agents