Skip to content

Commit

Permalink
fix: minors with styles[3141]
Browse files Browse the repository at this point in the history
  • Loading branch information
Ihar committed Jan 23, 2025
1 parent b076cb4 commit 572d751
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 24 deletions.
7 changes: 6 additions & 1 deletion frontend/src/app/app.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,11 @@ body {
padding-top: 12px;
}

::ng-deep td.propRowCell.cellName {
::ng-deep td.propRowCell.cellName,
::ng-deep .propRow .propRowCell{
align-content: center;
}

::ng-deep .propRow .propRowCell .remove-prop {
top: 10px !important;
}
Original file line number Diff line number Diff line change
Expand Up @@ -206,18 +206,24 @@

<div *ngIf="type === 'table'" class="merge-table" [attr.open]="panelOpenState">
<div class="merge-table-content">
<table *ngIf="blocks" class="custom-table">
<thead>
<tr>
<th *ngFor="let column of columns">{{ column.label }}</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let row of blocks" [attr.type]="row.type" [attr.rate]="row.total_rate">
<td *ngFor="let column of columns">{{ row[column.name] }}</td>
</tr>
</tbody>
</table>
<p-table *ngIf="blocks" [value]="blocks" class="table mat-table">
<ng-template pTemplate="header">
<tr class="mat-header-row">
<th *ngFor="let column of columns" class="mat-header-cell">
{{ column.label }}
</th>
</tr>
</ng-template>
<ng-template pTemplate="body" let-row>
<tr class="mat-row" [attr.type]="row.type" [attr.rate]="row.total_rate">
<td *ngFor="let column of columns" class="mat-cell">
<ng-container *ngIf="!isObject(row[column.name])">
{{ row[column.name] }}
</ng-container>
</td>
</tr>
</ng-template>
</p-table>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -604,24 +604,24 @@
display: block;
}

.merge-table-content::ng-deep mat-row[type="FULL"]:not([rate="100%"]) {
::ng-deep [type="FULL"]:not([rate="100%"]) {
background: #fffada;
}

.merge-table-content::ng-deep mat-row[type="FULL"] {
::ng-deep [type="FULL"] {
background: #d0ffd6;
}

.merge-table-content::ng-deep mat-row[type="PARTLY"] {
::ng-deep [type="PARTLY"] {
background: #fffada;
}

.merge-table-content::ng-deep mat-row[type="LEFT"],
.merge-table-content::ng-deep mat-row[type="RIGHT"] {
::ng-deep [type="LEFT"],
::ng-deep [type="RIGHT"] {
background: #ffc5c6;
}

.merge-table-content::ng-deep mat-row[type="PARTLY"][rate="100%"] {
::ng-deep [type="PARTLY"][rate="100%"] {
background: linear-gradient(45deg, #d0ffd6 48%, #fffada 52%);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,13 @@ export class ComparePolicyComponent implements OnInit {

this.columns = blocks?.columns || [];

console.log('this.columns', this.columns)

this.displayedColumns = this.columns
.filter(c => c.label)
.map(c => c.name);

console.log('this.displayedColumns', this.displayedColumns)
this.onRender();
}

Expand Down Expand Up @@ -156,4 +160,8 @@ export class ComparePolicyComponent implements OnInit {
}
return policy.id;
}

isObject(value: any): boolean {
return value !== null && typeof value === 'object';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
[(ngModel)]="properties.documentType"
[disabled]="readonly"
(onChange)="onSave()"
[appendTo]="'body'"
placeholder="Select a document type"
[options]="documentTypeOptions">
</p-dropdown>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
[disabled]="readonly"
(onChange)="onSave()"
placeholder="Select an ID type"
[options]="idTypeOptions">
[options]="idTypeOptions"
[appendTo]="'body'"
>
</p-dropdown>
</td>
</tr>
Expand Down Expand Up @@ -107,6 +109,7 @@
placeholder="Select a value"
[options]="getPresetOptions()"
optionLabel="label"
optionValue="value"
[appendTo]="'body'"
>
</p-dropdown>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,15 @@
}

.file-action-button {
height: 100%;
width: 20px;
//height: 100%;
width: 23px;
background: white;
border: none;
margin-top: 12px;

i {
position: relative;
}
}

.file-spinner {
Expand All @@ -26,4 +32,4 @@

.icon-container {
display: flex;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
}
}

width: 190px;
//width: 190px;
overflow: hidden;
}

Expand Down

0 comments on commit 572d751

Please sign in to comment.