Skip to content

Commit

Permalink
chore(admin): #994 improve bpn edc configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
ds-mmaul committed Jul 2, 2024
1 parent ce6b15c commit ebff94a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,30 @@
>
</mat-card-header>
<mat-card-content>
<div class="bpn-config--top-container">
<p class="bpn-config--intro">
{{ 'pageAdmin.bpnConfig.intro' | i18n }}
</p>

<div class="bpn-config--save" *ngIf="changeInformation$ | async as info"
matTooltip="{{ ((info.deleted.length + info.added.length + info.changed.length) > 0 ? 'actions.save' : 'actions.noChanges') | i18n}}"
matTooltipClass="table--header--tooltip"
matTooltipPosition="above"
[class.mdc-tooltip--multiline]="true"
[matTooltipShowDelay]="1000"
>
<app-button
color="primary"
iconName="save"
[isDisabled]="!(info.deleted.length + info.added.length + info.changed.length)"
onkeydown="saveData()"
(click)="saveData()"
>
</app-button>

</div>
</div>

<div class="bpn-config">
<div class="bpn--add-new">

Expand All @@ -51,31 +71,7 @@
</div>
</div>

<div class="bpn-config--save" *ngIf="changeInformation$ | async as info">
<app-text-with-icon [testId]="'text-with-icon--deleted'" iconName="delete" color="warn"
>{{ 'pageAdmin.bpnConfig.deleted' | i18n }}: {{ info.deleted.length }}</app-text-with-icon
>

<app-text-with-icon [testId]="'text-with-icon--added'" iconName="add" color="primary"
>{{ 'pageAdmin.bpnConfig.added' | i18n }}: {{ info.added.length }}</app-text-with-icon
>

<app-text-with-icon [testId]="'text-with-icon--changed'" iconName="edit"
>{{ 'pageAdmin.bpnConfig.changed' | i18n }}: {{ info.changed.length }}</app-text-with-icon
>

<app-button
class="bpn-config--button"
variant="raised"
color="primary"
[isDisabled]="!(info.deleted.length + info.added.length + info.changed.length)"
onkeydown="saveData()"
(click)="saveData()"
>
{{ 'actions.saveChanges' | i18n }}
</app-button>

</div>

<div class="flex w-full justify-start"
*ngIf="newBpnConfig.controls.length > 0 || editBpnConfig.controls.length > 0">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
}
}

.bpn-config--top-container {
display: flex;
justify-content: space-between;
}

.bpn-config--intro {
width: 90%;
padding: 10px 20px;
Expand Down Expand Up @@ -83,17 +88,7 @@
}

.bpn-config--save {
position: sticky;
top: 0;
z-index: 2;
height: 70px;
padding: 10px;
width: calc(100% + 32px);
background: white;

display: flex;
justify-content: space-around;
align-items: center;
}

.bpn-config--delete_animation {
Expand Down

0 comments on commit ebff94a

Please sign in to comment.