Skip to content

Commit 5f0ddea

Browse files
resolved merge conflicts (#368)
Co-authored-by: tumms2021389 <[email protected]>
1 parent d553e46 commit 5f0ddea

File tree

1 file changed

+49
-22
lines changed

1 file changed

+49
-22
lines changed
Lines changed: 49 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
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+
>
25
<div *ngFor="let cardContent of contentList">
36
<mat-card [ngStyle]="cardStyle" appearance="outlined" (click)="cardSelect($event, cardContent.commonCardProps)">
47
<img
@@ -9,27 +12,15 @@
912
[ngStyle]="cardContent.cardImage.style"
1013
/>
1114
<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+
>
3324
<div
3425
*ngFor="let field of cardContent.commonCardProps.fields"
3526
[ngStyle]="field.type !== 'TextArea' ? (field.name ? defaultStyle : noLabelStyle) : specialStyle"
@@ -41,3 +32,39 @@
4132
</mat-card>
4233
</div>
4334
</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

Comments
 (0)