Skip to content

Commit

Permalink
fix: hide list-active if no active announcements (#287)
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryT-CG authored Oct 28, 2024
1 parent d72d9ac commit e9aa9bf
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/app/_am-mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
display: inline-block;
position: absolute;
right: -12px;
top: -6px;
top: -7px;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,14 @@
>
<div class="flex column-gap-3 row-gap-1 justify-content-start align-items-center">
<div class="pi pi-question-circle text-3xl danger-action-text"></div>
<div>
<div class="flex flex-column row-gap-2">
<div id="am_announcement_delete_message_text" class="font-bold">
{{('ACTIONS.DELETE.MESSAGE_TEXT' | translate).replace('{{ITEM}}', announcement?.title)}}
{{ 'ACTIONS.DELETE.MESSAGE_TEXT' | translate }}
</div>
<div class="mt-2">{{ 'ACTIONS.DELETE.MESSAGE_INFO' | translate }}</div>
<div id="am_announcement_delete_announcement_title" class="px-5 text-center danger-action-text">
{{ announcement?.title }}
</div>
<div>{{ 'ACTIONS.DELETE.MESSAGE_INFO' | translate }}</div>
</div>
</div>
<ng-template pTemplate="footer">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<ng-container *ngIf="announcements$ | async as announcements">
<div [ocxContent]="'ANNOUNCEMENT.LIST-ACTIVE.TITLE' | translate" class="min-height-10rem surface-200">
<div
*ngIf="announcements.length > 0"
[ocxContent]="'ANNOUNCEMENT.LIST-ACTIVE.TITLE' | translate"
class="min-height-10rem surface-200"
>
<div class="pr-2 flex flex-column row-gap-2 max-h-20rem overflow-x-hidden overflow-y-auto">
<a
*ngFor="let announcement of announcements; let i = index"
Expand Down
2 changes: 1 addition & 1 deletion src/assets/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"LABEL": "Löschen",
"ANNOUNCEMENT": "Neuigkeit löschen",
"ANNOUNCEMENT.TOOLTIP": "Diese Neuigkeit löschen",
"MESSAGE_TEXT": "Möchten Sie \"{{ITEM}}\" löschen?",
"MESSAGE_TEXT": "Möchten Sie diese Neuigkeit löschen?",
"MESSAGE_INFO": "Diese Aktion kann nicht rückgängig gemacht werden!",
"MESSAGE": {
"OK": "Die Neuigkeit wurde erfolgreich gelöscht",
Expand Down
2 changes: 1 addition & 1 deletion src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"LABEL": "Delete",
"ANNOUNCEMENT": "Delete Announcement",
"ANNOUNCEMENT.TOOLTIP": "Delete this Announcement",
"MESSAGE_TEXT": "Do you want to delete \"{{ITEM}}\"?",
"MESSAGE_TEXT": "Do you want to delete this?",
"MESSAGE_INFO": "This action cannot be undone!",
"MESSAGE": {
"OK": "The Announcement was deleted successfully",
Expand Down

0 comments on commit e9aa9bf

Please sign in to comment.