shipping methods

This commit is contained in:
Tizian.Breuch
2025-11-28 11:18:42 +01:00
parent ac42f8b1b9
commit dfe631edf6
14 changed files with 135 additions and 62 deletions

View File

@@ -35,8 +35,8 @@
<ng-container *ngSwitchCase="'image-text'">
<div class="user-cell">
<img [src]="getProperty(item, col.imageKey!) || 'https://via.placeholder.com/40'"
[alt]="'Bild von ' + getProperty(item, col.key)" />
<img [src]="getProperty(item, col.imageKey!) || fallbackImage"
alt="{{ item.name }}" />
<div>
<div class="user-name">{{ getProperty(item, col.key) }}</div>
<div class="user-email">{{ getProperty(item, col.subKey!) }}</div>
@@ -45,8 +45,8 @@
</ng-container>
<ng-container *ngSwitchCase="'image'">
<img [src]="getProperty(item, col.key) || 'https://via.placeholder.com/50'"
alt="Bild"
<img [src]="getProperty(item, col.key) || fallbackImage"
alt="{{ item.name }}"
style="width: 50px; height: 50px; object-fit: cover; border-radius: 4px;">
</ng-container>

View File

@@ -35,6 +35,7 @@ export class GenericTableComponent implements OnChanges, OnInit {
public displayedData: any[] = [];
public currentPage = 1;
public readonly fallbackImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1MCIgaGVpZ2h0PSI1MCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiNjY2NjY2MiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiByeT0iMiIvPjxjaXJjbGUgY3g9IjkiIGN5PSI5IiByPSIyIi8+PHBhdGggZD0ibTIxIDE1LTUtNWwtNSA1bC0yLTJsLTUgNSIvPjwvc3ZnPg==';
ngOnInit(): void { this.updatePagination(); }
ngOnChanges(changes: SimpleChanges): void { if (changes['data']) { this.currentPage = 1; this.updatePagination(); } }
@@ -47,6 +48,7 @@ export class GenericTableComponent implements OnChanges, OnInit {
}
getProperty(item: any, key: string): any {
if (!key) return '';
return key.split('.').reduce((obj, part) => obj && obj[part], item);
}

View File

@@ -8,7 +8,7 @@
iconName="chevron_backward"
(click)="goToPrevious()"
[disabled]="currentPage === 1"
tooltip="Vorherige Seite">
>
</app-button>
<app-button
@@ -16,7 +16,7 @@
iconName="chevron_forward"
(click)="goToNext()"
[disabled]="currentPage === totalPages"
tooltip="Nächste Seite">
>
</app-button>
</div>

View File

@@ -135,11 +135,20 @@
transform: translateX(-50%) translateY(-12px);
}
.btn.is-loading {
cursor: wait;
}
.btn-content {
display: flex;
}
.btn-content span {
display: flex;
height: auto;
align-content: center;
flex-wrap: wrap-reverse;
}
.btn-content.is-hidden {
visibility: hidden;
opacity: 0;