|
1 | | -<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); grid-auto-rows: 1fr; gap: 0.5rem"> |
| 1 | +<div |
| 2 | + *ngIf="type === 'checkbox'" |
| 3 | + style="display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); grid-auto-rows: 1fr; gap: 0.5rem" |
| 4 | +> |
2 | 5 | <div *ngFor="let cardContent of contentList"> |
3 | 6 | <mat-card [ngStyle]="cardStyle" appearance="outlined" (click)="cardSelect($event, cardContent.commonCardProps)"> |
4 | 7 | <img |
|
9 | 12 | [ngStyle]="cardContent.cardImage.style" |
10 | 13 | /> |
11 | 14 | <mat-card-content> |
12 | | - <div *ngIf="type === 'radio'"> |
13 | | - <mat-radio-button |
14 | | - [checked]="radioBtnValue === cardContent?.commonCardProps?.key" |
15 | | - [disabled]="disabled" |
16 | | - [value]="cardContent.commonCardProps.key" |
17 | | - (change)="fieldOnChange(cardContent.commonCardProps.key)" |
18 | | - > |
19 | | - {{ cardContent.commonCardProps.label }} |
20 | | - </mat-radio-button> |
21 | | - </div> |
22 | | - <div *ngIf="type === 'checkbox'"> |
23 | | - <mat-checkbox |
24 | | - [labelPosition]="'after'" |
25 | | - [checked]="cardContent.commonCardProps.selected" |
26 | | - [disabled]="disabled || readOnly" |
27 | | - [attr.data-test-id]="testId + ':' + cardContent.commonCardProps.label" |
28 | | - (change)="handleChangeMultiMode($event, cardContent.commonCardProps)" |
29 | | - (blur)="fieldOnBlur()" |
30 | | - >{{ cardContent.commonCardProps.label }}</mat-checkbox |
31 | | - > |
32 | | - </div> |
| 15 | + <mat-checkbox |
| 16 | + [labelPosition]="'after'" |
| 17 | + [checked]="cardContent.commonCardProps.selected" |
| 18 | + [disabled]="disabled || readOnly" |
| 19 | + [attr.data-test-id]="testId + ':' + cardContent.commonCardProps.label" |
| 20 | + (change)="handleChangeMultiMode($event, cardContent.commonCardProps)" |
| 21 | + (blur)="fieldOnBlur()" |
| 22 | + >{{ cardContent.commonCardProps.label }}</mat-checkbox |
| 23 | + > |
33 | 24 | <div |
34 | 25 | *ngFor="let field of cardContent.commonCardProps.fields" |
35 | 26 | [ngStyle]="field.type !== 'TextArea' ? (field.name ? defaultStyle : noLabelStyle) : specialStyle" |
|
41 | 32 | </mat-card> |
42 | 33 | </div> |
43 | 34 | </div> |
| 35 | + |
| 36 | +<mat-radio-group |
| 37 | + *ngIf="type === 'radio'" |
| 38 | + style="display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); grid-auto-rows: 1fr; gap: 0.5rem" |
| 39 | + [name]="propName" |
| 40 | + [value]="radioBtnValue" |
| 41 | + (change)="fieldOnChange($event.value)" |
| 42 | +> |
| 43 | + <div *ngFor="let cardContent of contentList"> |
| 44 | + <mat-card [ngStyle]="cardStyle" appearance="outlined" (click)="cardSelect($event, cardContent.commonCardProps)"> |
| 45 | + <img |
| 46 | + *ngIf="cardContent.cardImage" |
| 47 | + mat-card-image |
| 48 | + src="{{ cardContent.cardImage.src }}" |
| 49 | + alt="{{ cardContent.cardImage.alt }}" |
| 50 | + [ngStyle]="cardContent.cardImage.style" |
| 51 | + /> |
| 52 | + <mat-card-content> |
| 53 | + <mat-radio-button |
| 54 | + [checked]="radioBtnValue === cardContent?.commonCardProps?.key" |
| 55 | + [disabled]="disabled" |
| 56 | + [value]="cardContent.commonCardProps.key" |
| 57 | + > |
| 58 | + {{ cardContent.commonCardProps.label }} |
| 59 | + </mat-radio-button> |
| 60 | + <div |
| 61 | + *ngFor="let field of cardContent.commonCardProps.fields" |
| 62 | + [ngStyle]="field.type !== 'TextArea' ? (field.name ? defaultStyle : noLabelStyle) : specialStyle" |
| 63 | + > |
| 64 | + <div>{{ field.name }}</div> |
| 65 | + <div>{{ field?.value?.getPConnect().getConfigProps().value ?? '--' }}</div> |
| 66 | + </div> |
| 67 | + </mat-card-content> |
| 68 | + </mat-card> |
| 69 | + </div> |
| 70 | +</mat-radio-group> |
0 commit comments