|
| 1 | +<h2 mat-dialog-title align="center">Add Evidence</h2> |
| 2 | + |
| 3 | +<mat-dialog-content class="config-content"> |
| 4 | + <app-team-selector |
| 5 | + [allTeams]="allTeams" |
| 6 | + [(selectedTeams)]="selectedTeams" |
| 7 | + [teamGroups]="teamGroups" |
| 8 | + (selectedTeamsChange)="onSelectedTeamsChange($event)" |
| 9 | + [type]="'add-evidence-config'"> |
| 10 | + </app-team-selector> |
| 11 | + <mat-error *ngIf="teamsError" class="field-error" style="padding: 0 0 8px 0" |
| 12 | + >At least one team must be selected.</mat-error |
| 13 | + > |
| 14 | + |
| 15 | + <mat-divider></mat-divider> |
| 16 | + |
| 17 | + <!-- Title --> |
| 18 | + <div class="config-section"> |
| 19 | + <h3>Evidence Details</h3> |
| 20 | + <mat-form-field appearance="outline" class="full-width"> |
| 21 | + <mat-label>Title</mat-label> |
| 22 | + <input matInput [(ngModel)]="title" placeholder="e.g. Implemented SAST scanning" required /> |
| 23 | + </mat-form-field> |
| 24 | + <mat-error *ngIf="titleError" class="field-error">Title is required.</mat-error> |
| 25 | + |
| 26 | + <mat-form-field appearance="outline" class="full-width"> |
| 27 | + <mat-label>Description</mat-label> |
| 28 | + <textarea |
| 29 | + matInput |
| 30 | + [(ngModel)]="description" |
| 31 | + rows="4" |
| 32 | + placeholder="Describe the evidence in detail..."></textarea> |
| 33 | + </mat-form-field> |
| 34 | + <mat-form-field appearance="outline"> |
| 35 | + <mat-label>Reviewer</mat-label> |
| 36 | + <input matInput [(ngModel)]="reviewer" placeholder="e.g. Jane Doe" /> |
| 37 | + </mat-form-field> |
| 38 | + </div> |
| 39 | + |
| 40 | + <mat-divider></mat-divider> |
| 41 | + <!-- Attachments --> |
| 42 | + <div class="config-section"> |
| 43 | + <h3>Attachments</h3> |
| 44 | + <p class="config-hint">Add links to supporting documents, images, or URLs.</p> |
| 45 | + <div *ngFor="let att of attachments; let i = index" class="attachment-row"> |
| 46 | + <mat-form-field appearance="outline" class="attachment-type"> |
| 47 | + <mat-label>Type</mat-label> |
| 48 | + <mat-select [(ngModel)]="att.type"> |
| 49 | + <mat-option *ngFor="let aType of attachmentTypes" [value]="aType"> |
| 50 | + {{ aType }} |
| 51 | + </mat-option> |
| 52 | + </mat-select> |
| 53 | + </mat-form-field> |
| 54 | + <mat-form-field appearance="outline" class="attachment-link"> |
| 55 | + <mat-label>URL</mat-label> |
| 56 | + <input matInput [(ngModel)]="att.externalLink" placeholder="https://..." /> |
| 57 | + </mat-form-field> |
| 58 | + <button mat-icon-button color="warn" (click)="removeAttachment(i)" matTooltip="Remove"> |
| 59 | + <mat-icon>delete</mat-icon> |
| 60 | + </button> |
| 61 | + </div> |
| 62 | + <button mat-stroked-button color="primary" (click)="addAttachment()"> |
| 63 | + <mat-icon>add</mat-icon> Add Attachment |
| 64 | + </button> |
| 65 | + </div> |
| 66 | +</mat-dialog-content> |
| 67 | + |
| 68 | +<mat-dialog-actions align="end"> |
| 69 | + <button mat-button (click)="onCancel()">Cancel</button> |
| 70 | + <button mat-raised-button color="primary" (click)="onSave()">Save Evidence</button> |
| 71 | +</mat-dialog-actions> |
0 commit comments